# -*- 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 builtins as __builtin__

class yc_config_openconfig_network_instance__network_instances_network_instance_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/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 network
instance
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__type','__description','__router_id','__route_distinguisher','__fallback_network_instance',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DEFAULT_INSTANCE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:DEFAULT_INSTANCE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L3VRF': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L3VRF': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2VSI': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2VSI': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2P2P': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2P2P': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2L3': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2L3': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__description = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__router_id = 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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:dotted-quad', is_config=True)
    self.__route_distinguisher = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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])'}),], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', is_config=True)
    self.__fallback_network_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="fallback-network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='network-instance-ref', is_config=True)

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

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/config/name (string)

    YANG Description: An operator-assigned unique name for the network instance.
If the operator does not designate a name for the instance of
type 'DEFAULT_INSTANCE' (e.g. config), the implementation
should use the name of 'DEFAULT' (e.g. state).
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/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: An operator-assigned unique name for the network instance.
If the operator does not designate a name for the instance of
type 'DEFAULT_INSTANCE' (e.g. config), the implementation
should use the name of 'DEFAULT' (e.g. state).
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/config/type (identityref)

    YANG Description: The type of network instance. The value of this leaf indicates the type of forwarding entries that should be supported by this network instance. Signalling protocols also use the network instance type to infer the type of service
they advertise; for example MPLS signalling for an L2VSI network instance would infer a VPLS service whereas a type of L2PTP would infer a VPWS (pseudo-wire) service.

An implementation must support only a single network-instance of type 'DEFAULT_INSTANCE'. """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/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: The type of network instance. The value of this leaf
indicates the type of forwarding entries that should be
supported by this network instance. Signalling protocols also
use the network instance type to infer the type of service
they advertise; for example MPLS signalling for an L2VSI
network instance would infer a VPLS service whereas a type of
L2PTP would infer a VPWS (pseudo-wire) service.

An implementation must support only a single network-instance
of type 'DEFAULT_INSTANCE'.
    """
    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={'DEFAULT_INSTANCE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:DEFAULT_INSTANCE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L3VRF': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L3VRF': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2VSI': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2VSI': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2P2P': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2P2P': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2L3': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2L3': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DEFAULT_INSTANCE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:DEFAULT_INSTANCE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L3VRF': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L3VRF': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2VSI': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2VSI': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2P2P': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2P2P': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2L3': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2L3': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-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/network-instance', defining_module='openconfig-network-instance', 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={'DEFAULT_INSTANCE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:DEFAULT_INSTANCE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L3VRF': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L3VRF': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2VSI': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2VSI': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2P2P': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2P2P': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2L3': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2L3': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_description(self):
    """
    Getter method for description, mapped from YANG variable /network_instances/network_instance/config/description (string)

    YANG Description: A free-form string to be used by the network operator to
describe the function of this network instance
    """
    return self.__description
      
  def _set_description(self, v, load=False):
    """
    Setter method for description, mapped from YANG variable /network_instances/network_instance/config/description (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_description is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_description() directly.

    YANG Description: A free-form string to be used by the network operator to
describe the function of this network instance
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """description must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)""",
        })

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

  def _unset_description(self):
    self.__description = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_router_id(self):
    """
    Getter method for router_id, mapped from YANG variable /network_instances/network_instance/config/router_id (oc-yang:dotted-quad)

    YANG Description: A identifier for the local network instance - typically
used within associated routing protocols or signalling
routing information in another network instance
    """
    return self.__router_id
      
  def _set_router_id(self, v, load=False):
    """
    Setter method for router_id, mapped from YANG variable /network_instances/network_instance/config/router_id (oc-yang:dotted-quad)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_router_id() directly.

    YANG Description: A identifier for the local network instance - typically
used within associated routing protocols or signalling
routing information in another network instance
    """
    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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:dotted-quad', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """router_id must be of a type compatible with oc-yang:dotted-quad""",
          'defined-type': "oc-yang:dotted-quad",
          '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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:dotted-quad', is_config=True)""",
        })

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

  def _unset_router_id(self):
    self.__router_id = 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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:dotted-quad', is_config=True)


  def _get_route_distinguisher(self):
    """
    Getter method for route_distinguisher, mapped from YANG variable /network_instances/network_instance/config/route_distinguisher (oc-ni-types:route-distinguisher)

    YANG Description: The route distinguisher that should be used for the local
VRF or VSI instance when it is signalled via BGP.
    """
    return self.__route_distinguisher
      
  def _set_route_distinguisher(self, v, load=False):
    """
    Setter method for route_distinguisher, mapped from YANG variable /network_instances/network_instance/config/route_distinguisher (oc-ni-types:route-distinguisher)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route_distinguisher is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route_distinguisher() directly.

    YANG Description: The route distinguisher that should be used for the local
VRF or VSI instance when it is signalled via BGP.
    """
    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,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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])'}),], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route_distinguisher must be of a type compatible with oc-ni-types:route-distinguisher""",
          'defined-type': "oc-ni-types:route-distinguisher",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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])'}),], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', is_config=True)""",
        })

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

  def _unset_route_distinguisher(self):
    self.__route_distinguisher = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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])'}),], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', is_config=True)


  def _get_fallback_network_instance(self):
    """
    Getter method for fallback_network_instance, mapped from YANG variable /network_instances/network_instance/config/fallback_network_instance (network-instance-ref)

    YANG Description: When this leaf is populated, the specified network instance
should be used as a fallback instance when a route cannot
be resolved in the local network-instance.
This configuration is only valid when specified in a non-default
instance which must be a L3 capable VRF (i.e., L2L3, or L3VRF).
    """
    return self.__fallback_network_instance
      
  def _set_fallback_network_instance(self, v, load=False):
    """
    Setter method for fallback_network_instance, mapped from YANG variable /network_instances/network_instance/config/fallback_network_instance (network-instance-ref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_fallback_network_instance is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_fallback_network_instance() directly.

    YANG Description: When this leaf is populated, the specified network instance
should be used as a fallback instance when a route cannot
be resolved in the local network-instance.
This configuration is only valid when specified in a non-default
instance which must be a L3 capable VRF (i.e., L2L3, or L3VRF).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="fallback-network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='network-instance-ref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """fallback_network_instance must be of a type compatible with network-instance-ref""",
          'defined-type': "openconfig-network-instance:network-instance-ref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="fallback-network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='network-instance-ref', is_config=True)""",
        })

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

  def _unset_fallback_network_instance(self):
    self.__fallback_network_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="fallback-network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='network-instance-ref', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  type = __builtin__.property(_get_type, _set_type)
  description = __builtin__.property(_get_description, _set_description)
  router_id = __builtin__.property(_get_router_id, _set_router_id)
  route_distinguisher = __builtin__.property(_get_route_distinguisher, _set_route_distinguisher)
  fallback_network_instance = __builtin__.property(_get_fallback_network_instance, _set_fallback_network_instance)


  _pyangbind_elements = OrderedDict([('name', name), ('type', type), ('description', description), ('router_id', router_id), ('route_distinguisher', route_distinguisher), ('fallback_network_instance', fallback_network_instance), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/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 network
instance
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__type','__description','__router_id','__route_distinguisher','__fallback_network_instance',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DEFAULT_INSTANCE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:DEFAULT_INSTANCE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L3VRF': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L3VRF': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2VSI': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2VSI': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2P2P': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2P2P': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2L3': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2L3': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__description = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__router_id = 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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:dotted-quad', is_config=False)
    self.__route_distinguisher = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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])'}),], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', is_config=False)
    self.__fallback_network_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="fallback-network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='network-instance-ref', 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 ['network-instances', 'network-instance', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/state/name (string)

    YANG Description: An operator-assigned unique name for the network instance.
If the operator does not designate a name for the instance of
type 'DEFAULT_INSTANCE' (e.g. config), the implementation
should use the name of 'DEFAULT' (e.g. state).
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/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: An operator-assigned unique name for the network instance.
If the operator does not designate a name for the instance of
type 'DEFAULT_INSTANCE' (e.g. config), the implementation
should use the name of 'DEFAULT' (e.g. state).
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/state/type (identityref)

    YANG Description: The type of network instance. The value of this leaf
indicates the type of forwarding entries that should be
supported by this network instance. Signalling protocols also
use the network instance type to infer the type of service
they advertise; for example MPLS signalling for an L2VSI
network instance would infer a VPLS service whereas a type of
L2PTP would infer a VPWS (pseudo-wire) service.

An implementation must support only a single network-instance
of type 'DEFAULT_INSTANCE'.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/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: The type of network instance. The value of this leaf
indicates the type of forwarding entries that should be
supported by this network instance. Signalling protocols also
use the network instance type to infer the type of service
they advertise; for example MPLS signalling for an L2VSI
network instance would infer a VPLS service whereas a type of
L2PTP would infer a VPWS (pseudo-wire) service.

An implementation must support only a single network-instance
of type 'DEFAULT_INSTANCE'.
    """
    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={'DEFAULT_INSTANCE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:DEFAULT_INSTANCE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L3VRF': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L3VRF': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2VSI': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2VSI': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2P2P': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2P2P': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2L3': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2L3': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DEFAULT_INSTANCE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:DEFAULT_INSTANCE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L3VRF': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L3VRF': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2VSI': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2VSI': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2P2P': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2P2P': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2L3': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2L3': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-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/network-instance', defining_module='openconfig-network-instance', 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={'DEFAULT_INSTANCE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:DEFAULT_INSTANCE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L3VRF': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L3VRF': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2VSI': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2VSI': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2P2P': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2P2P': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2L3': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2L3': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_description(self):
    """
    Getter method for description, mapped from YANG variable /network_instances/network_instance/state/description (string)

    YANG Description: A free-form string to be used by the network operator to
describe the function of this network instance
    """
    return self.__description
      
  def _set_description(self, v, load=False):
    """
    Setter method for description, mapped from YANG variable /network_instances/network_instance/state/description (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_description is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_description() directly.

    YANG Description: A free-form string to be used by the network operator to
describe the function of this network instance
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """description must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

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

  def _unset_description(self):
    self.__description = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_router_id(self):
    """
    Getter method for router_id, mapped from YANG variable /network_instances/network_instance/state/router_id (oc-yang:dotted-quad)

    YANG Description: A identifier for the local network instance - typically
used within associated routing protocols or signalling
routing information in another network instance
    """
    return self.__router_id
      
  def _set_router_id(self, v, load=False):
    """
    Setter method for router_id, mapped from YANG variable /network_instances/network_instance/state/router_id (oc-yang:dotted-quad)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_router_id() directly.

    YANG Description: A identifier for the local network instance - typically
used within associated routing protocols or signalling
routing information in another network instance
    """
    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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:dotted-quad', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """router_id must be of a type compatible with oc-yang:dotted-quad""",
          'defined-type': "oc-yang:dotted-quad",
          '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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:dotted-quad', is_config=False)""",
        })

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

  def _unset_router_id(self):
    self.__router_id = 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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:dotted-quad', is_config=False)


  def _get_route_distinguisher(self):
    """
    Getter method for route_distinguisher, mapped from YANG variable /network_instances/network_instance/state/route_distinguisher (oc-ni-types:route-distinguisher)

    YANG Description: The route distinguisher that should be used for the local
VRF or VSI instance when it is signalled via BGP.
    """
    return self.__route_distinguisher
      
  def _set_route_distinguisher(self, v, load=False):
    """
    Setter method for route_distinguisher, mapped from YANG variable /network_instances/network_instance/state/route_distinguisher (oc-ni-types:route-distinguisher)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route_distinguisher is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route_distinguisher() directly.

    YANG Description: The route distinguisher that should be used for the local
VRF or VSI instance when it is signalled via BGP.
    """
    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,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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])'}),], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route_distinguisher must be of a type compatible with oc-ni-types:route-distinguisher""",
          'defined-type': "oc-ni-types:route-distinguisher",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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])'}),], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', is_config=False)""",
        })

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

  def _unset_route_distinguisher(self):
    self.__route_distinguisher = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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])'}),], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', is_config=False)


  def _get_fallback_network_instance(self):
    """
    Getter method for fallback_network_instance, mapped from YANG variable /network_instances/network_instance/state/fallback_network_instance (network-instance-ref)

    YANG Description: When this leaf is populated, the specified network instance
should be used as a fallback instance when a route cannot
be resolved in the local network-instance.
This configuration is only valid when specified in a non-default
instance which must be a L3 capable VRF (i.e., L2L3, or L3VRF).
    """
    return self.__fallback_network_instance
      
  def _set_fallback_network_instance(self, v, load=False):
    """
    Setter method for fallback_network_instance, mapped from YANG variable /network_instances/network_instance/state/fallback_network_instance (network-instance-ref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_fallback_network_instance is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_fallback_network_instance() directly.

    YANG Description: When this leaf is populated, the specified network instance
should be used as a fallback instance when a route cannot
be resolved in the local network-instance.
This configuration is only valid when specified in a non-default
instance which must be a L3 capable VRF (i.e., L2L3, or L3VRF).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="fallback-network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='network-instance-ref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """fallback_network_instance must be of a type compatible with network-instance-ref""",
          'defined-type': "openconfig-network-instance:network-instance-ref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="fallback-network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='network-instance-ref', is_config=False)""",
        })

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

  def _unset_fallback_network_instance(self):
    self.__fallback_network_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="fallback-network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='network-instance-ref', is_config=False)

  name = __builtin__.property(_get_name)
  type = __builtin__.property(_get_type)
  description = __builtin__.property(_get_description)
  router_id = __builtin__.property(_get_router_id)
  route_distinguisher = __builtin__.property(_get_route_distinguisher)
  fallback_network_instance = __builtin__.property(_get_fallback_network_instance)


  _pyangbind_elements = OrderedDict([('name', name), ('type', type), ('description', description), ('router_id', router_id), ('route_distinguisher', route_distinguisher), ('fallback_network_instance', fallback_network_instance), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_fdb_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/fdb/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 FDB
  """
  __slots__ = ('_path_helper', '_extmethods', '__mac_learning','__mac_aging_time','__maximum_entries','__anycast_gateway_mac','__flood_unknown_unicast_supression',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__mac_learning = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="mac-learning", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__mac_aging_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="mac-aging-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__maximum_entries = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="maximum-entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__anycast_gateway_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="anycast-gateway-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=True)
    self.__flood_unknown_unicast_supression = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="flood-unknown-unicast-supression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'config']

  def _get_mac_learning(self):
    """
    Getter method for mac_learning, mapped from YANG variable /network_instances/network_instance/fdb/config/mac_learning (boolean)

    YANG Description: When this leaf is set to true, MAC learning is enabled for
the network instance, such that MAC addresses are learned
from ingress frames and added to the FDB.
    """
    return self.__mac_learning
      
  def _set_mac_learning(self, v, load=False):
    """
    Setter method for mac_learning, mapped from YANG variable /network_instances/network_instance/fdb/config/mac_learning (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_learning is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_learning() directly.

    YANG Description: When this leaf is set to true, MAC learning is enabled for
the network instance, such that MAC addresses are learned
from ingress frames and added to the FDB.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="mac-learning", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_learning must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="mac-learning", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

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

  def _unset_mac_learning(self):
    self.__mac_learning = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="mac-learning", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_mac_aging_time(self):
    """
    Getter method for mac_aging_time, mapped from YANG variable /network_instances/network_instance/fdb/config/mac_aging_time (uint16)

    YANG Description: The number of seconds of inactivity after which the entry
in the local FDB is timed out.
    """
    return self.__mac_aging_time
      
  def _set_mac_aging_time(self, v, load=False):
    """
    Setter method for mac_aging_time, mapped from YANG variable /network_instances/network_instance/fdb/config/mac_aging_time (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_aging_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_aging_time() directly.

    YANG Description: The number of seconds of inactivity after which the entry
in the local FDB is timed out.
    """
    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="mac-aging-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_aging_time 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="mac-aging-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

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

  def _unset_mac_aging_time(self):
    self.__mac_aging_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="mac-aging-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_maximum_entries(self):
    """
    Getter method for maximum_entries, mapped from YANG variable /network_instances/network_instance/fdb/config/maximum_entries (uint16)

    YANG Description: The maximum number of MAC address entries that should be
accepted into the FDB
    """
    return self.__maximum_entries
      
  def _set_maximum_entries(self, v, load=False):
    """
    Setter method for maximum_entries, mapped from YANG variable /network_instances/network_instance/fdb/config/maximum_entries (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_maximum_entries is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_maximum_entries() directly.

    YANG Description: The maximum number of MAC address entries that should be
accepted into the FDB
    """
    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="maximum-entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """maximum_entries 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="maximum-entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

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

  def _unset_maximum_entries(self):
    self.__maximum_entries = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="maximum-entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_anycast_gateway_mac(self):
    """
    Getter method for anycast_gateway_mac, mapped from YANG variable /network_instances/network_instance/fdb/config/anycast_gateway_mac (oc-yang:mac-address)

    YANG Description: Configure the anycast gateway MAC address that all VTEPs
use for the network instance. When a VM sends an Address
Resolution Protocol (ARP) request for the anycast gateway
IP address in a VXLAN virtual network, the VTEP responds
with the configured anycast MAC address.
    """
    return self.__anycast_gateway_mac
      
  def _set_anycast_gateway_mac(self, v, load=False):
    """
    Setter method for anycast_gateway_mac, mapped from YANG variable /network_instances/network_instance/fdb/config/anycast_gateway_mac (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_anycast_gateway_mac is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_anycast_gateway_mac() directly.

    YANG Description: Configure the anycast gateway MAC address that all VTEPs
use for the network instance. When a VM sends an Address
Resolution Protocol (ARP) request for the anycast gateway
IP address in a VXLAN virtual network, the VTEP responds
with the configured anycast 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="anycast-gateway-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """anycast_gateway_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="anycast-gateway-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=True)""",
        })

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

  def _unset_anycast_gateway_mac(self):
    self.__anycast_gateway_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="anycast-gateway-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=True)


  def _get_flood_unknown_unicast_supression(self):
    """
    Getter method for flood_unknown_unicast_supression, mapped from YANG variable /network_instances/network_instance/fdb/config/flood_unknown_unicast_supression (boolean)

    YANG Description: Enable (TRUE) or disable (FALSE) the Unknown Unicast Flooding
Suppression. If the Unknown Unicast Flooding Suppression is on,
the unicast traffic towards an unknown host will be dropped.
    """
    return self.__flood_unknown_unicast_supression
      
  def _set_flood_unknown_unicast_supression(self, v, load=False):
    """
    Setter method for flood_unknown_unicast_supression, mapped from YANG variable /network_instances/network_instance/fdb/config/flood_unknown_unicast_supression (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flood_unknown_unicast_supression is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flood_unknown_unicast_supression() directly.

    YANG Description: Enable (TRUE) or disable (FALSE) the Unknown Unicast Flooding
Suppression. If the Unknown Unicast Flooding Suppression is on,
the unicast traffic towards an unknown host will be dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="flood-unknown-unicast-supression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flood_unknown_unicast_supression must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="flood-unknown-unicast-supression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

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

  def _unset_flood_unknown_unicast_supression(self):
    self.__flood_unknown_unicast_supression = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="flood-unknown-unicast-supression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  mac_learning = __builtin__.property(_get_mac_learning, _set_mac_learning)
  mac_aging_time = __builtin__.property(_get_mac_aging_time, _set_mac_aging_time)
  maximum_entries = __builtin__.property(_get_maximum_entries, _set_maximum_entries)
  anycast_gateway_mac = __builtin__.property(_get_anycast_gateway_mac, _set_anycast_gateway_mac)
  flood_unknown_unicast_supression = __builtin__.property(_get_flood_unknown_unicast_supression, _set_flood_unknown_unicast_supression)


  _pyangbind_elements = OrderedDict([('mac_learning', mac_learning), ('mac_aging_time', mac_aging_time), ('maximum_entries', maximum_entries), ('anycast_gateway_mac', anycast_gateway_mac), ('flood_unknown_unicast_supression', flood_unknown_unicast_supression), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_fdb_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/fdb/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 FDB
  """
  __slots__ = ('_path_helper', '_extmethods', '__mac_learning','__mac_aging_time','__maximum_entries','__anycast_gateway_mac','__flood_unknown_unicast_supression',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__mac_learning = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="mac-learning", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__mac_aging_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="mac-aging-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__maximum_entries = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="maximum-entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__anycast_gateway_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="anycast-gateway-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)
    self.__flood_unknown_unicast_supression = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="flood-unknown-unicast-supression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'state']

  def _get_mac_learning(self):
    """
    Getter method for mac_learning, mapped from YANG variable /network_instances/network_instance/fdb/state/mac_learning (boolean)

    YANG Description: When this leaf is set to true, MAC learning is enabled for
the network instance, such that MAC addresses are learned
from ingress frames and added to the FDB.
    """
    return self.__mac_learning
      
  def _set_mac_learning(self, v, load=False):
    """
    Setter method for mac_learning, mapped from YANG variable /network_instances/network_instance/fdb/state/mac_learning (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_learning is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_learning() directly.

    YANG Description: When this leaf is set to true, MAC learning is enabled for
the network instance, such that MAC addresses are learned
from ingress frames and added to the FDB.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="mac-learning", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_learning must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="mac-learning", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

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

  def _unset_mac_learning(self):
    self.__mac_learning = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="mac-learning", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_mac_aging_time(self):
    """
    Getter method for mac_aging_time, mapped from YANG variable /network_instances/network_instance/fdb/state/mac_aging_time (uint16)

    YANG Description: The number of seconds of inactivity after which the entry
in the local FDB is timed out.
    """
    return self.__mac_aging_time
      
  def _set_mac_aging_time(self, v, load=False):
    """
    Setter method for mac_aging_time, mapped from YANG variable /network_instances/network_instance/fdb/state/mac_aging_time (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_aging_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_aging_time() directly.

    YANG Description: The number of seconds of inactivity after which the entry
in the local FDB is timed out.
    """
    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="mac-aging-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_aging_time 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="mac-aging-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

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

  def _unset_mac_aging_time(self):
    self.__mac_aging_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="mac-aging-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_maximum_entries(self):
    """
    Getter method for maximum_entries, mapped from YANG variable /network_instances/network_instance/fdb/state/maximum_entries (uint16)

    YANG Description: The maximum number of MAC address entries that should be
accepted into the FDB
    """
    return self.__maximum_entries
      
  def _set_maximum_entries(self, v, load=False):
    """
    Setter method for maximum_entries, mapped from YANG variable /network_instances/network_instance/fdb/state/maximum_entries (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_maximum_entries is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_maximum_entries() directly.

    YANG Description: The maximum number of MAC address entries that should be
accepted into the FDB
    """
    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="maximum-entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """maximum_entries 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="maximum-entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

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

  def _unset_maximum_entries(self):
    self.__maximum_entries = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="maximum-entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_anycast_gateway_mac(self):
    """
    Getter method for anycast_gateway_mac, mapped from YANG variable /network_instances/network_instance/fdb/state/anycast_gateway_mac (oc-yang:mac-address)

    YANG Description: Configure the anycast gateway MAC address that all VTEPs
use for the network instance. When a VM sends an Address
Resolution Protocol (ARP) request for the anycast gateway
IP address in a VXLAN virtual network, the VTEP responds
with the configured anycast MAC address.
    """
    return self.__anycast_gateway_mac
      
  def _set_anycast_gateway_mac(self, v, load=False):
    """
    Setter method for anycast_gateway_mac, mapped from YANG variable /network_instances/network_instance/fdb/state/anycast_gateway_mac (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_anycast_gateway_mac is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_anycast_gateway_mac() directly.

    YANG Description: Configure the anycast gateway MAC address that all VTEPs
use for the network instance. When a VM sends an Address
Resolution Protocol (ARP) request for the anycast gateway
IP address in a VXLAN virtual network, the VTEP responds
with the configured anycast 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="anycast-gateway-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """anycast_gateway_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="anycast-gateway-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)""",
        })

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

  def _unset_anycast_gateway_mac(self):
    self.__anycast_gateway_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="anycast-gateway-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)


  def _get_flood_unknown_unicast_supression(self):
    """
    Getter method for flood_unknown_unicast_supression, mapped from YANG variable /network_instances/network_instance/fdb/state/flood_unknown_unicast_supression (boolean)

    YANG Description: Enable (TRUE) or disable (FALSE) the Unknown Unicast Flooding
Suppression. If the Unknown Unicast Flooding Suppression is on,
the unicast traffic towards an unknown host will be dropped.
    """
    return self.__flood_unknown_unicast_supression
      
  def _set_flood_unknown_unicast_supression(self, v, load=False):
    """
    Setter method for flood_unknown_unicast_supression, mapped from YANG variable /network_instances/network_instance/fdb/state/flood_unknown_unicast_supression (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flood_unknown_unicast_supression is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flood_unknown_unicast_supression() directly.

    YANG Description: Enable (TRUE) or disable (FALSE) the Unknown Unicast Flooding
Suppression. If the Unknown Unicast Flooding Suppression is on,
the unicast traffic towards an unknown host will be dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="flood-unknown-unicast-supression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flood_unknown_unicast_supression must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="flood-unknown-unicast-supression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

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

  def _unset_flood_unknown_unicast_supression(self):
    self.__flood_unknown_unicast_supression = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="flood-unknown-unicast-supression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  mac_learning = __builtin__.property(_get_mac_learning)
  mac_aging_time = __builtin__.property(_get_mac_aging_time)
  maximum_entries = __builtin__.property(_get_maximum_entries)
  anycast_gateway_mac = __builtin__.property(_get_anycast_gateway_mac)
  flood_unknown_unicast_supression = __builtin__.property(_get_flood_unknown_unicast_supression)


  _pyangbind_elements = OrderedDict([('mac_learning', mac_learning), ('mac_aging_time', mac_aging_time), ('maximum_entries', maximum_entries), ('anycast_gateway_mac', anycast_gateway_mac), ('flood_unknown_unicast_supression', flood_unknown_unicast_supression), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_fdb_mac_table_entries_entry_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/fdb/mac-table/entries/entry/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for MAC table entries
  """
  __slots__ = ('_path_helper', '_extmethods', '__mac_address','__vlan',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__mac_address = 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=True)
    self.__vlan = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'mac-table', 'entries', 'entry', 'config']

  def _get_mac_address(self):
    """
    Getter method for mac_address, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/config/mac_address (oc-yang:mac-address)

    YANG Description: MAC address for the dynamic or static MAC table
entry
    """
    return self.__mac_address
      
  def _set_mac_address(self, v, load=False):
    """
    Setter method for mac_address, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/config/mac_address (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_address() directly.

    YANG Description: MAC address for the dynamic or static MAC table
entry
    """
    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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_address 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=True)""",
        })

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

  def _unset_mac_address(self):
    self.__mac_address = 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=True)


  def _get_vlan(self):
    """
    Getter method for vlan, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/config/vlan (leafref)

    YANG Description: VLAN on which the MAC address is present. The same MAC
address may be seen on multiple VLANs in some cases.
    """
    return self.__vlan
      
  def _set_vlan(self, v, load=False):
    """
    Setter method for vlan, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/config/vlan (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_vlan is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_vlan() directly.

    YANG Description: VLAN on which the MAC address is present. The same MAC
address may be seen on multiple VLANs in some cases.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """vlan must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_vlan(self):
    self.__vlan = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)

  mac_address = __builtin__.property(_get_mac_address, _set_mac_address)
  vlan = __builtin__.property(_get_vlan, _set_vlan)


  _pyangbind_elements = OrderedDict([('mac_address', mac_address), ('vlan', vlan), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_fdb_mac_table_entries_entry_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/fdb/mac-table/entries/entry/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for MAC table entries
  """
  __slots__ = ('_path_helper', '_extmethods', '__mac_address','__vlan','__age','__entry_type','__evi',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__mac_address = 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)
    self.__vlan = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__age = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="age", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__entry_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STATIC': {}, 'DYNAMIC': {}},), is_leaf=True, yang_name="entry-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__evi = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:vni-id', 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 ['network-instances', 'network-instance', 'fdb', 'mac-table', 'entries', 'entry', 'state']

  def _get_mac_address(self):
    """
    Getter method for mac_address, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/state/mac_address (oc-yang:mac-address)

    YANG Description: MAC address for the dynamic or static MAC table
entry
    """
    return self.__mac_address
      
  def _set_mac_address(self, v, load=False):
    """
    Setter method for mac_address, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/state/mac_address (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_address() directly.

    YANG Description: MAC address for the dynamic or static MAC table
entry
    """
    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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_address 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)""",
        })

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

  def _unset_mac_address(self):
    self.__mac_address = 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)


  def _get_vlan(self):
    """
    Getter method for vlan, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/state/vlan (leafref)

    YANG Description: VLAN on which the MAC address is present. The same MAC
address may be seen on multiple VLANs in some cases.
    """
    return self.__vlan
      
  def _set_vlan(self, v, load=False):
    """
    Setter method for vlan, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/state/vlan (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_vlan is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_vlan() directly.

    YANG Description: VLAN on which the MAC address is present. The same MAC
address may be seen on multiple VLANs in some cases.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """vlan must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_vlan(self):
    self.__vlan = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_age(self):
    """
    Getter method for age, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/state/age (uint64)

    YANG Description: The time in seconds since the MAC address has been in the
table
    """
    return self.__age
      
  def _set_age(self, v, load=False):
    """
    Setter method for age, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/state/age (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_age is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_age() directly.

    YANG Description: The time in seconds since the MAC address has been in the
table
    """
    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="age", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """age 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="age", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

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

  def _unset_age(self):
    self.__age = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="age", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_entry_type(self):
    """
    Getter method for entry_type, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/state/entry_type (enumeration)

    YANG Description: Indicates whether the entry was statically configured, or
dynamically learned.
    """
    return self.__entry_type
      
  def _set_entry_type(self, v, load=False):
    """
    Setter method for entry_type, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/state/entry_type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_entry_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_entry_type() directly.

    YANG Description: Indicates whether the entry was statically configured, or
dynamically learned.
    """
    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': {}, 'DYNAMIC': {}},), is_leaf=True, yang_name="entry-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """entry_type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STATIC': {}, 'DYNAMIC': {}},), is_leaf=True, yang_name="entry-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

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

  def _unset_entry_type(self):
    self.__entry_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STATIC': {}, 'DYNAMIC': {}},), is_leaf=True, yang_name="entry-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_evi(self):
    """
    Getter method for evi, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/state/evi (oc-evpn-types:vni-id)

    YANG Description: EVPN EVI to associate with the BD/VLAN
    """
    return self.__evi
      
  def _set_evi(self, v, load=False):
    """
    Setter method for evi, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/state/evi (oc-evpn-types:vni-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_evi is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_evi() directly.

    YANG Description: EVPN EVI to associate with the BD/VLAN
    """
    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': ['1..16777215']}), is_leaf=True, yang_name="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:vni-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """evi must be of a type compatible with oc-evpn-types:vni-id""",
          'defined-type': "oc-evpn-types:vni-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:vni-id', is_config=False)""",
        })

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

  def _unset_evi(self):
    self.__evi = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:vni-id', is_config=False)

  mac_address = __builtin__.property(_get_mac_address)
  vlan = __builtin__.property(_get_vlan)
  age = __builtin__.property(_get_age)
  entry_type = __builtin__.property(_get_entry_type)
  evi = __builtin__.property(_get_evi)


  _pyangbind_elements = OrderedDict([('mac_address', mac_address), ('vlan', vlan), ('age', age), ('entry_type', entry_type), ('evi', evi), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_fdb_mac_table_entries_entry_interface_interface_ref_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/fdb/mac-table/entries/entry/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'mac-table', 'entries', 'entry', 'interface', 'interface-ref', 'config']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/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 /network_instances/network_instance/fdb/mac_table/entries/entry/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/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 /network_instances/network_instance/fdb/mac_table/entries/entry/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_mac_table_entries_entry_interface_interface_ref_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/fdb/mac-table/entries/entry/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'mac-table', 'entries', 'entry', 'interface', 'interface-ref', 'state']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/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 /network_instances/network_instance/fdb/mac_table/entries/entry/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/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 /network_instances/network_instance/fdb/mac_table/entries/entry/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_mac_table_entries_entry_interface_interface_ref(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/fdb/mac-table/entries/entry/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
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

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

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_fdb_mac_table_entries_entry_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_fdb_mac_table_entries_entry_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'mac-table', 'entries', 'entry', 'interface', 'interface-ref']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/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 /network_instances/network_instance/fdb/mac_table/entries/entry/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_network_instance__network_instances_network_instance_fdb_mac_table_entries_entry_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_mac_table_entries_entry_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_mac_table_entries_entry_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/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 /network_instances/network_instance/fdb/mac_table/entries/entry/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_network_instance__network_instances_network_instance_fdb_mac_table_entries_entry_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_mac_table_entries_entry_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_mac_table_entries_entry_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/network-instance', defining_module='openconfig-network-instance', 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_interface_openconfig_network_instance__network_instances_network_instance_fdb_mac_table_entries_entry_interface(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/fdb/mac-table/entries/entry/interface. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Reference to the base and/or subinterface for the
MAC table entry
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_ref',)

  _yang_name = 'interface'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__interface_ref = YANGDynClass(base=yc_interface_ref_openconfig_network_instance__network_instances_network_instance_fdb_mac_table_entries_entry_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'mac-table', 'entries', 'entry', 'interface']

  def _get_interface_ref(self):
    """
    Getter method for interface_ref, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/interface/interface_ref (container)

    YANG Description: Reference to an interface or subinterface
    """
    return self.__interface_ref
      
  def _set_interface_ref(self, v, load=False):
    """
    Setter method for interface_ref, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/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
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interface_ref_openconfig_network_instance__network_instances_network_instance_fdb_mac_table_entries_entry_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_mac_table_entries_entry_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_mac_table_entries_entry_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  interface_ref = __builtin__.property(_get_interface_ref, _set_interface_ref)


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


class yc_entry_openconfig_network_instance__network_instances_network_instance_fdb_mac_table_entries_entry(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/fdb/mac-table/entries/entry. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of learned MAC addresses
  """
  __slots__ = ('_path_helper', '_extmethods', '__mac_address','__vlan','__config','__state','__interface',)

  _yang_name = 'entry'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__mac_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__vlan = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_fdb_mac_table_entries_entry_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_fdb_mac_table_entries_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__interface = YANGDynClass(base=yc_interface_openconfig_network_instance__network_instances_network_instance_fdb_mac_table_entries_entry_interface, is_container='container', yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'mac-table', 'entries', 'entry']

  def _get_mac_address(self):
    """
    Getter method for mac_address, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/mac_address (leafref)

    YANG Description: Reference to mac-address list key
    """
    return self.__mac_address
      
  def _set_mac_address(self, v, load=False):
    """
    Setter method for mac_address, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/mac_address (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_address() directly.

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

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

  def _unset_mac_address(self):
    self.__mac_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_vlan(self):
    """
    Getter method for vlan, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/vlan (leafref)

    YANG Description: Reference to vlan list key
    """
    return self.__vlan
      
  def _set_vlan(self, v, load=False):
    """
    Setter method for vlan, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/vlan (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_vlan is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_vlan() directly.

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

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

  def _unset_vlan(self):
    self.__vlan = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/config (container)

    YANG Description: Configuration data for MAC table entries
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/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 MAC table entries
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_fdb_mac_table_entries_entry_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_mac_table_entries_entry_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_mac_table_entries_entry_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/state (container)

    YANG Description: Operational state data for MAC table entries
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/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 MAC table entries
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_fdb_mac_table_entries_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_mac_table_entries_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_mac_table_entries_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/interface (container)

    YANG Description: Reference to the base and/or subinterface for the
MAC table entry
    """
    return self.__interface
      
  def _set_interface(self, v, load=False):
    """
    Setter method for interface, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/interface (container)
    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 the base and/or subinterface for the
MAC table entry
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interface_openconfig_network_instance__network_instances_network_instance_fdb_mac_table_entries_entry_interface, is_container='container', yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_interface_openconfig_network_instance__network_instances_network_instance_fdb_mac_table_entries_entry_interface, is_container='container', yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

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

  def _unset_interface(self):
    self.__interface = YANGDynClass(base=yc_interface_openconfig_network_instance__network_instances_network_instance_fdb_mac_table_entries_entry_interface, is_container='container', yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  mac_address = __builtin__.property(_get_mac_address, _set_mac_address)
  vlan = __builtin__.property(_get_vlan, _set_vlan)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  interface = __builtin__.property(_get_interface, _set_interface)


  _pyangbind_elements = OrderedDict([('mac_address', mac_address), ('vlan', vlan), ('config', config), ('state', state), ('interface', interface), ])


class yc_entries_openconfig_network_instance__network_instances_network_instance_fdb_mac_table_entries(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/fdb/mac-table/entries. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for list of MAC table entries
  """
  __slots__ = ('_path_helper', '_extmethods', '__entry',)

  _yang_name = 'entries'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__entry = YANGDynClass(base=YANGListType("mac_address vlan",yc_entry_openconfig_network_instance__network_instances_network_instance_fdb_mac_table_entries_entry, yang_name="entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mac-address vlan', extensions=None), is_container='list', yang_name="entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'mac-table', 'entries']

  def _get_entry(self):
    """
    Getter method for entry, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry (list)

    YANG Description: List of learned MAC addresses
    """
    return self.__entry
      
  def _set_entry(self, v, load=False):
    """
    Setter method for entry, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_entry is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_entry() directly.

    YANG Description: List of learned MAC addresses
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("mac_address vlan",yc_entry_openconfig_network_instance__network_instances_network_instance_fdb_mac_table_entries_entry, yang_name="entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mac-address vlan', extensions=None), is_container='list', yang_name="entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """entry must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("mac_address vlan",yc_entry_openconfig_network_instance__network_instances_network_instance_fdb_mac_table_entries_entry, yang_name="entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mac-address vlan', extensions=None), is_container='list', yang_name="entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

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

  def _unset_entry(self):
    self.__entry = YANGDynClass(base=YANGListType("mac_address vlan",yc_entry_openconfig_network_instance__network_instances_network_instance_fdb_mac_table_entries_entry, yang_name="entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mac-address vlan', extensions=None), is_container='list', yang_name="entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  entry = __builtin__.property(_get_entry, _set_entry)


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


class yc_mac_table_openconfig_network_instance__network_instances_network_instance_fdb_mac_table(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/fdb/mac-table. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Table of learned or statically configured MAC addresses and
corresponding VLANs in the bridge domain
  """
  __slots__ = ('_path_helper', '_extmethods', '__entries',)

  _yang_name = 'mac-table'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__entries = YANGDynClass(base=yc_entries_openconfig_network_instance__network_instances_network_instance_fdb_mac_table_entries, is_container='container', yang_name="entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'mac-table']

  def _get_entries(self):
    """
    Getter method for entries, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries (container)

    YANG Description: Enclosing container for list of MAC table entries
    """
    return self.__entries
      
  def _set_entries(self, v, load=False):
    """
    Setter method for entries, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_entries is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_entries() directly.

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

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

  def _unset_entries(self):
    self.__entries = YANGDynClass(base=yc_entries_openconfig_network_instance__network_instances_network_instance_fdb_mac_table_entries, is_container='container', yang_name="entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  entries = __builtin__.property(_get_entries, _set_entries)


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


class yc_config_openconfig_network_instance__network_instances_network_instance_fdb_mac_mobility_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/fdb/mac-mobility/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data related to mac mobility.
  """
  __slots__ = ('_path_helper', '_extmethods', '__mac_mobility','__mac_mobility_window','__mac_mobility_threshold','__ip_mobility_threshold','__duplicate_ip_detection_interval',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__mac_mobility = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="mac-mobility", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__mac_mobility_window = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..600']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(180), is_leaf=True, yang_name="mac-mobility-window", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__mac_mobility_threshold = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..50']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(5), is_leaf=True, yang_name="mac-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    self.__ip_mobility_threshold = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__duplicate_ip_detection_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

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

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'fdb', 'mac-mobility', 'config']

  def _get_mac_mobility(self):
    """
    Getter method for mac_mobility, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/config/mac_mobility (boolean)

    YANG Description: Enable (TRUE) or disable (FALSE). It is possible for a given host
or end-station (as defined by its MAC address) to move from one
Ethernet segment to another; this is referred to as 'MAC Mobility'
or 'MAC move. The configuration attributes includes: mac-mobility-window
and mac-mobility-threshold
    """
    return self.__mac_mobility
      
  def _set_mac_mobility(self, v, load=False):
    """
    Setter method for mac_mobility, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/config/mac_mobility (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_mobility is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_mobility() directly.

    YANG Description: Enable (TRUE) or disable (FALSE). It is possible for a given host
or end-station (as defined by its MAC address) to move from one
Ethernet segment to another; this is referred to as 'MAC Mobility'
or 'MAC move. The configuration attributes includes: mac-mobility-window
and mac-mobility-threshold
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="mac-mobility", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_mobility must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="mac-mobility", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

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

  def _unset_mac_mobility(self):
    self.__mac_mobility = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="mac-mobility", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_mac_mobility_window(self):
    """
    Getter method for mac_mobility_window, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/config/mac_mobility_window (uint16)

    YANG Description: The time interval used in detecting a duplicate MAC address.
The value can be from 5 through 600 seconds.
The default is 180 seconds
    """
    return self.__mac_mobility_window
      
  def _set_mac_mobility_window(self, v, load=False):
    """
    Setter method for mac_mobility_window, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/config/mac_mobility_window (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_mobility_window is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_mobility_window() directly.

    YANG Description: The time interval used in detecting a duplicate MAC address.
The value can be from 5 through 600 seconds.
The default is 180 seconds
    """
    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': ['0..600']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(180), is_leaf=True, yang_name="mac-mobility-window", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_mobility_window must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..600']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(180), is_leaf=True, yang_name="mac-mobility-window", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

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

  def _unset_mac_mobility_window(self):
    self.__mac_mobility_window = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..600']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(180), is_leaf=True, yang_name="mac-mobility-window", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_mac_mobility_threshold(self):
    """
    Getter method for mac_mobility_threshold, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/config/mac_mobility_threshold (uint8)

    YANG Description: The number of MAC mobility events that are detected for a
given MAC address within the detection-window before it is identified
as a duplicate MAC address. Once the detection threshold is reached,
updates for the MAC address are suppressed.
    """
    return self.__mac_mobility_threshold
      
  def _set_mac_mobility_threshold(self, v, load=False):
    """
    Setter method for mac_mobility_threshold, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/config/mac_mobility_threshold (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_mobility_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_mobility_threshold() directly.

    YANG Description: The number of MAC mobility events that are detected for a
given MAC address within the detection-window before it is identified
as a duplicate MAC address. Once the detection threshold is reached,
updates for the MAC address are suppressed.
    """
    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..50']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(5), is_leaf=True, yang_name="mac-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_mobility_threshold 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..50']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(5), is_leaf=True, yang_name="mac-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
        })

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

  def _unset_mac_mobility_threshold(self):
    self.__mac_mobility_threshold = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..50']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(5), is_leaf=True, yang_name="mac-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)


  def _get_ip_mobility_threshold(self):
    """
    Getter method for ip_mobility_threshold, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/config/ip_mobility_threshold (uint16)

    YANG Description: Enable (TRUE) or disable (FALSE). It is possible for a given host
or end-station (as defined by its IP address) to move from one
Ethernet segment to another. The number of IP mobility events that
are detected for a given IP address within the detection-threshold
before it is identified as a duplicate IP address.
Once the detection threshold is reached, updates for the IP address
are suppressed.
    """
    return self.__ip_mobility_threshold
      
  def _set_ip_mobility_threshold(self, v, load=False):
    """
    Setter method for ip_mobility_threshold, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/config/ip_mobility_threshold (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ip_mobility_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ip_mobility_threshold() directly.

    YANG Description: Enable (TRUE) or disable (FALSE). It is possible for a given host
or end-station (as defined by its IP address) to move from one
Ethernet segment to another. The number of IP mobility events that
are detected for a given IP address within the detection-threshold
before it is identified as a duplicate IP address.
Once the detection threshold is reached, updates for the IP address
are suppressed.
    """
    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="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ip_mobility_threshold 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="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

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

  def _unset_ip_mobility_threshold(self):
    self.__ip_mobility_threshold = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_duplicate_ip_detection_interval(self):
    """
    Getter method for duplicate_ip_detection_interval, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/config/duplicate_ip_detection_interval (uint16)

    YANG Description: The time interval used in detecting a duplicate IP address.
Duplicate ip detection number of host moves
allowed within interval period
    """
    return self.__duplicate_ip_detection_interval
      
  def _set_duplicate_ip_detection_interval(self, v, load=False):
    """
    Setter method for duplicate_ip_detection_interval, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/config/duplicate_ip_detection_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_duplicate_ip_detection_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_duplicate_ip_detection_interval() directly.

    YANG Description: The time interval used in detecting a duplicate IP address.
Duplicate ip detection number of host moves
allowed within interval period
    """
    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="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """duplicate_ip_detection_interval 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="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

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

  def _unset_duplicate_ip_detection_interval(self):
    self.__duplicate_ip_detection_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

  mac_mobility = __builtin__.property(_get_mac_mobility, _set_mac_mobility)
  mac_mobility_window = __builtin__.property(_get_mac_mobility_window, _set_mac_mobility_window)
  mac_mobility_threshold = __builtin__.property(_get_mac_mobility_threshold, _set_mac_mobility_threshold)
  ip_mobility_threshold = __builtin__.property(_get_ip_mobility_threshold, _set_ip_mobility_threshold)
  duplicate_ip_detection_interval = __builtin__.property(_get_duplicate_ip_detection_interval, _set_duplicate_ip_detection_interval)


  _pyangbind_elements = OrderedDict([('mac_mobility', mac_mobility), ('mac_mobility_window', mac_mobility_window), ('mac_mobility_threshold', mac_mobility_threshold), ('ip_mobility_threshold', ip_mobility_threshold), ('duplicate_ip_detection_interval', duplicate_ip_detection_interval), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_fdb_mac_mobility_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/fdb/mac-mobility/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State data related to mac mobility.
  """
  __slots__ = ('_path_helper', '_extmethods', '__mac_mobility','__mac_mobility_window','__mac_mobility_threshold','__ip_mobility_threshold','__duplicate_ip_detection_interval',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__mac_mobility = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="mac-mobility", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__mac_mobility_window = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..600']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(180), is_leaf=True, yang_name="mac-mobility-window", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__mac_mobility_threshold = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..50']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(5), is_leaf=True, yang_name="mac-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__ip_mobility_threshold = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__duplicate_ip_detection_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'fdb', 'mac-mobility', 'state']

  def _get_mac_mobility(self):
    """
    Getter method for mac_mobility, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/state/mac_mobility (boolean)

    YANG Description: Enable (TRUE) or disable (FALSE). It is possible for a given host
or end-station (as defined by its MAC address) to move from one
Ethernet segment to another; this is referred to as 'MAC Mobility'
or 'MAC move. The configuration attributes includes: mac-mobility-window
and mac-mobility-threshold
    """
    return self.__mac_mobility
      
  def _set_mac_mobility(self, v, load=False):
    """
    Setter method for mac_mobility, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/state/mac_mobility (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_mobility is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_mobility() directly.

    YANG Description: Enable (TRUE) or disable (FALSE). It is possible for a given host
or end-station (as defined by its MAC address) to move from one
Ethernet segment to another; this is referred to as 'MAC Mobility'
or 'MAC move. The configuration attributes includes: mac-mobility-window
and mac-mobility-threshold
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="mac-mobility", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_mobility must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="mac-mobility", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

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

  def _unset_mac_mobility(self):
    self.__mac_mobility = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="mac-mobility", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_mac_mobility_window(self):
    """
    Getter method for mac_mobility_window, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/state/mac_mobility_window (uint16)

    YANG Description: The time interval used in detecting a duplicate MAC address.
The value can be from 5 through 600 seconds.
The default is 180 seconds
    """
    return self.__mac_mobility_window
      
  def _set_mac_mobility_window(self, v, load=False):
    """
    Setter method for mac_mobility_window, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/state/mac_mobility_window (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_mobility_window is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_mobility_window() directly.

    YANG Description: The time interval used in detecting a duplicate MAC address.
The value can be from 5 through 600 seconds.
The default is 180 seconds
    """
    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': ['0..600']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(180), is_leaf=True, yang_name="mac-mobility-window", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_mobility_window must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..600']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(180), is_leaf=True, yang_name="mac-mobility-window", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

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

  def _unset_mac_mobility_window(self):
    self.__mac_mobility_window = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..600']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(180), is_leaf=True, yang_name="mac-mobility-window", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_mac_mobility_threshold(self):
    """
    Getter method for mac_mobility_threshold, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/state/mac_mobility_threshold (uint8)

    YANG Description: The number of MAC mobility events that are detected for a
given MAC address within the detection-window before it is identified
as a duplicate MAC address. Once the detection threshold is reached,
updates for the MAC address are suppressed.
    """
    return self.__mac_mobility_threshold
      
  def _set_mac_mobility_threshold(self, v, load=False):
    """
    Setter method for mac_mobility_threshold, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/state/mac_mobility_threshold (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_mobility_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_mobility_threshold() directly.

    YANG Description: The number of MAC mobility events that are detected for a
given MAC address within the detection-window before it is identified
as a duplicate MAC address. Once the detection threshold is reached,
updates for the MAC address are suppressed.
    """
    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..50']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(5), is_leaf=True, yang_name="mac-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_mobility_threshold 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..50']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(5), is_leaf=True, yang_name="mac-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

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

  def _unset_mac_mobility_threshold(self):
    self.__mac_mobility_threshold = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..50']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(5), is_leaf=True, yang_name="mac-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_ip_mobility_threshold(self):
    """
    Getter method for ip_mobility_threshold, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/state/ip_mobility_threshold (uint16)

    YANG Description: Enable (TRUE) or disable (FALSE). It is possible for a given host
or end-station (as defined by its IP address) to move from one
Ethernet segment to another. The number of IP mobility events that
are detected for a given IP address within the detection-threshold
before it is identified as a duplicate IP address.
Once the detection threshold is reached, updates for the IP address
are suppressed.
    """
    return self.__ip_mobility_threshold
      
  def _set_ip_mobility_threshold(self, v, load=False):
    """
    Setter method for ip_mobility_threshold, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/state/ip_mobility_threshold (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ip_mobility_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ip_mobility_threshold() directly.

    YANG Description: Enable (TRUE) or disable (FALSE). It is possible for a given host
or end-station (as defined by its IP address) to move from one
Ethernet segment to another. The number of IP mobility events that
are detected for a given IP address within the detection-threshold
before it is identified as a duplicate IP address.
Once the detection threshold is reached, updates for the IP address
are suppressed.
    """
    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="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ip_mobility_threshold 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="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

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

  def _unset_ip_mobility_threshold(self):
    self.__ip_mobility_threshold = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_duplicate_ip_detection_interval(self):
    """
    Getter method for duplicate_ip_detection_interval, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/state/duplicate_ip_detection_interval (uint16)

    YANG Description: The time interval used in detecting a duplicate IP address.
Duplicate ip detection number of host moves
allowed within interval period
    """
    return self.__duplicate_ip_detection_interval
      
  def _set_duplicate_ip_detection_interval(self, v, load=False):
    """
    Setter method for duplicate_ip_detection_interval, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/state/duplicate_ip_detection_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_duplicate_ip_detection_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_duplicate_ip_detection_interval() directly.

    YANG Description: The time interval used in detecting a duplicate IP address.
Duplicate ip detection number of host moves
allowed within interval period
    """
    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="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """duplicate_ip_detection_interval 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="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

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

  def _unset_duplicate_ip_detection_interval(self):
    self.__duplicate_ip_detection_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  mac_mobility = __builtin__.property(_get_mac_mobility)
  mac_mobility_window = __builtin__.property(_get_mac_mobility_window)
  mac_mobility_threshold = __builtin__.property(_get_mac_mobility_threshold)
  ip_mobility_threshold = __builtin__.property(_get_ip_mobility_threshold)
  duplicate_ip_detection_interval = __builtin__.property(_get_duplicate_ip_detection_interval)


  _pyangbind_elements = OrderedDict([('mac_mobility', mac_mobility), ('mac_mobility_window', mac_mobility_window), ('mac_mobility_threshold', mac_mobility_threshold), ('ip_mobility_threshold', ip_mobility_threshold), ('duplicate_ip_detection_interval', duplicate_ip_detection_interval), ])


class yc_mac_mobility_openconfig_network_instance__network_instances_network_instance_fdb_mac_mobility(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/fdb/mac-mobility. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top grouping the configuration and state data related to mac
mobility.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'mac-mobility'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_fdb_mac_mobility_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_fdb_mac_mobility_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'mac-mobility']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/config (container)

    YANG Description: Configuration data related to mac mobility.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/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 related to mac mobility.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_fdb_mac_mobility_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_mac_mobility_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_mac_mobility_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/state (container)

    YANG Description: State data related to mac mobility.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/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 related to mac mobility.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_fdb_mac_mobility_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_mac_mobility_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_mac_mobility_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_arp_proxy_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/fdb/arp-proxy/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data related to ARP-Proxy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enable','__arp_suppression','__ip_mobility_threshold','__duplicate_ip_detection_interval',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__arp_suppression = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="arp-suppression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__ip_mobility_threshold = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__duplicate_ip_detection_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

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

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'fdb', 'arp-proxy', 'config']

  def _get_enable(self):
    """
    Getter method for enable, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy/config/enable (boolean)

    YANG Description: Enable (TRUE) or disable (FALSE) ARP proxy. If true
a proxy server on the network answers the
Address Resolution Protocol (ARP) queries for an
IP address that is not on that network.
    """
    return self.__enable
      
  def _set_enable(self, v, load=False):
    """
    Setter method for enable, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy/config/enable (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable() directly.

    YANG Description: Enable (TRUE) or disable (FALSE) ARP proxy. If true
a proxy server on the network answers the
Address Resolution Protocol (ARP) queries for an
IP address that is not on that network.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable 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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

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

  def _unset_enable(self):
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_arp_suppression(self):
    """
    Getter method for arp_suppression, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy/config/arp_suppression (boolean)

    YANG Description: Enable (TRUE) or disable (FALSE) ARP suppression. If true
the  Address Resolution Protocol (ARP) queries for an
IP address that is not on that network are suppressed.
Address Resolution Protocol (ARP) suppression is a
technique used to reduce the amount of ARP broadcast
flooding within individual VXLAN segments, that is between
VMs connected to the same logical switch.
    """
    return self.__arp_suppression
      
  def _set_arp_suppression(self, v, load=False):
    """
    Setter method for arp_suppression, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy/config/arp_suppression (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_arp_suppression is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_arp_suppression() directly.

    YANG Description: Enable (TRUE) or disable (FALSE) ARP suppression. If true
the  Address Resolution Protocol (ARP) queries for an
IP address that is not on that network are suppressed.
Address Resolution Protocol (ARP) suppression is a
technique used to reduce the amount of ARP broadcast
flooding within individual VXLAN segments, that is between
VMs connected to the same logical switch.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="arp-suppression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """arp_suppression must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="arp-suppression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

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

  def _unset_arp_suppression(self):
    self.__arp_suppression = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="arp-suppression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_ip_mobility_threshold(self):
    """
    Getter method for ip_mobility_threshold, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy/config/ip_mobility_threshold (uint16)

    YANG Description: Enable (TRUE) or disable (FALSE). It is possible for a given host
or end-station (as defined by its IP address) to move from one
Ethernet segment to another. The number of IP mobility events that
are detected for a given IP address within the detection-threshold
before it is identified as a duplicate IP address.
Once the detection threshold is reached, updates for the IP address
are suppressed.
    """
    return self.__ip_mobility_threshold
      
  def _set_ip_mobility_threshold(self, v, load=False):
    """
    Setter method for ip_mobility_threshold, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy/config/ip_mobility_threshold (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ip_mobility_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ip_mobility_threshold() directly.

    YANG Description: Enable (TRUE) or disable (FALSE). It is possible for a given host
or end-station (as defined by its IP address) to move from one
Ethernet segment to another. The number of IP mobility events that
are detected for a given IP address within the detection-threshold
before it is identified as a duplicate IP address.
Once the detection threshold is reached, updates for the IP address
are suppressed.
    """
    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="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ip_mobility_threshold 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="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

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

  def _unset_ip_mobility_threshold(self):
    self.__ip_mobility_threshold = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_duplicate_ip_detection_interval(self):
    """
    Getter method for duplicate_ip_detection_interval, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy/config/duplicate_ip_detection_interval (uint16)

    YANG Description: The time interval used in detecting a duplicate IP address.
Duplicate ip detection number of host moves
allowed within interval period
    """
    return self.__duplicate_ip_detection_interval
      
  def _set_duplicate_ip_detection_interval(self, v, load=False):
    """
    Setter method for duplicate_ip_detection_interval, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy/config/duplicate_ip_detection_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_duplicate_ip_detection_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_duplicate_ip_detection_interval() directly.

    YANG Description: The time interval used in detecting a duplicate IP address.
Duplicate ip detection number of host moves
allowed within interval period
    """
    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="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """duplicate_ip_detection_interval 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="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

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

  def _unset_duplicate_ip_detection_interval(self):
    self.__duplicate_ip_detection_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

  enable = __builtin__.property(_get_enable, _set_enable)
  arp_suppression = __builtin__.property(_get_arp_suppression, _set_arp_suppression)
  ip_mobility_threshold = __builtin__.property(_get_ip_mobility_threshold, _set_ip_mobility_threshold)
  duplicate_ip_detection_interval = __builtin__.property(_get_duplicate_ip_detection_interval, _set_duplicate_ip_detection_interval)


  _pyangbind_elements = OrderedDict([('enable', enable), ('arp_suppression', arp_suppression), ('ip_mobility_threshold', ip_mobility_threshold), ('duplicate_ip_detection_interval', duplicate_ip_detection_interval), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_fdb_arp_proxy_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/fdb/arp-proxy/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State data related to ARP-Proxy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enable','__arp_suppression','__ip_mobility_threshold','__duplicate_ip_detection_interval',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__arp_suppression = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="arp-suppression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__ip_mobility_threshold = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__duplicate_ip_detection_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'fdb', 'arp-proxy', 'state']

  def _get_enable(self):
    """
    Getter method for enable, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy/state/enable (boolean)

    YANG Description: Enable (TRUE) or disable (FALSE) ARP proxy. If true
a proxy server on the network answers the
Address Resolution Protocol (ARP) queries for an
IP address that is not on that network.
    """
    return self.__enable
      
  def _set_enable(self, v, load=False):
    """
    Setter method for enable, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy/state/enable (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable() directly.

    YANG Description: Enable (TRUE) or disable (FALSE) ARP proxy. If true
a proxy server on the network answers the
Address Resolution Protocol (ARP) queries for an
IP address that is not on that network.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable 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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

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

  def _unset_enable(self):
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_arp_suppression(self):
    """
    Getter method for arp_suppression, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy/state/arp_suppression (boolean)

    YANG Description: Enable (TRUE) or disable (FALSE) ARP suppression. If true
the  Address Resolution Protocol (ARP) queries for an
IP address that is not on that network are suppressed.
Address Resolution Protocol (ARP) suppression is a
technique used to reduce the amount of ARP broadcast
flooding within individual VXLAN segments, that is between
VMs connected to the same logical switch.
    """
    return self.__arp_suppression
      
  def _set_arp_suppression(self, v, load=False):
    """
    Setter method for arp_suppression, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy/state/arp_suppression (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_arp_suppression is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_arp_suppression() directly.

    YANG Description: Enable (TRUE) or disable (FALSE) ARP suppression. If true
the  Address Resolution Protocol (ARP) queries for an
IP address that is not on that network are suppressed.
Address Resolution Protocol (ARP) suppression is a
technique used to reduce the amount of ARP broadcast
flooding within individual VXLAN segments, that is between
VMs connected to the same logical switch.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="arp-suppression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """arp_suppression must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="arp-suppression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

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

  def _unset_arp_suppression(self):
    self.__arp_suppression = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="arp-suppression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_ip_mobility_threshold(self):
    """
    Getter method for ip_mobility_threshold, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy/state/ip_mobility_threshold (uint16)

    YANG Description: Enable (TRUE) or disable (FALSE). It is possible for a given host
or end-station (as defined by its IP address) to move from one
Ethernet segment to another. The number of IP mobility events that
are detected for a given IP address within the detection-threshold
before it is identified as a duplicate IP address.
Once the detection threshold is reached, updates for the IP address
are suppressed.
    """
    return self.__ip_mobility_threshold
      
  def _set_ip_mobility_threshold(self, v, load=False):
    """
    Setter method for ip_mobility_threshold, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy/state/ip_mobility_threshold (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ip_mobility_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ip_mobility_threshold() directly.

    YANG Description: Enable (TRUE) or disable (FALSE). It is possible for a given host
or end-station (as defined by its IP address) to move from one
Ethernet segment to another. The number of IP mobility events that
are detected for a given IP address within the detection-threshold
before it is identified as a duplicate IP address.
Once the detection threshold is reached, updates for the IP address
are suppressed.
    """
    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="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ip_mobility_threshold 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="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

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

  def _unset_ip_mobility_threshold(self):
    self.__ip_mobility_threshold = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_duplicate_ip_detection_interval(self):
    """
    Getter method for duplicate_ip_detection_interval, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy/state/duplicate_ip_detection_interval (uint16)

    YANG Description: The time interval used in detecting a duplicate IP address.
Duplicate ip detection number of host moves
allowed within interval period
    """
    return self.__duplicate_ip_detection_interval
      
  def _set_duplicate_ip_detection_interval(self, v, load=False):
    """
    Setter method for duplicate_ip_detection_interval, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy/state/duplicate_ip_detection_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_duplicate_ip_detection_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_duplicate_ip_detection_interval() directly.

    YANG Description: The time interval used in detecting a duplicate IP address.
Duplicate ip detection number of host moves
allowed within interval period
    """
    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="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """duplicate_ip_detection_interval 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="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

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

  def _unset_duplicate_ip_detection_interval(self):
    self.__duplicate_ip_detection_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  enable = __builtin__.property(_get_enable)
  arp_suppression = __builtin__.property(_get_arp_suppression)
  ip_mobility_threshold = __builtin__.property(_get_ip_mobility_threshold)
  duplicate_ip_detection_interval = __builtin__.property(_get_duplicate_ip_detection_interval)


  _pyangbind_elements = OrderedDict([('enable', enable), ('arp_suppression', arp_suppression), ('ip_mobility_threshold', ip_mobility_threshold), ('duplicate_ip_detection_interval', duplicate_ip_detection_interval), ])


class yc_arp_proxy_openconfig_network_instance__network_instances_network_instance_fdb_arp_proxy(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/fdb/arp-proxy. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top Container related to ARP-Proxy
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'arp-proxy'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_fdb_arp_proxy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_fdb_arp_proxy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'arp-proxy']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy/config (container)

    YANG Description: Configuration data related to ARP-Proxy.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy/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 related to ARP-Proxy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_fdb_arp_proxy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_arp_proxy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_arp_proxy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy/state (container)

    YANG Description: State data related to ARP-Proxy.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy/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 related to ARP-Proxy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_fdb_arp_proxy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_arp_proxy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_arp_proxy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_nd_proxy_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/fdb/nd-proxy/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data related to ND-Proxy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enable','__nd_suppression','__ip_mobility_threshold','__duplicate_ip_detection_interval',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__nd_suppression = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="nd-suppression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__ip_mobility_threshold = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__duplicate_ip_detection_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

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

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'fdb', 'nd-proxy', 'config']

  def _get_enable(self):
    """
    Getter method for enable, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy/config/enable (boolean)

    YANG Description: Enable (TRUE) or disable (FALSE) Neighbor Discovery (ND)
proxy. If true a proxy server on the network answers the
NDP packets for an IP address that is not on that network.
    """
    return self.__enable
      
  def _set_enable(self, v, load=False):
    """
    Setter method for enable, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy/config/enable (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable() directly.

    YANG Description: Enable (TRUE) or disable (FALSE) Neighbor Discovery (ND)
proxy. If true a proxy server on the network answers the
NDP packets for an IP address that is not on that network.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable 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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

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

  def _unset_enable(self):
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_nd_suppression(self):
    """
    Getter method for nd_suppression, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy/config/nd_suppression (boolean)

    YANG Description: Enable (TRUE) or disable (FALSE) Neighbor Discovery suppression.
If true the NDP queries for an IP address that is not on that
network are suppressed. NDP suppression is a
technique used to reduce the amount of NDP Packets
flooding within individual VXLAN segments, that is between
VMs connected to the same logical switch.
    """
    return self.__nd_suppression
      
  def _set_nd_suppression(self, v, load=False):
    """
    Setter method for nd_suppression, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy/config/nd_suppression (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_nd_suppression is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_nd_suppression() directly.

    YANG Description: Enable (TRUE) or disable (FALSE) Neighbor Discovery suppression.
If true the NDP queries for an IP address that is not on that
network are suppressed. NDP suppression is a
technique used to reduce the amount of NDP Packets
flooding within individual VXLAN segments, that is between
VMs connected to the same logical switch.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="nd-suppression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """nd_suppression must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="nd-suppression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

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

  def _unset_nd_suppression(self):
    self.__nd_suppression = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="nd-suppression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_ip_mobility_threshold(self):
    """
    Getter method for ip_mobility_threshold, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy/config/ip_mobility_threshold (uint16)

    YANG Description: Enable (TRUE) or disable (FALSE). It is possible for a given host
or end-station (as defined by its IP address) to move from one
Ethernet segment to another. The number of IP mobility events that
are detected for a given IP address within the detection-threshold
before it is identified as a duplicate IP address.
Once the detection threshold is reached, updates for the IP address
are suppressed.
    """
    return self.__ip_mobility_threshold
      
  def _set_ip_mobility_threshold(self, v, load=False):
    """
    Setter method for ip_mobility_threshold, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy/config/ip_mobility_threshold (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ip_mobility_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ip_mobility_threshold() directly.

    YANG Description: Enable (TRUE) or disable (FALSE). It is possible for a given host
or end-station (as defined by its IP address) to move from one
Ethernet segment to another. The number of IP mobility events that
are detected for a given IP address within the detection-threshold
before it is identified as a duplicate IP address.
Once the detection threshold is reached, updates for the IP address
are suppressed.
    """
    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="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ip_mobility_threshold 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="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

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

  def _unset_ip_mobility_threshold(self):
    self.__ip_mobility_threshold = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_duplicate_ip_detection_interval(self):
    """
    Getter method for duplicate_ip_detection_interval, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy/config/duplicate_ip_detection_interval (uint16)

    YANG Description: The time interval used in detecting a duplicate IP address.
Duplicate ip detection number of host moves
allowed within interval period
    """
    return self.__duplicate_ip_detection_interval
      
  def _set_duplicate_ip_detection_interval(self, v, load=False):
    """
    Setter method for duplicate_ip_detection_interval, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy/config/duplicate_ip_detection_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_duplicate_ip_detection_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_duplicate_ip_detection_interval() directly.

    YANG Description: The time interval used in detecting a duplicate IP address.
Duplicate ip detection number of host moves
allowed within interval period
    """
    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="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """duplicate_ip_detection_interval 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="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

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

  def _unset_duplicate_ip_detection_interval(self):
    self.__duplicate_ip_detection_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

  enable = __builtin__.property(_get_enable, _set_enable)
  nd_suppression = __builtin__.property(_get_nd_suppression, _set_nd_suppression)
  ip_mobility_threshold = __builtin__.property(_get_ip_mobility_threshold, _set_ip_mobility_threshold)
  duplicate_ip_detection_interval = __builtin__.property(_get_duplicate_ip_detection_interval, _set_duplicate_ip_detection_interval)


  _pyangbind_elements = OrderedDict([('enable', enable), ('nd_suppression', nd_suppression), ('ip_mobility_threshold', ip_mobility_threshold), ('duplicate_ip_detection_interval', duplicate_ip_detection_interval), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_fdb_nd_proxy_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/fdb/nd-proxy/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State data related to ND-Proxy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enable','__nd_suppression','__ip_mobility_threshold','__duplicate_ip_detection_interval',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__nd_suppression = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="nd-suppression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__ip_mobility_threshold = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__duplicate_ip_detection_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'fdb', 'nd-proxy', 'state']

  def _get_enable(self):
    """
    Getter method for enable, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy/state/enable (boolean)

    YANG Description: Enable (TRUE) or disable (FALSE) Neighbor Discovery (ND)
proxy. If true a proxy server on the network answers the
NDP packets for an IP address that is not on that network.
    """
    return self.__enable
      
  def _set_enable(self, v, load=False):
    """
    Setter method for enable, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy/state/enable (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable() directly.

    YANG Description: Enable (TRUE) or disable (FALSE) Neighbor Discovery (ND)
proxy. If true a proxy server on the network answers the
NDP packets for an IP address that is not on that network.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable 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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

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

  def _unset_enable(self):
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_nd_suppression(self):
    """
    Getter method for nd_suppression, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy/state/nd_suppression (boolean)

    YANG Description: Enable (TRUE) or disable (FALSE) Neighbor Discovery suppression.
If true the NDP queries for an IP address that is not on that
network are suppressed. NDP suppression is a
technique used to reduce the amount of NDP Packets
flooding within individual VXLAN segments, that is between
VMs connected to the same logical switch.
    """
    return self.__nd_suppression
      
  def _set_nd_suppression(self, v, load=False):
    """
    Setter method for nd_suppression, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy/state/nd_suppression (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_nd_suppression is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_nd_suppression() directly.

    YANG Description: Enable (TRUE) or disable (FALSE) Neighbor Discovery suppression.
If true the NDP queries for an IP address that is not on that
network are suppressed. NDP suppression is a
technique used to reduce the amount of NDP Packets
flooding within individual VXLAN segments, that is between
VMs connected to the same logical switch.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="nd-suppression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """nd_suppression must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="nd-suppression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

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

  def _unset_nd_suppression(self):
    self.__nd_suppression = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="nd-suppression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_ip_mobility_threshold(self):
    """
    Getter method for ip_mobility_threshold, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy/state/ip_mobility_threshold (uint16)

    YANG Description: Enable (TRUE) or disable (FALSE). It is possible for a given host
or end-station (as defined by its IP address) to move from one
Ethernet segment to another. The number of IP mobility events that
are detected for a given IP address within the detection-threshold
before it is identified as a duplicate IP address.
Once the detection threshold is reached, updates for the IP address
are suppressed.
    """
    return self.__ip_mobility_threshold
      
  def _set_ip_mobility_threshold(self, v, load=False):
    """
    Setter method for ip_mobility_threshold, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy/state/ip_mobility_threshold (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ip_mobility_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ip_mobility_threshold() directly.

    YANG Description: Enable (TRUE) or disable (FALSE). It is possible for a given host
or end-station (as defined by its IP address) to move from one
Ethernet segment to another. The number of IP mobility events that
are detected for a given IP address within the detection-threshold
before it is identified as a duplicate IP address.
Once the detection threshold is reached, updates for the IP address
are suppressed.
    """
    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="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ip_mobility_threshold 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="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

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

  def _unset_ip_mobility_threshold(self):
    self.__ip_mobility_threshold = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_duplicate_ip_detection_interval(self):
    """
    Getter method for duplicate_ip_detection_interval, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy/state/duplicate_ip_detection_interval (uint16)

    YANG Description: The time interval used in detecting a duplicate IP address.
Duplicate ip detection number of host moves
allowed within interval period
    """
    return self.__duplicate_ip_detection_interval
      
  def _set_duplicate_ip_detection_interval(self, v, load=False):
    """
    Setter method for duplicate_ip_detection_interval, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy/state/duplicate_ip_detection_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_duplicate_ip_detection_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_duplicate_ip_detection_interval() directly.

    YANG Description: The time interval used in detecting a duplicate IP address.
Duplicate ip detection number of host moves
allowed within interval period
    """
    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="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """duplicate_ip_detection_interval 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="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

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

  def _unset_duplicate_ip_detection_interval(self):
    self.__duplicate_ip_detection_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  enable = __builtin__.property(_get_enable)
  nd_suppression = __builtin__.property(_get_nd_suppression)
  ip_mobility_threshold = __builtin__.property(_get_ip_mobility_threshold)
  duplicate_ip_detection_interval = __builtin__.property(_get_duplicate_ip_detection_interval)


  _pyangbind_elements = OrderedDict([('enable', enable), ('nd_suppression', nd_suppression), ('ip_mobility_threshold', ip_mobility_threshold), ('duplicate_ip_detection_interval', duplicate_ip_detection_interval), ])


class yc_nd_proxy_openconfig_network_instance__network_instances_network_instance_fdb_nd_proxy(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/fdb/nd-proxy. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top Container related to ND-Proxy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'nd-proxy'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_fdb_nd_proxy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_fdb_nd_proxy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'nd-proxy']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy/config (container)

    YANG Description: Configuration data related to ND-Proxy.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy/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 related to ND-Proxy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_fdb_nd_proxy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_nd_proxy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_nd_proxy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy/state (container)

    YANG Description: State data related to ND-Proxy.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy/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 related to ND-Proxy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_fdb_nd_proxy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_nd_proxy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_nd_proxy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_state_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/fdb/l2rib/mac-table/entries/entry/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for L2RIB MAC table object entry
  """
  __slots__ = ('_path_helper', '_extmethods', '__mac_address','__vlan','__evi','__l2_vni',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__mac_address = 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)
    self.__vlan = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__evi = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)
    self.__l2_vni = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="l2-vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib', 'mac-table', 'entries', 'entry', 'state']

  def _get_mac_address(self):
    """
    Getter method for mac_address, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/state/mac_address (oc-yang:mac-address)

    YANG Description: MAC address of the L2RIB MAC or MAC-IP entry
    """
    return self.__mac_address
      
  def _set_mac_address(self, v, load=False):
    """
    Setter method for mac_address, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/state/mac_address (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_address() directly.

    YANG Description: MAC address of the L2RIB MAC or MAC-IP entry
    """
    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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_address 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)""",
        })

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

  def _unset_mac_address(self):
    self.__mac_address = 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)


  def _get_vlan(self):
    """
    Getter method for vlan, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/state/vlan (leafref)

    YANG Description: VLAN on which the MAC or MAC-IP address is present.
    """
    return self.__vlan
      
  def _set_vlan(self, v, load=False):
    """
    Setter method for vlan, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/state/vlan (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_vlan is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_vlan() directly.

    YANG Description: VLAN on which the MAC or MAC-IP address is present.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """vlan must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_vlan(self):
    self.__vlan = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_evi(self):
    """
    Getter method for evi, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/state/evi (oc-evpn-types:evi-id)

    YANG Description: EVPN Instance Identifier for the MAC or MAC-IP
    """
    return self.__evi
      
  def _set_evi(self, v, load=False):
    """
    Setter method for evi, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/state/evi (oc-evpn-types:evi-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_evi is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_evi() directly.

    YANG Description: EVPN Instance Identifier for the MAC or MAC-IP
    """
    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': ['1..16777215']}), is_leaf=True, yang_name="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """evi must be of a type compatible with oc-evpn-types:evi-id""",
          'defined-type': "oc-evpn-types:evi-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)""",
        })

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

  def _unset_evi(self):
    self.__evi = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)


  def _get_l2_vni(self):
    """
    Getter method for l2_vni, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/state/l2_vni (oc-evpn-types:evi-id)

    YANG Description: Layer2 VNI segment mapped to given vlan-id
    """
    return self.__l2_vni
      
  def _set_l2_vni(self, v, load=False):
    """
    Setter method for l2_vni, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/state/l2_vni (oc-evpn-types:evi-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_l2_vni is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_l2_vni() directly.

    YANG Description: Layer2 VNI segment mapped to given vlan-id
    """
    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': ['1..16777215']}), is_leaf=True, yang_name="l2-vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """l2_vni must be of a type compatible with oc-evpn-types:evi-id""",
          'defined-type': "oc-evpn-types:evi-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="l2-vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)""",
        })

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

  def _unset_l2_vni(self):
    self.__l2_vni = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="l2-vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)

  mac_address = __builtin__.property(_get_mac_address)
  vlan = __builtin__.property(_get_vlan)
  evi = __builtin__.property(_get_evi)
  l2_vni = __builtin__.property(_get_l2_vni)


  _pyangbind_elements = OrderedDict([('mac_address', mac_address), ('vlan', vlan), ('evi', evi), ('l2_vni', l2_vni), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry_producers_producer_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/fdb/l2rib/mac-table/entries/entry/producers/producer/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State container for L2RIB MAC Table Entries
  """
  __slots__ = ('_path_helper', '_extmethods', '__producer','__seq_number','__mobility_state','__esi','__sticky','__next_hop','__derived_from_mac_ip','__directly_received',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__producer = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LOCAL': {}, 'STATIC': {}, 'BGP': {}},), is_leaf=True, yang_name="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__seq_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="seq-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__mobility_state = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'FROZEN': {}, 'DUPLICATE': {}},), is_leaf=True, yang_name="mobility-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__esi = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}), is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi', is_config=False)
    self.__sticky = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sticky", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__next_hop = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__derived_from_mac_ip = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="derived-from-mac-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__directly_received = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="directly-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib', 'mac-table', 'entries', 'entry', 'producers', 'producer', 'state']

  def _get_producer(self):
    """
    Getter method for producer, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer/state/producer (enumeration)

    YANG Description: Source of the learned L2RIB route
    """
    return self.__producer
      
  def _set_producer(self, v, load=False):
    """
    Setter method for producer, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer/state/producer (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_producer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_producer() directly.

    YANG Description: Source of the learned L2RIB route
    """
    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={'LOCAL': {}, 'STATIC': {}, 'BGP': {}},), is_leaf=True, yang_name="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """producer must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LOCAL': {}, 'STATIC': {}, 'BGP': {}},), is_leaf=True, yang_name="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

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

  def _unset_producer(self):
    self.__producer = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LOCAL': {}, 'STATIC': {}, 'BGP': {}},), is_leaf=True, yang_name="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_seq_number(self):
    """
    Getter method for seq_number, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer/state/seq_number (uint32)

    YANG Description: The sequence number is used to ensure that PEs retain the correct
MAC/IP Advertisement route when multiple updates occur for the same
MAC address
    """
    return self.__seq_number
      
  def _set_seq_number(self, v, load=False):
    """
    Setter method for seq_number, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer/state/seq_number (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_seq_number is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_seq_number() directly.

    YANG Description: The sequence number is used to ensure that PEs retain the correct
MAC/IP Advertisement route when multiple updates occur for the same
MAC address
    """
    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="seq-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """seq_number 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="seq-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

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

  def _unset_seq_number(self):
    self.__seq_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="seq-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_mobility_state(self):
    """
    Getter method for mobility_state, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer/state/mobility_state (enumeration)

    YANG Description: Indicates if learned MAC address is duplicate or frozen
    """
    return self.__mobility_state
      
  def _set_mobility_state(self, v, load=False):
    """
    Setter method for mobility_state, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer/state/mobility_state (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mobility_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mobility_state() directly.

    YANG Description: Indicates if learned MAC address is duplicate or frozen
    """
    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={'FROZEN': {}, 'DUPLICATE': {}},), is_leaf=True, yang_name="mobility-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mobility_state must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'FROZEN': {}, 'DUPLICATE': {}},), is_leaf=True, yang_name="mobility-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

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

  def _unset_mobility_state(self):
    self.__mobility_state = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'FROZEN': {}, 'DUPLICATE': {}},), is_leaf=True, yang_name="mobility-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_esi(self):
    """
    Getter method for esi, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer/state/esi (oc-evpn-types:esi)

    YANG Description: Ethernet Segment Identifier for local and remote routes
    """
    return self.__esi
      
  def _set_esi(self, v, load=False):
    """
    Setter method for esi, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer/state/esi (oc-evpn-types:esi)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_esi is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_esi() directly.

    YANG Description: Ethernet Segment Identifier for local and remote routes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}), is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """esi must be of a type compatible with oc-evpn-types:esi""",
          'defined-type': "oc-evpn-types:esi",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}), is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi', is_config=False)""",
        })

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

  def _unset_esi(self):
    self.__esi = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}), is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi', is_config=False)


  def _get_sticky(self):
    """
    Getter method for sticky, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer/state/sticky (boolean)

    YANG Description: MAC address is sticky and not subjected to MAC moves
    """
    return self.__sticky
      
  def _set_sticky(self, v, load=False):
    """
    Setter method for sticky, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer/state/sticky (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sticky is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sticky() directly.

    YANG Description: MAC address is sticky and not subjected to MAC moves
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="sticky", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sticky must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sticky", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

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

  def _unset_sticky(self):
    self.__sticky = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sticky", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_next_hop(self):
    """
    Getter method for next_hop, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer/state/next_hop (leafref)

    YANG Description: Leafref next-hop for the MAC-IP table entry
    """
    return self.__next_hop
      
  def _set_next_hop(self, v, load=False):
    """
    Setter method for next_hop, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer/state/next_hop (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hop() directly.

    YANG Description: Leafref next-hop for the MAC-IP table entry
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hop must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_next_hop(self):
    self.__next_hop = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_derived_from_mac_ip(self):
    """
    Getter method for derived_from_mac_ip, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer/state/derived_from_mac_ip (boolean)

    YANG Description: Derived from BGP MAC-IP route-type 2
    """
    return self.__derived_from_mac_ip
      
  def _set_derived_from_mac_ip(self, v, load=False):
    """
    Setter method for derived_from_mac_ip, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer/state/derived_from_mac_ip (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_derived_from_mac_ip is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_derived_from_mac_ip() directly.

    YANG Description: Derived from BGP MAC-IP route-type 2
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="derived-from-mac-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """derived_from_mac_ip must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="derived-from-mac-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

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

  def _unset_derived_from_mac_ip(self):
    self.__derived_from_mac_ip = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="derived-from-mac-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_directly_received(self):
    """
    Getter method for directly_received, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer/state/directly_received (boolean)

    YANG Description: BGP learned MAC route-type 2
    """
    return self.__directly_received
      
  def _set_directly_received(self, v, load=False):
    """
    Setter method for directly_received, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer/state/directly_received (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_directly_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_directly_received() directly.

    YANG Description: BGP learned MAC route-type 2
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="directly-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """directly_received must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="directly-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

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

  def _unset_directly_received(self):
    self.__directly_received = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="directly-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  producer = __builtin__.property(_get_producer)
  seq_number = __builtin__.property(_get_seq_number)
  mobility_state = __builtin__.property(_get_mobility_state)
  esi = __builtin__.property(_get_esi)
  sticky = __builtin__.property(_get_sticky)
  next_hop = __builtin__.property(_get_next_hop)
  derived_from_mac_ip = __builtin__.property(_get_derived_from_mac_ip)
  directly_received = __builtin__.property(_get_directly_received)


  _pyangbind_elements = OrderedDict([('producer', producer), ('seq_number', seq_number), ('mobility_state', mobility_state), ('esi', esi), ('sticky', sticky), ('next_hop', next_hop), ('derived_from_mac_ip', derived_from_mac_ip), ('directly_received', directly_received), ])


class yc_producer_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry_producers_producer(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/fdb/l2rib/mac-table/entries/entry/producers/producer. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of producers for each MAC table entry
  """
  __slots__ = ('_path_helper', '_extmethods', '__producer','__state',)

  _yang_name = 'producer'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__producer = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry_producers_producer_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib', 'mac-table', 'entries', 'entry', 'producers', 'producer']

  def _get_producer(self):
    """
    Getter method for producer, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer/producer (leafref)

    YANG Description: Reference to producer list key
    """
    return self.__producer
      
  def _set_producer(self, v, load=False):
    """
    Setter method for producer, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer/producer (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_producer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_producer() directly.

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

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

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


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer/state (container)

    YANG Description: State container for L2RIB MAC Table Entries
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer/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 container for L2RIB MAC Table Entries
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry_producers_producer_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry_producers_producer_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry_producers_producer_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  producer = __builtin__.property(_get_producer)
  state = __builtin__.property(_get_state)


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


class yc_producers_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry_producers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/fdb/l2rib/mac-table/entries/entry/producers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Source producers for each MAC Table entry
  """
  __slots__ = ('_path_helper', '_extmethods', '__producer',)

  _yang_name = 'producers'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__producer = YANGDynClass(base=YANGListType("producer",yc_producer_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry_producers_producer, yang_name="producer", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='producer', extensions=None), is_container='list', yang_name="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib', 'mac-table', 'entries', 'entry', 'producers']

  def _get_producer(self):
    """
    Getter method for producer, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer (list)

    YANG Description: List of producers for each MAC table entry
    """
    return self.__producer
      
  def _set_producer(self, v, load=False):
    """
    Setter method for producer, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_producer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_producer() directly.

    YANG Description: List of producers for each MAC table entry
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("producer",yc_producer_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry_producers_producer, yang_name="producer", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='producer', extensions=None), is_container='list', yang_name="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """producer must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("producer",yc_producer_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry_producers_producer, yang_name="producer", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='producer', extensions=None), is_container='list', yang_name="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

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

  def _unset_producer(self):
    self.__producer = YANGDynClass(base=YANGListType("producer",yc_producer_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry_producers_producer, yang_name="producer", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='producer', extensions=None), is_container='list', yang_name="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  producer = __builtin__.property(_get_producer)


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


class yc_entry_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/fdb/l2rib/mac-table/entries/entry. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of learned MAC addresses
  """
  __slots__ = ('_path_helper', '_extmethods', '__mac_address','__state','__producers',)

  _yang_name = 'entry'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__mac_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__producers = YANGDynClass(base=yc_producers_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry_producers, is_container='container', yang_name="producers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib', 'mac-table', 'entries', 'entry']

  def _get_mac_address(self):
    """
    Getter method for mac_address, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/mac_address (leafref)

    YANG Description: Leafref of MAC address object
    """
    return self.__mac_address
      
  def _set_mac_address(self, v, load=False):
    """
    Setter method for mac_address, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/mac_address (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_address() directly.

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

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

  def _unset_mac_address(self):
    self.__mac_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/state (container)

    YANG Description: Operational state data for L2RIB MAC table object entry
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/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 L2RIB MAC table object entry
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_producers(self):
    """
    Getter method for producers, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers (container)

    YANG Description: Source producers for each MAC Table entry
    """
    return self.__producers
      
  def _set_producers(self, v, load=False):
    """
    Setter method for producers, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_producers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_producers() directly.

    YANG Description: Source producers for each MAC Table entry
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_producers_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry_producers, is_container='container', yang_name="producers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """producers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_producers_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry_producers, is_container='container', yang_name="producers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

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

  def _unset_producers(self):
    self.__producers = YANGDynClass(base=yc_producers_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry_producers, is_container='container', yang_name="producers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  mac_address = __builtin__.property(_get_mac_address)
  state = __builtin__.property(_get_state)
  producers = __builtin__.property(_get_producers)


  _pyangbind_elements = OrderedDict([('mac_address', mac_address), ('state', state), ('producers', producers), ])


class yc_entries_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_entries(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/fdb/l2rib/mac-table/entries. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for list of MAC address entries
  """
  __slots__ = ('_path_helper', '_extmethods', '__entry',)

  _yang_name = 'entries'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__entry = YANGDynClass(base=YANGListType("mac_address",yc_entry_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry, yang_name="entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mac-address', extensions=None), is_container='list', yang_name="entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib', 'mac-table', 'entries']

  def _get_entry(self):
    """
    Getter method for entry, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry (list)

    YANG Description: List of learned MAC addresses
    """
    return self.__entry
      
  def _set_entry(self, v, load=False):
    """
    Setter method for entry, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_entry is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_entry() directly.

    YANG Description: List of learned MAC addresses
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("mac_address",yc_entry_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry, yang_name="entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mac-address', extensions=None), is_container='list', yang_name="entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """entry must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("mac_address",yc_entry_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry, yang_name="entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mac-address', extensions=None), is_container='list', yang_name="entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

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

  def _unset_entry(self):
    self.__entry = YANGDynClass(base=YANGListType("mac_address",yc_entry_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry, yang_name="entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mac-address', extensions=None), is_container='list', yang_name="entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  entry = __builtin__.property(_get_entry)


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


class yc_state_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_next_hops_next_hop_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/fdb/l2rib/mac-table/next-hops/next-hop/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State container for common next-hop attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__peer_ip','__label','__interface','__subinterface',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__peer_ip = 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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib', 'mac-table', 'next-hops', 'next-hop', 'state']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/next_hops/next_hop/state/index (uint64)

    YANG Description: A unique entry for the next-hop.
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/next_hops/next_hop/state/index (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: A unique entry for the next-hop.
    """
    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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

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

  def _unset_index(self):
    self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_peer_ip(self):
    """
    Getter method for peer_ip, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/next_hops/next_hop/state/peer_ip (oc-inet:ip-address)

    YANG Description: Next hop peer address
    """
    return self.__peer_ip
      
  def _set_peer_ip(self, v, load=False):
    """
    Setter method for peer_ip, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/next_hops/next_hop/state/peer_ip (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_ip is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_ip() directly.

    YANG Description: Next hop peer address
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_ip must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

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

  def _unset_peer_ip(self):
    self.__peer_ip = 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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_label(self):
    """
    Getter method for label, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/next_hops/next_hop/state/label (oc-evpn-types:evi-id)

    YANG Description: Next hop label representing the l2vni for the route
    """
    return self.__label
      
  def _set_label(self, v, load=False):
    """
    Setter method for label, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/next_hops/next_hop/state/label (oc-evpn-types:evi-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_label() directly.

    YANG Description: Next hop label representing the l2vni for the route
    """
    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': ['1..16777215']}), is_leaf=True, yang_name="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """label must be of a type compatible with oc-evpn-types:evi-id""",
          'defined-type': "oc-evpn-types:evi-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)""",
        })

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

  def _unset_label(self):
    self.__label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)


  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/next_hops/next_hop/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 /network_instances/network_instance/fdb/l2rib/mac_table/next_hops/next_hop/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/next_hops/next_hop/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 /network_instances/network_instance/fdb/l2rib/mac_table/next_hops/next_hop/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)

  index = __builtin__.property(_get_index)
  peer_ip = __builtin__.property(_get_peer_ip)
  label = __builtin__.property(_get_label)
  interface = __builtin__.property(_get_interface)
  subinterface = __builtin__.property(_get_subinterface)


  _pyangbind_elements = OrderedDict([('index', index), ('peer_ip', peer_ip), ('label', label), ('interface', interface), ('subinterface', subinterface), ])


class yc_next_hop_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_next_hops_next_hop(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/fdb/l2rib/mac-table/next-hops/next-hop. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of next hop attributes for each MAC or MAC-IP
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__state',)

  _yang_name = 'next-hop'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_next_hops_next_hop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib', 'mac-table', 'next-hops', 'next-hop']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/next_hops/next_hop/index (leafref)

    YANG Description: A unique index identifying the next-hop entry for the
MAC or MAC-IP entry
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/next_hops/next_hop/index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: A unique index identifying the next-hop entry for the
MAC or MAC-IP entry
    """
    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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

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

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


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/next_hops/next_hop/state (container)

    YANG Description: State container for common next-hop attributes
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/next_hops/next_hop/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 container for common next-hop attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_next_hops_next_hop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_next_hops_next_hop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_next_hops_next_hop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  index = __builtin__.property(_get_index)
  state = __builtin__.property(_get_state)


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


class yc_next_hops_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_next_hops(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/fdb/l2rib/mac-table/next-hops. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A next-hop associated with the MAC or MAC-IP entry
  """
  __slots__ = ('_path_helper', '_extmethods', '__next_hop',)

  _yang_name = 'next-hops'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__next_hop = YANGDynClass(base=YANGListType("index",yc_next_hop_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_next_hops_next_hop, yang_name="next-hop", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib', 'mac-table', 'next-hops']

  def _get_next_hop(self):
    """
    Getter method for next_hop, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/next_hops/next_hop (list)

    YANG Description: List of next hop attributes for each MAC or MAC-IP
    """
    return self.__next_hop
      
  def _set_next_hop(self, v, load=False):
    """
    Setter method for next_hop, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/next_hops/next_hop (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hop() directly.

    YANG Description: List of next hop attributes for each MAC or MAC-IP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("index",yc_next_hop_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_next_hops_next_hop, yang_name="next-hop", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hop must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("index",yc_next_hop_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_next_hops_next_hop, yang_name="next-hop", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

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

  def _unset_next_hop(self):
    self.__next_hop = YANGDynClass(base=YANGListType("index",yc_next_hop_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_next_hops_next_hop, yang_name="next-hop", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  next_hop = __builtin__.property(_get_next_hop)


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


class yc_mac_table_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/fdb/l2rib/mac-table. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state container for MAC address information installed
into the MAC VRF of the L2RIB
  """
  __slots__ = ('_path_helper', '_extmethods', '__entries','__next_hops',)

  _yang_name = 'mac-table'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__entries = YANGDynClass(base=yc_entries_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_entries, is_container='container', yang_name="entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__next_hops = YANGDynClass(base=yc_next_hops_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_next_hops, is_container='container', yang_name="next-hops", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib', 'mac-table']

  def _get_entries(self):
    """
    Getter method for entries, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries (container)

    YANG Description: Enclosing container for list of MAC address entries
    """
    return self.__entries
      
  def _set_entries(self, v, load=False):
    """
    Setter method for entries, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_entries is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_entries() directly.

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

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

  def _unset_entries(self):
    self.__entries = YANGDynClass(base=yc_entries_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_entries, is_container='container', yang_name="entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_next_hops(self):
    """
    Getter method for next_hops, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/next_hops (container)

    YANG Description: A next-hop associated with the MAC or MAC-IP entry
    """
    return self.__next_hops
      
  def _set_next_hops(self, v, load=False):
    """
    Setter method for next_hops, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/next_hops (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hops is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hops() directly.

    YANG Description: A next-hop associated with the MAC or MAC-IP entry
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_next_hops_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_next_hops, is_container='container', yang_name="next-hops", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hops must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_next_hops_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_next_hops, is_container='container', yang_name="next-hops", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

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

  def _unset_next_hops(self):
    self.__next_hops = YANGDynClass(base=yc_next_hops_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table_next_hops, is_container='container', yang_name="next-hops", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  entries = __builtin__.property(_get_entries)
  next_hops = __builtin__.property(_get_next_hops)


  _pyangbind_elements = OrderedDict([('entries', entries), ('next_hops', next_hops), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/fdb/l2rib/mac-ip-table/entries/entry/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for L2RIB MAC-IP table object entry
  """
  __slots__ = ('_path_helper', '_extmethods', '__mac_address','__vlan','__evi','__l2_vni','__host_ip','__l3_vni',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__mac_address = 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)
    self.__vlan = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__evi = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)
    self.__l2_vni = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="l2-vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)
    self.__host_ip = 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}'}),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}|:))'}),], is_leaf=True, yang_name="host-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__l3_vni = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="l3-vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib', 'mac-ip-table', 'entries', 'entry', 'state']

  def _get_mac_address(self):
    """
    Getter method for mac_address, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/state/mac_address (oc-yang:mac-address)

    YANG Description: MAC address of the L2RIB MAC or MAC-IP entry
    """
    return self.__mac_address
      
  def _set_mac_address(self, v, load=False):
    """
    Setter method for mac_address, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/state/mac_address (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_address() directly.

    YANG Description: MAC address of the L2RIB MAC or MAC-IP entry
    """
    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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_address 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)""",
        })

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

  def _unset_mac_address(self):
    self.__mac_address = 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)


  def _get_vlan(self):
    """
    Getter method for vlan, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/state/vlan (leafref)

    YANG Description: VLAN on which the MAC or MAC-IP address is present.
    """
    return self.__vlan
      
  def _set_vlan(self, v, load=False):
    """
    Setter method for vlan, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/state/vlan (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_vlan is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_vlan() directly.

    YANG Description: VLAN on which the MAC or MAC-IP address is present.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """vlan must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_vlan(self):
    self.__vlan = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_evi(self):
    """
    Getter method for evi, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/state/evi (oc-evpn-types:evi-id)

    YANG Description: EVPN Instance Identifier for the MAC or MAC-IP
    """
    return self.__evi
      
  def _set_evi(self, v, load=False):
    """
    Setter method for evi, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/state/evi (oc-evpn-types:evi-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_evi is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_evi() directly.

    YANG Description: EVPN Instance Identifier for the MAC or MAC-IP
    """
    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': ['1..16777215']}), is_leaf=True, yang_name="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """evi must be of a type compatible with oc-evpn-types:evi-id""",
          'defined-type': "oc-evpn-types:evi-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)""",
        })

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

  def _unset_evi(self):
    self.__evi = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)


  def _get_l2_vni(self):
    """
    Getter method for l2_vni, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/state/l2_vni (oc-evpn-types:evi-id)

    YANG Description: Layer2 VNI segment mapped to given vlan-id
    """
    return self.__l2_vni
      
  def _set_l2_vni(self, v, load=False):
    """
    Setter method for l2_vni, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/state/l2_vni (oc-evpn-types:evi-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_l2_vni is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_l2_vni() directly.

    YANG Description: Layer2 VNI segment mapped to given vlan-id
    """
    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': ['1..16777215']}), is_leaf=True, yang_name="l2-vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """l2_vni must be of a type compatible with oc-evpn-types:evi-id""",
          'defined-type': "oc-evpn-types:evi-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="l2-vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)""",
        })

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

  def _unset_l2_vni(self):
    self.__l2_vni = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="l2-vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)


  def _get_host_ip(self):
    """
    Getter method for host_ip, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/state/host_ip (oc-inet:ip-address)

    YANG Description: Host IP address of the CE device for the L2RIB MAC-IP entry
    """
    return self.__host_ip
      
  def _set_host_ip(self, v, load=False):
    """
    Setter method for host_ip, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/state/host_ip (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_host_ip is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_host_ip() directly.

    YANG Description: Host IP address of the CE device for the L2RIB MAC-IP entry
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="host-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """host_ip must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="host-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

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

  def _unset_host_ip(self):
    self.__host_ip = 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}'}),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}|:))'}),], is_leaf=True, yang_name="host-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_l3_vni(self):
    """
    Getter method for l3_vni, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/state/l3_vni (oc-evpn-types:evi-id)

    YANG Description: Symmetric IRB uses the same forwarding semantics when routing
between IP subnets with VRF Lite or MPLS L3VPNs. With symmetric IRB,
all traffic egressing and returning from a VTEP uses the same VNI.
Specifically, the same Layer 3 VNI (L3VNI) associated with the VRF
is used for all routed traffic. Layer3 VNI used for inter-subnet
routing
    """
    return self.__l3_vni
      
  def _set_l3_vni(self, v, load=False):
    """
    Setter method for l3_vni, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/state/l3_vni (oc-evpn-types:evi-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_l3_vni is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_l3_vni() directly.

    YANG Description: Symmetric IRB uses the same forwarding semantics when routing
between IP subnets with VRF Lite or MPLS L3VPNs. With symmetric IRB,
all traffic egressing and returning from a VTEP uses the same VNI.
Specifically, the same Layer 3 VNI (L3VNI) associated with the VRF
is used for all routed traffic. Layer3 VNI used for inter-subnet
routing
    """
    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': ['1..16777215']}), is_leaf=True, yang_name="l3-vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """l3_vni must be of a type compatible with oc-evpn-types:evi-id""",
          'defined-type': "oc-evpn-types:evi-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="l3-vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)""",
        })

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

  def _unset_l3_vni(self):
    self.__l3_vni = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="l3-vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)

  mac_address = __builtin__.property(_get_mac_address)
  vlan = __builtin__.property(_get_vlan)
  evi = __builtin__.property(_get_evi)
  l2_vni = __builtin__.property(_get_l2_vni)
  host_ip = __builtin__.property(_get_host_ip)
  l3_vni = __builtin__.property(_get_l3_vni)


  _pyangbind_elements = OrderedDict([('mac_address', mac_address), ('vlan', vlan), ('evi', evi), ('l2_vni', l2_vni), ('host_ip', host_ip), ('l3_vni', l3_vni), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry_producers_producer_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/fdb/l2rib/mac-ip-table/entries/entry/producers/producer/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State container for L2RIB MAC Table Entries
  """
  __slots__ = ('_path_helper', '_extmethods', '__producer','__seq_number','__mobility_state','__esi','__sticky','__next_hop',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__producer = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LOCAL': {}, 'STATIC': {}, 'BGP': {}},), is_leaf=True, yang_name="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__seq_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="seq-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__mobility_state = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'FROZEN': {}, 'DUPLICATE': {}},), is_leaf=True, yang_name="mobility-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__esi = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}), is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi', is_config=False)
    self.__sticky = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sticky", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__next_hop = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib', 'mac-ip-table', 'entries', 'entry', 'producers', 'producer', 'state']

  def _get_producer(self):
    """
    Getter method for producer, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/producers/producer/state/producer (enumeration)

    YANG Description: Source of the learned L2RIB route
    """
    return self.__producer
      
  def _set_producer(self, v, load=False):
    """
    Setter method for producer, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/producers/producer/state/producer (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_producer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_producer() directly.

    YANG Description: Source of the learned L2RIB route
    """
    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={'LOCAL': {}, 'STATIC': {}, 'BGP': {}},), is_leaf=True, yang_name="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """producer must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LOCAL': {}, 'STATIC': {}, 'BGP': {}},), is_leaf=True, yang_name="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

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

  def _unset_producer(self):
    self.__producer = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LOCAL': {}, 'STATIC': {}, 'BGP': {}},), is_leaf=True, yang_name="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_seq_number(self):
    """
    Getter method for seq_number, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/producers/producer/state/seq_number (uint32)

    YANG Description: The sequence number is used to ensure that PEs retain the correct
MAC/IP Advertisement route when multiple updates occur for the same
MAC address
    """
    return self.__seq_number
      
  def _set_seq_number(self, v, load=False):
    """
    Setter method for seq_number, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/producers/producer/state/seq_number (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_seq_number is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_seq_number() directly.

    YANG Description: The sequence number is used to ensure that PEs retain the correct
MAC/IP Advertisement route when multiple updates occur for the same
MAC address
    """
    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="seq-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """seq_number 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="seq-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

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

  def _unset_seq_number(self):
    self.__seq_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="seq-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_mobility_state(self):
    """
    Getter method for mobility_state, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/producers/producer/state/mobility_state (enumeration)

    YANG Description: Indicates if learned MAC address is duplicate or frozen
    """
    return self.__mobility_state
      
  def _set_mobility_state(self, v, load=False):
    """
    Setter method for mobility_state, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/producers/producer/state/mobility_state (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mobility_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mobility_state() directly.

    YANG Description: Indicates if learned MAC address is duplicate or frozen
    """
    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={'FROZEN': {}, 'DUPLICATE': {}},), is_leaf=True, yang_name="mobility-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mobility_state must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'FROZEN': {}, 'DUPLICATE': {}},), is_leaf=True, yang_name="mobility-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

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

  def _unset_mobility_state(self):
    self.__mobility_state = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'FROZEN': {}, 'DUPLICATE': {}},), is_leaf=True, yang_name="mobility-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_esi(self):
    """
    Getter method for esi, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/producers/producer/state/esi (oc-evpn-types:esi)

    YANG Description: Ethernet Segment Identifier for local and remote routes
    """
    return self.__esi
      
  def _set_esi(self, v, load=False):
    """
    Setter method for esi, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/producers/producer/state/esi (oc-evpn-types:esi)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_esi is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_esi() directly.

    YANG Description: Ethernet Segment Identifier for local and remote routes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}), is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """esi must be of a type compatible with oc-evpn-types:esi""",
          'defined-type': "oc-evpn-types:esi",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}), is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi', is_config=False)""",
        })

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

  def _unset_esi(self):
    self.__esi = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}), is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi', is_config=False)


  def _get_sticky(self):
    """
    Getter method for sticky, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/producers/producer/state/sticky (boolean)

    YANG Description: MAC address is sticky and not subjected to MAC moves
    """
    return self.__sticky
      
  def _set_sticky(self, v, load=False):
    """
    Setter method for sticky, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/producers/producer/state/sticky (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sticky is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sticky() directly.

    YANG Description: MAC address is sticky and not subjected to MAC moves
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="sticky", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sticky must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sticky", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

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

  def _unset_sticky(self):
    self.__sticky = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sticky", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_next_hop(self):
    """
    Getter method for next_hop, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/producers/producer/state/next_hop (leafref)

    YANG Description: Leafref next-hop for the MAC-IP table entry
    """
    return self.__next_hop
      
  def _set_next_hop(self, v, load=False):
    """
    Setter method for next_hop, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/producers/producer/state/next_hop (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hop() directly.

    YANG Description: Leafref next-hop for the MAC-IP table entry
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hop must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_next_hop(self):
    self.__next_hop = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)

  producer = __builtin__.property(_get_producer)
  seq_number = __builtin__.property(_get_seq_number)
  mobility_state = __builtin__.property(_get_mobility_state)
  esi = __builtin__.property(_get_esi)
  sticky = __builtin__.property(_get_sticky)
  next_hop = __builtin__.property(_get_next_hop)


  _pyangbind_elements = OrderedDict([('producer', producer), ('seq_number', seq_number), ('mobility_state', mobility_state), ('esi', esi), ('sticky', sticky), ('next_hop', next_hop), ])


class yc_producer_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry_producers_producer(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/fdb/l2rib/mac-ip-table/entries/entry/producers/producer. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of producers for each MAC-IP table entry
  """
  __slots__ = ('_path_helper', '_extmethods', '__producer','__state',)

  _yang_name = 'producer'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__producer = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry_producers_producer_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib', 'mac-ip-table', 'entries', 'entry', 'producers', 'producer']

  def _get_producer(self):
    """
    Getter method for producer, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/producers/producer/producer (leafref)

    YANG Description: Reference to producer list key
    """
    return self.__producer
      
  def _set_producer(self, v, load=False):
    """
    Setter method for producer, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/producers/producer/producer (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_producer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_producer() directly.

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

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

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


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/producers/producer/state (container)

    YANG Description: State container for L2RIB MAC Table Entries
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/producers/producer/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 container for L2RIB MAC Table Entries
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry_producers_producer_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry_producers_producer_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry_producers_producer_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  producer = __builtin__.property(_get_producer)
  state = __builtin__.property(_get_state)


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


class yc_producers_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry_producers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/fdb/l2rib/mac-ip-table/entries/entry/producers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Source producers for each MAC-IP Table entry
  """
  __slots__ = ('_path_helper', '_extmethods', '__producer',)

  _yang_name = 'producers'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__producer = YANGDynClass(base=YANGListType("producer",yc_producer_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry_producers_producer, yang_name="producer", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='producer', extensions=None), is_container='list', yang_name="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib', 'mac-ip-table', 'entries', 'entry', 'producers']

  def _get_producer(self):
    """
    Getter method for producer, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/producers/producer (list)

    YANG Description: List of producers for each MAC-IP table entry
    """
    return self.__producer
      
  def _set_producer(self, v, load=False):
    """
    Setter method for producer, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/producers/producer (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_producer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_producer() directly.

    YANG Description: List of producers for each MAC-IP table entry
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("producer",yc_producer_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry_producers_producer, yang_name="producer", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='producer', extensions=None), is_container='list', yang_name="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """producer must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("producer",yc_producer_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry_producers_producer, yang_name="producer", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='producer', extensions=None), is_container='list', yang_name="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

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

  def _unset_producer(self):
    self.__producer = YANGDynClass(base=YANGListType("producer",yc_producer_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry_producers_producer, yang_name="producer", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='producer', extensions=None), is_container='list', yang_name="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  producer = __builtin__.property(_get_producer)


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


class yc_entry_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/fdb/l2rib/mac-ip-table/entries/entry. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of learned MAC-IP addresses
  """
  __slots__ = ('_path_helper', '_extmethods', '__mac_address','__host_ip','__state','__producers',)

  _yang_name = 'entry'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__mac_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__host_ip = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="host-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__producers = YANGDynClass(base=yc_producers_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry_producers, is_container='container', yang_name="producers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib', 'mac-ip-table', 'entries', 'entry']

  def _get_mac_address(self):
    """
    Getter method for mac_address, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/mac_address (leafref)

    YANG Description: Leafref of MAC-IP address object
    """
    return self.__mac_address
      
  def _set_mac_address(self, v, load=False):
    """
    Setter method for mac_address, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/mac_address (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_address() directly.

    YANG Description: Leafref of MAC-IP address object
    """
    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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_address must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_mac_address(self):
    self.__mac_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_host_ip(self):
    """
    Getter method for host_ip, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/host_ip (leafref)

    YANG Description: IP address of the Customer Edge device
    """
    return self.__host_ip
      
  def _set_host_ip(self, v, load=False):
    """
    Setter method for host_ip, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/host_ip (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_host_ip is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_host_ip() directly.

    YANG Description: IP address of the Customer Edge device
    """
    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="host-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """host_ip must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="host-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_host_ip(self):
    self.__host_ip = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="host-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/state (container)

    YANG Description: Operational state data for L2RIB MAC-IP table object entry
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/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 L2RIB MAC-IP table object entry
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_producers(self):
    """
    Getter method for producers, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/producers (container)

    YANG Description: Source producers for each MAC-IP Table entry
    """
    return self.__producers
      
  def _set_producers(self, v, load=False):
    """
    Setter method for producers, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/producers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_producers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_producers() directly.

    YANG Description: Source producers for each MAC-IP Table entry
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_producers_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry_producers, is_container='container', yang_name="producers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """producers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_producers_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry_producers, is_container='container', yang_name="producers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

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

  def _unset_producers(self):
    self.__producers = YANGDynClass(base=yc_producers_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry_producers, is_container='container', yang_name="producers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  mac_address = __builtin__.property(_get_mac_address)
  host_ip = __builtin__.property(_get_host_ip)
  state = __builtin__.property(_get_state)
  producers = __builtin__.property(_get_producers)


  _pyangbind_elements = OrderedDict([('mac_address', mac_address), ('host_ip', host_ip), ('state', state), ('producers', producers), ])


class yc_entries_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/fdb/l2rib/mac-ip-table/entries. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for list of MAC-IP address entries
  """
  __slots__ = ('_path_helper', '_extmethods', '__entry',)

  _yang_name = 'entries'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__entry = YANGDynClass(base=YANGListType("mac_address host_ip",yc_entry_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry, yang_name="entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mac-address host-ip', extensions=None), is_container='list', yang_name="entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib', 'mac-ip-table', 'entries']

  def _get_entry(self):
    """
    Getter method for entry, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry (list)

    YANG Description: List of learned MAC-IP addresses
    """
    return self.__entry
      
  def _set_entry(self, v, load=False):
    """
    Setter method for entry, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_entry is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_entry() directly.

    YANG Description: List of learned MAC-IP addresses
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("mac_address host_ip",yc_entry_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry, yang_name="entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mac-address host-ip', extensions=None), is_container='list', yang_name="entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """entry must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("mac_address host_ip",yc_entry_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry, yang_name="entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mac-address host-ip', extensions=None), is_container='list', yang_name="entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

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

  def _unset_entry(self):
    self.__entry = YANGDynClass(base=YANGListType("mac_address host_ip",yc_entry_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry, yang_name="entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mac-address host-ip', extensions=None), is_container='list', yang_name="entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  entry = __builtin__.property(_get_entry)


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


class yc_state_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_next_hops_next_hop_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/fdb/l2rib/mac-ip-table/next-hops/next-hop/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State container for common next-hop attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__peer_ip','__label','__interface','__subinterface',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__peer_ip = 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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib', 'mac-ip-table', 'next-hops', 'next-hop', 'state']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/next_hops/next_hop/state/index (uint64)

    YANG Description: A unique entry for the next-hop.
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/next_hops/next_hop/state/index (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: A unique entry for the next-hop.
    """
    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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

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

  def _unset_index(self):
    self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_peer_ip(self):
    """
    Getter method for peer_ip, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/next_hops/next_hop/state/peer_ip (oc-inet:ip-address)

    YANG Description: Next hop peer address
    """
    return self.__peer_ip
      
  def _set_peer_ip(self, v, load=False):
    """
    Setter method for peer_ip, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/next_hops/next_hop/state/peer_ip (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_ip is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_ip() directly.

    YANG Description: Next hop peer address
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_ip must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

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

  def _unset_peer_ip(self):
    self.__peer_ip = 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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_label(self):
    """
    Getter method for label, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/next_hops/next_hop/state/label (oc-evpn-types:evi-id)

    YANG Description: Next hop label representing the l2vni for the route
    """
    return self.__label
      
  def _set_label(self, v, load=False):
    """
    Setter method for label, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/next_hops/next_hop/state/label (oc-evpn-types:evi-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_label() directly.

    YANG Description: Next hop label representing the l2vni for the route
    """
    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': ['1..16777215']}), is_leaf=True, yang_name="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """label must be of a type compatible with oc-evpn-types:evi-id""",
          'defined-type': "oc-evpn-types:evi-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)""",
        })

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

  def _unset_label(self):
    self.__label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)


  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/next_hops/next_hop/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 /network_instances/network_instance/fdb/l2rib/mac_ip_table/next_hops/next_hop/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/next_hops/next_hop/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 /network_instances/network_instance/fdb/l2rib/mac_ip_table/next_hops/next_hop/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)

  index = __builtin__.property(_get_index)
  peer_ip = __builtin__.property(_get_peer_ip)
  label = __builtin__.property(_get_label)
  interface = __builtin__.property(_get_interface)
  subinterface = __builtin__.property(_get_subinterface)


  _pyangbind_elements = OrderedDict([('index', index), ('peer_ip', peer_ip), ('label', label), ('interface', interface), ('subinterface', subinterface), ])


class yc_next_hop_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_next_hops_next_hop(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/fdb/l2rib/mac-ip-table/next-hops/next-hop. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of next hop attributes for each MAC or MAC-IP
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__state',)

  _yang_name = 'next-hop'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_next_hops_next_hop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib', 'mac-ip-table', 'next-hops', 'next-hop']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/next_hops/next_hop/index (leafref)

    YANG Description: A unique index identifying the next-hop entry for the
MAC or MAC-IP entry
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/next_hops/next_hop/index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: A unique index identifying the next-hop entry for the
MAC or MAC-IP entry
    """
    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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

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

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


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/next_hops/next_hop/state (container)

    YANG Description: State container for common next-hop attributes
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/next_hops/next_hop/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 container for common next-hop attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_next_hops_next_hop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_next_hops_next_hop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_next_hops_next_hop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  index = __builtin__.property(_get_index)
  state = __builtin__.property(_get_state)


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


class yc_next_hops_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_next_hops(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/fdb/l2rib/mac-ip-table/next-hops. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A next-hop associated with the MAC or MAC-IP entry
  """
  __slots__ = ('_path_helper', '_extmethods', '__next_hop',)

  _yang_name = 'next-hops'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__next_hop = YANGDynClass(base=YANGListType("index",yc_next_hop_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_next_hops_next_hop, yang_name="next-hop", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib', 'mac-ip-table', 'next-hops']

  def _get_next_hop(self):
    """
    Getter method for next_hop, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/next_hops/next_hop (list)

    YANG Description: List of next hop attributes for each MAC or MAC-IP
    """
    return self.__next_hop
      
  def _set_next_hop(self, v, load=False):
    """
    Setter method for next_hop, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/next_hops/next_hop (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hop() directly.

    YANG Description: List of next hop attributes for each MAC or MAC-IP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("index",yc_next_hop_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_next_hops_next_hop, yang_name="next-hop", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hop must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("index",yc_next_hop_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_next_hops_next_hop, yang_name="next-hop", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

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

  def _unset_next_hop(self):
    self.__next_hop = YANGDynClass(base=YANGListType("index",yc_next_hop_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_next_hops_next_hop, yang_name="next-hop", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  next_hop = __builtin__.property(_get_next_hop)


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


class yc_mac_ip_table_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/fdb/l2rib/mac-ip-table. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state container for MAC-IP address information installed
into the MAC VRF of the L2RIB
  """
  __slots__ = ('_path_helper', '_extmethods', '__entries','__next_hops',)

  _yang_name = 'mac-ip-table'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__entries = YANGDynClass(base=yc_entries_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries, is_container='container', yang_name="entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__next_hops = YANGDynClass(base=yc_next_hops_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_next_hops, is_container='container', yang_name="next-hops", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib', 'mac-ip-table']

  def _get_entries(self):
    """
    Getter method for entries, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries (container)

    YANG Description: Enclosing container for list of MAC-IP address entries
    """
    return self.__entries
      
  def _set_entries(self, v, load=False):
    """
    Setter method for entries, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_entries is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_entries() directly.

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

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

  def _unset_entries(self):
    self.__entries = YANGDynClass(base=yc_entries_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries, is_container='container', yang_name="entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_next_hops(self):
    """
    Getter method for next_hops, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/next_hops (container)

    YANG Description: A next-hop associated with the MAC or MAC-IP entry
    """
    return self.__next_hops
      
  def _set_next_hops(self, v, load=False):
    """
    Setter method for next_hops, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/next_hops (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hops is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hops() directly.

    YANG Description: A next-hop associated with the MAC or MAC-IP entry
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_next_hops_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_next_hops, is_container='container', yang_name="next-hops", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hops must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_next_hops_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_next_hops, is_container='container', yang_name="next-hops", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

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

  def _unset_next_hops(self):
    self.__next_hops = YANGDynClass(base=yc_next_hops_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table_next_hops, is_container='container', yang_name="next-hops", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  entries = __builtin__.property(_get_entries)
  next_hops = __builtin__.property(_get_next_hops)


  _pyangbind_elements = OrderedDict([('entries', entries), ('next_hops', next_hops), ])


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

  YANG Description: Operational state container for MAC address and MAC-IP address
information that is learned and installed into the MAC VRF Layer 2
Routing Information Base (L2RIB)
  """
  __slots__ = ('_path_helper', '_extmethods', '__mac_table','__mac_ip_table',)

  _yang_name = 'l2rib'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__mac_table = YANGDynClass(base=yc_mac_table_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table, is_container='container', yang_name="mac-table", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__mac_ip_table = YANGDynClass(base=yc_mac_ip_table_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table, is_container='container', yang_name="mac-ip-table", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib']

  def _get_mac_table(self):
    """
    Getter method for mac_table, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table (container)

    YANG Description: Operational state container for MAC address information installed
into the MAC VRF of the L2RIB
    """
    return self.__mac_table
      
  def _set_mac_table(self, v, load=False):
    """
    Setter method for mac_table, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_table is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_table() directly.

    YANG Description: Operational state container for MAC address information installed
into the MAC VRF of the L2RIB
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_mac_table_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table, is_container='container', yang_name="mac-table", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_table must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_mac_table_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table, is_container='container', yang_name="mac-table", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

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

  def _unset_mac_table(self):
    self.__mac_table = YANGDynClass(base=yc_mac_table_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_table, is_container='container', yang_name="mac-table", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_mac_ip_table(self):
    """
    Getter method for mac_ip_table, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table (container)

    YANG Description: Operational state container for MAC-IP address information installed
into the MAC VRF of the L2RIB
    """
    return self.__mac_ip_table
      
  def _set_mac_ip_table(self, v, load=False):
    """
    Setter method for mac_ip_table, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_ip_table is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_ip_table() directly.

    YANG Description: Operational state container for MAC-IP address information installed
into the MAC VRF of the L2RIB
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_mac_ip_table_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table, is_container='container', yang_name="mac-ip-table", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_ip_table must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_mac_ip_table_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table, is_container='container', yang_name="mac-ip-table", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

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

  def _unset_mac_ip_table(self):
    self.__mac_ip_table = YANGDynClass(base=yc_mac_ip_table_openconfig_network_instance__network_instances_network_instance_fdb_l2rib_mac_ip_table, is_container='container', yang_name="mac-ip-table", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  mac_table = __builtin__.property(_get_mac_table)
  mac_ip_table = __builtin__.property(_get_mac_ip_table)


  _pyangbind_elements = OrderedDict([('mac_table', mac_table), ('mac_ip_table', mac_ip_table), ])


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

  YANG Description: Operational state and configuration parameters relating to
the forwarding database of the network instance
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__mac_table','__mac_mobility','__arp_proxy','__nd_proxy','__l2rib',)

  _yang_name = 'fdb'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_fdb_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_fdb_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__mac_table = YANGDynClass(base=yc_mac_table_openconfig_network_instance__network_instances_network_instance_fdb_mac_table, is_container='container', yang_name="mac-table", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__mac_mobility = YANGDynClass(base=yc_mac_mobility_openconfig_network_instance__network_instances_network_instance_fdb_mac_mobility, is_container='container', yang_name="mac-mobility", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__arp_proxy = YANGDynClass(base=yc_arp_proxy_openconfig_network_instance__network_instances_network_instance_fdb_arp_proxy, is_container='container', yang_name="arp-proxy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__nd_proxy = YANGDynClass(base=yc_nd_proxy_openconfig_network_instance__network_instances_network_instance_fdb_nd_proxy, is_container='container', yang_name="nd-proxy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__l2rib = YANGDynClass(base=yc_l2rib_openconfig_network_instance__network_instances_network_instance_fdb_l2rib, is_container='container', yang_name="l2rib", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/fdb/config (container)

    YANG Description: Configuration parameters relating to the FDB
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/fdb/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 FDB
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_fdb_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/fdb/state (container)

    YANG Description: Operational state parameters relating to the FDB
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/fdb/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 FDB
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_fdb_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_fdb_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_mac_table(self):
    """
    Getter method for mac_table, mapped from YANG variable /network_instances/network_instance/fdb/mac_table (container)

    YANG Description: Table of learned or statically configured MAC addresses and
corresponding VLANs in the bridge domain
    """
    return self.__mac_table
      
  def _set_mac_table(self, v, load=False):
    """
    Setter method for mac_table, mapped from YANG variable /network_instances/network_instance/fdb/mac_table (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_table is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_table() directly.

    YANG Description: Table of learned or statically configured MAC addresses and
corresponding VLANs in the bridge domain
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_mac_table_openconfig_network_instance__network_instances_network_instance_fdb_mac_table, is_container='container', yang_name="mac-table", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_table must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_mac_table_openconfig_network_instance__network_instances_network_instance_fdb_mac_table, is_container='container', yang_name="mac-table", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

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

  def _unset_mac_table(self):
    self.__mac_table = YANGDynClass(base=yc_mac_table_openconfig_network_instance__network_instances_network_instance_fdb_mac_table, is_container='container', yang_name="mac-table", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_mac_mobility(self):
    """
    Getter method for mac_mobility, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility (container)

    YANG Description: Top grouping the configuration and state data related to mac
mobility.
    """
    return self.__mac_mobility
      
  def _set_mac_mobility(self, v, load=False):
    """
    Setter method for mac_mobility, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_mobility is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_mobility() directly.

    YANG Description: Top grouping the configuration and state data related to mac
mobility.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_mac_mobility_openconfig_network_instance__network_instances_network_instance_fdb_mac_mobility, is_container='container', yang_name="mac-mobility", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_mobility must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_mac_mobility_openconfig_network_instance__network_instances_network_instance_fdb_mac_mobility, is_container='container', yang_name="mac-mobility", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

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

  def _unset_mac_mobility(self):
    self.__mac_mobility = YANGDynClass(base=yc_mac_mobility_openconfig_network_instance__network_instances_network_instance_fdb_mac_mobility, is_container='container', yang_name="mac-mobility", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_arp_proxy(self):
    """
    Getter method for arp_proxy, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy (container)

    YANG Description: Top Container related to ARP-Proxy
    """
    return self.__arp_proxy
      
  def _set_arp_proxy(self, v, load=False):
    """
    Setter method for arp_proxy, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_arp_proxy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_arp_proxy() directly.

    YANG Description: Top Container related to ARP-Proxy
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_arp_proxy_openconfig_network_instance__network_instances_network_instance_fdb_arp_proxy, is_container='container', yang_name="arp-proxy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """arp_proxy must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_arp_proxy_openconfig_network_instance__network_instances_network_instance_fdb_arp_proxy, is_container='container', yang_name="arp-proxy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

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

  def _unset_arp_proxy(self):
    self.__arp_proxy = YANGDynClass(base=yc_arp_proxy_openconfig_network_instance__network_instances_network_instance_fdb_arp_proxy, is_container='container', yang_name="arp-proxy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_nd_proxy(self):
    """
    Getter method for nd_proxy, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy (container)

    YANG Description: Top Container related to ND-Proxy.
    """
    return self.__nd_proxy
      
  def _set_nd_proxy(self, v, load=False):
    """
    Setter method for nd_proxy, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_nd_proxy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_nd_proxy() directly.

    YANG Description: Top Container related to ND-Proxy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_nd_proxy_openconfig_network_instance__network_instances_network_instance_fdb_nd_proxy, is_container='container', yang_name="nd-proxy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """nd_proxy must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_nd_proxy_openconfig_network_instance__network_instances_network_instance_fdb_nd_proxy, is_container='container', yang_name="nd-proxy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

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

  def _unset_nd_proxy(self):
    self.__nd_proxy = YANGDynClass(base=yc_nd_proxy_openconfig_network_instance__network_instances_network_instance_fdb_nd_proxy, is_container='container', yang_name="nd-proxy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_l2rib(self):
    """
    Getter method for l2rib, mapped from YANG variable /network_instances/network_instance/fdb/l2rib (container)

    YANG Description: Operational state container for MAC address and MAC-IP address
information that is learned and installed into the MAC VRF Layer 2
Routing Information Base (L2RIB)
    """
    return self.__l2rib
      
  def _set_l2rib(self, v, load=False):
    """
    Setter method for l2rib, mapped from YANG variable /network_instances/network_instance/fdb/l2rib (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_l2rib is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_l2rib() directly.

    YANG Description: Operational state container for MAC address and MAC-IP address
information that is learned and installed into the MAC VRF Layer 2
Routing Information Base (L2RIB)
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_l2rib_openconfig_network_instance__network_instances_network_instance_fdb_l2rib, is_container='container', yang_name="l2rib", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """l2rib must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_l2rib_openconfig_network_instance__network_instances_network_instance_fdb_l2rib, is_container='container', yang_name="l2rib", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

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

  def _unset_l2rib(self):
    self.__l2rib = YANGDynClass(base=yc_l2rib_openconfig_network_instance__network_instances_network_instance_fdb_l2rib, is_container='container', yang_name="l2rib", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  mac_table = __builtin__.property(_get_mac_table, _set_mac_table)
  mac_mobility = __builtin__.property(_get_mac_mobility, _set_mac_mobility)
  arp_proxy = __builtin__.property(_get_arp_proxy, _set_arp_proxy)
  nd_proxy = __builtin__.property(_get_nd_proxy, _set_nd_proxy)
  l2rib = __builtin__.property(_get_l2rib, _set_l2rib)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('mac_table', mac_table), ('mac_mobility', mac_mobility), ('arp_proxy', arp_proxy), ('nd_proxy', nd_proxy), ('l2rib', l2rib), ])


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

  YANG Description: EVPN Configuration parameters for
the participation in an EVPN Intance.
  """
  __slots__ = ('_path_helper', '_extmethods', '__evi','__encapsulation_type','__service_type','__multicast_group','__multicast_mask','__replication_mode','__route_distinguisher',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__evi = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__encapsulation_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="encapsulation-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__service_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'VLAN_BASED': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_BASED': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'VLAN_BUNDLE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_BUNDLE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'VLAN_AWARE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_AWARE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}},), is_leaf=True, yang_name="service-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__multicast_group = 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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    self.__multicast_mask = 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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    self.__replication_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STATIC_INGRESS_REPLICATION': {}, 'BGP': {}, 'MULTICAST': {}},), is_leaf=True, yang_name="replication-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)
    self.__route_distinguisher = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)

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

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'evpn', 'evpn-instances', 'evpn-instance', 'config']

  def _get_evi(self):
    """
    Getter method for evi, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/config/evi (string)

    YANG Description: EVPN Instance (EVI) identifier
    """
    return self.__evi
      
  def _set_evi(self, v, load=False):
    """
    Setter method for evi, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/config/evi (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_evi is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_evi() directly.

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

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

  def _unset_evi(self):
    self.__evi = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_encapsulation_type(self):
    """
    Getter method for encapsulation_type, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/config/encapsulation_type (identityref)

    YANG Description: The on-the-wire encapsulation that should be used when
exchanging traffic from this network instance to/from
destinations belonging to the EVI. The use of MPLS or
VXLAN is selected using this container.
    """
    return self.__encapsulation_type
      
  def _set_encapsulation_type(self, v, load=False):
    """
    Setter method for encapsulation_type, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/config/encapsulation_type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_encapsulation_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_encapsulation_type() directly.

    YANG Description: The on-the-wire encapsulation that should be used when
exchanging traffic from this network instance to/from
destinations belonging to the EVI. The use of MPLS or
VXLAN is selected using this container.
    """
    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={'MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="encapsulation-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """encapsulation_type must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="encapsulation-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

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

  def _unset_encapsulation_type(self):
    self.__encapsulation_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="encapsulation-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_service_type(self):
    """
    Getter method for service_type, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/config/service_type (identityref)

    YANG Description: Specifies the type of EVPN that is being created according
to the values in the EVPN_TYPES identity.
The options are VLAN-based, VLAN-Bundle or VLAN-aware.
VLAN-Based services consists of an EVPN instance of only a
single broadcast domain, the proper network-instance type used
for this kind of services is L2VSI.
    """
    return self.__service_type
      
  def _set_service_type(self, v, load=False):
    """
    Setter method for service_type, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/config/service_type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_service_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_service_type() directly.

    YANG Description: Specifies the type of EVPN that is being created according
to the values in the EVPN_TYPES identity.
The options are VLAN-based, VLAN-Bundle or VLAN-aware.
VLAN-Based services consists of an EVPN instance of only a
single broadcast domain, the proper network-instance type used
for this kind of services is L2VSI.
    """
    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={'VLAN_BASED': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_BASED': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'VLAN_BUNDLE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_BUNDLE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'VLAN_AWARE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_AWARE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}},), is_leaf=True, yang_name="service-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """service_type must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'VLAN_BASED': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_BASED': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'VLAN_BUNDLE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_BUNDLE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'VLAN_AWARE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_AWARE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}},), is_leaf=True, yang_name="service-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

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

  def _unset_service_type(self):
    self.__service_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'VLAN_BASED': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_BASED': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'VLAN_BUNDLE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_BUNDLE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'VLAN_AWARE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_AWARE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}},), is_leaf=True, yang_name="service-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_multicast_group(self):
    """
    Getter method for multicast_group, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/config/multicast_group (oc-inet:ip-address)

    YANG Description: Multicast group address for BUM traffic
    """
    return self.__multicast_group
      
  def _set_multicast_group(self, v, load=False):
    """
    Setter method for multicast_group, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/config/multicast_group (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_group() directly.

    YANG Description: Multicast group address for BUM traffic
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_group must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)""",
        })

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

  def _unset_multicast_group(self):
    self.__multicast_group = 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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)


  def _get_multicast_mask(self):
    """
    Getter method for multicast_mask, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/config/multicast_mask (oc-inet:ip-address)

    YANG Description: Multicast group address mask
    """
    return self.__multicast_mask
      
  def _set_multicast_mask(self, v, load=False):
    """
    Setter method for multicast_mask, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/config/multicast_mask (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_mask is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_mask() directly.

    YANG Description: Multicast group 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-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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_mask must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)""",
        })

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

  def _unset_multicast_mask(self):
    self.__multicast_mask = 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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)


  def _get_replication_mode(self):
    """
    Getter method for replication_mode, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/config/replication_mode (enumeration)

    YANG Description: Replication mode to handle BUM traffic
    """
    return self.__replication_mode
      
  def _set_replication_mode(self, v, load=False):
    """
    Setter method for replication_mode, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/config/replication_mode (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_replication_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_replication_mode() directly.

    YANG Description: Replication mode to handle BUM traffic
    """
    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_INGRESS_REPLICATION': {}, 'BGP': {}, 'MULTICAST': {}},), is_leaf=True, yang_name="replication-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """replication_mode must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STATIC_INGRESS_REPLICATION': {}, 'BGP': {}, 'MULTICAST': {}},), is_leaf=True, yang_name="replication-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)""",
        })

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

  def _unset_replication_mode(self):
    self.__replication_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STATIC_INGRESS_REPLICATION': {}, 'BGP': {}, 'MULTICAST': {}},), is_leaf=True, yang_name="replication-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)


  def _get_route_distinguisher(self):
    """
    Getter method for route_distinguisher, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/config/route_distinguisher (union)

    YANG Description: Route Distinguisher (RD) associated to the EVPN-instance.
An RD MUST be assigned for a given EVPN-instance on a PE.
This RD MUST be unique across all EVPN-instances on a PE.
The route-distinguisher at this level overrides
the route-distinguisher value defined under
network-instance/config.
    """
    return self.__route_distinguisher
      
  def _set_route_distinguisher(self, v, load=False):
    """
    Setter method for route_distinguisher, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/config/route_distinguisher (union)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route_distinguisher is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route_distinguisher() directly.

    YANG Description: Route Distinguisher (RD) associated to the EVPN-instance.
An RD MUST be assigned for a given EVPN-instance on a PE.
This RD MUST be unique across all EVPN-instances on a PE.
The route-distinguisher at this level overrides
the route-distinguisher value defined under
network-instance/config.
    """
    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,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route_distinguisher must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)""",
        })

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

  def _unset_route_distinguisher(self):
    self.__route_distinguisher = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)

  evi = __builtin__.property(_get_evi, _set_evi)
  encapsulation_type = __builtin__.property(_get_encapsulation_type, _set_encapsulation_type)
  service_type = __builtin__.property(_get_service_type, _set_service_type)
  multicast_group = __builtin__.property(_get_multicast_group, _set_multicast_group)
  multicast_mask = __builtin__.property(_get_multicast_mask, _set_multicast_mask)
  replication_mode = __builtin__.property(_get_replication_mode, _set_replication_mode)
  route_distinguisher = __builtin__.property(_get_route_distinguisher, _set_route_distinguisher)


  _pyangbind_elements = OrderedDict([('evi', evi), ('encapsulation_type', encapsulation_type), ('service_type', service_type), ('multicast_group', multicast_group), ('multicast_mask', multicast_mask), ('replication_mode', replication_mode), ('route_distinguisher', route_distinguisher), ])


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

  YANG Description: EVPN State parameters for
the participation in an EVPN Intance.
  """
  __slots__ = ('_path_helper', '_extmethods', '__evi','__encapsulation_type','__service_type','__multicast_group','__multicast_mask','__replication_mode','__route_distinguisher',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__evi = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__encapsulation_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="encapsulation-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__service_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'VLAN_BASED': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_BASED': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'VLAN_BUNDLE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_BUNDLE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'VLAN_AWARE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_AWARE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}},), is_leaf=True, yang_name="service-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__multicast_group = 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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__multicast_mask = 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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__replication_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STATIC_INGRESS_REPLICATION': {}, 'BGP': {}, 'MULTICAST': {}},), is_leaf=True, yang_name="replication-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__route_distinguisher = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', 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 ['network-instances', 'network-instance', 'evpn', 'evpn-instances', 'evpn-instance', 'state']

  def _get_evi(self):
    """
    Getter method for evi, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/state/evi (string)

    YANG Description: EVPN Instance (EVI) identifier
    """
    return self.__evi
      
  def _set_evi(self, v, load=False):
    """
    Setter method for evi, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/state/evi (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_evi is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_evi() directly.

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

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

  def _unset_evi(self):
    self.__evi = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_encapsulation_type(self):
    """
    Getter method for encapsulation_type, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/state/encapsulation_type (identityref)

    YANG Description: The on-the-wire encapsulation that should be used when
exchanging traffic from this network instance to/from
destinations belonging to the EVI. The use of MPLS or
VXLAN is selected using this container.
    """
    return self.__encapsulation_type
      
  def _set_encapsulation_type(self, v, load=False):
    """
    Setter method for encapsulation_type, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/state/encapsulation_type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_encapsulation_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_encapsulation_type() directly.

    YANG Description: The on-the-wire encapsulation that should be used when
exchanging traffic from this network instance to/from
destinations belonging to the EVI. The use of MPLS or
VXLAN is selected using this container.
    """
    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={'MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="encapsulation-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """encapsulation_type must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="encapsulation-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

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

  def _unset_encapsulation_type(self):
    self.__encapsulation_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="encapsulation-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_service_type(self):
    """
    Getter method for service_type, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/state/service_type (identityref)

    YANG Description: Specifies the type of EVPN that is being created according
to the values in the EVPN_TYPES identity.
The options are VLAN-based, VLAN-Bundle or VLAN-aware.
VLAN-Based services consists of an EVPN instance of only a
single broadcast domain, the proper network-instance type used
for this kind of services is L2VSI.
    """
    return self.__service_type
      
  def _set_service_type(self, v, load=False):
    """
    Setter method for service_type, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/state/service_type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_service_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_service_type() directly.

    YANG Description: Specifies the type of EVPN that is being created according
to the values in the EVPN_TYPES identity.
The options are VLAN-based, VLAN-Bundle or VLAN-aware.
VLAN-Based services consists of an EVPN instance of only a
single broadcast domain, the proper network-instance type used
for this kind of services is L2VSI.
    """
    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={'VLAN_BASED': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_BASED': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'VLAN_BUNDLE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_BUNDLE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'VLAN_AWARE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_AWARE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}},), is_leaf=True, yang_name="service-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """service_type must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'VLAN_BASED': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_BASED': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'VLAN_BUNDLE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_BUNDLE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'VLAN_AWARE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_AWARE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}},), is_leaf=True, yang_name="service-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

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

  def _unset_service_type(self):
    self.__service_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'VLAN_BASED': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_BASED': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'VLAN_BUNDLE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_BUNDLE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'VLAN_AWARE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_AWARE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}},), is_leaf=True, yang_name="service-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_multicast_group(self):
    """
    Getter method for multicast_group, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/state/multicast_group (oc-inet:ip-address)

    YANG Description: Multicast group address for BUM traffic
    """
    return self.__multicast_group
      
  def _set_multicast_group(self, v, load=False):
    """
    Setter method for multicast_group, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/state/multicast_group (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_group() directly.

    YANG Description: Multicast group address for BUM traffic
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_group must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

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

  def _unset_multicast_group(self):
    self.__multicast_group = 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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_multicast_mask(self):
    """
    Getter method for multicast_mask, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/state/multicast_mask (oc-inet:ip-address)

    YANG Description: Multicast group address mask
    """
    return self.__multicast_mask
      
  def _set_multicast_mask(self, v, load=False):
    """
    Setter method for multicast_mask, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/state/multicast_mask (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_mask is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_mask() directly.

    YANG Description: Multicast group 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-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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_mask must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

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

  def _unset_multicast_mask(self):
    self.__multicast_mask = 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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_replication_mode(self):
    """
    Getter method for replication_mode, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/state/replication_mode (enumeration)

    YANG Description: Replication mode to handle BUM traffic
    """
    return self.__replication_mode
      
  def _set_replication_mode(self, v, load=False):
    """
    Setter method for replication_mode, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/state/replication_mode (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_replication_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_replication_mode() directly.

    YANG Description: Replication mode to handle BUM traffic
    """
    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_INGRESS_REPLICATION': {}, 'BGP': {}, 'MULTICAST': {}},), is_leaf=True, yang_name="replication-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """replication_mode must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STATIC_INGRESS_REPLICATION': {}, 'BGP': {}, 'MULTICAST': {}},), is_leaf=True, yang_name="replication-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

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

  def _unset_replication_mode(self):
    self.__replication_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STATIC_INGRESS_REPLICATION': {}, 'BGP': {}, 'MULTICAST': {}},), is_leaf=True, yang_name="replication-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_route_distinguisher(self):
    """
    Getter method for route_distinguisher, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/state/route_distinguisher (union)

    YANG Description: Route Distinguisher (RD) associated to the EVPN-instance.
An RD MUST be assigned for a given EVPN-instance on a PE.
This RD MUST be unique across all EVPN-instances on a PE.
The route-distinguisher at this level overrides
the route-distinguisher value defined under
network-instance/config.
    """
    return self.__route_distinguisher
      
  def _set_route_distinguisher(self, v, load=False):
    """
    Setter method for route_distinguisher, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/state/route_distinguisher (union)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route_distinguisher is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route_distinguisher() directly.

    YANG Description: Route Distinguisher (RD) associated to the EVPN-instance.
An RD MUST be assigned for a given EVPN-instance on a PE.
This RD MUST be unique across all EVPN-instances on a PE.
The route-distinguisher at this level overrides
the route-distinguisher value defined under
network-instance/config.
    """
    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,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route_distinguisher must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)""",
        })

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

  def _unset_route_distinguisher(self):
    self.__route_distinguisher = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)

  evi = __builtin__.property(_get_evi)
  encapsulation_type = __builtin__.property(_get_encapsulation_type)
  service_type = __builtin__.property(_get_service_type)
  multicast_group = __builtin__.property(_get_multicast_group)
  multicast_mask = __builtin__.property(_get_multicast_mask)
  replication_mode = __builtin__.property(_get_replication_mode)
  route_distinguisher = __builtin__.property(_get_route_distinguisher)


  _pyangbind_elements = OrderedDict([('evi', evi), ('encapsulation_type', encapsulation_type), ('service_type', service_type), ('multicast_group', multicast_group), ('multicast_mask', multicast_mask), ('replication_mode', replication_mode), ('route_distinguisher', route_distinguisher), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_import_export_policy_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/evpn/evpn-instances/evpn-instance/import-export-policy/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters to set the import and export policies
associated with a EVI
  """
  __slots__ = ('_path_helper', '_extmethods', '__export_route_target','__import_route_target',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__export_route_target = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="export-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)
    self.__import_route_target = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="import-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)

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

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'evpn', 'evpn-instances', 'evpn-instance', 'import-export-policy', 'config']

  def _get_export_route_target(self):
    """
    Getter method for export_route_target, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/import_export_policy/config/export_route_target (union)

    YANG Description: Export Route Target (RT) in the network-instance on a PE.
    """
    return self.__export_route_target
      
  def _set_export_route_target(self, v, load=False):
    """
    Setter method for export_route_target, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/import_export_policy/config/export_route_target (union)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_export_route_target is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_export_route_target() directly.

    YANG Description: Export Route Target (RT) in the network-instance on a PE.
    """
    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_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="export-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """export_route_target must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="export-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)""",
        })

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

  def _unset_export_route_target(self):
    self.__export_route_target = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="export-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)


  def _get_import_route_target(self):
    """
    Getter method for import_route_target, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/import_export_policy/config/import_route_target (union)

    YANG Description: Import Route Target (RT) in the network-instance on a PE.
    """
    return self.__import_route_target
      
  def _set_import_route_target(self, v, load=False):
    """
    Setter method for import_route_target, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/import_export_policy/config/import_route_target (union)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_import_route_target is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_import_route_target() directly.

    YANG Description: Import Route Target (RT) in the network-instance on a PE.
    """
    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_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="import-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """import_route_target must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="import-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)""",
        })

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

  def _unset_import_route_target(self):
    self.__import_route_target = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="import-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)

  export_route_target = __builtin__.property(_get_export_route_target, _set_export_route_target)
  import_route_target = __builtin__.property(_get_import_route_target, _set_import_route_target)


  _pyangbind_elements = OrderedDict([('export_route_target', export_route_target), ('import_route_target', import_route_target), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_import_export_policy_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/evpn/evpn-instances/evpn-instance/import-export-policy/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of the import and export policies
associated with a EVI
  """
  __slots__ = ('_path_helper', '_extmethods', '__export_route_target','__import_route_target',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__export_route_target = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="export-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    self.__import_route_target = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="import-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', 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 ['network-instances', 'network-instance', 'evpn', 'evpn-instances', 'evpn-instance', 'import-export-policy', 'state']

  def _get_export_route_target(self):
    """
    Getter method for export_route_target, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/import_export_policy/state/export_route_target (union)

    YANG Description: Export Route Target (RT) in the network-instance on a PE.
    """
    return self.__export_route_target
      
  def _set_export_route_target(self, v, load=False):
    """
    Setter method for export_route_target, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/import_export_policy/state/export_route_target (union)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_export_route_target is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_export_route_target() directly.

    YANG Description: Export Route Target (RT) in the network-instance on a PE.
    """
    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_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="export-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """export_route_target must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="export-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)""",
        })

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

  def _unset_export_route_target(self):
    self.__export_route_target = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="export-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)


  def _get_import_route_target(self):
    """
    Getter method for import_route_target, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/import_export_policy/state/import_route_target (union)

    YANG Description: Import Route Target (RT) in the network-instance on a PE.
    """
    return self.__import_route_target
      
  def _set_import_route_target(self, v, load=False):
    """
    Setter method for import_route_target, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/import_export_policy/state/import_route_target (union)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_import_route_target is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_import_route_target() directly.

    YANG Description: Import Route Target (RT) in the network-instance on a PE.
    """
    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_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="import-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """import_route_target must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="import-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)""",
        })

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

  def _unset_import_route_target(self):
    self.__import_route_target = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="import-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)

  export_route_target = __builtin__.property(_get_export_route_target)
  import_route_target = __builtin__.property(_get_import_route_target)


  _pyangbind_elements = OrderedDict([('export_route_target', export_route_target), ('import_route_target', import_route_target), ])


class yc_import_export_policy_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_import_export_policy(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/evpn/evpn-instances/evpn-instance/import-export-policy. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top container to set the import and export policies
associated with a EVI
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'import-export-policy'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_import_export_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_import_export_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn', 'evpn-instances', 'evpn-instance', 'import-export-policy']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/import_export_policy/config (container)

    YANG Description: Configuration parameters to set the import and export policies
associated with a EVI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/import_export_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 to set the import and export policies
associated with a EVI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_import_export_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_import_export_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_import_export_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/import_export_policy/state (container)

    YANG Description: State parameters of the import and export policies
associated with a EVI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/import_export_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: State parameters of the import and export policies
associated with a EVI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_import_export_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_import_export_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_import_export_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/evpn/evpn-instances/evpn-instance/vxlan/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data related to Overlay Solution in EVPN.
  """
  __slots__ = ('_path_helper', '_extmethods', '__vni','__overlay_endpoint_network_instance','__overlay_endpoint','__host_reachability_bgp','__multicast_group','__multicast_mask',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__vni = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:vni-id', is_config=True)
    self.__overlay_endpoint_network_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="overlay-endpoint-network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__overlay_endpoint = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="overlay-endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__host_reachability_bgp = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="host-reachability-bgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__multicast_group = 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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    self.__multicast_mask = 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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)

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

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'evpn', 'evpn-instances', 'evpn-instance', 'vxlan', 'config']

  def _get_vni(self):
    """
    Getter method for vni, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/config/vni (oc-evpn-types:vni-id)

    YANG Description: Virtual Network Identifier (VNI) associated to the EVI. This VNI is used for
ingress and egress in the VXLAN domain.
    """
    return self.__vni
      
  def _set_vni(self, v, load=False):
    """
    Setter method for vni, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/config/vni (oc-evpn-types:vni-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_vni is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_vni() directly.

    YANG Description: Virtual Network Identifier (VNI) associated to the EVI. This VNI is used for
ingress and egress in the VXLAN domain.
    """
    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': ['1..16777215']}), is_leaf=True, yang_name="vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:vni-id', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """vni must be of a type compatible with oc-evpn-types:vni-id""",
          'defined-type': "oc-evpn-types:vni-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:vni-id', is_config=True)""",
        })

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

  def _unset_vni(self):
    self.__vni = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:vni-id', is_config=True)


  def _get_overlay_endpoint_network_instance(self):
    """
    Getter method for overlay_endpoint_network_instance, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/config/overlay_endpoint_network_instance (leafref)

    YANG Description: The network instance to resolve the overlay-endpoint within.
    """
    return self.__overlay_endpoint_network_instance
      
  def _set_overlay_endpoint_network_instance(self, v, load=False):
    """
    Setter method for overlay_endpoint_network_instance, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/config/overlay_endpoint_network_instance (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_overlay_endpoint_network_instance is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_overlay_endpoint_network_instance() directly.

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

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

  def _unset_overlay_endpoint_network_instance(self):
    self.__overlay_endpoint_network_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="overlay-endpoint-network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_overlay_endpoint(self):
    """
    Getter method for overlay_endpoint, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/config/overlay_endpoint (leafref)

    YANG Description: Associate the EVI with an VXLAN Endpoint defined under connection
points. The network instance to resolve the overlay-endpoint within.
    """
    return self.__overlay_endpoint
      
  def _set_overlay_endpoint(self, v, load=False):
    """
    Setter method for overlay_endpoint, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/config/overlay_endpoint (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_overlay_endpoint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_overlay_endpoint() directly.

    YANG Description: Associate the EVI with an VXLAN Endpoint defined under connection
points. The network instance to resolve the overlay-endpoint within.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="overlay-endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """overlay_endpoint must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="overlay-endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_overlay_endpoint(self):
    self.__overlay_endpoint = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="overlay-endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_host_reachability_bgp(self):
    """
    Getter method for host_reachability_bgp, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/config/host_reachability_bgp (boolean)

    YANG Description: Enable or Disable the BGP control plane to be
used to exchange  updates from the NVE interface
    """
    return self.__host_reachability_bgp
      
  def _set_host_reachability_bgp(self, v, load=False):
    """
    Setter method for host_reachability_bgp, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/config/host_reachability_bgp (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_host_reachability_bgp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_host_reachability_bgp() directly.

    YANG Description: Enable or Disable the BGP control plane to be
used to exchange  updates from the NVE interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="host-reachability-bgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """host_reachability_bgp must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="host-reachability-bgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

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

  def _unset_host_reachability_bgp(self):
    self.__host_reachability_bgp = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="host-reachability-bgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_multicast_group(self):
    """
    Getter method for multicast_group, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/config/multicast_group (oc-inet:ip-address)

    YANG Description: Multicast group address for BUM traffic
    """
    return self.__multicast_group
      
  def _set_multicast_group(self, v, load=False):
    """
    Setter method for multicast_group, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/config/multicast_group (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_group() directly.

    YANG Description: Multicast group address for BUM traffic
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_group must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)""",
        })

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

  def _unset_multicast_group(self):
    self.__multicast_group = 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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)


  def _get_multicast_mask(self):
    """
    Getter method for multicast_mask, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/config/multicast_mask (oc-inet:ip-address)

    YANG Description: Multicast group address mask
    """
    return self.__multicast_mask
      
  def _set_multicast_mask(self, v, load=False):
    """
    Setter method for multicast_mask, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/config/multicast_mask (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_mask is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_mask() directly.

    YANG Description: Multicast group 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-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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_mask must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)""",
        })

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

  def _unset_multicast_mask(self):
    self.__multicast_mask = 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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)

  vni = __builtin__.property(_get_vni, _set_vni)
  overlay_endpoint_network_instance = __builtin__.property(_get_overlay_endpoint_network_instance, _set_overlay_endpoint_network_instance)
  overlay_endpoint = __builtin__.property(_get_overlay_endpoint, _set_overlay_endpoint)
  host_reachability_bgp = __builtin__.property(_get_host_reachability_bgp, _set_host_reachability_bgp)
  multicast_group = __builtin__.property(_get_multicast_group, _set_multicast_group)
  multicast_mask = __builtin__.property(_get_multicast_mask, _set_multicast_mask)


  _pyangbind_elements = OrderedDict([('vni', vni), ('overlay_endpoint_network_instance', overlay_endpoint_network_instance), ('overlay_endpoint', overlay_endpoint), ('host_reachability_bgp', host_reachability_bgp), ('multicast_group', multicast_group), ('multicast_mask', multicast_mask), ])


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

  YANG Description: State data related to Overlay Solution in EVPN.
  """
  __slots__ = ('_path_helper', '_extmethods', '__vni','__overlay_endpoint_network_instance','__overlay_endpoint','__host_reachability_bgp','__multicast_group','__multicast_mask',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__vni = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:vni-id', is_config=False)
    self.__overlay_endpoint_network_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="overlay-endpoint-network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__overlay_endpoint = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="overlay-endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__host_reachability_bgp = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="host-reachability-bgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__multicast_group = 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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__multicast_mask = 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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', 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 ['network-instances', 'network-instance', 'evpn', 'evpn-instances', 'evpn-instance', 'vxlan', 'state']

  def _get_vni(self):
    """
    Getter method for vni, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/state/vni (oc-evpn-types:vni-id)

    YANG Description: Virtual Network Identifier (VNI) associated to the EVI. This VNI is used for
ingress and egress in the VXLAN domain.
    """
    return self.__vni
      
  def _set_vni(self, v, load=False):
    """
    Setter method for vni, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/state/vni (oc-evpn-types:vni-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_vni is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_vni() directly.

    YANG Description: Virtual Network Identifier (VNI) associated to the EVI. This VNI is used for
ingress and egress in the VXLAN domain.
    """
    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': ['1..16777215']}), is_leaf=True, yang_name="vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:vni-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """vni must be of a type compatible with oc-evpn-types:vni-id""",
          'defined-type': "oc-evpn-types:vni-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:vni-id', is_config=False)""",
        })

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

  def _unset_vni(self):
    self.__vni = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:vni-id', is_config=False)


  def _get_overlay_endpoint_network_instance(self):
    """
    Getter method for overlay_endpoint_network_instance, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/state/overlay_endpoint_network_instance (leafref)

    YANG Description: The network instance to resolve the overlay-endpoint within.
    """
    return self.__overlay_endpoint_network_instance
      
  def _set_overlay_endpoint_network_instance(self, v, load=False):
    """
    Setter method for overlay_endpoint_network_instance, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/state/overlay_endpoint_network_instance (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_overlay_endpoint_network_instance is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_overlay_endpoint_network_instance() directly.

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

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

  def _unset_overlay_endpoint_network_instance(self):
    self.__overlay_endpoint_network_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="overlay-endpoint-network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_overlay_endpoint(self):
    """
    Getter method for overlay_endpoint, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/state/overlay_endpoint (leafref)

    YANG Description: Associate the EVI with an VXLAN Endpoint defined under connection
points. The network instance to resolve the overlay-endpoint within.
    """
    return self.__overlay_endpoint
      
  def _set_overlay_endpoint(self, v, load=False):
    """
    Setter method for overlay_endpoint, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/state/overlay_endpoint (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_overlay_endpoint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_overlay_endpoint() directly.

    YANG Description: Associate the EVI with an VXLAN Endpoint defined under connection
points. The network instance to resolve the overlay-endpoint within.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="overlay-endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """overlay_endpoint must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="overlay-endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_overlay_endpoint(self):
    self.__overlay_endpoint = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="overlay-endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_host_reachability_bgp(self):
    """
    Getter method for host_reachability_bgp, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/state/host_reachability_bgp (boolean)

    YANG Description: Enable or Disable the BGP control plane to be
used to exchange  updates from the NVE interface
    """
    return self.__host_reachability_bgp
      
  def _set_host_reachability_bgp(self, v, load=False):
    """
    Setter method for host_reachability_bgp, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/state/host_reachability_bgp (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_host_reachability_bgp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_host_reachability_bgp() directly.

    YANG Description: Enable or Disable the BGP control plane to be
used to exchange  updates from the NVE interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="host-reachability-bgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """host_reachability_bgp must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="host-reachability-bgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

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

  def _unset_host_reachability_bgp(self):
    self.__host_reachability_bgp = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="host-reachability-bgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_multicast_group(self):
    """
    Getter method for multicast_group, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/state/multicast_group (oc-inet:ip-address)

    YANG Description: Multicast group address for BUM traffic
    """
    return self.__multicast_group
      
  def _set_multicast_group(self, v, load=False):
    """
    Setter method for multicast_group, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/state/multicast_group (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_group() directly.

    YANG Description: Multicast group address for BUM traffic
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_group must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

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

  def _unset_multicast_group(self):
    self.__multicast_group = 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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_multicast_mask(self):
    """
    Getter method for multicast_mask, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/state/multicast_mask (oc-inet:ip-address)

    YANG Description: Multicast group address mask
    """
    return self.__multicast_mask
      
  def _set_multicast_mask(self, v, load=False):
    """
    Setter method for multicast_mask, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/state/multicast_mask (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_mask is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_mask() directly.

    YANG Description: Multicast group 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-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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_mask must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

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

  def _unset_multicast_mask(self):
    self.__multicast_mask = 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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)

  vni = __builtin__.property(_get_vni)
  overlay_endpoint_network_instance = __builtin__.property(_get_overlay_endpoint_network_instance)
  overlay_endpoint = __builtin__.property(_get_overlay_endpoint)
  host_reachability_bgp = __builtin__.property(_get_host_reachability_bgp)
  multicast_group = __builtin__.property(_get_multicast_group)
  multicast_mask = __builtin__.property(_get_multicast_mask)


  _pyangbind_elements = OrderedDict([('vni', vni), ('overlay_endpoint_network_instance', overlay_endpoint_network_instance), ('overlay_endpoint', overlay_endpoint), ('host_reachability_bgp', host_reachability_bgp), ('multicast_group', multicast_group), ('multicast_mask', multicast_mask), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_anycast_source_interface_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/evpn/evpn-instances/evpn-instance/vxlan/anycast-source-interface/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Anycast source interface configuration references
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface','__subinterface',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn', 'evpn-instances', 'evpn-instance', 'vxlan', 'anycast-source-interface', 'config']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/anycast_source_interface/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 /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/anycast_source_interface/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/anycast_source_interface/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 /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/anycast_source_interface/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_anycast_source_interface_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/evpn/evpn-instances/evpn-instance/vxlan/anycast-source-interface/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Anycast source interface state references
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface','__subinterface',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn', 'evpn-instances', 'evpn-instance', 'vxlan', 'anycast-source-interface', 'state']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/anycast_source_interface/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 /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/anycast_source_interface/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/anycast_source_interface/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 /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/anycast_source_interface/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_anycast_source_interface_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_anycast_source_interface(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/evpn/evpn-instances/evpn-instance/vxlan/anycast-source-interface. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Anycast source interface references
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'anycast-source-interface'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_anycast_source_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_anycast_source_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn', 'evpn-instances', 'evpn-instance', 'vxlan', 'anycast-source-interface']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/anycast_source_interface/config (container)

    YANG Description: Anycast source interface configuration references
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/anycast_source_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: Anycast source interface configuration references
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_anycast_source_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_anycast_source_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_anycast_source_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/anycast_source_interface/state (container)

    YANG Description: Anycast source interface state references
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/anycast_source_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: Anycast source interface state references
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_anycast_source_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_anycast_source_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_anycast_source_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/network-instance', defining_module='openconfig-network-instance', 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_vxlan_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/evpn/evpn-instances/evpn-instance/vxlan. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top container related to Overlay Solution in EVPN.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__anycast_source_interface',)

  _yang_name = 'vxlan'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__anycast_source_interface = YANGDynClass(base=yc_anycast_source_interface_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_anycast_source_interface, is_container='container', yang_name="anycast-source-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn', 'evpn-instances', 'evpn-instance', 'vxlan']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/config (container)

    YANG Description: Configuration data related to Overlay Solution in EVPN.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/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 related to Overlay Solution in EVPN.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/state (container)

    YANG Description: State data related to Overlay Solution in EVPN.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/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 related to Overlay Solution in EVPN.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_anycast_source_interface(self):
    """
    Getter method for anycast_source_interface, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/anycast_source_interface (container)

    YANG Description: Anycast source interface references
    """
    return self.__anycast_source_interface
      
  def _set_anycast_source_interface(self, v, load=False):
    """
    Setter method for anycast_source_interface, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/anycast_source_interface (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_anycast_source_interface is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_anycast_source_interface() directly.

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

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

  def _unset_anycast_source_interface(self):
    self.__anycast_source_interface = YANGDynClass(base=yc_anycast_source_interface_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_anycast_source_interface, is_container='container', yang_name="anycast-source-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

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


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


class yc_config_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/evpn/evpn-instances/evpn-instance/pbb/b-component/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration variables for the b-components.
  """
  __slots__ = ('_path_helper', '_extmethods', '__b_component_name','__backbone_src_mac',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__b_component_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="b-component-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__backbone_src_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="backbone-src-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=True)

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

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'evpn', 'evpn-instances', 'evpn-instance', 'pbb', 'b-component', 'config']

  def _get_b_component_name(self):
    """
    Getter method for b_component_name, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/config/b_component_name (string)

    YANG Description: Type of the associated b-component
    """
    return self.__b_component_name
      
  def _set_b_component_name(self, v, load=False):
    """
    Setter method for b_component_name, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/config/b_component_name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_b_component_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_b_component_name() directly.

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

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

  def _unset_b_component_name(self):
    self.__b_component_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="b-component-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_backbone_src_mac(self):
    """
    Getter method for backbone_src_mac, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/config/backbone_src_mac (oc-yang:mac-address)

    YANG Description: EVPN will run independently in both components,
the I-component MAC-VRF and B-component MAC-VRF.
The backbone-src-mac assigns the b-component MAC.
    """
    return self.__backbone_src_mac
      
  def _set_backbone_src_mac(self, v, load=False):
    """
    Setter method for backbone_src_mac, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/config/backbone_src_mac (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_backbone_src_mac is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_backbone_src_mac() directly.

    YANG Description: EVPN will run independently in both components,
the I-component MAC-VRF and B-component MAC-VRF.
The backbone-src-mac assigns the b-component MAC.
    """
    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="backbone-src-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """backbone_src_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="backbone-src-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=True)""",
        })

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

  def _unset_backbone_src_mac(self):
    self.__backbone_src_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="backbone-src-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=True)

  b_component_name = __builtin__.property(_get_b_component_name, _set_b_component_name)
  backbone_src_mac = __builtin__.property(_get_backbone_src_mac, _set_backbone_src_mac)


  _pyangbind_elements = OrderedDict([('b_component_name', b_component_name), ('backbone_src_mac', backbone_src_mac), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/evpn/evpn-instances/evpn-instance/pbb/b-component/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State variables for the b-components.
  """
  __slots__ = ('_path_helper', '_extmethods', '__b_component_name','__backbone_src_mac',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__b_component_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="b-component-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__backbone_src_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="backbone-src-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', 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 ['network-instances', 'network-instance', 'evpn', 'evpn-instances', 'evpn-instance', 'pbb', 'b-component', 'state']

  def _get_b_component_name(self):
    """
    Getter method for b_component_name, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/state/b_component_name (string)

    YANG Description: Type of the associated b-component
    """
    return self.__b_component_name
      
  def _set_b_component_name(self, v, load=False):
    """
    Setter method for b_component_name, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/state/b_component_name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_b_component_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_b_component_name() directly.

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

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

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


  def _get_backbone_src_mac(self):
    """
    Getter method for backbone_src_mac, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/state/backbone_src_mac (oc-yang:mac-address)

    YANG Description: EVPN will run independently in both components,
the I-component MAC-VRF and B-component MAC-VRF.
The backbone-src-mac assigns the b-component MAC.
    """
    return self.__backbone_src_mac
      
  def _set_backbone_src_mac(self, v, load=False):
    """
    Setter method for backbone_src_mac, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/state/backbone_src_mac (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_backbone_src_mac is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_backbone_src_mac() directly.

    YANG Description: EVPN will run independently in both components,
the I-component MAC-VRF and B-component MAC-VRF.
The backbone-src-mac assigns the b-component MAC.
    """
    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="backbone-src-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """backbone_src_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="backbone-src-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)""",
        })

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

  def _unset_backbone_src_mac(self):
    self.__backbone_src_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="backbone-src-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)

  b_component_name = __builtin__.property(_get_b_component_name)
  backbone_src_mac = __builtin__.property(_get_backbone_src_mac)


  _pyangbind_elements = OrderedDict([('b_component_name', b_component_name), ('backbone_src_mac', backbone_src_mac), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_i_components_i_component_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/evpn/evpn-instances/evpn-instance/pbb/b-component/i-components/i-component/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration variables for the i-sid
  """
  __slots__ = ('_path_helper', '_extmethods', '__i_sid',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__i_sid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..16777215']}), is_leaf=True, yang_name="i-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn', 'evpn-instances', 'evpn-instance', 'pbb', 'b-component', 'i-components', 'i-component', 'config']

  def _get_i_sid(self):
    """
    Getter method for i_sid, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/i_components/i_component/config/i_sid (uint32)

    YANG Description: Service Instance Identifier 24 bits and global within a PBB
network. I-SID defines the service instance that the frame should be
mapped to.
    """
    return self.__i_sid
      
  def _set_i_sid(self, v, load=False):
    """
    Setter method for i_sid, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/i_components/i_component/config/i_sid (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_i_sid is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_i_sid() directly.

    YANG Description: Service Instance Identifier 24 bits and global within a PBB
network. I-SID defines the service instance that the frame should be
mapped to.
    """
    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..16777215']}), is_leaf=True, yang_name="i-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """i_sid must be of a type compatible with uint32""",
          'defined-type': "uint32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..16777215']}), is_leaf=True, yang_name="i-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

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

  def _unset_i_sid(self):
    self.__i_sid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..16777215']}), is_leaf=True, yang_name="i-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)

  i_sid = __builtin__.property(_get_i_sid, _set_i_sid)


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


class yc_state_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_i_components_i_component_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/evpn/evpn-instances/evpn-instance/pbb/b-component/i-components/i-component/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State variables for the i-sid
  """
  __slots__ = ('_path_helper', '_extmethods', '__i_sid',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__i_sid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..16777215']}), is_leaf=True, yang_name="i-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn', 'evpn-instances', 'evpn-instance', 'pbb', 'b-component', 'i-components', 'i-component', 'state']

  def _get_i_sid(self):
    """
    Getter method for i_sid, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/i_components/i_component/state/i_sid (uint32)

    YANG Description: Service Instance Identifier 24 bits and global within a PBB
network. I-SID defines the service instance that the frame should be
mapped to.
    """
    return self.__i_sid
      
  def _set_i_sid(self, v, load=False):
    """
    Setter method for i_sid, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/i_components/i_component/state/i_sid (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_i_sid is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_i_sid() directly.

    YANG Description: Service Instance Identifier 24 bits and global within a PBB
network. I-SID defines the service instance that the frame should be
mapped to.
    """
    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..16777215']}), is_leaf=True, yang_name="i-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """i_sid must be of a type compatible with uint32""",
          'defined-type': "uint32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..16777215']}), is_leaf=True, yang_name="i-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

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

  def _unset_i_sid(self):
    self.__i_sid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..16777215']}), is_leaf=True, yang_name="i-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  i_sid = __builtin__.property(_get_i_sid)


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


class yc_i_component_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_i_components_i_component(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/evpn/evpn-instances/evpn-instance/pbb/b-component/i-components/i-component. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: list of i-components
  """
  __slots__ = ('_path_helper', '_extmethods', '__i_sid','__config','__state',)

  _yang_name = 'i-component'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__i_sid = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="i-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_i_components_i_component_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_i_components_i_component_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn', 'evpn-instances', 'evpn-instance', 'pbb', 'b-component', 'i-components', 'i-component']

  def _get_i_sid(self):
    """
    Getter method for i_sid, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/i_components/i_component/i_sid (leafref)

    YANG Description: I-SID represents a unique service identifier associated with
service instances
    """
    return self.__i_sid
      
  def _set_i_sid(self, v, load=False):
    """
    Setter method for i_sid, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/i_components/i_component/i_sid (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_i_sid is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_i_sid() directly.

    YANG Description: I-SID represents a unique service identifier associated with
service instances
    """
    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="i-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """i_sid must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="i-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_i_sid(self):
    self.__i_sid = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="i-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/i_components/i_component/config (container)

    YANG Description: Configuration variables for the i-sid
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/i_components/i_component/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 variables for the i-sid
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_i_components_i_component_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_i_components_i_component_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_i_components_i_component_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/i_components/i_component/state (container)

    YANG Description: State variables for the i-sid
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/i_components/i_component/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 variables for the i-sid
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_i_components_i_component_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_i_components_i_component_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_i_components_i_component_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

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


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


class yc_i_components_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_i_components(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/evpn/evpn-instances/evpn-instance/pbb/b-component/i-components. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: i-components container definition.
  """
  __slots__ = ('_path_helper', '_extmethods', '__i_component',)

  _yang_name = 'i-components'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__i_component = YANGDynClass(base=YANGListType("i_sid",yc_i_component_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_i_components_i_component, yang_name="i-component", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='i-sid', extensions=None), is_container='list', yang_name="i-component", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn', 'evpn-instances', 'evpn-instance', 'pbb', 'b-component', 'i-components']

  def _get_i_component(self):
    """
    Getter method for i_component, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/i_components/i_component (list)

    YANG Description: list of i-components
    """
    return self.__i_component
      
  def _set_i_component(self, v, load=False):
    """
    Setter method for i_component, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/i_components/i_component (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_i_component is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_i_component() directly.

    YANG Description: list of i-components
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("i_sid",yc_i_component_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_i_components_i_component, yang_name="i-component", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='i-sid', extensions=None), is_container='list', yang_name="i-component", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """i_component must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("i_sid",yc_i_component_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_i_components_i_component, yang_name="i-component", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='i-sid', extensions=None), is_container='list', yang_name="i-component", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

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

  def _unset_i_component(self):
    self.__i_component = YANGDynClass(base=YANGListType("i_sid",yc_i_component_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_i_components_i_component, yang_name="i-component", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='i-sid', extensions=None), is_container='list', yang_name="i-component", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  i_component = __builtin__.property(_get_i_component, _set_i_component)


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


class yc_b_component_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/evpn/evpn-instances/evpn-instance/pbb/b-component. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of B-components. The b-component learns and forwards
traffic on the backbone in order to reduce the number of
BGP MAC Advertisement routes by aggregating Customer/Client
MAC (C-MAC) addresses via Provider Backbone MAC (B-MAC) address.
  """
  __slots__ = ('_path_helper', '_extmethods', '__b_component_name','__config','__state','__i_components',)

  _yang_name = 'b-component'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__b_component_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="b-component-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__i_components = YANGDynClass(base=yc_i_components_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_i_components, is_container='container', yang_name="i-components", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn', 'evpn-instances', 'evpn-instance', 'pbb', 'b-component']

  def _get_b_component_name(self):
    """
    Getter method for b_component_name, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/b_component_name (leafref)

    YANG Description: Provider Backbone Bridging component name.
    """
    return self.__b_component_name
      
  def _set_b_component_name(self, v, load=False):
    """
    Setter method for b_component_name, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/b_component_name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_b_component_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_b_component_name() directly.

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

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

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


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/config (container)

    YANG Description: Configuration variables for the b-components.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/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 variables for the b-components.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/state (container)

    YANG Description: State variables for the b-components.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/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 variables for the b-components.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_i_components(self):
    """
    Getter method for i_components, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/i_components (container)

    YANG Description: i-components container definition.
    """
    return self.__i_components
      
  def _set_i_components(self, v, load=False):
    """
    Setter method for i_components, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/i_components (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_i_components is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_i_components() directly.

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

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

  def _unset_i_components(self):
    self.__i_components = YANGDynClass(base=yc_i_components_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_i_components, is_container='container', yang_name="i-components", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  b_component_name = __builtin__.property(_get_b_component_name, _set_b_component_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  i_components = __builtin__.property(_get_i_components, _set_i_components)


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


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

  YANG Description: Container for EVPN with PBB PE functionality
for scaling over MPLS,
  """
  __slots__ = ('_path_helper', '_extmethods', '__b_component',)

  _yang_name = 'pbb'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__b_component = YANGDynClass(base=YANGListType("b_component_name",yc_b_component_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component, yang_name="b-component", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='b-component-name', extensions=None), is_container='list', yang_name="b-component", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn', 'evpn-instances', 'evpn-instance', 'pbb']

  def _get_b_component(self):
    """
    Getter method for b_component, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component (list)

    YANG Description: List of B-components. The b-component learns and forwards
traffic on the backbone in order to reduce the number of
BGP MAC Advertisement routes by aggregating Customer/Client
MAC (C-MAC) addresses via Provider Backbone MAC (B-MAC) address.
    """
    return self.__b_component
      
  def _set_b_component(self, v, load=False):
    """
    Setter method for b_component, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_b_component is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_b_component() directly.

    YANG Description: List of B-components. The b-component learns and forwards
traffic on the backbone in order to reduce the number of
BGP MAC Advertisement routes by aggregating Customer/Client
MAC (C-MAC) addresses via Provider Backbone MAC (B-MAC) address.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("b_component_name",yc_b_component_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component, yang_name="b-component", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='b-component-name', extensions=None), is_container='list', yang_name="b-component", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """b_component must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("b_component_name",yc_b_component_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component, yang_name="b-component", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='b-component-name', extensions=None), is_container='list', yang_name="b-component", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

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

  def _unset_b_component(self):
    self.__b_component = YANGDynClass(base=YANGListType("b_component_name",yc_b_component_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component, yang_name="b-component", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='b-component-name', extensions=None), is_container='list', yang_name="b-component", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  b_component = __builtin__.property(_get_b_component, _set_b_component)


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


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

  YANG Description: An EVPN instance (EVI) comprises Customer Edge devices
(CEs) that are connected to Provider Edge devices (PEs). One
network instance (representing a single MAC VRF) can
participate in one or more EVPN Instances. For each EVPN instance
in which the forwarding instance participates an
EVPN instance needs to be created.

The model supports BGP MPLS-Based Ethernet VPNs
(RFC 7432) and  Network Virtualization Overlay Solution
Using Ethernet VPN (RFC 8365). The use of MPLS or VXLAN
is selected via the encapsulation container within
EVPN instance. One use case requiring participating in
two EVIs is the Interconnect Solution for EVPN Overlay
networks (see draft-ietf-bess-dci-evpn-overlay-10)
  """
  __slots__ = ('_path_helper', '_extmethods', '__evi','__config','__state','__import_export_policy','__vxlan','__pbb',)

  _yang_name = 'evpn-instance'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__evi = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__import_export_policy = YANGDynClass(base=yc_import_export_policy_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_import_export_policy, is_container='container', yang_name="import-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__vxlan = YANGDynClass(base=yc_vxlan_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan, is_container='container', yang_name="vxlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__pbb = YANGDynClass(base=yc_pbb_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb, is_container='container', yang_name="pbb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn', 'evpn-instances', 'evpn-instance']

  def _get_evi(self):
    """
    Getter method for evi, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/evi (leafref)

    YANG Description: EVPN Intance (EVI) identifier
    """
    return self.__evi
      
  def _set_evi(self, v, load=False):
    """
    Setter method for evi, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/evi (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_evi is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_evi() directly.

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

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

  def _unset_evi(self):
    self.__evi = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/config (container)

    YANG Description: EVPN Configuration parameters for
the participation in an EVPN Intance.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/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: EVPN Configuration parameters for
the participation in an EVPN Intance.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/state (container)

    YANG Description: EVPN State parameters for
the participation in an EVPN Intance.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/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: EVPN State parameters for
the participation in an EVPN Intance.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_import_export_policy(self):
    """
    Getter method for import_export_policy, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/import_export_policy (container)

    YANG Description: Top container to set the import and export policies
associated with a EVI
    """
    return self.__import_export_policy
      
  def _set_import_export_policy(self, v, load=False):
    """
    Setter method for import_export_policy, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/import_export_policy (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_import_export_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_import_export_policy() directly.

    YANG Description: Top container to set the import and export policies
associated with a EVI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_import_export_policy_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_import_export_policy, is_container='container', yang_name="import-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """import_export_policy must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_import_export_policy_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_import_export_policy, is_container='container', yang_name="import-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

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

  def _unset_import_export_policy(self):
    self.__import_export_policy = YANGDynClass(base=yc_import_export_policy_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_import_export_policy, is_container='container', yang_name="import-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_vxlan(self):
    """
    Getter method for vxlan, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan (container)

    YANG Description: Top container related to Overlay Solution in EVPN.
    """
    return self.__vxlan
      
  def _set_vxlan(self, v, load=False):
    """
    Setter method for vxlan, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_vxlan is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_vxlan() directly.

    YANG Description: Top container related to Overlay Solution in EVPN.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_vxlan_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan, is_container='container', yang_name="vxlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """vxlan must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_vxlan_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan, is_container='container', yang_name="vxlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

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

  def _unset_vxlan(self):
    self.__vxlan = YANGDynClass(base=yc_vxlan_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan, is_container='container', yang_name="vxlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_pbb(self):
    """
    Getter method for pbb, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb (container)

    YANG Description: Container for EVPN with PBB PE functionality
for scaling over MPLS,
    """
    return self.__pbb
      
  def _set_pbb(self, v, load=False):
    """
    Setter method for pbb, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pbb is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pbb() directly.

    YANG Description: Container for EVPN with PBB PE functionality
for scaling over MPLS,
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_pbb_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb, is_container='container', yang_name="pbb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pbb must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_pbb_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb, is_container='container', yang_name="pbb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

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

  def _unset_pbb(self):
    self.__pbb = YANGDynClass(base=yc_pbb_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb, is_container='container', yang_name="pbb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  evi = __builtin__.property(_get_evi, _set_evi)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  import_export_policy = __builtin__.property(_get_import_export_policy, _set_import_export_policy)
  vxlan = __builtin__.property(_get_vxlan, _set_vxlan)
  pbb = __builtin__.property(_get_pbb, _set_pbb)


  _pyangbind_elements = OrderedDict([('evi', evi), ('config', config), ('state', state), ('import_export_policy', import_export_policy), ('vxlan', vxlan), ('pbb', pbb), ])


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

  YANG Description: Configuration attributes of the EVPN Instance
  """
  __slots__ = ('_path_helper', '_extmethods', '__evpn_instance',)

  _yang_name = 'evpn-instances'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__evpn_instance = YANGDynClass(base=YANGListType("evi",yc_evpn_instance_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance, yang_name="evpn-instance", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='evi', extensions=None), is_container='list', yang_name="evpn-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn', 'evpn-instances']

  def _get_evpn_instance(self):
    """
    Getter method for evpn_instance, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance (list)

    YANG Description: An EVPN instance (EVI) comprises Customer Edge devices
(CEs) that are connected to Provider Edge devices (PEs). One
network instance (representing a single MAC VRF) can
participate in one or more EVPN Instances. For each EVPN instance
in which the forwarding instance participates an
EVPN instance needs to be created.

The model supports BGP MPLS-Based Ethernet VPNs
(RFC 7432) and  Network Virtualization Overlay Solution
Using Ethernet VPN (RFC 8365). The use of MPLS or VXLAN
is selected via the encapsulation container within
EVPN instance. One use case requiring participating in
two EVIs is the Interconnect Solution for EVPN Overlay
networks (see draft-ietf-bess-dci-evpn-overlay-10)
    """
    return self.__evpn_instance
      
  def _set_evpn_instance(self, v, load=False):
    """
    Setter method for evpn_instance, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_evpn_instance is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_evpn_instance() directly.

    YANG Description: An EVPN instance (EVI) comprises Customer Edge devices
(CEs) that are connected to Provider Edge devices (PEs). One
network instance (representing a single MAC VRF) can
participate in one or more EVPN Instances. For each EVPN instance
in which the forwarding instance participates an
EVPN instance needs to be created.

The model supports BGP MPLS-Based Ethernet VPNs
(RFC 7432) and  Network Virtualization Overlay Solution
Using Ethernet VPN (RFC 8365). The use of MPLS or VXLAN
is selected via the encapsulation container within
EVPN instance. One use case requiring participating in
two EVIs is the Interconnect Solution for EVPN Overlay
networks (see draft-ietf-bess-dci-evpn-overlay-10)
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("evi",yc_evpn_instance_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance, yang_name="evpn-instance", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='evi', extensions=None), is_container='list', yang_name="evpn-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """evpn_instance must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("evi",yc_evpn_instance_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance, yang_name="evpn-instance", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='evi', extensions=None), is_container='list', yang_name="evpn-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

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

  def _unset_evpn_instance(self):
    self.__evpn_instance = YANGDynClass(base=YANGListType("evi",yc_evpn_instance_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances_evpn_instance, yang_name="evpn-instance", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='evi', extensions=None), is_container='list', yang_name="evpn-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  evpn_instance = __builtin__.property(_get_evpn_instance, _set_evpn_instance)


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


class yc_config_openconfig_network_instance__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/evpn/ethernet-segments/ethernet-segment/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for the Ethernet Segments.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__esi_type','__esi','__redundancy_mode','__interface','__subinterface',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__esi_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TYPE_0_OPERATOR_CONFIGURED': {'value': 0}, 'TYPE_1_LACP_BASED': {'value': 1}, 'TYPE_2_BRIDGE_PROTOCOL_BASED': {'value': 2}, 'TYPE_3_MAC_BASED': {'value': 3}, 'TYPE_4_ROUTER_ID_BASED': {'value': 4}, 'TYPE_5_AS_BASED': {'value': 5}},), default=six.text_type("TYPE_0_OPERATOR_CONFIGURED"), is_leaf=True, yang_name="esi-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi-type', is_config=True)
    self.__esi = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),], is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)
    self.__redundancy_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'SINGLE_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:SINGLE_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'ALL_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:ALL_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}},), is_leaf=True, yang_name="redundancy-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn', 'ethernet-segments', 'ethernet-segment', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/config/name (string)

    YANG Description: Ethernet Segment name
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/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: Ethernet Segment name
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_esi_type(self):
    """
    Getter method for esi_type, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/config/esi_type (oc-evpn-types:esi-type)

    YANG Description: ESI Type is a 1-octet field (most significant octet) that
specifies the format of the remaining 9 octets (ESI Value).
    """
    return self.__esi_type
      
  def _set_esi_type(self, v, load=False):
    """
    Setter method for esi_type, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/config/esi_type (oc-evpn-types:esi-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_esi_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_esi_type() directly.

    YANG Description: ESI Type is a 1-octet field (most significant octet) that
specifies the format of the remaining 9 octets (ESI Value).
    """
    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={'TYPE_0_OPERATOR_CONFIGURED': {'value': 0}, 'TYPE_1_LACP_BASED': {'value': 1}, 'TYPE_2_BRIDGE_PROTOCOL_BASED': {'value': 2}, 'TYPE_3_MAC_BASED': {'value': 3}, 'TYPE_4_ROUTER_ID_BASED': {'value': 4}, 'TYPE_5_AS_BASED': {'value': 5}},), default=six.text_type("TYPE_0_OPERATOR_CONFIGURED"), is_leaf=True, yang_name="esi-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """esi_type must be of a type compatible with oc-evpn-types:esi-type""",
          'defined-type': "oc-evpn-types:esi-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TYPE_0_OPERATOR_CONFIGURED': {'value': 0}, 'TYPE_1_LACP_BASED': {'value': 1}, 'TYPE_2_BRIDGE_PROTOCOL_BASED': {'value': 2}, 'TYPE_3_MAC_BASED': {'value': 3}, 'TYPE_4_ROUTER_ID_BASED': {'value': 4}, 'TYPE_5_AS_BASED': {'value': 5}},), default=six.text_type("TYPE_0_OPERATOR_CONFIGURED"), is_leaf=True, yang_name="esi-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi-type', is_config=True)""",
        })

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

  def _unset_esi_type(self):
    self.__esi_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TYPE_0_OPERATOR_CONFIGURED': {'value': 0}, 'TYPE_1_LACP_BASED': {'value': 1}, 'TYPE_2_BRIDGE_PROTOCOL_BASED': {'value': 2}, 'TYPE_3_MAC_BASED': {'value': 3}, 'TYPE_4_ROUTER_ID_BASED': {'value': 4}, 'TYPE_5_AS_BASED': {'value': 5}},), default=six.text_type("TYPE_0_OPERATOR_CONFIGURED"), is_leaf=True, yang_name="esi-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi-type', is_config=True)


  def _get_esi(self):
    """
    Getter method for esi, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/config/esi (union)

    YANG Description: Ethernet Segment Identifier (ESI) value.
For ESI Type 0: The esi leaf value is directly configured by the operator.
For ESI Type 1: The AUTO enum must be used.
For ESI Type 2: The AUTO enum must be used.
For ESI Type 3: The directly configured or AUTO enum must be used.
For ESI Type 4: The directly configured or AUTO enum must be used.
For ESI Type 5: The directly configured or AUTO enum must be used.
    """
    return self.__esi
      
  def _set_esi(self, v, load=False):
    """
    Setter method for esi, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/config/esi (union)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_esi is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_esi() directly.

    YANG Description: Ethernet Segment Identifier (ESI) value.
For ESI Type 0: The esi leaf value is directly configured by the operator.
For ESI Type 1: The AUTO enum must be used.
For ESI Type 2: The AUTO enum must be used.
For ESI Type 3: The directly configured or AUTO enum must be used.
For ESI Type 4: The directly configured or AUTO enum must be used.
For ESI Type 5: The directly configured or AUTO enum must be used.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),], is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """esi must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),], is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)""",
        })

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

  def _unset_esi(self):
    self.__esi = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),], is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)


  def _get_redundancy_mode(self):
    """
    Getter method for redundancy_mode, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/config/redundancy_mode (identityref)

    YANG Description: Multihoming options for load balancing of
traffic in the Ethernet Segment.
    """
    return self.__redundancy_mode
      
  def _set_redundancy_mode(self, v, load=False):
    """
    Setter method for redundancy_mode, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/config/redundancy_mode (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_redundancy_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_redundancy_mode() directly.

    YANG Description: Multihoming options for load balancing of
traffic in the Ethernet Segment.
    """
    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={'SINGLE_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:SINGLE_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'ALL_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:ALL_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}},), is_leaf=True, yang_name="redundancy-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """redundancy_mode must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'SINGLE_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:SINGLE_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'ALL_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:ALL_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}},), is_leaf=True, yang_name="redundancy-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

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

  def _unset_redundancy_mode(self):
    self.__redundancy_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'SINGLE_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:SINGLE_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'ALL_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:ALL_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}},), is_leaf=True, yang_name="redundancy-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/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 /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/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 /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  esi_type = __builtin__.property(_get_esi_type, _set_esi_type)
  esi = __builtin__.property(_get_esi, _set_esi)
  redundancy_mode = __builtin__.property(_get_redundancy_mode, _set_redundancy_mode)
  interface = __builtin__.property(_get_interface, _set_interface)
  subinterface = __builtin__.property(_get_subinterface, _set_subinterface)


  _pyangbind_elements = OrderedDict([('name', name), ('esi_type', esi_type), ('esi', esi), ('redundancy_mode', redundancy_mode), ('interface', interface), ('subinterface', subinterface), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/evpn/ethernet-segments/ethernet-segment/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 Ethernet Segments.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__esi_type','__esi','__redundancy_mode','__interface','__subinterface',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__esi_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TYPE_0_OPERATOR_CONFIGURED': {'value': 0}, 'TYPE_1_LACP_BASED': {'value': 1}, 'TYPE_2_BRIDGE_PROTOCOL_BASED': {'value': 2}, 'TYPE_3_MAC_BASED': {'value': 3}, 'TYPE_4_ROUTER_ID_BASED': {'value': 4}, 'TYPE_5_AS_BASED': {'value': 5}},), default=six.text_type("TYPE_0_OPERATOR_CONFIGURED"), is_leaf=True, yang_name="esi-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi-type', is_config=False)
    self.__esi = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),], is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    self.__redundancy_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'SINGLE_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:SINGLE_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'ALL_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:ALL_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}},), is_leaf=True, yang_name="redundancy-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn', 'ethernet-segments', 'ethernet-segment', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/state/name (string)

    YANG Description: Ethernet Segment name
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/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: Ethernet Segment name
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_esi_type(self):
    """
    Getter method for esi_type, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/state/esi_type (oc-evpn-types:esi-type)

    YANG Description: ESI Type is a 1-octet field (most significant octet) that
specifies the format of the remaining 9 octets (ESI Value).
    """
    return self.__esi_type
      
  def _set_esi_type(self, v, load=False):
    """
    Setter method for esi_type, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/state/esi_type (oc-evpn-types:esi-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_esi_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_esi_type() directly.

    YANG Description: ESI Type is a 1-octet field (most significant octet) that
specifies the format of the remaining 9 octets (ESI Value).
    """
    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={'TYPE_0_OPERATOR_CONFIGURED': {'value': 0}, 'TYPE_1_LACP_BASED': {'value': 1}, 'TYPE_2_BRIDGE_PROTOCOL_BASED': {'value': 2}, 'TYPE_3_MAC_BASED': {'value': 3}, 'TYPE_4_ROUTER_ID_BASED': {'value': 4}, 'TYPE_5_AS_BASED': {'value': 5}},), default=six.text_type("TYPE_0_OPERATOR_CONFIGURED"), is_leaf=True, yang_name="esi-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """esi_type must be of a type compatible with oc-evpn-types:esi-type""",
          'defined-type': "oc-evpn-types:esi-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TYPE_0_OPERATOR_CONFIGURED': {'value': 0}, 'TYPE_1_LACP_BASED': {'value': 1}, 'TYPE_2_BRIDGE_PROTOCOL_BASED': {'value': 2}, 'TYPE_3_MAC_BASED': {'value': 3}, 'TYPE_4_ROUTER_ID_BASED': {'value': 4}, 'TYPE_5_AS_BASED': {'value': 5}},), default=six.text_type("TYPE_0_OPERATOR_CONFIGURED"), is_leaf=True, yang_name="esi-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi-type', is_config=False)""",
        })

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

  def _unset_esi_type(self):
    self.__esi_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TYPE_0_OPERATOR_CONFIGURED': {'value': 0}, 'TYPE_1_LACP_BASED': {'value': 1}, 'TYPE_2_BRIDGE_PROTOCOL_BASED': {'value': 2}, 'TYPE_3_MAC_BASED': {'value': 3}, 'TYPE_4_ROUTER_ID_BASED': {'value': 4}, 'TYPE_5_AS_BASED': {'value': 5}},), default=six.text_type("TYPE_0_OPERATOR_CONFIGURED"), is_leaf=True, yang_name="esi-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi-type', is_config=False)


  def _get_esi(self):
    """
    Getter method for esi, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/state/esi (union)

    YANG Description: Ethernet Segment Identifier (ESI) value.
For ESI Type 0: The esi leaf value is directly configured by the operator.
For ESI Type 1: The AUTO enum must be used.
For ESI Type 2: The AUTO enum must be used.
For ESI Type 3: The directly configured or AUTO enum must be used.
For ESI Type 4: The directly configured or AUTO enum must be used.
For ESI Type 5: The directly configured or AUTO enum must be used.
    """
    return self.__esi
      
  def _set_esi(self, v, load=False):
    """
    Setter method for esi, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/state/esi (union)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_esi is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_esi() directly.

    YANG Description: Ethernet Segment Identifier (ESI) value.
For ESI Type 0: The esi leaf value is directly configured by the operator.
For ESI Type 1: The AUTO enum must be used.
For ESI Type 2: The AUTO enum must be used.
For ESI Type 3: The directly configured or AUTO enum must be used.
For ESI Type 4: The directly configured or AUTO enum must be used.
For ESI Type 5: The directly configured or AUTO enum must be used.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),], is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """esi must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),], is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)""",
        })

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

  def _unset_esi(self):
    self.__esi = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),], is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)


  def _get_redundancy_mode(self):
    """
    Getter method for redundancy_mode, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/state/redundancy_mode (identityref)

    YANG Description: Multihoming options for load balancing of
traffic in the Ethernet Segment.
    """
    return self.__redundancy_mode
      
  def _set_redundancy_mode(self, v, load=False):
    """
    Setter method for redundancy_mode, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/state/redundancy_mode (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_redundancy_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_redundancy_mode() directly.

    YANG Description: Multihoming options for load balancing of
traffic in the Ethernet Segment.
    """
    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={'SINGLE_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:SINGLE_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'ALL_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:ALL_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}},), is_leaf=True, yang_name="redundancy-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """redundancy_mode must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'SINGLE_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:SINGLE_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'ALL_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:ALL_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}},), is_leaf=True, yang_name="redundancy-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

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

  def _unset_redundancy_mode(self):
    self.__redundancy_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'SINGLE_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:SINGLE_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'ALL_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:ALL_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}},), is_leaf=True, yang_name="redundancy-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/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 /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/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 /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)

  name = __builtin__.property(_get_name)
  esi_type = __builtin__.property(_get_esi_type)
  esi = __builtin__.property(_get_esi)
  redundancy_mode = __builtin__.property(_get_redundancy_mode)
  interface = __builtin__.property(_get_interface)
  subinterface = __builtin__.property(_get_subinterface)


  _pyangbind_elements = OrderedDict([('name', name), ('esi_type', esi_type), ('esi', esi), ('redundancy_mode', redundancy_mode), ('interface', interface), ('subinterface', subinterface), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_df_election_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/evpn/ethernet-segments/ethernet-segment/df-election/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for the Designated forwarding Election
  """
  __slots__ = ('_path_helper', '_extmethods', '__df_election_method','__preference','__revertive','__election_wait_time',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__df_election_method = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DEFAULT': {'value': 0}, 'HIGHEST_RANDOM_WEIGHT': {'value': 1}, 'PREFERENCE': {'value': 2}},), is_leaf=True, yang_name="df-election-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__revertive = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="revertive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__election_wait_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="election-wait-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn', 'ethernet-segments', 'ethernet-segment', 'df-election', 'config']

  def _get_df_election_method(self):
    """
    Getter method for df_election_method, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election/config/df_election_method (enumeration)

    YANG Description: Select the Designated Forwarder Election (DF) election method
    """
    return self.__df_election_method
      
  def _set_df_election_method(self, v, load=False):
    """
    Setter method for df_election_method, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election/config/df_election_method (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_df_election_method is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_df_election_method() directly.

    YANG Description: Select the Designated Forwarder Election (DF) election method
    """
    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={'DEFAULT': {'value': 0}, 'HIGHEST_RANDOM_WEIGHT': {'value': 1}, 'PREFERENCE': {'value': 2}},), is_leaf=True, yang_name="df-election-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """df_election_method must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DEFAULT': {'value': 0}, 'HIGHEST_RANDOM_WEIGHT': {'value': 1}, 'PREFERENCE': {'value': 2}},), is_leaf=True, yang_name="df-election-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)""",
        })

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

  def _unset_df_election_method(self):
    self.__df_election_method = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DEFAULT': {'value': 0}, 'HIGHEST_RANDOM_WEIGHT': {'value': 1}, 'PREFERENCE': {'value': 2}},), is_leaf=True, yang_name="df-election-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)


  def _get_preference(self):
    """
    Getter method for preference, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election/config/preference (uint16)

    YANG Description: Defines a 2-octet value that indicates the PE
preference to become the DF in the Ethernet-Segment.
    """
    return self.__preference
      
  def _set_preference(self, v, load=False):
    """
    Setter method for preference, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election/config/preference (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_preference is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_preference() directly.

    YANG Description: Defines a 2-octet value that indicates the PE
preference to become the DF in the Ethernet-Segment.
    """
    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="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """preference 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="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

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

  def _unset_preference(self):
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_revertive(self):
    """
    Getter method for revertive, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election/config/revertive (boolean)

    YANG Description: The 'preempt' or 'revertive' behavior. This option will allow a
non-revertive behavior in the DF election.
    """
    return self.__revertive
      
  def _set_revertive(self, v, load=False):
    """
    Setter method for revertive, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election/config/revertive (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_revertive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_revertive() directly.

    YANG Description: The 'preempt' or 'revertive' behavior. This option will allow a
non-revertive behavior in the DF election.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="revertive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """revertive must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="revertive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

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

  def _unset_revertive(self):
    self.__revertive = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="revertive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_election_wait_time(self):
    """
    Getter method for election_wait_time, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election/config/election_wait_time (uint32)

    YANG Description: Designated Forwarder Election wait-time. When the DF timer expires,
the PE device selects the DF based on the highest preference value
    """
    return self.__election_wait_time
      
  def _set_election_wait_time(self, v, load=False):
    """
    Setter method for election_wait_time, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election/config/election_wait_time (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_election_wait_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_election_wait_time() directly.

    YANG Description: Designated Forwarder Election wait-time. When the DF timer expires,
the PE device selects the DF based on the highest preference value
    """
    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="election-wait-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """election_wait_time 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="election-wait-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

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

  def _unset_election_wait_time(self):
    self.__election_wait_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="election-wait-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)

  df_election_method = __builtin__.property(_get_df_election_method, _set_df_election_method)
  preference = __builtin__.property(_get_preference, _set_preference)
  revertive = __builtin__.property(_get_revertive, _set_revertive)
  election_wait_time = __builtin__.property(_get_election_wait_time, _set_election_wait_time)


  _pyangbind_elements = OrderedDict([('df_election_method', df_election_method), ('preference', preference), ('revertive', revertive), ('election_wait_time', election_wait_time), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_df_election_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/evpn/ethernet-segments/ethernet-segment/df-election/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for the Designated forwarding Election
  """
  __slots__ = ('_path_helper', '_extmethods', '__df_election_method','__preference','__revertive','__election_wait_time',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__df_election_method = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DEFAULT': {'value': 0}, 'HIGHEST_RANDOM_WEIGHT': {'value': 1}, 'PREFERENCE': {'value': 2}},), is_leaf=True, yang_name="df-election-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__revertive = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="revertive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__election_wait_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="election-wait-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn', 'ethernet-segments', 'ethernet-segment', 'df-election', 'state']

  def _get_df_election_method(self):
    """
    Getter method for df_election_method, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election/state/df_election_method (enumeration)

    YANG Description: Select the Designated Forwarder Election (DF) election method
    """
    return self.__df_election_method
      
  def _set_df_election_method(self, v, load=False):
    """
    Setter method for df_election_method, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election/state/df_election_method (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_df_election_method is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_df_election_method() directly.

    YANG Description: Select the Designated Forwarder Election (DF) election method
    """
    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={'DEFAULT': {'value': 0}, 'HIGHEST_RANDOM_WEIGHT': {'value': 1}, 'PREFERENCE': {'value': 2}},), is_leaf=True, yang_name="df-election-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """df_election_method must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DEFAULT': {'value': 0}, 'HIGHEST_RANDOM_WEIGHT': {'value': 1}, 'PREFERENCE': {'value': 2}},), is_leaf=True, yang_name="df-election-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

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

  def _unset_df_election_method(self):
    self.__df_election_method = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DEFAULT': {'value': 0}, 'HIGHEST_RANDOM_WEIGHT': {'value': 1}, 'PREFERENCE': {'value': 2}},), is_leaf=True, yang_name="df-election-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_preference(self):
    """
    Getter method for preference, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election/state/preference (uint16)

    YANG Description: Defines a 2-octet value that indicates the PE
preference to become the DF in the Ethernet-Segment.
    """
    return self.__preference
      
  def _set_preference(self, v, load=False):
    """
    Setter method for preference, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election/state/preference (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_preference is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_preference() directly.

    YANG Description: Defines a 2-octet value that indicates the PE
preference to become the DF in the Ethernet-Segment.
    """
    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="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """preference 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="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

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

  def _unset_preference(self):
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_revertive(self):
    """
    Getter method for revertive, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election/state/revertive (boolean)

    YANG Description: The 'preempt' or 'revertive' behavior. This option will allow a
non-revertive behavior in the DF election.
    """
    return self.__revertive
      
  def _set_revertive(self, v, load=False):
    """
    Setter method for revertive, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election/state/revertive (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_revertive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_revertive() directly.

    YANG Description: The 'preempt' or 'revertive' behavior. This option will allow a
non-revertive behavior in the DF election.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="revertive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """revertive must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="revertive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

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

  def _unset_revertive(self):
    self.__revertive = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="revertive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_election_wait_time(self):
    """
    Getter method for election_wait_time, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election/state/election_wait_time (uint32)

    YANG Description: Designated Forwarder Election wait-time. When the DF timer expires,
the PE device selects the DF based on the highest preference value
    """
    return self.__election_wait_time
      
  def _set_election_wait_time(self, v, load=False):
    """
    Setter method for election_wait_time, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election/state/election_wait_time (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_election_wait_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_election_wait_time() directly.

    YANG Description: Designated Forwarder Election wait-time. When the DF timer expires,
the PE device selects the DF based on the highest preference value
    """
    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="election-wait-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """election_wait_time 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="election-wait-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

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

  def _unset_election_wait_time(self):
    self.__election_wait_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="election-wait-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  df_election_method = __builtin__.property(_get_df_election_method)
  preference = __builtin__.property(_get_preference)
  revertive = __builtin__.property(_get_revertive)
  election_wait_time = __builtin__.property(_get_election_wait_time)


  _pyangbind_elements = OrderedDict([('df_election_method', df_election_method), ('preference', preference), ('revertive', revertive), ('election_wait_time', election_wait_time), ])


class yc_df_election_openconfig_network_instance__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_df_election(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/evpn/ethernet-segments/ethernet-segment/df-election. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top container for the configuration and state parameters
for the Designated forwarding Election
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'df-election'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_df_election_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_df_election_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn', 'ethernet-segments', 'ethernet-segment', 'df-election']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election/config (container)

    YANG Description: Configuration parameters for the Designated forwarding Election
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election/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 Designated forwarding Election
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_df_election_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_df_election_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_df_election_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election/state (container)

    YANG Description: Configuration parameters for the Designated forwarding Election
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election/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: Configuration parameters for the Designated forwarding Election
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_df_election_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_df_election_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_df_election_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_ethernet_segment_openconfig_network_instance__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/evpn/ethernet-segments/ethernet-segment. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of Ethernet Segments.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state','__df_election',)

  _yang_name = 'ethernet-segment'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__df_election = YANGDynClass(base=yc_df_election_openconfig_network_instance__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_df_election, is_container='container', yang_name="df-election", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn', 'ethernet-segments', 'ethernet-segment']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/name (leafref)

    YANG Description: Ethernet Segment Name 
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/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: Ethernet Segment 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/config (container)

    YANG Description: Configuration data for the Ethernet Segments.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/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 Ethernet Segments.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/state (container)

    YANG Description: Operational state data for the Ethernet Segments.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/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 Ethernet Segments.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_df_election(self):
    """
    Getter method for df_election, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election (container)

    YANG Description: Top container for the configuration and state parameters
for the Designated forwarding Election
    """
    return self.__df_election
      
  def _set_df_election(self, v, load=False):
    """
    Setter method for df_election, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_df_election is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_df_election() directly.

    YANG Description: Top container for the configuration and state parameters
for the Designated forwarding Election
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_df_election_openconfig_network_instance__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_df_election, is_container='container', yang_name="df-election", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """df_election must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_df_election_openconfig_network_instance__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_df_election, is_container='container', yang_name="df-election", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

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

  def _unset_df_election(self):
    self.__df_election = YANGDynClass(base=yc_df_election_openconfig_network_instance__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_df_election, is_container='container', yang_name="df-election", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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)
  df_election = __builtin__.property(_get_df_election, _set_df_election)


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


class yc_ethernet_segments_openconfig_network_instance__network_instances_network_instance_evpn_ethernet_segments(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/evpn/ethernet-segments. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for ethernet segments. An Ethernet Segment
is referenced by a name and an ESI
  """
  __slots__ = ('_path_helper', '_extmethods', '__ethernet_segment',)

  _yang_name = 'ethernet-segments'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__ethernet_segment = YANGDynClass(base=YANGListType("name",yc_ethernet_segment_openconfig_network_instance__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment, yang_name="ethernet-segment", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="ethernet-segment", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn', 'ethernet-segments']

  def _get_ethernet_segment(self):
    """
    Getter method for ethernet_segment, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment (list)

    YANG Description: List of Ethernet Segments.
    """
    return self.__ethernet_segment
      
  def _set_ethernet_segment(self, v, load=False):
    """
    Setter method for ethernet_segment, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ethernet_segment is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ethernet_segment() directly.

    YANG Description: List of Ethernet Segments.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_ethernet_segment_openconfig_network_instance__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment, yang_name="ethernet-segment", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="ethernet-segment", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ethernet_segment must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_ethernet_segment_openconfig_network_instance__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment, yang_name="ethernet-segment", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="ethernet-segment", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

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

  def _unset_ethernet_segment(self):
    self.__ethernet_segment = YANGDynClass(base=YANGListType("name",yc_ethernet_segment_openconfig_network_instance__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment, yang_name="ethernet-segment", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="ethernet-segment", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  ethernet_segment = __builtin__.property(_get_ethernet_segment, _set_ethernet_segment)


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


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

  YANG Description: Configuration of parameters for EVPN related bridge domains
(MAC VRFs) and layer3 VRFs (IP VRFs)
  """
  __slots__ = ('_path_helper', '_extmethods', '__evpn_instances','__ethernet_segments',)

  _yang_name = 'evpn'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__evpn_instances = YANGDynClass(base=yc_evpn_instances_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances, is_container='container', yang_name="evpn-instances", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__ethernet_segments = YANGDynClass(base=yc_ethernet_segments_openconfig_network_instance__network_instances_network_instance_evpn_ethernet_segments, is_container='container', yang_name="ethernet-segments", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn']

  def _get_evpn_instances(self):
    """
    Getter method for evpn_instances, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances (container)

    YANG Description: Configuration attributes of the EVPN Instance
    """
    return self.__evpn_instances
      
  def _set_evpn_instances(self, v, load=False):
    """
    Setter method for evpn_instances, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_evpn_instances is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_evpn_instances() directly.

    YANG Description: Configuration attributes of the EVPN Instance
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_evpn_instances_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances, is_container='container', yang_name="evpn-instances", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """evpn_instances must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_evpn_instances_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances, is_container='container', yang_name="evpn-instances", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

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

  def _unset_evpn_instances(self):
    self.__evpn_instances = YANGDynClass(base=yc_evpn_instances_openconfig_network_instance__network_instances_network_instance_evpn_evpn_instances, is_container='container', yang_name="evpn-instances", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_ethernet_segments(self):
    """
    Getter method for ethernet_segments, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments (container)

    YANG Description: Top-level container for ethernet segments. An Ethernet Segment
is referenced by a name and an ESI
    """
    return self.__ethernet_segments
      
  def _set_ethernet_segments(self, v, load=False):
    """
    Setter method for ethernet_segments, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ethernet_segments is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ethernet_segments() directly.

    YANG Description: Top-level container for ethernet segments. An Ethernet Segment
is referenced by a name and an ESI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ethernet_segments_openconfig_network_instance__network_instances_network_instance_evpn_ethernet_segments, is_container='container', yang_name="ethernet-segments", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ethernet_segments must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ethernet_segments_openconfig_network_instance__network_instances_network_instance_evpn_ethernet_segments, is_container='container', yang_name="ethernet-segments", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

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

  def _unset_ethernet_segments(self):
    self.__ethernet_segments = YANGDynClass(base=yc_ethernet_segments_openconfig_network_instance__network_instances_network_instance_evpn_ethernet_segments, is_container='container', yang_name="ethernet-segments", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  evpn_instances = __builtin__.property(_get_evpn_instances, _set_evpn_instances)
  ethernet_segments = __builtin__.property(_get_ethernet_segments, _set_ethernet_segments)


  _pyangbind_elements = OrderedDict([('evpn_instances', evpn_instances), ('ethernet_segments', ethernet_segments), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_encapsulation_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/encapsulation/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 encapsulation
of the network instance
  """
  __slots__ = ('_path_helper', '_extmethods', '__encapsulation_type','__label_allocation_mode','__control_word',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__encapsulation_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="encapsulation-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__label_allocation_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PER_PREFIX': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:PER_PREFIX': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'PER_NEXTHOP': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:PER_NEXTHOP': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'INSTANCE_LABEL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:INSTANCE_LABEL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="label-allocation-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__control_word = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="control-word", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'encapsulation', 'config']

  def _get_encapsulation_type(self):
    """
    Getter method for encapsulation_type, mapped from YANG variable /network_instances/network_instance/encapsulation/config/encapsulation_type (identityref)

    YANG Description: The on-the-wire encapsulation that should be used when
sending traffic from this network instance
    """
    return self.__encapsulation_type
      
  def _set_encapsulation_type(self, v, load=False):
    """
    Setter method for encapsulation_type, mapped from YANG variable /network_instances/network_instance/encapsulation/config/encapsulation_type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_encapsulation_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_encapsulation_type() directly.

    YANG Description: The on-the-wire encapsulation that should be used when
sending traffic from this network instance
    """
    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={'MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="encapsulation-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """encapsulation_type must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="encapsulation-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

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

  def _unset_encapsulation_type(self):
    self.__encapsulation_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="encapsulation-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_label_allocation_mode(self):
    """
    Getter method for label_allocation_mode, mapped from YANG variable /network_instances/network_instance/encapsulation/config/label_allocation_mode (identityref)

    YANG Description: The label allocation mode to be used for L3 entries
in the network instance
    """
    return self.__label_allocation_mode
      
  def _set_label_allocation_mode(self, v, load=False):
    """
    Setter method for label_allocation_mode, mapped from YANG variable /network_instances/network_instance/encapsulation/config/label_allocation_mode (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_label_allocation_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_label_allocation_mode() directly.

    YANG Description: The label allocation mode to be used for L3 entries
in the network instance
    """
    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={'PER_PREFIX': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:PER_PREFIX': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'PER_NEXTHOP': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:PER_NEXTHOP': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'INSTANCE_LABEL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:INSTANCE_LABEL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="label-allocation-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """label_allocation_mode must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PER_PREFIX': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:PER_PREFIX': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'PER_NEXTHOP': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:PER_NEXTHOP': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'INSTANCE_LABEL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:INSTANCE_LABEL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="label-allocation-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

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

  def _unset_label_allocation_mode(self):
    self.__label_allocation_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PER_PREFIX': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:PER_PREFIX': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'PER_NEXTHOP': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:PER_NEXTHOP': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'INSTANCE_LABEL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:INSTANCE_LABEL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="label-allocation-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_control_word(self):
    """
    Getter method for control_word, mapped from YANG variable /network_instances/network_instance/encapsulation/config/control_word (boolean)

    YANG Description: Whether the control-word should be used for the network
instance
    """
    return self.__control_word
      
  def _set_control_word(self, v, load=False):
    """
    Setter method for control_word, mapped from YANG variable /network_instances/network_instance/encapsulation/config/control_word (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_control_word is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_control_word() directly.

    YANG Description: Whether the control-word should be used for the network
instance
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="control-word", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """control_word must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="control-word", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

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

  def _unset_control_word(self):
    self.__control_word = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="control-word", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  encapsulation_type = __builtin__.property(_get_encapsulation_type, _set_encapsulation_type)
  label_allocation_mode = __builtin__.property(_get_label_allocation_mode, _set_label_allocation_mode)
  control_word = __builtin__.property(_get_control_word, _set_control_word)


  _pyangbind_elements = OrderedDict([('encapsulation_type', encapsulation_type), ('label_allocation_mode', label_allocation_mode), ('control_word', control_word), ])


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

  YANG Description: State parameters relating to the encapsulation of
the network instance
  """
  __slots__ = ('_path_helper', '_extmethods', '__encapsulation_type','__label_allocation_mode','__control_word',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__encapsulation_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="encapsulation-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__label_allocation_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PER_PREFIX': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:PER_PREFIX': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'PER_NEXTHOP': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:PER_NEXTHOP': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'INSTANCE_LABEL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:INSTANCE_LABEL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="label-allocation-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__control_word = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="control-word", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'encapsulation', 'state']

  def _get_encapsulation_type(self):
    """
    Getter method for encapsulation_type, mapped from YANG variable /network_instances/network_instance/encapsulation/state/encapsulation_type (identityref)

    YANG Description: The on-the-wire encapsulation that should be used when
sending traffic from this network instance
    """
    return self.__encapsulation_type
      
  def _set_encapsulation_type(self, v, load=False):
    """
    Setter method for encapsulation_type, mapped from YANG variable /network_instances/network_instance/encapsulation/state/encapsulation_type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_encapsulation_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_encapsulation_type() directly.

    YANG Description: The on-the-wire encapsulation that should be used when
sending traffic from this network instance
    """
    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={'MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="encapsulation-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """encapsulation_type must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="encapsulation-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

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

  def _unset_encapsulation_type(self):
    self.__encapsulation_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="encapsulation-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_label_allocation_mode(self):
    """
    Getter method for label_allocation_mode, mapped from YANG variable /network_instances/network_instance/encapsulation/state/label_allocation_mode (identityref)

    YANG Description: The label allocation mode to be used for L3 entries
in the network instance
    """
    return self.__label_allocation_mode
      
  def _set_label_allocation_mode(self, v, load=False):
    """
    Setter method for label_allocation_mode, mapped from YANG variable /network_instances/network_instance/encapsulation/state/label_allocation_mode (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_label_allocation_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_label_allocation_mode() directly.

    YANG Description: The label allocation mode to be used for L3 entries
in the network instance
    """
    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={'PER_PREFIX': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:PER_PREFIX': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'PER_NEXTHOP': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:PER_NEXTHOP': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'INSTANCE_LABEL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:INSTANCE_LABEL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="label-allocation-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """label_allocation_mode must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PER_PREFIX': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:PER_PREFIX': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'PER_NEXTHOP': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:PER_NEXTHOP': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'INSTANCE_LABEL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:INSTANCE_LABEL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="label-allocation-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

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

  def _unset_label_allocation_mode(self):
    self.__label_allocation_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PER_PREFIX': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:PER_PREFIX': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'PER_NEXTHOP': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:PER_NEXTHOP': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'INSTANCE_LABEL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:INSTANCE_LABEL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="label-allocation-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_control_word(self):
    """
    Getter method for control_word, mapped from YANG variable /network_instances/network_instance/encapsulation/state/control_word (boolean)

    YANG Description: Whether the control-word should be used for the network
instance
    """
    return self.__control_word
      
  def _set_control_word(self, v, load=False):
    """
    Setter method for control_word, mapped from YANG variable /network_instances/network_instance/encapsulation/state/control_word (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_control_word is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_control_word() directly.

    YANG Description: Whether the control-word should be used for the network
instance
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="control-word", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """control_word must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="control-word", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

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

  def _unset_control_word(self):
    self.__control_word = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="control-word", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  encapsulation_type = __builtin__.property(_get_encapsulation_type)
  label_allocation_mode = __builtin__.property(_get_label_allocation_mode)
  control_word = __builtin__.property(_get_control_word)


  _pyangbind_elements = OrderedDict([('encapsulation_type', encapsulation_type), ('label_allocation_mode', label_allocation_mode), ('control_word', control_word), ])


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

  YANG Description: Configuration parameters relating to the encapsulation
used for the network instance
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'encapsulation'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_encapsulation_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_encapsulation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'encapsulation']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/encapsulation/config (container)

    YANG Description: Configuration parameters relating to the encapsulation
of the network instance
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/encapsulation/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 encapsulation
of the network instance
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_encapsulation_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_encapsulation_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_encapsulation_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/encapsulation/state (container)

    YANG Description: State parameters relating to the encapsulation of
the network instance
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/encapsulation/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 parameters relating to the encapsulation of
the network instance
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_encapsulation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_encapsulation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_encapsulation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_inter_instance_policies_apply_policy_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/inter-instance-policies/apply-policy/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Policy configuration data.
  """
  __slots__ = ('_path_helper', '_extmethods', '__import_policy','__default_import_policy','__export_policy','__default_export_policy',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)
    self.__export_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__default_export_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-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 ['network-instances', 'network-instance', 'inter-instance-policies', 'apply-policy', 'config']

  def _get_import_policy(self):
    """
    Getter method for import_policy, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_policy/config/import_policy (leafref)

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    return self.__import_policy
      
  def _set_import_policy(self, v, load=False):
    """
    Setter method for import_policy, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_policy/config/import_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_import_policy() directly.

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """import_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_import_policy(self):
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_default_import_policy(self):
    """
    Getter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_policy/config/default_import_policy (default-policy-type)

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    return self.__default_import_policy
      
  def _set_default_import_policy(self, v, load=False):
    """
    Setter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_policy/config/default_import_policy (default-policy-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_default_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_default_import_policy() directly.

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    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={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """default_import_policy must be of a type compatible with default-policy-type""",
          'defined-type': "openconfig-network-instance:default-policy-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)""",
        })

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

  def _unset_default_import_policy(self):
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)


  def _get_export_policy(self):
    """
    Getter method for export_policy, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_policy/config/export_policy (leafref)

    YANG Description: list of policy names in sequence to be applied on
sending a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    return self.__export_policy
      
  def _set_export_policy(self, v, load=False):
    """
    Setter method for export_policy, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_policy/config/export_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_export_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_export_policy() directly.

    YANG Description: list of policy names in sequence to be applied on
sending a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """export_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_export_policy(self):
    self.__export_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_default_export_policy(self):
    """
    Getter method for default_export_policy, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_policy/config/default_export_policy (default-policy-type)

    YANG Description: explicitly set a default policy if no policy definition
in the export policy chain is satisfied.
    """
    return self.__default_export_policy
      
  def _set_default_export_policy(self, v, load=False):
    """
    Setter method for default_export_policy, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_policy/config/default_export_policy (default-policy-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_default_export_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_default_export_policy() directly.

    YANG Description: explicitly set a default policy if no policy definition
in the export policy chain is satisfied.
    """
    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={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """default_export_policy must be of a type compatible with default-policy-type""",
          'defined-type': "openconfig-network-instance:default-policy-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)""",
        })

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

  def _unset_default_export_policy(self):
    self.__default_export_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)

  import_policy = __builtin__.property(_get_import_policy, _set_import_policy)
  default_import_policy = __builtin__.property(_get_default_import_policy, _set_default_import_policy)
  export_policy = __builtin__.property(_get_export_policy, _set_export_policy)
  default_export_policy = __builtin__.property(_get_default_export_policy, _set_default_export_policy)


  _pyangbind_elements = OrderedDict([('import_policy', import_policy), ('default_import_policy', default_import_policy), ('export_policy', export_policy), ('default_export_policy', default_export_policy), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_inter_instance_policies_apply_policy_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/inter-instance-policies/apply-policy/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for routing policy
  """
  __slots__ = ('_path_helper', '_extmethods', '__import_policy','__default_import_policy','__export_policy','__default_export_policy',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)
    self.__export_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__default_export_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-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 ['network-instances', 'network-instance', 'inter-instance-policies', 'apply-policy', 'state']

  def _get_import_policy(self):
    """
    Getter method for import_policy, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_policy/state/import_policy (leafref)

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    return self.__import_policy
      
  def _set_import_policy(self, v, load=False):
    """
    Setter method for import_policy, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_policy/state/import_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_import_policy() directly.

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """import_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_import_policy(self):
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_default_import_policy(self):
    """
    Getter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_policy/state/default_import_policy (default-policy-type)

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    return self.__default_import_policy
      
  def _set_default_import_policy(self, v, load=False):
    """
    Setter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_policy/state/default_import_policy (default-policy-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_default_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_default_import_policy() directly.

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    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={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """default_import_policy must be of a type compatible with default-policy-type""",
          'defined-type': "openconfig-network-instance:default-policy-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)""",
        })

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

  def _unset_default_import_policy(self):
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)


  def _get_export_policy(self):
    """
    Getter method for export_policy, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_policy/state/export_policy (leafref)

    YANG Description: list of policy names in sequence to be applied on
sending a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    return self.__export_policy
      
  def _set_export_policy(self, v, load=False):
    """
    Setter method for export_policy, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_policy/state/export_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_export_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_export_policy() directly.

    YANG Description: list of policy names in sequence to be applied on
sending a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """export_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_export_policy(self):
    self.__export_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_default_export_policy(self):
    """
    Getter method for default_export_policy, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_policy/state/default_export_policy (default-policy-type)

    YANG Description: explicitly set a default policy if no policy definition
in the export policy chain is satisfied.
    """
    return self.__default_export_policy
      
  def _set_default_export_policy(self, v, load=False):
    """
    Setter method for default_export_policy, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_policy/state/default_export_policy (default-policy-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_default_export_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_default_export_policy() directly.

    YANG Description: explicitly set a default policy if no policy definition
in the export policy chain is satisfied.
    """
    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={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """default_export_policy must be of a type compatible with default-policy-type""",
          'defined-type': "openconfig-network-instance:default-policy-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)""",
        })

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

  def _unset_default_export_policy(self):
    self.__default_export_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)

  import_policy = __builtin__.property(_get_import_policy)
  default_import_policy = __builtin__.property(_get_default_import_policy)
  export_policy = __builtin__.property(_get_export_policy)
  default_export_policy = __builtin__.property(_get_default_export_policy)


  _pyangbind_elements = OrderedDict([('import_policy', import_policy), ('default_import_policy', default_import_policy), ('export_policy', export_policy), ('default_export_policy', default_export_policy), ])


class yc_apply_policy_openconfig_network_instance__network_instances_network_instance_inter_instance_policies_apply_policy(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/inter-instance-policies/apply-policy. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Anchor point for routing policies in the model.
Import and export policies are with respect to the local
routing table, i.e., export (send) and import (receive),
depending on the context.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'apply-policy'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_inter_instance_policies_apply_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_inter_instance_policies_apply_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'inter-instance-policies', 'apply-policy']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_policy/config (container)

    YANG Description: Policy configuration data.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_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: Policy configuration data.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_inter_instance_policies_apply_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_inter_instance_policies_apply_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_inter_instance_policies_apply_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_policy/state (container)

    YANG Description: Operational state for routing policy
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_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 for routing policy
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_inter_instance_policies_apply_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_inter_instance_policies_apply_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_inter_instance_policies_apply_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_inter_instance_policies_import_export_policy_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/inter-instance-policies/import-export-policy/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters to set the import and export policies
associated with a EVI
  """
  __slots__ = ('_path_helper', '_extmethods', '__export_route_target','__import_route_target',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__export_route_target = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="export-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)
    self.__import_route_target = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="import-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)

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

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'inter-instance-policies', 'import-export-policy', 'config']

  def _get_export_route_target(self):
    """
    Getter method for export_route_target, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/import_export_policy/config/export_route_target (union)

    YANG Description: Export Route Target (RT) in the network-instance on a PE.
    """
    return self.__export_route_target
      
  def _set_export_route_target(self, v, load=False):
    """
    Setter method for export_route_target, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/import_export_policy/config/export_route_target (union)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_export_route_target is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_export_route_target() directly.

    YANG Description: Export Route Target (RT) in the network-instance on a PE.
    """
    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_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="export-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """export_route_target must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="export-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)""",
        })

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

  def _unset_export_route_target(self):
    self.__export_route_target = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="export-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)


  def _get_import_route_target(self):
    """
    Getter method for import_route_target, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/import_export_policy/config/import_route_target (union)

    YANG Description: Import Route Target (RT) in the network-instance on a PE.
    """
    return self.__import_route_target
      
  def _set_import_route_target(self, v, load=False):
    """
    Setter method for import_route_target, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/import_export_policy/config/import_route_target (union)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_import_route_target is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_import_route_target() directly.

    YANG Description: Import Route Target (RT) in the network-instance on a PE.
    """
    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_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="import-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """import_route_target must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="import-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)""",
        })

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

  def _unset_import_route_target(self):
    self.__import_route_target = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="import-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)

  export_route_target = __builtin__.property(_get_export_route_target, _set_export_route_target)
  import_route_target = __builtin__.property(_get_import_route_target, _set_import_route_target)


  _pyangbind_elements = OrderedDict([('export_route_target', export_route_target), ('import_route_target', import_route_target), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_inter_instance_policies_import_export_policy_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/inter-instance-policies/import-export-policy/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of the import and export policies
associated with a EVI
  """
  __slots__ = ('_path_helper', '_extmethods', '__export_route_target','__import_route_target',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__export_route_target = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="export-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    self.__import_route_target = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="import-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', 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 ['network-instances', 'network-instance', 'inter-instance-policies', 'import-export-policy', 'state']

  def _get_export_route_target(self):
    """
    Getter method for export_route_target, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/import_export_policy/state/export_route_target (union)

    YANG Description: Export Route Target (RT) in the network-instance on a PE.
    """
    return self.__export_route_target
      
  def _set_export_route_target(self, v, load=False):
    """
    Setter method for export_route_target, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/import_export_policy/state/export_route_target (union)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_export_route_target is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_export_route_target() directly.

    YANG Description: Export Route Target (RT) in the network-instance on a PE.
    """
    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_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="export-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """export_route_target must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="export-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)""",
        })

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

  def _unset_export_route_target(self):
    self.__export_route_target = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="export-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)


  def _get_import_route_target(self):
    """
    Getter method for import_route_target, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/import_export_policy/state/import_route_target (union)

    YANG Description: Import Route Target (RT) in the network-instance on a PE.
    """
    return self.__import_route_target
      
  def _set_import_route_target(self, v, load=False):
    """
    Setter method for import_route_target, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/import_export_policy/state/import_route_target (union)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_import_route_target is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_import_route_target() directly.

    YANG Description: Import Route Target (RT) in the network-instance on a PE.
    """
    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_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="import-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """import_route_target must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="import-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)""",
        })

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

  def _unset_import_route_target(self):
    self.__import_route_target = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="import-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)

  export_route_target = __builtin__.property(_get_export_route_target)
  import_route_target = __builtin__.property(_get_import_route_target)


  _pyangbind_elements = OrderedDict([('export_route_target', export_route_target), ('import_route_target', import_route_target), ])


class yc_import_export_policy_openconfig_network_instance__network_instances_network_instance_inter_instance_policies_import_export_policy(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/inter-instance-policies/import-export-policy. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top container to set the import and export policies
associated with a EVI
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'import-export-policy'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_inter_instance_policies_import_export_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_inter_instance_policies_import_export_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'inter-instance-policies', 'import-export-policy']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/import_export_policy/config (container)

    YANG Description: Configuration parameters to set the import and export policies
associated with a EVI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/import_export_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 to set the import and export policies
associated with a EVI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_inter_instance_policies_import_export_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_inter_instance_policies_import_export_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_inter_instance_policies_import_export_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/import_export_policy/state (container)

    YANG Description: State parameters of the import and export policies
associated with a EVI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/import_export_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: State parameters of the import and export policies
associated with a EVI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_inter_instance_policies_import_export_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_inter_instance_policies_import_export_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_inter_instance_policies_import_export_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/network-instance', defining_module='openconfig-network-instance', 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_inter_instance_policies_openconfig_network_instance__network_instances_network_instance_inter_instance_policies(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/inter-instance-policies. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Policies dictating how RIB or FIB entries are imported
to and exported from this instance
  """
  __slots__ = ('_path_helper', '_extmethods', '__apply_policy','__import_export_policy',)

  _yang_name = 'inter-instance-policies'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__apply_policy = YANGDynClass(base=yc_apply_policy_openconfig_network_instance__network_instances_network_instance_inter_instance_policies_apply_policy, is_container='container', yang_name="apply-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__import_export_policy = YANGDynClass(base=yc_import_export_policy_openconfig_network_instance__network_instances_network_instance_inter_instance_policies_import_export_policy, is_container='container', yang_name="import-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'inter-instance-policies']

  def _get_apply_policy(self):
    """
    Getter method for apply_policy, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_policy (container)

    YANG Description: Anchor point for routing policies in the model.
Import and export policies are with respect to the local
routing table, i.e., export (send) and import (receive),
depending on the context.
    """
    return self.__apply_policy
      
  def _set_apply_policy(self, v, load=False):
    """
    Setter method for apply_policy, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_policy (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_apply_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_apply_policy() directly.

    YANG Description: Anchor point for routing policies in the model.
Import and export policies are with respect to the local
routing table, i.e., export (send) and import (receive),
depending on the context.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_apply_policy_openconfig_network_instance__network_instances_network_instance_inter_instance_policies_apply_policy, is_container='container', yang_name="apply-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """apply_policy must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_apply_policy_openconfig_network_instance__network_instances_network_instance_inter_instance_policies_apply_policy, is_container='container', yang_name="apply-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

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

  def _unset_apply_policy(self):
    self.__apply_policy = YANGDynClass(base=yc_apply_policy_openconfig_network_instance__network_instances_network_instance_inter_instance_policies_apply_policy, is_container='container', yang_name="apply-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_import_export_policy(self):
    """
    Getter method for import_export_policy, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/import_export_policy (container)

    YANG Description: Top container to set the import and export policies
associated with a EVI
    """
    return self.__import_export_policy
      
  def _set_import_export_policy(self, v, load=False):
    """
    Setter method for import_export_policy, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/import_export_policy (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_import_export_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_import_export_policy() directly.

    YANG Description: Top container to set the import and export policies
associated with a EVI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_import_export_policy_openconfig_network_instance__network_instances_network_instance_inter_instance_policies_import_export_policy, is_container='container', yang_name="import-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """import_export_policy must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_import_export_policy_openconfig_network_instance__network_instances_network_instance_inter_instance_policies_import_export_policy, is_container='container', yang_name="import-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

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

  def _unset_import_export_policy(self):
    self.__import_export_policy = YANGDynClass(base=yc_import_export_policy_openconfig_network_instance__network_instances_network_instance_inter_instance_policies_import_export_policy, is_container='container', yang_name="import-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  apply_policy = __builtin__.property(_get_apply_policy, _set_apply_policy)
  import_export_policy = __builtin__.property(_get_import_export_policy, _set_import_export_policy)


  _pyangbind_elements = OrderedDict([('apply_policy', apply_policy), ('import_export_policy', import_export_policy), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_table_connections_table_connection_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/table-connections/table-connection/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 connection
between tables
  """
  __slots__ = ('_path_helper', '_extmethods', '__src_protocol','__address_family','__dst_protocol','__disable_metric_propagation','__import_policy','__default_import_policy',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__src_protocol = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="src-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__address_family = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__dst_protocol = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="dst-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__disable_metric_propagation = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-metric-propagation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-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 ['network-instances', 'network-instance', 'table-connections', 'table-connection', 'config']

  def _get_src_protocol(self):
    """
    Getter method for src_protocol, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/config/src_protocol (leafref)

    YANG Description: The source protocol for the table connection
    """
    return self.__src_protocol
      
  def _set_src_protocol(self, v, load=False):
    """
    Setter method for src_protocol, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/config/src_protocol (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_src_protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_src_protocol() directly.

    YANG Description: The source protocol for the table connection
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="src-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """src_protocol must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="src-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_src_protocol(self):
    self.__src_protocol = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="src-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_address_family(self):
    """
    Getter method for address_family, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/config/address_family (leafref)

    YANG Description: The address family associated with the connection. This
must be defined for the source protocol. The target
address family is implicitly defined by the address family
specified for the source protocol.
    """
    return self.__address_family
      
  def _set_address_family(self, v, load=False):
    """
    Setter method for address_family, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/config/address_family (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address_family is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address_family() directly.

    YANG Description: The address family associated with the connection. This
must be defined for the source protocol. The target
address family is implicitly defined by the address family
specified for the source protocol.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address_family must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_address_family(self):
    self.__address_family = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_dst_protocol(self):
    """
    Getter method for dst_protocol, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/config/dst_protocol (leafref)

    YANG Description: The destination protocol for the table connection
    """
    return self.__dst_protocol
      
  def _set_dst_protocol(self, v, load=False):
    """
    Setter method for dst_protocol, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/config/dst_protocol (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dst_protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dst_protocol() directly.

    YANG Description: The destination protocol for the table connection
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="dst-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dst_protocol must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="dst-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_dst_protocol(self):
    self.__dst_protocol = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="dst-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_disable_metric_propagation(self):
    """
    Getter method for disable_metric_propagation, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/config/disable_metric_propagation (boolean)

    YANG Description: By default a system may reflect the metric specified in
the destination protocol according to that which is set in
the source protocol. For example:
- IS-IS metric may be reflected in BGP MED (and vice versa)
- OSPF metric may be reflected in the BGP MED (and vice versa)
When this leaf is set to true, this reflection behaviour MUST be
disabled, and rather the metric must be set to the default value,
or explicitly set by policy.
    """
    return self.__disable_metric_propagation
      
  def _set_disable_metric_propagation(self, v, load=False):
    """
    Setter method for disable_metric_propagation, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/config/disable_metric_propagation (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_disable_metric_propagation is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_disable_metric_propagation() directly.

    YANG Description: By default a system may reflect the metric specified in
the destination protocol according to that which is set in
the source protocol. For example:
- IS-IS metric may be reflected in BGP MED (and vice versa)
- OSPF metric may be reflected in the BGP MED (and vice versa)
When this leaf is set to true, this reflection behaviour MUST be
disabled, and rather the metric must be set to the default value,
or explicitly set by policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-metric-propagation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """disable_metric_propagation must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-metric-propagation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

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

  def _unset_disable_metric_propagation(self):
    self.__disable_metric_propagation = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-metric-propagation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_import_policy(self):
    """
    Getter method for import_policy, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/config/import_policy (leafref)

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    return self.__import_policy
      
  def _set_import_policy(self, v, load=False):
    """
    Setter method for import_policy, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/config/import_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_import_policy() directly.

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """import_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_import_policy(self):
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_default_import_policy(self):
    """
    Getter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/config/default_import_policy (default-policy-type)

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    return self.__default_import_policy
      
  def _set_default_import_policy(self, v, load=False):
    """
    Setter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/config/default_import_policy (default-policy-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_default_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_default_import_policy() directly.

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    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={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """default_import_policy must be of a type compatible with default-policy-type""",
          'defined-type': "openconfig-network-instance:default-policy-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)""",
        })

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

  def _unset_default_import_policy(self):
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)

  src_protocol = __builtin__.property(_get_src_protocol, _set_src_protocol)
  address_family = __builtin__.property(_get_address_family, _set_address_family)
  dst_protocol = __builtin__.property(_get_dst_protocol, _set_dst_protocol)
  disable_metric_propagation = __builtin__.property(_get_disable_metric_propagation, _set_disable_metric_propagation)
  import_policy = __builtin__.property(_get_import_policy, _set_import_policy)
  default_import_policy = __builtin__.property(_get_default_import_policy, _set_default_import_policy)


  _pyangbind_elements = OrderedDict([('src_protocol', src_protocol), ('address_family', address_family), ('dst_protocol', dst_protocol), ('disable_metric_propagation', disable_metric_propagation), ('import_policy', import_policy), ('default_import_policy', default_import_policy), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_table_connections_table_connection_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/table-connections/table-connection/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to the connection between
tables
  """
  __slots__ = ('_path_helper', '_extmethods', '__src_protocol','__address_family','__dst_protocol','__disable_metric_propagation','__import_policy','__default_import_policy',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__src_protocol = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="src-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__address_family = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__dst_protocol = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="dst-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__disable_metric_propagation = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-metric-propagation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-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 ['network-instances', 'network-instance', 'table-connections', 'table-connection', 'state']

  def _get_src_protocol(self):
    """
    Getter method for src_protocol, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/state/src_protocol (leafref)

    YANG Description: The source protocol for the table connection
    """
    return self.__src_protocol
      
  def _set_src_protocol(self, v, load=False):
    """
    Setter method for src_protocol, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/state/src_protocol (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_src_protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_src_protocol() directly.

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

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

  def _unset_src_protocol(self):
    self.__src_protocol = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="src-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_address_family(self):
    """
    Getter method for address_family, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/state/address_family (leafref)

    YANG Description: The address family associated with the connection. This
must be defined for the source protocol. The target
address family is implicitly defined by the address family
specified for the source protocol.
    """
    return self.__address_family
      
  def _set_address_family(self, v, load=False):
    """
    Setter method for address_family, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/state/address_family (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address_family is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address_family() directly.

    YANG Description: The address family associated with the connection. This
must be defined for the source protocol. The target
address family is implicitly defined by the address family
specified for the source protocol.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address_family must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_address_family(self):
    self.__address_family = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_dst_protocol(self):
    """
    Getter method for dst_protocol, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/state/dst_protocol (leafref)

    YANG Description: The destination protocol for the table connection
    """
    return self.__dst_protocol
      
  def _set_dst_protocol(self, v, load=False):
    """
    Setter method for dst_protocol, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/state/dst_protocol (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dst_protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dst_protocol() directly.

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

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

  def _unset_dst_protocol(self):
    self.__dst_protocol = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="dst-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_disable_metric_propagation(self):
    """
    Getter method for disable_metric_propagation, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/state/disable_metric_propagation (boolean)

    YANG Description: By default a system may reflect the metric specified in
the destination protocol according to that which is set in
the source protocol. For example:
- IS-IS metric may be reflected in BGP MED (and vice versa)
- OSPF metric may be reflected in the BGP MED (and vice versa)
When this leaf is set to true, this reflection behaviour MUST be
disabled, and rather the metric must be set to the default value,
or explicitly set by policy.
    """
    return self.__disable_metric_propagation
      
  def _set_disable_metric_propagation(self, v, load=False):
    """
    Setter method for disable_metric_propagation, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/state/disable_metric_propagation (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_disable_metric_propagation is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_disable_metric_propagation() directly.

    YANG Description: By default a system may reflect the metric specified in
the destination protocol according to that which is set in
the source protocol. For example:
- IS-IS metric may be reflected in BGP MED (and vice versa)
- OSPF metric may be reflected in the BGP MED (and vice versa)
When this leaf is set to true, this reflection behaviour MUST be
disabled, and rather the metric must be set to the default value,
or explicitly set by policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-metric-propagation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """disable_metric_propagation must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-metric-propagation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

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

  def _unset_disable_metric_propagation(self):
    self.__disable_metric_propagation = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-metric-propagation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_import_policy(self):
    """
    Getter method for import_policy, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/state/import_policy (leafref)

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    return self.__import_policy
      
  def _set_import_policy(self, v, load=False):
    """
    Setter method for import_policy, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/state/import_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_import_policy() directly.

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """import_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_import_policy(self):
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_default_import_policy(self):
    """
    Getter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/state/default_import_policy (default-policy-type)

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    return self.__default_import_policy
      
  def _set_default_import_policy(self, v, load=False):
    """
    Setter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/state/default_import_policy (default-policy-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_default_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_default_import_policy() directly.

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    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={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """default_import_policy must be of a type compatible with default-policy-type""",
          'defined-type': "openconfig-network-instance:default-policy-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)""",
        })

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

  def _unset_default_import_policy(self):
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)

  src_protocol = __builtin__.property(_get_src_protocol)
  address_family = __builtin__.property(_get_address_family)
  dst_protocol = __builtin__.property(_get_dst_protocol)
  disable_metric_propagation = __builtin__.property(_get_disable_metric_propagation)
  import_policy = __builtin__.property(_get_import_policy)
  default_import_policy = __builtin__.property(_get_default_import_policy)


  _pyangbind_elements = OrderedDict([('src_protocol', src_protocol), ('address_family', address_family), ('dst_protocol', dst_protocol), ('disable_metric_propagation', disable_metric_propagation), ('import_policy', import_policy), ('default_import_policy', default_import_policy), ])


class yc_table_connection_openconfig_network_instance__network_instances_network_instance_table_connections_table_connection(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/table-connections/table-connection. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A list of connections between pairs of routing or
forwarding tables, the leaking of entries between
which is specified by the import policy.

A connection connecting a source table to a destination
table implies that routes that match the policy specified
for the connection are available for the destination
protocol to advertise, or match within its policies.
  """
  __slots__ = ('_path_helper', '_extmethods', '__src_protocol','__dst_protocol','__address_family','__config','__state',)

  _yang_name = 'table-connection'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__src_protocol = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="src-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__dst_protocol = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="dst-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__address_family = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_table_connections_table_connection_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_table_connections_table_connection_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'table-connections', 'table-connection']

  def _get_src_protocol(self):
    """
    Getter method for src_protocol, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/src_protocol (leafref)

    YANG Description: The name of the protocol associated with the table
which should be utilised as the source of forwarding
or routing information
    """
    return self.__src_protocol
      
  def _set_src_protocol(self, v, load=False):
    """
    Setter method for src_protocol, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/src_protocol (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_src_protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_src_protocol() directly.

    YANG Description: The name of the protocol associated with the table
which should be utilised as the source of forwarding
or routing information
    """
    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="src-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """src_protocol must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="src-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_src_protocol(self):
    self.__src_protocol = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="src-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_dst_protocol(self):
    """
    Getter method for dst_protocol, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/dst_protocol (leafref)

    YANG Description: The table to which routing entries should be
exported
    """
    return self.__dst_protocol
      
  def _set_dst_protocol(self, v, load=False):
    """
    Setter method for dst_protocol, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/dst_protocol (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dst_protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dst_protocol() directly.

    YANG Description: The table to which routing entries should be
exported
    """
    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="dst-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dst_protocol must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="dst-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_dst_protocol(self):
    self.__dst_protocol = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="dst-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_address_family(self):
    """
    Getter method for address_family, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/address_family (leafref)

    YANG Description: The address family associated with the connection
    """
    return self.__address_family
      
  def _set_address_family(self, v, load=False):
    """
    Setter method for address_family, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/address_family (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address_family is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address_family() directly.

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

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

  def _unset_address_family(self):
    self.__address_family = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/config (container)

    YANG Description: Configuration parameters relating to the connection
between tables
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/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 connection
between tables
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_table_connections_table_connection_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_table_connections_table_connection_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_table_connections_table_connection_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/state (container)

    YANG Description: State parameters relating to the connection between
tables
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/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 parameters relating to the connection between
tables
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_table_connections_table_connection_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_table_connections_table_connection_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_table_connections_table_connection_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  src_protocol = __builtin__.property(_get_src_protocol, _set_src_protocol)
  dst_protocol = __builtin__.property(_get_dst_protocol, _set_dst_protocol)
  address_family = __builtin__.property(_get_address_family, _set_address_family)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('src_protocol', src_protocol), ('dst_protocol', dst_protocol), ('address_family', address_family), ('config', config), ('state', state), ])


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

  YANG Description: Policies dictating how RIB or FIB entries are propagated
between tables
  """
  __slots__ = ('_path_helper', '_extmethods', '__table_connection',)

  _yang_name = 'table-connections'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__table_connection = YANGDynClass(base=YANGListType("src_protocol dst_protocol address_family",yc_table_connection_openconfig_network_instance__network_instances_network_instance_table_connections_table_connection, yang_name="table-connection", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='src-protocol dst-protocol address-family', extensions=None), is_container='list', yang_name="table-connection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'table-connections']

  def _get_table_connection(self):
    """
    Getter method for table_connection, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection (list)

    YANG Description: A list of connections between pairs of routing or
forwarding tables, the leaking of entries between
which is specified by the import policy.

A connection connecting a source table to a destination
table implies that routes that match the policy specified
for the connection are available for the destination
protocol to advertise, or match within its policies.
    """
    return self.__table_connection
      
  def _set_table_connection(self, v, load=False):
    """
    Setter method for table_connection, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_table_connection is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_table_connection() directly.

    YANG Description: A list of connections between pairs of routing or
forwarding tables, the leaking of entries between
which is specified by the import policy.

A connection connecting a source table to a destination
table implies that routes that match the policy specified
for the connection are available for the destination
protocol to advertise, or match within its policies.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("src_protocol dst_protocol address_family",yc_table_connection_openconfig_network_instance__network_instances_network_instance_table_connections_table_connection, yang_name="table-connection", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='src-protocol dst-protocol address-family', extensions=None), is_container='list', yang_name="table-connection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """table_connection must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("src_protocol dst_protocol address_family",yc_table_connection_openconfig_network_instance__network_instances_network_instance_table_connections_table_connection, yang_name="table-connection", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='src-protocol dst-protocol address-family', extensions=None), is_container='list', yang_name="table-connection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

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

  def _unset_table_connection(self):
    self.__table_connection = YANGDynClass(base=YANGListType("src_protocol dst_protocol address_family",yc_table_connection_openconfig_network_instance__network_instances_network_instance_table_connections_table_connection, yang_name="table-connection", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='src-protocol dst-protocol address-family', extensions=None), is_container='list', yang_name="table-connection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  table_connection = __builtin__.property(_get_table_connection, _set_table_connection)


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


class yc_config_openconfig_network_instance__network_instances_network_instance_interfaces_interface_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/interfaces/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 associated
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__interface','__subinterface','__associated_address_families','__mac_pinning','__irb_anycast_gateway',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__associated_address_families = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},)), is_leaf=False, yang_name="associated-address-families", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__mac_pinning = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="mac-pinning", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__irb_anycast_gateway = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DISTRIBUTED_SYMETRIC': {}, 'DISTRIBUTED_ASYMETRIC': {}, 'HYBRID': {}, 'CENTRALIZED': {}},), is_leaf=True, yang_name="irb-anycast-gateway", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'interfaces', 'interface', 'config']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /network_instances/network_instance/interfaces/interface/config/id (string)

    YANG Description: A unique identifier for this interface - this is expressed
as a free-text string
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /network_instances/network_instance/interfaces/interface/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: A unique identifier for this interface - this is expressed
as a free-text string
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/interfaces/interface/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 /network_instances/network_instance/interfaces/interface/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/interfaces/interface/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 /network_instances/network_instance/interfaces/interface/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_associated_address_families(self):
    """
    Getter method for associated_address_families, mapped from YANG variable /network_instances/network_instance/interfaces/interface/config/associated_address_families (identityref)

    YANG Description: The address families on the subinterface which are to be
associated with this network instance. When this leaf-list
is empty and the network instance requires Layer 3 information
the address families for which the network instance is
enabled should be imported. If the value of this leaf-list
is specified then the association MUST only be made for
those address families that are included in the list.
    """
    return self.__associated_address_families
      
  def _set_associated_address_families(self, v, load=False):
    """
    Setter method for associated_address_families, mapped from YANG variable /network_instances/network_instance/interfaces/interface/config/associated_address_families (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_associated_address_families is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_associated_address_families() directly.

    YANG Description: The address families on the subinterface which are to be
associated with this network instance. When this leaf-list
is empty and the network instance requires Layer 3 information
the address families for which the network instance is
enabled should be imported. If the value of this leaf-list
is specified then the association MUST only be made for
those address families that are included in the list.
    """
    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={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},)), is_leaf=False, yang_name="associated-address-families", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """associated_address_families must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},)), is_leaf=False, yang_name="associated-address-families", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

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

  def _unset_associated_address_families(self):
    self.__associated_address_families = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},)), is_leaf=False, yang_name="associated-address-families", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_mac_pinning(self):
    """
    Getter method for mac_pinning, mapped from YANG variable /network_instances/network_instance/interfaces/interface/config/mac_pinning (boolean)

    YANG Description: Enable (TRUE) or disable (FALSE). There are scenarios in which
it is desired to configure some MAC addresses as static so
that they are not subjected to MAC moves. If you enable MAC pinning
on a CE interface, that MAC address cannot be moved to any
other CE interface
    """
    return self.__mac_pinning
      
  def _set_mac_pinning(self, v, load=False):
    """
    Setter method for mac_pinning, mapped from YANG variable /network_instances/network_instance/interfaces/interface/config/mac_pinning (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_pinning is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_pinning() directly.

    YANG Description: Enable (TRUE) or disable (FALSE). There are scenarios in which
it is desired to configure some MAC addresses as static so
that they are not subjected to MAC moves. If you enable MAC pinning
on a CE interface, that MAC address cannot be moved to any
other CE interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="mac-pinning", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_pinning must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="mac-pinning", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

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

  def _unset_mac_pinning(self):
    self.__mac_pinning = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="mac-pinning", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_irb_anycast_gateway(self):
    """
    Getter method for irb_anycast_gateway, mapped from YANG variable /network_instances/network_instance/interfaces/interface/config/irb_anycast_gateway (enumeration)

    YANG Description: Associate VLAN SVI with anycast Gateway.
The SVI is the layer3 interface for the mac-vrf
when the SVI is being used as the first hop default gw.
    """
    return self.__irb_anycast_gateway
      
  def _set_irb_anycast_gateway(self, v, load=False):
    """
    Setter method for irb_anycast_gateway, mapped from YANG variable /network_instances/network_instance/interfaces/interface/config/irb_anycast_gateway (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_irb_anycast_gateway is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_irb_anycast_gateway() directly.

    YANG Description: Associate VLAN SVI with anycast Gateway.
The SVI is the layer3 interface for the mac-vrf
when the SVI is being used as the first hop default gw.
    """
    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={'DISTRIBUTED_SYMETRIC': {}, 'DISTRIBUTED_ASYMETRIC': {}, 'HYBRID': {}, 'CENTRALIZED': {}},), is_leaf=True, yang_name="irb-anycast-gateway", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """irb_anycast_gateway must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DISTRIBUTED_SYMETRIC': {}, 'DISTRIBUTED_ASYMETRIC': {}, 'HYBRID': {}, 'CENTRALIZED': {}},), is_leaf=True, yang_name="irb-anycast-gateway", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)""",
        })

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

  def _unset_irb_anycast_gateway(self):
    self.__irb_anycast_gateway = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DISTRIBUTED_SYMETRIC': {}, 'DISTRIBUTED_ASYMETRIC': {}, 'HYBRID': {}, 'CENTRALIZED': {}},), is_leaf=True, yang_name="irb-anycast-gateway", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)

  id = __builtin__.property(_get_id, _set_id)
  interface = __builtin__.property(_get_interface, _set_interface)
  subinterface = __builtin__.property(_get_subinterface, _set_subinterface)
  associated_address_families = __builtin__.property(_get_associated_address_families, _set_associated_address_families)
  mac_pinning = __builtin__.property(_get_mac_pinning, _set_mac_pinning)
  irb_anycast_gateway = __builtin__.property(_get_irb_anycast_gateway, _set_irb_anycast_gateway)


  _pyangbind_elements = OrderedDict([('id', id), ('interface', interface), ('subinterface', subinterface), ('associated_address_families', associated_address_families), ('mac_pinning', mac_pinning), ('irb_anycast_gateway', irb_anycast_gateway), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_interfaces_interface_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/interfaces/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
associated interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__interface','__subinterface','__associated_address_families','__mac_pinning','__irb_anycast_gateway',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__associated_address_families = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},)), is_leaf=False, yang_name="associated-address-families", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__mac_pinning = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="mac-pinning", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__irb_anycast_gateway = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DISTRIBUTED_SYMETRIC': {}, 'DISTRIBUTED_ASYMETRIC': {}, 'HYBRID': {}, 'CENTRALIZED': {}},), is_leaf=True, yang_name="irb-anycast-gateway", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'interfaces', 'interface', 'state']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /network_instances/network_instance/interfaces/interface/state/id (string)

    YANG Description: A unique identifier for this interface - this is expressed
as a free-text string
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /network_instances/network_instance/interfaces/interface/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: A unique identifier for this interface - this is expressed
as a free-text string
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/interfaces/interface/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 /network_instances/network_instance/interfaces/interface/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/interfaces/interface/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 /network_instances/network_instance/interfaces/interface/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_associated_address_families(self):
    """
    Getter method for associated_address_families, mapped from YANG variable /network_instances/network_instance/interfaces/interface/state/associated_address_families (identityref)

    YANG Description: The address families on the subinterface which are to be
associated with this network instance. When this leaf-list
is empty and the network instance requires Layer 3 information
the address families for which the network instance is
enabled should be imported. If the value of this leaf-list
is specified then the association MUST only be made for
those address families that are included in the list.
    """
    return self.__associated_address_families
      
  def _set_associated_address_families(self, v, load=False):
    """
    Setter method for associated_address_families, mapped from YANG variable /network_instances/network_instance/interfaces/interface/state/associated_address_families (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_associated_address_families is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_associated_address_families() directly.

    YANG Description: The address families on the subinterface which are to be
associated with this network instance. When this leaf-list
is empty and the network instance requires Layer 3 information
the address families for which the network instance is
enabled should be imported. If the value of this leaf-list
is specified then the association MUST only be made for
those address families that are included in the list.
    """
    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={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},)), is_leaf=False, yang_name="associated-address-families", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """associated_address_families must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},)), is_leaf=False, yang_name="associated-address-families", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

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

  def _unset_associated_address_families(self):
    self.__associated_address_families = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},)), is_leaf=False, yang_name="associated-address-families", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_mac_pinning(self):
    """
    Getter method for mac_pinning, mapped from YANG variable /network_instances/network_instance/interfaces/interface/state/mac_pinning (boolean)

    YANG Description: Enable (TRUE) or disable (FALSE). There are scenarios in which
it is desired to configure some MAC addresses as static so
that they are not subjected to MAC moves. If you enable MAC pinning
on a CE interface, that MAC address cannot be moved to any
other CE interface
    """
    return self.__mac_pinning
      
  def _set_mac_pinning(self, v, load=False):
    """
    Setter method for mac_pinning, mapped from YANG variable /network_instances/network_instance/interfaces/interface/state/mac_pinning (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_pinning is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_pinning() directly.

    YANG Description: Enable (TRUE) or disable (FALSE). There are scenarios in which
it is desired to configure some MAC addresses as static so
that they are not subjected to MAC moves. If you enable MAC pinning
on a CE interface, that MAC address cannot be moved to any
other CE interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="mac-pinning", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_pinning must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="mac-pinning", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

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

  def _unset_mac_pinning(self):
    self.__mac_pinning = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="mac-pinning", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_irb_anycast_gateway(self):
    """
    Getter method for irb_anycast_gateway, mapped from YANG variable /network_instances/network_instance/interfaces/interface/state/irb_anycast_gateway (enumeration)

    YANG Description: Associate VLAN SVI with anycast Gateway.
The SVI is the layer3 interface for the mac-vrf
when the SVI is being used as the first hop default gw.
    """
    return self.__irb_anycast_gateway
      
  def _set_irb_anycast_gateway(self, v, load=False):
    """
    Setter method for irb_anycast_gateway, mapped from YANG variable /network_instances/network_instance/interfaces/interface/state/irb_anycast_gateway (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_irb_anycast_gateway is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_irb_anycast_gateway() directly.

    YANG Description: Associate VLAN SVI with anycast Gateway.
The SVI is the layer3 interface for the mac-vrf
when the SVI is being used as the first hop default gw.
    """
    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={'DISTRIBUTED_SYMETRIC': {}, 'DISTRIBUTED_ASYMETRIC': {}, 'HYBRID': {}, 'CENTRALIZED': {}},), is_leaf=True, yang_name="irb-anycast-gateway", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """irb_anycast_gateway must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DISTRIBUTED_SYMETRIC': {}, 'DISTRIBUTED_ASYMETRIC': {}, 'HYBRID': {}, 'CENTRALIZED': {}},), is_leaf=True, yang_name="irb-anycast-gateway", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

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

  def _unset_irb_anycast_gateway(self):
    self.__irb_anycast_gateway = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DISTRIBUTED_SYMETRIC': {}, 'DISTRIBUTED_ASYMETRIC': {}, 'HYBRID': {}, 'CENTRALIZED': {}},), is_leaf=True, yang_name="irb-anycast-gateway", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)

  id = __builtin__.property(_get_id)
  interface = __builtin__.property(_get_interface)
  subinterface = __builtin__.property(_get_subinterface)
  associated_address_families = __builtin__.property(_get_associated_address_families)
  mac_pinning = __builtin__.property(_get_mac_pinning)
  irb_anycast_gateway = __builtin__.property(_get_irb_anycast_gateway)


  _pyangbind_elements = OrderedDict([('id', id), ('interface', interface), ('subinterface', subinterface), ('associated_address_families', associated_address_families), ('mac_pinning', mac_pinning), ('irb_anycast_gateway', irb_anycast_gateway), ])


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

  YANG Description: An interface associated with the network instance
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__config','__state',)

  _yang_name = 'interface'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'interfaces', 'interface']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /network_instances/network_instance/interfaces/interface/id (leafref)

    YANG Description: A reference to an identifier for this interface which
acts as a key for this list
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /network_instances/network_instance/interfaces/interface/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: A reference to an identifier for this interface which
acts as a key for this list
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


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

    YANG Description: Configuration parameters relating to the associated
interface
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/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 parameters relating to the associated
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


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

    YANG Description: Operational state parameters relating to the
associated interface
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/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 parameters relating to the
associated interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_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/network-instance', defining_module='openconfig-network-instance', 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_interfaces_openconfig_network_instance__network_instances_network_instance_interfaces(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/interfaces. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The interfaces that are associated with this network
instance
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface',)

  _yang_name = 'interfaces'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__interface = YANGDynClass(base=YANGListType("id",yc_interface_openconfig_network_instance__network_instances_network_instance_interfaces_interface, yang_name="interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'interfaces']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/interfaces/interface (list)

    YANG Description: An interface associated with the network instance
    """
    return self.__interface
      
  def _set_interface(self, v, load=False):
    """
    Setter method for interface, mapped from YANG variable /network_instances/network_instance/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: An interface associated with the network instance
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("id",yc_interface_openconfig_network_instance__network_instances_network_instance_interfaces_interface, yang_name="interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='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/network-instance', defining_module='openconfig-network-instance', 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("id",yc_interface_openconfig_network_instance__network_instances_network_instance_interfaces_interface, yang_name="interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='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/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

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

  def _unset_interface(self):
    self.__interface = YANGDynClass(base=YANGListType("id",yc_interface_openconfig_network_instance__network_instances_network_instance_interfaces_interface, yang_name="interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='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/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  interface = __builtin__.property(_get_interface, _set_interface)


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


class yc_config_openconfig_network_instance__network_instances_network_instance_route_limits_route_limit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/route-limits/route-limit/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration options relating to the route limit.
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi','__maximum','__warning_only','__alarm_threshold',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__afi = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},), is_leaf=True, yang_name="afi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__maximum = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maximum", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__warning_only = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="warning-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__alarm_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="alarm-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'route-limits', 'route-limit', 'config']

  def _get_afi(self):
    """
    Getter method for afi, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/config/afi (identityref)

    YANG Description: The address family for which the route limit applies.
    """
    return self.__afi
      
  def _set_afi(self, v, load=False):
    """
    Setter method for afi, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/config/afi (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi() directly.

    YANG Description: The address family for which the route limit applies.
    """
    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': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},), is_leaf=True, yang_name="afi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},), is_leaf=True, yang_name="afi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

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

  def _unset_afi(self):
    self.__afi = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},), is_leaf=True, yang_name="afi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_maximum(self):
    """
    Getter method for maximum, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/config/maximum (uint32)

    YANG Description: The maximum number of routes for the address family. The
system should not install more than maximum number of
prefixes into the RIB unless the warning-only leaf is specified.
    """
    return self.__maximum
      
  def _set_maximum(self, v, load=False):
    """
    Setter method for maximum, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/config/maximum (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_maximum is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_maximum() directly.

    YANG Description: The maximum number of routes for the address family. The
system should not install more than maximum number of
prefixes into the RIB unless the warning-only leaf is specified.
    """
    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="maximum", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """maximum 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="maximum", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

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

  def _unset_maximum(self):
    self.__maximum = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maximum", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_warning_only(self):
    """
    Getter method for warning_only, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/config/warning_only (boolean)

    YANG Description: When specified, the route limit specified is considered only as
a warning - and routes should continue to be installed into the
RIB over the limit specified in the maximum leaf.
    """
    return self.__warning_only
      
  def _set_warning_only(self, v, load=False):
    """
    Setter method for warning_only, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/config/warning_only (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_only is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_only() directly.

    YANG Description: When specified, the route limit specified is considered only as
a warning - and routes should continue to be installed into the
RIB over the limit specified in the maximum leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="warning-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_only must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="warning-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

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

  def _unset_warning_only(self):
    self.__warning_only = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="warning-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_alarm_threshold(self):
    """
    Getter method for alarm_threshold, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/config/alarm_threshold (uint32)

    YANG Description: When specified, an alarm should be generated when the threshold
number of installed routes is reached.
    """
    return self.__alarm_threshold
      
  def _set_alarm_threshold(self, v, load=False):
    """
    Setter method for alarm_threshold, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/config/alarm_threshold (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_alarm_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_alarm_threshold() directly.

    YANG Description: When specified, an alarm should be generated when the threshold
number of installed routes is reached.
    """
    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="alarm-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """alarm_threshold 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="alarm-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

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

  def _unset_alarm_threshold(self):
    self.__alarm_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="alarm-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)

  afi = __builtin__.property(_get_afi, _set_afi)
  maximum = __builtin__.property(_get_maximum, _set_maximum)
  warning_only = __builtin__.property(_get_warning_only, _set_warning_only)
  alarm_threshold = __builtin__.property(_get_alarm_threshold, _set_alarm_threshold)


  _pyangbind_elements = OrderedDict([('afi', afi), ('maximum', maximum), ('warning_only', warning_only), ('alarm_threshold', alarm_threshold), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_route_limits_route_limit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/route-limits/route-limit/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 route limit.
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi','__maximum','__warning_only','__alarm_threshold','__threshold_exceeded','__installed_routes',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__afi = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},), is_leaf=True, yang_name="afi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__maximum = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maximum", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__warning_only = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="warning-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__alarm_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="alarm-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__threshold_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="threshold-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__installed_routes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="installed-routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'route-limits', 'route-limit', 'state']

  def _get_afi(self):
    """
    Getter method for afi, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/state/afi (identityref)

    YANG Description: The address family for which the route limit applies.
    """
    return self.__afi
      
  def _set_afi(self, v, load=False):
    """
    Setter method for afi, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/state/afi (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi() directly.

    YANG Description: The address family for which the route limit applies.
    """
    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': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},), is_leaf=True, yang_name="afi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},), is_leaf=True, yang_name="afi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

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

  def _unset_afi(self):
    self.__afi = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},), is_leaf=True, yang_name="afi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_maximum(self):
    """
    Getter method for maximum, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/state/maximum (uint32)

    YANG Description: The maximum number of routes for the address family. The
system should not install more than maximum number of
prefixes into the RIB unless the warning-only leaf is specified.
    """
    return self.__maximum
      
  def _set_maximum(self, v, load=False):
    """
    Setter method for maximum, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/state/maximum (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_maximum is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_maximum() directly.

    YANG Description: The maximum number of routes for the address family. The
system should not install more than maximum number of
prefixes into the RIB unless the warning-only leaf is specified.
    """
    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="maximum", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """maximum 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="maximum", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

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

  def _unset_maximum(self):
    self.__maximum = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maximum", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_warning_only(self):
    """
    Getter method for warning_only, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/state/warning_only (boolean)

    YANG Description: When specified, the route limit specified is considered only as
a warning - and routes should continue to be installed into the
RIB over the limit specified in the maximum leaf.
    """
    return self.__warning_only
      
  def _set_warning_only(self, v, load=False):
    """
    Setter method for warning_only, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/state/warning_only (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_only is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_only() directly.

    YANG Description: When specified, the route limit specified is considered only as
a warning - and routes should continue to be installed into the
RIB over the limit specified in the maximum leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="warning-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_only must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="warning-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

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

  def _unset_warning_only(self):
    self.__warning_only = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="warning-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_alarm_threshold(self):
    """
    Getter method for alarm_threshold, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/state/alarm_threshold (uint32)

    YANG Description: When specified, an alarm should be generated when the threshold
number of installed routes is reached.
    """
    return self.__alarm_threshold
      
  def _set_alarm_threshold(self, v, load=False):
    """
    Setter method for alarm_threshold, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/state/alarm_threshold (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_alarm_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_alarm_threshold() directly.

    YANG Description: When specified, an alarm should be generated when the threshold
number of installed routes is reached.
    """
    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="alarm-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """alarm_threshold 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="alarm-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

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

  def _unset_alarm_threshold(self):
    self.__alarm_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="alarm-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_threshold_exceeded(self):
    """
    Getter method for threshold_exceeded, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/state/threshold_exceeded (boolean)

    YANG Description: This leaf should be set to true in the case that the threshold
number of routes has been exceeded.
    """
    return self.__threshold_exceeded
      
  def _set_threshold_exceeded(self, v, load=False):
    """
    Setter method for threshold_exceeded, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/state/threshold_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_threshold_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_threshold_exceeded() directly.

    YANG Description: This leaf should be set to true in the case that the threshold
number of routes has been exceeded.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="threshold-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """threshold_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="threshold-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

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

  def _unset_threshold_exceeded(self):
    self.__threshold_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="threshold-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_installed_routes(self):
    """
    Getter method for installed_routes, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/state/installed_routes (uint32)

    YANG Description: The current number of routes installed for the address family.
    """
    return self.__installed_routes
      
  def _set_installed_routes(self, v, load=False):
    """
    Setter method for installed_routes, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/state/installed_routes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_installed_routes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_installed_routes() directly.

    YANG Description: The current number of routes installed for the address family.
    """
    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="installed-routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """installed_routes 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="installed-routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

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

  def _unset_installed_routes(self):
    self.__installed_routes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="installed-routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  afi = __builtin__.property(_get_afi)
  maximum = __builtin__.property(_get_maximum)
  warning_only = __builtin__.property(_get_warning_only)
  alarm_threshold = __builtin__.property(_get_alarm_threshold)
  threshold_exceeded = __builtin__.property(_get_threshold_exceeded)
  installed_routes = __builtin__.property(_get_installed_routes)


  _pyangbind_elements = OrderedDict([('afi', afi), ('maximum', maximum), ('warning_only', warning_only), ('alarm_threshold', alarm_threshold), ('threshold_exceeded', threshold_exceeded), ('installed_routes', installed_routes), ])


class yc_route_limit_openconfig_network_instance__network_instances_network_instance_route_limits_route_limit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/route-limits/route-limit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A route limit applying to a particular address family.
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi','__config','__state',)

  _yang_name = 'route-limit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__afi = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_route_limits_route_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_route_limits_route_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'route-limits', 'route-limit']

  def _get_afi(self):
    """
    Getter method for afi, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/afi (leafref)

    YANG Description: Reference to the address family for which the route
limit is being applied.
    """
    return self.__afi
      
  def _set_afi(self, v, load=False):
    """
    Setter method for afi, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/afi (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi() directly.

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

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

  def _unset_afi(self):
    self.__afi = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/config (container)

    YANG Description: Configuration options relating to the route limit.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/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 options relating to the route limit.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_route_limits_route_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_route_limits_route_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_route_limits_route_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/state (container)

    YANG Description: Operational state parameters relating to the route limit.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/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 route limit.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_route_limits_route_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_route_limits_route_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_route_limits_route_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

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


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


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

  YANG Description: Configuration and operational state relating to the
maximum number of routes for the address family that
should be allowed within the Layer 3 network instance.

When the specified value is reached, no further prefixes
should be installed into the system's RIB from this network
instance unless the warning only leaf is set. In this case,
new routes should still be installed. If a alarm threshold
is specified, then this should be used to generate
alarms via telemetry for the network instance.
  """
  __slots__ = ('_path_helper', '_extmethods', '__route_limit',)

  _yang_name = 'route-limits'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__route_limit = YANGDynClass(base=YANGListType("afi",yc_route_limit_openconfig_network_instance__network_instances_network_instance_route_limits_route_limit, yang_name="route-limit", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi', extensions=None), is_container='list', yang_name="route-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'route-limits']

  def _get_route_limit(self):
    """
    Getter method for route_limit, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit (list)

    YANG Description: A route limit applying to a particular address family.
    """
    return self.__route_limit
      
  def _set_route_limit(self, v, load=False):
    """
    Setter method for route_limit, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route_limit() directly.

    YANG Description: A route limit applying to a particular address family.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("afi",yc_route_limit_openconfig_network_instance__network_instances_network_instance_route_limits_route_limit, yang_name="route-limit", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi', extensions=None), is_container='list', yang_name="route-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route_limit must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("afi",yc_route_limit_openconfig_network_instance__network_instances_network_instance_route_limits_route_limit, yang_name="route-limit", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi', extensions=None), is_container='list', yang_name="route-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

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

  def _unset_route_limit(self):
    self.__route_limit = YANGDynClass(base=YANGListType("afi",yc_route_limit_openconfig_network_instance__network_instances_network_instance_route_limits_route_limit, yang_name="route-limit", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi', extensions=None), is_container='list', yang_name="route-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  route_limit = __builtin__.property(_get_route_limit, _set_route_limit)


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


class yc_config_openconfig_network_instance__network_instances_network_instance_tables_table_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/tables/table/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
table
  """
  __slots__ = ('_path_helper', '_extmethods', '__protocol','__address_family',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__protocol = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__address_family = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},), is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'tables', 'table', 'config']

  def _get_protocol(self):
    """
    Getter method for protocol, mapped from YANG variable /network_instances/network_instance/tables/table/config/protocol (leafref)

    YANG Description: Reference to the protocol that the table is associated with.
    """
    return self.__protocol
      
  def _set_protocol(self, v, load=False):
    """
    Setter method for protocol, mapped from YANG variable /network_instances/network_instance/tables/table/config/protocol (leafref)
    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: Reference to the protocol that the table is associated with.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """protocol must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_protocol(self):
    self.__protocol = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_address_family(self):
    """
    Getter method for address_family, mapped from YANG variable /network_instances/network_instance/tables/table/config/address_family (identityref)

    YANG Description: The address family (IPv4, IPv6) of the table's entries
    """
    return self.__address_family
      
  def _set_address_family(self, v, load=False):
    """
    Setter method for address_family, mapped from YANG variable /network_instances/network_instance/tables/table/config/address_family (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address_family is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address_family() directly.

    YANG Description: The address family (IPv4, IPv6) of the table's entries
    """
    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': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},), is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address_family must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},), is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

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

  def _unset_address_family(self):
    self.__address_family = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},), is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)

  protocol = __builtin__.property(_get_protocol, _set_protocol)
  address_family = __builtin__.property(_get_address_family, _set_address_family)


  _pyangbind_elements = OrderedDict([('protocol', protocol), ('address_family', address_family), ])


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

  YANG Description: State parameters related to the table
  """
  __slots__ = ('_path_helper', '_extmethods', '__protocol','__address_family',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__protocol = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__address_family = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},), is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'tables', 'table', 'state']

  def _get_protocol(self):
    """
    Getter method for protocol, mapped from YANG variable /network_instances/network_instance/tables/table/state/protocol (leafref)

    YANG Description: Reference to the protocol that the table is associated with.
    """
    return self.__protocol
      
  def _set_protocol(self, v, load=False):
    """
    Setter method for protocol, mapped from YANG variable /network_instances/network_instance/tables/table/state/protocol (leafref)
    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: Reference to the protocol that the table is associated with.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """protocol must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_protocol(self):
    self.__protocol = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_address_family(self):
    """
    Getter method for address_family, mapped from YANG variable /network_instances/network_instance/tables/table/state/address_family (identityref)

    YANG Description: The address family (IPv4, IPv6) of the table's entries
    """
    return self.__address_family
      
  def _set_address_family(self, v, load=False):
    """
    Setter method for address_family, mapped from YANG variable /network_instances/network_instance/tables/table/state/address_family (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address_family is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address_family() directly.

    YANG Description: The address family (IPv4, IPv6) of the table's entries
    """
    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': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},), is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address_family must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},), is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

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

  def _unset_address_family(self):
    self.__address_family = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},), is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  protocol = __builtin__.property(_get_protocol)
  address_family = __builtin__.property(_get_address_family)


  _pyangbind_elements = OrderedDict([('protocol', protocol), ('address_family', address_family), ])


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

  YANG Description: A network instance manages one or more forwarding or
routing tables. These may reflect a Layer 2 forwarding
information base, a Layer 3 routing table, or an MPLS
LFIB.

The table populated by a protocol within an instance is
identified by the protocol identifier (e.g., BGP, IS-IS)
and the address family (e.g., IPv4, IPv6) supported by
that protocol. Multiple instances of the same protocol
populate a single table -- such that
a single IS-IS or OSPF IPv4 table exists per network
instance.

An implementation is expected to create entries within
this list when the relevant protocol context is enabled.
i.e., when a BGP instance is created with IPv4 and IPv6
address families enabled, the protocol=BGP,
address-family=IPv4 table is created by the system.
  """
  __slots__ = ('_path_helper', '_extmethods', '__protocol','__address_family','__config','__state',)

  _yang_name = 'table'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__protocol = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__address_family = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_tables_table_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_tables_table_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'tables', 'table']

  def _get_protocol(self):
    """
    Getter method for protocol, mapped from YANG variable /network_instances/network_instance/tables/table/protocol (leafref)

    YANG Description: A reference to the protocol that populates
the table
    """
    return self.__protocol
      
  def _set_protocol(self, v, load=False):
    """
    Setter method for protocol, mapped from YANG variable /network_instances/network_instance/tables/table/protocol (leafref)
    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: A reference to the protocol that populates
the table
    """
    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="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """protocol must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_protocol(self):
    self.__protocol = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_address_family(self):
    """
    Getter method for address_family, mapped from YANG variable /network_instances/network_instance/tables/table/address_family (leafref)

    YANG Description: A reference to the address-family that the
table represents
    """
    return self.__address_family
      
  def _set_address_family(self, v, load=False):
    """
    Setter method for address_family, mapped from YANG variable /network_instances/network_instance/tables/table/address_family (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address_family is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address_family() directly.

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

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

  def _unset_address_family(self):
    self.__address_family = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/tables/table/config (container)

    YANG Description: Configuration parameters relating to the
table
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/tables/table/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
table
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_tables_table_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_tables_table_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_tables_table_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/tables/table/state (container)

    YANG Description: State parameters related to the table
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/tables/table/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 parameters related to the table
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_tables_table_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_tables_table_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_tables_table_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  protocol = __builtin__.property(_get_protocol, _set_protocol)
  address_family = __builtin__.property(_get_address_family, _set_address_family)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


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


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

  YANG Description: The routing tables that are managed by this network
instance
  """
  __slots__ = ('_path_helper', '_extmethods', '__table',)

  _yang_name = 'tables'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__table = YANGDynClass(base=YANGListType("protocol address_family",yc_table_openconfig_network_instance__network_instances_network_instance_tables_table, yang_name="table", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='protocol address-family', extensions=None), is_container='list', yang_name="table", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'tables']

  def _get_table(self):
    """
    Getter method for table, mapped from YANG variable /network_instances/network_instance/tables/table (list)

    YANG Description: A network instance manages one or more forwarding or
routing tables. These may reflect a Layer 2 forwarding
information base, a Layer 3 routing table, or an MPLS
LFIB.

The table populated by a protocol within an instance is
identified by the protocol identifier (e.g., BGP, IS-IS)
and the address family (e.g., IPv4, IPv6) supported by
that protocol. Multiple instances of the same protocol
populate a single table -- such that
a single IS-IS or OSPF IPv4 table exists per network
instance.

An implementation is expected to create entries within
this list when the relevant protocol context is enabled.
i.e., when a BGP instance is created with IPv4 and IPv6
address families enabled, the protocol=BGP,
address-family=IPv4 table is created by the system.
    """
    return self.__table
      
  def _set_table(self, v, load=False):
    """
    Setter method for table, mapped from YANG variable /network_instances/network_instance/tables/table (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_table is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_table() directly.

    YANG Description: A network instance manages one or more forwarding or
routing tables. These may reflect a Layer 2 forwarding
information base, a Layer 3 routing table, or an MPLS
LFIB.

The table populated by a protocol within an instance is
identified by the protocol identifier (e.g., BGP, IS-IS)
and the address family (e.g., IPv4, IPv6) supported by
that protocol. Multiple instances of the same protocol
populate a single table -- such that
a single IS-IS or OSPF IPv4 table exists per network
instance.

An implementation is expected to create entries within
this list when the relevant protocol context is enabled.
i.e., when a BGP instance is created with IPv4 and IPv6
address families enabled, the protocol=BGP,
address-family=IPv4 table is created by the system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("protocol address_family",yc_table_openconfig_network_instance__network_instances_network_instance_tables_table, yang_name="table", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='protocol address-family', extensions=None), is_container='list', yang_name="table", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """table must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("protocol address_family",yc_table_openconfig_network_instance__network_instances_network_instance_tables_table, yang_name="table", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='protocol address-family', extensions=None), is_container='list', yang_name="table", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

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

  def _unset_table(self):
    self.__table = YANGDynClass(base=YANGListType("protocol address_family",yc_table_openconfig_network_instance__network_instances_network_instance_tables_table, yang_name="table", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='protocol address-family', extensions=None), is_container='list', yang_name="table", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  table = __builtin__.property(_get_table, _set_table)


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


class yc_config_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/connection-points/connection-point/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 Layer 2
network instance connection point
  """
  __slots__ = ('_path_helper', '_extmethods', '__connection_point_id',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__connection_point_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="connection-point-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'config']

  def _get_connection_point_id(self):
    """
    Getter method for connection_point_id, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/config/connection_point_id (string)

    YANG Description: An identifier for a connection point
    """
    return self.__connection_point_id
      
  def _set_connection_point_id(self, v, load=False):
    """
    Setter method for connection_point_id, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/config/connection_point_id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_connection_point_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_connection_point_id() directly.

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

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

  def _unset_connection_point_id(self):
    self.__connection_point_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="connection-point-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)

  connection_point_id = __builtin__.property(_get_connection_point_id, _set_connection_point_id)


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


class yc_state_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/connection-points/connection-point/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 Layer 2
network instance connection point
  """
  __slots__ = ('_path_helper', '_extmethods', '__connection_point_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__connection_point_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="connection-point-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'state']

  def _get_connection_point_id(self):
    """
    Getter method for connection_point_id, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/state/connection_point_id (string)

    YANG Description: An identifier for a connection point
    """
    return self.__connection_point_id
      
  def _set_connection_point_id(self, v, load=False):
    """
    Setter method for connection_point_id, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/state/connection_point_id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_connection_point_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_connection_point_id() directly.

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

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

  def _unset_connection_point_id(self):
    self.__connection_point_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="connection-point-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)

  connection_point_id = __builtin__.property(_get_connection_point_id)


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


class yc_config_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/connection-points/connection-point/endpoints/endpoint/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
endpoint
  """
  __slots__ = ('_path_helper', '_extmethods', '__endpoint_id','__precedence','__type',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__endpoint_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__precedence = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="precedence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LOCAL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:LOCAL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'REMOTE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:REMOTE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'endpoints', 'endpoint', 'config']

  def _get_endpoint_id(self):
    """
    Getter method for endpoint_id, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/config/endpoint_id (string)

    YANG Description: An identifier for the endpoint
    """
    return self.__endpoint_id
      
  def _set_endpoint_id(self, v, load=False):
    """
    Setter method for endpoint_id, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/config/endpoint_id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint_id() directly.

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

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

  def _unset_endpoint_id(self):
    self.__endpoint_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_precedence(self):
    """
    Getter method for precedence, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/config/precedence (uint16)

    YANG Description: The precedence of the endpoint - the lowest precendence
viable endpoint will be utilised as the active endpoint
within a connection
    """
    return self.__precedence
      
  def _set_precedence(self, v, load=False):
    """
    Setter method for precedence, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/config/precedence (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_precedence is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_precedence() directly.

    YANG Description: The precedence of the endpoint - the lowest precendence
viable endpoint will be utilised as the active endpoint
within a connection
    """
    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="precedence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """precedence 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="precedence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

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

  def _unset_precedence(self):
    self.__precedence = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="precedence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/config/type (identityref)

    YANG Description: The type of endpoint that is referred to by the current
endpoint
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/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: The type of endpoint that is referred to by the current
endpoint
    """
    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={'LOCAL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:LOCAL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'REMOTE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:REMOTE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LOCAL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:LOCAL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'REMOTE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:REMOTE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-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/network-instance', defining_module='openconfig-network-instance', 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={'LOCAL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:LOCAL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'REMOTE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:REMOTE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)

  endpoint_id = __builtin__.property(_get_endpoint_id, _set_endpoint_id)
  precedence = __builtin__.property(_get_precedence, _set_precedence)
  type = __builtin__.property(_get_type, _set_type)


  _pyangbind_elements = OrderedDict([('endpoint_id', endpoint_id), ('precedence', precedence), ('type', type), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/connection-points/connection-point/endpoints/endpoint/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
endpoint
  """
  __slots__ = ('_path_helper', '_extmethods', '__endpoint_id','__precedence','__type','__active',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__endpoint_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__precedence = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="precedence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LOCAL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:LOCAL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'REMOTE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:REMOTE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__active = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="active", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'endpoints', 'endpoint', 'state']

  def _get_endpoint_id(self):
    """
    Getter method for endpoint_id, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/state/endpoint_id (string)

    YANG Description: An identifier for the endpoint
    """
    return self.__endpoint_id
      
  def _set_endpoint_id(self, v, load=False):
    """
    Setter method for endpoint_id, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/state/endpoint_id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint_id() directly.

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

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

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


  def _get_precedence(self):
    """
    Getter method for precedence, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/state/precedence (uint16)

    YANG Description: The precedence of the endpoint - the lowest precendence
viable endpoint will be utilised as the active endpoint
within a connection
    """
    return self.__precedence
      
  def _set_precedence(self, v, load=False):
    """
    Setter method for precedence, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/state/precedence (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_precedence is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_precedence() directly.

    YANG Description: The precedence of the endpoint - the lowest precendence
viable endpoint will be utilised as the active endpoint
within a connection
    """
    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="precedence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """precedence 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="precedence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

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

  def _unset_precedence(self):
    self.__precedence = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="precedence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/state/type (identityref)

    YANG Description: The type of endpoint that is referred to by the current
endpoint
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/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: The type of endpoint that is referred to by the current
endpoint
    """
    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={'LOCAL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:LOCAL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'REMOTE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:REMOTE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LOCAL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:LOCAL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'REMOTE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:REMOTE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-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/network-instance', defining_module='openconfig-network-instance', 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={'LOCAL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:LOCAL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'REMOTE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:REMOTE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_active(self):
    """
    Getter method for active, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/state/active (boolean)

    YANG Description: When the backup endpoint is active, the value of this
parameter is set to true
    """
    return self.__active
      
  def _set_active(self, v, load=False):
    """
    Setter method for active, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/state/active (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_active is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_active() directly.

    YANG Description: When the backup endpoint is active, the value of this
parameter is set to true
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="active", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """active must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="active", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

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

  def _unset_active(self):
    self.__active = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="active", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  endpoint_id = __builtin__.property(_get_endpoint_id)
  precedence = __builtin__.property(_get_precedence)
  type = __builtin__.property(_get_type)
  active = __builtin__.property(_get_active)


  _pyangbind_elements = OrderedDict([('endpoint_id', endpoint_id), ('precedence', precedence), ('type', type), ('active', active), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_local_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/connection-points/connection-point/endpoints/endpoint/local/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 local
endpoint
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface','__subinterface','__site_id','__site_label_block_offset','__site_label_block_size',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__site_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="site-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__site_label_block_offset = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="site-label-block-offset", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__site_label_block_size = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="site-label-block-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

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

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'endpoints', 'endpoint', 'local', 'config']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/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 /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/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 /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_site_id(self):
    """
    Getter method for site_id, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/config/site_id (uint16)

    YANG Description: The VE ID as defined in RFC4761 (VPLS) or CE ID as defined in
RFC6624 (l2vpn) to uniquely identify this endpoint (site) as part
of the BGP discovery of remote endpoints for layer 2 services.
    """
    return self.__site_id
      
  def _set_site_id(self, v, load=False):
    """
    Setter method for site_id, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/config/site_id (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_site_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_site_id() directly.

    YANG Description: The VE ID as defined in RFC4761 (VPLS) or CE ID as defined in
RFC6624 (l2vpn) to uniquely identify this endpoint (site) as part
of the BGP discovery of remote endpoints for layer 2 services.
    """
    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="site-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """site_id 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="site-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

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

  def _unset_site_id(self):
    self.__site_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="site-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_site_label_block_offset(self):
    """
    Getter method for site_label_block_offset, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/config/site_label_block_offset (uint16)

    YANG Description: The VPLS label block offset that is signaled with the 'site-id'.
    """
    return self.__site_label_block_offset
      
  def _set_site_label_block_offset(self, v, load=False):
    """
    Setter method for site_label_block_offset, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/config/site_label_block_offset (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_site_label_block_offset is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_site_label_block_offset() directly.

    YANG Description: The VPLS label block offset that is signaled with the 'site-id'.
    """
    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="site-label-block-offset", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """site_label_block_offset 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="site-label-block-offset", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

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

  def _unset_site_label_block_offset(self):
    self.__site_label_block_offset = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="site-label-block-offset", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_site_label_block_size(self):
    """
    Getter method for site_label_block_size, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/config/site_label_block_size (uint16)

    YANG Description: The VPLS label block size that is signaled with the 'site-id'.
    """
    return self.__site_label_block_size
      
  def _set_site_label_block_size(self, v, load=False):
    """
    Setter method for site_label_block_size, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/config/site_label_block_size (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_site_label_block_size is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_site_label_block_size() directly.

    YANG Description: The VPLS label block size that is signaled with the 'site-id'.
    """
    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="site-label-block-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """site_label_block_size 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="site-label-block-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

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

  def _unset_site_label_block_size(self):
    self.__site_label_block_size = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="site-label-block-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

  interface = __builtin__.property(_get_interface, _set_interface)
  subinterface = __builtin__.property(_get_subinterface, _set_subinterface)
  site_id = __builtin__.property(_get_site_id, _set_site_id)
  site_label_block_offset = __builtin__.property(_get_site_label_block_offset, _set_site_label_block_offset)
  site_label_block_size = __builtin__.property(_get_site_label_block_size, _set_site_label_block_size)


  _pyangbind_elements = OrderedDict([('interface', interface), ('subinterface', subinterface), ('site_id', site_id), ('site_label_block_offset', site_label_block_offset), ('site_label_block_size', site_label_block_size), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_local_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/connection-points/connection-point/endpoints/endpoint/local/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
local endpoint
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface','__subinterface','__site_id','__site_label_block_offset','__site_label_block_size',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__site_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="site-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__site_label_block_offset = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="site-label-block-offset", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__site_label_block_size = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="site-label-block-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'endpoints', 'endpoint', 'local', 'state']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/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 /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/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 /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_site_id(self):
    """
    Getter method for site_id, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/state/site_id (uint16)

    YANG Description: The VE ID as defined in RFC4761 (VPLS) or CE ID as defined in
RFC6624 (l2vpn) to uniquely identify this endpoint (site) as part
of the BGP discovery of remote endpoints for layer 2 services.
    """
    return self.__site_id
      
  def _set_site_id(self, v, load=False):
    """
    Setter method for site_id, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/state/site_id (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_site_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_site_id() directly.

    YANG Description: The VE ID as defined in RFC4761 (VPLS) or CE ID as defined in
RFC6624 (l2vpn) to uniquely identify this endpoint (site) as part
of the BGP discovery of remote endpoints for layer 2 services.
    """
    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="site-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """site_id 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="site-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

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

  def _unset_site_id(self):
    self.__site_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="site-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_site_label_block_offset(self):
    """
    Getter method for site_label_block_offset, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/state/site_label_block_offset (uint16)

    YANG Description: The VPLS label block offset that is signaled with the 'site-id'.
    """
    return self.__site_label_block_offset
      
  def _set_site_label_block_offset(self, v, load=False):
    """
    Setter method for site_label_block_offset, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/state/site_label_block_offset (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_site_label_block_offset is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_site_label_block_offset() directly.

    YANG Description: The VPLS label block offset that is signaled with the 'site-id'.
    """
    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="site-label-block-offset", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """site_label_block_offset 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="site-label-block-offset", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

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

  def _unset_site_label_block_offset(self):
    self.__site_label_block_offset = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="site-label-block-offset", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_site_label_block_size(self):
    """
    Getter method for site_label_block_size, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/state/site_label_block_size (uint16)

    YANG Description: The VPLS label block size that is signaled with the 'site-id'.
    """
    return self.__site_label_block_size
      
  def _set_site_label_block_size(self, v, load=False):
    """
    Setter method for site_label_block_size, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/state/site_label_block_size (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_site_label_block_size is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_site_label_block_size() directly.

    YANG Description: The VPLS label block size that is signaled with the 'site-id'.
    """
    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="site-label-block-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """site_label_block_size 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="site-label-block-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

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

  def _unset_site_label_block_size(self):
    self.__site_label_block_size = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="site-label-block-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  interface = __builtin__.property(_get_interface)
  subinterface = __builtin__.property(_get_subinterface)
  site_id = __builtin__.property(_get_site_id)
  site_label_block_offset = __builtin__.property(_get_site_label_block_offset)
  site_label_block_size = __builtin__.property(_get_site_label_block_size)


  _pyangbind_elements = OrderedDict([('interface', interface), ('subinterface', subinterface), ('site_id', site_id), ('site_label_block_offset', site_label_block_offset), ('site_label_block_size', site_label_block_size), ])


class yc_local__openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_local(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/connection-points/connection-point/endpoints/endpoint/local. 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 a local interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'local'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_local_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_local_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'endpoints', 'endpoint', 'local']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/config (container)

    YANG Description: Configuration parameters relating to a local
endpoint
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/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 local
endpoint
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_local_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_local_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_local_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/state (container)

    YANG Description: Operational state parameters relating to a
local endpoint
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/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
local endpoint
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_local_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_local_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_local_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_remote_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/connection-points/connection-point/endpoints/endpoint/remote/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 remote
endpoint
  """
  __slots__ = ('_path_helper', '_extmethods', '__remote_system','__virtual_circuit_identifier','__site_id',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__remote_system = 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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-system", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    self.__virtual_circuit_identifier = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="virtual-circuit-identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__site_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="site-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

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

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'endpoints', 'endpoint', 'remote', 'config']

  def _get_remote_system(self):
    """
    Getter method for remote_system, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/remote/config/remote_system (oc-inet:ip-address)

    YANG Description: The IP address of the device which hosts the
remote end-point
    """
    return self.__remote_system
      
  def _set_remote_system(self, v, load=False):
    """
    Setter method for remote_system, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/remote/config/remote_system (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_remote_system is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_remote_system() directly.

    YANG Description: The IP address of the device which hosts the
remote end-point
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-system", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """remote_system must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-system", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)""",
        })

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

  def _unset_remote_system(self):
    self.__remote_system = 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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-system", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)


  def _get_virtual_circuit_identifier(self):
    """
    Getter method for virtual_circuit_identifier, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/remote/config/virtual_circuit_identifier (uint32)

    YANG Description: The virtual-circuit identifier that identifies the
connection at the remote end-point
    """
    return self.__virtual_circuit_identifier
      
  def _set_virtual_circuit_identifier(self, v, load=False):
    """
    Setter method for virtual_circuit_identifier, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/remote/config/virtual_circuit_identifier (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_virtual_circuit_identifier is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_virtual_circuit_identifier() directly.

    YANG Description: The virtual-circuit identifier that identifies the
connection at the remote end-point
    """
    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="virtual-circuit-identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """virtual_circuit_identifier 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="virtual-circuit-identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

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

  def _unset_virtual_circuit_identifier(self):
    self.__virtual_circuit_identifier = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="virtual-circuit-identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_site_id(self):
    """
    Getter method for site_id, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/remote/config/site_id (uint16)

    YANG Description: Identifies remote sites. When BGP discovery is used this
is the customer edge identifier
    """
    return self.__site_id
      
  def _set_site_id(self, v, load=False):
    """
    Setter method for site_id, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/remote/config/site_id (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_site_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_site_id() directly.

    YANG Description: Identifies remote sites. When BGP discovery is used this
is the customer edge identifier
    """
    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="site-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """site_id 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="site-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

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

  def _unset_site_id(self):
    self.__site_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="site-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

  remote_system = __builtin__.property(_get_remote_system, _set_remote_system)
  virtual_circuit_identifier = __builtin__.property(_get_virtual_circuit_identifier, _set_virtual_circuit_identifier)
  site_id = __builtin__.property(_get_site_id, _set_site_id)


  _pyangbind_elements = OrderedDict([('remote_system', remote_system), ('virtual_circuit_identifier', virtual_circuit_identifier), ('site_id', site_id), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_remote_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/connection-points/connection-point/endpoints/endpoint/remote/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 remote endpoint
  """
  __slots__ = ('_path_helper', '_extmethods', '__remote_system','__virtual_circuit_identifier','__site_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__remote_system = 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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-system", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__virtual_circuit_identifier = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="virtual-circuit-identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__site_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="site-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'endpoints', 'endpoint', 'remote', 'state']

  def _get_remote_system(self):
    """
    Getter method for remote_system, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/remote/state/remote_system (oc-inet:ip-address)

    YANG Description: The IP address of the device which hosts the
remote end-point
    """
    return self.__remote_system
      
  def _set_remote_system(self, v, load=False):
    """
    Setter method for remote_system, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/remote/state/remote_system (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_remote_system is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_remote_system() directly.

    YANG Description: The IP address of the device which hosts the
remote end-point
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-system", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """remote_system must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-system", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

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

  def _unset_remote_system(self):
    self.__remote_system = 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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-system", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_virtual_circuit_identifier(self):
    """
    Getter method for virtual_circuit_identifier, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/remote/state/virtual_circuit_identifier (uint32)

    YANG Description: The virtual-circuit identifier that identifies the
connection at the remote end-point
    """
    return self.__virtual_circuit_identifier
      
  def _set_virtual_circuit_identifier(self, v, load=False):
    """
    Setter method for virtual_circuit_identifier, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/remote/state/virtual_circuit_identifier (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_virtual_circuit_identifier is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_virtual_circuit_identifier() directly.

    YANG Description: The virtual-circuit identifier that identifies the
connection at the remote end-point
    """
    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="virtual-circuit-identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """virtual_circuit_identifier 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="virtual-circuit-identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

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

  def _unset_virtual_circuit_identifier(self):
    self.__virtual_circuit_identifier = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="virtual-circuit-identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_site_id(self):
    """
    Getter method for site_id, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/remote/state/site_id (uint16)

    YANG Description: Identifies remote sites. When BGP discovery is used this
is the customer edge identifier
    """
    return self.__site_id
      
  def _set_site_id(self, v, load=False):
    """
    Setter method for site_id, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/remote/state/site_id (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_site_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_site_id() directly.

    YANG Description: Identifies remote sites. When BGP discovery is used this
is the customer edge identifier
    """
    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="site-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """site_id 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="site-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

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

  def _unset_site_id(self):
    self.__site_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="site-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  remote_system = __builtin__.property(_get_remote_system)
  virtual_circuit_identifier = __builtin__.property(_get_virtual_circuit_identifier)
  site_id = __builtin__.property(_get_site_id)


  _pyangbind_elements = OrderedDict([('remote_system', remote_system), ('virtual_circuit_identifier', virtual_circuit_identifier), ('site_id', site_id), ])


class yc_remote_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_remote(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/connection-points/connection-point/endpoints/endpoint/remote. 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 a remote interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'remote'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_remote_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_remote_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'endpoints', 'endpoint', 'remote']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/remote/config (container)

    YANG Description: Configuration parameters relating to a remote
endpoint
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/remote/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 remote
endpoint
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_remote_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_remote_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_remote_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/remote/state (container)

    YANG Description: Operational state parameters relating to
a remote endpoint
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/remote/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 remote endpoint
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_remote_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_remote_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_remote_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/connection-points/connection-point/endpoints/endpoint/vxlan/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 overlay tunnel
endpoints of the network instance
  """
  __slots__ = ('_path_helper', '_extmethods', '__description','__enabled','__source_interface',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__description = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__source_interface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'endpoints', 'endpoint', 'vxlan', 'config']

  def _get_description(self):
    """
    Getter method for description, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/config/description (string)

    YANG Description: Description to identify the VXLAN tunnel endpoint It
is a unique name identifying the overlay endpoint
    """
    return self.__description
      
  def _set_description(self, v, load=False):
    """
    Setter method for description, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/config/description (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_description is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_description() directly.

    YANG Description: Description to identify the VXLAN tunnel endpoint It
is a unique name identifying the overlay endpoint
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """description must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)""",
        })

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

  def _unset_description(self):
    self.__description = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/config/enabled (boolean)

    YANG Description: VXLAN tunnel endpoint administrative state.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: VXLAN tunnel endpoint administrative state.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

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

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_source_interface(self):
    """
    Getter method for source_interface, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/config/source_interface (string)

    YANG Description: Source loopback interface name
    """
    return self.__source_interface
      
  def _set_source_interface(self, v, load=False):
    """
    Setter method for source_interface, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/config/source_interface (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_interface is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_interface() directly.

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

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

  def _unset_source_interface(self):
    self.__source_interface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)

  description = __builtin__.property(_get_description, _set_description)
  enabled = __builtin__.property(_get_enabled, _set_enabled)
  source_interface = __builtin__.property(_get_source_interface, _set_source_interface)


  _pyangbind_elements = OrderedDict([('description', description), ('enabled', enabled), ('source_interface', source_interface), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/connection-points/connection-point/endpoints/endpoint/vxlan/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to the overlay tunnel endpoints of
the network instance
  """
  __slots__ = ('_path_helper', '_extmethods', '__description','__enabled','__source_interface',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__description = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__source_interface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'endpoints', 'endpoint', 'vxlan', 'state']

  def _get_description(self):
    """
    Getter method for description, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/state/description (string)

    YANG Description: Description to identify the VXLAN tunnel endpoint It
is a unique name identifying the overlay endpoint
    """
    return self.__description
      
  def _set_description(self, v, load=False):
    """
    Setter method for description, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/state/description (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_description is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_description() directly.

    YANG Description: Description to identify the VXLAN tunnel endpoint It
is a unique name identifying the overlay endpoint
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """description must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

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

  def _unset_description(self):
    self.__description = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/state/enabled (boolean)

    YANG Description: VXLAN tunnel endpoint administrative state.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: VXLAN tunnel endpoint administrative state.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

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

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_source_interface(self):
    """
    Getter method for source_interface, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/state/source_interface (string)

    YANG Description: Source loopback interface name
    """
    return self.__source_interface
      
  def _set_source_interface(self, v, load=False):
    """
    Setter method for source_interface, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/state/source_interface (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_interface is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_interface() directly.

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

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

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

  description = __builtin__.property(_get_description)
  enabled = __builtin__.property(_get_enabled)
  source_interface = __builtin__.property(_get_source_interface)


  _pyangbind_elements = OrderedDict([('description', description), ('enabled', enabled), ('source_interface', source_interface), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_peers_endpoint_peer_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/connection-points/connection-point/endpoints/endpoint/vxlan/endpoint-peers/endpoint-peer/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Container for state parameters related to this VTEP peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__peer_address','__peer_state','__uptime','__control_plane_vnis','__router_mac',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__peer_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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__peer_state = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UP': {}, 'DOWN': {}},), is_leaf=True, yang_name="peer-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__uptime = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="uptime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__control_plane_vnis = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="control-plane-vnis", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__router_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="router-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', 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 ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'endpoints', 'endpoint', 'vxlan', 'endpoint-peers', 'endpoint-peer', 'state']

  def _get_peer_address(self):
    """
    Getter method for peer_address, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_peers/endpoint_peer/state/peer_address (oc-inet:ip-address)

    YANG Description: IP address of the remote VXLAN Tunnel Endpoint peer
    """
    return self.__peer_address
      
  def _set_peer_address(self, v, load=False):
    """
    Setter method for peer_address, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_peers/endpoint_peer/state/peer_address (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_address() directly.

    YANG Description: IP address of the remote VXLAN Tunnel Endpoint peer
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_address must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

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

  def _unset_peer_address(self):
    self.__peer_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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_peer_state(self):
    """
    Getter method for peer_state, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_peers/endpoint_peer/state/peer_state (enumeration)

    YANG Description: State parameters related to the remote VTEP peer state
    """
    return self.__peer_state
      
  def _set_peer_state(self, v, load=False):
    """
    Setter method for peer_state, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_peers/endpoint_peer/state/peer_state (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_state() directly.

    YANG Description: State parameters related to the remote VTEP peer state
    """
    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={'UP': {}, 'DOWN': {}},), is_leaf=True, yang_name="peer-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_state must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UP': {}, 'DOWN': {}},), is_leaf=True, yang_name="peer-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

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

  def _unset_peer_state(self):
    self.__peer_state = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UP': {}, 'DOWN': {}},), is_leaf=True, yang_name="peer-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_uptime(self):
    """
    Getter method for uptime, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_peers/endpoint_peer/state/uptime (oc-types:timeticks64)

    YANG Description: This timestamp indicates the time elapsed relative to the moment that
the remote VTEP peer was discovered.
    """
    return self.__uptime
      
  def _set_uptime(self, v, load=False):
    """
    Setter method for uptime, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_peers/endpoint_peer/state/uptime (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_uptime is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_uptime() directly.

    YANG Description: This timestamp indicates the time elapsed relative to the moment that
the remote VTEP peer was discovered.
    """
    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="uptime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """uptime must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="uptime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

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

  def _unset_uptime(self):
    self.__uptime = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="uptime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_control_plane_vnis(self):
    """
    Getter method for control_plane_vnis, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_peers/endpoint_peer/state/control_plane_vnis (string)

    YANG Description: The control-plane VNIs are all of the VNIs that are discovered by the
control-plane behind this peer VTEP
    """
    return self.__control_plane_vnis
      
  def _set_control_plane_vnis(self, v, load=False):
    """
    Setter method for control_plane_vnis, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_peers/endpoint_peer/state/control_plane_vnis (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_control_plane_vnis is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_control_plane_vnis() directly.

    YANG Description: The control-plane VNIs are all of the VNIs that are discovered by the
control-plane behind this peer VTEP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="control-plane-vnis", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """control_plane_vnis must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="control-plane-vnis", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

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

  def _unset_control_plane_vnis(self):
    self.__control_plane_vnis = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="control-plane-vnis", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_router_mac(self):
    """
    Getter method for router_mac, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_peers/endpoint_peer/state/router_mac (oc-yang:mac-address)

    YANG Description: MAC address of the remote VTEP
    """
    return self.__router_mac
      
  def _set_router_mac(self, v, load=False):
    """
    Setter method for router_mac, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_peers/endpoint_peer/state/router_mac (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_router_mac is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_router_mac() directly.

    YANG Description: MAC address of the remote VTEP
    """
    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="router-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """router_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="router-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)""",
        })

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

  def _unset_router_mac(self):
    self.__router_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="router-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)

  peer_address = __builtin__.property(_get_peer_address)
  peer_state = __builtin__.property(_get_peer_state)
  uptime = __builtin__.property(_get_uptime)
  control_plane_vnis = __builtin__.property(_get_control_plane_vnis)
  router_mac = __builtin__.property(_get_router_mac)


  _pyangbind_elements = OrderedDict([('peer_address', peer_address), ('peer_state', peer_state), ('uptime', uptime), ('control_plane_vnis', control_plane_vnis), ('router_mac', router_mac), ])


class yc_endpoint_peer_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_peers_endpoint_peer(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/connection-points/connection-point/endpoints/endpoint/vxlan/endpoint-peers/endpoint-peer. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of VTEP peers and associated state information
  """
  __slots__ = ('_path_helper', '_extmethods', '__peer_address','__state',)

  _yang_name = 'endpoint-peer'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__peer_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_peers_endpoint_peer_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'endpoints', 'endpoint', 'vxlan', 'endpoint-peers', 'endpoint-peer']

  def _get_peer_address(self):
    """
    Getter method for peer_address, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_peers/endpoint_peer/peer_address (leafref)

    YANG Description: IP address for the VTEP peer
    """
    return self.__peer_address
      
  def _set_peer_address(self, v, load=False):
    """
    Setter method for peer_address, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_peers/endpoint_peer/peer_address (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_address() directly.

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

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

  def _unset_peer_address(self):
    self.__peer_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_peers/endpoint_peer/state (container)

    YANG Description: Container for state parameters related to this VTEP peer
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_peers/endpoint_peer/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: Container for state parameters related to this VTEP peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_peers_endpoint_peer_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_peers_endpoint_peer_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_peers_endpoint_peer_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  peer_address = __builtin__.property(_get_peer_address)
  state = __builtin__.property(_get_state)


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


class yc_endpoint_peers_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_peers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/connection-points/connection-point/endpoints/endpoint/vxlan/endpoint-peers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top level container for state information related to peer VXLAN Tunnel
Endpoints(VTEPs) learned by the local VTEP in the default network
instance
  """
  __slots__ = ('_path_helper', '_extmethods', '__endpoint_peer',)

  _yang_name = 'endpoint-peers'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__endpoint_peer = YANGDynClass(base=YANGListType("peer_address",yc_endpoint_peer_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_peers_endpoint_peer, yang_name="endpoint-peer", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='peer-address', extensions=None), is_container='list', yang_name="endpoint-peer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'endpoints', 'endpoint', 'vxlan', 'endpoint-peers']

  def _get_endpoint_peer(self):
    """
    Getter method for endpoint_peer, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_peers/endpoint_peer (list)

    YANG Description: List of VTEP peers and associated state information
    """
    return self.__endpoint_peer
      
  def _set_endpoint_peer(self, v, load=False):
    """
    Setter method for endpoint_peer, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_peers/endpoint_peer (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint_peer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint_peer() directly.

    YANG Description: List of VTEP peers and associated state information
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("peer_address",yc_endpoint_peer_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_peers_endpoint_peer, yang_name="endpoint-peer", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='peer-address', extensions=None), is_container='list', yang_name="endpoint-peer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """endpoint_peer must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("peer_address",yc_endpoint_peer_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_peers_endpoint_peer, yang_name="endpoint-peer", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='peer-address', extensions=None), is_container='list', yang_name="endpoint-peer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

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

  def _unset_endpoint_peer(self):
    self.__endpoint_peer = YANGDynClass(base=YANGListType("peer_address",yc_endpoint_peer_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_peers_endpoint_peer, yang_name="endpoint-peer", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='peer-address', extensions=None), is_container='list', yang_name="endpoint-peer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  endpoint_peer = __builtin__.property(_get_endpoint_peer)


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


class yc_state_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_vnis_endpoint_vni_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/connection-points/connection-point/endpoints/endpoint/vxlan/endpoint-vnis/endpoint-vni/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Container for state parameters related to this L2VNI or L3VNI
  """
  __slots__ = ('_path_helper', '_extmethods', '__vni','__multidestination_traffic','__learning_mode','__vni_type','__vni_state','__svi_state','__bridge_domain','__l3_vrf_name',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__vni = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)
    self.__multidestination_traffic = 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}'}),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}|:))'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STATIC_INGRESS_REPLICATION': {}, 'BGP_INGRESS_REPLICATION': {}},),], is_leaf=True, yang_name="multidestination-traffic", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    self.__learning_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'CONTROL_PLANE': {'value': 0}, 'DATA_PLANE': {'value': 1}},), is_leaf=True, yang_name="learning-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:learning-mode', is_config=False)
    self.__vni_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'L2': {}, 'L3': {}},), is_leaf=True, yang_name="vni-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__vni_state = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UP': {}, 'DOWN': {}},), is_leaf=True, yang_name="vni-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__svi_state = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UP': {}, 'DOWN': {}},), is_leaf=True, yang_name="svi-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__bridge_domain = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bridge-domain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__l3_vrf_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="l3-vrf-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'endpoints', 'endpoint', 'vxlan', 'endpoint-vnis', 'endpoint-vni', 'state']

  def _get_vni(self):
    """
    Getter method for vni, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni/state/vni (oc-evpn-types:evi-id)

    YANG Description: L2VNI or L3VNI Identifier
    """
    return self.__vni
      
  def _set_vni(self, v, load=False):
    """
    Setter method for vni, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni/state/vni (oc-evpn-types:evi-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_vni is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_vni() directly.

    YANG Description: L2VNI or L3VNI Identifier
    """
    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': ['1..16777215']}), is_leaf=True, yang_name="vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """vni must be of a type compatible with oc-evpn-types:evi-id""",
          'defined-type': "oc-evpn-types:evi-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)""",
        })

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

  def _unset_vni(self):
    self.__vni = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)


  def _get_multidestination_traffic(self):
    """
    Getter method for multidestination_traffic, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni/state/multidestination_traffic (union)

    YANG Description: The data plane for overlays needs to handle the transport of
multidestination traffic. Multidestination traffic is typically
referred to as (BUM) which stands for broadcast, unknown unicast,
or multicast. The two most common methods that can accommodate this
replication and transport in the underlay are IP multicast and
ingress replication
(also called head-end replication or unicast mode).
    """
    return self.__multidestination_traffic
      
  def _set_multidestination_traffic(self, v, load=False):
    """
    Setter method for multidestination_traffic, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni/state/multidestination_traffic (union)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multidestination_traffic is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multidestination_traffic() directly.

    YANG Description: The data plane for overlays needs to handle the transport of
multidestination traffic. Multidestination traffic is typically
referred to as (BUM) which stands for broadcast, unknown unicast,
or multicast. The two most common methods that can accommodate this
replication and transport in the underlay are IP multicast and
ingress replication
(also called head-end replication or unicast mode).
    """
    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}'}),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}|:))'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STATIC_INGRESS_REPLICATION': {}, 'BGP_INGRESS_REPLICATION': {}},),], is_leaf=True, yang_name="multidestination-traffic", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multidestination_traffic must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          '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}'}),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}|:))'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STATIC_INGRESS_REPLICATION': {}, 'BGP_INGRESS_REPLICATION': {}},),], is_leaf=True, yang_name="multidestination-traffic", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)""",
        })

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

  def _unset_multidestination_traffic(self):
    self.__multidestination_traffic = 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}'}),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}|:))'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STATIC_INGRESS_REPLICATION': {}, 'BGP_INGRESS_REPLICATION': {}},),], is_leaf=True, yang_name="multidestination-traffic", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)


  def _get_learning_mode(self):
    """
    Getter method for learning_mode, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni/state/learning_mode (oc-evpn-types:learning-mode)

    YANG Description: Indicates whether the learning mode for this VNI is either
control-plane or data-plane
    """
    return self.__learning_mode
      
  def _set_learning_mode(self, v, load=False):
    """
    Setter method for learning_mode, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni/state/learning_mode (oc-evpn-types:learning-mode)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_learning_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_learning_mode() directly.

    YANG Description: Indicates whether the learning mode for this VNI is either
control-plane or data-plane
    """
    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={'CONTROL_PLANE': {'value': 0}, 'DATA_PLANE': {'value': 1}},), is_leaf=True, yang_name="learning-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:learning-mode', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """learning_mode must be of a type compatible with oc-evpn-types:learning-mode""",
          'defined-type': "oc-evpn-types:learning-mode",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'CONTROL_PLANE': {'value': 0}, 'DATA_PLANE': {'value': 1}},), is_leaf=True, yang_name="learning-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:learning-mode', is_config=False)""",
        })

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

  def _unset_learning_mode(self):
    self.__learning_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'CONTROL_PLANE': {'value': 0}, 'DATA_PLANE': {'value': 1}},), is_leaf=True, yang_name="learning-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:learning-mode', is_config=False)


  def _get_vni_type(self):
    """
    Getter method for vni_type, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni/state/vni_type (enumeration)

    YANG Description: The type of virtual network identfier
    """
    return self.__vni_type
      
  def _set_vni_type(self, v, load=False):
    """
    Setter method for vni_type, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni/state/vni_type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_vni_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_vni_type() directly.

    YANG Description: The type of virtual network identfier
    """
    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={'L2': {}, 'L3': {}},), is_leaf=True, yang_name="vni-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """vni_type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'L2': {}, 'L3': {}},), is_leaf=True, yang_name="vni-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

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

  def _unset_vni_type(self):
    self.__vni_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'L2': {}, 'L3': {}},), is_leaf=True, yang_name="vni-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_vni_state(self):
    """
    Getter method for vni_state, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni/state/vni_state (enumeration)

    YANG Description: Operational state of the L2VNI or L3VNI
    """
    return self.__vni_state
      
  def _set_vni_state(self, v, load=False):
    """
    Setter method for vni_state, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni/state/vni_state (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_vni_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_vni_state() directly.

    YANG Description: Operational state of the L2VNI or L3VNI
    """
    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={'UP': {}, 'DOWN': {}},), is_leaf=True, yang_name="vni-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """vni_state must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UP': {}, 'DOWN': {}},), is_leaf=True, yang_name="vni-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

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

  def _unset_vni_state(self):
    self.__vni_state = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UP': {}, 'DOWN': {}},), is_leaf=True, yang_name="vni-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_svi_state(self):
    """
    Getter method for svi_state, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni/state/svi_state (enumeration)

    YANG Description: Operational status of the SVI mapped to the L3VNI that is used for
routing between subnets in the VXLAN fabric
    """
    return self.__svi_state
      
  def _set_svi_state(self, v, load=False):
    """
    Setter method for svi_state, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni/state/svi_state (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_svi_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_svi_state() directly.

    YANG Description: Operational status of the SVI mapped to the L3VNI that is used for
routing between subnets in the VXLAN fabric
    """
    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={'UP': {}, 'DOWN': {}},), is_leaf=True, yang_name="svi-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """svi_state must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UP': {}, 'DOWN': {}},), is_leaf=True, yang_name="svi-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

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

  def _unset_svi_state(self):
    self.__svi_state = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UP': {}, 'DOWN': {}},), is_leaf=True, yang_name="svi-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_bridge_domain(self):
    """
    Getter method for bridge_domain, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni/state/bridge_domain (uint32)

    YANG Description: This reflects the configured VLAN or Bridge Domain that maps to this
L2VNI in the VXLAN fabric
    """
    return self.__bridge_domain
      
  def _set_bridge_domain(self, v, load=False):
    """
    Setter method for bridge_domain, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni/state/bridge_domain (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bridge_domain is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bridge_domain() directly.

    YANG Description: This reflects the configured VLAN or Bridge Domain that maps to this
L2VNI in the VXLAN fabric
    """
    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="bridge-domain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bridge_domain 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="bridge-domain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

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

  def _unset_bridge_domain(self):
    self.__bridge_domain = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bridge-domain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_l3_vrf_name(self):
    """
    Getter method for l3_vrf_name, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni/state/l3_vrf_name (string)

    YANG Description: This refects the configured VRF instance that maps to this L3VNI
that is used for routing between subnets in the VXLAN fabric
    """
    return self.__l3_vrf_name
      
  def _set_l3_vrf_name(self, v, load=False):
    """
    Setter method for l3_vrf_name, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni/state/l3_vrf_name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_l3_vrf_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_l3_vrf_name() directly.

    YANG Description: This refects the configured VRF instance that maps to this L3VNI
that is used for routing between subnets in the VXLAN fabric
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="l3-vrf-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """l3_vrf_name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="l3-vrf-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

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

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

  vni = __builtin__.property(_get_vni)
  multidestination_traffic = __builtin__.property(_get_multidestination_traffic)
  learning_mode = __builtin__.property(_get_learning_mode)
  vni_type = __builtin__.property(_get_vni_type)
  vni_state = __builtin__.property(_get_vni_state)
  svi_state = __builtin__.property(_get_svi_state)
  bridge_domain = __builtin__.property(_get_bridge_domain)
  l3_vrf_name = __builtin__.property(_get_l3_vrf_name)


  _pyangbind_elements = OrderedDict([('vni', vni), ('multidestination_traffic', multidestination_traffic), ('learning_mode', learning_mode), ('vni_type', vni_type), ('vni_state', vni_state), ('svi_state', svi_state), ('bridge_domain', bridge_domain), ('l3_vrf_name', l3_vrf_name), ])


class yc_endpoint_vni_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_vnis_endpoint_vni(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/connection-points/connection-point/endpoints/endpoint/vxlan/endpoint-vnis/endpoint-vni. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of L2VNIs and L3VNIs learned on the local VTEP
  """
  __slots__ = ('_path_helper', '_extmethods', '__vni','__state',)

  _yang_name = 'endpoint-vni'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__vni = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_vnis_endpoint_vni_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'endpoints', 'endpoint', 'vxlan', 'endpoint-vnis', 'endpoint-vni']

  def _get_vni(self):
    """
    Getter method for vni, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni/vni (leafref)

    YANG Description: L2VNI or L3VNI Identifier
    """
    return self.__vni
      
  def _set_vni(self, v, load=False):
    """
    Setter method for vni, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni/vni (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_vni is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_vni() directly.

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

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

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


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni/state (container)

    YANG Description: Container for state parameters related to this L2VNI or L3VNI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni/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: Container for state parameters related to this L2VNI or L3VNI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_vnis_endpoint_vni_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_vnis_endpoint_vni_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_vnis_endpoint_vni_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  vni = __builtin__.property(_get_vni)
  state = __builtin__.property(_get_state)


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


class yc_endpoint_vnis_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_vnis(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/connection-points/connection-point/endpoints/endpoint/vxlan/endpoint-vnis. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top level container for state information related to Layer 2 virtual
network identifiers (L2VNIs) and Layer 3 virtual network identifiers
(L3VNIs) that are learned on the local VXLAN Tunnel End Point from
remote VTEPs in the default network instance
  """
  __slots__ = ('_path_helper', '_extmethods', '__endpoint_vni',)

  _yang_name = 'endpoint-vnis'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__endpoint_vni = YANGDynClass(base=YANGListType("vni",yc_endpoint_vni_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_vnis_endpoint_vni, yang_name="endpoint-vni", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='vni', extensions=None), is_container='list', yang_name="endpoint-vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'endpoints', 'endpoint', 'vxlan', 'endpoint-vnis']

  def _get_endpoint_vni(self):
    """
    Getter method for endpoint_vni, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni (list)

    YANG Description: List of L2VNIs and L3VNIs learned on the local VTEP
    """
    return self.__endpoint_vni
      
  def _set_endpoint_vni(self, v, load=False):
    """
    Setter method for endpoint_vni, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint_vni is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint_vni() directly.

    YANG Description: List of L2VNIs and L3VNIs learned on the local VTEP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("vni",yc_endpoint_vni_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_vnis_endpoint_vni, yang_name="endpoint-vni", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='vni', extensions=None), is_container='list', yang_name="endpoint-vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """endpoint_vni must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("vni",yc_endpoint_vni_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_vnis_endpoint_vni, yang_name="endpoint-vni", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='vni', extensions=None), is_container='list', yang_name="endpoint-vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

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

  def _unset_endpoint_vni(self):
    self.__endpoint_vni = YANGDynClass(base=YANGListType("vni",yc_endpoint_vni_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_vnis_endpoint_vni, yang_name="endpoint-vni", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='vni', extensions=None), is_container='list', yang_name="endpoint-vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  endpoint_vni = __builtin__.property(_get_endpoint_vni)


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


class yc_vxlan_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/connection-points/connection-point/endpoints/endpoint/vxlan. 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 a VXLAN tunnel end-point interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__endpoint_peers','__endpoint_vnis',)

  _yang_name = 'vxlan'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__endpoint_peers = YANGDynClass(base=yc_endpoint_peers_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_peers, is_container='container', yang_name="endpoint-peers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__endpoint_vnis = YANGDynClass(base=yc_endpoint_vnis_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_vnis, is_container='container', yang_name="endpoint-vnis", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'endpoints', 'endpoint', 'vxlan']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/config (container)

    YANG Description: Configuration parameters relating to the overlay tunnel
endpoints of the network instance
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/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 overlay tunnel
endpoints of the network instance
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/state (container)

    YANG Description: State parameters relating to the overlay tunnel endpoints of
the network instance
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/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 parameters relating to the overlay tunnel endpoints of
the network instance
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_endpoint_peers(self):
    """
    Getter method for endpoint_peers, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_peers (container)

    YANG Description: Top level container for state information related to peer VXLAN Tunnel
Endpoints(VTEPs) learned by the local VTEP in the default network
instance
    """
    return self.__endpoint_peers
      
  def _set_endpoint_peers(self, v, load=False):
    """
    Setter method for endpoint_peers, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_peers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint_peers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint_peers() directly.

    YANG Description: Top level container for state information related to peer VXLAN Tunnel
Endpoints(VTEPs) learned by the local VTEP in the default network
instance
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_endpoint_peers_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_peers, is_container='container', yang_name="endpoint-peers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """endpoint_peers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_endpoint_peers_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_peers, is_container='container', yang_name="endpoint-peers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

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

  def _unset_endpoint_peers(self):
    self.__endpoint_peers = YANGDynClass(base=yc_endpoint_peers_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_peers, is_container='container', yang_name="endpoint-peers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_endpoint_vnis(self):
    """
    Getter method for endpoint_vnis, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis (container)

    YANG Description: Top level container for state information related to Layer 2 virtual
network identifiers (L2VNIs) and Layer 3 virtual network identifiers
(L3VNIs) that are learned on the local VXLAN Tunnel End Point from
remote VTEPs in the default network instance
    """
    return self.__endpoint_vnis
      
  def _set_endpoint_vnis(self, v, load=False):
    """
    Setter method for endpoint_vnis, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint_vnis is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint_vnis() directly.

    YANG Description: Top level container for state information related to Layer 2 virtual
network identifiers (L2VNIs) and Layer 3 virtual network identifiers
(L3VNIs) that are learned on the local VXLAN Tunnel End Point from
remote VTEPs in the default network instance
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_endpoint_vnis_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_vnis, is_container='container', yang_name="endpoint-vnis", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """endpoint_vnis must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_endpoint_vnis_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_vnis, is_container='container', yang_name="endpoint-vnis", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

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

  def _unset_endpoint_vnis(self):
    self.__endpoint_vnis = YANGDynClass(base=yc_endpoint_vnis_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_vnis, is_container='container', yang_name="endpoint-vnis", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  endpoint_peers = __builtin__.property(_get_endpoint_peers, _set_endpoint_peers)
  endpoint_vnis = __builtin__.property(_get_endpoint_vnis, _set_endpoint_vnis)


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


class yc_endpoint_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/connection-points/connection-point/endpoints/endpoint. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A list of the endpoints (interfaces or remote
connection points that can be used for this
connection point). The active endpoint is selected
based on the precedence that it is configured
with
  """
  __slots__ = ('_path_helper', '_extmethods', '__endpoint_id','__config','__state','__local_','__remote','__vxlan',)

  _yang_name = 'endpoint'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__endpoint_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__local_ = YANGDynClass(base=yc_local__openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_local, is_container='container', yang_name="local", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__remote = YANGDynClass(base=yc_remote_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_remote, is_container='container', yang_name="remote", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__vxlan = YANGDynClass(base=yc_vxlan_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan, is_container='container', yang_name="vxlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'endpoints', 'endpoint']

  def _get_endpoint_id(self):
    """
    Getter method for endpoint_id, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/endpoint_id (leafref)

    YANG Description: A pointer to the configured identifier for the
endpoint
    """
    return self.__endpoint_id
      
  def _set_endpoint_id(self, v, load=False):
    """
    Setter method for endpoint_id, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/endpoint_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint_id() directly.

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

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

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


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/config (container)

    YANG Description: Configuration parameters relating to the
endpoint
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/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
endpoint
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/state (container)

    YANG Description: Operational state parameters relating to the
endpoint
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/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
endpoint
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_local_(self):
    """
    Getter method for local_, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local (container)

    YANG Description: Configuration and operational state parameters
relating to a local interface
    """
    return self.__local_
      
  def _set_local_(self, v, load=False):
    """
    Setter method for local_, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_ is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_() directly.

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

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

  def _unset_local_(self):
    self.__local_ = YANGDynClass(base=yc_local__openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_local, is_container='container', yang_name="local", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_remote(self):
    """
    Getter method for remote, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/remote (container)

    YANG Description: Configuration and operational state parameters
relating to a remote interface
    """
    return self.__remote
      
  def _set_remote(self, v, load=False):
    """
    Setter method for remote, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/remote (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_remote is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_remote() directly.

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

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

  def _unset_remote(self):
    self.__remote = YANGDynClass(base=yc_remote_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_remote, is_container='container', yang_name="remote", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_vxlan(self):
    """
    Getter method for vxlan, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan (container)

    YANG Description: Configuration and operational state parameters
relating to a VXLAN tunnel end-point interface
    """
    return self.__vxlan
      
  def _set_vxlan(self, v, load=False):
    """
    Setter method for vxlan, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_vxlan is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_vxlan() directly.

    YANG Description: Configuration and operational state parameters
relating to a VXLAN tunnel end-point interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_vxlan_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan, is_container='container', yang_name="vxlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """vxlan must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_vxlan_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan, is_container='container', yang_name="vxlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

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

  def _unset_vxlan(self):
    self.__vxlan = YANGDynClass(base=yc_vxlan_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan, is_container='container', yang_name="vxlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  endpoint_id = __builtin__.property(_get_endpoint_id, _set_endpoint_id)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  local_ = __builtin__.property(_get_local_, _set_local_)
  remote = __builtin__.property(_get_remote, _set_remote)
  vxlan = __builtin__.property(_get_vxlan, _set_vxlan)


  _pyangbind_elements = OrderedDict([('endpoint_id', endpoint_id), ('config', config), ('state', state), ('local_', local_), ('remote', remote), ('vxlan', vxlan), ])


class yc_endpoints_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/connection-points/connection-point/endpoints. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The set of endpoints which are grouped within the
connection point
  """
  __slots__ = ('_path_helper', '_extmethods', '__endpoint',)

  _yang_name = 'endpoints'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__endpoint = YANGDynClass(base=YANGListType("endpoint_id",yc_endpoint_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint, yang_name="endpoint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='endpoint-id', extensions=None), is_container='list', yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'endpoints']

  def _get_endpoint(self):
    """
    Getter method for endpoint, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint (list)

    YANG Description: A list of the endpoints (interfaces or remote
connection points that can be used for this
connection point). The active endpoint is selected
based on the precedence that it is configured
with
    """
    return self.__endpoint
      
  def _set_endpoint(self, v, load=False):
    """
    Setter method for endpoint, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint() directly.

    YANG Description: A list of the endpoints (interfaces or remote
connection points that can be used for this
connection point). The active endpoint is selected
based on the precedence that it is configured
with
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("endpoint_id",yc_endpoint_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint, yang_name="endpoint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='endpoint-id', extensions=None), is_container='list', yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """endpoint must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("endpoint_id",yc_endpoint_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint, yang_name="endpoint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='endpoint-id', extensions=None), is_container='list', yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

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

  def _unset_endpoint(self):
    self.__endpoint = YANGDynClass(base=YANGListType("endpoint_id",yc_endpoint_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint, yang_name="endpoint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='endpoint-id', extensions=None), is_container='list', yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  endpoint = __builtin__.property(_get_endpoint, _set_endpoint)


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


class yc_connection_point_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/connection-points/connection-point. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A connection point within a Layer 2 network instance.
Each connection-point consists of a set of interfaces
only one of which is active at any one time. Other than
the specification of whether an interface is local
(i.e., exists within this network-instance), or remote,
all configuration and state parameters are common
  """
  __slots__ = ('_path_helper', '_extmethods', '__connection_point_id','__config','__state','__endpoints',)

  _yang_name = 'connection-point'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__connection_point_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="connection-point-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__endpoints = YANGDynClass(base=yc_endpoints_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints, is_container='container', yang_name="endpoints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'connection-points', 'connection-point']

  def _get_connection_point_id(self):
    """
    Getter method for connection_point_id, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/connection_point_id (leafref)

    YANG Description: A locally significant reference for the
connection-point
    """
    return self.__connection_point_id
      
  def _set_connection_point_id(self, v, load=False):
    """
    Setter method for connection_point_id, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/connection_point_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_connection_point_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_connection_point_id() directly.

    YANG Description: A locally significant reference for the
connection-point
    """
    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="connection-point-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """connection_point_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="connection-point-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_connection_point_id(self):
    self.__connection_point_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="connection-point-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/config (container)

    YANG Description: Configuration parameters relating to a Layer 2
network instance connection point
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/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 Layer 2
network instance connection point
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_connection_points_connection_point_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_connection_points_connection_point_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/state (container)

    YANG Description: Operational state parameters relating to a Layer 2
network instance connection point
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/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 Layer 2
network instance connection point
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_connection_points_connection_point_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_connection_points_connection_point_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_endpoints(self):
    """
    Getter method for endpoints, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints (container)

    YANG Description: The set of endpoints which are grouped within the
connection point
    """
    return self.__endpoints
      
  def _set_endpoints(self, v, load=False):
    """
    Setter method for endpoints, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoints is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoints() directly.

    YANG Description: The set of endpoints which are grouped within the
connection point
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_endpoints_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints, is_container='container', yang_name="endpoints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """endpoints must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_endpoints_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints, is_container='container', yang_name="endpoints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

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

  def _unset_endpoints(self):
    self.__endpoints = YANGDynClass(base=yc_endpoints_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point_endpoints, is_container='container', yang_name="endpoints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  connection_point_id = __builtin__.property(_get_connection_point_id, _set_connection_point_id)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  endpoints = __builtin__.property(_get_endpoints, _set_endpoints)


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


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

  YANG Description: The set of connection points within a forwarding
instance
  """
  __slots__ = ('_path_helper', '_extmethods', '__connection_point',)

  _yang_name = 'connection-points'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__connection_point = YANGDynClass(base=YANGListType("connection_point_id",yc_connection_point_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point, yang_name="connection-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='connection-point-id', extensions=None), is_container='list', yang_name="connection-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'connection-points']

  def _get_connection_point(self):
    """
    Getter method for connection_point, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point (list)

    YANG Description: A connection point within a Layer 2 network instance.
Each connection-point consists of a set of interfaces
only one of which is active at any one time. Other than
the specification of whether an interface is local
(i.e., exists within this network-instance), or remote,
all configuration and state parameters are common
    """
    return self.__connection_point
      
  def _set_connection_point(self, v, load=False):
    """
    Setter method for connection_point, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_connection_point is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_connection_point() directly.

    YANG Description: A connection point within a Layer 2 network instance.
Each connection-point consists of a set of interfaces
only one of which is active at any one time. Other than
the specification of whether an interface is local
(i.e., exists within this network-instance), or remote,
all configuration and state parameters are common
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("connection_point_id",yc_connection_point_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point, yang_name="connection-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='connection-point-id', extensions=None), is_container='list', yang_name="connection-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """connection_point must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("connection_point_id",yc_connection_point_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point, yang_name="connection-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='connection-point-id', extensions=None), is_container='list', yang_name="connection-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

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

  def _unset_connection_point(self):
    self.__connection_point = YANGDynClass(base=YANGListType("connection_point_id",yc_connection_point_openconfig_network_instance__network_instances_network_instance_connection_points_connection_point, yang_name="connection-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='connection-point-id', extensions=None), is_container='list', yang_name="connection-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  connection_point = __builtin__.property(_get_connection_point, _set_connection_point)


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


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

  YANG Description: Top level global MPLS configuration
  """
  __slots__ = ('_path_helper', '_extmethods', '__null_label','__ttl_propagation','__pw_encapsulation',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__null_label = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:IMPLICIT"), is_leaf=True, yang_name="null-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__ttl_propagation = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="ttl-propagation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__pw_encapsulation = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="pw-encapsulation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'global', 'config']

  def _get_null_label(self):
    """
    Getter method for null_label, mapped from YANG variable /network_instances/network_instance/mpls/global/config/null_label (identityref)

    YANG Description: The null-label type used, implicit or explicit
    """
    return self.__null_label
      
  def _set_null_label(self, v, load=False):
    """
    Setter method for null_label, mapped from YANG variable /network_instances/network_instance/mpls/global/config/null_label (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_null_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_null_label() directly.

    YANG Description: The null-label type used, implicit or explicit
    """
    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': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:IMPLICIT"), is_leaf=True, yang_name="null-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """null_label must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:IMPLICIT"), is_leaf=True, yang_name="null-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

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

  def _unset_null_label(self):
    self.__null_label = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:IMPLICIT"), is_leaf=True, yang_name="null-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_ttl_propagation(self):
    """
    Getter method for ttl_propagation, mapped from YANG variable /network_instances/network_instance/mpls/global/config/ttl_propagation (boolean)

    YANG Description: Enables TTL propagation across the MPLS domain.
When ttl-propagation is set to true, the IP TTL
is copied into the MPLS header TTL when pushing
a label to an IP packet. If false, the IP TTL is
not copied into the MPLS header TTL and, therefore,
the IP TTL is not updated in the MPLS domain.
    """
    return self.__ttl_propagation
      
  def _set_ttl_propagation(self, v, load=False):
    """
    Setter method for ttl_propagation, mapped from YANG variable /network_instances/network_instance/mpls/global/config/ttl_propagation (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ttl_propagation is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ttl_propagation() directly.

    YANG Description: Enables TTL propagation across the MPLS domain.
When ttl-propagation is set to true, the IP TTL
is copied into the MPLS header TTL when pushing
a label to an IP packet. If false, the IP TTL is
not copied into the MPLS header TTL and, therefore,
the IP TTL is not updated in the MPLS domain.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="ttl-propagation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ttl_propagation must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="ttl-propagation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

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

  def _unset_ttl_propagation(self):
    self.__ttl_propagation = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="ttl-propagation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_pw_encapsulation(self):
    """
    Getter method for pw_encapsulation, mapped from YANG variable /network_instances/network_instance/mpls/global/config/pw_encapsulation (identityref)

    YANG Description: The PDU type to use with pseudowires.
    """
    return self.__pw_encapsulation
      
  def _set_pw_encapsulation(self, v, load=False):
    """
    Setter method for pw_encapsulation, mapped from YANG variable /network_instances/network_instance/mpls/global/config/pw_encapsulation (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pw_encapsulation is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pw_encapsulation() directly.

    YANG Description: The PDU type to use with pseudowires.
    """
    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={'PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="pw-encapsulation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pw_encapsulation must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="pw-encapsulation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

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

  def _unset_pw_encapsulation(self):
    self.__pw_encapsulation = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="pw-encapsulation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)

  null_label = __builtin__.property(_get_null_label, _set_null_label)
  ttl_propagation = __builtin__.property(_get_ttl_propagation, _set_ttl_propagation)
  pw_encapsulation = __builtin__.property(_get_pw_encapsulation, _set_pw_encapsulation)


  _pyangbind_elements = OrderedDict([('null_label', null_label), ('ttl_propagation', ttl_propagation), ('pw_encapsulation', pw_encapsulation), ])


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

  YANG Description: Top level global MPLS state
  """
  __slots__ = ('_path_helper', '_extmethods', '__null_label','__ttl_propagation','__pw_encapsulation',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__null_label = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:IMPLICIT"), is_leaf=True, yang_name="null-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__ttl_propagation = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="ttl-propagation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__pw_encapsulation = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="pw-encapsulation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'global', 'state']

  def _get_null_label(self):
    """
    Getter method for null_label, mapped from YANG variable /network_instances/network_instance/mpls/global/state/null_label (identityref)

    YANG Description: The null-label type used, implicit or explicit
    """
    return self.__null_label
      
  def _set_null_label(self, v, load=False):
    """
    Setter method for null_label, mapped from YANG variable /network_instances/network_instance/mpls/global/state/null_label (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_null_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_null_label() directly.

    YANG Description: The null-label type used, implicit or explicit
    """
    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': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:IMPLICIT"), is_leaf=True, yang_name="null-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """null_label must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:IMPLICIT"), is_leaf=True, yang_name="null-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

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

  def _unset_null_label(self):
    self.__null_label = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:IMPLICIT"), is_leaf=True, yang_name="null-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_ttl_propagation(self):
    """
    Getter method for ttl_propagation, mapped from YANG variable /network_instances/network_instance/mpls/global/state/ttl_propagation (boolean)

    YANG Description: Enables TTL propagation across the MPLS domain.
When ttl-propagation is set to true, the IP TTL
is copied into the MPLS header TTL when pushing
a label to an IP packet. If false, the IP TTL is
not copied into the MPLS header TTL and, therefore,
the IP TTL is not updated in the MPLS domain.
    """
    return self.__ttl_propagation
      
  def _set_ttl_propagation(self, v, load=False):
    """
    Setter method for ttl_propagation, mapped from YANG variable /network_instances/network_instance/mpls/global/state/ttl_propagation (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ttl_propagation is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ttl_propagation() directly.

    YANG Description: Enables TTL propagation across the MPLS domain.
When ttl-propagation is set to true, the IP TTL
is copied into the MPLS header TTL when pushing
a label to an IP packet. If false, the IP TTL is
not copied into the MPLS header TTL and, therefore,
the IP TTL is not updated in the MPLS domain.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="ttl-propagation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ttl_propagation must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="ttl-propagation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

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

  def _unset_ttl_propagation(self):
    self.__ttl_propagation = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="ttl-propagation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_pw_encapsulation(self):
    """
    Getter method for pw_encapsulation, mapped from YANG variable /network_instances/network_instance/mpls/global/state/pw_encapsulation (identityref)

    YANG Description: The PDU type to use with pseudowires.
    """
    return self.__pw_encapsulation
      
  def _set_pw_encapsulation(self, v, load=False):
    """
    Setter method for pw_encapsulation, mapped from YANG variable /network_instances/network_instance/mpls/global/state/pw_encapsulation (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pw_encapsulation is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pw_encapsulation() directly.

    YANG Description: The PDU type to use with pseudowires.
    """
    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={'PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="pw-encapsulation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pw_encapsulation must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="pw-encapsulation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

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

  def _unset_pw_encapsulation(self):
    self.__pw_encapsulation = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="pw-encapsulation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  null_label = __builtin__.property(_get_null_label)
  ttl_propagation = __builtin__.property(_get_ttl_propagation)
  pw_encapsulation = __builtin__.property(_get_pw_encapsulation)


  _pyangbind_elements = OrderedDict([('null_label', null_label), ('ttl_propagation', ttl_propagation), ('pw_encapsulation', pw_encapsulation), ])


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

  YANG Description: Configuration parameters related to MPLS interfaces:
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id','__mpls_enabled',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=True)
    self.__mpls_enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="mpls-enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'global', 'interface-attributes', 'interface', 'config']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/interface/config/interface_id (oc-if:interface-id)

    YANG Description: Indentifier for the MPLS interface
    """
    return self.__interface_id
      
  def _set_interface_id(self, v, load=False):
    """
    Setter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/interface/config/interface_id (oc-if:interface-id)
    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: Indentifier for the MPLS 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_id must be of a type compatible with oc-if:interface-id""",
          'defined-type': "oc-if:interface-id",
          '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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=True)


  def _get_mpls_enabled(self):
    """
    Getter method for mpls_enabled, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/interface/config/mpls_enabled (boolean)

    YANG Description: Enable MPLS forwarding on this interface
    """
    return self.__mpls_enabled
      
  def _set_mpls_enabled(self, v, load=False):
    """
    Setter method for mpls_enabled, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/interface/config/mpls_enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mpls_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mpls_enabled() directly.

    YANG Description: Enable MPLS forwarding on this interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="mpls-enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mpls_enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="mpls-enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

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

  def _unset_mpls_enabled(self):
    self.__mpls_enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="mpls-enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  interface_id = __builtin__.property(_get_interface_id, _set_interface_id)
  mpls_enabled = __builtin__.property(_get_mpls_enabled, _set_mpls_enabled)


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


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

  YANG Description: State parameters related to TE interfaces
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id','__mpls_enabled',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=False)
    self.__mpls_enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="mpls-enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'global', 'interface-attributes', 'interface', 'state']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/interface/state/interface_id (oc-if:interface-id)

    YANG Description: Indentifier for the MPLS interface
    """
    return self.__interface_id
      
  def _set_interface_id(self, v, load=False):
    """
    Setter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/interface/state/interface_id (oc-if:interface-id)
    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: Indentifier for the MPLS 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_id must be of a type compatible with oc-if:interface-id""",
          'defined-type': "oc-if:interface-id",
          '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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=False)


  def _get_mpls_enabled(self):
    """
    Getter method for mpls_enabled, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/interface/state/mpls_enabled (boolean)

    YANG Description: Enable MPLS forwarding on this interface
    """
    return self.__mpls_enabled
      
  def _set_mpls_enabled(self, v, load=False):
    """
    Setter method for mpls_enabled, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/interface/state/mpls_enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mpls_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mpls_enabled() directly.

    YANG Description: Enable MPLS forwarding on this interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="mpls-enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mpls_enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="mpls-enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

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

  def _unset_mpls_enabled(self):
    self.__mpls_enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="mpls-enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  interface_id = __builtin__.property(_get_interface_id)
  mpls_enabled = __builtin__.property(_get_mpls_enabled)


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


class yc_config_openconfig_network_instance__network_instances_network_instance_mpls_global_interface_attributes_interface_interface_ref_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/global/interface-attributes/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'global', 'interface-attributes', 'interface', 'interface-ref', 'config']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/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 /network_instances/network_instance/mpls/global/interface_attributes/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/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 /network_instances/network_instance/mpls/global/interface_attributes/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_global_interface_attributes_interface_interface_ref_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/global/interface-attributes/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'global', 'interface-attributes', 'interface', 'interface-ref', 'state']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/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 /network_instances/network_instance/mpls/global/interface_attributes/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/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 /network_instances/network_instance/mpls/global/interface_attributes/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_global_interface_attributes_interface_interface_ref(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/global/interface-attributes/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
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

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

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'global', 'interface-attributes', 'interface', 'interface-ref']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/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 /network_instances/network_instance/mpls/global/interface_attributes/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_network_instance__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/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 /network_instances/network_instance/mpls/global/interface_attributes/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_network_instance__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_interface_openconfig_network_instance__network_instances_network_instance_mpls_global_interface_attributes_interface(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/global/interface-attributes/interface. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of TE interfaces
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id','__config','__state','__interface_ref',)

  _yang_name = 'interface'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__interface_ref = YANGDynClass(base=yc_interface_ref_openconfig_network_instance__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'global', 'interface-attributes', 'interface']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/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 /network_instances/network_instance/mpls/global/interface_attributes/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/interface/config (container)

    YANG Description: Configuration parameters related to MPLS interfaces:
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/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 related to MPLS interfaces:
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/interface/state (container)

    YANG Description: State parameters related to TE interfaces
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/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: State parameters related to TE interfaces
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_interface_ref(self):
    """
    Getter method for interface_ref, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/interface/interface_ref (container)

    YANG Description: Reference to an interface or subinterface
    """
    return self.__interface_ref
      
  def _set_interface_ref(self, v, load=False):
    """
    Setter method for interface_ref, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/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
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interface_ref_openconfig_network_instance__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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)


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


class yc_interface_attributes_openconfig_network_instance__network_instances_network_instance_mpls_global_interface_attributes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/global/interface-attributes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Parameters related to MPLS interfaces
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface',)

  _yang_name = 'interface-attributes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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_network_instance__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'global', 'interface-attributes']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/interface (list)

    YANG Description: List of TE interfaces
    """
    return self.__interface
      
  def _set_interface(self, v, load=False):
    """
    Setter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/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 TE interfaces
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("interface_id",yc_interface_openconfig_network_instance__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  interface = __builtin__.property(_get_interface, _set_interface)


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


class yc_config_openconfig_network_instance__network_instances_network_instance_mpls_global_reserved_label_blocks_reserved_label_block_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/global/reserved-label-blocks/reserved-label-block/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 label block.
  """
  __slots__ = ('_path_helper', '_extmethods', '__local_id','__lower_bound','__upper_bound',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__local_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__lower_bound = 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="lower-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)
    self.__upper_bound = 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="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)

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

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'global', 'reserved-label-blocks', 'reserved-label-block', 'config']

  def _get_local_id(self):
    """
    Getter method for local_id, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks/reserved_label_block/config/local_id (string)

    YANG Description: A local identifier for the global label block allocation.
    """
    return self.__local_id
      
  def _set_local_id(self, v, load=False):
    """
    Setter method for local_id, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks/reserved_label_block/config/local_id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_id() directly.

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

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

  def _unset_local_id(self):
    self.__local_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_lower_bound(self):
    """
    Getter method for lower_bound, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks/reserved_label_block/config/lower_bound (oc-mplst:mpls-label)

    YANG Description: Lower bound of the global label block. The block is defined to include
this label.
    """
    return self.__lower_bound
      
  def _set_lower_bound(self, v, load=False):
    """
    Setter method for lower_bound, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks/reserved_label_block/config/lower_bound (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lower_bound is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lower_bound() directly.

    YANG Description: Lower bound of the global label block. The block is defined to include
this 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': ['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="lower-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lower_bound must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="lower-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)""",
        })

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

  def _unset_lower_bound(self):
    self.__lower_bound = 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="lower-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)


  def _get_upper_bound(self):
    """
    Getter method for upper_bound, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks/reserved_label_block/config/upper_bound (oc-mplst:mpls-label)

    YANG Description: Upper bound for the global label block. The block is defined to include
this label.
    """
    return self.__upper_bound
      
  def _set_upper_bound(self, v, load=False):
    """
    Setter method for upper_bound, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks/reserved_label_block/config/upper_bound (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_upper_bound is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_upper_bound() directly.

    YANG Description: Upper bound for the global label block. The block is defined to include
this 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': ['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="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """upper_bound must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)""",
        })

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

  def _unset_upper_bound(self):
    self.__upper_bound = 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="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)

  local_id = __builtin__.property(_get_local_id, _set_local_id)
  lower_bound = __builtin__.property(_get_lower_bound, _set_lower_bound)
  upper_bound = __builtin__.property(_get_upper_bound, _set_upper_bound)


  _pyangbind_elements = OrderedDict([('local_id', local_id), ('lower_bound', lower_bound), ('upper_bound', upper_bound), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_global_reserved_label_blocks_reserved_label_block_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/global/reserved-label-blocks/reserved-label-block/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to the label block.
  """
  __slots__ = ('_path_helper', '_extmethods', '__local_id','__lower_bound','__upper_bound',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__local_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__lower_bound = 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="lower-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    self.__upper_bound = 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="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', 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 ['network-instances', 'network-instance', 'mpls', 'global', 'reserved-label-blocks', 'reserved-label-block', 'state']

  def _get_local_id(self):
    """
    Getter method for local_id, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks/reserved_label_block/state/local_id (string)

    YANG Description: A local identifier for the global label block allocation.
    """
    return self.__local_id
      
  def _set_local_id(self, v, load=False):
    """
    Setter method for local_id, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks/reserved_label_block/state/local_id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_id() directly.

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

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

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


  def _get_lower_bound(self):
    """
    Getter method for lower_bound, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks/reserved_label_block/state/lower_bound (oc-mplst:mpls-label)

    YANG Description: Lower bound of the global label block. The block is defined to include
this label.
    """
    return self.__lower_bound
      
  def _set_lower_bound(self, v, load=False):
    """
    Setter method for lower_bound, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks/reserved_label_block/state/lower_bound (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lower_bound is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lower_bound() directly.

    YANG Description: Lower bound of the global label block. The block is defined to include
this 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': ['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="lower-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lower_bound must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="lower-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)""",
        })

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

  def _unset_lower_bound(self):
    self.__lower_bound = 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="lower-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)


  def _get_upper_bound(self):
    """
    Getter method for upper_bound, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks/reserved_label_block/state/upper_bound (oc-mplst:mpls-label)

    YANG Description: Upper bound for the global label block. The block is defined to include
this label.
    """
    return self.__upper_bound
      
  def _set_upper_bound(self, v, load=False):
    """
    Setter method for upper_bound, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks/reserved_label_block/state/upper_bound (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_upper_bound is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_upper_bound() directly.

    YANG Description: Upper bound for the global label block. The block is defined to include
this 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': ['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="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """upper_bound must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)""",
        })

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

  def _unset_upper_bound(self):
    self.__upper_bound = 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="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)

  local_id = __builtin__.property(_get_local_id)
  lower_bound = __builtin__.property(_get_lower_bound)
  upper_bound = __builtin__.property(_get_upper_bound)


  _pyangbind_elements = OrderedDict([('local_id', local_id), ('lower_bound', lower_bound), ('upper_bound', upper_bound), ])


class yc_reserved_label_block_openconfig_network_instance__network_instances_network_instance_mpls_global_reserved_label_blocks_reserved_label_block(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/global/reserved-label-blocks/reserved-label-block. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A range of labels starting with the start-label up to and including
the end label that should be allocated for use by a specific protocol.
  """
  __slots__ = ('_path_helper', '_extmethods', '__local_id','__config','__state',)

  _yang_name = 'reserved-label-block'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__local_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_global_reserved_label_blocks_reserved_label_block_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_global_reserved_label_blocks_reserved_label_block_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'global', 'reserved-label-blocks', 'reserved-label-block']

  def _get_local_id(self):
    """
    Getter method for local_id, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks/reserved_label_block/local_id (leafref)

    YANG Description: A reference to a unique local identifier for this label block.
    """
    return self.__local_id
      
  def _set_local_id(self, v, load=False):
    """
    Setter method for local_id, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks/reserved_label_block/local_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_id() directly.

    YANG Description: A reference to a unique local identifier for this label block.
    """
    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="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

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

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


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks/reserved_label_block/config (container)

    YANG Description: Configuration parameters relating to the label block.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks/reserved_label_block/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 label block.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_global_reserved_label_blocks_reserved_label_block_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_global_reserved_label_blocks_reserved_label_block_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_global_reserved_label_blocks_reserved_label_block_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks/reserved_label_block/state (container)

    YANG Description: State parameters relating to the label block.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks/reserved_label_block/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 parameters relating to the label block.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_global_reserved_label_blocks_reserved_label_block_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_global_reserved_label_blocks_reserved_label_block_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_global_reserved_label_blocks_reserved_label_block_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

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


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


class yc_reserved_label_blocks_openconfig_network_instance__network_instances_network_instance_mpls_global_reserved_label_blocks(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/global/reserved-label-blocks. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A range of labels starting with the start-label and up-to and including
the end label that should be allocated as reserved. These labels should
not be utilised by any dynamic label allocation on the local system unless
the allocating protocol is explicitly configured to specify that
allocation of labels should be out of the label block specified.
  """
  __slots__ = ('_path_helper', '_extmethods', '__reserved_label_block',)

  _yang_name = 'reserved-label-blocks'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__reserved_label_block = YANGDynClass(base=YANGListType("local_id",yc_reserved_label_block_openconfig_network_instance__network_instances_network_instance_mpls_global_reserved_label_blocks_reserved_label_block, yang_name="reserved-label-block", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='local-id', extensions=None), is_container='list', yang_name="reserved-label-block", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'global', 'reserved-label-blocks']

  def _get_reserved_label_block(self):
    """
    Getter method for reserved_label_block, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks/reserved_label_block (list)

    YANG Description: A range of labels starting with the start-label up to and including
the end label that should be allocated for use by a specific protocol.
    """
    return self.__reserved_label_block
      
  def _set_reserved_label_block(self, v, load=False):
    """
    Setter method for reserved_label_block, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks/reserved_label_block (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_reserved_label_block is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_reserved_label_block() directly.

    YANG Description: A range of labels starting with the start-label up to and including
the end label that should be allocated for use by a specific protocol.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("local_id",yc_reserved_label_block_openconfig_network_instance__network_instances_network_instance_mpls_global_reserved_label_blocks_reserved_label_block, yang_name="reserved-label-block", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='local-id', extensions=None), is_container='list', yang_name="reserved-label-block", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """reserved_label_block must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("local_id",yc_reserved_label_block_openconfig_network_instance__network_instances_network_instance_mpls_global_reserved_label_blocks_reserved_label_block, yang_name="reserved-label-block", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='local-id', extensions=None), is_container='list', yang_name="reserved-label-block", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

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

  def _unset_reserved_label_block(self):
    self.__reserved_label_block = YANGDynClass(base=YANGListType("local_id",yc_reserved_label_block_openconfig_network_instance__network_instances_network_instance_mpls_global_reserved_label_blocks_reserved_label_block, yang_name="reserved-label-block", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='local-id', extensions=None), is_container='list', yang_name="reserved-label-block", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  reserved_label_block = __builtin__.property(_get_reserved_label_block, _set_reserved_label_block)


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


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

  YANG Description: general mpls configuration applicable to any
type of LSP and signaling protocol - label ranges,
entropy label supportmay be added here
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__interface_attributes','__reserved_label_blocks',)

  _yang_name = 'global'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_global_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_global_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__interface_attributes = YANGDynClass(base=yc_interface_attributes_openconfig_network_instance__network_instances_network_instance_mpls_global_interface_attributes, is_container='container', yang_name="interface-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__reserved_label_blocks = YANGDynClass(base=yc_reserved_label_blocks_openconfig_network_instance__network_instances_network_instance_mpls_global_reserved_label_blocks, is_container='container', yang_name="reserved-label-blocks", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'global']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/global/config (container)

    YANG Description: Top level global MPLS configuration
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/global/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: Top level global MPLS configuration
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_global_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_global_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_global_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/global/state (container)

    YANG Description: Top level global MPLS state
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/global/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: Top level global MPLS state
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_global_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_global_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_global_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_interface_attributes(self):
    """
    Getter method for interface_attributes, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes (container)

    YANG Description: Parameters related to MPLS interfaces
    """
    return self.__interface_attributes
      
  def _set_interface_attributes(self, v, load=False):
    """
    Setter method for interface_attributes, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_interface_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_interface_attributes() directly.

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

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

  def _unset_interface_attributes(self):
    self.__interface_attributes = YANGDynClass(base=yc_interface_attributes_openconfig_network_instance__network_instances_network_instance_mpls_global_interface_attributes, is_container='container', yang_name="interface-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_reserved_label_blocks(self):
    """
    Getter method for reserved_label_blocks, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks (container)

    YANG Description: A range of labels starting with the start-label and up-to and including
the end label that should be allocated as reserved. These labels should
not be utilised by any dynamic label allocation on the local system unless
the allocating protocol is explicitly configured to specify that
allocation of labels should be out of the label block specified.
    """
    return self.__reserved_label_blocks
      
  def _set_reserved_label_blocks(self, v, load=False):
    """
    Setter method for reserved_label_blocks, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_reserved_label_blocks is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_reserved_label_blocks() directly.

    YANG Description: A range of labels starting with the start-label and up-to and including
the end label that should be allocated as reserved. These labels should
not be utilised by any dynamic label allocation on the local system unless
the allocating protocol is explicitly configured to specify that
allocation of labels should be out of the label block specified.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_reserved_label_blocks_openconfig_network_instance__network_instances_network_instance_mpls_global_reserved_label_blocks, is_container='container', yang_name="reserved-label-blocks", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """reserved_label_blocks must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_reserved_label_blocks_openconfig_network_instance__network_instances_network_instance_mpls_global_reserved_label_blocks, is_container='container', yang_name="reserved-label-blocks", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

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

  def _unset_reserved_label_blocks(self):
    self.__reserved_label_blocks = YANGDynClass(base=yc_reserved_label_blocks_openconfig_network_instance__network_instances_network_instance_mpls_global_reserved_label_blocks, is_container='container', yang_name="reserved-label-blocks", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  interface_attributes = __builtin__.property(_get_interface_attributes, _set_interface_attributes)
  reserved_label_blocks = __builtin__.property(_get_reserved_label_blocks, _set_reserved_label_blocks)


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


class yc_config_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/te-global-attributes/srlgs/srlg/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters related to the SRLG
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__value','__cost','__flooding_type',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__cost = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="cost", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__flooding_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'FLOODED_SRLG': {}, 'STATIC_SRLG': {}},), default=six.text_type("FLOODED_SRLG"), is_leaf=True, yang_name="flooding-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='mpls-srlg-flooding-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 ['network-instances', 'network-instance', 'mpls', 'te-global-attributes', 'srlgs', 'srlg', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/config/name (string)

    YANG Description: SRLG group identifier
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/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: SRLG group identifier
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/config/value (uint32)

    YANG Description: group ID for the SRLG
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/config/value (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: group ID for the SRLG
    """
    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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value 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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

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

  def _unset_value(self):
    self.__value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_cost(self):
    """
    Getter method for cost, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/config/cost (uint32)

    YANG Description: The cost of the SRLG to the computation
algorithm
    """
    return self.__cost
      
  def _set_cost(self, v, load=False):
    """
    Setter method for cost, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/config/cost (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cost is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cost() directly.

    YANG Description: The cost of the SRLG to the computation
algorithm
    """
    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="cost", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cost 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="cost", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

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

  def _unset_cost(self):
    self.__cost = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="cost", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_flooding_type(self):
    """
    Getter method for flooding_type, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/config/flooding_type (mpls-srlg-flooding-type)

    YANG Description: The type of SRLG, either flooded in the IGP or
statically configured
    """
    return self.__flooding_type
      
  def _set_flooding_type(self, v, load=False):
    """
    Setter method for flooding_type, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/config/flooding_type (mpls-srlg-flooding-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flooding_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flooding_type() directly.

    YANG Description: The type of SRLG, either flooded in the IGP or
statically 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={'FLOODED_SRLG': {}, 'STATIC_SRLG': {}},), default=six.text_type("FLOODED_SRLG"), is_leaf=True, yang_name="flooding-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='mpls-srlg-flooding-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flooding_type must be of a type compatible with mpls-srlg-flooding-type""",
          'defined-type': "openconfig-network-instance:mpls-srlg-flooding-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'FLOODED_SRLG': {}, 'STATIC_SRLG': {}},), default=six.text_type("FLOODED_SRLG"), is_leaf=True, yang_name="flooding-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='mpls-srlg-flooding-type', is_config=True)""",
        })

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

  def _unset_flooding_type(self):
    self.__flooding_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'FLOODED_SRLG': {}, 'STATIC_SRLG': {}},), default=six.text_type("FLOODED_SRLG"), is_leaf=True, yang_name="flooding-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='mpls-srlg-flooding-type', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  value = __builtin__.property(_get_value, _set_value)
  cost = __builtin__.property(_get_cost, _set_cost)
  flooding_type = __builtin__.property(_get_flooding_type, _set_flooding_type)


  _pyangbind_elements = OrderedDict([('name', name), ('value', value), ('cost', cost), ('flooding_type', flooding_type), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/te-global-attributes/srlgs/srlg/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters related to the SRLG
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__value','__cost','__flooding_type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__cost = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="cost", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__flooding_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'FLOODED_SRLG': {}, 'STATIC_SRLG': {}},), default=six.text_type("FLOODED_SRLG"), is_leaf=True, yang_name="flooding-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='mpls-srlg-flooding-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 ['network-instances', 'network-instance', 'mpls', 'te-global-attributes', 'srlgs', 'srlg', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/state/name (string)

    YANG Description: SRLG group identifier
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/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: SRLG group identifier
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/state/value (uint32)

    YANG Description: group ID for the SRLG
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/state/value (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: group ID for the SRLG
    """
    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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value 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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

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

  def _unset_value(self):
    self.__value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_cost(self):
    """
    Getter method for cost, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/state/cost (uint32)

    YANG Description: The cost of the SRLG to the computation
algorithm
    """
    return self.__cost
      
  def _set_cost(self, v, load=False):
    """
    Setter method for cost, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/state/cost (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cost is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cost() directly.

    YANG Description: The cost of the SRLG to the computation
algorithm
    """
    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="cost", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cost 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="cost", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

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

  def _unset_cost(self):
    self.__cost = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="cost", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_flooding_type(self):
    """
    Getter method for flooding_type, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/state/flooding_type (mpls-srlg-flooding-type)

    YANG Description: The type of SRLG, either flooded in the IGP or
statically configured
    """
    return self.__flooding_type
      
  def _set_flooding_type(self, v, load=False):
    """
    Setter method for flooding_type, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/state/flooding_type (mpls-srlg-flooding-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flooding_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flooding_type() directly.

    YANG Description: The type of SRLG, either flooded in the IGP or
statically 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={'FLOODED_SRLG': {}, 'STATIC_SRLG': {}},), default=six.text_type("FLOODED_SRLG"), is_leaf=True, yang_name="flooding-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='mpls-srlg-flooding-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flooding_type must be of a type compatible with mpls-srlg-flooding-type""",
          'defined-type': "openconfig-network-instance:mpls-srlg-flooding-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'FLOODED_SRLG': {}, 'STATIC_SRLG': {}},), default=six.text_type("FLOODED_SRLG"), is_leaf=True, yang_name="flooding-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='mpls-srlg-flooding-type', is_config=False)""",
        })

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

  def _unset_flooding_type(self):
    self.__flooding_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'FLOODED_SRLG': {}, 'STATIC_SRLG': {}},), default=six.text_type("FLOODED_SRLG"), is_leaf=True, yang_name="flooding-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='mpls-srlg-flooding-type', is_config=False)

  name = __builtin__.property(_get_name)
  value = __builtin__.property(_get_value)
  cost = __builtin__.property(_get_cost)
  flooding_type = __builtin__.property(_get_flooding_type)


  _pyangbind_elements = OrderedDict([('name', name), ('value', value), ('cost', cost), ('flooding_type', flooding_type), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_static_srlg_members_members_list_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/te-global-attributes/srlgs/srlg/static-srlg-members/members-list/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
SRLG members
  """
  __slots__ = ('_path_helper', '_extmethods', '__from_address','__to_address',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__from_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}'}),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}|:))'}),], is_leaf=True, yang_name="from-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)
    self.__to_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}'}),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}|:))'}),], is_leaf=True, yang_name="to-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)

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

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'te-global-attributes', 'srlgs', 'srlg', 'static-srlg-members', 'members-list', 'config']

  def _get_from_address(self):
    """
    Getter method for from_address, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/static_srlg_members/members_list/config/from_address (inet:ip-address)

    YANG Description: IP address of the a-side of the SRLG link
    """
    return self.__from_address
      
  def _set_from_address(self, v, load=False):
    """
    Setter method for from_address, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/static_srlg_members/members_list/config/from_address (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_from_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_from_address() directly.

    YANG Description: IP address of the a-side of the SRLG link
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="from-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """from_address must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="from-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)""",
        })

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

  def _unset_from_address(self):
    self.__from_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}'}),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}|:))'}),], is_leaf=True, yang_name="from-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)


  def _get_to_address(self):
    """
    Getter method for to_address, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/static_srlg_members/members_list/config/to_address (inet:ip-address)

    YANG Description: IP address of the z-side of the SRLG link
    """
    return self.__to_address
      
  def _set_to_address(self, v, load=False):
    """
    Setter method for to_address, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/static_srlg_members/members_list/config/to_address (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_to_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_to_address() directly.

    YANG Description: IP address of the z-side of the SRLG link
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="to-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """to_address must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="to-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)""",
        })

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

  def _unset_to_address(self):
    self.__to_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}'}),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}|:))'}),], is_leaf=True, yang_name="to-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)

  from_address = __builtin__.property(_get_from_address, _set_from_address)
  to_address = __builtin__.property(_get_to_address, _set_to_address)


  _pyangbind_elements = OrderedDict([('from_address', from_address), ('to_address', to_address), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_static_srlg_members_members_list_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/te-global-attributes/srlgs/srlg/static-srlg-members/members-list/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to the SRLG
members
  """
  __slots__ = ('_path_helper', '_extmethods', '__from_address','__to_address',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__from_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}'}),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}|:))'}),], is_leaf=True, yang_name="from-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    self.__to_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}'}),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}|:))'}),], is_leaf=True, yang_name="to-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', 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 ['network-instances', 'network-instance', 'mpls', 'te-global-attributes', 'srlgs', 'srlg', 'static-srlg-members', 'members-list', 'state']

  def _get_from_address(self):
    """
    Getter method for from_address, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/static_srlg_members/members_list/state/from_address (inet:ip-address)

    YANG Description: IP address of the a-side of the SRLG link
    """
    return self.__from_address
      
  def _set_from_address(self, v, load=False):
    """
    Setter method for from_address, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/static_srlg_members/members_list/state/from_address (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_from_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_from_address() directly.

    YANG Description: IP address of the a-side of the SRLG link
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="from-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """from_address must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="from-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)""",
        })

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

  def _unset_from_address(self):
    self.__from_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}'}),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}|:))'}),], is_leaf=True, yang_name="from-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)


  def _get_to_address(self):
    """
    Getter method for to_address, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/static_srlg_members/members_list/state/to_address (inet:ip-address)

    YANG Description: IP address of the z-side of the SRLG link
    """
    return self.__to_address
      
  def _set_to_address(self, v, load=False):
    """
    Setter method for to_address, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/static_srlg_members/members_list/state/to_address (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_to_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_to_address() directly.

    YANG Description: IP address of the z-side of the SRLG link
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="to-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """to_address must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="to-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)""",
        })

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

  def _unset_to_address(self):
    self.__to_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}'}),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}|:))'}),], is_leaf=True, yang_name="to-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)

  from_address = __builtin__.property(_get_from_address)
  to_address = __builtin__.property(_get_to_address)


  _pyangbind_elements = OrderedDict([('from_address', from_address), ('to_address', to_address), ])


class yc_members_list_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_static_srlg_members_members_list(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/te-global-attributes/srlgs/srlg/static-srlg-members/members-list. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of SRLG members, which are expressed
as IP address endpoints of links contained in the
SRLG
  """
  __slots__ = ('_path_helper', '_extmethods', '__from_address','__config','__state',)

  _yang_name = 'members-list'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__from_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="from-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_static_srlg_members_members_list_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_static_srlg_members_members_list_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'te-global-attributes', 'srlgs', 'srlg', 'static-srlg-members', 'members-list']

  def _get_from_address(self):
    """
    Getter method for from_address, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/static_srlg_members/members_list/from_address (leafref)

    YANG Description: The from address of the link in the SRLG
    """
    return self.__from_address
      
  def _set_from_address(self, v, load=False):
    """
    Setter method for from_address, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/static_srlg_members/members_list/from_address (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_from_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_from_address() directly.

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

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

  def _unset_from_address(self):
    self.__from_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="from-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/static_srlg_members/members_list/config (container)

    YANG Description: Configuration parameters relating to the
SRLG members
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/static_srlg_members/members_list/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
SRLG members
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_static_srlg_members_members_list_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_static_srlg_members_members_list_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_static_srlg_members_members_list_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/static_srlg_members/members_list/state (container)

    YANG Description: State parameters relating to the SRLG
members
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/static_srlg_members/members_list/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 parameters relating to the SRLG
members
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_static_srlg_members_members_list_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_static_srlg_members_members_list_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_static_srlg_members_members_list_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

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


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


class yc_static_srlg_members_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_static_srlg_members(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/te-global-attributes/srlgs/srlg/static-srlg-members. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: SRLG members for static (not flooded) SRLGs 
  """
  __slots__ = ('_path_helper', '_extmethods', '__members_list',)

  _yang_name = 'static-srlg-members'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__members_list = YANGDynClass(base=YANGListType("from_address",yc_members_list_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_static_srlg_members_members_list, yang_name="members-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='from-address', extensions=None), is_container='list', yang_name="members-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'te-global-attributes', 'srlgs', 'srlg', 'static-srlg-members']

  def _get_members_list(self):
    """
    Getter method for members_list, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/static_srlg_members/members_list (list)

    YANG Description: List of SRLG members, which are expressed
as IP address endpoints of links contained in the
SRLG
    """
    return self.__members_list
      
  def _set_members_list(self, v, load=False):
    """
    Setter method for members_list, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/static_srlg_members/members_list (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_members_list is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_members_list() directly.

    YANG Description: List of SRLG members, which are expressed
as IP address endpoints of links contained in the
SRLG
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("from_address",yc_members_list_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_static_srlg_members_members_list, yang_name="members-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='from-address', extensions=None), is_container='list', yang_name="members-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """members_list must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("from_address",yc_members_list_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_static_srlg_members_members_list, yang_name="members-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='from-address', extensions=None), is_container='list', yang_name="members-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

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

  def _unset_members_list(self):
    self.__members_list = YANGDynClass(base=YANGListType("from_address",yc_members_list_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_static_srlg_members_members_list, yang_name="members-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='from-address', extensions=None), is_container='list', yang_name="members-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  members_list = __builtin__.property(_get_members_list, _set_members_list)


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


class yc_srlg_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/te-global-attributes/srlgs/srlg. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of shared risk link groups
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state','__static_srlg_members',)

  _yang_name = 'srlg'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__static_srlg_members = YANGDynClass(base=yc_static_srlg_members_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_static_srlg_members, is_container='container', yang_name="static-srlg-members", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'te-global-attributes', 'srlgs', 'srlg']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/name (leafref)

    YANG Description: The SRLG group identifier
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/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 SRLG group identifier
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/config (container)

    YANG Description: Configuration parameters related to the SRLG
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/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 related to the SRLG
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/state (container)

    YANG Description: State parameters related to the SRLG
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/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 parameters related to the SRLG
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_static_srlg_members(self):
    """
    Getter method for static_srlg_members, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/static_srlg_members (container)

    YANG Description: SRLG members for static (not flooded) SRLGs 
    """
    return self.__static_srlg_members
      
  def _set_static_srlg_members(self, v, load=False):
    """
    Setter method for static_srlg_members, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/static_srlg_members (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_static_srlg_members is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_static_srlg_members() directly.

    YANG Description: SRLG members for static (not flooded) SRLGs 
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_static_srlg_members_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_static_srlg_members, is_container='container', yang_name="static-srlg-members", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """static_srlg_members must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_static_srlg_members_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_static_srlg_members, is_container='container', yang_name="static-srlg-members", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

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

  def _unset_static_srlg_members(self):
    self.__static_srlg_members = YANGDynClass(base=yc_static_srlg_members_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_static_srlg_members, is_container='container', yang_name="static-srlg-members", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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)
  static_srlg_members = __builtin__.property(_get_static_srlg_members, _set_static_srlg_members)


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


class yc_srlgs_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_srlgs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/te-global-attributes/srlgs. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Shared risk link groups attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__srlg',)

  _yang_name = 'srlgs'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__srlg = YANGDynClass(base=YANGListType("name",yc_srlg_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg, yang_name="srlg", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="srlg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'te-global-attributes', 'srlgs']

  def _get_srlg(self):
    """
    Getter method for srlg, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg (list)

    YANG Description: List of shared risk link groups
    """
    return self.__srlg
      
  def _set_srlg(self, v, load=False):
    """
    Setter method for srlg, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_srlg is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_srlg() directly.

    YANG Description: List of shared risk link groups
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_srlg_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg, yang_name="srlg", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="srlg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """srlg must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_srlg_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg, yang_name="srlg", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="srlg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

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

  def _unset_srlg(self):
    self.__srlg = YANGDynClass(base=YANGListType("name",yc_srlg_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg, yang_name="srlg", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="srlg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  srlg = __builtin__.property(_get_srlg, _set_srlg)


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


class yc_config_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_mpls_admin_groups_admin_group_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/te-global-attributes/mpls-admin-groups/admin-group/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configurable items for admin-groups
  """
  __slots__ = ('_path_helper', '_extmethods', '__admin_group_name','__bit_position',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__admin_group_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="admin-group-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__bit_position = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bit-position", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'te-global-attributes', 'mpls-admin-groups', 'admin-group', 'config']

  def _get_admin_group_name(self):
    """
    Getter method for admin_group_name, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/mpls_admin_groups/admin_group/config/admin_group_name (string)

    YANG Description: name for mpls admin-group
    """
    return self.__admin_group_name
      
  def _set_admin_group_name(self, v, load=False):
    """
    Setter method for admin_group_name, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/mpls_admin_groups/admin_group/config/admin_group_name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_admin_group_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_admin_group_name() directly.

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

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

  def _unset_admin_group_name(self):
    self.__admin_group_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="admin-group-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_bit_position(self):
    """
    Getter method for bit_position, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/mpls_admin_groups/admin_group/config/bit_position (uint32)

    YANG Description: bit-position value for mpls admin-group. The value
for the admin group is an integer that represents one
of the bit positions in the admin-group bitmask. Values
between 0 and 31 are interpreted as the original limit
of 32 admin groups. Values >=32 are interpreted as
extended admin group values as per RFC7308.
    """
    return self.__bit_position
      
  def _set_bit_position(self, v, load=False):
    """
    Setter method for bit_position, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/mpls_admin_groups/admin_group/config/bit_position (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bit_position is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bit_position() directly.

    YANG Description: bit-position value for mpls admin-group. The value
for the admin group is an integer that represents one
of the bit positions in the admin-group bitmask. Values
between 0 and 31 are interpreted as the original limit
of 32 admin groups. Values >=32 are interpreted as
extended admin group values as per RFC7308.
    """
    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="bit-position", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bit_position 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="bit-position", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

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

  def _unset_bit_position(self):
    self.__bit_position = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bit-position", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)

  admin_group_name = __builtin__.property(_get_admin_group_name, _set_admin_group_name)
  bit_position = __builtin__.property(_get_bit_position, _set_bit_position)


  _pyangbind_elements = OrderedDict([('admin_group_name', admin_group_name), ('bit_position', bit_position), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_mpls_admin_groups_admin_group_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/te-global-attributes/mpls-admin-groups/admin-group/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for admin-groups
  """
  __slots__ = ('_path_helper', '_extmethods', '__admin_group_name','__bit_position',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__admin_group_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="admin-group-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__bit_position = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bit-position", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'te-global-attributes', 'mpls-admin-groups', 'admin-group', 'state']

  def _get_admin_group_name(self):
    """
    Getter method for admin_group_name, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/mpls_admin_groups/admin_group/state/admin_group_name (string)

    YANG Description: name for mpls admin-group
    """
    return self.__admin_group_name
      
  def _set_admin_group_name(self, v, load=False):
    """
    Setter method for admin_group_name, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/mpls_admin_groups/admin_group/state/admin_group_name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_admin_group_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_admin_group_name() directly.

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

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

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


  def _get_bit_position(self):
    """
    Getter method for bit_position, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/mpls_admin_groups/admin_group/state/bit_position (uint32)

    YANG Description: bit-position value for mpls admin-group. The value
for the admin group is an integer that represents one
of the bit positions in the admin-group bitmask. Values
between 0 and 31 are interpreted as the original limit
of 32 admin groups. Values >=32 are interpreted as
extended admin group values as per RFC7308.
    """
    return self.__bit_position
      
  def _set_bit_position(self, v, load=False):
    """
    Setter method for bit_position, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/mpls_admin_groups/admin_group/state/bit_position (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bit_position is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bit_position() directly.

    YANG Description: bit-position value for mpls admin-group. The value
for the admin group is an integer that represents one
of the bit positions in the admin-group bitmask. Values
between 0 and 31 are interpreted as the original limit
of 32 admin groups. Values >=32 are interpreted as
extended admin group values as per RFC7308.
    """
    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="bit-position", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bit_position 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="bit-position", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

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

  def _unset_bit_position(self):
    self.__bit_position = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bit-position", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  admin_group_name = __builtin__.property(_get_admin_group_name)
  bit_position = __builtin__.property(_get_bit_position)


  _pyangbind_elements = OrderedDict([('admin_group_name', admin_group_name), ('bit_position', bit_position), ])


class yc_admin_group_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_mpls_admin_groups_admin_group(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/te-global-attributes/mpls-admin-groups/admin-group. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: configuration of value to name mapping
for mpls affinities/admin-groups
  """
  __slots__ = ('_path_helper', '_extmethods', '__admin_group_name','__config','__state',)

  _yang_name = 'admin-group'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__admin_group_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="admin-group-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_mpls_admin_groups_admin_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_mpls_admin_groups_admin_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'te-global-attributes', 'mpls-admin-groups', 'admin-group']

  def _get_admin_group_name(self):
    """
    Getter method for admin_group_name, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/mpls_admin_groups/admin_group/admin_group_name (leafref)

    YANG Description: name for mpls admin-group
    """
    return self.__admin_group_name
      
  def _set_admin_group_name(self, v, load=False):
    """
    Setter method for admin_group_name, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/mpls_admin_groups/admin_group/admin_group_name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_admin_group_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_admin_group_name() directly.

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

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

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


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/mpls_admin_groups/admin_group/config (container)

    YANG Description: Configurable items for admin-groups
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/mpls_admin_groups/admin_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: Configurable items for admin-groups
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_mpls_admin_groups_admin_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_te_global_attributes_mpls_admin_groups_admin_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_te_global_attributes_mpls_admin_groups_admin_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/mpls_admin_groups/admin_group/state (container)

    YANG Description: Operational state for admin-groups
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/mpls_admin_groups/admin_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 for admin-groups
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_mpls_admin_groups_admin_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_te_global_attributes_mpls_admin_groups_admin_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_te_global_attributes_mpls_admin_groups_admin_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

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


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


class yc_mpls_admin_groups_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_mpls_admin_groups(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/te-global-attributes/mpls-admin-groups. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for admin-groups configuration
and state
  """
  __slots__ = ('_path_helper', '_extmethods', '__admin_group',)

  _yang_name = 'mpls-admin-groups'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__admin_group = YANGDynClass(base=YANGListType("admin_group_name",yc_admin_group_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_mpls_admin_groups_admin_group, yang_name="admin-group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='admin-group-name', extensions=None), is_container='list', yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'te-global-attributes', 'mpls-admin-groups']

  def _get_admin_group(self):
    """
    Getter method for admin_group, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/mpls_admin_groups/admin_group (list)

    YANG Description: configuration of value to name mapping
for mpls affinities/admin-groups
    """
    return self.__admin_group
      
  def _set_admin_group(self, v, load=False):
    """
    Setter method for admin_group, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/mpls_admin_groups/admin_group (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_admin_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_admin_group() directly.

    YANG Description: configuration of value to name mapping
for mpls affinities/admin-groups
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("admin_group_name",yc_admin_group_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_mpls_admin_groups_admin_group, yang_name="admin-group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='admin-group-name', extensions=None), is_container='list', yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """admin_group must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("admin_group_name",yc_admin_group_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_mpls_admin_groups_admin_group, yang_name="admin-group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='admin-group-name', extensions=None), is_container='list', yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

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

  def _unset_admin_group(self):
    self.__admin_group = YANGDynClass(base=YANGListType("admin_group_name",yc_admin_group_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_mpls_admin_groups_admin_group, yang_name="admin-group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='admin-group-name', extensions=None), is_container='list', yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  admin_group = __builtin__.property(_get_admin_group, _set_admin_group)


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


class yc_config_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_te_lsp_timers_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/te-global-attributes/te-lsp-timers/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters related
to timers for TE LSPs
  """
  __slots__ = ('_path_helper', '_extmethods', '__install_delay','__cleanup_delay','__reoptimize_timer',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__install_delay = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..3600']}), is_leaf=True, yang_name="install-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__cleanup_delay = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="cleanup-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__reoptimize_timer = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="reoptimize-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

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

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'te-global-attributes', 'te-lsp-timers', 'config']

  def _get_install_delay(self):
    """
    Getter method for install_delay, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/te_lsp_timers/config/install_delay (uint16)

    YANG Description: delay the use of newly installed te lsp for a
specified amount of time.
    """
    return self.__install_delay
      
  def _set_install_delay(self, v, load=False):
    """
    Setter method for install_delay, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/te_lsp_timers/config/install_delay (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_install_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_install_delay() directly.

    YANG Description: delay the use of newly installed te lsp for a
specified amount of time.
    """
    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': ['0..3600']}), is_leaf=True, yang_name="install-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """install_delay must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..3600']}), is_leaf=True, yang_name="install-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

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

  def _unset_install_delay(self):
    self.__install_delay = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..3600']}), is_leaf=True, yang_name="install-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_cleanup_delay(self):
    """
    Getter method for cleanup_delay, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/te_lsp_timers/config/cleanup_delay (uint16)

    YANG Description: delay the removal of old te lsp for a specified
amount of time
    """
    return self.__cleanup_delay
      
  def _set_cleanup_delay(self, v, load=False):
    """
    Setter method for cleanup_delay, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/te_lsp_timers/config/cleanup_delay (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cleanup_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cleanup_delay() directly.

    YANG Description: delay the removal of old te lsp for a specified
amount of time
    """
    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="cleanup-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cleanup_delay 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="cleanup-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

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

  def _unset_cleanup_delay(self):
    self.__cleanup_delay = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="cleanup-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_reoptimize_timer(self):
    """
    Getter method for reoptimize_timer, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/te_lsp_timers/config/reoptimize_timer (uint16)

    YANG Description: frequency of reoptimization of
a traffic engineered LSP
    """
    return self.__reoptimize_timer
      
  def _set_reoptimize_timer(self, v, load=False):
    """
    Setter method for reoptimize_timer, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/te_lsp_timers/config/reoptimize_timer (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_reoptimize_timer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_reoptimize_timer() directly.

    YANG Description: frequency of reoptimization of
a traffic engineered LSP
    """
    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="reoptimize-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """reoptimize_timer 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="reoptimize-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

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

  def _unset_reoptimize_timer(self):
    self.__reoptimize_timer = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="reoptimize-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

  install_delay = __builtin__.property(_get_install_delay, _set_install_delay)
  cleanup_delay = __builtin__.property(_get_cleanup_delay, _set_cleanup_delay)
  reoptimize_timer = __builtin__.property(_get_reoptimize_timer, _set_reoptimize_timer)


  _pyangbind_elements = OrderedDict([('install_delay', install_delay), ('cleanup_delay', cleanup_delay), ('reoptimize_timer', reoptimize_timer), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_te_lsp_timers_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/te-global-attributes/te-lsp-timers/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State related to timers for TE LSPs
  """
  __slots__ = ('_path_helper', '_extmethods', '__install_delay','__cleanup_delay','__reoptimize_timer',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__install_delay = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..3600']}), is_leaf=True, yang_name="install-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__cleanup_delay = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="cleanup-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__reoptimize_timer = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="reoptimize-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'mpls', 'te-global-attributes', 'te-lsp-timers', 'state']

  def _get_install_delay(self):
    """
    Getter method for install_delay, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/te_lsp_timers/state/install_delay (uint16)

    YANG Description: delay the use of newly installed te lsp for a
specified amount of time.
    """
    return self.__install_delay
      
  def _set_install_delay(self, v, load=False):
    """
    Setter method for install_delay, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/te_lsp_timers/state/install_delay (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_install_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_install_delay() directly.

    YANG Description: delay the use of newly installed te lsp for a
specified amount of time.
    """
    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': ['0..3600']}), is_leaf=True, yang_name="install-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """install_delay must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..3600']}), is_leaf=True, yang_name="install-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

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

  def _unset_install_delay(self):
    self.__install_delay = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..3600']}), is_leaf=True, yang_name="install-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_cleanup_delay(self):
    """
    Getter method for cleanup_delay, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/te_lsp_timers/state/cleanup_delay (uint16)

    YANG Description: delay the removal of old te lsp for a specified
amount of time
    """
    return self.__cleanup_delay
      
  def _set_cleanup_delay(self, v, load=False):
    """
    Setter method for cleanup_delay, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/te_lsp_timers/state/cleanup_delay (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cleanup_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cleanup_delay() directly.

    YANG Description: delay the removal of old te lsp for a specified
amount of time
    """
    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="cleanup-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cleanup_delay 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="cleanup-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

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

  def _unset_cleanup_delay(self):
    self.__cleanup_delay = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="cleanup-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_reoptimize_timer(self):
    """
    Getter method for reoptimize_timer, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/te_lsp_timers/state/reoptimize_timer (uint16)

    YANG Description: frequency of reoptimization of
a traffic engineered LSP
    """
    return self.__reoptimize_timer
      
  def _set_reoptimize_timer(self, v, load=False):
    """
    Setter method for reoptimize_timer, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/te_lsp_timers/state/reoptimize_timer (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_reoptimize_timer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_reoptimize_timer() directly.

    YANG Description: frequency of reoptimization of
a traffic engineered LSP
    """
    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="reoptimize-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """reoptimize_timer 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="reoptimize-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

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

  def _unset_reoptimize_timer(self):
    self.__reoptimize_timer = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="reoptimize-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  install_delay = __builtin__.property(_get_install_delay)
  cleanup_delay = __builtin__.property(_get_cleanup_delay)
  reoptimize_timer = __builtin__.property(_get_reoptimize_timer)


  _pyangbind_elements = OrderedDict([('install_delay', install_delay), ('cleanup_delay', cleanup_delay), ('reoptimize_timer', reoptimize_timer), ])


class yc_te_lsp_timers_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_te_lsp_timers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/te-global-attributes/te-lsp-timers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Definition for delays associated with setup
and cleanup of TE LSPs
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'te-lsp-timers'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_te_lsp_timers_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_te_lsp_timers_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'te-global-attributes', 'te-lsp-timers']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/te_lsp_timers/config (container)

    YANG Description: Configuration parameters related
to timers for TE LSPs
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/te_lsp_timers/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 related
to timers for TE LSPs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_te_lsp_timers_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_te_global_attributes_te_lsp_timers_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_te_global_attributes_te_lsp_timers_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/te_lsp_timers/state (container)

    YANG Description: State related to timers for TE LSPs
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/te_lsp_timers/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 related to timers for TE LSPs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_te_lsp_timers_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_te_global_attributes_te_lsp_timers_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_te_global_attributes_te_lsp_timers_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_te_global_attributes_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/te-global-attributes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: traffic-engineering global attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__srlgs','__mpls_admin_groups','__te_lsp_timers',)

  _yang_name = 'te-global-attributes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__srlgs = YANGDynClass(base=yc_srlgs_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_srlgs, is_container='container', yang_name="srlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__mpls_admin_groups = YANGDynClass(base=yc_mpls_admin_groups_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_mpls_admin_groups, is_container='container', yang_name="mpls-admin-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__te_lsp_timers = YANGDynClass(base=yc_te_lsp_timers_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_te_lsp_timers, is_container='container', yang_name="te-lsp-timers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'te-global-attributes']

  def _get_srlgs(self):
    """
    Getter method for srlgs, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs (container)

    YANG Description: Shared risk link groups attributes
    """
    return self.__srlgs
      
  def _set_srlgs(self, v, load=False):
    """
    Setter method for srlgs, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_srlgs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_srlgs() directly.

    YANG Description: Shared risk link groups attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_srlgs_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_srlgs, is_container='container', yang_name="srlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """srlgs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_srlgs_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_srlgs, is_container='container', yang_name="srlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

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

  def _unset_srlgs(self):
    self.__srlgs = YANGDynClass(base=yc_srlgs_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_srlgs, is_container='container', yang_name="srlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_mpls_admin_groups(self):
    """
    Getter method for mpls_admin_groups, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/mpls_admin_groups (container)

    YANG Description: Top-level container for admin-groups configuration
and state
    """
    return self.__mpls_admin_groups
      
  def _set_mpls_admin_groups(self, v, load=False):
    """
    Setter method for mpls_admin_groups, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/mpls_admin_groups (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mpls_admin_groups is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mpls_admin_groups() directly.

    YANG Description: Top-level container for admin-groups configuration
and state
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_mpls_admin_groups_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_mpls_admin_groups, is_container='container', yang_name="mpls-admin-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mpls_admin_groups must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_mpls_admin_groups_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_mpls_admin_groups, is_container='container', yang_name="mpls-admin-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

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

  def _unset_mpls_admin_groups(self):
    self.__mpls_admin_groups = YANGDynClass(base=yc_mpls_admin_groups_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_mpls_admin_groups, is_container='container', yang_name="mpls-admin-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_te_lsp_timers(self):
    """
    Getter method for te_lsp_timers, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/te_lsp_timers (container)

    YANG Description: Definition for delays associated with setup
and cleanup of TE LSPs
    """
    return self.__te_lsp_timers
      
  def _set_te_lsp_timers(self, v, load=False):
    """
    Setter method for te_lsp_timers, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/te_lsp_timers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_te_lsp_timers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_te_lsp_timers() directly.

    YANG Description: Definition for delays associated with setup
and cleanup of TE LSPs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_te_lsp_timers_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_te_lsp_timers, is_container='container', yang_name="te-lsp-timers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """te_lsp_timers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_te_lsp_timers_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_te_lsp_timers, is_container='container', yang_name="te-lsp-timers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

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

  def _unset_te_lsp_timers(self):
    self.__te_lsp_timers = YANGDynClass(base=yc_te_lsp_timers_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes_te_lsp_timers, is_container='container', yang_name="te-lsp-timers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  srlgs = __builtin__.property(_get_srlgs, _set_srlgs)
  mpls_admin_groups = __builtin__.property(_get_mpls_admin_groups, _set_mpls_admin_groups)
  te_lsp_timers = __builtin__.property(_get_te_lsp_timers, _set_te_lsp_timers)


  _pyangbind_elements = OrderedDict([('srlgs', srlgs), ('mpls_admin_groups', mpls_admin_groups), ('te_lsp_timers', te_lsp_timers), ])


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

  YANG Description: Configuration parameters related to TE interfaces:
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id','__te_metric','__srlg_membership','__admin_group',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=True)
    self.__te_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__srlg_membership = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="srlg-membership", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__admin_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'te-interface-attributes', 'interface', 'config']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/config/interface_id (oc-if:interface-id)

    YANG Description: Id of the interface
    """
    return self.__interface_id
      
  def _set_interface_id(self, v, load=False):
    """
    Setter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/config/interface_id (oc-if:interface-id)
    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: Id of 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_id must be of a type compatible with oc-if:interface-id""",
          'defined-type': "oc-if:interface-id",
          '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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=True)


  def _get_te_metric(self):
    """
    Getter method for te_metric, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/config/te_metric (uint32)

    YANG Description: TE specific metric for the link
    """
    return self.__te_metric
      
  def _set_te_metric(self, v, load=False):
    """
    Setter method for te_metric, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/config/te_metric (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_te_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_te_metric() directly.

    YANG Description: TE specific metric for the link
    """
    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="te-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """te_metric 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="te-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

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

  def _unset_te_metric(self):
    self.__te_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_srlg_membership(self):
    """
    Getter method for srlg_membership, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/config/srlg_membership (leafref)

    YANG Description: list of references to named shared risk link groups that the
interface belongs to.
    """
    return self.__srlg_membership
      
  def _set_srlg_membership(self, v, load=False):
    """
    Setter method for srlg_membership, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/config/srlg_membership (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_srlg_membership is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_srlg_membership() directly.

    YANG Description: list of references to named shared risk link groups that the
interface belongs to.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="srlg-membership", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """srlg_membership must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="srlg-membership", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

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

  def _unset_srlg_membership(self):
    self.__srlg_membership = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="srlg-membership", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_admin_group(self):
    """
    Getter method for admin_group, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/config/admin_group (string)

    YANG Description: list of admin groups (by name) on the interface
    """
    return self.__admin_group
      
  def _set_admin_group(self, v, load=False):
    """
    Setter method for admin_group, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/config/admin_group (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_admin_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_admin_group() directly.

    YANG Description: list of admin groups (by name) on the interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """admin_group must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)""",
        })

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

  def _unset_admin_group(self):
    self.__admin_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)

  interface_id = __builtin__.property(_get_interface_id, _set_interface_id)
  te_metric = __builtin__.property(_get_te_metric, _set_te_metric)
  srlg_membership = __builtin__.property(_get_srlg_membership, _set_srlg_membership)
  admin_group = __builtin__.property(_get_admin_group, _set_admin_group)


  _pyangbind_elements = OrderedDict([('interface_id', interface_id), ('te_metric', te_metric), ('srlg_membership', srlg_membership), ('admin_group', admin_group), ])


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

  YANG Description: State parameters related to TE interfaces
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id','__te_metric','__srlg_membership','__admin_group',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=False)
    self.__te_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__srlg_membership = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="srlg-membership", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__admin_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'te-interface-attributes', 'interface', 'state']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/state/interface_id (oc-if:interface-id)

    YANG Description: Id of the interface
    """
    return self.__interface_id
      
  def _set_interface_id(self, v, load=False):
    """
    Setter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/state/interface_id (oc-if:interface-id)
    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: Id of 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_id must be of a type compatible with oc-if:interface-id""",
          'defined-type': "oc-if:interface-id",
          '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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=False)


  def _get_te_metric(self):
    """
    Getter method for te_metric, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/state/te_metric (uint32)

    YANG Description: TE specific metric for the link
    """
    return self.__te_metric
      
  def _set_te_metric(self, v, load=False):
    """
    Setter method for te_metric, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/state/te_metric (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_te_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_te_metric() directly.

    YANG Description: TE specific metric for the link
    """
    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="te-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """te_metric 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="te-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

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

  def _unset_te_metric(self):
    self.__te_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_srlg_membership(self):
    """
    Getter method for srlg_membership, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/state/srlg_membership (leafref)

    YANG Description: list of references to named shared risk link groups that the
interface belongs to.
    """
    return self.__srlg_membership
      
  def _set_srlg_membership(self, v, load=False):
    """
    Setter method for srlg_membership, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/state/srlg_membership (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_srlg_membership is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_srlg_membership() directly.

    YANG Description: list of references to named shared risk link groups that the
interface belongs to.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="srlg-membership", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """srlg_membership must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="srlg-membership", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

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

  def _unset_srlg_membership(self):
    self.__srlg_membership = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="srlg-membership", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_admin_group(self):
    """
    Getter method for admin_group, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/state/admin_group (string)

    YANG Description: list of admin groups (by name) on the interface
    """
    return self.__admin_group
      
  def _set_admin_group(self, v, load=False):
    """
    Setter method for admin_group, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/state/admin_group (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_admin_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_admin_group() directly.

    YANG Description: list of admin groups (by name) on the interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """admin_group must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

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

  def _unset_admin_group(self):
    self.__admin_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)

  interface_id = __builtin__.property(_get_interface_id)
  te_metric = __builtin__.property(_get_te_metric)
  srlg_membership = __builtin__.property(_get_srlg_membership)
  admin_group = __builtin__.property(_get_admin_group)


  _pyangbind_elements = OrderedDict([('interface_id', interface_id), ('te_metric', te_metric), ('srlg_membership', srlg_membership), ('admin_group', admin_group), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_mpls_te_interface_attributes_interface_interface_ref_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/te-interface-attributes/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'te-interface-attributes', 'interface', 'interface-ref', 'config']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/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 /network_instances/network_instance/mpls/te_interface_attributes/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/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 /network_instances/network_instance/mpls/te_interface_attributes/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_te_interface_attributes_interface_interface_ref_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/te-interface-attributes/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'te-interface-attributes', 'interface', 'interface-ref', 'state']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/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 /network_instances/network_instance/mpls/te_interface_attributes/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/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 /network_instances/network_instance/mpls/te_interface_attributes/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_te_interface_attributes_interface_interface_ref(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/te-interface-attributes/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
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

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

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'te-interface-attributes', 'interface', 'interface-ref']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/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 /network_instances/network_instance/mpls/te_interface_attributes/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_network_instance__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/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 /network_instances/network_instance/mpls/te_interface_attributes/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_network_instance__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_te_interface_attributes_interface_igp_flooding_bandwidth_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/te-interface-attributes/interface/igp-flooding-bandwidth/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for TED
update threshold 
  """
  __slots__ = ('_path_helper', '_extmethods', '__threshold_type','__delta_percentage','__threshold_specification','__up_thresholds','__down_thresholds','__up_down_thresholds',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__threshold_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DELTA': {}, 'THRESHOLD_CROSSED': {}},), is_leaf=True, yang_name="threshold-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)
    self.__delta_percentage = 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="delta-percentage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    self.__threshold_specification = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'MIRRORED_UP_DOWN': {}, 'SEPARATE_UP_DOWN': {}},), is_leaf=True, yang_name="threshold-specification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)
    self.__up_thresholds = 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..100']})), is_leaf=False, yang_name="up-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    self.__down_thresholds = 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..100']})), is_leaf=False, yang_name="down-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    self.__up_down_thresholds = 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..100']})), is_leaf=False, yang_name="up-down-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'te-interface-attributes', 'interface', 'igp-flooding-bandwidth', 'config']

  def _get_threshold_type(self):
    """
    Getter method for threshold_type, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/threshold_type (enumeration)

    YANG Description: The type of threshold that should be used to specify the
values at which bandwidth is flooded. DELTA indicates that
the local system should flood IGP updates when a change in
reserved bandwidth >= the specified delta occurs on the
interface. Where THRESHOLD_CROSSED is specified, the local
system should trigger an update (and hence flood) the
reserved bandwidth when the reserved bandwidth changes such
that it crosses, or becomes equal to one of the threshold
values
    """
    return self.__threshold_type
      
  def _set_threshold_type(self, v, load=False):
    """
    Setter method for threshold_type, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/threshold_type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_threshold_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_threshold_type() directly.

    YANG Description: The type of threshold that should be used to specify the
values at which bandwidth is flooded. DELTA indicates that
the local system should flood IGP updates when a change in
reserved bandwidth >= the specified delta occurs on the
interface. Where THRESHOLD_CROSSED is specified, the local
system should trigger an update (and hence flood) the
reserved bandwidth when the reserved bandwidth changes such
that it crosses, or becomes equal to one of the threshold
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={'DELTA': {}, 'THRESHOLD_CROSSED': {}},), is_leaf=True, yang_name="threshold-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """threshold_type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DELTA': {}, 'THRESHOLD_CROSSED': {}},), is_leaf=True, yang_name="threshold-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)""",
        })

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

  def _unset_threshold_type(self):
    self.__threshold_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DELTA': {}, 'THRESHOLD_CROSSED': {}},), is_leaf=True, yang_name="threshold-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)


  def _get_delta_percentage(self):
    """
    Getter method for delta_percentage, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/delta_percentage (oc-types:percentage)

    YANG Description: The percentage of the maximum-reservable-bandwidth
considered as the delta that results in an IGP update
being flooded
    """
    return self.__delta_percentage
      
  def _set_delta_percentage(self, v, load=False):
    """
    Setter method for delta_percentage, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/delta_percentage (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_delta_percentage is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_delta_percentage() directly.

    YANG Description: The percentage of the maximum-reservable-bandwidth
considered as the delta that results in an IGP update
being flooded
    """
    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="delta-percentage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """delta_percentage 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="delta-percentage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

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

  def _unset_delta_percentage(self):
    self.__delta_percentage = 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="delta-percentage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)


  def _get_threshold_specification(self):
    """
    Getter method for threshold_specification, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/threshold_specification (enumeration)

    YANG Description: This value specifies whether a single set of threshold
values should be used for both increasing and decreasing
bandwidth when determining whether to trigger updated
bandwidth values to be flooded in the IGP TE extensions.
MIRRORED-UP-DOWN indicates that a single value (or set of
values) should be used for both increasing and decreasing
values, where SEPARATE-UP-DOWN specifies that the increasing
and decreasing values will be separately specified
    """
    return self.__threshold_specification
      
  def _set_threshold_specification(self, v, load=False):
    """
    Setter method for threshold_specification, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/threshold_specification (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_threshold_specification is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_threshold_specification() directly.

    YANG Description: This value specifies whether a single set of threshold
values should be used for both increasing and decreasing
bandwidth when determining whether to trigger updated
bandwidth values to be flooded in the IGP TE extensions.
MIRRORED-UP-DOWN indicates that a single value (or set of
values) should be used for both increasing and decreasing
values, where SEPARATE-UP-DOWN specifies that the increasing
and decreasing values will be separately specified
    """
    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={'MIRRORED_UP_DOWN': {}, 'SEPARATE_UP_DOWN': {}},), is_leaf=True, yang_name="threshold-specification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """threshold_specification must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'MIRRORED_UP_DOWN': {}, 'SEPARATE_UP_DOWN': {}},), is_leaf=True, yang_name="threshold-specification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)""",
        })

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

  def _unset_threshold_specification(self):
    self.__threshold_specification = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'MIRRORED_UP_DOWN': {}, 'SEPARATE_UP_DOWN': {}},), is_leaf=True, yang_name="threshold-specification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)


  def _get_up_thresholds(self):
    """
    Getter method for up_thresholds, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/up_thresholds (oc-types:percentage)

    YANG Description: The thresholds (expressed as a percentage of the maximum
reservable bandwidth) at which bandwidth updates are to be
triggered when the bandwidth is increasing.
    """
    return self.__up_thresholds
      
  def _set_up_thresholds(self, v, load=False):
    """
    Setter method for up_thresholds, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/up_thresholds (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_up_thresholds is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_up_thresholds() directly.

    YANG Description: The thresholds (expressed as a percentage of the maximum
reservable bandwidth) at which bandwidth updates are to be
triggered when the bandwidth is increasing.
    """
    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..100']})), is_leaf=False, yang_name="up-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """up_thresholds must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          '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..100']})), is_leaf=False, yang_name="up-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

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

  def _unset_up_thresholds(self):
    self.__up_thresholds = 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..100']})), is_leaf=False, yang_name="up-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)


  def _get_down_thresholds(self):
    """
    Getter method for down_thresholds, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/down_thresholds (oc-types:percentage)

    YANG Description: The thresholds (expressed as a percentage of the maximum
reservable bandwidth) at which bandwidth updates are to be
triggered when the bandwidth is decreasing.
    """
    return self.__down_thresholds
      
  def _set_down_thresholds(self, v, load=False):
    """
    Setter method for down_thresholds, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/down_thresholds (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_down_thresholds is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_down_thresholds() directly.

    YANG Description: The thresholds (expressed as a percentage of the maximum
reservable bandwidth) at which bandwidth updates are to be
triggered when the bandwidth is decreasing.
    """
    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..100']})), is_leaf=False, yang_name="down-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """down_thresholds must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          '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..100']})), is_leaf=False, yang_name="down-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

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

  def _unset_down_thresholds(self):
    self.__down_thresholds = 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..100']})), is_leaf=False, yang_name="down-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)


  def _get_up_down_thresholds(self):
    """
    Getter method for up_down_thresholds, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/up_down_thresholds (oc-types:percentage)

    YANG Description: The thresholds (expressed as a percentage of the maximum
reservable bandwidth of the interface) at which bandwidth
updates are flooded - used both when the bandwidth is
increasing and decreasing
    """
    return self.__up_down_thresholds
      
  def _set_up_down_thresholds(self, v, load=False):
    """
    Setter method for up_down_thresholds, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/up_down_thresholds (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_up_down_thresholds is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_up_down_thresholds() directly.

    YANG Description: The thresholds (expressed as a percentage of the maximum
reservable bandwidth of the interface) at which bandwidth
updates are flooded - used both when the bandwidth is
increasing and decreasing
    """
    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..100']})), is_leaf=False, yang_name="up-down-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """up_down_thresholds must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          '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..100']})), is_leaf=False, yang_name="up-down-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

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

  def _unset_up_down_thresholds(self):
    self.__up_down_thresholds = 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..100']})), is_leaf=False, yang_name="up-down-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  threshold_type = __builtin__.property(_get_threshold_type, _set_threshold_type)
  delta_percentage = __builtin__.property(_get_delta_percentage, _set_delta_percentage)
  threshold_specification = __builtin__.property(_get_threshold_specification, _set_threshold_specification)
  up_thresholds = __builtin__.property(_get_up_thresholds, _set_up_thresholds)
  down_thresholds = __builtin__.property(_get_down_thresholds, _set_down_thresholds)
  up_down_thresholds = __builtin__.property(_get_up_down_thresholds, _set_up_down_thresholds)


  _pyangbind_elements = OrderedDict([('threshold_type', threshold_type), ('delta_percentage', delta_percentage), ('threshold_specification', threshold_specification), ('up_thresholds', up_thresholds), ('down_thresholds', down_thresholds), ('up_down_thresholds', up_down_thresholds), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_te_interface_attributes_interface_igp_flooding_bandwidth_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/te-interface-attributes/interface/igp-flooding-bandwidth/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters for TED update threshold 
  """
  __slots__ = ('_path_helper', '_extmethods', '__threshold_type','__delta_percentage','__threshold_specification','__up_thresholds','__down_thresholds','__up_down_thresholds',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__threshold_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DELTA': {}, 'THRESHOLD_CROSSED': {}},), is_leaf=True, yang_name="threshold-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__delta_percentage = 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="delta-percentage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__threshold_specification = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'MIRRORED_UP_DOWN': {}, 'SEPARATE_UP_DOWN': {}},), is_leaf=True, yang_name="threshold-specification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__up_thresholds = 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..100']})), is_leaf=False, yang_name="up-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__down_thresholds = 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..100']})), is_leaf=False, yang_name="down-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__up_down_thresholds = 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..100']})), is_leaf=False, yang_name="up-down-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'te-interface-attributes', 'interface', 'igp-flooding-bandwidth', 'state']

  def _get_threshold_type(self):
    """
    Getter method for threshold_type, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/state/threshold_type (enumeration)

    YANG Description: The type of threshold that should be used to specify the
values at which bandwidth is flooded. DELTA indicates that
the local system should flood IGP updates when a change in
reserved bandwidth >= the specified delta occurs on the
interface. Where THRESHOLD_CROSSED is specified, the local
system should trigger an update (and hence flood) the
reserved bandwidth when the reserved bandwidth changes such
that it crosses, or becomes equal to one of the threshold
values
    """
    return self.__threshold_type
      
  def _set_threshold_type(self, v, load=False):
    """
    Setter method for threshold_type, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/state/threshold_type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_threshold_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_threshold_type() directly.

    YANG Description: The type of threshold that should be used to specify the
values at which bandwidth is flooded. DELTA indicates that
the local system should flood IGP updates when a change in
reserved bandwidth >= the specified delta occurs on the
interface. Where THRESHOLD_CROSSED is specified, the local
system should trigger an update (and hence flood) the
reserved bandwidth when the reserved bandwidth changes such
that it crosses, or becomes equal to one of the threshold
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={'DELTA': {}, 'THRESHOLD_CROSSED': {}},), is_leaf=True, yang_name="threshold-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """threshold_type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DELTA': {}, 'THRESHOLD_CROSSED': {}},), is_leaf=True, yang_name="threshold-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

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

  def _unset_threshold_type(self):
    self.__threshold_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DELTA': {}, 'THRESHOLD_CROSSED': {}},), is_leaf=True, yang_name="threshold-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_delta_percentage(self):
    """
    Getter method for delta_percentage, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/state/delta_percentage (oc-types:percentage)

    YANG Description: The percentage of the maximum-reservable-bandwidth
considered as the delta that results in an IGP update
being flooded
    """
    return self.__delta_percentage
      
  def _set_delta_percentage(self, v, load=False):
    """
    Setter method for delta_percentage, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/state/delta_percentage (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_delta_percentage is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_delta_percentage() directly.

    YANG Description: The percentage of the maximum-reservable-bandwidth
considered as the delta that results in an IGP update
being flooded
    """
    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="delta-percentage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """delta_percentage 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="delta-percentage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

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

  def _unset_delta_percentage(self):
    self.__delta_percentage = 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="delta-percentage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_threshold_specification(self):
    """
    Getter method for threshold_specification, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/state/threshold_specification (enumeration)

    YANG Description: This value specifies whether a single set of threshold
values should be used for both increasing and decreasing
bandwidth when determining whether to trigger updated
bandwidth values to be flooded in the IGP TE extensions.
MIRRORED-UP-DOWN indicates that a single value (or set of
values) should be used for both increasing and decreasing
values, where SEPARATE-UP-DOWN specifies that the increasing
and decreasing values will be separately specified
    """
    return self.__threshold_specification
      
  def _set_threshold_specification(self, v, load=False):
    """
    Setter method for threshold_specification, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/state/threshold_specification (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_threshold_specification is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_threshold_specification() directly.

    YANG Description: This value specifies whether a single set of threshold
values should be used for both increasing and decreasing
bandwidth when determining whether to trigger updated
bandwidth values to be flooded in the IGP TE extensions.
MIRRORED-UP-DOWN indicates that a single value (or set of
values) should be used for both increasing and decreasing
values, where SEPARATE-UP-DOWN specifies that the increasing
and decreasing values will be separately specified
    """
    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={'MIRRORED_UP_DOWN': {}, 'SEPARATE_UP_DOWN': {}},), is_leaf=True, yang_name="threshold-specification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """threshold_specification must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'MIRRORED_UP_DOWN': {}, 'SEPARATE_UP_DOWN': {}},), is_leaf=True, yang_name="threshold-specification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

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

  def _unset_threshold_specification(self):
    self.__threshold_specification = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'MIRRORED_UP_DOWN': {}, 'SEPARATE_UP_DOWN': {}},), is_leaf=True, yang_name="threshold-specification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_up_thresholds(self):
    """
    Getter method for up_thresholds, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/state/up_thresholds (oc-types:percentage)

    YANG Description: The thresholds (expressed as a percentage of the maximum
reservable bandwidth) at which bandwidth updates are to be
triggered when the bandwidth is increasing.
    """
    return self.__up_thresholds
      
  def _set_up_thresholds(self, v, load=False):
    """
    Setter method for up_thresholds, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/state/up_thresholds (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_up_thresholds is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_up_thresholds() directly.

    YANG Description: The thresholds (expressed as a percentage of the maximum
reservable bandwidth) at which bandwidth updates are to be
triggered when the bandwidth is increasing.
    """
    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..100']})), is_leaf=False, yang_name="up-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """up_thresholds must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          '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..100']})), is_leaf=False, yang_name="up-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

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

  def _unset_up_thresholds(self):
    self.__up_thresholds = 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..100']})), is_leaf=False, yang_name="up-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_down_thresholds(self):
    """
    Getter method for down_thresholds, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/state/down_thresholds (oc-types:percentage)

    YANG Description: The thresholds (expressed as a percentage of the maximum
reservable bandwidth) at which bandwidth updates are to be
triggered when the bandwidth is decreasing.
    """
    return self.__down_thresholds
      
  def _set_down_thresholds(self, v, load=False):
    """
    Setter method for down_thresholds, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/state/down_thresholds (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_down_thresholds is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_down_thresholds() directly.

    YANG Description: The thresholds (expressed as a percentage of the maximum
reservable bandwidth) at which bandwidth updates are to be
triggered when the bandwidth is decreasing.
    """
    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..100']})), is_leaf=False, yang_name="down-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """down_thresholds must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          '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..100']})), is_leaf=False, yang_name="down-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

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

  def _unset_down_thresholds(self):
    self.__down_thresholds = 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..100']})), is_leaf=False, yang_name="down-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_up_down_thresholds(self):
    """
    Getter method for up_down_thresholds, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/state/up_down_thresholds (oc-types:percentage)

    YANG Description: The thresholds (expressed as a percentage of the maximum
reservable bandwidth of the interface) at which bandwidth
updates are flooded - used both when the bandwidth is
increasing and decreasing
    """
    return self.__up_down_thresholds
      
  def _set_up_down_thresholds(self, v, load=False):
    """
    Setter method for up_down_thresholds, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/state/up_down_thresholds (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_up_down_thresholds is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_up_down_thresholds() directly.

    YANG Description: The thresholds (expressed as a percentage of the maximum
reservable bandwidth of the interface) at which bandwidth
updates are flooded - used both when the bandwidth is
increasing and decreasing
    """
    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..100']})), is_leaf=False, yang_name="up-down-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """up_down_thresholds must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          '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..100']})), is_leaf=False, yang_name="up-down-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

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

  def _unset_up_down_thresholds(self):
    self.__up_down_thresholds = 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..100']})), is_leaf=False, yang_name="up-down-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)

  threshold_type = __builtin__.property(_get_threshold_type)
  delta_percentage = __builtin__.property(_get_delta_percentage)
  threshold_specification = __builtin__.property(_get_threshold_specification)
  up_thresholds = __builtin__.property(_get_up_thresholds)
  down_thresholds = __builtin__.property(_get_down_thresholds)
  up_down_thresholds = __builtin__.property(_get_up_down_thresholds)


  _pyangbind_elements = OrderedDict([('threshold_type', threshold_type), ('delta_percentage', delta_percentage), ('threshold_specification', threshold_specification), ('up_thresholds', up_thresholds), ('down_thresholds', down_thresholds), ('up_down_thresholds', up_down_thresholds), ])


class yc_igp_flooding_bandwidth_openconfig_network_instance__network_instances_network_instance_mpls_te_interface_attributes_interface_igp_flooding_bandwidth(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/te-interface-attributes/interface/igp-flooding-bandwidth. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Interface bandwidth change percentages
that trigger update events into the IGP traffic
engineering database (TED)
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'igp-flooding-bandwidth'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_te_interface_attributes_interface_igp_flooding_bandwidth_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_te_interface_attributes_interface_igp_flooding_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'te-interface-attributes', 'interface', 'igp-flooding-bandwidth']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config (container)

    YANG Description: Configuration parameters for TED
update threshold 
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/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 TED
update threshold 
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_te_interface_attributes_interface_igp_flooding_bandwidth_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_te_interface_attributes_interface_igp_flooding_bandwidth_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_te_interface_attributes_interface_igp_flooding_bandwidth_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/state (container)

    YANG Description: State parameters for TED update threshold 
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/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 parameters for TED update threshold 
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_te_interface_attributes_interface_igp_flooding_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_te_interface_attributes_interface_igp_flooding_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_te_interface_attributes_interface_igp_flooding_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_interface_openconfig_network_instance__network_instances_network_instance_mpls_te_interface_attributes_interface(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/te-interface-attributes/interface. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of TE interfaces
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id','__config','__state','__interface_ref','__igp_flooding_bandwidth',)

  _yang_name = 'interface'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__interface_ref = YANGDynClass(base=yc_interface_ref_openconfig_network_instance__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__igp_flooding_bandwidth = YANGDynClass(base=yc_igp_flooding_bandwidth_openconfig_network_instance__network_instances_network_instance_mpls_te_interface_attributes_interface_igp_flooding_bandwidth, is_container='container', yang_name="igp-flooding-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'te-interface-attributes', 'interface']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/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 /network_instances/network_instance/mpls/te_interface_attributes/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/config (container)

    YANG Description: Configuration parameters related to TE interfaces:
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/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 related to TE interfaces:
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/state (container)

    YANG Description: State parameters related to TE interfaces
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/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: State parameters related to TE interfaces
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_interface_ref(self):
    """
    Getter method for interface_ref, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/interface_ref (container)

    YANG Description: Reference to an interface or subinterface
    """
    return self.__interface_ref
      
  def _set_interface_ref(self, v, load=False):
    """
    Setter method for interface_ref, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/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
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interface_ref_openconfig_network_instance__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_igp_flooding_bandwidth(self):
    """
    Getter method for igp_flooding_bandwidth, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth (container)

    YANG Description: Interface bandwidth change percentages
that trigger update events into the IGP traffic
engineering database (TED)
    """
    return self.__igp_flooding_bandwidth
      
  def _set_igp_flooding_bandwidth(self, v, load=False):
    """
    Setter method for igp_flooding_bandwidth, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_igp_flooding_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_igp_flooding_bandwidth() directly.

    YANG Description: Interface bandwidth change percentages
that trigger update events into the IGP traffic
engineering database (TED)
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_igp_flooding_bandwidth_openconfig_network_instance__network_instances_network_instance_mpls_te_interface_attributes_interface_igp_flooding_bandwidth, is_container='container', yang_name="igp-flooding-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """igp_flooding_bandwidth must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_igp_flooding_bandwidth_openconfig_network_instance__network_instances_network_instance_mpls_te_interface_attributes_interface_igp_flooding_bandwidth, is_container='container', yang_name="igp-flooding-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

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

  def _unset_igp_flooding_bandwidth(self):
    self.__igp_flooding_bandwidth = YANGDynClass(base=yc_igp_flooding_bandwidth_openconfig_network_instance__network_instances_network_instance_mpls_te_interface_attributes_interface_igp_flooding_bandwidth, is_container='container', yang_name="igp-flooding-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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)
  igp_flooding_bandwidth = __builtin__.property(_get_igp_flooding_bandwidth, _set_igp_flooding_bandwidth)


  _pyangbind_elements = OrderedDict([('interface_id', interface_id), ('config', config), ('state', state), ('interface_ref', interface_ref), ('igp_flooding_bandwidth', igp_flooding_bandwidth), ])


class yc_te_interface_attributes_openconfig_network_instance__network_instances_network_instance_mpls_te_interface_attributes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/te-interface-attributes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: traffic engineering attributes specific
for interfaces
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface',)

  _yang_name = 'te-interface-attributes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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_network_instance__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'te-interface-attributes']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface (list)

    YANG Description: List of TE interfaces
    """
    return self.__interface
      
  def _set_interface(self, v, load=False):
    """
    Setter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/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 TE interfaces
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("interface_id",yc_interface_openconfig_network_instance__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  interface = __builtin__.property(_get_interface, _set_interface)


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


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_record_route_objects_record_route_object_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/sessions/session/record-route-objects/record-route-object/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Information related to RRO objects. The hop, label, and
optional flags are present for each entry in the list.
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__address','__reported_label','__reported_flags',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__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}'}),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}|:))'}),], is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    self.__reported_label = 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="reported-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    self.__reported_flags = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="reported-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'sessions', 'session', 'record-route-objects', 'record-route-object', 'state']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/record_route_objects/record_route_object/state/index (uint8)

    YANG Description: Index of object in the list. Used for ordering.
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/record_route_objects/record_route_object/state/index (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: Index of object in the list. Used for ordering.
    """
    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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index must be of a type compatible with uint8""",
          'defined-type': "uint8",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

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

  def _unset_index(self):
    self.__index = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_address(self):
    """
    Getter method for address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/record_route_objects/record_route_object/state/address (inet:ip-address)

    YANG Description: IP router hop for RRO entry
    """
    return self.__address
      
  def _set_address(self, v, load=False):
    """
    Setter method for address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/record_route_objects/record_route_object/state/address (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address() directly.

    YANG Description: IP router hop for RRO entry
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)""",
        })

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

  def _unset_address(self):
    self.__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}'}),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}|:))'}),], is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)


  def _get_reported_label(self):
    """
    Getter method for reported_label, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/record_route_objects/record_route_object/state/reported_label (oc-mplst:mpls-label)

    YANG Description: Label reported for RRO hop
    """
    return self.__reported_label
      
  def _set_reported_label(self, v, load=False):
    """
    Setter method for reported_label, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/record_route_objects/record_route_object/state/reported_label (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_reported_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_reported_label() directly.

    YANG Description: Label reported for RRO hop
    """
    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="reported-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """reported_label must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="reported-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)""",
        })

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

  def _unset_reported_label(self):
    self.__reported_label = 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="reported-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)


  def _get_reported_flags(self):
    """
    Getter method for reported_flags, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/record_route_objects/record_route_object/state/reported_flags (uint8)

    YANG Description: Subobject flags for MPLS label
    """
    return self.__reported_flags
      
  def _set_reported_flags(self, v, load=False):
    """
    Setter method for reported_flags, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/record_route_objects/record_route_object/state/reported_flags (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_reported_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_reported_flags() directly.

    YANG Description: Subobject flags for MPLS label
    """
    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="reported-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """reported_flags 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="reported-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

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

  def _unset_reported_flags(self):
    self.__reported_flags = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="reported-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)

  index = __builtin__.property(_get_index)
  address = __builtin__.property(_get_address)
  reported_label = __builtin__.property(_get_reported_label)
  reported_flags = __builtin__.property(_get_reported_flags)


  _pyangbind_elements = OrderedDict([('index', index), ('address', address), ('reported_label', reported_label), ('reported_flags', reported_flags), ])


class yc_record_route_object_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_record_route_objects_record_route_object(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/sessions/session/record-route-objects/record-route-object. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Read-only list of record route objects associated with the
traffic engineered tunnel. Each entry in the list
may contain a hop IP address, MPLS label allocated
at the hop, and the flags associated with the entry.
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__state',)

  _yang_name = 'record-route-object'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_record_route_objects_record_route_object_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'sessions', 'session', 'record-route-objects', 'record-route-object']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/record_route_objects/record_route_object/index (leafref)

    YANG Description: Reference to the index of the record route object.
The index is used to indicate the ordering of hops in
the path.
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/record_route_objects/record_route_object/index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: Reference to the index of the record route object.
The index is used to indicate the ordering of hops in
the path.
    """
    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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

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

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


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/record_route_objects/record_route_object/state (container)

    YANG Description: Information related to RRO objects. The hop, label, and
optional flags are present for each entry in the list.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/record_route_objects/record_route_object/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: Information related to RRO objects. The hop, label, and
optional flags are present for each entry in the list.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_record_route_objects_record_route_object_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_record_route_objects_record_route_object_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_record_route_objects_record_route_object_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  index = __builtin__.property(_get_index)
  state = __builtin__.property(_get_state)


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


class yc_record_route_objects_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_record_route_objects(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/sessions/session/record-route-objects. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for MPLS RRO objects associated with the
traffic engineered tunnel.
  """
  __slots__ = ('_path_helper', '_extmethods', '__record_route_object',)

  _yang_name = 'record-route-objects'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__record_route_object = YANGDynClass(base=YANGListType("index",yc_record_route_object_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_record_route_objects_record_route_object, yang_name="record-route-object", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="record-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'sessions', 'session', 'record-route-objects']

  def _get_record_route_object(self):
    """
    Getter method for record_route_object, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/record_route_objects/record_route_object (list)

    YANG Description: Read-only list of record route objects associated with the
traffic engineered tunnel. Each entry in the list
may contain a hop IP address, MPLS label allocated
at the hop, and the flags associated with the entry.
    """
    return self.__record_route_object
      
  def _set_record_route_object(self, v, load=False):
    """
    Setter method for record_route_object, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/record_route_objects/record_route_object (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_record_route_object is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_record_route_object() directly.

    YANG Description: Read-only list of record route objects associated with the
traffic engineered tunnel. Each entry in the list
may contain a hop IP address, MPLS label allocated
at the hop, and the flags associated with the entry.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("index",yc_record_route_object_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_record_route_objects_record_route_object, yang_name="record-route-object", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="record-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """record_route_object must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("index",yc_record_route_object_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_record_route_objects_record_route_object, yang_name="record-route-object", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="record-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

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

  def _unset_record_route_object(self):
    self.__record_route_object = YANGDynClass(base=YANGListType("index",yc_record_route_object_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_record_route_objects_record_route_object, yang_name="record-route-object", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="record-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  record_route_object = __builtin__.property(_get_record_route_object)


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


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_explicit_route_objects_explicit_route_object_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/sessions/session/explicit-route-objects/explicit-route-object/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Information related to the ERO index.
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__loose','__type','__ip_prefix','__asn','__label','__interface_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__loose = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="loose", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}, 'ASN': {}, 'ASN4': {}, 'LABEL': {}, 'UNNUMBERED_INTERFACE': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__ip_prefix = 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])'}),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="ip-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-prefix', is_config=False)
    self.__asn = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="asn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:as-number', is_config=False)
    self.__label = 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="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    self.__interface_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'sessions', 'session', 'explicit-route-objects', 'explicit-route-object', 'state']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects/explicit_route_object/state/index (uint64)

    YANG Description: Index of the entry in the ERO. Entries are ordered in
ascending order from the source to destination of the
LSP.
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects/explicit_route_object/state/index (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: Index of the entry in the ERO. Entries are ordered in
ascending order from the source to destination of the
LSP.
    """
    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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

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

  def _unset_index(self):
    self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_loose(self):
    """
    Getter method for loose, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects/explicit_route_object/state/loose (boolean)

    YANG Description: When set to true, indicates that the hop of the ERO is
a loose hop within the explicit route. If unset, indicates
that the hop must explicitly traverse the entity specified
in the ERO hop as the next-entity.
    """
    return self.__loose
      
  def _set_loose(self, v, load=False):
    """
    Setter method for loose, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects/explicit_route_object/state/loose (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_loose is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_loose() directly.

    YANG Description: When set to true, indicates that the hop of the ERO is
a loose hop within the explicit route. If unset, indicates
that the hop must explicitly traverse the entity specified
in the ERO hop as the next-entity.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="loose", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """loose must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="loose", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

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

  def _unset_loose(self):
    self.__loose = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="loose", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects/explicit_route_object/state/type (enumeration)

    YANG Description: The type of hop indicated by the ERO entry.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects/explicit_route_object/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: The type of hop indicated by the ERO entry.
    """
    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': {}, 'ASN': {}, 'ASN4': {}, 'LABEL': {}, 'UNNUMBERED_INTERFACE': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}, 'ASN': {}, 'ASN4': {}, 'LABEL': {}, 'UNNUMBERED_INTERFACE': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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': {}, 'ASN': {}, 'ASN4': {}, 'LABEL': {}, 'UNNUMBERED_INTERFACE': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_ip_prefix(self):
    """
    Getter method for ip_prefix, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects/explicit_route_object/state/ip_prefix (inet:ip-prefix)

    YANG Description: The IPv4 or IPv6 prefix indicated by the ERO. Specified
only when the ERO hop is an IPv4 or IPv6 prefix.
    """
    return self.__ip_prefix
      
  def _set_ip_prefix(self, v, load=False):
    """
    Setter method for ip_prefix, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects/explicit_route_object/state/ip_prefix (inet:ip-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ip_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ip_prefix() directly.

    YANG Description: The IPv4 or IPv6 prefix indicated by the ERO. Specified
only when the ERO hop is an IPv4 or IPv6 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])'}),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="ip-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ip_prefix must be of a type compatible with inet:ip-prefix""",
          'defined-type': "inet:ip-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])'}),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="ip-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-prefix', is_config=False)""",
        })

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

  def _unset_ip_prefix(self):
    self.__ip_prefix = 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])'}),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="ip-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-prefix', is_config=False)


  def _get_asn(self):
    """
    Getter method for asn, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects/explicit_route_object/state/asn (inet:as-number)

    YANG Description: The autonomous system number indicated by the ERO. Specified
only when the ERO hop is an 2 or 4-byte AS number.
    """
    return self.__asn
      
  def _set_asn(self, v, load=False):
    """
    Setter method for asn, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects/explicit_route_object/state/asn (inet:as-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_asn is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_asn() directly.

    YANG Description: The autonomous system number indicated by the ERO. Specified
only when the ERO hop is an 2 or 4-byte AS number.
    """
    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="asn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:as-number', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """asn must be of a type compatible with inet:as-number""",
          'defined-type': "inet:as-number",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="asn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:as-number', is_config=False)""",
        })

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

  def _unset_asn(self):
    self.__asn = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="asn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:as-number', is_config=False)


  def _get_label(self):
    """
    Getter method for label, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects/explicit_route_object/state/label (oc-mplst:mpls-label)

    YANG Description: The MPLS label specified in the ERO hop. Specified only when
the hop is an MPLS label.
    """
    return self.__label
      
  def _set_label(self, v, load=False):
    """
    Setter method for label, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects/explicit_route_object/state/label (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_label() directly.

    YANG Description: The MPLS label specified in the ERO hop. Specified only when
the hop is an MPLS 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': ['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="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """label must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)""",
        })

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

  def _unset_label(self):
    self.__label = 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="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)


  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects/explicit_route_object/state/interface_id (uint32)

    YANG Description: The interface ID for an unnumbered interface. Specified only
when the ERO hop is a unnumbered interface.
    """
    return self.__interface_id
      
  def _set_interface_id(self, v, load=False):
    """
    Setter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects/explicit_route_object/state/interface_id (uint32)
    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: The interface ID for an unnumbered interface. Specified only
when the ERO hop is a unnumbered interface.
    """
    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="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_id 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="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

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

  def _unset_interface_id(self):
    self.__interface_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), 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/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  index = __builtin__.property(_get_index)
  loose = __builtin__.property(_get_loose)
  type = __builtin__.property(_get_type)
  ip_prefix = __builtin__.property(_get_ip_prefix)
  asn = __builtin__.property(_get_asn)
  label = __builtin__.property(_get_label)
  interface_id = __builtin__.property(_get_interface_id)


  _pyangbind_elements = OrderedDict([('index', index), ('loose', loose), ('type', type), ('ip_prefix', ip_prefix), ('asn', asn), ('label', label), ('interface_id', interface_id), ])


class yc_explicit_route_object_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_explicit_route_objects_explicit_route_object(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/sessions/session/explicit-route-objects/explicit-route-object. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Read-only list of explicit route objects associated with the
traffic-engineered tunnel. Each entry in the list contains
a hop IP address, and the MPLS label allocated at the hop.
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__state',)

  _yang_name = 'explicit-route-object'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_explicit_route_objects_explicit_route_object_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'sessions', 'session', 'explicit-route-objects', 'explicit-route-object']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects/explicit_route_object/index (leafref)

    YANG Description: Reference to the index of the entry in the explicit route
object. The index is used to indicate the ordering of hops
in the path.
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects/explicit_route_object/index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: Reference to the index of the entry in the explicit route
object. The index is used to indicate the ordering of hops
in the path.
    """
    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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

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

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


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects/explicit_route_object/state (container)

    YANG Description: Information related to the ERO index.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects/explicit_route_object/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: Information related to the ERO index.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_explicit_route_objects_explicit_route_object_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_explicit_route_objects_explicit_route_object_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_explicit_route_objects_explicit_route_object_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  index = __builtin__.property(_get_index)
  state = __builtin__.property(_get_state)


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


class yc_explicit_route_objects_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_explicit_route_objects(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/sessions/session/explicit-route-objects. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for MPLS ERO objects associated
with the traffic engineered tunnel.
  """
  __slots__ = ('_path_helper', '_extmethods', '__explicit_route_object',)

  _yang_name = 'explicit-route-objects'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__explicit_route_object = YANGDynClass(base=YANGListType("index",yc_explicit_route_object_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_explicit_route_objects_explicit_route_object, yang_name="explicit-route-object", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="explicit-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'sessions', 'session', 'explicit-route-objects']

  def _get_explicit_route_object(self):
    """
    Getter method for explicit_route_object, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects/explicit_route_object (list)

    YANG Description: Read-only list of explicit route objects associated with the
traffic-engineered tunnel. Each entry in the list contains
a hop IP address, and the MPLS label allocated at the hop.
    """
    return self.__explicit_route_object
      
  def _set_explicit_route_object(self, v, load=False):
    """
    Setter method for explicit_route_object, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects/explicit_route_object (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_explicit_route_object is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_explicit_route_object() directly.

    YANG Description: Read-only list of explicit route objects associated with the
traffic-engineered tunnel. Each entry in the list contains
a hop IP address, and the MPLS label allocated at the hop.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("index",yc_explicit_route_object_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_explicit_route_objects_explicit_route_object, yang_name="explicit-route-object", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="explicit-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """explicit_route_object must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("index",yc_explicit_route_object_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_explicit_route_objects_explicit_route_object, yang_name="explicit-route-object", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="explicit-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

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

  def _unset_explicit_route_object(self):
    self.__explicit_route_object = YANGDynClass(base=YANGListType("index",yc_explicit_route_object_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_explicit_route_objects_explicit_route_object, yang_name="explicit-route-object", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="explicit-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  explicit_route_object = __builtin__.property(_get_explicit_route_object)


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


class yc_sender_tspec_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_state_sender_tspec(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/sessions/session/state/sender-tspec. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state statistics relating to the SENDER_TSPEC
received for the RSVP session
  """
  __slots__ = ('_path_helper', '_extmethods', '__rate','__size','__peak_data_rate',)

  _yang_name = 'sender-tspec'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__rate = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="rate", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    self.__size = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    self.__peak_data_rate = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="peak-data-rate", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'sessions', 'session', 'state', 'sender-tspec']

  def _get_rate(self):
    """
    Getter method for rate, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/sender_tspec/rate (oc-types:ieeefloat32)

    YANG Description: The rate at which the head-end device generates traffic,
expressed in bytes per second.
    """
    return self.__rate
      
  def _set_rate(self, v, load=False):
    """
    Setter method for rate, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/sender_tspec/rate (oc-types:ieeefloat32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_rate is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_rate() directly.

    YANG Description: The rate at which the head-end device generates traffic,
expressed in bytes per second.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="rate", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """rate must be of a type compatible with oc-types:ieeefloat32""",
          'defined-type': "oc-types:ieeefloat32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="rate", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)""",
        })

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

  def _unset_rate(self):
    self.__rate = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="rate", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)


  def _get_size(self):
    """
    Getter method for size, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/sender_tspec/size (oc-types:ieeefloat32)

    YANG Description: The size of the token bucket that is used to determine
the rate at which the head-end device generates traffic,
expressed in bytes per second.
    """
    return self.__size
      
  def _set_size(self, v, load=False):
    """
    Setter method for size, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/sender_tspec/size (oc-types:ieeefloat32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_size is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_size() directly.

    YANG Description: The size of the token bucket that is used to determine
the rate at which the head-end device generates traffic,
expressed in bytes per second.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """size must be of a type compatible with oc-types:ieeefloat32""",
          'defined-type': "oc-types:ieeefloat32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)""",
        })

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

  def _unset_size(self):
    self.__size = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)


  def _get_peak_data_rate(self):
    """
    Getter method for peak_data_rate, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/sender_tspec/peak_data_rate (oc-types:ieeefloat32)

    YANG Description: The maximum traffic generation rate that the head-end
device sends traffic at.
    """
    return self.__peak_data_rate
      
  def _set_peak_data_rate(self, v, load=False):
    """
    Setter method for peak_data_rate, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/sender_tspec/peak_data_rate (oc-types:ieeefloat32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peak_data_rate is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peak_data_rate() directly.

    YANG Description: The maximum traffic generation rate that the head-end
device sends traffic at.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="peak-data-rate", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peak_data_rate must be of a type compatible with oc-types:ieeefloat32""",
          'defined-type': "oc-types:ieeefloat32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="peak-data-rate", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)""",
        })

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

  def _unset_peak_data_rate(self):
    self.__peak_data_rate = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="peak-data-rate", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)

  rate = __builtin__.property(_get_rate)
  size = __builtin__.property(_get_size)
  peak_data_rate = __builtin__.property(_get_peak_data_rate)


  _pyangbind_elements = OrderedDict([('rate', rate), ('size', size), ('peak_data_rate', peak_data_rate), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/sessions/session/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
RSVP session
  """
  __slots__ = ('_path_helper', '_extmethods', '__local_index','__source_address','__destination_address','__tunnel_id','__lsp_id','__session_name','__status','__type','__protection_requested','__label_in','__label_out','__sender_tspec',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__local_index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="local-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=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}'}),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}|:))'}),], 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/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', 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}'}),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}|:))'}),], 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/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    self.__tunnel_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="tunnel-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__lsp_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="lsp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__session_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="session-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UP': {}, 'DOWN': {}},), is_leaf=True, yang_name="status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__protection_requested = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="protection-requested", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__label_in = 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="label-in", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    self.__label_out = 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="label-out", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    self.__sender_tspec = YANGDynClass(base=yc_sender_tspec_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_state_sender_tspec, is_container='container', yang_name="sender-tspec", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'sessions', 'session', 'state']

  def _get_local_index(self):
    """
    Getter method for local_index, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/local_index (uint64)

    YANG Description: The index used to identify the RSVP session
on the local network element. This index is
generated by the device and is unique only
to the local network element.
    """
    return self.__local_index
      
  def _set_local_index(self, v, load=False):
    """
    Setter method for local_index, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/local_index (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_index() directly.

    YANG Description: The index used to identify the RSVP session
on the local network element. This index is
generated by the device and is unique only
to the local network element.
    """
    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="local-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_index 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="local-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

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

  def _unset_local_index(self):
    self.__local_index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="local-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_source_address(self):
    """
    Getter method for source_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/source_address (inet:ip-address)

    YANG Description: Origin address of RSVP session
    """
    return self.__source_address
      
  def _set_source_address(self, v, load=False):
    """
    Setter method for source_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/source_address (inet:ip-address)
    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: Origin address of RSVP session
    """
    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}'}),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}|:))'}),], 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/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], 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/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', 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}'}),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}|:))'}),], 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/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)


  def _get_destination_address(self):
    """
    Getter method for destination_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/destination_address (inet:ip-address)

    YANG Description: Destination address of RSVP session
    """
    return self.__destination_address
      
  def _set_destination_address(self, v, load=False):
    """
    Setter method for destination_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/destination_address (inet:ip-address)
    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 address of RSVP session
    """
    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}'}),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}|:))'}),], 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/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_address must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], 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/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', 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}'}),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}|:))'}),], 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/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)


  def _get_tunnel_id(self):
    """
    Getter method for tunnel_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/tunnel_id (uint16)

    YANG Description: The tunnel ID is an identifier used in the
RSVP session, which remains constant over
the life of the tunnel.
    """
    return self.__tunnel_id
      
  def _set_tunnel_id(self, v, load=False):
    """
    Setter method for tunnel_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/tunnel_id (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tunnel_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tunnel_id() directly.

    YANG Description: The tunnel ID is an identifier used in the
RSVP session, which remains constant over
the life of the tunnel.
    """
    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="tunnel-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tunnel_id 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="tunnel-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

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

  def _unset_tunnel_id(self):
    self.__tunnel_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="tunnel-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_lsp_id(self):
    """
    Getter method for lsp_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/lsp_id (uint16)

    YANG Description: The LSP ID distinguishes between two LSPs
originated from the same headend, and is
commonly used to distinguish RSVP sessions
during make before break operations.
    """
    return self.__lsp_id
      
  def _set_lsp_id(self, v, load=False):
    """
    Setter method for lsp_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/lsp_id (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsp_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsp_id() directly.

    YANG Description: The LSP ID distinguishes between two LSPs
originated from the same headend, and is
commonly used to distinguish RSVP sessions
during make before break operations.
    """
    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="lsp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsp_id 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="lsp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

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

  def _unset_lsp_id(self):
    self.__lsp_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="lsp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_session_name(self):
    """
    Getter method for session_name, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/session_name (string)

    YANG Description: The signaled name of this RSVP session.
    """
    return self.__session_name
      
  def _set_session_name(self, v, load=False):
    """
    Setter method for session_name, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/session_name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_session_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_session_name() directly.

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

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

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


  def _get_status(self):
    """
    Getter method for status, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/status (enumeration)

    YANG Description: Enumeration of RSVP session states
    """
    return self.__status
      
  def _set_status(self, v, load=False):
    """
    Setter method for status, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/status (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_status is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_status() directly.

    YANG Description: Enumeration of RSVP session states
    """
    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={'UP': {}, 'DOWN': {}},), is_leaf=True, yang_name="status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """status must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UP': {}, 'DOWN': {}},), is_leaf=True, yang_name="status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

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

  def _unset_status(self):
    self.__status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UP': {}, 'DOWN': {}},), is_leaf=True, yang_name="status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/type (identityref)

    YANG Description: The type/role of the RSVP session, signifing
the session's role on the current device, such as
a transit session vs. an ingress session.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/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: The type/role of the RSVP session, signifing
the session's role on the current device, such as
a transit session vs. an ingress session.
    """
    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={'INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', 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={'INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_protection_requested(self):
    """
    Getter method for protection_requested, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/protection_requested (identityref)

    YANG Description: The type of protection requested for the RSVP session
    """
    return self.__protection_requested
      
  def _set_protection_requested(self, v, load=False):
    """
    Setter method for protection_requested, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/protection_requested (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_protection_requested is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_protection_requested() directly.

    YANG Description: The type of protection requested for the RSVP session
    """
    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={'UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="protection-requested", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """protection_requested must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="protection-requested", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

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

  def _unset_protection_requested(self):
    self.__protection_requested = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="protection-requested", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_label_in(self):
    """
    Getter method for label_in, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/label_in (oc-mplst:mpls-label)

    YANG Description: Incoming MPLS label associated with this RSVP session
    """
    return self.__label_in
      
  def _set_label_in(self, v, load=False):
    """
    Setter method for label_in, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/label_in (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_label_in is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_label_in() directly.

    YANG Description: Incoming MPLS label associated with this RSVP session
    """
    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="label-in", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """label_in must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="label-in", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)""",
        })

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

  def _unset_label_in(self):
    self.__label_in = 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="label-in", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)


  def _get_label_out(self):
    """
    Getter method for label_out, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/label_out (oc-mplst:mpls-label)

    YANG Description: Outgoing MPLS label associated with this RSVP session
    """
    return self.__label_out
      
  def _set_label_out(self, v, load=False):
    """
    Setter method for label_out, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/label_out (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_label_out is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_label_out() directly.

    YANG Description: Outgoing MPLS label associated with this RSVP session
    """
    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="label-out", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """label_out must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="label-out", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)""",
        })

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

  def _unset_label_out(self):
    self.__label_out = 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="label-out", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)


  def _get_sender_tspec(self):
    """
    Getter method for sender_tspec, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/sender_tspec (container)

    YANG Description: Operational state statistics relating to the SENDER_TSPEC
received for the RSVP session
    """
    return self.__sender_tspec
      
  def _set_sender_tspec(self, v, load=False):
    """
    Setter method for sender_tspec, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/sender_tspec (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sender_tspec is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sender_tspec() directly.

    YANG Description: Operational state statistics relating to the SENDER_TSPEC
received for the RSVP session
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_sender_tspec_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_state_sender_tspec, is_container='container', yang_name="sender-tspec", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sender_tspec must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_sender_tspec_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_state_sender_tspec, is_container='container', yang_name="sender-tspec", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

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

  def _unset_sender_tspec(self):
    self.__sender_tspec = YANGDynClass(base=yc_sender_tspec_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_state_sender_tspec, is_container='container', yang_name="sender-tspec", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  local_index = __builtin__.property(_get_local_index)
  source_address = __builtin__.property(_get_source_address)
  destination_address = __builtin__.property(_get_destination_address)
  tunnel_id = __builtin__.property(_get_tunnel_id)
  lsp_id = __builtin__.property(_get_lsp_id)
  session_name = __builtin__.property(_get_session_name)
  status = __builtin__.property(_get_status)
  type = __builtin__.property(_get_type)
  protection_requested = __builtin__.property(_get_protection_requested)
  label_in = __builtin__.property(_get_label_in)
  label_out = __builtin__.property(_get_label_out)
  sender_tspec = __builtin__.property(_get_sender_tspec)


  _pyangbind_elements = OrderedDict([('local_index', local_index), ('source_address', source_address), ('destination_address', destination_address), ('tunnel_id', tunnel_id), ('lsp_id', lsp_id), ('session_name', session_name), ('status', status), ('type', type), ('protection_requested', protection_requested), ('label_in', label_in), ('label_out', label_out), ('sender_tspec', sender_tspec), ])


class yc_session_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/sessions/session. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of RSVP sessions
  """
  __slots__ = ('_path_helper', '_extmethods', '__local_index','__record_route_objects','__explicit_route_objects','__state',)

  _yang_name = 'session'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__local_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__record_route_objects = YANGDynClass(base=yc_record_route_objects_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_record_route_objects, is_container='container', yang_name="record-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__explicit_route_objects = YANGDynClass(base=yc_explicit_route_objects_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_explicit_route_objects, is_container='container', yang_name="explicit-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'sessions', 'session']

  def _get_local_index(self):
    """
    Getter method for local_index, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/local_index (leafref)

    YANG Description: Reference to the local index for the RSVP
session
    """
    return self.__local_index
      
  def _set_local_index(self, v, load=False):
    """
    Setter method for local_index, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/local_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_index() directly.

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

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

  def _unset_local_index(self):
    self.__local_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_record_route_objects(self):
    """
    Getter method for record_route_objects, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/record_route_objects (container)

    YANG Description: Enclosing container for MPLS RRO objects associated with the
traffic engineered tunnel.
    """
    return self.__record_route_objects
      
  def _set_record_route_objects(self, v, load=False):
    """
    Setter method for record_route_objects, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/record_route_objects (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_record_route_objects is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_record_route_objects() directly.

    YANG Description: Enclosing container for MPLS RRO objects associated with the
traffic engineered tunnel.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_record_route_objects_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_record_route_objects, is_container='container', yang_name="record-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """record_route_objects must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_record_route_objects_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_record_route_objects, is_container='container', yang_name="record-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

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

  def _unset_record_route_objects(self):
    self.__record_route_objects = YANGDynClass(base=yc_record_route_objects_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_record_route_objects, is_container='container', yang_name="record-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_explicit_route_objects(self):
    """
    Getter method for explicit_route_objects, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects (container)

    YANG Description: Enclosing container for MPLS ERO objects associated
with the traffic engineered tunnel.
    """
    return self.__explicit_route_objects
      
  def _set_explicit_route_objects(self, v, load=False):
    """
    Setter method for explicit_route_objects, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_explicit_route_objects is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_explicit_route_objects() directly.

    YANG Description: Enclosing container for MPLS ERO objects associated
with the traffic engineered tunnel.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_explicit_route_objects_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_explicit_route_objects, is_container='container', yang_name="explicit-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """explicit_route_objects must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_explicit_route_objects_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_explicit_route_objects, is_container='container', yang_name="explicit-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

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

  def _unset_explicit_route_objects(self):
    self.__explicit_route_objects = YANGDynClass(base=yc_explicit_route_objects_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_explicit_route_objects, is_container='container', yang_name="explicit-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state (container)

    YANG Description: Operational state parameters relating to the
RSVP session
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/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
RSVP session
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  local_index = __builtin__.property(_get_local_index)
  record_route_objects = __builtin__.property(_get_record_route_objects)
  explicit_route_objects = __builtin__.property(_get_explicit_route_objects)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('local_index', local_index), ('record_route_objects', record_route_objects), ('explicit_route_objects', explicit_route_objects), ('state', state), ])


class yc_sessions_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/sessions. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for sessions
  """
  __slots__ = ('_path_helper', '_extmethods', '__session',)

  _yang_name = 'sessions'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__session = YANGDynClass(base=YANGListType("local_index",yc_session_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session, yang_name="session", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='local-index', extensions=None), is_container='list', yang_name="session", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'sessions']

  def _get_session(self):
    """
    Getter method for session, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session (list)

    YANG Description: List of RSVP sessions
    """
    return self.__session
      
  def _set_session(self, v, load=False):
    """
    Setter method for session, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_session is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_session() directly.

    YANG Description: List of RSVP sessions
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("local_index",yc_session_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session, yang_name="session", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='local-index', extensions=None), is_container='list', yang_name="session", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """session must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("local_index",yc_session_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session, yang_name="session", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='local-index', extensions=None), is_container='list', yang_name="session", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

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

  def _unset_session(self):
    self.__session = YANGDynClass(base=YANGListType("local_index",yc_session_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session, yang_name="session", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='local-index', extensions=None), is_container='list', yang_name="session", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  session = __builtin__.property(_get_session, _set_session)


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


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_neighbors_neighbor_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/neighbors/neighbor/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
RSVP neighbor
  """
  __slots__ = ('_path_helper', '_extmethods', '__address','__detected_interface','__neighbor_status','__refresh_reduction',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__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}'}),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}|:))'}),], is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    self.__detected_interface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="detected-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__neighbor_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UP': {}, 'DOWN': {}},), is_leaf=True, yang_name="neighbor-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__refresh_reduction = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="refresh-reduction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'neighbors', 'neighbor', 'state']

  def _get_address(self):
    """
    Getter method for address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/neighbors/neighbor/state/address (inet:ip-address)

    YANG Description: Address of RSVP neighbor
    """
    return self.__address
      
  def _set_address(self, v, load=False):
    """
    Setter method for address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/neighbors/neighbor/state/address (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address() directly.

    YANG Description: Address of RSVP neighbor
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)""",
        })

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

  def _unset_address(self):
    self.__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}'}),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}|:))'}),], is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)


  def _get_detected_interface(self):
    """
    Getter method for detected_interface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/neighbors/neighbor/state/detected_interface (string)

    YANG Description: Interface where RSVP neighbor was detected
    """
    return self.__detected_interface
      
  def _set_detected_interface(self, v, load=False):
    """
    Setter method for detected_interface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/neighbors/neighbor/state/detected_interface (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_detected_interface is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_detected_interface() directly.

    YANG Description: Interface where RSVP neighbor was detected
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="detected-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """detected_interface must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="detected-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

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

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


  def _get_neighbor_status(self):
    """
    Getter method for neighbor_status, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/neighbors/neighbor/state/neighbor_status (enumeration)

    YANG Description: Enumuration of possible RSVP neighbor states
    """
    return self.__neighbor_status
      
  def _set_neighbor_status(self, v, load=False):
    """
    Setter method for neighbor_status, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/neighbors/neighbor/state/neighbor_status (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor_status is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor_status() directly.

    YANG Description: Enumuration of possible RSVP neighbor states
    """
    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={'UP': {}, 'DOWN': {}},), is_leaf=True, yang_name="neighbor-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor_status must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UP': {}, 'DOWN': {}},), is_leaf=True, yang_name="neighbor-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

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

  def _unset_neighbor_status(self):
    self.__neighbor_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UP': {}, 'DOWN': {}},), is_leaf=True, yang_name="neighbor-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_refresh_reduction(self):
    """
    Getter method for refresh_reduction, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/neighbors/neighbor/state/refresh_reduction (boolean)

    YANG Description: Suppport of neighbor for RSVP refresh reduction
    """
    return self.__refresh_reduction
      
  def _set_refresh_reduction(self, v, load=False):
    """
    Setter method for refresh_reduction, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/neighbors/neighbor/state/refresh_reduction (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_refresh_reduction is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_refresh_reduction() directly.

    YANG Description: Suppport of neighbor for RSVP refresh reduction
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="refresh-reduction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """refresh_reduction must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="refresh-reduction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

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

  def _unset_refresh_reduction(self):
    self.__refresh_reduction = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="refresh-reduction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  address = __builtin__.property(_get_address)
  detected_interface = __builtin__.property(_get_detected_interface)
  neighbor_status = __builtin__.property(_get_neighbor_status)
  refresh_reduction = __builtin__.property(_get_refresh_reduction)


  _pyangbind_elements = OrderedDict([('address', address), ('detected_interface', detected_interface), ('neighbor_status', neighbor_status), ('refresh_reduction', refresh_reduction), ])


class yc_neighbor_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_neighbors_neighbor(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/neighbors/neighbor. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of RSVP neighbors of the local system
  """
  __slots__ = ('_path_helper', '_extmethods', '__address','__state',)

  _yang_name = 'neighbor'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'neighbors', 'neighbor']

  def _get_address(self):
    """
    Getter method for address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/neighbors/neighbor/address (leafref)

    YANG Description: Reference to the address of the RSVP neighbor
    """
    return self.__address
      
  def _set_address(self, v, load=False):
    """
    Setter method for address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/neighbors/neighbor/address (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address() directly.

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

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

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


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/neighbors/neighbor/state (container)

    YANG Description: Operational state parameters relating to the
RSVP neighbor
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/neighbors/neighbor/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
RSVP neighbor
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  address = __builtin__.property(_get_address)
  state = __builtin__.property(_get_state)


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


class yc_neighbors_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_neighbors(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/neighbors. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration and state for RSVP neighbors connecting
to the device
  """
  __slots__ = ('_path_helper', '_extmethods', '__neighbor',)

  _yang_name = 'neighbors'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__neighbor = YANGDynClass(base=YANGListType("address",yc_neighbor_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='address', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'neighbors']

  def _get_neighbor(self):
    """
    Getter method for neighbor, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/neighbors/neighbor (list)

    YANG Description: List of RSVP neighbors of the local system
    """
    return self.__neighbor
      
  def _set_neighbor(self, v, load=False):
    """
    Setter method for neighbor, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/neighbors/neighbor (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor() directly.

    YANG Description: List of RSVP neighbors of the local system
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("address",yc_neighbor_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='address', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("address",yc_neighbor_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='address', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

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

  def _unset_neighbor(self):
    self.__neighbor = YANGDynClass(base=YANGListType("address",yc_neighbor_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='address', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  neighbor = __builtin__.property(_get_neighbor, _set_neighbor)


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


class yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_graceful_restart_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/global/graceful-restart/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to
graceful-restart
  """
  __slots__ = ('_path_helper', '_extmethods', '__enable','__restart_time','__recovery_time',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__restart_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__recovery_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="recovery-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'global', 'graceful-restart', 'config']

  def _get_enable(self):
    """
    Getter method for enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/graceful_restart/config/enable (boolean)

    YANG Description: Enables graceful restart on the node.
    """
    return self.__enable
      
  def _set_enable(self, v, load=False):
    """
    Setter method for enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/graceful_restart/config/enable (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable() directly.

    YANG Description: Enables graceful restart on the node.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable 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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

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

  def _unset_enable(self):
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_restart_time(self):
    """
    Getter method for restart_time, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/graceful_restart/config/restart_time (uint32)

    YANG Description: Graceful restart time (seconds).
    """
    return self.__restart_time
      
  def _set_restart_time(self, v, load=False):
    """
    Setter method for restart_time, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/graceful_restart/config/restart_time (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_restart_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_restart_time() directly.

    YANG Description: Graceful restart time (seconds).
    """
    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="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """restart_time 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="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

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

  def _unset_restart_time(self):
    self.__restart_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_recovery_time(self):
    """
    Getter method for recovery_time, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/graceful_restart/config/recovery_time (uint32)

    YANG Description: RSVP state recovery time
    """
    return self.__recovery_time
      
  def _set_recovery_time(self, v, load=False):
    """
    Setter method for recovery_time, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/graceful_restart/config/recovery_time (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_recovery_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_recovery_time() directly.

    YANG Description: RSVP state recovery time
    """
    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="recovery-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """recovery_time 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="recovery-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

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

  def _unset_recovery_time(self):
    self.__recovery_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="recovery-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)

  enable = __builtin__.property(_get_enable, _set_enable)
  restart_time = __builtin__.property(_get_restart_time, _set_restart_time)
  recovery_time = __builtin__.property(_get_recovery_time, _set_recovery_time)


  _pyangbind_elements = OrderedDict([('enable', enable), ('restart_time', restart_time), ('recovery_time', recovery_time), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_graceful_restart_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/global/graceful-restart/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information associated with
RSVP graceful-restart
  """
  __slots__ = ('_path_helper', '_extmethods', '__enable','__restart_time','__recovery_time',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__restart_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__recovery_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="recovery-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'global', 'graceful-restart', 'state']

  def _get_enable(self):
    """
    Getter method for enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/graceful_restart/state/enable (boolean)

    YANG Description: Enables graceful restart on the node.
    """
    return self.__enable
      
  def _set_enable(self, v, load=False):
    """
    Setter method for enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/graceful_restart/state/enable (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable() directly.

    YANG Description: Enables graceful restart on the node.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable 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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

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

  def _unset_enable(self):
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_restart_time(self):
    """
    Getter method for restart_time, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/graceful_restart/state/restart_time (uint32)

    YANG Description: Graceful restart time (seconds).
    """
    return self.__restart_time
      
  def _set_restart_time(self, v, load=False):
    """
    Setter method for restart_time, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/graceful_restart/state/restart_time (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_restart_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_restart_time() directly.

    YANG Description: Graceful restart time (seconds).
    """
    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="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """restart_time 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="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

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

  def _unset_restart_time(self):
    self.__restart_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_recovery_time(self):
    """
    Getter method for recovery_time, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/graceful_restart/state/recovery_time (uint32)

    YANG Description: RSVP state recovery time
    """
    return self.__recovery_time
      
  def _set_recovery_time(self, v, load=False):
    """
    Setter method for recovery_time, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/graceful_restart/state/recovery_time (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_recovery_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_recovery_time() directly.

    YANG Description: RSVP state recovery time
    """
    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="recovery-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """recovery_time 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="recovery-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

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

  def _unset_recovery_time(self):
    self.__recovery_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="recovery-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  enable = __builtin__.property(_get_enable)
  restart_time = __builtin__.property(_get_restart_time)
  recovery_time = __builtin__.property(_get_recovery_time)


  _pyangbind_elements = OrderedDict([('enable', enable), ('restart_time', restart_time), ('recovery_time', recovery_time), ])


class yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_graceful_restart(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/global/graceful-restart. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state and configuration parameters relating to
graceful-restart for RSVP
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'graceful-restart'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'global', 'graceful-restart']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/graceful_restart/config (container)

    YANG Description: Configuration parameters relating to
graceful-restart
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/graceful_restart/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
graceful-restart
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/graceful_restart/state (container)

    YANG Description: State information associated with
RSVP graceful-restart
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/graceful_restart/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 associated with
RSVP graceful-restart
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_soft_preemption_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/global/soft-preemption/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to RSVP
soft preemption support
  """
  __slots__ = ('_path_helper', '_extmethods', '__enable','__soft_preemption_timeout',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__soft_preemption_timeout = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..max']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="soft-preemption-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

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

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'global', 'soft-preemption', 'config']

  def _get_enable(self):
    """
    Getter method for enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/soft_preemption/config/enable (boolean)

    YANG Description: Enables soft preemption on a node.
    """
    return self.__enable
      
  def _set_enable(self, v, load=False):
    """
    Setter method for enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/soft_preemption/config/enable (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable() directly.

    YANG Description: Enables soft preemption on a node.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable 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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

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

  def _unset_enable(self):
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_soft_preemption_timeout(self):
    """
    Getter method for soft_preemption_timeout, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/soft_preemption/config/soft_preemption_timeout (uint16)

    YANG Description: Timeout value for soft preemption to revert
to hard preemption. The default timeout for
soft-preemption is 30 seconds - after which
the local system reverts to hard pre-emption.
    """
    return self.__soft_preemption_timeout
      
  def _set_soft_preemption_timeout(self, v, load=False):
    """
    Setter method for soft_preemption_timeout, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/soft_preemption/config/soft_preemption_timeout (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_soft_preemption_timeout is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_soft_preemption_timeout() directly.

    YANG Description: Timeout value for soft preemption to revert
to hard preemption. The default timeout for
soft-preemption is 30 seconds - after which
the local system reverts to hard pre-emption.
    """
    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': ['0..max']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="soft-preemption-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """soft_preemption_timeout must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..max']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="soft-preemption-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

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

  def _unset_soft_preemption_timeout(self):
    self.__soft_preemption_timeout = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..max']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="soft-preemption-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

  enable = __builtin__.property(_get_enable, _set_enable)
  soft_preemption_timeout = __builtin__.property(_get_soft_preemption_timeout, _set_soft_preemption_timeout)


  _pyangbind_elements = OrderedDict([('enable', enable), ('soft_preemption_timeout', soft_preemption_timeout), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_soft_preemption_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/global/soft-preemption/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to RSVP
soft preemption support
  """
  __slots__ = ('_path_helper', '_extmethods', '__enable','__soft_preemption_timeout',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__soft_preemption_timeout = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..max']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="soft-preemption-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'global', 'soft-preemption', 'state']

  def _get_enable(self):
    """
    Getter method for enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/soft_preemption/state/enable (boolean)

    YANG Description: Enables soft preemption on a node.
    """
    return self.__enable
      
  def _set_enable(self, v, load=False):
    """
    Setter method for enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/soft_preemption/state/enable (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable() directly.

    YANG Description: Enables soft preemption on a node.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable 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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

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

  def _unset_enable(self):
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_soft_preemption_timeout(self):
    """
    Getter method for soft_preemption_timeout, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/soft_preemption/state/soft_preemption_timeout (uint16)

    YANG Description: Timeout value for soft preemption to revert
to hard preemption. The default timeout for
soft-preemption is 30 seconds - after which
the local system reverts to hard pre-emption.
    """
    return self.__soft_preemption_timeout
      
  def _set_soft_preemption_timeout(self, v, load=False):
    """
    Setter method for soft_preemption_timeout, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/soft_preemption/state/soft_preemption_timeout (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_soft_preemption_timeout is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_soft_preemption_timeout() directly.

    YANG Description: Timeout value for soft preemption to revert
to hard preemption. The default timeout for
soft-preemption is 30 seconds - after which
the local system reverts to hard pre-emption.
    """
    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': ['0..max']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="soft-preemption-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """soft_preemption_timeout must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..max']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="soft-preemption-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

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

  def _unset_soft_preemption_timeout(self):
    self.__soft_preemption_timeout = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..max']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="soft-preemption-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  enable = __builtin__.property(_get_enable)
  soft_preemption_timeout = __builtin__.property(_get_soft_preemption_timeout)


  _pyangbind_elements = OrderedDict([('enable', enable), ('soft_preemption_timeout', soft_preemption_timeout), ])


class yc_soft_preemption_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_soft_preemption(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/global/soft-preemption. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Protocol options relating to RSVP
soft preemption
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'soft-preemption'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_soft_preemption_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_soft_preemption_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'global', 'soft-preemption']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/soft_preemption/config (container)

    YANG Description: Configuration parameters relating to RSVP
soft preemption support
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/soft_preemption/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 RSVP
soft preemption support
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_soft_preemption_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_soft_preemption_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_soft_preemption_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/soft_preemption/state (container)

    YANG Description: State parameters relating to RSVP
soft preemption support
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/soft_preemption/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 parameters relating to RSVP
soft preemption support
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_soft_preemption_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_soft_preemption_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_soft_preemption_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_hellos_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/global/hellos/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to RSVP
hellos
  """
  __slots__ = ('_path_helper', '_extmethods', '__hello_interval','__refresh_reduction',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1000..60000']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(9000), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__refresh_reduction = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="refresh-reduction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'global', 'hellos', 'config']

  def _get_hello_interval(self):
    """
    Getter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/hellos/config/hello_interval (uint16)

    YANG Description: set the interval in ms between RSVP hello
messages
    """
    return self.__hello_interval
      
  def _set_hello_interval(self, v, load=False):
    """
    Setter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/hellos/config/hello_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_interval() directly.

    YANG Description: set the interval in ms between RSVP hello
messages
    """
    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': ['1000..60000']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(9000), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_interval must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1000..60000']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(9000), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

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

  def _unset_hello_interval(self):
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1000..60000']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(9000), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_refresh_reduction(self):
    """
    Getter method for refresh_reduction, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/hellos/config/refresh_reduction (boolean)

    YANG Description: enables all RSVP refresh reduction message
bundling, RSVP message ID, reliable message delivery
and summary refresh
    """
    return self.__refresh_reduction
      
  def _set_refresh_reduction(self, v, load=False):
    """
    Setter method for refresh_reduction, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/hellos/config/refresh_reduction (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_refresh_reduction is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_refresh_reduction() directly.

    YANG Description: enables all RSVP refresh reduction message
bundling, RSVP message ID, reliable message delivery
and summary refresh
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="refresh-reduction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """refresh_reduction must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="refresh-reduction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

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

  def _unset_refresh_reduction(self):
    self.__refresh_reduction = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="refresh-reduction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  hello_interval = __builtin__.property(_get_hello_interval, _set_hello_interval)
  refresh_reduction = __builtin__.property(_get_refresh_reduction, _set_refresh_reduction)


  _pyangbind_elements = OrderedDict([('hello_interval', hello_interval), ('refresh_reduction', refresh_reduction), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_hellos_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/global/hellos/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information associated with RSVP hellos
  """
  __slots__ = ('_path_helper', '_extmethods', '__hello_interval','__refresh_reduction',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1000..60000']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(9000), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__refresh_reduction = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="refresh-reduction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'global', 'hellos', 'state']

  def _get_hello_interval(self):
    """
    Getter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/hellos/state/hello_interval (uint16)

    YANG Description: set the interval in ms between RSVP hello
messages
    """
    return self.__hello_interval
      
  def _set_hello_interval(self, v, load=False):
    """
    Setter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/hellos/state/hello_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_interval() directly.

    YANG Description: set the interval in ms between RSVP hello
messages
    """
    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': ['1000..60000']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(9000), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_interval must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1000..60000']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(9000), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

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

  def _unset_hello_interval(self):
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1000..60000']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(9000), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_refresh_reduction(self):
    """
    Getter method for refresh_reduction, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/hellos/state/refresh_reduction (boolean)

    YANG Description: enables all RSVP refresh reduction message
bundling, RSVP message ID, reliable message delivery
and summary refresh
    """
    return self.__refresh_reduction
      
  def _set_refresh_reduction(self, v, load=False):
    """
    Setter method for refresh_reduction, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/hellos/state/refresh_reduction (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_refresh_reduction is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_refresh_reduction() directly.

    YANG Description: enables all RSVP refresh reduction message
bundling, RSVP message ID, reliable message delivery
and summary refresh
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="refresh-reduction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """refresh_reduction must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="refresh-reduction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

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

  def _unset_refresh_reduction(self):
    self.__refresh_reduction = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="refresh-reduction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  hello_interval = __builtin__.property(_get_hello_interval)
  refresh_reduction = __builtin__.property(_get_refresh_reduction)


  _pyangbind_elements = OrderedDict([('hello_interval', hello_interval), ('refresh_reduction', refresh_reduction), ])


class yc_hellos_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_hellos(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/global/hellos. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top level container for RSVP hello parameters
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'hellos'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_hellos_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_hellos_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'global', 'hellos']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/hellos/config (container)

    YANG Description: Configuration parameters relating to RSVP
hellos
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/hellos/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 RSVP
hellos
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_hellos_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_hellos_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_hellos_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/hellos/state (container)

    YANG Description: State information associated with RSVP hellos
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/hellos/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 associated with RSVP hellos
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_hellos_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_hellos_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_hellos_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_errors_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_state_counters_errors(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/global/state/counters/errors. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Error counters associated with the global RSVP-TE
instance.
  """
  __slots__ = ('_path_helper', '_extmethods', '__authentication_fail','__bad_checksum','__bad_packet_format','__bad_packet_length','__out_of_order','__received_nack','__transmit_failure','__transmit_queue_full','__unknown_ack','__unknown_nack',)

  _yang_name = 'errors'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__authentication_fail = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="authentication-fail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__bad_checksum = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bad-checksum", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__bad_packet_format = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bad-packet-format", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__bad_packet_length = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bad-packet-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_of_order = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-of-order", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__received_nack = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="received-nack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__transmit_failure = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-failure", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__transmit_queue_full = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-queue-full", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__unknown_ack = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="unknown-ack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__unknown_nack = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="unknown-nack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'global', 'state', 'counters', 'errors']

  def _get_authentication_fail(self):
    """
    Getter method for authentication_fail, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors/authentication_fail (yang:counter64)

    YANG Description: The number of packets received that have failed RSVP-TE
authentication checks in the specified context.
    """
    return self.__authentication_fail
      
  def _set_authentication_fail(self, v, load=False):
    """
    Setter method for authentication_fail, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors/authentication_fail (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_authentication_fail is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_authentication_fail() directly.

    YANG Description: The number of packets received that have failed RSVP-TE
authentication checks in the specified context.
    """
    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="authentication-fail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """authentication_fail must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="authentication-fail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_authentication_fail(self):
    self.__authentication_fail = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="authentication-fail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_bad_checksum(self):
    """
    Getter method for bad_checksum, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors/bad_checksum (yang:counter64)

    YANG Description: The number of packets received that have an incorrect RSVP-TE
checksum in the context.
    """
    return self.__bad_checksum
      
  def _set_bad_checksum(self, v, load=False):
    """
    Setter method for bad_checksum, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors/bad_checksum (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bad_checksum is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bad_checksum() directly.

    YANG Description: The number of packets received that have an incorrect RSVP-TE
checksum in the context.
    """
    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="bad-checksum", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bad_checksum must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bad-checksum", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_bad_checksum(self):
    self.__bad_checksum = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bad-checksum", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_bad_packet_format(self):
    """
    Getter method for bad_packet_format, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors/bad_packet_format (yang:counter64)

    YANG Description: The number of packets received that were dropped due to being
badly formed in the context.
    """
    return self.__bad_packet_format
      
  def _set_bad_packet_format(self, v, load=False):
    """
    Setter method for bad_packet_format, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors/bad_packet_format (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bad_packet_format is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bad_packet_format() directly.

    YANG Description: The number of packets received that were dropped due to being
badly formed in the context.
    """
    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="bad-packet-format", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bad_packet_format must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bad-packet-format", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_bad_packet_format(self):
    self.__bad_packet_format = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bad-packet-format", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_bad_packet_length(self):
    """
    Getter method for bad_packet_length, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors/bad_packet_length (yang:counter64)

    YANG Description: The number of packets received that were dropped due to having
an invalid length specified in the context.
    """
    return self.__bad_packet_length
      
  def _set_bad_packet_length(self, v, load=False):
    """
    Setter method for bad_packet_length, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors/bad_packet_length (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bad_packet_length is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bad_packet_length() directly.

    YANG Description: The number of packets received that were dropped due to having
an invalid length specified in the context.
    """
    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="bad-packet-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bad_packet_length must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bad-packet-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_bad_packet_length(self):
    self.__bad_packet_length = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bad-packet-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_of_order(self):
    """
    Getter method for out_of_order, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors/out_of_order (yang:counter64)

    YANG Description: The number of messages received out of order in the context.
    """
    return self.__out_of_order
      
  def _set_out_of_order(self, v, load=False):
    """
    Setter method for out_of_order, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors/out_of_order (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_of_order is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_of_order() directly.

    YANG Description: The number of messages received out of order in the context.
    """
    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="out-of-order", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_of_order must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-of-order", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_out_of_order(self):
    self.__out_of_order = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-of-order", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_received_nack(self):
    """
    Getter method for received_nack, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors/received_nack (yang:counter64)

    YANG Description: The number of NACK RESV messages received in the context.
    """
    return self.__received_nack
      
  def _set_received_nack(self, v, load=False):
    """
    Setter method for received_nack, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors/received_nack (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_received_nack is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_received_nack() directly.

    YANG Description: The number of NACK RESV messages received in the context.
    """
    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="received-nack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """received_nack must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="received-nack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_received_nack(self):
    self.__received_nack = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="received-nack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_transmit_failure(self):
    """
    Getter method for transmit_failure, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors/transmit_failure (yang:counter64)

    YANG Description: The total number of packets dropped on transmit in the context.
    """
    return self.__transmit_failure
      
  def _set_transmit_failure(self, v, load=False):
    """
    Setter method for transmit_failure, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors/transmit_failure (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transmit_failure is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transmit_failure() directly.

    YANG Description: The total number of packets dropped on transmit in the context.
    """
    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-failure", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transmit_failure must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-failure", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

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


  def _get_transmit_queue_full(self):
    """
    Getter method for transmit_queue_full, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors/transmit_queue_full (yang:counter64)

    YANG Description: The number of packets dropped due to the transmit queue being
full in the context.
    """
    return self.__transmit_queue_full
      
  def _set_transmit_queue_full(self, v, load=False):
    """
    Setter method for transmit_queue_full, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors/transmit_queue_full (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transmit_queue_full is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transmit_queue_full() directly.

    YANG Description: The number of packets dropped due to the transmit queue being
full in the context.
    """
    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-queue-full", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transmit_queue_full must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-queue-full", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

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


  def _get_unknown_ack(self):
    """
    Getter method for unknown_ack, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors/unknown_ack (yang:counter64)

    YANG Description: The number of packets received containing an ACK for an unknown
message ID in the context.
    """
    return self.__unknown_ack
      
  def _set_unknown_ack(self, v, load=False):
    """
    Setter method for unknown_ack, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors/unknown_ack (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_ack is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_ack() directly.

    YANG Description: The number of packets received containing an ACK for an unknown
message ID in the context.
    """
    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="unknown-ack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_ack must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="unknown-ack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_unknown_ack(self):
    self.__unknown_ack = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="unknown-ack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_unknown_nack(self):
    """
    Getter method for unknown_nack, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors/unknown_nack (yang:counter64)

    YANG Description: The number of packets received containing a NACK for an unknown
message ID in the context.
    """
    return self.__unknown_nack
      
  def _set_unknown_nack(self, v, load=False):
    """
    Setter method for unknown_nack, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors/unknown_nack (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_nack is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_nack() directly.

    YANG Description: The number of packets received containing a NACK for an unknown
message ID in the context.
    """
    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="unknown-nack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_nack must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="unknown-nack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_unknown_nack(self):
    self.__unknown_nack = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="unknown-nack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)

  authentication_fail = __builtin__.property(_get_authentication_fail)
  bad_checksum = __builtin__.property(_get_bad_checksum)
  bad_packet_format = __builtin__.property(_get_bad_packet_format)
  bad_packet_length = __builtin__.property(_get_bad_packet_length)
  out_of_order = __builtin__.property(_get_out_of_order)
  received_nack = __builtin__.property(_get_received_nack)
  transmit_failure = __builtin__.property(_get_transmit_failure)
  transmit_queue_full = __builtin__.property(_get_transmit_queue_full)
  unknown_ack = __builtin__.property(_get_unknown_ack)
  unknown_nack = __builtin__.property(_get_unknown_nack)


  _pyangbind_elements = OrderedDict([('authentication_fail', authentication_fail), ('bad_checksum', bad_checksum), ('bad_packet_format', bad_packet_format), ('bad_packet_length', bad_packet_length), ('out_of_order', out_of_order), ('received_nack', received_nack), ('transmit_failure', transmit_failure), ('transmit_queue_full', transmit_queue_full), ('unknown_ack', unknown_ack), ('unknown_nack', unknown_nack), ])


class yc_counters_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_state_counters(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/global/state/counters. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Platform wide RSVP statistics and counters
  """
  __slots__ = ('_path_helper', '_extmethods', '__path_timeouts','__reservation_timeouts','__rate_limited_messages','__in_path_messages','__in_path_error_messages','__in_path_tear_messages','__in_reservation_messages','__in_reservation_error_messages','__in_reservation_tear_messages','__in_hello_messages','__in_srefresh_messages','__in_ack_messages','__out_path_messages','__out_path_error_messages','__out_path_tear_messages','__out_reservation_messages','__out_reservation_error_messages','__out_reservation_tear_messages','__out_hello_messages','__out_srefresh_messages','__out_ack_messages','__errors',)

  _yang_name = 'counters'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__path_timeouts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="path-timeouts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__reservation_timeouts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="reservation-timeouts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__rate_limited_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="rate-limited-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_path_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-path-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_path_error_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-path-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_path_tear_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-path-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_reservation_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-reservation-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_reservation_error_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-reservation-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_reservation_tear_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-reservation-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_hello_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-hello-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_srefresh_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-srefresh-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_ack_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-ack-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_path_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-path-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_path_error_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-path-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_path_tear_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-path-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_reservation_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-reservation-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_reservation_error_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-reservation-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_reservation_tear_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-reservation-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_hello_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-hello-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_srefresh_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-srefresh-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_ack_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-ack-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__errors = YANGDynClass(base=yc_errors_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_state_counters_errors, is_container='container', yang_name="errors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'global', 'state', 'counters']

  def _get_path_timeouts(self):
    """
    Getter method for path_timeouts, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/path_timeouts (yang:counter64)

    YANG Description: The number of Path State Blocks (PSBs) that
have been timed out by the local system.
    """
    return self.__path_timeouts
      
  def _set_path_timeouts(self, v, load=False):
    """
    Setter method for path_timeouts, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/path_timeouts (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_timeouts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_timeouts() directly.

    YANG Description: The number of Path State Blocks (PSBs) that
have been timed out by the local system.
    """
    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="path-timeouts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_timeouts must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="path-timeouts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_path_timeouts(self):
    self.__path_timeouts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="path-timeouts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_reservation_timeouts(self):
    """
    Getter method for reservation_timeouts, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/reservation_timeouts (yang:counter64)

    YANG Description: The number of Reservation State Blocks (RSBs) that
have been timed out by the local system.
    """
    return self.__reservation_timeouts
      
  def _set_reservation_timeouts(self, v, load=False):
    """
    Setter method for reservation_timeouts, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/reservation_timeouts (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_reservation_timeouts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_reservation_timeouts() directly.

    YANG Description: The number of Reservation State Blocks (RSBs) that
have been timed out by the local system.
    """
    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="reservation-timeouts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """reservation_timeouts must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="reservation-timeouts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_reservation_timeouts(self):
    self.__reservation_timeouts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="reservation-timeouts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_rate_limited_messages(self):
    """
    Getter method for rate_limited_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/rate_limited_messages (yang:counter64)

    YANG Description: RSVP messages dropped due to rate limiting
    """
    return self.__rate_limited_messages
      
  def _set_rate_limited_messages(self, v, load=False):
    """
    Setter method for rate_limited_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/rate_limited_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_rate_limited_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_rate_limited_messages() directly.

    YANG Description: RSVP messages dropped due to rate limiting
    """
    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="rate-limited-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """rate_limited_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="rate-limited-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_rate_limited_messages(self):
    self.__rate_limited_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="rate-limited-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_path_messages(self):
    """
    Getter method for in_path_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/in_path_messages (yang:counter64)

    YANG Description: Number of received RSVP Path messages
    """
    return self.__in_path_messages
      
  def _set_in_path_messages(self, v, load=False):
    """
    Setter method for in_path_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/in_path_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_path_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_path_messages() directly.

    YANG Description: Number of received RSVP Path messages
    """
    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="in-path-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_path_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-path-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_in_path_messages(self):
    self.__in_path_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-path-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_path_error_messages(self):
    """
    Getter method for in_path_error_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/in_path_error_messages (yang:counter64)

    YANG Description: Number of received RSVP Path Error messages
    """
    return self.__in_path_error_messages
      
  def _set_in_path_error_messages(self, v, load=False):
    """
    Setter method for in_path_error_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/in_path_error_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_path_error_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_path_error_messages() directly.

    YANG Description: Number of received RSVP Path Error messages
    """
    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="in-path-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_path_error_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-path-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_in_path_error_messages(self):
    self.__in_path_error_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-path-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_path_tear_messages(self):
    """
    Getter method for in_path_tear_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/in_path_tear_messages (yang:counter64)

    YANG Description: Number of received RSVP Path Tear messages
    """
    return self.__in_path_tear_messages
      
  def _set_in_path_tear_messages(self, v, load=False):
    """
    Setter method for in_path_tear_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/in_path_tear_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_path_tear_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_path_tear_messages() directly.

    YANG Description: Number of received RSVP Path Tear messages
    """
    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="in-path-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_path_tear_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-path-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_in_path_tear_messages(self):
    self.__in_path_tear_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-path-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_reservation_messages(self):
    """
    Getter method for in_reservation_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/in_reservation_messages (yang:counter64)

    YANG Description: Number of received RSVP Resv messages
    """
    return self.__in_reservation_messages
      
  def _set_in_reservation_messages(self, v, load=False):
    """
    Setter method for in_reservation_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/in_reservation_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_reservation_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_reservation_messages() directly.

    YANG Description: Number of received RSVP Resv messages
    """
    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="in-reservation-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_reservation_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-reservation-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_in_reservation_messages(self):
    self.__in_reservation_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-reservation-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_reservation_error_messages(self):
    """
    Getter method for in_reservation_error_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/in_reservation_error_messages (yang:counter64)

    YANG Description: Number of received RSVP Resv Error messages
    """
    return self.__in_reservation_error_messages
      
  def _set_in_reservation_error_messages(self, v, load=False):
    """
    Setter method for in_reservation_error_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/in_reservation_error_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_reservation_error_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_reservation_error_messages() directly.

    YANG Description: Number of received RSVP Resv Error messages
    """
    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="in-reservation-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_reservation_error_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-reservation-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_in_reservation_error_messages(self):
    self.__in_reservation_error_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-reservation-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_reservation_tear_messages(self):
    """
    Getter method for in_reservation_tear_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/in_reservation_tear_messages (yang:counter64)

    YANG Description: Number of received RSVP Resv Tear messages
    """
    return self.__in_reservation_tear_messages
      
  def _set_in_reservation_tear_messages(self, v, load=False):
    """
    Setter method for in_reservation_tear_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/in_reservation_tear_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_reservation_tear_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_reservation_tear_messages() directly.

    YANG Description: Number of received RSVP Resv Tear messages
    """
    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="in-reservation-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_reservation_tear_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-reservation-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_in_reservation_tear_messages(self):
    self.__in_reservation_tear_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-reservation-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_hello_messages(self):
    """
    Getter method for in_hello_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/in_hello_messages (yang:counter64)

    YANG Description: Number of received RSVP hello messages
    """
    return self.__in_hello_messages
      
  def _set_in_hello_messages(self, v, load=False):
    """
    Setter method for in_hello_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/in_hello_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_hello_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_hello_messages() directly.

    YANG Description: Number of received RSVP hello messages
    """
    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="in-hello-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_hello_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-hello-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_in_hello_messages(self):
    self.__in_hello_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-hello-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_srefresh_messages(self):
    """
    Getter method for in_srefresh_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/in_srefresh_messages (yang:counter64)

    YANG Description: Number of received RSVP summary refresh messages
    """
    return self.__in_srefresh_messages
      
  def _set_in_srefresh_messages(self, v, load=False):
    """
    Setter method for in_srefresh_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/in_srefresh_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_srefresh_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_srefresh_messages() directly.

    YANG Description: Number of received RSVP summary refresh messages
    """
    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="in-srefresh-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_srefresh_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-srefresh-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_in_srefresh_messages(self):
    self.__in_srefresh_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-srefresh-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_ack_messages(self):
    """
    Getter method for in_ack_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/in_ack_messages (yang:counter64)

    YANG Description: Number of received RSVP refresh reduction ack
messages
    """
    return self.__in_ack_messages
      
  def _set_in_ack_messages(self, v, load=False):
    """
    Setter method for in_ack_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/in_ack_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_ack_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_ack_messages() directly.

    YANG Description: Number of received RSVP refresh reduction ack
messages
    """
    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="in-ack-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_ack_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-ack-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_in_ack_messages(self):
    self.__in_ack_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-ack-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_path_messages(self):
    """
    Getter method for out_path_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/out_path_messages (yang:counter64)

    YANG Description: Number of sent RSVP PATH messages
    """
    return self.__out_path_messages
      
  def _set_out_path_messages(self, v, load=False):
    """
    Setter method for out_path_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/out_path_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_path_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_path_messages() directly.

    YANG Description: Number of sent RSVP PATH messages
    """
    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="out-path-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_path_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-path-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_out_path_messages(self):
    self.__out_path_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-path-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_path_error_messages(self):
    """
    Getter method for out_path_error_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/out_path_error_messages (yang:counter64)

    YANG Description: Number of sent RSVP Path Error messages
    """
    return self.__out_path_error_messages
      
  def _set_out_path_error_messages(self, v, load=False):
    """
    Setter method for out_path_error_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/out_path_error_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_path_error_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_path_error_messages() directly.

    YANG Description: Number of sent RSVP Path Error messages
    """
    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="out-path-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_path_error_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-path-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_out_path_error_messages(self):
    self.__out_path_error_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-path-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_path_tear_messages(self):
    """
    Getter method for out_path_tear_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/out_path_tear_messages (yang:counter64)

    YANG Description: Number of sent RSVP Path Tear messages
    """
    return self.__out_path_tear_messages
      
  def _set_out_path_tear_messages(self, v, load=False):
    """
    Setter method for out_path_tear_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/out_path_tear_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_path_tear_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_path_tear_messages() directly.

    YANG Description: Number of sent RSVP Path Tear messages
    """
    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="out-path-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_path_tear_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-path-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_out_path_tear_messages(self):
    self.__out_path_tear_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-path-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_reservation_messages(self):
    """
    Getter method for out_reservation_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/out_reservation_messages (yang:counter64)

    YANG Description: Number of sent RSVP Resv messages
    """
    return self.__out_reservation_messages
      
  def _set_out_reservation_messages(self, v, load=False):
    """
    Setter method for out_reservation_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/out_reservation_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_reservation_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_reservation_messages() directly.

    YANG Description: Number of sent RSVP Resv messages
    """
    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="out-reservation-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_reservation_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-reservation-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_out_reservation_messages(self):
    self.__out_reservation_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-reservation-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_reservation_error_messages(self):
    """
    Getter method for out_reservation_error_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/out_reservation_error_messages (yang:counter64)

    YANG Description: Number of sent RSVP Resv Error messages
    """
    return self.__out_reservation_error_messages
      
  def _set_out_reservation_error_messages(self, v, load=False):
    """
    Setter method for out_reservation_error_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/out_reservation_error_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_reservation_error_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_reservation_error_messages() directly.

    YANG Description: Number of sent RSVP Resv Error messages
    """
    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="out-reservation-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_reservation_error_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-reservation-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_out_reservation_error_messages(self):
    self.__out_reservation_error_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-reservation-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_reservation_tear_messages(self):
    """
    Getter method for out_reservation_tear_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/out_reservation_tear_messages (yang:counter64)

    YANG Description: Number of sent RSVP Resv Tear messages
    """
    return self.__out_reservation_tear_messages
      
  def _set_out_reservation_tear_messages(self, v, load=False):
    """
    Setter method for out_reservation_tear_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/out_reservation_tear_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_reservation_tear_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_reservation_tear_messages() directly.

    YANG Description: Number of sent RSVP Resv Tear messages
    """
    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="out-reservation-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_reservation_tear_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-reservation-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_out_reservation_tear_messages(self):
    self.__out_reservation_tear_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-reservation-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_hello_messages(self):
    """
    Getter method for out_hello_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/out_hello_messages (yang:counter64)

    YANG Description: Number of sent RSVP hello messages
    """
    return self.__out_hello_messages
      
  def _set_out_hello_messages(self, v, load=False):
    """
    Setter method for out_hello_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/out_hello_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_hello_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_hello_messages() directly.

    YANG Description: Number of sent RSVP hello messages
    """
    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="out-hello-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_hello_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-hello-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_out_hello_messages(self):
    self.__out_hello_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-hello-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_srefresh_messages(self):
    """
    Getter method for out_srefresh_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/out_srefresh_messages (yang:counter64)

    YANG Description: Number of sent RSVP summary refresh messages
    """
    return self.__out_srefresh_messages
      
  def _set_out_srefresh_messages(self, v, load=False):
    """
    Setter method for out_srefresh_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/out_srefresh_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_srefresh_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_srefresh_messages() directly.

    YANG Description: Number of sent RSVP summary refresh messages
    """
    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="out-srefresh-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_srefresh_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-srefresh-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_out_srefresh_messages(self):
    self.__out_srefresh_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-srefresh-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_ack_messages(self):
    """
    Getter method for out_ack_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/out_ack_messages (yang:counter64)

    YANG Description: Number of sent RSVP refresh reduction ack messages
    """
    return self.__out_ack_messages
      
  def _set_out_ack_messages(self, v, load=False):
    """
    Setter method for out_ack_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/out_ack_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_ack_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_ack_messages() directly.

    YANG Description: Number of sent RSVP refresh reduction ack messages
    """
    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="out-ack-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_ack_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-ack-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_out_ack_messages(self):
    self.__out_ack_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-ack-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_errors(self):
    """
    Getter method for errors, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors (container)

    YANG Description: Error counters associated with the global RSVP-TE
instance.
    """
    return self.__errors
      
  def _set_errors(self, v, load=False):
    """
    Setter method for errors, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_errors is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_errors() directly.

    YANG Description: Error counters associated with the global RSVP-TE
instance.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_errors_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_state_counters_errors, is_container='container', yang_name="errors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """errors must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_errors_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_state_counters_errors, is_container='container', yang_name="errors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

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

  def _unset_errors(self):
    self.__errors = YANGDynClass(base=yc_errors_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_state_counters_errors, is_container='container', yang_name="errors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  path_timeouts = __builtin__.property(_get_path_timeouts)
  reservation_timeouts = __builtin__.property(_get_reservation_timeouts)
  rate_limited_messages = __builtin__.property(_get_rate_limited_messages)
  in_path_messages = __builtin__.property(_get_in_path_messages)
  in_path_error_messages = __builtin__.property(_get_in_path_error_messages)
  in_path_tear_messages = __builtin__.property(_get_in_path_tear_messages)
  in_reservation_messages = __builtin__.property(_get_in_reservation_messages)
  in_reservation_error_messages = __builtin__.property(_get_in_reservation_error_messages)
  in_reservation_tear_messages = __builtin__.property(_get_in_reservation_tear_messages)
  in_hello_messages = __builtin__.property(_get_in_hello_messages)
  in_srefresh_messages = __builtin__.property(_get_in_srefresh_messages)
  in_ack_messages = __builtin__.property(_get_in_ack_messages)
  out_path_messages = __builtin__.property(_get_out_path_messages)
  out_path_error_messages = __builtin__.property(_get_out_path_error_messages)
  out_path_tear_messages = __builtin__.property(_get_out_path_tear_messages)
  out_reservation_messages = __builtin__.property(_get_out_reservation_messages)
  out_reservation_error_messages = __builtin__.property(_get_out_reservation_error_messages)
  out_reservation_tear_messages = __builtin__.property(_get_out_reservation_tear_messages)
  out_hello_messages = __builtin__.property(_get_out_hello_messages)
  out_srefresh_messages = __builtin__.property(_get_out_srefresh_messages)
  out_ack_messages = __builtin__.property(_get_out_ack_messages)
  errors = __builtin__.property(_get_errors)


  _pyangbind_elements = OrderedDict([('path_timeouts', path_timeouts), ('reservation_timeouts', reservation_timeouts), ('rate_limited_messages', rate_limited_messages), ('in_path_messages', in_path_messages), ('in_path_error_messages', in_path_error_messages), ('in_path_tear_messages', in_path_tear_messages), ('in_reservation_messages', in_reservation_messages), ('in_reservation_error_messages', in_reservation_error_messages), ('in_reservation_tear_messages', in_reservation_tear_messages), ('in_hello_messages', in_hello_messages), ('in_srefresh_messages', in_srefresh_messages), ('in_ack_messages', in_ack_messages), ('out_path_messages', out_path_messages), ('out_path_error_messages', out_path_error_messages), ('out_path_tear_messages', out_path_tear_messages), ('out_reservation_messages', out_reservation_messages), ('out_reservation_error_messages', out_reservation_error_messages), ('out_reservation_tear_messages', out_reservation_tear_messages), ('out_hello_messages', out_hello_messages), ('out_srefresh_messages', out_srefresh_messages), ('out_ack_messages', out_ack_messages), ('errors', errors), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/global/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Platform wide RSVP state, including counters
  """
  __slots__ = ('_path_helper', '_extmethods', '__counters',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'global', 'state']

  def _get_counters(self):
    """
    Getter method for counters, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters (container)

    YANG Description: Platform wide RSVP statistics and counters
    """
    return self.__counters
      
  def _set_counters(self, v, load=False):
    """
    Setter method for counters, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_counters is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_counters() directly.

    YANG Description: Platform wide RSVP statistics and counters
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_counters_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """counters must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

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

  def _unset_counters(self):
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  counters = __builtin__.property(_get_counters)


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


class yc_global__openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/global. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Platform wide RSVP configuration and state
  """
  __slots__ = ('_path_helper', '_extmethods', '__graceful_restart','__soft_preemption','__hellos','__state',)

  _yang_name = 'global'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__graceful_restart = YANGDynClass(base=yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__soft_preemption = YANGDynClass(base=yc_soft_preemption_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_soft_preemption, is_container='container', yang_name="soft-preemption", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__hellos = YANGDynClass(base=yc_hellos_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_hellos, is_container='container', yang_name="hellos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'global']

  def _get_graceful_restart(self):
    """
    Getter method for graceful_restart, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/graceful_restart (container)

    YANG Description: Operational state and configuration parameters relating to
graceful-restart for RSVP
    """
    return self.__graceful_restart
      
  def _set_graceful_restart(self, v, load=False):
    """
    Setter method for graceful_restart, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/graceful_restart (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_graceful_restart is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_graceful_restart() directly.

    YANG Description: Operational state and configuration parameters relating to
graceful-restart for RSVP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """graceful_restart must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

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

  def _unset_graceful_restart(self):
    self.__graceful_restart = YANGDynClass(base=yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_soft_preemption(self):
    """
    Getter method for soft_preemption, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/soft_preemption (container)

    YANG Description: Protocol options relating to RSVP
soft preemption
    """
    return self.__soft_preemption
      
  def _set_soft_preemption(self, v, load=False):
    """
    Setter method for soft_preemption, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/soft_preemption (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_soft_preemption is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_soft_preemption() directly.

    YANG Description: Protocol options relating to RSVP
soft preemption
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_soft_preemption_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_soft_preemption, is_container='container', yang_name="soft-preemption", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """soft_preemption must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_soft_preemption_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_soft_preemption, is_container='container', yang_name="soft-preemption", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

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

  def _unset_soft_preemption(self):
    self.__soft_preemption = YANGDynClass(base=yc_soft_preemption_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_soft_preemption, is_container='container', yang_name="soft-preemption", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_hellos(self):
    """
    Getter method for hellos, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/hellos (container)

    YANG Description: Top level container for RSVP hello parameters
    """
    return self.__hellos
      
  def _set_hellos(self, v, load=False):
    """
    Setter method for hellos, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/hellos (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hellos is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hellos() directly.

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

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

  def _unset_hellos(self):
    self.__hellos = YANGDynClass(base=yc_hellos_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_hellos, is_container='container', yang_name="hellos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state (container)

    YANG Description: Platform wide RSVP state, including counters
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/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: Platform wide RSVP state, including counters
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  graceful_restart = __builtin__.property(_get_graceful_restart, _set_graceful_restart)
  soft_preemption = __builtin__.property(_get_soft_preemption, _set_soft_preemption)
  hellos = __builtin__.property(_get_hellos, _set_hellos)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('graceful_restart', graceful_restart), ('soft_preemption', soft_preemption), ('hellos', hellos), ('state', state), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/interface/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration of per-interface RSVP parameters
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=True)

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

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'config']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/config/interface_id (oc-if:interface-id)

    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 /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/config/interface_id (oc-if:interface-id)
    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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_id must be of a type compatible with oc-if:interface-id""",
          'defined-type': "oc-if:interface-id",
          '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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=True)

  interface_id = __builtin__.property(_get_interface_id, _set_interface_id)


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


class yc_errors_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_state_counters_errors(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/interface/state/counters/errors. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Interface specific RSVP error counters
  """
  __slots__ = ('_path_helper', '_extmethods', '__authentication_fail','__bad_checksum','__bad_packet_format','__bad_packet_length','__out_of_order','__received_nack','__transmit_failure','__transmit_queue_full','__unknown_ack','__unknown_nack',)

  _yang_name = 'errors'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__authentication_fail = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="authentication-fail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__bad_checksum = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bad-checksum", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__bad_packet_format = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bad-packet-format", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__bad_packet_length = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bad-packet-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_of_order = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-of-order", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__received_nack = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="received-nack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__transmit_failure = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-failure", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__transmit_queue_full = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-queue-full", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__unknown_ack = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="unknown-ack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__unknown_nack = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="unknown-nack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'state', 'counters', 'errors']

  def _get_authentication_fail(self):
    """
    Getter method for authentication_fail, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors/authentication_fail (yang:counter64)

    YANG Description: The number of packets received that have failed RSVP-TE
authentication checks in the specified context.
    """
    return self.__authentication_fail
      
  def _set_authentication_fail(self, v, load=False):
    """
    Setter method for authentication_fail, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors/authentication_fail (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_authentication_fail is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_authentication_fail() directly.

    YANG Description: The number of packets received that have failed RSVP-TE
authentication checks in the specified context.
    """
    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="authentication-fail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """authentication_fail must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="authentication-fail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_authentication_fail(self):
    self.__authentication_fail = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="authentication-fail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_bad_checksum(self):
    """
    Getter method for bad_checksum, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors/bad_checksum (yang:counter64)

    YANG Description: The number of packets received that have an incorrect RSVP-TE
checksum in the context.
    """
    return self.__bad_checksum
      
  def _set_bad_checksum(self, v, load=False):
    """
    Setter method for bad_checksum, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors/bad_checksum (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bad_checksum is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bad_checksum() directly.

    YANG Description: The number of packets received that have an incorrect RSVP-TE
checksum in the context.
    """
    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="bad-checksum", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bad_checksum must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bad-checksum", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_bad_checksum(self):
    self.__bad_checksum = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bad-checksum", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_bad_packet_format(self):
    """
    Getter method for bad_packet_format, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors/bad_packet_format (yang:counter64)

    YANG Description: The number of packets received that were dropped due to being
badly formed in the context.
    """
    return self.__bad_packet_format
      
  def _set_bad_packet_format(self, v, load=False):
    """
    Setter method for bad_packet_format, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors/bad_packet_format (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bad_packet_format is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bad_packet_format() directly.

    YANG Description: The number of packets received that were dropped due to being
badly formed in the context.
    """
    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="bad-packet-format", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bad_packet_format must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bad-packet-format", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_bad_packet_format(self):
    self.__bad_packet_format = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bad-packet-format", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_bad_packet_length(self):
    """
    Getter method for bad_packet_length, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors/bad_packet_length (yang:counter64)

    YANG Description: The number of packets received that were dropped due to having
an invalid length specified in the context.
    """
    return self.__bad_packet_length
      
  def _set_bad_packet_length(self, v, load=False):
    """
    Setter method for bad_packet_length, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors/bad_packet_length (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bad_packet_length is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bad_packet_length() directly.

    YANG Description: The number of packets received that were dropped due to having
an invalid length specified in the context.
    """
    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="bad-packet-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bad_packet_length must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bad-packet-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_bad_packet_length(self):
    self.__bad_packet_length = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bad-packet-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_of_order(self):
    """
    Getter method for out_of_order, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors/out_of_order (yang:counter64)

    YANG Description: The number of messages received out of order in the context.
    """
    return self.__out_of_order
      
  def _set_out_of_order(self, v, load=False):
    """
    Setter method for out_of_order, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors/out_of_order (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_of_order is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_of_order() directly.

    YANG Description: The number of messages received out of order in the context.
    """
    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="out-of-order", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_of_order must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-of-order", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_out_of_order(self):
    self.__out_of_order = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-of-order", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_received_nack(self):
    """
    Getter method for received_nack, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors/received_nack (yang:counter64)

    YANG Description: The number of NACK RESV messages received in the context.
    """
    return self.__received_nack
      
  def _set_received_nack(self, v, load=False):
    """
    Setter method for received_nack, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors/received_nack (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_received_nack is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_received_nack() directly.

    YANG Description: The number of NACK RESV messages received in the context.
    """
    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="received-nack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """received_nack must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="received-nack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_received_nack(self):
    self.__received_nack = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="received-nack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_transmit_failure(self):
    """
    Getter method for transmit_failure, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors/transmit_failure (yang:counter64)

    YANG Description: The total number of packets dropped on transmit in the context.
    """
    return self.__transmit_failure
      
  def _set_transmit_failure(self, v, load=False):
    """
    Setter method for transmit_failure, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors/transmit_failure (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transmit_failure is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transmit_failure() directly.

    YANG Description: The total number of packets dropped on transmit in the context.
    """
    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-failure", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transmit_failure must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-failure", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

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


  def _get_transmit_queue_full(self):
    """
    Getter method for transmit_queue_full, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors/transmit_queue_full (yang:counter64)

    YANG Description: The number of packets dropped due to the transmit queue being
full in the context.
    """
    return self.__transmit_queue_full
      
  def _set_transmit_queue_full(self, v, load=False):
    """
    Setter method for transmit_queue_full, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors/transmit_queue_full (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transmit_queue_full is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transmit_queue_full() directly.

    YANG Description: The number of packets dropped due to the transmit queue being
full in the context.
    """
    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-queue-full", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transmit_queue_full must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-queue-full", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

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


  def _get_unknown_ack(self):
    """
    Getter method for unknown_ack, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors/unknown_ack (yang:counter64)

    YANG Description: The number of packets received containing an ACK for an unknown
message ID in the context.
    """
    return self.__unknown_ack
      
  def _set_unknown_ack(self, v, load=False):
    """
    Setter method for unknown_ack, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors/unknown_ack (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_ack is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_ack() directly.

    YANG Description: The number of packets received containing an ACK for an unknown
message ID in the context.
    """
    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="unknown-ack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_ack must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="unknown-ack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_unknown_ack(self):
    self.__unknown_ack = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="unknown-ack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_unknown_nack(self):
    """
    Getter method for unknown_nack, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors/unknown_nack (yang:counter64)

    YANG Description: The number of packets received containing a NACK for an unknown
message ID in the context.
    """
    return self.__unknown_nack
      
  def _set_unknown_nack(self, v, load=False):
    """
    Setter method for unknown_nack, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors/unknown_nack (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_nack is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_nack() directly.

    YANG Description: The number of packets received containing a NACK for an unknown
message ID in the context.
    """
    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="unknown-nack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_nack must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="unknown-nack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_unknown_nack(self):
    self.__unknown_nack = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="unknown-nack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)

  authentication_fail = __builtin__.property(_get_authentication_fail)
  bad_checksum = __builtin__.property(_get_bad_checksum)
  bad_packet_format = __builtin__.property(_get_bad_packet_format)
  bad_packet_length = __builtin__.property(_get_bad_packet_length)
  out_of_order = __builtin__.property(_get_out_of_order)
  received_nack = __builtin__.property(_get_received_nack)
  transmit_failure = __builtin__.property(_get_transmit_failure)
  transmit_queue_full = __builtin__.property(_get_transmit_queue_full)
  unknown_ack = __builtin__.property(_get_unknown_ack)
  unknown_nack = __builtin__.property(_get_unknown_nack)


  _pyangbind_elements = OrderedDict([('authentication_fail', authentication_fail), ('bad_checksum', bad_checksum), ('bad_packet_format', bad_packet_format), ('bad_packet_length', bad_packet_length), ('out_of_order', out_of_order), ('received_nack', received_nack), ('transmit_failure', transmit_failure), ('transmit_queue_full', transmit_queue_full), ('unknown_ack', unknown_ack), ('unknown_nack', unknown_nack), ])


class yc_counters_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_state_counters(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/interface/state/counters. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Interface specific RSVP statistics and counters
  """
  __slots__ = ('_path_helper', '_extmethods', '__in_path_messages','__in_path_error_messages','__in_path_tear_messages','__in_reservation_messages','__in_reservation_error_messages','__in_reservation_tear_messages','__in_hello_messages','__in_srefresh_messages','__in_ack_messages','__out_path_messages','__out_path_error_messages','__out_path_tear_messages','__out_reservation_messages','__out_reservation_error_messages','__out_reservation_tear_messages','__out_hello_messages','__out_srefresh_messages','__out_ack_messages','__rate_limited_messages','__errors',)

  _yang_name = 'counters'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__in_path_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-path-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_path_error_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-path-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_path_tear_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-path-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_reservation_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-reservation-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_reservation_error_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-reservation-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_reservation_tear_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-reservation-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_hello_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-hello-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_srefresh_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-srefresh-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_ack_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-ack-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_path_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-path-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_path_error_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-path-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_path_tear_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-path-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_reservation_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-reservation-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_reservation_error_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-reservation-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_reservation_tear_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-reservation-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_hello_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-hello-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_srefresh_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-srefresh-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_ack_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-ack-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__rate_limited_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="rate-limited-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__errors = YANGDynClass(base=yc_errors_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_state_counters_errors, is_container='container', yang_name="errors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'state', 'counters']

  def _get_in_path_messages(self):
    """
    Getter method for in_path_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/in_path_messages (yang:counter64)

    YANG Description: Number of received RSVP Path messages
    """
    return self.__in_path_messages
      
  def _set_in_path_messages(self, v, load=False):
    """
    Setter method for in_path_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/in_path_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_path_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_path_messages() directly.

    YANG Description: Number of received RSVP Path messages
    """
    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="in-path-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_path_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-path-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_in_path_messages(self):
    self.__in_path_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-path-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_path_error_messages(self):
    """
    Getter method for in_path_error_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/in_path_error_messages (yang:counter64)

    YANG Description: Number of received RSVP Path Error messages
    """
    return self.__in_path_error_messages
      
  def _set_in_path_error_messages(self, v, load=False):
    """
    Setter method for in_path_error_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/in_path_error_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_path_error_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_path_error_messages() directly.

    YANG Description: Number of received RSVP Path Error messages
    """
    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="in-path-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_path_error_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-path-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_in_path_error_messages(self):
    self.__in_path_error_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-path-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_path_tear_messages(self):
    """
    Getter method for in_path_tear_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/in_path_tear_messages (yang:counter64)

    YANG Description: Number of received RSVP Path Tear messages
    """
    return self.__in_path_tear_messages
      
  def _set_in_path_tear_messages(self, v, load=False):
    """
    Setter method for in_path_tear_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/in_path_tear_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_path_tear_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_path_tear_messages() directly.

    YANG Description: Number of received RSVP Path Tear messages
    """
    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="in-path-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_path_tear_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-path-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

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

  def _unset_in_path_tear_messages(self):
    self.__in_path_tear_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-path-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_reservation_messages(self):
    """
    Getter method for in_reservation_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/in_reservation_messages (yang:counter64)

    YANG Description: Number of received RSVP Resv messages
    """
    return self.__in_reservation_messages
      
  def _set_in_reservation_messages(self, v, load=False):
    """
    Setter method for in_reservation_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/in_reservation_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_reservation_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_reservation_messages() directly.

    YANG Description: Number of received RSVP Resv messages
    """
    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="in-reservation-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_reservation_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-reservation-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__in_reservation_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_reservation_messages(self):
    self.__in_reservation_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-reservation-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_reservation_error_messages(self):
    """
    Getter method for in_reservation_error_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/in_reservation_error_messages (yang:counter64)

    YANG Description: Number of received RSVP Resv Error messages
    """
    return self.__in_reservation_error_messages
      
  def _set_in_reservation_error_messages(self, v, load=False):
    """
    Setter method for in_reservation_error_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/in_reservation_error_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_reservation_error_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_reservation_error_messages() directly.

    YANG Description: Number of received RSVP Resv Error messages
    """
    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="in-reservation-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_reservation_error_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-reservation-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__in_reservation_error_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_reservation_error_messages(self):
    self.__in_reservation_error_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-reservation-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_reservation_tear_messages(self):
    """
    Getter method for in_reservation_tear_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/in_reservation_tear_messages (yang:counter64)

    YANG Description: Number of received RSVP Resv Tear messages
    """
    return self.__in_reservation_tear_messages
      
  def _set_in_reservation_tear_messages(self, v, load=False):
    """
    Setter method for in_reservation_tear_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/in_reservation_tear_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_reservation_tear_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_reservation_tear_messages() directly.

    YANG Description: Number of received RSVP Resv Tear messages
    """
    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="in-reservation-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_reservation_tear_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-reservation-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__in_reservation_tear_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_reservation_tear_messages(self):
    self.__in_reservation_tear_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-reservation-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_hello_messages(self):
    """
    Getter method for in_hello_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/in_hello_messages (yang:counter64)

    YANG Description: Number of received RSVP hello messages
    """
    return self.__in_hello_messages
      
  def _set_in_hello_messages(self, v, load=False):
    """
    Setter method for in_hello_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/in_hello_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_hello_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_hello_messages() directly.

    YANG Description: Number of received RSVP hello messages
    """
    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="in-hello-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_hello_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-hello-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__in_hello_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_hello_messages(self):
    self.__in_hello_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-hello-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_srefresh_messages(self):
    """
    Getter method for in_srefresh_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/in_srefresh_messages (yang:counter64)

    YANG Description: Number of received RSVP summary refresh messages
    """
    return self.__in_srefresh_messages
      
  def _set_in_srefresh_messages(self, v, load=False):
    """
    Setter method for in_srefresh_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/in_srefresh_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_srefresh_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_srefresh_messages() directly.

    YANG Description: Number of received RSVP summary refresh messages
    """
    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="in-srefresh-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_srefresh_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-srefresh-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__in_srefresh_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_srefresh_messages(self):
    self.__in_srefresh_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-srefresh-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_ack_messages(self):
    """
    Getter method for in_ack_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/in_ack_messages (yang:counter64)

    YANG Description: Number of received RSVP refresh reduction ack
messages
    """
    return self.__in_ack_messages
      
  def _set_in_ack_messages(self, v, load=False):
    """
    Setter method for in_ack_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/in_ack_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_ack_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_ack_messages() directly.

    YANG Description: Number of received RSVP refresh reduction ack
messages
    """
    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="in-ack-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_ack_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-ack-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__in_ack_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_ack_messages(self):
    self.__in_ack_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-ack-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_path_messages(self):
    """
    Getter method for out_path_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/out_path_messages (yang:counter64)

    YANG Description: Number of sent RSVP PATH messages
    """
    return self.__out_path_messages
      
  def _set_out_path_messages(self, v, load=False):
    """
    Setter method for out_path_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/out_path_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_path_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_path_messages() directly.

    YANG Description: Number of sent RSVP PATH messages
    """
    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="out-path-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_path_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-path-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_path_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_path_messages(self):
    self.__out_path_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-path-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_path_error_messages(self):
    """
    Getter method for out_path_error_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/out_path_error_messages (yang:counter64)

    YANG Description: Number of sent RSVP Path Error messages
    """
    return self.__out_path_error_messages
      
  def _set_out_path_error_messages(self, v, load=False):
    """
    Setter method for out_path_error_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/out_path_error_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_path_error_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_path_error_messages() directly.

    YANG Description: Number of sent RSVP Path Error messages
    """
    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="out-path-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_path_error_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-path-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_path_error_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_path_error_messages(self):
    self.__out_path_error_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-path-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_path_tear_messages(self):
    """
    Getter method for out_path_tear_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/out_path_tear_messages (yang:counter64)

    YANG Description: Number of sent RSVP Path Tear messages
    """
    return self.__out_path_tear_messages
      
  def _set_out_path_tear_messages(self, v, load=False):
    """
    Setter method for out_path_tear_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/out_path_tear_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_path_tear_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_path_tear_messages() directly.

    YANG Description: Number of sent RSVP Path Tear messages
    """
    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="out-path-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_path_tear_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-path-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_path_tear_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_path_tear_messages(self):
    self.__out_path_tear_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-path-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_reservation_messages(self):
    """
    Getter method for out_reservation_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/out_reservation_messages (yang:counter64)

    YANG Description: Number of sent RSVP Resv messages
    """
    return self.__out_reservation_messages
      
  def _set_out_reservation_messages(self, v, load=False):
    """
    Setter method for out_reservation_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/out_reservation_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_reservation_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_reservation_messages() directly.

    YANG Description: Number of sent RSVP Resv messages
    """
    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="out-reservation-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_reservation_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-reservation-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_reservation_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_reservation_messages(self):
    self.__out_reservation_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-reservation-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_reservation_error_messages(self):
    """
    Getter method for out_reservation_error_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/out_reservation_error_messages (yang:counter64)

    YANG Description: Number of sent RSVP Resv Error messages
    """
    return self.__out_reservation_error_messages
      
  def _set_out_reservation_error_messages(self, v, load=False):
    """
    Setter method for out_reservation_error_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/out_reservation_error_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_reservation_error_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_reservation_error_messages() directly.

    YANG Description: Number of sent RSVP Resv Error messages
    """
    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="out-reservation-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_reservation_error_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-reservation-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_reservation_error_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_reservation_error_messages(self):
    self.__out_reservation_error_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-reservation-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_reservation_tear_messages(self):
    """
    Getter method for out_reservation_tear_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/out_reservation_tear_messages (yang:counter64)

    YANG Description: Number of sent RSVP Resv Tear messages
    """
    return self.__out_reservation_tear_messages
      
  def _set_out_reservation_tear_messages(self, v, load=False):
    """
    Setter method for out_reservation_tear_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/out_reservation_tear_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_reservation_tear_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_reservation_tear_messages() directly.

    YANG Description: Number of sent RSVP Resv Tear messages
    """
    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="out-reservation-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_reservation_tear_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-reservation-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_reservation_tear_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_reservation_tear_messages(self):
    self.__out_reservation_tear_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-reservation-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_hello_messages(self):
    """
    Getter method for out_hello_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/out_hello_messages (yang:counter64)

    YANG Description: Number of sent RSVP hello messages
    """
    return self.__out_hello_messages
      
  def _set_out_hello_messages(self, v, load=False):
    """
    Setter method for out_hello_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/out_hello_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_hello_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_hello_messages() directly.

    YANG Description: Number of sent RSVP hello messages
    """
    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="out-hello-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_hello_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-hello-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_hello_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_hello_messages(self):
    self.__out_hello_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-hello-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_srefresh_messages(self):
    """
    Getter method for out_srefresh_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/out_srefresh_messages (yang:counter64)

    YANG Description: Number of sent RSVP summary refresh messages
    """
    return self.__out_srefresh_messages
      
  def _set_out_srefresh_messages(self, v, load=False):
    """
    Setter method for out_srefresh_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/out_srefresh_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_srefresh_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_srefresh_messages() directly.

    YANG Description: Number of sent RSVP summary refresh messages
    """
    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="out-srefresh-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_srefresh_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-srefresh-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_srefresh_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_srefresh_messages(self):
    self.__out_srefresh_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-srefresh-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_ack_messages(self):
    """
    Getter method for out_ack_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/out_ack_messages (yang:counter64)

    YANG Description: Number of sent RSVP refresh reduction ack messages
    """
    return self.__out_ack_messages
      
  def _set_out_ack_messages(self, v, load=False):
    """
    Setter method for out_ack_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/out_ack_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_ack_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_ack_messages() directly.

    YANG Description: Number of sent RSVP refresh reduction ack messages
    """
    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="out-ack-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_ack_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-ack-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_ack_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_ack_messages(self):
    self.__out_ack_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-ack-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_rate_limited_messages(self):
    """
    Getter method for rate_limited_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/rate_limited_messages (yang:counter64)

    YANG Description: RSVP messages dropped due to rate limiting
    """
    return self.__rate_limited_messages
      
  def _set_rate_limited_messages(self, v, load=False):
    """
    Setter method for rate_limited_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/rate_limited_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_rate_limited_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_rate_limited_messages() directly.

    YANG Description: RSVP messages dropped due to rate limiting
    """
    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="rate-limited-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """rate_limited_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="rate-limited-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__rate_limited_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_rate_limited_messages(self):
    self.__rate_limited_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="rate-limited-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_errors(self):
    """
    Getter method for errors, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors (container)

    YANG Description: Interface specific RSVP error counters
    """
    return self.__errors
      
  def _set_errors(self, v, load=False):
    """
    Setter method for errors, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_errors is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_errors() directly.

    YANG Description: Interface specific RSVP error counters
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_errors_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_state_counters_errors, is_container='container', yang_name="errors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """errors must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_errors_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_state_counters_errors, is_container='container', yang_name="errors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__errors = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_errors(self):
    self.__errors = YANGDynClass(base=yc_errors_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_state_counters_errors, is_container='container', yang_name="errors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  in_path_messages = __builtin__.property(_get_in_path_messages)
  in_path_error_messages = __builtin__.property(_get_in_path_error_messages)
  in_path_tear_messages = __builtin__.property(_get_in_path_tear_messages)
  in_reservation_messages = __builtin__.property(_get_in_reservation_messages)
  in_reservation_error_messages = __builtin__.property(_get_in_reservation_error_messages)
  in_reservation_tear_messages = __builtin__.property(_get_in_reservation_tear_messages)
  in_hello_messages = __builtin__.property(_get_in_hello_messages)
  in_srefresh_messages = __builtin__.property(_get_in_srefresh_messages)
  in_ack_messages = __builtin__.property(_get_in_ack_messages)
  out_path_messages = __builtin__.property(_get_out_path_messages)
  out_path_error_messages = __builtin__.property(_get_out_path_error_messages)
  out_path_tear_messages = __builtin__.property(_get_out_path_tear_messages)
  out_reservation_messages = __builtin__.property(_get_out_reservation_messages)
  out_reservation_error_messages = __builtin__.property(_get_out_reservation_error_messages)
  out_reservation_tear_messages = __builtin__.property(_get_out_reservation_tear_messages)
  out_hello_messages = __builtin__.property(_get_out_hello_messages)
  out_srefresh_messages = __builtin__.property(_get_out_srefresh_messages)
  out_ack_messages = __builtin__.property(_get_out_ack_messages)
  rate_limited_messages = __builtin__.property(_get_rate_limited_messages)
  errors = __builtin__.property(_get_errors)


  _pyangbind_elements = OrderedDict([('in_path_messages', in_path_messages), ('in_path_error_messages', in_path_error_messages), ('in_path_tear_messages', in_path_tear_messages), ('in_reservation_messages', in_reservation_messages), ('in_reservation_error_messages', in_reservation_error_messages), ('in_reservation_tear_messages', in_reservation_tear_messages), ('in_hello_messages', in_hello_messages), ('in_srefresh_messages', in_srefresh_messages), ('in_ack_messages', in_ack_messages), ('out_path_messages', out_path_messages), ('out_path_error_messages', out_path_error_messages), ('out_path_tear_messages', out_path_tear_messages), ('out_reservation_messages', out_reservation_messages), ('out_reservation_error_messages', out_reservation_error_messages), ('out_reservation_tear_messages', out_reservation_tear_messages), ('out_hello_messages', out_hello_messages), ('out_srefresh_messages', out_srefresh_messages), ('out_ack_messages', out_ack_messages), ('rate_limited_messages', rate_limited_messages), ('errors', errors), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/interface/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Per-interface RSVP protocol and state information
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_link_bandwidth','__interface_id','__counters',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_link_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=False)
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'state']

  def _get_max_link_bandwidth(self):
    """
    Getter method for max_link_bandwidth, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/max_link_bandwidth (oc-mplst:bandwidth-kbps)

    YANG Description: The maximum link bandwidth expressed in kilobits
per second. This value should be the same (other than
the units) as the value that is advertised into the
IGP traffic engineering database.
    """
    return self.__max_link_bandwidth
      
  def _set_max_link_bandwidth(self, v, load=False):
    """
    Setter method for max_link_bandwidth, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/max_link_bandwidth (oc-mplst:bandwidth-kbps)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_link_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_link_bandwidth() directly.

    YANG Description: The maximum link bandwidth expressed in kilobits
per second. This value should be the same (other than
the units) as the value that is advertised into the
IGP traffic engineering database.
    """
    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-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_link_bandwidth must be of a type compatible with oc-mplst:bandwidth-kbps""",
          'defined-type': "oc-mplst:bandwidth-kbps",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)""",
        })

    self.__max_link_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_link_bandwidth(self):
    self.__max_link_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)


  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/interface_id (oc-if:interface-id)

    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 /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/interface_id (oc-if:interface-id)
    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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_id must be of a type compatible with oc-if:interface-id""",
          'defined-type': "oc-if:interface-id",
          '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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=False)


  def _get_counters(self):
    """
    Getter method for counters, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters (container)

    YANG Description: Interface specific RSVP statistics and counters
    """
    return self.__counters
      
  def _set_counters(self, v, load=False):
    """
    Setter method for counters, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_counters is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_counters() directly.

    YANG Description: Interface specific RSVP statistics and counters
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_counters_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """counters must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__counters = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_counters(self):
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  max_link_bandwidth = __builtin__.property(_get_max_link_bandwidth)
  interface_id = __builtin__.property(_get_interface_id)
  counters = __builtin__.property(_get_counters)


  _pyangbind_elements = OrderedDict([('max_link_bandwidth', max_link_bandwidth), ('interface_id', interface_id), ('counters', counters), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_interface_ref_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'interface-ref', 'config']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/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 /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/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 /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_interface_ref_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'interface-ref', 'state']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/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 /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/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 /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_interface_ref(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/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
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'interface-ref'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'interface-ref']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/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 /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/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 /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_bandwidth_reservations_bandwidth_reservation_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/interface/bandwidth-reservations/bandwidth-reservation/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
bandwidth reservation at a certain priority
  """
  __slots__ = ('_path_helper', '_extmethods', '__priority','__available_bandwidth','__reserved_bandwidth','__active_reservations_count','__highwater_mark',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__priority = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ALL': {}},),], is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    self.__available_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="available-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-mbps', is_config=False)
    self.__reserved_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="reserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-mbps', is_config=False)
    self.__active_reservations_count = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="active-reservations-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:gauge64', is_config=False)
    self.__highwater_mark = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="highwater-mark", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-mbps', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'bandwidth-reservations', 'bandwidth-reservation', 'state']

  def _get_priority(self):
    """
    Getter method for priority, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/bandwidth_reservations/bandwidth_reservation/state/priority (union)

    YANG Description: RSVP priority level for LSPs traversing the interface
    """
    return self.__priority
      
  def _set_priority(self, v, load=False):
    """
    Setter method for priority, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/bandwidth_reservations/bandwidth_reservation/state/priority (union)
    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: RSVP priority level for LSPs traversing the interface
    """
    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']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ALL': {}},),], is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """priority must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ALL': {}},),], is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)""",
        })

    self.__priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_priority(self):
    self.__priority = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ALL': {}},),], is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)


  def _get_available_bandwidth(self):
    """
    Getter method for available_bandwidth, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/bandwidth_reservations/bandwidth_reservation/state/available_bandwidth (oc-mplst:bandwidth-mbps)

    YANG Description: Bandwidth currently available with the priority level,
or for the entire interface when the priority is set to
ALL
    """
    return self.__available_bandwidth
      
  def _set_available_bandwidth(self, v, load=False):
    """
    Setter method for available_bandwidth, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/bandwidth_reservations/bandwidth_reservation/state/available_bandwidth (oc-mplst:bandwidth-mbps)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_available_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_available_bandwidth() directly.

    YANG Description: Bandwidth currently available with the priority level,
or for the entire interface when the priority is set to
ALL
    """
    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="available-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-mbps', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """available_bandwidth must be of a type compatible with oc-mplst:bandwidth-mbps""",
          'defined-type': "oc-mplst:bandwidth-mbps",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="available-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-mbps', is_config=False)""",
        })

    self.__available_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_available_bandwidth(self):
    self.__available_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="available-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-mbps', is_config=False)


  def _get_reserved_bandwidth(self):
    """
    Getter method for reserved_bandwidth, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/bandwidth_reservations/bandwidth_reservation/state/reserved_bandwidth (oc-mplst:bandwidth-mbps)

    YANG Description: Bandwidth currently reserved within the priority level,
or the sum of all priority levels when the keyword is set
to ALL
    """
    return self.__reserved_bandwidth
      
  def _set_reserved_bandwidth(self, v, load=False):
    """
    Setter method for reserved_bandwidth, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/bandwidth_reservations/bandwidth_reservation/state/reserved_bandwidth (oc-mplst:bandwidth-mbps)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_reserved_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_reserved_bandwidth() directly.

    YANG Description: Bandwidth currently reserved within the priority level,
or the sum of all priority levels when the keyword is set
to ALL
    """
    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="reserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-mbps', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """reserved_bandwidth must be of a type compatible with oc-mplst:bandwidth-mbps""",
          'defined-type': "oc-mplst:bandwidth-mbps",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="reserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-mbps', is_config=False)""",
        })

    self.__reserved_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_reserved_bandwidth(self):
    self.__reserved_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="reserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-mbps', is_config=False)


  def _get_active_reservations_count(self):
    """
    Getter method for active_reservations_count, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/bandwidth_reservations/bandwidth_reservation/state/active_reservations_count (yang:gauge64)

    YANG Description: Number of active RSVP reservations in the associated
priority, or the sum of all reservations when the priority
level is set to ALL
    """
    return self.__active_reservations_count
      
  def _set_active_reservations_count(self, v, load=False):
    """
    Setter method for active_reservations_count, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/bandwidth_reservations/bandwidth_reservation/state/active_reservations_count (yang:gauge64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_active_reservations_count is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_active_reservations_count() directly.

    YANG Description: Number of active RSVP reservations in the associated
priority, or the sum of all reservations when the priority
level is set to ALL
    """
    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="active-reservations-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:gauge64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """active_reservations_count must be of a type compatible with yang:gauge64""",
          'defined-type': "yang:gauge64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="active-reservations-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:gauge64', is_config=False)""",
        })

    self.__active_reservations_count = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_active_reservations_count(self):
    self.__active_reservations_count = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="active-reservations-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:gauge64', is_config=False)


  def _get_highwater_mark(self):
    """
    Getter method for highwater_mark, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/bandwidth_reservations/bandwidth_reservation/state/highwater_mark (oc-mplst:bandwidth-mbps)

    YANG Description: Maximum bandwidth reserved on the interface within the
priority, or across all priorities in the case that the
priority level is set to ALL
    """
    return self.__highwater_mark
      
  def _set_highwater_mark(self, v, load=False):
    """
    Setter method for highwater_mark, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/bandwidth_reservations/bandwidth_reservation/state/highwater_mark (oc-mplst:bandwidth-mbps)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_highwater_mark is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_highwater_mark() directly.

    YANG Description: Maximum bandwidth reserved on the interface within the
priority, or across all priorities in the case that the
priority level is set to ALL
    """
    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="highwater-mark", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-mbps', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """highwater_mark must be of a type compatible with oc-mplst:bandwidth-mbps""",
          'defined-type': "oc-mplst:bandwidth-mbps",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="highwater-mark", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-mbps', is_config=False)""",
        })

    self.__highwater_mark = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_highwater_mark(self):
    self.__highwater_mark = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="highwater-mark", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-mbps', is_config=False)

  priority = __builtin__.property(_get_priority)
  available_bandwidth = __builtin__.property(_get_available_bandwidth)
  reserved_bandwidth = __builtin__.property(_get_reserved_bandwidth)
  active_reservations_count = __builtin__.property(_get_active_reservations_count)
  highwater_mark = __builtin__.property(_get_highwater_mark)


  _pyangbind_elements = OrderedDict([('priority', priority), ('available_bandwidth', available_bandwidth), ('reserved_bandwidth', reserved_bandwidth), ('active_reservations_count', active_reservations_count), ('highwater_mark', highwater_mark), ])


class yc_bandwidth_reservation_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_bandwidth_reservations_bandwidth_reservation(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/interface/bandwidth-reservations/bandwidth-reservation. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Available and reserved bandwidth by priority on
the interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__priority','__state',)

  _yang_name = 'bandwidth-reservation'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__priority = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_bandwidth_reservations_bandwidth_reservation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'bandwidth-reservations', 'bandwidth-reservation']

  def _get_priority(self):
    """
    Getter method for priority, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/bandwidth_reservations/bandwidth_reservation/priority (leafref)

    YANG Description: Reference to the RSVP priority level
    """
    return self.__priority
      
  def _set_priority(self, v, load=False):
    """
    Setter method for priority, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/bandwidth_reservations/bandwidth_reservation/priority (leafref)
    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: Reference to the RSVP priority level
    """
    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="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """priority must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_priority(self):
    self.__priority = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/bandwidth_reservations/bandwidth_reservation/state (container)

    YANG Description: Operational state parameters relating to a
bandwidth reservation at a certain priority
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/bandwidth_reservations/bandwidth_reservation/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
bandwidth reservation at a certain priority
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_bandwidth_reservations_bandwidth_reservation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_bandwidth_reservations_bandwidth_reservation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_bandwidth_reservations_bandwidth_reservation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  priority = __builtin__.property(_get_priority)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('priority', priority), ('state', state), ])


class yc_bandwidth_reservations_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_bandwidth_reservations(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/interface/bandwidth-reservations. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for bandwidth reservation
  """
  __slots__ = ('_path_helper', '_extmethods', '__bandwidth_reservation',)

  _yang_name = 'bandwidth-reservations'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__bandwidth_reservation = YANGDynClass(base=YANGListType("priority",yc_bandwidth_reservation_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_bandwidth_reservations_bandwidth_reservation, yang_name="bandwidth-reservation", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="bandwidth-reservation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'bandwidth-reservations']

  def _get_bandwidth_reservation(self):
    """
    Getter method for bandwidth_reservation, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/bandwidth_reservations/bandwidth_reservation (list)

    YANG Description: Available and reserved bandwidth by priority on
the interface.
    """
    return self.__bandwidth_reservation
      
  def _set_bandwidth_reservation(self, v, load=False):
    """
    Setter method for bandwidth_reservation, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/bandwidth_reservations/bandwidth_reservation (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth_reservation is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth_reservation() directly.

    YANG Description: Available and reserved bandwidth by priority on
the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("priority",yc_bandwidth_reservation_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_bandwidth_reservations_bandwidth_reservation, yang_name="bandwidth-reservation", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="bandwidth-reservation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth_reservation must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("priority",yc_bandwidth_reservation_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_bandwidth_reservations_bandwidth_reservation, yang_name="bandwidth-reservation", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="bandwidth-reservation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__bandwidth_reservation = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth_reservation(self):
    self.__bandwidth_reservation = YANGDynClass(base=YANGListType("priority",yc_bandwidth_reservation_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_bandwidth_reservations_bandwidth_reservation, yang_name="bandwidth-reservation", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="bandwidth-reservation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  bandwidth_reservation = __builtin__.property(_get_bandwidth_reservation, _set_bandwidth_reservation)


  _pyangbind_elements = OrderedDict([('bandwidth_reservation', bandwidth_reservation), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_hellos_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/interface/hellos/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to RSVP
hellos
  """
  __slots__ = ('_path_helper', '_extmethods', '__hello_interval','__refresh_reduction',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1000..60000']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(9000), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__refresh_reduction = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="refresh-reduction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'hellos', 'config']

  def _get_hello_interval(self):
    """
    Getter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/hellos/config/hello_interval (uint16)

    YANG Description: set the interval in ms between RSVP hello
messages
    """
    return self.__hello_interval
      
  def _set_hello_interval(self, v, load=False):
    """
    Setter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/hellos/config/hello_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_interval() directly.

    YANG Description: set the interval in ms between RSVP hello
messages
    """
    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': ['1000..60000']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(9000), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_interval must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1000..60000']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(9000), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__hello_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_interval(self):
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1000..60000']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(9000), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_refresh_reduction(self):
    """
    Getter method for refresh_reduction, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/hellos/config/refresh_reduction (boolean)

    YANG Description: enables all RSVP refresh reduction message
bundling, RSVP message ID, reliable message delivery
and summary refresh
    """
    return self.__refresh_reduction
      
  def _set_refresh_reduction(self, v, load=False):
    """
    Setter method for refresh_reduction, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/hellos/config/refresh_reduction (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_refresh_reduction is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_refresh_reduction() directly.

    YANG Description: enables all RSVP refresh reduction message
bundling, RSVP message ID, reliable message delivery
and summary refresh
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="refresh-reduction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """refresh_reduction must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="refresh-reduction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__refresh_reduction = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_refresh_reduction(self):
    self.__refresh_reduction = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="refresh-reduction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  hello_interval = __builtin__.property(_get_hello_interval, _set_hello_interval)
  refresh_reduction = __builtin__.property(_get_refresh_reduction, _set_refresh_reduction)


  _pyangbind_elements = OrderedDict([('hello_interval', hello_interval), ('refresh_reduction', refresh_reduction), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_hellos_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/interface/hellos/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information associated with RSVP hellos
  """
  __slots__ = ('_path_helper', '_extmethods', '__hello_interval','__refresh_reduction',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1000..60000']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(9000), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__refresh_reduction = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="refresh-reduction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'hellos', 'state']

  def _get_hello_interval(self):
    """
    Getter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/hellos/state/hello_interval (uint16)

    YANG Description: set the interval in ms between RSVP hello
messages
    """
    return self.__hello_interval
      
  def _set_hello_interval(self, v, load=False):
    """
    Setter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/hellos/state/hello_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_interval() directly.

    YANG Description: set the interval in ms between RSVP hello
messages
    """
    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': ['1000..60000']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(9000), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_interval must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1000..60000']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(9000), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__hello_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_interval(self):
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1000..60000']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(9000), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_refresh_reduction(self):
    """
    Getter method for refresh_reduction, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/hellos/state/refresh_reduction (boolean)

    YANG Description: enables all RSVP refresh reduction message
bundling, RSVP message ID, reliable message delivery
and summary refresh
    """
    return self.__refresh_reduction
      
  def _set_refresh_reduction(self, v, load=False):
    """
    Setter method for refresh_reduction, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/hellos/state/refresh_reduction (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_refresh_reduction is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_refresh_reduction() directly.

    YANG Description: enables all RSVP refresh reduction message
bundling, RSVP message ID, reliable message delivery
and summary refresh
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="refresh-reduction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """refresh_reduction must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="refresh-reduction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__refresh_reduction = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_refresh_reduction(self):
    self.__refresh_reduction = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="refresh-reduction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  hello_interval = __builtin__.property(_get_hello_interval)
  refresh_reduction = __builtin__.property(_get_refresh_reduction)


  _pyangbind_elements = OrderedDict([('hello_interval', hello_interval), ('refresh_reduction', refresh_reduction), ])


class yc_hellos_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_hellos(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/interface/hellos. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top level container for RSVP hello parameters
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'hellos'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_hellos_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_hellos_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'hellos']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/hellos/config (container)

    YANG Description: Configuration parameters relating to RSVP
hellos
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/hellos/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 RSVP
hellos
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_hellos_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_hellos_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_hellos_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/hellos/state (container)

    YANG Description: State information associated with RSVP hellos
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/hellos/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 associated with RSVP hellos
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_hellos_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_hellos_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_hellos_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_authentication_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/interface/authentication/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating
to authentication
  """
  __slots__ = ('_path_helper', '_extmethods', '__enable','__authentication_type','__authentication_key',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__authentication_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="authentication-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__authentication_key = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'authentication', 'config']

  def _get_enable(self):
    """
    Getter method for enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/authentication/config/enable (boolean)

    YANG Description: Enables RSVP authentication on the node.
    """
    return self.__enable
      
  def _set_enable(self, v, load=False):
    """
    Setter method for enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/authentication/config/enable (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable() directly.

    YANG Description: Enables RSVP authentication on the node.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable 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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enable = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable(self):
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_authentication_type(self):
    """
    Getter method for authentication_type, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/authentication/config/authentication_type (identityref)

    YANG Description: RSVP message authentication algorithm type
    """
    return self.__authentication_type
      
  def _set_authentication_type(self, v, load=False):
    """
    Setter method for authentication_type, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/authentication/config/authentication_type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_authentication_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_authentication_type() directly.

    YANG Description: RSVP message authentication algorithm type
    """
    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={'RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="authentication-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """authentication_type must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="authentication-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__authentication_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_authentication_type(self):
    self.__authentication_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="authentication-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_authentication_key(self):
    """
    Getter method for authentication_key, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/authentication/config/authentication_key (oc-types:routing-password)

    YANG Description: Authenticate RSVP signaling messages
    """
    return self.__authentication_key
      
  def _set_authentication_key(self, v, load=False):
    """
    Setter method for authentication_key, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/authentication/config/authentication_key (oc-types:routing-password)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_authentication_key is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_authentication_key() directly.

    YANG Description: Authenticate RSVP signaling messages
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """authentication_key must be of a type compatible with oc-types:routing-password""",
          'defined-type': "oc-types:routing-password",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)""",
        })

    self.__authentication_key = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_authentication_key(self):
    self.__authentication_key = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)

  enable = __builtin__.property(_get_enable, _set_enable)
  authentication_type = __builtin__.property(_get_authentication_type, _set_authentication_type)
  authentication_key = __builtin__.property(_get_authentication_key, _set_authentication_key)


  _pyangbind_elements = OrderedDict([('enable', enable), ('authentication_type', authentication_type), ('authentication_key', authentication_key), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_authentication_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/interface/authentication/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information associated
with authentication
  """
  __slots__ = ('_path_helper', '_extmethods', '__enable','__authentication_type','__authentication_key',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__authentication_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="authentication-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__authentication_key = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'authentication', 'state']

  def _get_enable(self):
    """
    Getter method for enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/authentication/state/enable (boolean)

    YANG Description: Enables RSVP authentication on the node.
    """
    return self.__enable
      
  def _set_enable(self, v, load=False):
    """
    Setter method for enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/authentication/state/enable (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable() directly.

    YANG Description: Enables RSVP authentication on the node.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable 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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enable = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable(self):
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_authentication_type(self):
    """
    Getter method for authentication_type, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/authentication/state/authentication_type (identityref)

    YANG Description: RSVP message authentication algorithm type
    """
    return self.__authentication_type
      
  def _set_authentication_type(self, v, load=False):
    """
    Setter method for authentication_type, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/authentication/state/authentication_type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_authentication_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_authentication_type() directly.

    YANG Description: RSVP message authentication algorithm type
    """
    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={'RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="authentication-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """authentication_type must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="authentication-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__authentication_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_authentication_type(self):
    self.__authentication_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="authentication-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_authentication_key(self):
    """
    Getter method for authentication_key, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/authentication/state/authentication_key (oc-types:routing-password)

    YANG Description: Authenticate RSVP signaling messages
    """
    return self.__authentication_key
      
  def _set_authentication_key(self, v, load=False):
    """
    Setter method for authentication_key, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/authentication/state/authentication_key (oc-types:routing-password)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_authentication_key is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_authentication_key() directly.

    YANG Description: Authenticate RSVP signaling messages
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """authentication_key must be of a type compatible with oc-types:routing-password""",
          'defined-type': "oc-types:routing-password",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=False)""",
        })

    self.__authentication_key = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_authentication_key(self):
    self.__authentication_key = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=False)

  enable = __builtin__.property(_get_enable)
  authentication_type = __builtin__.property(_get_authentication_type)
  authentication_key = __builtin__.property(_get_authentication_key)


  _pyangbind_elements = OrderedDict([('enable', enable), ('authentication_type', authentication_type), ('authentication_key', authentication_key), ])


class yc_authentication_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_authentication(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/interface/authentication. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration and state parameters relating to RSVP
authentication as per RFC2747
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'authentication'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_authentication_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'authentication']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/authentication/config (container)

    YANG Description: Configuration parameters relating
to authentication
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/authentication/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 authentication
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_authentication_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_authentication_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_authentication_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/authentication/state (container)

    YANG Description: State information associated
with authentication
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/authentication/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 associated
with authentication
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_subscription_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/interface/subscription/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to RSVP
subscription options
  """
  __slots__ = ('_path_helper', '_extmethods', '__subscription',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__subscription = 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="subscription", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'subscription', 'config']

  def _get_subscription(self):
    """
    Getter method for subscription, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/subscription/config/subscription (oc-types:percentage)

    YANG Description: percentage of the interface bandwidth that
RSVP can reserve
    """
    return self.__subscription
      
  def _set_subscription(self, v, load=False):
    """
    Setter method for subscription, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/subscription/config/subscription (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_subscription is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_subscription() directly.

    YANG Description: percentage of the interface bandwidth that
RSVP can reserve
    """
    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="subscription", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """subscription 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="subscription", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__subscription = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_subscription(self):
    self.__subscription = 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="subscription", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  subscription = __builtin__.property(_get_subscription, _set_subscription)


  _pyangbind_elements = OrderedDict([('subscription', subscription), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_subscription_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/interface/subscription/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to RSVP
subscription options
  """
  __slots__ = ('_path_helper', '_extmethods', '__subscription','__calculated_absolute_subscription_bw',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__subscription = 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="subscription", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__calculated_absolute_subscription_bw = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="calculated-absolute-subscription-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'subscription', 'state']

  def _get_subscription(self):
    """
    Getter method for subscription, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/subscription/state/subscription (oc-types:percentage)

    YANG Description: percentage of the interface bandwidth that
RSVP can reserve
    """
    return self.__subscription
      
  def _set_subscription(self, v, load=False):
    """
    Setter method for subscription, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/subscription/state/subscription (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_subscription is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_subscription() directly.

    YANG Description: percentage of the interface bandwidth that
RSVP can reserve
    """
    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="subscription", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """subscription 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="subscription", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__subscription = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_subscription(self):
    self.__subscription = 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="subscription", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_calculated_absolute_subscription_bw(self):
    """
    Getter method for calculated_absolute_subscription_bw, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/subscription/state/calculated_absolute_subscription_bw (uint64)

    YANG Description: The calculated absolute value of the bandwidth
which is reservable to RSVP-TE on the interface
prior to any adjustments that may be made from
external sources.
    """
    return self.__calculated_absolute_subscription_bw
      
  def _set_calculated_absolute_subscription_bw(self, v, load=False):
    """
    Setter method for calculated_absolute_subscription_bw, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/subscription/state/calculated_absolute_subscription_bw (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_calculated_absolute_subscription_bw is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_calculated_absolute_subscription_bw() directly.

    YANG Description: The calculated absolute value of the bandwidth
which is reservable to RSVP-TE on the interface
prior to any adjustments that may be made from
external sources.
    """
    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="calculated-absolute-subscription-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """calculated_absolute_subscription_bw 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="calculated-absolute-subscription-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__calculated_absolute_subscription_bw = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_calculated_absolute_subscription_bw(self):
    self.__calculated_absolute_subscription_bw = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="calculated-absolute-subscription-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)

  subscription = __builtin__.property(_get_subscription)
  calculated_absolute_subscription_bw = __builtin__.property(_get_calculated_absolute_subscription_bw)


  _pyangbind_elements = OrderedDict([('subscription', subscription), ('calculated_absolute_subscription_bw', calculated_absolute_subscription_bw), ])


class yc_subscription_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_subscription(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/interface/subscription. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Bandwidth percentage reservable by RSVP
on an interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'subscription'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_subscription_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_subscription_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'subscription']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/subscription/config (container)

    YANG Description: Configuration parameters relating to RSVP
subscription options
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/subscription/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 RSVP
subscription options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_subscription_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_subscription_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_subscription_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/subscription/state (container)

    YANG Description: State parameters relating to RSVP
subscription options
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/subscription/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 parameters relating to RSVP
subscription options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_subscription_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_subscription_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_subscription_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_protection_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/interface/protection/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration for link-protection
  """
  __slots__ = ('_path_helper', '_extmethods', '__link_protection_style_requested','__bypass_optimize_interval',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__link_protection_style_requested = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LINK_NODE_PROTECTION_REQUESTED"), is_leaf=True, yang_name="link-protection-style-requested", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__bypass_optimize_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="bypass-optimize-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'protection', 'config']

  def _get_link_protection_style_requested(self):
    """
    Getter method for link_protection_style_requested, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/protection/config/link_protection_style_requested (identityref)

    YANG Description: Style of mpls frr protection desired:
link, link-node, or unprotected
    """
    return self.__link_protection_style_requested
      
  def _set_link_protection_style_requested(self, v, load=False):
    """
    Setter method for link_protection_style_requested, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/protection/config/link_protection_style_requested (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_protection_style_requested is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_protection_style_requested() directly.

    YANG Description: Style of mpls frr protection desired:
link, link-node, or unprotected
    """
    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={'UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LINK_NODE_PROTECTION_REQUESTED"), is_leaf=True, yang_name="link-protection-style-requested", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_protection_style_requested must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LINK_NODE_PROTECTION_REQUESTED"), is_leaf=True, yang_name="link-protection-style-requested", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__link_protection_style_requested = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_protection_style_requested(self):
    self.__link_protection_style_requested = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LINK_NODE_PROTECTION_REQUESTED"), is_leaf=True, yang_name="link-protection-style-requested", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_bypass_optimize_interval(self):
    """
    Getter method for bypass_optimize_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/protection/config/bypass_optimize_interval (uint16)

    YANG Description: interval between periodic optimization
of the bypass LSPs
    """
    return self.__bypass_optimize_interval
      
  def _set_bypass_optimize_interval(self, v, load=False):
    """
    Setter method for bypass_optimize_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/protection/config/bypass_optimize_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bypass_optimize_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bypass_optimize_interval() directly.

    YANG Description: interval between periodic optimization
of the bypass LSPs
    """
    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="bypass-optimize-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bypass_optimize_interval 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="bypass-optimize-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__bypass_optimize_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bypass_optimize_interval(self):
    self.__bypass_optimize_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="bypass-optimize-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

  link_protection_style_requested = __builtin__.property(_get_link_protection_style_requested, _set_link_protection_style_requested)
  bypass_optimize_interval = __builtin__.property(_get_bypass_optimize_interval, _set_bypass_optimize_interval)


  _pyangbind_elements = OrderedDict([('link_protection_style_requested', link_protection_style_requested), ('bypass_optimize_interval', bypass_optimize_interval), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_protection_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/interface/protection/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State for link-protection
  """
  __slots__ = ('_path_helper', '_extmethods', '__link_protection_style_requested','__bypass_optimize_interval',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__link_protection_style_requested = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LINK_NODE_PROTECTION_REQUESTED"), is_leaf=True, yang_name="link-protection-style-requested", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__bypass_optimize_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="bypass-optimize-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'protection', 'state']

  def _get_link_protection_style_requested(self):
    """
    Getter method for link_protection_style_requested, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/protection/state/link_protection_style_requested (identityref)

    YANG Description: Style of mpls frr protection desired:
link, link-node, or unprotected
    """
    return self.__link_protection_style_requested
      
  def _set_link_protection_style_requested(self, v, load=False):
    """
    Setter method for link_protection_style_requested, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/protection/state/link_protection_style_requested (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_protection_style_requested is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_protection_style_requested() directly.

    YANG Description: Style of mpls frr protection desired:
link, link-node, or unprotected
    """
    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={'UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LINK_NODE_PROTECTION_REQUESTED"), is_leaf=True, yang_name="link-protection-style-requested", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_protection_style_requested must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LINK_NODE_PROTECTION_REQUESTED"), is_leaf=True, yang_name="link-protection-style-requested", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__link_protection_style_requested = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_protection_style_requested(self):
    self.__link_protection_style_requested = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LINK_NODE_PROTECTION_REQUESTED"), is_leaf=True, yang_name="link-protection-style-requested", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_bypass_optimize_interval(self):
    """
    Getter method for bypass_optimize_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/protection/state/bypass_optimize_interval (uint16)

    YANG Description: interval between periodic optimization
of the bypass LSPs
    """
    return self.__bypass_optimize_interval
      
  def _set_bypass_optimize_interval(self, v, load=False):
    """
    Setter method for bypass_optimize_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/protection/state/bypass_optimize_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bypass_optimize_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bypass_optimize_interval() directly.

    YANG Description: interval between periodic optimization
of the bypass LSPs
    """
    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="bypass-optimize-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bypass_optimize_interval 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="bypass-optimize-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__bypass_optimize_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bypass_optimize_interval(self):
    self.__bypass_optimize_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="bypass-optimize-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  link_protection_style_requested = __builtin__.property(_get_link_protection_style_requested)
  bypass_optimize_interval = __builtin__.property(_get_bypass_optimize_interval)


  _pyangbind_elements = OrderedDict([('link_protection_style_requested', link_protection_style_requested), ('bypass_optimize_interval', bypass_optimize_interval), ])


class yc_protection_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_protection(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/interface/protection. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: link-protection (NHOP) related configuration
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'protection'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_protection_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_protection_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'protection']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/protection/config (container)

    YANG Description: Configuration for link-protection
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/protection/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 for link-protection
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_protection_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_protection_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_protection_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/protection/state (container)

    YANG Description: State for link-protection
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/protection/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 for link-protection
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_protection_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_protection_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_protection_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_interface_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/interface. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: list of per-interface RSVP configurations
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id','__config','__state','__interface_ref','__bandwidth_reservations','__hellos','__authentication','__subscription','__protection',)

  _yang_name = 'interface'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__interface_ref = YANGDynClass(base=yc_interface_ref_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__bandwidth_reservations = YANGDynClass(base=yc_bandwidth_reservations_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_bandwidth_reservations, is_container='container', yang_name="bandwidth-reservations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__hellos = YANGDynClass(base=yc_hellos_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_hellos, is_container='container', yang_name="hellos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__authentication = YANGDynClass(base=yc_authentication_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_authentication, is_container='container', yang_name="authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__subscription = YANGDynClass(base=yc_subscription_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_subscription, is_container='container', yang_name="subscription", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__protection = YANGDynClass(base=yc_protection_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_protection, is_container='container', yang_name="protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/interface_id (leafref)

    YANG Description: reference to the interface-id data
    """
    return self.__interface_id
      
  def _set_interface_id(self, v, load=False):
    """
    Setter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/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 data
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/config (container)

    YANG Description: Configuration of per-interface RSVP parameters
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/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 of per-interface RSVP parameters
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state (container)

    YANG Description: Per-interface RSVP protocol and state information
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/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: Per-interface RSVP protocol and state information
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_interface_ref(self):
    """
    Getter method for interface_ref, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/interface_ref (container)

    YANG Description: Reference to an interface or subinterface
    """
    return self.__interface_ref
      
  def _set_interface_ref(self, v, load=False):
    """
    Setter method for interface_ref, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/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
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interface_ref_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_bandwidth_reservations(self):
    """
    Getter method for bandwidth_reservations, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/bandwidth_reservations (container)

    YANG Description: Enclosing container for bandwidth reservation
    """
    return self.__bandwidth_reservations
      
  def _set_bandwidth_reservations(self, v, load=False):
    """
    Setter method for bandwidth_reservations, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/bandwidth_reservations (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth_reservations is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth_reservations() directly.

    YANG Description: Enclosing container for bandwidth reservation
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_bandwidth_reservations_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_bandwidth_reservations, is_container='container', yang_name="bandwidth-reservations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth_reservations must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_bandwidth_reservations_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_bandwidth_reservations, is_container='container', yang_name="bandwidth-reservations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__bandwidth_reservations = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth_reservations(self):
    self.__bandwidth_reservations = YANGDynClass(base=yc_bandwidth_reservations_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_bandwidth_reservations, is_container='container', yang_name="bandwidth-reservations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_hellos(self):
    """
    Getter method for hellos, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/hellos (container)

    YANG Description: Top level container for RSVP hello parameters
    """
    return self.__hellos
      
  def _set_hellos(self, v, load=False):
    """
    Setter method for hellos, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/hellos (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hellos is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hellos() directly.

    YANG Description: Top level container for RSVP hello parameters
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_hellos_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_hellos, is_container='container', yang_name="hellos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hellos must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_hellos_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_hellos, is_container='container', yang_name="hellos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__hellos = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hellos(self):
    self.__hellos = YANGDynClass(base=yc_hellos_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_hellos, is_container='container', yang_name="hellos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_authentication(self):
    """
    Getter method for authentication, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/authentication (container)

    YANG Description: Configuration and state parameters relating to RSVP
authentication as per RFC2747
    """
    return self.__authentication
      
  def _set_authentication(self, v, load=False):
    """
    Setter method for authentication, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/authentication (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_authentication is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_authentication() directly.

    YANG Description: Configuration and state parameters relating to RSVP
authentication as per RFC2747
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_authentication_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_authentication, is_container='container', yang_name="authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """authentication must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_authentication_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_authentication, is_container='container', yang_name="authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__authentication = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_authentication(self):
    self.__authentication = YANGDynClass(base=yc_authentication_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_authentication, is_container='container', yang_name="authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_subscription(self):
    """
    Getter method for subscription, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/subscription (container)

    YANG Description: Bandwidth percentage reservable by RSVP
on an interface
    """
    return self.__subscription
      
  def _set_subscription(self, v, load=False):
    """
    Setter method for subscription, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/subscription (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_subscription is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_subscription() directly.

    YANG Description: Bandwidth percentage reservable by RSVP
on an interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_subscription_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_subscription, is_container='container', yang_name="subscription", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """subscription must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_subscription_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_subscription, is_container='container', yang_name="subscription", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__subscription = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_subscription(self):
    self.__subscription = YANGDynClass(base=yc_subscription_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_subscription, is_container='container', yang_name="subscription", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_protection(self):
    """
    Getter method for protection, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/protection (container)

    YANG Description: link-protection (NHOP) related configuration
    """
    return self.__protection
      
  def _set_protection(self, v, load=False):
    """
    Setter method for protection, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/protection (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_protection is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_protection() directly.

    YANG Description: link-protection (NHOP) related configuration
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_protection_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_protection, is_container='container', yang_name="protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """protection must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_protection_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_protection, is_container='container', yang_name="protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__protection = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_protection(self):
    self.__protection = YANGDynClass(base=yc_protection_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_protection, is_container='container', yang_name="protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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)
  bandwidth_reservations = __builtin__.property(_get_bandwidth_reservations, _set_bandwidth_reservations)
  hellos = __builtin__.property(_get_hellos, _set_hellos)
  authentication = __builtin__.property(_get_authentication, _set_authentication)
  subscription = __builtin__.property(_get_subscription, _set_subscription)
  protection = __builtin__.property(_get_protection, _set_protection)


  _pyangbind_elements = OrderedDict([('interface_id', interface_id), ('config', config), ('state', state), ('interface_ref', interface_ref), ('bandwidth_reservations', bandwidth_reservations), ('hellos', hellos), ('authentication', authentication), ('subscription', subscription), ('protection', protection), ])


class yc_interface_attributes_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Attributes relating to RSVP-TE enabled interfaces
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface',)

  _yang_name = 'interface-attributes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface (list)

    YANG Description: list of per-interface RSVP configurations
    """
    return self.__interface
      
  def _set_interface(self, v, load=False):
    """
    Setter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/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 per-interface RSVP configurations
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("interface_id",yc_interface_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  interface = __builtin__.property(_get_interface, _set_interface)


  _pyangbind_elements = OrderedDict([('interface', interface), ])


class yc_rsvp_te_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: RSVP-TE global signaling protocol configuration
  """
  __slots__ = ('_path_helper', '_extmethods', '__sessions','__neighbors','__global_','__interface_attributes',)

  _yang_name = 'rsvp-te'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__sessions = YANGDynClass(base=yc_sessions_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions, is_container='container', yang_name="sessions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__neighbors = YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__global_ = YANGDynClass(base=yc_global__openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__interface_attributes = YANGDynClass(base=yc_interface_attributes_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes, is_container='container', yang_name="interface-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te']

  def _get_sessions(self):
    """
    Getter method for sessions, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions (container)

    YANG Description: Enclosing container for sessions
    """
    return self.__sessions
      
  def _set_sessions(self, v, load=False):
    """
    Setter method for sessions, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sessions is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sessions() directly.

    YANG Description: Enclosing container for sessions
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_sessions_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions, is_container='container', yang_name="sessions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sessions must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_sessions_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions, is_container='container', yang_name="sessions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__sessions = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sessions(self):
    self.__sessions = YANGDynClass(base=yc_sessions_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions, is_container='container', yang_name="sessions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_neighbors(self):
    """
    Getter method for neighbors, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/neighbors (container)

    YANG Description: Configuration and state for RSVP neighbors connecting
to the device
    """
    return self.__neighbors
      
  def _set_neighbors(self, v, load=False):
    """
    Setter method for neighbors, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/neighbors (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbors is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbors() directly.

    YANG Description: Configuration and state for RSVP neighbors connecting
to the device
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbors must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__neighbors = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbors(self):
    self.__neighbors = YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_global_(self):
    """
    Getter method for global_, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global (container)

    YANG Description: Platform wide RSVP configuration and state
    """
    return self.__global_
      
  def _set_global_(self, v, load=False):
    """
    Setter method for global_, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_global_ is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_global_() directly.

    YANG Description: Platform wide RSVP configuration and state
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_global__openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """global_ must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_global__openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__global_ = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_global_(self):
    self.__global_ = YANGDynClass(base=yc_global__openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_interface_attributes(self):
    """
    Getter method for interface_attributes, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes (container)

    YANG Description: Attributes relating to RSVP-TE enabled interfaces
    """
    return self.__interface_attributes
      
  def _set_interface_attributes(self, v, load=False):
    """
    Setter method for interface_attributes, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_interface_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_interface_attributes() directly.

    YANG Description: Attributes relating to RSVP-TE enabled interfaces
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interface_attributes_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes, is_container='container', yang_name="interface-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_attributes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_interface_attributes_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes, is_container='container', yang_name="interface-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__interface_attributes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_interface_attributes(self):
    self.__interface_attributes = YANGDynClass(base=yc_interface_attributes_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes, is_container='container', yang_name="interface-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  sessions = __builtin__.property(_get_sessions, _set_sessions)
  neighbors = __builtin__.property(_get_neighbors, _set_neighbors)
  global_ = __builtin__.property(_get_global_, _set_global_)
  interface_attributes = __builtin__.property(_get_interface_attributes, _set_interface_attributes)


  _pyangbind_elements = OrderedDict([('sessions', sessions), ('neighbors', neighbors), ('global_', global_), ('interface_attributes', interface_attributes), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/global/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Global LDP configuration attributes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__lsr_id',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__lsr_id = 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}'}),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}|:))'}),], is_leaf=True, yang_name="lsr-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'global', 'config']

  def _get_lsr_id(self):
    """
    Getter method for lsr_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/config/lsr_id (oc-inet:ip-address)

    YANG Description: Global label switch router identifier
configuration.
    """
    return self.__lsr_id
      
  def _set_lsr_id(self, v, load=False):
    """
    Setter method for lsr_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/config/lsr_id (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsr_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsr_id() directly.

    YANG Description: Global label switch router identifier
configuration.
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="lsr-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsr_id must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="lsr-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)""",
        })

    self.__lsr_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsr_id(self):
    self.__lsr_id = 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}'}),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}|:))'}),], is_leaf=True, yang_name="lsr-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)

  lsr_id = __builtin__.property(_get_lsr_id, _set_lsr_id)


  _pyangbind_elements = OrderedDict([('lsr_id', lsr_id), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/global/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Global LDP state information.
  """
  __slots__ = ('_path_helper', '_extmethods', '__lsr_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__lsr_id = 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}'}),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}|:))'}),], is_leaf=True, yang_name="lsr-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'global', 'state']

  def _get_lsr_id(self):
    """
    Getter method for lsr_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/state/lsr_id (oc-inet:ip-address)

    YANG Description: Global label switch router identifier
configuration.
    """
    return self.__lsr_id
      
  def _set_lsr_id(self, v, load=False):
    """
    Setter method for lsr_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/state/lsr_id (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsr_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsr_id() directly.

    YANG Description: Global label switch router identifier
configuration.
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="lsr-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsr_id must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="lsr-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__lsr_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsr_id(self):
    self.__lsr_id = 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}'}),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}|:))'}),], is_leaf=True, yang_name="lsr-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)

  lsr_id = __builtin__.property(_get_lsr_id)


  _pyangbind_elements = OrderedDict([('lsr_id', lsr_id), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global_graceful_restart_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/global/graceful-restart/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: LDP graceful-restart configuration attributes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__reconnect_time','__recovery_time','__forwarding_holdtime','__helper_enable',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__reconnect_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="reconnect-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__recovery_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="recovery-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__forwarding_holdtime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="forwarding-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__helper_enable = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'global', 'graceful-restart', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/config/enabled (boolean)

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_reconnect_time(self):
    """
    Getter method for reconnect_time, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/config/reconnect_time (uint16)

    YANG Description: Interval for which the remote LDP peers
will wait for the local node to reconnect after a
failure
    """
    return self.__reconnect_time
      
  def _set_reconnect_time(self, v, load=False):
    """
    Setter method for reconnect_time, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/config/reconnect_time (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_reconnect_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_reconnect_time() directly.

    YANG Description: Interval for which the remote LDP peers
will wait for the local node to reconnect after a
failure
    """
    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="reconnect-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """reconnect_time 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="reconnect-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__reconnect_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_reconnect_time(self):
    self.__reconnect_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="reconnect-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_recovery_time(self):
    """
    Getter method for recovery_time, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/config/recovery_time (uint16)

    YANG Description: Interval used to specify the time for the remote
peer to maintain the MPLS forwarding state after
the local node has succesfully reconnected
    """
    return self.__recovery_time
      
  def _set_recovery_time(self, v, load=False):
    """
    Setter method for recovery_time, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/config/recovery_time (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_recovery_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_recovery_time() directly.

    YANG Description: Interval used to specify the time for the remote
peer to maintain the MPLS forwarding state after
the local node has succesfully reconnected
    """
    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="recovery-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """recovery_time 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="recovery-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__recovery_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_recovery_time(self):
    self.__recovery_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="recovery-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_forwarding_holdtime(self):
    """
    Getter method for forwarding_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/config/forwarding_holdtime (uint16)

    YANG Description: Time that defines the interval for keeping the
node in recovery mode.
    """
    return self.__forwarding_holdtime
      
  def _set_forwarding_holdtime(self, v, load=False):
    """
    Setter method for forwarding_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/config/forwarding_holdtime (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_forwarding_holdtime is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_forwarding_holdtime() directly.

    YANG Description: Time that defines the interval for keeping the
node in recovery mode.
    """
    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="forwarding-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """forwarding_holdtime 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="forwarding-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__forwarding_holdtime = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_forwarding_holdtime(self):
    self.__forwarding_holdtime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="forwarding-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_helper_enable(self):
    """
    Getter method for helper_enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/config/helper_enable (boolean)

    YANG Description: Enables the graceful restart helper for LDP.
    """
    return self.__helper_enable
      
  def _set_helper_enable(self, v, load=False):
    """
    Setter method for helper_enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/config/helper_enable (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_helper_enable is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_helper_enable() directly.

    YANG Description: Enables the graceful restart helper for LDP.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="helper-enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """helper_enable must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__helper_enable = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_helper_enable(self):
    self.__helper_enable = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)
  reconnect_time = __builtin__.property(_get_reconnect_time, _set_reconnect_time)
  recovery_time = __builtin__.property(_get_recovery_time, _set_recovery_time)
  forwarding_holdtime = __builtin__.property(_get_forwarding_holdtime, _set_forwarding_holdtime)
  helper_enable = __builtin__.property(_get_helper_enable, _set_helper_enable)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('reconnect_time', reconnect_time), ('recovery_time', recovery_time), ('forwarding_holdtime', forwarding_holdtime), ('helper_enable', helper_enable), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global_graceful_restart_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/global/graceful-restart/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: LDP graceful-restart state attributes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__reconnect_time','__recovery_time','__forwarding_holdtime','__helper_enable',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__reconnect_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="reconnect-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__recovery_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="recovery-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__forwarding_holdtime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="forwarding-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__helper_enable = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'global', 'graceful-restart', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/state/enabled (boolean)

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_reconnect_time(self):
    """
    Getter method for reconnect_time, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/state/reconnect_time (uint16)

    YANG Description: Interval for which the remote LDP peers
will wait for the local node to reconnect after a
failure
    """
    return self.__reconnect_time
      
  def _set_reconnect_time(self, v, load=False):
    """
    Setter method for reconnect_time, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/state/reconnect_time (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_reconnect_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_reconnect_time() directly.

    YANG Description: Interval for which the remote LDP peers
will wait for the local node to reconnect after a
failure
    """
    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="reconnect-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """reconnect_time 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="reconnect-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__reconnect_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_reconnect_time(self):
    self.__reconnect_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="reconnect-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_recovery_time(self):
    """
    Getter method for recovery_time, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/state/recovery_time (uint16)

    YANG Description: Interval used to specify the time for the remote
peer to maintain the MPLS forwarding state after
the local node has succesfully reconnected
    """
    return self.__recovery_time
      
  def _set_recovery_time(self, v, load=False):
    """
    Setter method for recovery_time, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/state/recovery_time (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_recovery_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_recovery_time() directly.

    YANG Description: Interval used to specify the time for the remote
peer to maintain the MPLS forwarding state after
the local node has succesfully reconnected
    """
    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="recovery-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """recovery_time 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="recovery-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__recovery_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_recovery_time(self):
    self.__recovery_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="recovery-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_forwarding_holdtime(self):
    """
    Getter method for forwarding_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/state/forwarding_holdtime (uint16)

    YANG Description: Time that defines the interval for keeping the
node in recovery mode.
    """
    return self.__forwarding_holdtime
      
  def _set_forwarding_holdtime(self, v, load=False):
    """
    Setter method for forwarding_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/state/forwarding_holdtime (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_forwarding_holdtime is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_forwarding_holdtime() directly.

    YANG Description: Time that defines the interval for keeping the
node in recovery mode.
    """
    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="forwarding-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """forwarding_holdtime 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="forwarding-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__forwarding_holdtime = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_forwarding_holdtime(self):
    self.__forwarding_holdtime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="forwarding-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_helper_enable(self):
    """
    Getter method for helper_enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/state/helper_enable (boolean)

    YANG Description: Enables the graceful restart helper for LDP.
    """
    return self.__helper_enable
      
  def _set_helper_enable(self, v, load=False):
    """
    Setter method for helper_enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/state/helper_enable (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_helper_enable is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_helper_enable() directly.

    YANG Description: Enables the graceful restart helper for LDP.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="helper-enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """helper_enable must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__helper_enable = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_helper_enable(self):
    self.__helper_enable = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  enabled = __builtin__.property(_get_enabled)
  reconnect_time = __builtin__.property(_get_reconnect_time)
  recovery_time = __builtin__.property(_get_recovery_time)
  forwarding_holdtime = __builtin__.property(_get_forwarding_holdtime)
  helper_enable = __builtin__.property(_get_helper_enable)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('reconnect_time', reconnect_time), ('recovery_time', recovery_time), ('forwarding_holdtime', forwarding_holdtime), ('helper_enable', helper_enable), ])


class yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global_graceful_restart(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/global/graceful-restart. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top container for LDP graceful-restart attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'graceful-restart'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'global', 'graceful-restart']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/config (container)

    YANG Description: LDP graceful-restart configuration attributes.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/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: LDP graceful-restart configuration attributes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/state (container)

    YANG Description: LDP graceful-restart state attributes.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/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: LDP graceful-restart state attributes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global_authentication_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/global/authentication/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration of LDP authentication attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__enable','__authentication_key',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__authentication_key = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'global', 'authentication', 'config']

  def _get_enable(self):
    """
    Getter method for enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/authentication/config/enable (boolean)

    YANG Description: Enables LDP authentication on the node.
    """
    return self.__enable
      
  def _set_enable(self, v, load=False):
    """
    Setter method for enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/authentication/config/enable (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable() directly.

    YANG Description: Enables LDP authentication on the node.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable 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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enable = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable(self):
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_authentication_key(self):
    """
    Getter method for authentication_key, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/authentication/config/authentication_key (oc-types:routing-password)

    YANG Description: authenticate LDP signaling
messages
    """
    return self.__authentication_key
      
  def _set_authentication_key(self, v, load=False):
    """
    Setter method for authentication_key, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/authentication/config/authentication_key (oc-types:routing-password)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_authentication_key is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_authentication_key() directly.

    YANG Description: authenticate LDP signaling
messages
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """authentication_key must be of a type compatible with oc-types:routing-password""",
          'defined-type': "oc-types:routing-password",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)""",
        })

    self.__authentication_key = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_authentication_key(self):
    self.__authentication_key = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)

  enable = __builtin__.property(_get_enable, _set_enable)
  authentication_key = __builtin__.property(_get_authentication_key, _set_authentication_key)


  _pyangbind_elements = OrderedDict([('enable', enable), ('authentication_key', authentication_key), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global_authentication_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/global/authentication/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: LDP authentication state.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enable','__authentication_key',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__authentication_key = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'global', 'authentication', 'state']

  def _get_enable(self):
    """
    Getter method for enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/authentication/state/enable (boolean)

    YANG Description: Enables LDP authentication on the node.
    """
    return self.__enable
      
  def _set_enable(self, v, load=False):
    """
    Setter method for enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/authentication/state/enable (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable() directly.

    YANG Description: Enables LDP authentication on the node.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable 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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enable = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable(self):
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_authentication_key(self):
    """
    Getter method for authentication_key, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/authentication/state/authentication_key (oc-types:routing-password)

    YANG Description: authenticate LDP signaling
messages
    """
    return self.__authentication_key
      
  def _set_authentication_key(self, v, load=False):
    """
    Setter method for authentication_key, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/authentication/state/authentication_key (oc-types:routing-password)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_authentication_key is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_authentication_key() directly.

    YANG Description: authenticate LDP signaling
messages
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """authentication_key must be of a type compatible with oc-types:routing-password""",
          'defined-type': "oc-types:routing-password",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=False)""",
        })

    self.__authentication_key = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_authentication_key(self):
    self.__authentication_key = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=False)

  enable = __builtin__.property(_get_enable)
  authentication_key = __builtin__.property(_get_authentication_key)


  _pyangbind_elements = OrderedDict([('enable', enable), ('authentication_key', authentication_key), ])


class yc_authentication_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global_authentication(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/global/authentication. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Global LDP authentication
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'authentication'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global_authentication_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'global', 'authentication']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/authentication/config (container)

    YANG Description: Configuration of LDP authentication attributes
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/authentication/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 of LDP authentication attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global_authentication_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global_authentication_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global_authentication_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/authentication/state (container)

    YANG Description: LDP authentication state.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/authentication/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: LDP authentication state.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_global__openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/global. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Platform wide LDP configuration and state
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__graceful_restart','__authentication',)

  _yang_name = 'global'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__graceful_restart = YANGDynClass(base=yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__authentication = YANGDynClass(base=yc_authentication_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global_authentication, is_container='container', yang_name="authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'global']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/config (container)

    YANG Description: Global LDP configuration attributes.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/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: Global LDP configuration attributes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/state (container)

    YANG Description: Global LDP state information.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/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: Global LDP state information.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_graceful_restart(self):
    """
    Getter method for graceful_restart, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart (container)

    YANG Description: Top container for LDP graceful-restart attributes
    """
    return self.__graceful_restart
      
  def _set_graceful_restart(self, v, load=False):
    """
    Setter method for graceful_restart, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_graceful_restart is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_graceful_restart() directly.

    YANG Description: Top container for LDP graceful-restart attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """graceful_restart must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__graceful_restart = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_graceful_restart(self):
    self.__graceful_restart = YANGDynClass(base=yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_authentication(self):
    """
    Getter method for authentication, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/authentication (container)

    YANG Description: Global LDP authentication
    """
    return self.__authentication
      
  def _set_authentication(self, v, load=False):
    """
    Setter method for authentication, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/authentication (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_authentication is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_authentication() directly.

    YANG Description: Global LDP authentication
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_authentication_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global_authentication, is_container='container', yang_name="authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """authentication must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_authentication_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global_authentication, is_container='container', yang_name="authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__authentication = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_authentication(self):
    self.__authentication = YANGDynClass(base=yc_authentication_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global_authentication, is_container='container', yang_name="authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  graceful_restart = __builtin__.property(_get_graceful_restart, _set_graceful_restart)
  authentication = __builtin__.property(_get_authentication, _set_authentication)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('graceful_restart', graceful_restart), ('authentication', authentication), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/interface-attributes/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration of per-interface LDP parameters
  """
  __slots__ = ('_path_helper', '_extmethods', '__hello_holdtime','__hello_interval',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__hello_holdtime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'interface-attributes', 'config']

  def _get_hello_holdtime(self):
    """
    Getter method for hello_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/config/hello_holdtime (uint16)

    YANG Description: Defines the time for which a neighbor adjacency will
be kept by the router while it waits for a new link
Hello message.
    """
    return self.__hello_holdtime
      
  def _set_hello_holdtime(self, v, load=False):
    """
    Setter method for hello_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/config/hello_holdtime (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_holdtime is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_holdtime() directly.

    YANG Description: Defines the time for which a neighbor adjacency will
be kept by the router while it waits for a new link
Hello message.
    """
    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="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_holdtime 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="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__hello_holdtime = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_holdtime(self):
    self.__hello_holdtime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_hello_interval(self):
    """
    Getter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/config/hello_interval (uint16)

    YANG Description: Defines the interval for sending Hello messages on
each link LDP adjacency.
    """
    return self.__hello_interval
      
  def _set_hello_interval(self, v, load=False):
    """
    Setter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/config/hello_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_interval() directly.

    YANG Description: Defines the interval for sending Hello messages on
each link LDP adjacency.
    """
    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="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_interval 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="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__hello_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_interval(self):
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

  hello_holdtime = __builtin__.property(_get_hello_holdtime, _set_hello_holdtime)
  hello_interval = __builtin__.property(_get_hello_interval, _set_hello_interval)


  _pyangbind_elements = OrderedDict([('hello_holdtime', hello_holdtime), ('hello_interval', hello_interval), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/interface-attributes/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Per-interface LDP protocol and state information
  """
  __slots__ = ('_path_helper', '_extmethods', '__hello_holdtime','__hello_interval',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__hello_holdtime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'interface-attributes', 'state']

  def _get_hello_holdtime(self):
    """
    Getter method for hello_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/state/hello_holdtime (uint16)

    YANG Description: Defines the time for which a neighbor adjacency will
be kept by the router while it waits for a new link
Hello message.
    """
    return self.__hello_holdtime
      
  def _set_hello_holdtime(self, v, load=False):
    """
    Setter method for hello_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/state/hello_holdtime (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_holdtime is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_holdtime() directly.

    YANG Description: Defines the time for which a neighbor adjacency will
be kept by the router while it waits for a new link
Hello message.
    """
    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="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_holdtime 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="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__hello_holdtime = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_holdtime(self):
    self.__hello_holdtime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_hello_interval(self):
    """
    Getter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/state/hello_interval (uint16)

    YANG Description: Defines the interval for sending Hello messages on
each link LDP adjacency.
    """
    return self.__hello_interval
      
  def _set_hello_interval(self, v, load=False):
    """
    Setter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/state/hello_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_interval() directly.

    YANG Description: Defines the interval for sending Hello messages on
each link LDP adjacency.
    """
    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="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_interval 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="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__hello_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_interval(self):
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  hello_holdtime = __builtin__.property(_get_hello_holdtime)
  hello_interval = __builtin__.property(_get_hello_interval)


  _pyangbind_elements = OrderedDict([('hello_holdtime', hello_holdtime), ('hello_interval', hello_interval), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/interface-attributes/interfaces/interface/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration of per-interface LDP parameters
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id','__hello_holdtime','__hello_interval',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=True)
    self.__hello_holdtime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'interface-attributes', 'interfaces', 'interface', 'config']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/config/interface_id (oc-if:interface-id)

    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 /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/config/interface_id (oc-if:interface-id)
    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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_id must be of a type compatible with oc-if:interface-id""",
          'defined-type': "oc-if:interface-id",
          '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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=True)


  def _get_hello_holdtime(self):
    """
    Getter method for hello_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/config/hello_holdtime (uint16)

    YANG Description: Defines the time for which a neighbor adjacency will
be kept by the router while it waits for a new link
Hello message.
    """
    return self.__hello_holdtime
      
  def _set_hello_holdtime(self, v, load=False):
    """
    Setter method for hello_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/config/hello_holdtime (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_holdtime is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_holdtime() directly.

    YANG Description: Defines the time for which a neighbor adjacency will
be kept by the router while it waits for a new link
Hello message.
    """
    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="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_holdtime 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="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__hello_holdtime = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_holdtime(self):
    self.__hello_holdtime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_hello_interval(self):
    """
    Getter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/config/hello_interval (uint16)

    YANG Description: Defines the interval for sending Hello messages on
each link LDP adjacency.
    """
    return self.__hello_interval
      
  def _set_hello_interval(self, v, load=False):
    """
    Setter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/config/hello_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_interval() directly.

    YANG Description: Defines the interval for sending Hello messages on
each link LDP adjacency.
    """
    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="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_interval 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="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__hello_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_interval(self):
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

  interface_id = __builtin__.property(_get_interface_id, _set_interface_id)
  hello_holdtime = __builtin__.property(_get_hello_holdtime, _set_hello_holdtime)
  hello_interval = __builtin__.property(_get_hello_interval, _set_hello_interval)


  _pyangbind_elements = OrderedDict([('interface_id', interface_id), ('hello_holdtime', hello_holdtime), ('hello_interval', hello_interval), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/interface-attributes/interfaces/interface/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Per-interface LDP protocol and state information
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id','__hello_holdtime','__hello_interval',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=False)
    self.__hello_holdtime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'interface-attributes', 'interfaces', 'interface', 'state']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/state/interface_id (oc-if:interface-id)

    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 /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/state/interface_id (oc-if:interface-id)
    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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_id must be of a type compatible with oc-if:interface-id""",
          'defined-type': "oc-if:interface-id",
          '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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=False)


  def _get_hello_holdtime(self):
    """
    Getter method for hello_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/state/hello_holdtime (uint16)

    YANG Description: Defines the time for which a neighbor adjacency will
be kept by the router while it waits for a new link
Hello message.
    """
    return self.__hello_holdtime
      
  def _set_hello_holdtime(self, v, load=False):
    """
    Setter method for hello_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/state/hello_holdtime (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_holdtime is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_holdtime() directly.

    YANG Description: Defines the time for which a neighbor adjacency will
be kept by the router while it waits for a new link
Hello message.
    """
    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="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_holdtime 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="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__hello_holdtime = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_holdtime(self):
    self.__hello_holdtime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_hello_interval(self):
    """
    Getter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/state/hello_interval (uint16)

    YANG Description: Defines the interval for sending Hello messages on
each link LDP adjacency.
    """
    return self.__hello_interval
      
  def _set_hello_interval(self, v, load=False):
    """
    Setter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/state/hello_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_interval() directly.

    YANG Description: Defines the interval for sending Hello messages on
each link LDP adjacency.
    """
    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="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_interval 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="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__hello_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_interval(self):
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  interface_id = __builtin__.property(_get_interface_id)
  hello_holdtime = __builtin__.property(_get_hello_holdtime)
  hello_interval = __builtin__.property(_get_hello_interval)


  _pyangbind_elements = OrderedDict([('interface_id', interface_id), ('hello_holdtime', hello_holdtime), ('hello_interval', hello_interval), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_interface_ref_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/interface-attributes/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'interface-attributes', 'interfaces', 'interface', 'interface-ref', 'config']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/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 /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/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 /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_interface_ref_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/interface-attributes/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'interface-attributes', 'interfaces', 'interface', 'interface-ref', 'state']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/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 /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/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 /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_interface_ref(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/interface-attributes/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
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'interface-ref'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'interface-attributes', 'interfaces', 'interface', 'interface-ref']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/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 /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/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 /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_address_families_address_family_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/interface-attributes/interfaces/interface/address-families/address-family/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration attributes related to address-families
for LDP.
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi_name','__enabled',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ldp:mpls-ldp-afi', is_config=True)
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'interface-attributes', 'interfaces', 'interface', 'address-families', 'address-family', 'config']

  def _get_afi_name(self):
    """
    Getter method for afi_name, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/address_families/address_family/config/afi_name (oc-ldp:mpls-ldp-afi)

    YANG Description: Adress-family name atttibute (IPv4, IPv6).
    """
    return self.__afi_name
      
  def _set_afi_name(self, v, load=False):
    """
    Setter method for afi_name, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/address_families/address_family/config/afi_name (oc-ldp:mpls-ldp-afi)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_name() directly.

    YANG Description: Adress-family name atttibute (IPv4, IPv6).
    """
    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': {}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ldp:mpls-ldp-afi', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_name must be of a type compatible with oc-ldp:mpls-ldp-afi""",
          'defined-type': "oc-ldp:mpls-ldp-afi",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ldp:mpls-ldp-afi', is_config=True)""",
        })

    self.__afi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_name(self):
    self.__afi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ldp:mpls-ldp-afi', is_config=True)


  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/address_families/address_family/config/enabled (boolean)

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/address_families/address_family/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  afi_name = __builtin__.property(_get_afi_name, _set_afi_name)
  enabled = __builtin__.property(_get_enabled, _set_enabled)


  _pyangbind_elements = OrderedDict([('afi_name', afi_name), ('enabled', enabled), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_address_families_address_family_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/interface-attributes/interfaces/interface/address-families/address-family/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State attributes related to address-families for LDP.
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi_name','__enabled',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ldp:mpls-ldp-afi', is_config=False)
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'interface-attributes', 'interfaces', 'interface', 'address-families', 'address-family', 'state']

  def _get_afi_name(self):
    """
    Getter method for afi_name, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/address_families/address_family/state/afi_name (oc-ldp:mpls-ldp-afi)

    YANG Description: Adress-family name atttibute (IPv4, IPv6).
    """
    return self.__afi_name
      
  def _set_afi_name(self, v, load=False):
    """
    Setter method for afi_name, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/address_families/address_family/state/afi_name (oc-ldp:mpls-ldp-afi)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_name() directly.

    YANG Description: Adress-family name atttibute (IPv4, IPv6).
    """
    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': {}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ldp:mpls-ldp-afi', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_name must be of a type compatible with oc-ldp:mpls-ldp-afi""",
          'defined-type': "oc-ldp:mpls-ldp-afi",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ldp:mpls-ldp-afi', is_config=False)""",
        })

    self.__afi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_name(self):
    self.__afi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ldp:mpls-ldp-afi', is_config=False)


  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/address_families/address_family/state/enabled (boolean)

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/address_families/address_family/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  afi_name = __builtin__.property(_get_afi_name)
  enabled = __builtin__.property(_get_enabled)


  _pyangbind_elements = OrderedDict([('afi_name', afi_name), ('enabled', enabled), ])


class yc_address_family_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_address_families_address_family(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/interface-attributes/interfaces/interface/address-families/address-family. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List for attributes related to address-families for LDP.
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi_name','__config','__state',)

  _yang_name = 'address-family'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_address_families_address_family_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_address_families_address_family_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'interface-attributes', 'interfaces', 'interface', 'address-families', 'address-family']

  def _get_afi_name(self):
    """
    Getter method for afi_name, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/address_families/address_family/afi_name (leafref)

    YANG Description: Adress-family name atttibute (IPv4, IPv6).
    """
    return self.__afi_name
      
  def _set_afi_name(self, v, load=False):
    """
    Setter method for afi_name, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/address_families/address_family/afi_name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_name() directly.

    YANG Description: Adress-family name atttibute (IPv4, IPv6).
    """
    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="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__afi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_name(self):
    self.__afi_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/address_families/address_family/config (container)

    YANG Description: Configuration attributes related to address-families
for LDP.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/address_families/address_family/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 related to address-families
for LDP.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_address_families_address_family_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_address_families_address_family_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_address_families_address_family_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/address_families/address_family/state (container)

    YANG Description: State attributes related to address-families for LDP.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/address_families/address_family/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 related to address-families for LDP.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_address_families_address_family_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_address_families_address_family_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_address_families_address_family_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  afi_name = __builtin__.property(_get_afi_name, _set_afi_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('afi_name', afi_name), ('config', config), ('state', state), ])


class yc_address_families_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_address_families(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/interface-attributes/interfaces/interface/address-families. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top container comprising the adress families
attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__address_family',)

  _yang_name = 'address-families'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__address_family = YANGDynClass(base=YANGListType("afi_name",yc_address_family_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_address_families_address_family, yang_name="address-family", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-name', extensions=None), is_container='list', yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'interface-attributes', 'interfaces', 'interface', 'address-families']

  def _get_address_family(self):
    """
    Getter method for address_family, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/address_families/address_family (list)

    YANG Description: List for attributes related to address-families for LDP.
    """
    return self.__address_family
      
  def _set_address_family(self, v, load=False):
    """
    Setter method for address_family, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/address_families/address_family (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address_family is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address_family() directly.

    YANG Description: List for attributes related to address-families for LDP.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("afi_name",yc_address_family_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_address_families_address_family, yang_name="address-family", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-name', extensions=None), is_container='list', yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address_family must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("afi_name",yc_address_family_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_address_families_address_family, yang_name="address-family", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-name', extensions=None), is_container='list', yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__address_family = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address_family(self):
    self.__address_family = YANGDynClass(base=YANGListType("afi_name",yc_address_family_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_address_families_address_family, yang_name="address-family", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-name', extensions=None), is_container='list', yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  address_family = __builtin__.property(_get_address_family, _set_address_family)


  _pyangbind_elements = OrderedDict([('address_family', address_family), ])


class yc_interface_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/interface-attributes/interfaces/interface. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: list of per-interface LDP configurations
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id','__config','__state','__interface_ref','__address_families',)

  _yang_name = 'interface'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__interface_ref = YANGDynClass(base=yc_interface_ref_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__address_families = YANGDynClass(base=yc_address_families_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_address_families, is_container='container', yang_name="address-families", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'interface-attributes', 'interfaces', 'interface']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/interface_id (leafref)

    YANG Description: reference to the interface-id data
    """
    return self.__interface_id
      
  def _set_interface_id(self, v, load=False):
    """
    Setter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/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 data
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/config (container)

    YANG Description: Configuration of per-interface LDP parameters
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/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 of per-interface LDP parameters
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/state (container)

    YANG Description: Per-interface LDP protocol and state information
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/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: Per-interface LDP protocol and state information
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_interface_ref(self):
    """
    Getter method for interface_ref, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/interface_ref (container)

    YANG Description: Reference to an interface or subinterface
    """
    return self.__interface_ref
      
  def _set_interface_ref(self, v, load=False):
    """
    Setter method for interface_ref, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/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
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interface_ref_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_address_families(self):
    """
    Getter method for address_families, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/address_families (container)

    YANG Description: Top container comprising the adress families
attributes
    """
    return self.__address_families
      
  def _set_address_families(self, v, load=False):
    """
    Setter method for address_families, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/address_families (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address_families is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address_families() directly.

    YANG Description: Top container comprising the adress families
attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_address_families_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_address_families, is_container='container', yang_name="address-families", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address_families must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_address_families_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_address_families, is_container='container', yang_name="address-families", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__address_families = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address_families(self):
    self.__address_families = YANGDynClass(base=yc_address_families_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_address_families, is_container='container', yang_name="address-families", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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)
  address_families = __builtin__.property(_get_address_families, _set_address_families)


  _pyangbind_elements = OrderedDict([('interface_id', interface_id), ('config', config), ('state', state), ('interface_ref', interface_ref), ('address_families', address_families), ])


class yc_interfaces_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/interface-attributes/interfaces. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Container aggregating all interfaces and their
LDP-specific attributes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface',)

  _yang_name = 'interfaces'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'interface-attributes', 'interfaces']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface (list)

    YANG Description: list of per-interface LDP configurations
    """
    return self.__interface
      
  def _set_interface(self, v, load=False):
    """
    Setter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/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 per-interface LDP configurations
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("interface_id",yc_interface_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  interface = __builtin__.property(_get_interface, _set_interface)


  _pyangbind_elements = OrderedDict([('interface', interface), ])


class yc_interface_attributes_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/interface-attributes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Container including attributes for LDP-enabled
interfaces
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__interfaces',)

  _yang_name = 'interface-attributes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__interfaces = YANGDynClass(base=yc_interfaces_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'interface-attributes']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/config (container)

    YANG Description: Configuration of per-interface LDP parameters
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/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 of per-interface LDP parameters
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/state (container)

    YANG Description: Per-interface LDP protocol and state information
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/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: Per-interface LDP protocol and state information
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_interfaces(self):
    """
    Getter method for interfaces, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces (container)

    YANG Description: Container aggregating all interfaces and their
LDP-specific attributes.
    """
    return self.__interfaces
      
  def _set_interfaces(self, v, load=False):
    """
    Setter method for interfaces, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/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: Container aggregating all interfaces and their
LDP-specific attributes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interfaces_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  interfaces = __builtin__.property(_get_interfaces, _set_interfaces)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('interfaces', interfaces), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/targeted/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration attributes related to targeted LDP.
  """
  __slots__ = ('_path_helper', '_extmethods', '__hello_holdtime','__hello_interval','__hello_accept',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__hello_holdtime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__hello_accept = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="hello-accept", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'targeted', 'config']

  def _get_hello_holdtime(self):
    """
    Getter method for hello_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/config/hello_holdtime (uint16)

    YANG Description: Defines the time for which a neighbor adjacency will
be kept by the router while it waits for a new link
Hello message.
    """
    return self.__hello_holdtime
      
  def _set_hello_holdtime(self, v, load=False):
    """
    Setter method for hello_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/config/hello_holdtime (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_holdtime is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_holdtime() directly.

    YANG Description: Defines the time for which a neighbor adjacency will
be kept by the router while it waits for a new link
Hello message.
    """
    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="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_holdtime 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="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__hello_holdtime = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_holdtime(self):
    self.__hello_holdtime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_hello_interval(self):
    """
    Getter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/config/hello_interval (uint16)

    YANG Description: Defines the interval for sending Hello messages on
each link LDP adjacency.
    """
    return self.__hello_interval
      
  def _set_hello_interval(self, v, load=False):
    """
    Setter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/config/hello_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_interval() directly.

    YANG Description: Defines the interval for sending Hello messages on
each link LDP adjacency.
    """
    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="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_interval 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="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__hello_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_interval(self):
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_hello_accept(self):
    """
    Getter method for hello_accept, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/config/hello_accept (boolean)

    YANG Description: Enables or disables the acceptance of targeted LDP
hello messages.
    """
    return self.__hello_accept
      
  def _set_hello_accept(self, v, load=False):
    """
    Setter method for hello_accept, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/config/hello_accept (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_accept is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_accept() directly.

    YANG Description: Enables or disables the acceptance of targeted LDP
hello messages.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="hello-accept", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_accept must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="hello-accept", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__hello_accept = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_accept(self):
    self.__hello_accept = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="hello-accept", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  hello_holdtime = __builtin__.property(_get_hello_holdtime, _set_hello_holdtime)
  hello_interval = __builtin__.property(_get_hello_interval, _set_hello_interval)
  hello_accept = __builtin__.property(_get_hello_accept, _set_hello_accept)


  _pyangbind_elements = OrderedDict([('hello_holdtime', hello_holdtime), ('hello_interval', hello_interval), ('hello_accept', hello_accept), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/targeted/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State attributes related to targeted LDP.
  """
  __slots__ = ('_path_helper', '_extmethods', '__hello_holdtime','__hello_interval','__hello_accept',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__hello_holdtime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__hello_accept = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="hello-accept", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'targeted', 'state']

  def _get_hello_holdtime(self):
    """
    Getter method for hello_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/state/hello_holdtime (uint16)

    YANG Description: Defines the time for which a neighbor adjacency will
be kept by the router while it waits for a new link
Hello message.
    """
    return self.__hello_holdtime
      
  def _set_hello_holdtime(self, v, load=False):
    """
    Setter method for hello_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/state/hello_holdtime (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_holdtime is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_holdtime() directly.

    YANG Description: Defines the time for which a neighbor adjacency will
be kept by the router while it waits for a new link
Hello message.
    """
    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="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_holdtime 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="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__hello_holdtime = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_holdtime(self):
    self.__hello_holdtime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_hello_interval(self):
    """
    Getter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/state/hello_interval (uint16)

    YANG Description: Defines the interval for sending Hello messages on
each link LDP adjacency.
    """
    return self.__hello_interval
      
  def _set_hello_interval(self, v, load=False):
    """
    Setter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/state/hello_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_interval() directly.

    YANG Description: Defines the interval for sending Hello messages on
each link LDP adjacency.
    """
    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="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_interval 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="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__hello_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_interval(self):
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_hello_accept(self):
    """
    Getter method for hello_accept, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/state/hello_accept (boolean)

    YANG Description: Enables or disables the acceptance of targeted LDP
hello messages.
    """
    return self.__hello_accept
      
  def _set_hello_accept(self, v, load=False):
    """
    Setter method for hello_accept, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/state/hello_accept (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_accept is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_accept() directly.

    YANG Description: Enables or disables the acceptance of targeted LDP
hello messages.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="hello-accept", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_accept must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="hello-accept", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__hello_accept = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_accept(self):
    self.__hello_accept = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="hello-accept", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  hello_holdtime = __builtin__.property(_get_hello_holdtime)
  hello_interval = __builtin__.property(_get_hello_interval)
  hello_accept = __builtin__.property(_get_hello_accept)


  _pyangbind_elements = OrderedDict([('hello_holdtime', hello_holdtime), ('hello_interval', hello_interval), ('hello_accept', hello_accept), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/targeted/address-families/address-family/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Address-family configuration for targeted LDP
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi_name',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ldp:mpls-ldp-afi', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'targeted', 'address-families', 'address-family', 'config']

  def _get_afi_name(self):
    """
    Getter method for afi_name, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/config/afi_name (oc-ldp:mpls-ldp-afi)

    YANG Description: Adress-family name atttibute (IPv4, IPv6).
    """
    return self.__afi_name
      
  def _set_afi_name(self, v, load=False):
    """
    Setter method for afi_name, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/config/afi_name (oc-ldp:mpls-ldp-afi)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_name() directly.

    YANG Description: Adress-family name atttibute (IPv4, IPv6).
    """
    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': {}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ldp:mpls-ldp-afi', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_name must be of a type compatible with oc-ldp:mpls-ldp-afi""",
          'defined-type': "oc-ldp:mpls-ldp-afi",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ldp:mpls-ldp-afi', is_config=True)""",
        })

    self.__afi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_name(self):
    self.__afi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ldp:mpls-ldp-afi', is_config=True)

  afi_name = __builtin__.property(_get_afi_name, _set_afi_name)


  _pyangbind_elements = OrderedDict([('afi_name', afi_name), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/targeted/address-families/address-family/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Address-family state for targeted LDP
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi_name',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ldp:mpls-ldp-afi', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'targeted', 'address-families', 'address-family', 'state']

  def _get_afi_name(self):
    """
    Getter method for afi_name, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/state/afi_name (oc-ldp:mpls-ldp-afi)

    YANG Description: Adress-family name atttibute (IPv4, IPv6).
    """
    return self.__afi_name
      
  def _set_afi_name(self, v, load=False):
    """
    Setter method for afi_name, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/state/afi_name (oc-ldp:mpls-ldp-afi)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_name() directly.

    YANG Description: Adress-family name atttibute (IPv4, IPv6).
    """
    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': {}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ldp:mpls-ldp-afi', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_name must be of a type compatible with oc-ldp:mpls-ldp-afi""",
          'defined-type': "oc-ldp:mpls-ldp-afi",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ldp:mpls-ldp-afi', is_config=False)""",
        })

    self.__afi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_name(self):
    self.__afi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ldp:mpls-ldp-afi', is_config=False)

  afi_name = __builtin__.property(_get_afi_name)


  _pyangbind_elements = OrderedDict([('afi_name', afi_name), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_targets_target_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/targeted/address-families/address-family/targets/target/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters of a targeted LDP
adjacency
  """
  __slots__ = ('_path_helper', '_extmethods', '__remote_address','__local_address','__enabled','__hello_holdtime','__hello_interval',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__remote_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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    self.__local_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}'}),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}|:))'}),], is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__hello_holdtime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'targeted', 'address-families', 'address-family', 'targets', 'target', 'config']

  def _get_remote_address(self):
    """
    Getter method for remote_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/config/remote_address (oc-inet:ip-address)

    YANG Description: Configuration of neighbor address of the
targeted LDP adjacency
    """
    return self.__remote_address
      
  def _set_remote_address(self, v, load=False):
    """
    Setter method for remote_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/config/remote_address (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_remote_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_remote_address() directly.

    YANG Description: Configuration of neighbor address of the
targeted LDP adjacency
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """remote_address must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)""",
        })

    self.__remote_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_remote_address(self):
    self.__remote_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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)


  def _get_local_address(self):
    """
    Getter method for local_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/config/local_address (oc-inet:ip-address)

    YANG Description: Local IP address of the LDP adjacency
    """
    return self.__local_address
      
  def _set_local_address(self, v, load=False):
    """
    Setter method for local_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/config/local_address (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_address() directly.

    YANG Description: Local IP address of the LDP adjacency
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_address must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)""",
        })

    self.__local_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_address(self):
    self.__local_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}'}),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}|:))'}),], is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)


  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/config/enabled (boolean)

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_hello_holdtime(self):
    """
    Getter method for hello_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/config/hello_holdtime (uint16)

    YANG Description: Defines the time for which a neighbor adjacency will
be kept by the router while it waits for a new link
Hello message.
    """
    return self.__hello_holdtime
      
  def _set_hello_holdtime(self, v, load=False):
    """
    Setter method for hello_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/config/hello_holdtime (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_holdtime is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_holdtime() directly.

    YANG Description: Defines the time for which a neighbor adjacency will
be kept by the router while it waits for a new link
Hello message.
    """
    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="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_holdtime 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="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__hello_holdtime = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_holdtime(self):
    self.__hello_holdtime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_hello_interval(self):
    """
    Getter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/config/hello_interval (uint16)

    YANG Description: Defines the interval for sending Hello messages on
each link LDP adjacency.
    """
    return self.__hello_interval
      
  def _set_hello_interval(self, v, load=False):
    """
    Setter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/config/hello_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_interval() directly.

    YANG Description: Defines the interval for sending Hello messages on
each link LDP adjacency.
    """
    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="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_interval 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="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__hello_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_interval(self):
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

  remote_address = __builtin__.property(_get_remote_address, _set_remote_address)
  local_address = __builtin__.property(_get_local_address, _set_local_address)
  enabled = __builtin__.property(_get_enabled, _set_enabled)
  hello_holdtime = __builtin__.property(_get_hello_holdtime, _set_hello_holdtime)
  hello_interval = __builtin__.property(_get_hello_interval, _set_hello_interval)


  _pyangbind_elements = OrderedDict([('remote_address', remote_address), ('local_address', local_address), ('enabled', enabled), ('hello_holdtime', hello_holdtime), ('hello_interval', hello_interval), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_targets_target_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/targeted/address-families/address-family/targets/target/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State attributes of a targeted LDP adjacency
  """
  __slots__ = ('_path_helper', '_extmethods', '__remote_address','__local_address','__enabled','__hello_holdtime','__hello_interval',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__remote_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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__local_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}'}),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}|:))'}),], is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__hello_holdtime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'targeted', 'address-families', 'address-family', 'targets', 'target', 'state']

  def _get_remote_address(self):
    """
    Getter method for remote_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/state/remote_address (oc-inet:ip-address)

    YANG Description: Neighbor address of the targeted LDP adjacency
    """
    return self.__remote_address
      
  def _set_remote_address(self, v, load=False):
    """
    Setter method for remote_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/state/remote_address (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_remote_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_remote_address() directly.

    YANG Description: Neighbor address of the targeted LDP adjacency
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """remote_address must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__remote_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_remote_address(self):
    self.__remote_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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_local_address(self):
    """
    Getter method for local_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/state/local_address (oc-inet:ip-address)

    YANG Description: Local IP address of the LDP adjacency
    """
    return self.__local_address
      
  def _set_local_address(self, v, load=False):
    """
    Setter method for local_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/state/local_address (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_address() directly.

    YANG Description: Local IP address of the LDP adjacency
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_address must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__local_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_address(self):
    self.__local_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}'}),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}|:))'}),], is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/state/enabled (boolean)

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_hello_holdtime(self):
    """
    Getter method for hello_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/state/hello_holdtime (uint16)

    YANG Description: Defines the time for which a neighbor adjacency will
be kept by the router while it waits for a new link
Hello message.
    """
    return self.__hello_holdtime
      
  def _set_hello_holdtime(self, v, load=False):
    """
    Setter method for hello_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/state/hello_holdtime (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_holdtime is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_holdtime() directly.

    YANG Description: Defines the time for which a neighbor adjacency will
be kept by the router while it waits for a new link
Hello message.
    """
    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="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_holdtime 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="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__hello_holdtime = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_holdtime(self):
    self.__hello_holdtime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_hello_interval(self):
    """
    Getter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/state/hello_interval (uint16)

    YANG Description: Defines the interval for sending Hello messages on
each link LDP adjacency.
    """
    return self.__hello_interval
      
  def _set_hello_interval(self, v, load=False):
    """
    Setter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/state/hello_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_interval() directly.

    YANG Description: Defines the interval for sending Hello messages on
each link LDP adjacency.
    """
    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="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_interval 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="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__hello_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_interval(self):
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  remote_address = __builtin__.property(_get_remote_address)
  local_address = __builtin__.property(_get_local_address)
  enabled = __builtin__.property(_get_enabled)
  hello_holdtime = __builtin__.property(_get_hello_holdtime)
  hello_interval = __builtin__.property(_get_hello_interval)


  _pyangbind_elements = OrderedDict([('remote_address', remote_address), ('local_address', local_address), ('enabled', enabled), ('hello_holdtime', hello_holdtime), ('hello_interval', hello_interval), ])


class yc_target_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_targets_target(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/targeted/address-families/address-family/targets/target. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of LDP targets configuration
  """
  __slots__ = ('_path_helper', '_extmethods', '__remote_address','__config','__state',)

  _yang_name = 'target'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__remote_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_targets_target_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_targets_target_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'targeted', 'address-families', 'address-family', 'targets', 'target']

  def _get_remote_address(self):
    """
    Getter method for remote_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/remote_address (leafref)

    YANG Description: Neighbor address of the targeted LDP session
    """
    return self.__remote_address
      
  def _set_remote_address(self, v, load=False):
    """
    Setter method for remote_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/remote_address (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_remote_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_remote_address() directly.

    YANG Description: Neighbor address of the targeted LDP session
    """
    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="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """remote_address must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__remote_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_remote_address(self):
    self.__remote_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/config (container)

    YANG Description: Configuration parameters of a targeted LDP
adjacency
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/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 of a targeted LDP
adjacency
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_targets_target_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_targets_target_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_targets_target_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/state (container)

    YANG Description: State attributes of a targeted LDP adjacency
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/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 of a targeted LDP adjacency
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_targets_target_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_targets_target_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_targets_target_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  remote_address = __builtin__.property(_get_remote_address, _set_remote_address)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('remote_address', remote_address), ('config', config), ('state', state), ])


class yc_targets_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_targets(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/targeted/address-families/address-family/targets. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Container aggregating all targeted sessions and
their LDP-specific attributes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__target',)

  _yang_name = 'targets'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__target = YANGDynClass(base=YANGListType("remote_address",yc_target_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_targets_target, yang_name="target", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='remote-address', extensions=None), is_container='list', yang_name="target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'targeted', 'address-families', 'address-family', 'targets']

  def _get_target(self):
    """
    Getter method for target, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target (list)

    YANG Description: List of LDP targets configuration
    """
    return self.__target
      
  def _set_target(self, v, load=False):
    """
    Setter method for target, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_target is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_target() directly.

    YANG Description: List of LDP targets configuration
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("remote_address",yc_target_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_targets_target, yang_name="target", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='remote-address', extensions=None), is_container='list', yang_name="target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """target must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("remote_address",yc_target_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_targets_target, yang_name="target", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='remote-address', extensions=None), is_container='list', yang_name="target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__target = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_target(self):
    self.__target = YANGDynClass(base=YANGListType("remote_address",yc_target_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_targets_target, yang_name="target", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='remote-address', extensions=None), is_container='list', yang_name="target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  target = __builtin__.property(_get_target, _set_target)


  _pyangbind_elements = OrderedDict([('target', target), ])


class yc_address_family_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/targeted/address-families/address-family. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of address families for targeted LDP
configuration
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi_name','__config','__state','__targets',)

  _yang_name = 'address-family'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__targets = YANGDynClass(base=yc_targets_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_targets, is_container='container', yang_name="targets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'targeted', 'address-families', 'address-family']

  def _get_afi_name(self):
    """
    Getter method for afi_name, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/afi_name (leafref)

    YANG Description: Adress-family name atttibute (IPv4, IPv6).
    """
    return self.__afi_name
      
  def _set_afi_name(self, v, load=False):
    """
    Setter method for afi_name, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/afi_name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_name() directly.

    YANG Description: Adress-family name atttibute (IPv4, IPv6).
    """
    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="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__afi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_name(self):
    self.__afi_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/config (container)

    YANG Description: Address-family configuration for targeted LDP
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/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: Address-family configuration for targeted LDP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/state (container)

    YANG Description: Address-family state for targeted LDP
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/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: Address-family state for targeted LDP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_targets(self):
    """
    Getter method for targets, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets (container)

    YANG Description: Container aggregating all targeted sessions and
their LDP-specific attributes.
    """
    return self.__targets
      
  def _set_targets(self, v, load=False):
    """
    Setter method for targets, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_targets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_targets() directly.

    YANG Description: Container aggregating all targeted sessions and
their LDP-specific attributes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_targets_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_targets, is_container='container', yang_name="targets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """targets must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_targets_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_targets, is_container='container', yang_name="targets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__targets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_targets(self):
    self.__targets = YANGDynClass(base=yc_targets_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_targets, is_container='container', yang_name="targets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  afi_name = __builtin__.property(_get_afi_name, _set_afi_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  targets = __builtin__.property(_get_targets, _set_targets)


  _pyangbind_elements = OrderedDict([('afi_name', afi_name), ('config', config), ('state', state), ('targets', targets), ])


class yc_address_families_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/targeted/address-families. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Global container for IPv4 and IPv6 attributes for LDP.
  """
  __slots__ = ('_path_helper', '_extmethods', '__address_family',)

  _yang_name = 'address-families'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__address_family = YANGDynClass(base=YANGListType("afi_name",yc_address_family_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family, yang_name="address-family", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-name', extensions=None), is_container='list', yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'targeted', 'address-families']

  def _get_address_family(self):
    """
    Getter method for address_family, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family (list)

    YANG Description: List of address families for targeted LDP
configuration
    """
    return self.__address_family
      
  def _set_address_family(self, v, load=False):
    """
    Setter method for address_family, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address_family is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address_family() directly.

    YANG Description: List of address families for targeted LDP
configuration
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("afi_name",yc_address_family_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family, yang_name="address-family", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-name', extensions=None), is_container='list', yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address_family must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("afi_name",yc_address_family_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family, yang_name="address-family", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-name', extensions=None), is_container='list', yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__address_family = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address_family(self):
    self.__address_family = YANGDynClass(base=YANGListType("afi_name",yc_address_family_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family, yang_name="address-family", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-name', extensions=None), is_container='list', yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  address_family = __builtin__.property(_get_address_family, _set_address_family)


  _pyangbind_elements = OrderedDict([('address_family', address_family), ])


class yc_targeted_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/targeted. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top container for targeted LDP state and configuration
attributes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__address_families',)

  _yang_name = 'targeted'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__address_families = YANGDynClass(base=yc_address_families_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families, is_container='container', yang_name="address-families", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'targeted']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/config (container)

    YANG Description: Configuration attributes related to targeted LDP.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/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 related to targeted LDP.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/state (container)

    YANG Description: State attributes related to targeted LDP.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/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 related to targeted LDP.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_address_families(self):
    """
    Getter method for address_families, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families (container)

    YANG Description: Global container for IPv4 and IPv6 attributes for LDP.
    """
    return self.__address_families
      
  def _set_address_families(self, v, load=False):
    """
    Setter method for address_families, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address_families is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address_families() directly.

    YANG Description: Global container for IPv4 and IPv6 attributes for LDP.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_address_families_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families, is_container='container', yang_name="address-families", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address_families must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_address_families_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families, is_container='container', yang_name="address-families", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__address_families = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address_families(self):
    self.__address_families = YANGDynClass(base=yc_address_families_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families, is_container='container', yang_name="address-families", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  address_families = __builtin__.property(_get_address_families, _set_address_families)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('address_families', address_families), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/neighbors/neighbor/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Neighbor configuration attributes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__lsr_id','__label_space_id','__enable_downstream_on_demand',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__lsr_id = 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}'}),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}|:))'}),], is_leaf=True, yang_name="lsr-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    self.__label_space_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="label-space-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__enable_downstream_on_demand = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-downstream-on-demand", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'neighbors', 'neighbor', 'config']

  def _get_lsr_id(self):
    """
    Getter method for lsr_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/config/lsr_id (oc-inet:ip-address)

    YANG Description: Neighbor label switch router identifier.
    """
    return self.__lsr_id
      
  def _set_lsr_id(self, v, load=False):
    """
    Setter method for lsr_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/config/lsr_id (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsr_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsr_id() directly.

    YANG Description: Neighbor label switch router identifier.
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="lsr-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsr_id must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="lsr-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)""",
        })

    self.__lsr_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsr_id(self):
    self.__lsr_id = 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}'}),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}|:))'}),], is_leaf=True, yang_name="lsr-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)


  def _get_label_space_id(self):
    """
    Getter method for label_space_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/config/label_space_id (uint16)

    YANG Description: Label space ID of the neighbor.
    """
    return self.__label_space_id
      
  def _set_label_space_id(self, v, load=False):
    """
    Setter method for label_space_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/config/label_space_id (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_label_space_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_label_space_id() directly.

    YANG Description: Label space ID of the neighbor.
    """
    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="label-space-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """label_space_id 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="label-space-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__label_space_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_label_space_id(self):
    self.__label_space_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="label-space-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_enable_downstream_on_demand(self):
    """
    Getter method for enable_downstream_on_demand, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/config/enable_downstream_on_demand (boolean)

    YANG Description: If this leaf is set to true, LDP downstream on demand is enabled in
the LDP session and the router advertises DoD to the peer. If the peer
also adverstises DoD, then downstream on demand is used in the session,
otherwise downstream unsolicited is used.
    """
    return self.__enable_downstream_on_demand
      
  def _set_enable_downstream_on_demand(self, v, load=False):
    """
    Setter method for enable_downstream_on_demand, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/config/enable_downstream_on_demand (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable_downstream_on_demand is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable_downstream_on_demand() directly.

    YANG Description: If this leaf is set to true, LDP downstream on demand is enabled in
the LDP session and the router advertises DoD to the peer. If the peer
also adverstises DoD, then downstream on demand is used in the session,
otherwise downstream unsolicited is used.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-downstream-on-demand", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable_downstream_on_demand 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-downstream-on-demand", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enable_downstream_on_demand = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable_downstream_on_demand(self):
    self.__enable_downstream_on_demand = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-downstream-on-demand", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  lsr_id = __builtin__.property(_get_lsr_id, _set_lsr_id)
  label_space_id = __builtin__.property(_get_label_space_id, _set_label_space_id)
  enable_downstream_on_demand = __builtin__.property(_get_enable_downstream_on_demand, _set_enable_downstream_on_demand)


  _pyangbind_elements = OrderedDict([('lsr_id', lsr_id), ('label_space_id', label_space_id), ('enable_downstream_on_demand', enable_downstream_on_demand), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/neighbors/neighbor/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Neighbor state attributes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__lsr_id','__label_space_id','__enable_downstream_on_demand','__session_state','__peer_label_advertisement_mode','__negotiated_label_advertisement_mode',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__lsr_id = 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}'}),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}|:))'}),], is_leaf=True, yang_name="lsr-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__label_space_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="label-space-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__enable_downstream_on_demand = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-downstream-on-demand", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__session_state = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'NON_EXISTENT': {}, 'INITIALIZED': {}, 'OPENREC': {}, 'OPENSENT': {}, 'OPERATIONAL': {}},), is_leaf=True, yang_name="session-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__peer_label_advertisement_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DOWNSTREAM_UNSOLICITED': {}, 'DOWNSTREAM_ON_DEMAND': {}},), is_leaf=True, yang_name="peer-label-advertisement-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='label-advertisement-mode', is_config=False)
    self.__negotiated_label_advertisement_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DOWNSTREAM_UNSOLICITED': {}, 'DOWNSTREAM_ON_DEMAND': {}},), is_leaf=True, yang_name="negotiated-label-advertisement-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='label-advertisement-mode', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'neighbors', 'neighbor', 'state']

  def _get_lsr_id(self):
    """
    Getter method for lsr_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/state/lsr_id (oc-inet:ip-address)

    YANG Description: Neighbor label switch router identifier.
    """
    return self.__lsr_id
      
  def _set_lsr_id(self, v, load=False):
    """
    Setter method for lsr_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/state/lsr_id (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsr_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsr_id() directly.

    YANG Description: Neighbor label switch router identifier.
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="lsr-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsr_id must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="lsr-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__lsr_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsr_id(self):
    self.__lsr_id = 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}'}),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}|:))'}),], is_leaf=True, yang_name="lsr-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_label_space_id(self):
    """
    Getter method for label_space_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/state/label_space_id (uint16)

    YANG Description: Label space ID of the neighbor.
    """
    return self.__label_space_id
      
  def _set_label_space_id(self, v, load=False):
    """
    Setter method for label_space_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/state/label_space_id (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_label_space_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_label_space_id() directly.

    YANG Description: Label space ID of the neighbor.
    """
    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="label-space-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """label_space_id 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="label-space-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__label_space_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_label_space_id(self):
    self.__label_space_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="label-space-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_enable_downstream_on_demand(self):
    """
    Getter method for enable_downstream_on_demand, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/state/enable_downstream_on_demand (boolean)

    YANG Description: If this leaf is set to true, LDP downstream on demand is enabled in
the LDP session and the router advertises DoD to the peer. If the peer
also adverstises DoD, then downstream on demand is used in the session,
otherwise downstream unsolicited is used.
    """
    return self.__enable_downstream_on_demand
      
  def _set_enable_downstream_on_demand(self, v, load=False):
    """
    Setter method for enable_downstream_on_demand, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/state/enable_downstream_on_demand (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable_downstream_on_demand is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable_downstream_on_demand() directly.

    YANG Description: If this leaf is set to true, LDP downstream on demand is enabled in
the LDP session and the router advertises DoD to the peer. If the peer
also adverstises DoD, then downstream on demand is used in the session,
otherwise downstream unsolicited is used.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-downstream-on-demand", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable_downstream_on_demand 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-downstream-on-demand", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enable_downstream_on_demand = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable_downstream_on_demand(self):
    self.__enable_downstream_on_demand = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-downstream-on-demand", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_session_state(self):
    """
    Getter method for session_state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/state/session_state (enumeration)

    YANG Description: Operational status of the LDP session,
based on the state machine for session
negotiation behavior.
    """
    return self.__session_state
      
  def _set_session_state(self, v, load=False):
    """
    Setter method for session_state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/state/session_state (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_session_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_session_state() directly.

    YANG Description: Operational status of the LDP session,
based on the state machine for session
negotiation behavior.
    """
    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={'NON_EXISTENT': {}, 'INITIALIZED': {}, 'OPENREC': {}, 'OPENSENT': {}, 'OPERATIONAL': {}},), is_leaf=True, yang_name="session-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """session_state must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'NON_EXISTENT': {}, 'INITIALIZED': {}, 'OPENREC': {}, 'OPENSENT': {}, 'OPERATIONAL': {}},), is_leaf=True, yang_name="session-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__session_state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_session_state(self):
    self.__session_state = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'NON_EXISTENT': {}, 'INITIALIZED': {}, 'OPENREC': {}, 'OPENSENT': {}, 'OPERATIONAL': {}},), is_leaf=True, yang_name="session-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_peer_label_advertisement_mode(self):
    """
    Getter method for peer_label_advertisement_mode, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/state/peer_label_advertisement_mode (label-advertisement-mode)

    YANG Description: This leaf shows the Label Advertisement Mode which is advertised by the peer.
    """
    return self.__peer_label_advertisement_mode
      
  def _set_peer_label_advertisement_mode(self, v, load=False):
    """
    Setter method for peer_label_advertisement_mode, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/state/peer_label_advertisement_mode (label-advertisement-mode)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_label_advertisement_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_label_advertisement_mode() directly.

    YANG Description: This leaf shows the Label Advertisement Mode which is advertised by the peer.
    """
    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={'DOWNSTREAM_UNSOLICITED': {}, 'DOWNSTREAM_ON_DEMAND': {}},), is_leaf=True, yang_name="peer-label-advertisement-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='label-advertisement-mode', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_label_advertisement_mode must be of a type compatible with label-advertisement-mode""",
          'defined-type': "openconfig-network-instance:label-advertisement-mode",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DOWNSTREAM_UNSOLICITED': {}, 'DOWNSTREAM_ON_DEMAND': {}},), is_leaf=True, yang_name="peer-label-advertisement-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='label-advertisement-mode', is_config=False)""",
        })

    self.__peer_label_advertisement_mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_label_advertisement_mode(self):
    self.__peer_label_advertisement_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DOWNSTREAM_UNSOLICITED': {}, 'DOWNSTREAM_ON_DEMAND': {}},), is_leaf=True, yang_name="peer-label-advertisement-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='label-advertisement-mode', is_config=False)


  def _get_negotiated_label_advertisement_mode(self):
    """
    Getter method for negotiated_label_advertisement_mode, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/state/negotiated_label_advertisement_mode (label-advertisement-mode)

    YANG Description: This leaf shows the Label Advertisement Mode negotiated based on local
and remote preferences. If DoD is enabled and the peer also adverstises DoD,
then downstream is negotiated. Otherwise, downstream unsolicited is used.
    """
    return self.__negotiated_label_advertisement_mode
      
  def _set_negotiated_label_advertisement_mode(self, v, load=False):
    """
    Setter method for negotiated_label_advertisement_mode, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/state/negotiated_label_advertisement_mode (label-advertisement-mode)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_negotiated_label_advertisement_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_negotiated_label_advertisement_mode() directly.

    YANG Description: This leaf shows the Label Advertisement Mode negotiated based on local
and remote preferences. If DoD is enabled and the peer also adverstises DoD,
then downstream is negotiated. Otherwise, downstream unsolicited is used.
    """
    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={'DOWNSTREAM_UNSOLICITED': {}, 'DOWNSTREAM_ON_DEMAND': {}},), is_leaf=True, yang_name="negotiated-label-advertisement-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='label-advertisement-mode', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """negotiated_label_advertisement_mode must be of a type compatible with label-advertisement-mode""",
          'defined-type': "openconfig-network-instance:label-advertisement-mode",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DOWNSTREAM_UNSOLICITED': {}, 'DOWNSTREAM_ON_DEMAND': {}},), is_leaf=True, yang_name="negotiated-label-advertisement-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='label-advertisement-mode', is_config=False)""",
        })

    self.__negotiated_label_advertisement_mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_negotiated_label_advertisement_mode(self):
    self.__negotiated_label_advertisement_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DOWNSTREAM_UNSOLICITED': {}, 'DOWNSTREAM_ON_DEMAND': {}},), is_leaf=True, yang_name="negotiated-label-advertisement-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='label-advertisement-mode', is_config=False)

  lsr_id = __builtin__.property(_get_lsr_id)
  label_space_id = __builtin__.property(_get_label_space_id)
  enable_downstream_on_demand = __builtin__.property(_get_enable_downstream_on_demand)
  session_state = __builtin__.property(_get_session_state)
  peer_label_advertisement_mode = __builtin__.property(_get_peer_label_advertisement_mode)
  negotiated_label_advertisement_mode = __builtin__.property(_get_negotiated_label_advertisement_mode)


  _pyangbind_elements = OrderedDict([('lsr_id', lsr_id), ('label_space_id', label_space_id), ('enable_downstream_on_demand', enable_downstream_on_demand), ('session_state', session_state), ('peer_label_advertisement_mode', peer_label_advertisement_mode), ('negotiated_label_advertisement_mode', negotiated_label_advertisement_mode), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/neighbors/neighbor/hello-adjacencies/hello-adjacency/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information for a particular LDP
hello adjacency.
  """
  __slots__ = ('_path_helper', '_extmethods', '__remote_address','__local_address','__adjacency_type','__last_clear','__hello_received','__hello_dropped',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__remote_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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__local_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}'}),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}|:))'}),], is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__adjacency_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LINK': {}, 'TARGETED': {}},), is_leaf=True, yang_name="adjacency-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ldp:mpls-ldp-adjacency-type', is_config=False)
    self.__last_clear = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-clear", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__hello_received = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="hello-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    self.__hello_dropped = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="hello-dropped", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'neighbors', 'neighbor', 'hello-adjacencies', 'hello-adjacency', 'state']

  def _get_remote_address(self):
    """
    Getter method for remote_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/state/remote_address (oc-inet:ip-address)

    YANG Description: Within the LDP adjacency, this attribute
shows the neighbor address.
    """
    return self.__remote_address
      
  def _set_remote_address(self, v, load=False):
    """
    Setter method for remote_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/state/remote_address (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_remote_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_remote_address() directly.

    YANG Description: Within the LDP adjacency, this attribute
shows the neighbor address.
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """remote_address must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__remote_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_remote_address(self):
    self.__remote_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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_local_address(self):
    """
    Getter method for local_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/state/local_address (oc-inet:ip-address)

    YANG Description: Within the LDP adjacency, this attribute
shows the local address.
    """
    return self.__local_address
      
  def _set_local_address(self, v, load=False):
    """
    Setter method for local_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/state/local_address (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_address() directly.

    YANG Description: Within the LDP adjacency, this attribute
shows the local address.
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_address must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__local_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_address(self):
    self.__local_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}'}),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}|:))'}),], is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_adjacency_type(self):
    """
    Getter method for adjacency_type, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/state/adjacency_type (oc-ldp:mpls-ldp-adjacency-type)

    YANG Description: This attributes defines if the LDP
adjacency is from a direct link or from
targeted discovery.
    """
    return self.__adjacency_type
      
  def _set_adjacency_type(self, v, load=False):
    """
    Setter method for adjacency_type, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/state/adjacency_type (oc-ldp:mpls-ldp-adjacency-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adjacency_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adjacency_type() directly.

    YANG Description: This attributes defines if the LDP
adjacency is from a direct link or from
targeted discovery.
    """
    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={'LINK': {}, 'TARGETED': {}},), is_leaf=True, yang_name="adjacency-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ldp:mpls-ldp-adjacency-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adjacency_type must be of a type compatible with oc-ldp:mpls-ldp-adjacency-type""",
          'defined-type': "oc-ldp:mpls-ldp-adjacency-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LINK': {}, 'TARGETED': {}},), is_leaf=True, yang_name="adjacency-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ldp:mpls-ldp-adjacency-type', is_config=False)""",
        })

    self.__adjacency_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adjacency_type(self):
    self.__adjacency_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LINK': {}, 'TARGETED': {}},), is_leaf=True, yang_name="adjacency-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ldp:mpls-ldp-adjacency-type', is_config=False)


  def _get_last_clear(self):
    """
    Getter method for last_clear, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/state/last_clear (oc-types:timeticks64)

    YANG Description: Timestamp of the last time the interface counters
were cleared expressed relative to the Unix Epoch
(January 1, 1970 00:00:00 UTC).
    """
    return self.__last_clear
      
  def _set_last_clear(self, v, load=False):
    """
    Setter method for last_clear, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/state/last_clear (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_last_clear is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_last_clear() directly.

    YANG Description: Timestamp of the last time the interface counters
were cleared expressed relative to the Unix Epoch
(January 1, 1970 00:00:00 UTC).
    """
    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="last-clear", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """last_clear must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-clear", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__last_clear = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_last_clear(self):
    self.__last_clear = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-clear", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_hello_received(self):
    """
    Getter method for hello_received, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/state/hello_received (oc-yang:counter64)

    YANG Description: Number of Hello messaged received by the device
    """
    return self.__hello_received
      
  def _set_hello_received(self, v, load=False):
    """
    Setter method for hello_received, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/state/hello_received (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_received() directly.

    YANG Description: Number of Hello messaged received by the device
    """
    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="hello-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_received 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="hello-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__hello_received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_received(self):
    self.__hello_received = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="hello-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_hello_dropped(self):
    """
    Getter method for hello_dropped, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/state/hello_dropped (oc-yang:counter64)

    YANG Description: Number of Hello messaged dropped by the device
    """
    return self.__hello_dropped
      
  def _set_hello_dropped(self, v, load=False):
    """
    Setter method for hello_dropped, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/state/hello_dropped (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_dropped is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_dropped() directly.

    YANG Description: Number of Hello messaged dropped by the device
    """
    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="hello-dropped", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_dropped 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="hello-dropped", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__hello_dropped = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_dropped(self):
    self.__hello_dropped = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="hello-dropped", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)

  remote_address = __builtin__.property(_get_remote_address)
  local_address = __builtin__.property(_get_local_address)
  adjacency_type = __builtin__.property(_get_adjacency_type)
  last_clear = __builtin__.property(_get_last_clear)
  hello_received = __builtin__.property(_get_hello_received)
  hello_dropped = __builtin__.property(_get_hello_dropped)


  _pyangbind_elements = OrderedDict([('remote_address', remote_address), ('local_address', local_address), ('adjacency_type', adjacency_type), ('last_clear', last_clear), ('hello_received', hello_received), ('hello_dropped', hello_dropped), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_interface_ref_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/neighbors/neighbor/hello-adjacencies/hello-adjacency/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'neighbors', 'neighbor', 'hello-adjacencies', 'hello-adjacency', 'interface-ref', 'state']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/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 /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/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 /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_interface_ref(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/neighbors/neighbor/hello-adjacencies/hello-adjacency/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
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'interface-ref'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'neighbors', 'neighbor', 'hello-adjacencies', 'hello-adjacency', 'interface-ref']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/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 /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_hello_holdtime_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/neighbors/neighbor/hello-adjacencies/hello-adjacency/hello-holdtime/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State attributes related to the
hello-holdtime.
  """
  __slots__ = ('_path_helper', '_extmethods', '__adjacent','__negotiated','__hello_expiration','__next_hello',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__adjacent = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="adjacent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__negotiated = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="negotiated", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__hello_expiration = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="hello-expiration", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__next_hello = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="next-hello", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'neighbors', 'neighbor', 'hello-adjacencies', 'hello-adjacency', 'hello-holdtime', 'state']

  def _get_adjacent(self):
    """
    Getter method for adjacent, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/hello_holdtime/state/adjacent (uint16)

    YANG Description: Hello holdtime attribute learned from the
LDP neighbor
    """
    return self.__adjacent
      
  def _set_adjacent(self, v, load=False):
    """
    Setter method for adjacent, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/hello_holdtime/state/adjacent (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adjacent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adjacent() directly.

    YANG Description: Hello holdtime attribute learned from the
LDP neighbor
    """
    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="adjacent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adjacent 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="adjacent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__adjacent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adjacent(self):
    self.__adjacent = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="adjacent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_negotiated(self):
    """
    Getter method for negotiated, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/hello_holdtime/state/negotiated (uint16)

    YANG Description: Hello holdtime attribute negotiated between
the LDP neighbor and the local router.
    """
    return self.__negotiated
      
  def _set_negotiated(self, v, load=False):
    """
    Setter method for negotiated, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/hello_holdtime/state/negotiated (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_negotiated is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_negotiated() directly.

    YANG Description: Hello holdtime attribute negotiated between
the LDP neighbor and the local router.
    """
    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="negotiated", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """negotiated 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="negotiated", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__negotiated = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_negotiated(self):
    self.__negotiated = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="negotiated", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_hello_expiration(self):
    """
    Getter method for hello_expiration, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/hello_holdtime/state/hello_expiration (oc-types:timeticks64)

    YANG Description: Expiration time for the hello holdtime.
    """
    return self.__hello_expiration
      
  def _set_hello_expiration(self, v, load=False):
    """
    Setter method for hello_expiration, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/hello_holdtime/state/hello_expiration (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_expiration is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_expiration() directly.

    YANG Description: Expiration time for the hello holdtime.
    """
    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="hello-expiration", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_expiration must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="hello-expiration", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__hello_expiration = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_expiration(self):
    self.__hello_expiration = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="hello-expiration", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_next_hello(self):
    """
    Getter method for next_hello, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/hello_holdtime/state/next_hello (oc-types:timeticks64)

    YANG Description: Time when the next LDP hello will be sent to
the adjacent neighbor.
    """
    return self.__next_hello
      
  def _set_next_hello(self, v, load=False):
    """
    Setter method for next_hello, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/hello_holdtime/state/next_hello (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hello is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hello() directly.

    YANG Description: Time when the next LDP hello will be sent to
the adjacent neighbor.
    """
    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="next-hello", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hello must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="next-hello", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__next_hello = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_next_hello(self):
    self.__next_hello = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="next-hello", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)

  adjacent = __builtin__.property(_get_adjacent)
  negotiated = __builtin__.property(_get_negotiated)
  hello_expiration = __builtin__.property(_get_hello_expiration)
  next_hello = __builtin__.property(_get_next_hello)


  _pyangbind_elements = OrderedDict([('adjacent', adjacent), ('negotiated', negotiated), ('hello_expiration', hello_expiration), ('next_hello', next_hello), ])


class yc_hello_holdtime_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_hello_holdtime(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/neighbors/neighbor/hello-adjacencies/hello-adjacency/hello-holdtime. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Specifies the time the sending LSR will
maintain its record of Hellos from the
receiving LSR
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'hello-holdtime'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_hello_holdtime_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'neighbors', 'neighbor', 'hello-adjacencies', 'hello-adjacency', 'hello-holdtime']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/hello_holdtime/state (container)

    YANG Description: State attributes related to the
hello-holdtime.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/hello_holdtime/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 related to the
hello-holdtime.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_hello_holdtime_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_hello_holdtime_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_hello_holdtime_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_hello_adjacency_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/neighbors/neighbor/hello-adjacencies/hello-adjacency. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of hello adjacencies for a given LDP
neighbor.
  """
  __slots__ = ('_path_helper', '_extmethods', '__remote_address','__local_address','__state','__interface_ref','__hello_holdtime',)

  _yang_name = 'hello-adjacency'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__remote_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__local_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__interface_ref = YANGDynClass(base=yc_interface_ref_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__hello_holdtime = YANGDynClass(base=yc_hello_holdtime_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_hello_holdtime, is_container='container', yang_name="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'neighbors', 'neighbor', 'hello-adjacencies', 'hello-adjacency']

  def _get_remote_address(self):
    """
    Getter method for remote_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/remote_address (leafref)

    YANG Description: Within the LDP adjacency, this attribute
shows the neighbor address.
    """
    return self.__remote_address
      
  def _set_remote_address(self, v, load=False):
    """
    Setter method for remote_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/remote_address (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_remote_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_remote_address() directly.

    YANG Description: Within the LDP adjacency, this attribute
shows the neighbor address.
    """
    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="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """remote_address must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__remote_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_remote_address(self):
    self.__remote_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_local_address(self):
    """
    Getter method for local_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/local_address (leafref)

    YANG Description: Within the LDP adjacency, this attribute
shows the local address.
    """
    return self.__local_address
      
  def _set_local_address(self, v, load=False):
    """
    Setter method for local_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/local_address (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_address() directly.

    YANG Description: Within the LDP adjacency, this attribute
shows the local address.
    """
    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="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_address must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__local_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_address(self):
    self.__local_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/state (container)

    YANG Description: State information for a particular LDP
hello adjacency.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/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 a particular LDP
hello adjacency.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_interface_ref(self):
    """
    Getter method for interface_ref, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/interface_ref (container)

    YANG Description: Reference to an interface or subinterface
    """
    return self.__interface_ref
      
  def _set_interface_ref(self, v, load=False):
    """
    Setter method for interface_ref, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/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
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interface_ref_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__interface_ref = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_interface_ref(self):
    self.__interface_ref = YANGDynClass(base=yc_interface_ref_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_hello_holdtime(self):
    """
    Getter method for hello_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/hello_holdtime (container)

    YANG Description: Specifies the time the sending LSR will
maintain its record of Hellos from the
receiving LSR
    """
    return self.__hello_holdtime
      
  def _set_hello_holdtime(self, v, load=False):
    """
    Setter method for hello_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/hello_holdtime (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_holdtime is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_holdtime() directly.

    YANG Description: Specifies the time the sending LSR will
maintain its record of Hellos from the
receiving LSR
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_hello_holdtime_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_hello_holdtime, is_container='container', yang_name="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_holdtime must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_hello_holdtime_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_hello_holdtime, is_container='container', yang_name="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__hello_holdtime = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_holdtime(self):
    self.__hello_holdtime = YANGDynClass(base=yc_hello_holdtime_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_hello_holdtime, is_container='container', yang_name="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  remote_address = __builtin__.property(_get_remote_address)
  local_address = __builtin__.property(_get_local_address)
  state = __builtin__.property(_get_state)
  interface_ref = __builtin__.property(_get_interface_ref)
  hello_holdtime = __builtin__.property(_get_hello_holdtime)


  _pyangbind_elements = OrderedDict([('remote_address', remote_address), ('local_address', local_address), ('state', state), ('interface_ref', interface_ref), ('hello_holdtime', hello_holdtime), ])


class yc_hello_adjacencies_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/neighbors/neighbor/hello-adjacencies. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top container for hello adjacencies
for a given LDP neighbor.
  """
  __slots__ = ('_path_helper', '_extmethods', '__hello_adjacency',)

  _yang_name = 'hello-adjacencies'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__hello_adjacency = YANGDynClass(base=YANGListType("remote_address local_address",yc_hello_adjacency_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency, yang_name="hello-adjacency", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='remote-address local-address', extensions=None), is_container='list', yang_name="hello-adjacency", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'neighbors', 'neighbor', 'hello-adjacencies']

  def _get_hello_adjacency(self):
    """
    Getter method for hello_adjacency, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency (list)

    YANG Description: List of hello adjacencies for a given LDP
neighbor.
    """
    return self.__hello_adjacency
      
  def _set_hello_adjacency(self, v, load=False):
    """
    Setter method for hello_adjacency, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_adjacency is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_adjacency() directly.

    YANG Description: List of hello adjacencies for a given LDP
neighbor.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("remote_address local_address",yc_hello_adjacency_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency, yang_name="hello-adjacency", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='remote-address local-address', extensions=None), is_container='list', yang_name="hello-adjacency", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_adjacency must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("remote_address local_address",yc_hello_adjacency_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency, yang_name="hello-adjacency", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='remote-address local-address', extensions=None), is_container='list', yang_name="hello-adjacency", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__hello_adjacency = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_adjacency(self):
    self.__hello_adjacency = YANGDynClass(base=YANGListType("remote_address local_address",yc_hello_adjacency_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency, yang_name="hello-adjacency", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='remote-address local-address', extensions=None), is_container='list', yang_name="hello-adjacency", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  hello_adjacency = __builtin__.property(_get_hello_adjacency)


  _pyangbind_elements = OrderedDict([('hello_adjacency', hello_adjacency), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_authentication_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/neighbors/neighbor/authentication/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration of LDP authentication attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__enable','__authentication_key',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__authentication_key = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'neighbors', 'neighbor', 'authentication', 'config']

  def _get_enable(self):
    """
    Getter method for enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/authentication/config/enable (boolean)

    YANG Description: Enables LDP authentication on the node.
    """
    return self.__enable
      
  def _set_enable(self, v, load=False):
    """
    Setter method for enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/authentication/config/enable (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable() directly.

    YANG Description: Enables LDP authentication on the node.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable 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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enable = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable(self):
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_authentication_key(self):
    """
    Getter method for authentication_key, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/authentication/config/authentication_key (oc-types:routing-password)

    YANG Description: authenticate LDP signaling
messages
    """
    return self.__authentication_key
      
  def _set_authentication_key(self, v, load=False):
    """
    Setter method for authentication_key, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/authentication/config/authentication_key (oc-types:routing-password)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_authentication_key is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_authentication_key() directly.

    YANG Description: authenticate LDP signaling
messages
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """authentication_key must be of a type compatible with oc-types:routing-password""",
          'defined-type': "oc-types:routing-password",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)""",
        })

    self.__authentication_key = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_authentication_key(self):
    self.__authentication_key = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)

  enable = __builtin__.property(_get_enable, _set_enable)
  authentication_key = __builtin__.property(_get_authentication_key, _set_authentication_key)


  _pyangbind_elements = OrderedDict([('enable', enable), ('authentication_key', authentication_key), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_authentication_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/neighbors/neighbor/authentication/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: LDP authentication state.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enable','__authentication_key',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__authentication_key = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'neighbors', 'neighbor', 'authentication', 'state']

  def _get_enable(self):
    """
    Getter method for enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/authentication/state/enable (boolean)

    YANG Description: Enables LDP authentication on the node.
    """
    return self.__enable
      
  def _set_enable(self, v, load=False):
    """
    Setter method for enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/authentication/state/enable (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable() directly.

    YANG Description: Enables LDP authentication on the node.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable 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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enable = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable(self):
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_authentication_key(self):
    """
    Getter method for authentication_key, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/authentication/state/authentication_key (oc-types:routing-password)

    YANG Description: authenticate LDP signaling
messages
    """
    return self.__authentication_key
      
  def _set_authentication_key(self, v, load=False):
    """
    Setter method for authentication_key, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/authentication/state/authentication_key (oc-types:routing-password)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_authentication_key is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_authentication_key() directly.

    YANG Description: authenticate LDP signaling
messages
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """authentication_key must be of a type compatible with oc-types:routing-password""",
          'defined-type': "oc-types:routing-password",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=False)""",
        })

    self.__authentication_key = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_authentication_key(self):
    self.__authentication_key = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=False)

  enable = __builtin__.property(_get_enable)
  authentication_key = __builtin__.property(_get_authentication_key)


  _pyangbind_elements = OrderedDict([('enable', enable), ('authentication_key', authentication_key), ])


class yc_authentication_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_authentication(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/neighbors/neighbor/authentication. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Global LDP authentication
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'authentication'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_authentication_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'neighbors', 'neighbor', 'authentication']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/authentication/config (container)

    YANG Description: Configuration of LDP authentication attributes
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/authentication/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 of LDP authentication attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_authentication_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_authentication_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_authentication_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/authentication/state (container)

    YANG Description: LDP authentication state.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/authentication/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: LDP authentication state.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_neighbor_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/neighbors/neighbor. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of LDP neighbors and their attributes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__lsr_id','__label_space_id','__config','__state','__hello_adjacencies','__authentication',)

  _yang_name = 'neighbor'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__lsr_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="lsr-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__label_space_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="label-space-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__hello_adjacencies = YANGDynClass(base=yc_hello_adjacencies_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies, is_container='container', yang_name="hello-adjacencies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__authentication = YANGDynClass(base=yc_authentication_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_authentication, is_container='container', yang_name="authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'neighbors', 'neighbor']

  def _get_lsr_id(self):
    """
    Getter method for lsr_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/lsr_id (leafref)

    YANG Description: Neighbor label switch router identifier.
    """
    return self.__lsr_id
      
  def _set_lsr_id(self, v, load=False):
    """
    Setter method for lsr_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/lsr_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsr_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsr_id() directly.

    YANG Description: Neighbor label switch router identifier.
    """
    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="lsr-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsr_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="lsr-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__lsr_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsr_id(self):
    self.__lsr_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="lsr-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_label_space_id(self):
    """
    Getter method for label_space_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/label_space_id (leafref)

    YANG Description: Label space ID of the neighbor.
    """
    return self.__label_space_id
      
  def _set_label_space_id(self, v, load=False):
    """
    Setter method for label_space_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/label_space_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_label_space_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_label_space_id() directly.

    YANG Description: Label space ID of the neighbor.
    """
    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="label-space-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """label_space_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="label-space-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__label_space_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_label_space_id(self):
    self.__label_space_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="label-space-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/config (container)

    YANG Description: Neighbor configuration attributes.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/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: Neighbor configuration attributes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/state (container)

    YANG Description: Neighbor state attributes.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/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: Neighbor state attributes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_hello_adjacencies(self):
    """
    Getter method for hello_adjacencies, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies (container)

    YANG Description: Top container for hello adjacencies
for a given LDP neighbor.
    """
    return self.__hello_adjacencies
      
  def _set_hello_adjacencies(self, v, load=False):
    """
    Setter method for hello_adjacencies, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_adjacencies is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_adjacencies() directly.

    YANG Description: Top container for hello adjacencies
for a given LDP neighbor.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_hello_adjacencies_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies, is_container='container', yang_name="hello-adjacencies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_adjacencies must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_hello_adjacencies_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies, is_container='container', yang_name="hello-adjacencies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__hello_adjacencies = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_adjacencies(self):
    self.__hello_adjacencies = YANGDynClass(base=yc_hello_adjacencies_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies, is_container='container', yang_name="hello-adjacencies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_authentication(self):
    """
    Getter method for authentication, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/authentication (container)

    YANG Description: Global LDP authentication
    """
    return self.__authentication
      
  def _set_authentication(self, v, load=False):
    """
    Setter method for authentication, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/authentication (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_authentication is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_authentication() directly.

    YANG Description: Global LDP authentication
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_authentication_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_authentication, is_container='container', yang_name="authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """authentication must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_authentication_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_authentication, is_container='container', yang_name="authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__authentication = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_authentication(self):
    self.__authentication = YANGDynClass(base=yc_authentication_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_authentication, is_container='container', yang_name="authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  lsr_id = __builtin__.property(_get_lsr_id, _set_lsr_id)
  label_space_id = __builtin__.property(_get_label_space_id, _set_label_space_id)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  hello_adjacencies = __builtin__.property(_get_hello_adjacencies, _set_hello_adjacencies)
  authentication = __builtin__.property(_get_authentication, _set_authentication)


  _pyangbind_elements = OrderedDict([('lsr_id', lsr_id), ('label_space_id', label_space_id), ('config', config), ('state', state), ('hello_adjacencies', hello_adjacencies), ('authentication', authentication), ])


class yc_neighbors_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/neighbors. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State and configuration LDP neighbors attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__neighbor',)

  _yang_name = 'neighbors'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__neighbor = YANGDynClass(base=YANGListType("lsr_id label_space_id",yc_neighbor_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='lsr-id label-space-id', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'neighbors']

  def _get_neighbor(self):
    """
    Getter method for neighbor, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor (list)

    YANG Description: List of LDP neighbors and their attributes.
    """
    return self.__neighbor
      
  def _set_neighbor(self, v, load=False):
    """
    Setter method for neighbor, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor() directly.

    YANG Description: List of LDP neighbors and their attributes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("lsr_id label_space_id",yc_neighbor_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='lsr-id label-space-id', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("lsr_id label_space_id",yc_neighbor_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='lsr-id label-space-id', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__neighbor = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor(self):
    self.__neighbor = YANGDynClass(base=YANGListType("lsr_id label_space_id",yc_neighbor_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='lsr-id label-space-id', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  neighbor = __builtin__.property(_get_neighbor, _set_neighbor)


  _pyangbind_elements = OrderedDict([('neighbor', neighbor), ])


class yc_ldp_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: LDP global signaling configuration
  """
  __slots__ = ('_path_helper', '_extmethods', '__global_','__interface_attributes','__targeted','__neighbors',)

  _yang_name = 'ldp'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__global_ = YANGDynClass(base=yc_global__openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__interface_attributes = YANGDynClass(base=yc_interface_attributes_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes, is_container='container', yang_name="interface-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__targeted = YANGDynClass(base=yc_targeted_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted, is_container='container', yang_name="targeted", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__neighbors = YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp']

  def _get_global_(self):
    """
    Getter method for global_, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global (container)

    YANG Description: Platform wide LDP configuration and state
    """
    return self.__global_
      
  def _set_global_(self, v, load=False):
    """
    Setter method for global_, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_global_ is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_global_() directly.

    YANG Description: Platform wide LDP configuration and state
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_global__openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """global_ must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_global__openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__global_ = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_global_(self):
    self.__global_ = YANGDynClass(base=yc_global__openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_interface_attributes(self):
    """
    Getter method for interface_attributes, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes (container)

    YANG Description: Container including attributes for LDP-enabled
interfaces
    """
    return self.__interface_attributes
      
  def _set_interface_attributes(self, v, load=False):
    """
    Setter method for interface_attributes, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_interface_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_interface_attributes() directly.

    YANG Description: Container including attributes for LDP-enabled
interfaces
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interface_attributes_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes, is_container='container', yang_name="interface-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_attributes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_interface_attributes_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes, is_container='container', yang_name="interface-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__interface_attributes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_interface_attributes(self):
    self.__interface_attributes = YANGDynClass(base=yc_interface_attributes_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes, is_container='container', yang_name="interface-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_targeted(self):
    """
    Getter method for targeted, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted (container)

    YANG Description: Top container for targeted LDP state and configuration
attributes.
    """
    return self.__targeted
      
  def _set_targeted(self, v, load=False):
    """
    Setter method for targeted, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_targeted is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_targeted() directly.

    YANG Description: Top container for targeted LDP state and configuration
attributes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_targeted_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted, is_container='container', yang_name="targeted", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """targeted must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_targeted_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted, is_container='container', yang_name="targeted", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__targeted = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_targeted(self):
    self.__targeted = YANGDynClass(base=yc_targeted_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted, is_container='container', yang_name="targeted", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_neighbors(self):
    """
    Getter method for neighbors, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors (container)

    YANG Description: State and configuration LDP neighbors attributes
    """
    return self.__neighbors
      
  def _set_neighbors(self, v, load=False):
    """
    Setter method for neighbors, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbors is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbors() directly.

    YANG Description: State and configuration LDP neighbors attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbors must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__neighbors = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbors(self):
    self.__neighbors = YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  global_ = __builtin__.property(_get_global_, _set_global_)
  interface_attributes = __builtin__.property(_get_interface_attributes, _set_interface_attributes)
  targeted = __builtin__.property(_get_targeted, _set_targeted)
  neighbors = __builtin__.property(_get_neighbors, _set_neighbors)


  _pyangbind_elements = OrderedDict([('global_', global_), ('interface_attributes', interface_attributes), ('targeted', targeted), ('neighbors', neighbors), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_aggregate_sid_counters_aggregate_sid_counter_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/segment-routing/aggregate-sid-counters/aggregate-sid-counter/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters for per-SID statistics
  """
  __slots__ = ('_path_helper', '_extmethods', '__mpls_label','__in_pkts','__in_octets','__out_pkts','__out_octets',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__mpls_label = 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="mpls-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    self.__in_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'segment-routing', 'aggregate-sid-counters', 'aggregate-sid-counter', 'state']

  def _get_mpls_label(self):
    """
    Getter method for mpls_label, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/aggregate_sid_counters/aggregate_sid_counter/state/mpls_label (oc-mplst:mpls-label)

    YANG Description: The MPLS label used for the segment identifier
    """
    return self.__mpls_label
      
  def _set_mpls_label(self, v, load=False):
    """
    Setter method for mpls_label, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/aggregate_sid_counters/aggregate_sid_counter/state/mpls_label (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mpls_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mpls_label() directly.

    YANG Description: The MPLS label used for the segment identifier
    """
    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="mpls-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mpls_label must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="mpls-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)""",
        })

    self.__mpls_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mpls_label(self):
    self.__mpls_label = 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="mpls-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)


  def _get_in_pkts(self):
    """
    Getter method for in_pkts, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/aggregate_sid_counters/aggregate_sid_counter/state/in_pkts (yang:counter64)

    YANG Description: A cumulative counter of the packets received within the context
which have matched a label corresponding to an SR Segment Identifier.
    """
    return self.__in_pkts
      
  def _set_in_pkts(self, v, load=False):
    """
    Setter method for in_pkts, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/aggregate_sid_counters/aggregate_sid_counter/state/in_pkts (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_pkts() directly.

    YANG Description: A cumulative counter of the packets received within the context
which have matched a label corresponding to an SR Segment Identifier.
    """
    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="in-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_pkts must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__in_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_pkts(self):
    self.__in_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_octets(self):
    """
    Getter method for in_octets, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/aggregate_sid_counters/aggregate_sid_counter/state/in_octets (yang:counter64)

    YANG Description: The cumulative counter of the total bytes received within the context
which have matched a label corresponding to an SR Segment Identifier
    """
    return self.__in_octets
      
  def _set_in_octets(self, v, load=False):
    """
    Setter method for in_octets, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/aggregate_sid_counters/aggregate_sid_counter/state/in_octets (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_octets() directly.

    YANG Description: The cumulative counter of the total bytes received within the context
which have matched a label corresponding to an SR Segment Identifier
    """
    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="in-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_octets must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__in_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_octets(self):
    self.__in_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_pkts(self):
    """
    Getter method for out_pkts, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/aggregate_sid_counters/aggregate_sid_counter/state/out_pkts (yang:counter64)

    YANG Description: A cumulative counter of the total number of packets transmitted by
the local system within the context which have a label imposed that
corresponds to an Segment Identifier.
    """
    return self.__out_pkts
      
  def _set_out_pkts(self, v, load=False):
    """
    Setter method for out_pkts, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/aggregate_sid_counters/aggregate_sid_counter/state/out_pkts (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_pkts() directly.

    YANG Description: A cumulative counter of the total number of packets transmitted by
the local system within the context which have a label imposed that
corresponds to an Segment Identifier.
    """
    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="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_pkts must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_pkts(self):
    self.__out_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_octets(self):
    """
    Getter method for out_octets, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/aggregate_sid_counters/aggregate_sid_counter/state/out_octets (yang:counter64)

    YANG Description: A cumulative counter of the total bytes transmitted by the local
system within the context which have a label imported that
corresponds to an SR Segment Identifier.
    """
    return self.__out_octets
      
  def _set_out_octets(self, v, load=False):
    """
    Setter method for out_octets, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/aggregate_sid_counters/aggregate_sid_counter/state/out_octets (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_octets() directly.

    YANG Description: A cumulative counter of the total bytes transmitted by the local
system within the context which have a label imported that
corresponds to an SR Segment Identifier.
    """
    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="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_octets must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_octets(self):
    self.__out_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)

  mpls_label = __builtin__.property(_get_mpls_label)
  in_pkts = __builtin__.property(_get_in_pkts)
  in_octets = __builtin__.property(_get_in_octets)
  out_pkts = __builtin__.property(_get_out_pkts)
  out_octets = __builtin__.property(_get_out_octets)


  _pyangbind_elements = OrderedDict([('mpls_label', mpls_label), ('in_pkts', in_pkts), ('in_octets', in_octets), ('out_pkts', out_pkts), ('out_octets', out_octets), ])


class yc_aggregate_sid_counter_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_aggregate_sid_counters_aggregate_sid_counter(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/segment-routing/aggregate-sid-counters/aggregate-sid-counter. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Counters aggregated across all of the interfaces of the local
system corresponding to traffic received or forwarded with a
particular SID
  """
  __slots__ = ('_path_helper', '_extmethods', '__mpls_label','__state',)

  _yang_name = 'aggregate-sid-counter'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__mpls_label = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mpls-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_aggregate_sid_counters_aggregate_sid_counter_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'segment-routing', 'aggregate-sid-counters', 'aggregate-sid-counter']

  def _get_mpls_label(self):
    """
    Getter method for mpls_label, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/aggregate_sid_counters/aggregate_sid_counter/mpls_label (leafref)

    YANG Description: The MPLS label representing the segment identifier
    """
    return self.__mpls_label
      
  def _set_mpls_label(self, v, load=False):
    """
    Setter method for mpls_label, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/aggregate_sid_counters/aggregate_sid_counter/mpls_label (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mpls_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mpls_label() directly.

    YANG Description: The MPLS label representing the segment identifier
    """
    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="mpls-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mpls_label must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mpls-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__mpls_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mpls_label(self):
    self.__mpls_label = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mpls-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/aggregate_sid_counters/aggregate_sid_counter/state (container)

    YANG Description: State parameters for per-SID statistics
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/aggregate_sid_counters/aggregate_sid_counter/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 parameters for per-SID statistics
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_aggregate_sid_counters_aggregate_sid_counter_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_aggregate_sid_counters_aggregate_sid_counter_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_aggregate_sid_counters_aggregate_sid_counter_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  mpls_label = __builtin__.property(_get_mpls_label)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('mpls_label', mpls_label), ('state', state), ])


class yc_aggregate_sid_counters_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_aggregate_sid_counters(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/segment-routing/aggregate-sid-counters. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Per-SID counters aggregated across all interfaces on the local system
  """
  __slots__ = ('_path_helper', '_extmethods', '__aggregate_sid_counter',)

  _yang_name = 'aggregate-sid-counters'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__aggregate_sid_counter = YANGDynClass(base=YANGListType("mpls_label",yc_aggregate_sid_counter_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_aggregate_sid_counters_aggregate_sid_counter, yang_name="aggregate-sid-counter", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mpls-label', extensions=None), is_container='list', yang_name="aggregate-sid-counter", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'segment-routing', 'aggregate-sid-counters']

  def _get_aggregate_sid_counter(self):
    """
    Getter method for aggregate_sid_counter, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/aggregate_sid_counters/aggregate_sid_counter (list)

    YANG Description: Counters aggregated across all of the interfaces of the local
system corresponding to traffic received or forwarded with a
particular SID
    """
    return self.__aggregate_sid_counter
      
  def _set_aggregate_sid_counter(self, v, load=False):
    """
    Setter method for aggregate_sid_counter, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/aggregate_sid_counters/aggregate_sid_counter (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_aggregate_sid_counter is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_aggregate_sid_counter() directly.

    YANG Description: Counters aggregated across all of the interfaces of the local
system corresponding to traffic received or forwarded with a
particular SID
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("mpls_label",yc_aggregate_sid_counter_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_aggregate_sid_counters_aggregate_sid_counter, yang_name="aggregate-sid-counter", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mpls-label', extensions=None), is_container='list', yang_name="aggregate-sid-counter", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """aggregate_sid_counter must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("mpls_label",yc_aggregate_sid_counter_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_aggregate_sid_counters_aggregate_sid_counter, yang_name="aggregate-sid-counter", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mpls-label', extensions=None), is_container='list', yang_name="aggregate-sid-counter", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__aggregate_sid_counter = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_aggregate_sid_counter(self):
    self.__aggregate_sid_counter = YANGDynClass(base=YANGListType("mpls_label",yc_aggregate_sid_counter_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_aggregate_sid_counters_aggregate_sid_counter, yang_name="aggregate-sid-counter", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mpls-label', extensions=None), is_container='list', yang_name="aggregate-sid-counter", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  aggregate_sid_counter = __builtin__.property(_get_aggregate_sid_counter, _set_aggregate_sid_counter)


  _pyangbind_elements = OrderedDict([('aggregate_sid_counter', aggregate_sid_counter), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/segment-routing/interfaces/interface/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: MPLS-specific Segment Routing configuration parameters
related to an interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'segment-routing', 'interfaces', 'interface', 'config']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/config/interface_id (string)

    YANG Description: A unique 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 /network_instances/network_instance/mpls/signaling_protocols/segment_routing/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: A unique 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/segment-routing/interfaces/interface/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: MPLS-specific Segment Routing operational state parameters
related to an interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id','__in_pkts','__in_octets','__out_pkts','__out_octets',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__in_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'segment-routing', 'interfaces', 'interface', 'state']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/state/interface_id (string)

    YANG Description: A unique 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 /network_instances/network_instance/mpls/signaling_protocols/segment_routing/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: A unique 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_in_pkts(self):
    """
    Getter method for in_pkts, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/state/in_pkts (yang:counter64)

    YANG Description: A cumulative counter of the packets received within the context
which have matched a label corresponding to an SR Segment Identifier.
    """
    return self.__in_pkts
      
  def _set_in_pkts(self, v, load=False):
    """
    Setter method for in_pkts, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/state/in_pkts (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_pkts() directly.

    YANG Description: A cumulative counter of the packets received within the context
which have matched a label corresponding to an SR Segment Identifier.
    """
    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="in-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_pkts must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__in_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_pkts(self):
    self.__in_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_octets(self):
    """
    Getter method for in_octets, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/state/in_octets (yang:counter64)

    YANG Description: The cumulative counter of the total bytes received within the context
which have matched a label corresponding to an SR Segment Identifier
    """
    return self.__in_octets
      
  def _set_in_octets(self, v, load=False):
    """
    Setter method for in_octets, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/state/in_octets (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_octets() directly.

    YANG Description: The cumulative counter of the total bytes received within the context
which have matched a label corresponding to an SR Segment Identifier
    """
    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="in-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_octets must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__in_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_octets(self):
    self.__in_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_pkts(self):
    """
    Getter method for out_pkts, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/state/out_pkts (yang:counter64)

    YANG Description: A cumulative counter of the total number of packets transmitted by
the local system within the context which have a label imposed that
corresponds to an Segment Identifier.
    """
    return self.__out_pkts
      
  def _set_out_pkts(self, v, load=False):
    """
    Setter method for out_pkts, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/state/out_pkts (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_pkts() directly.

    YANG Description: A cumulative counter of the total number of packets transmitted by
the local system within the context which have a label imposed that
corresponds to an Segment Identifier.
    """
    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="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_pkts must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_pkts(self):
    self.__out_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_octets(self):
    """
    Getter method for out_octets, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/state/out_octets (yang:counter64)

    YANG Description: A cumulative counter of the total bytes transmitted by the local
system within the context which have a label imported that
corresponds to an SR Segment Identifier.
    """
    return self.__out_octets
      
  def _set_out_octets(self, v, load=False):
    """
    Setter method for out_octets, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/state/out_octets (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_octets() directly.

    YANG Description: A cumulative counter of the total bytes transmitted by the local
system within the context which have a label imported that
corresponds to an SR Segment Identifier.
    """
    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="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_octets must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_octets(self):
    self.__out_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)

  interface_id = __builtin__.property(_get_interface_id)
  in_pkts = __builtin__.property(_get_in_pkts)
  in_octets = __builtin__.property(_get_in_octets)
  out_pkts = __builtin__.property(_get_out_pkts)
  out_octets = __builtin__.property(_get_out_octets)


  _pyangbind_elements = OrderedDict([('interface_id', interface_id), ('in_pkts', in_pkts), ('in_octets', in_octets), ('out_pkts', out_pkts), ('out_octets', out_octets), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/segment-routing/interfaces/interface/sid-counters/sid-counter/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters for per-SID statistics
  """
  __slots__ = ('_path_helper', '_extmethods', '__mpls_label','__in_pkts','__in_octets','__out_pkts','__out_octets',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__mpls_label = 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="mpls-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    self.__in_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'segment-routing', 'interfaces', 'interface', 'sid-counters', 'sid-counter', 'state']

  def _get_mpls_label(self):
    """
    Getter method for mpls_label, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/state/mpls_label (oc-mplst:mpls-label)

    YANG Description: The MPLS label used for the segment identifier
    """
    return self.__mpls_label
      
  def _set_mpls_label(self, v, load=False):
    """
    Setter method for mpls_label, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/state/mpls_label (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mpls_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mpls_label() directly.

    YANG Description: The MPLS label used for the segment identifier
    """
    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="mpls-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mpls_label must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="mpls-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)""",
        })

    self.__mpls_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mpls_label(self):
    self.__mpls_label = 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="mpls-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)


  def _get_in_pkts(self):
    """
    Getter method for in_pkts, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/state/in_pkts (yang:counter64)

    YANG Description: A cumulative counter of the packets received within the context
which have matched a label corresponding to an SR Segment Identifier.
    """
    return self.__in_pkts
      
  def _set_in_pkts(self, v, load=False):
    """
    Setter method for in_pkts, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/state/in_pkts (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_pkts() directly.

    YANG Description: A cumulative counter of the packets received within the context
which have matched a label corresponding to an SR Segment Identifier.
    """
    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="in-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_pkts must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__in_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_pkts(self):
    self.__in_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_octets(self):
    """
    Getter method for in_octets, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/state/in_octets (yang:counter64)

    YANG Description: The cumulative counter of the total bytes received within the context
which have matched a label corresponding to an SR Segment Identifier
    """
    return self.__in_octets
      
  def _set_in_octets(self, v, load=False):
    """
    Setter method for in_octets, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/state/in_octets (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_octets() directly.

    YANG Description: The cumulative counter of the total bytes received within the context
which have matched a label corresponding to an SR Segment Identifier
    """
    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="in-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_octets must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__in_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_octets(self):
    self.__in_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_pkts(self):
    """
    Getter method for out_pkts, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/state/out_pkts (yang:counter64)

    YANG Description: A cumulative counter of the total number of packets transmitted by
the local system within the context which have a label imposed that
corresponds to an Segment Identifier.
    """
    return self.__out_pkts
      
  def _set_out_pkts(self, v, load=False):
    """
    Setter method for out_pkts, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/state/out_pkts (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_pkts() directly.

    YANG Description: A cumulative counter of the total number of packets transmitted by
the local system within the context which have a label imposed that
corresponds to an Segment Identifier.
    """
    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="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_pkts must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_pkts(self):
    self.__out_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_octets(self):
    """
    Getter method for out_octets, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/state/out_octets (yang:counter64)

    YANG Description: A cumulative counter of the total bytes transmitted by the local
system within the context which have a label imported that
corresponds to an SR Segment Identifier.
    """
    return self.__out_octets
      
  def _set_out_octets(self, v, load=False):
    """
    Setter method for out_octets, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/state/out_octets (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_octets() directly.

    YANG Description: A cumulative counter of the total bytes transmitted by the local
system within the context which have a label imported that
corresponds to an SR Segment Identifier.
    """
    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="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_octets must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_octets(self):
    self.__out_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)

  mpls_label = __builtin__.property(_get_mpls_label)
  in_pkts = __builtin__.property(_get_in_pkts)
  in_octets = __builtin__.property(_get_in_octets)
  out_pkts = __builtin__.property(_get_out_pkts)
  out_octets = __builtin__.property(_get_out_octets)


  _pyangbind_elements = OrderedDict([('mpls_label', mpls_label), ('in_pkts', in_pkts), ('in_octets', in_octets), ('out_pkts', out_pkts), ('out_octets', out_octets), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter_forwarding_classes_forwarding_class_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/segment-routing/interfaces/interface/sid-counters/sid-counter/forwarding-classes/forwarding-class/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Per-SID, per forwarding class counters for Segment Routing
with the MPLS dataplane
  """
  __slots__ = ('_path_helper', '_extmethods', '__exp','__in_pkts','__in_octets','__out_pkts','__out_octets',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__exp = 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="exp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__in_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'segment-routing', 'interfaces', 'interface', 'sid-counters', 'sid-counter', 'forwarding-classes', 'forwarding-class', 'state']

  def _get_exp(self):
    """
    Getter method for exp, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/forwarding_classes/forwarding_class/state/exp (uint8)

    YANG Description: The value of the MPLS EXP (experimental) or Traffic Class bits that the
SID statistics relate to. Packets received with a MPLS label value
equal to the SID's MPLS label and EXP bits equal to the this value
should be counted towards the associated ingress statistics. Packets
that are forwarded to the destination MPLS label corresponding to the
SID should be counted towards this value. In the egress direction, where
forwarding follows a SID value that requires PHP at the local node,
packets should still be counted towards the egress counters.
    """
    return self.__exp
      
  def _set_exp(self, v, load=False):
    """
    Setter method for exp, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/forwarding_classes/forwarding_class/state/exp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_exp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_exp() directly.

    YANG Description: The value of the MPLS EXP (experimental) or Traffic Class bits that the
SID statistics relate to. Packets received with a MPLS label value
equal to the SID's MPLS label and EXP bits equal to the this value
should be counted towards the associated ingress statistics. Packets
that are forwarded to the destination MPLS label corresponding to the
SID should be counted towards this value. In the egress direction, where
forwarding follows a SID value that requires PHP at the local node,
packets should still be counted towards the egress counters.
    """
    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="exp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """exp 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..7']}), is_leaf=True, yang_name="exp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__exp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_exp(self):
    self.__exp = 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="exp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_in_pkts(self):
    """
    Getter method for in_pkts, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/forwarding_classes/forwarding_class/state/in_pkts (yang:counter64)

    YANG Description: A cumulative counter of the packets received within the context
which have matched a label corresponding to an SR Segment Identifier.
    """
    return self.__in_pkts
      
  def _set_in_pkts(self, v, load=False):
    """
    Setter method for in_pkts, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/forwarding_classes/forwarding_class/state/in_pkts (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_pkts() directly.

    YANG Description: A cumulative counter of the packets received within the context
which have matched a label corresponding to an SR Segment Identifier.
    """
    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="in-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_pkts must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__in_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_pkts(self):
    self.__in_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_octets(self):
    """
    Getter method for in_octets, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/forwarding_classes/forwarding_class/state/in_octets (yang:counter64)

    YANG Description: The cumulative counter of the total bytes received within the context
which have matched a label corresponding to an SR Segment Identifier
    """
    return self.__in_octets
      
  def _set_in_octets(self, v, load=False):
    """
    Setter method for in_octets, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/forwarding_classes/forwarding_class/state/in_octets (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_octets() directly.

    YANG Description: The cumulative counter of the total bytes received within the context
which have matched a label corresponding to an SR Segment Identifier
    """
    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="in-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_octets must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__in_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_octets(self):
    self.__in_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_pkts(self):
    """
    Getter method for out_pkts, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/forwarding_classes/forwarding_class/state/out_pkts (yang:counter64)

    YANG Description: A cumulative counter of the total number of packets transmitted by
the local system within the context which have a label imposed that
corresponds to an Segment Identifier.
    """
    return self.__out_pkts
      
  def _set_out_pkts(self, v, load=False):
    """
    Setter method for out_pkts, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/forwarding_classes/forwarding_class/state/out_pkts (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_pkts() directly.

    YANG Description: A cumulative counter of the total number of packets transmitted by
the local system within the context which have a label imposed that
corresponds to an Segment Identifier.
    """
    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="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_pkts must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_pkts(self):
    self.__out_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_octets(self):
    """
    Getter method for out_octets, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/forwarding_classes/forwarding_class/state/out_octets (yang:counter64)

    YANG Description: A cumulative counter of the total bytes transmitted by the local
system within the context which have a label imported that
corresponds to an SR Segment Identifier.
    """
    return self.__out_octets
      
  def _set_out_octets(self, v, load=False):
    """
    Setter method for out_octets, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/forwarding_classes/forwarding_class/state/out_octets (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_octets() directly.

    YANG Description: A cumulative counter of the total bytes transmitted by the local
system within the context which have a label imported that
corresponds to an SR Segment Identifier.
    """
    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="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_octets must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_octets(self):
    self.__out_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)

  exp = __builtin__.property(_get_exp)
  in_pkts = __builtin__.property(_get_in_pkts)
  in_octets = __builtin__.property(_get_in_octets)
  out_pkts = __builtin__.property(_get_out_pkts)
  out_octets = __builtin__.property(_get_out_octets)


  _pyangbind_elements = OrderedDict([('exp', exp), ('in_pkts', in_pkts), ('in_octets', in_octets), ('out_pkts', out_pkts), ('out_octets', out_octets), ])


class yc_forwarding_class_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter_forwarding_classes_forwarding_class(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/segment-routing/interfaces/interface/sid-counters/sid-counter/forwarding-classes/forwarding-class. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: SID entries for the forwarding class associated with the
referenced MPLS EXP.
  """
  __slots__ = ('_path_helper', '_extmethods', '__exp','__state',)

  _yang_name = 'forwarding-class'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__exp = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="exp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter_forwarding_classes_forwarding_class_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'segment-routing', 'interfaces', 'interface', 'sid-counters', 'sid-counter', 'forwarding-classes', 'forwarding-class']

  def _get_exp(self):
    """
    Getter method for exp, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/forwarding_classes/forwarding_class/exp (leafref)

    YANG Description: Reference to the value of the EXP bits of the segment
identifier.
    """
    return self.__exp
      
  def _set_exp(self, v, load=False):
    """
    Setter method for exp, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/forwarding_classes/forwarding_class/exp (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_exp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_exp() directly.

    YANG Description: Reference to the value of the EXP bits of the segment
identifier.
    """
    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="exp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """exp must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="exp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__exp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_exp(self):
    self.__exp = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="exp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/forwarding_classes/forwarding_class/state (container)

    YANG Description: Per-SID, per forwarding class counters for Segment Routing
with the MPLS dataplane
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/forwarding_classes/forwarding_class/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: Per-SID, per forwarding class counters for Segment Routing
with the MPLS dataplane
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter_forwarding_classes_forwarding_class_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter_forwarding_classes_forwarding_class_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter_forwarding_classes_forwarding_class_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  exp = __builtin__.property(_get_exp)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('exp', exp), ('state', state), ])


class yc_forwarding_classes_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter_forwarding_classes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/segment-routing/interfaces/interface/sid-counters/sid-counter/forwarding-classes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Per-SID per-forwarding class counters for Segment Routing.
  """
  __slots__ = ('_path_helper', '_extmethods', '__forwarding_class',)

  _yang_name = 'forwarding-classes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__forwarding_class = YANGDynClass(base=YANGListType("exp",yc_forwarding_class_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter_forwarding_classes_forwarding_class, yang_name="forwarding-class", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='exp', extensions=None), is_container='list', yang_name="forwarding-class", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'segment-routing', 'interfaces', 'interface', 'sid-counters', 'sid-counter', 'forwarding-classes']

  def _get_forwarding_class(self):
    """
    Getter method for forwarding_class, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/forwarding_classes/forwarding_class (list)

    YANG Description: SID entries for the forwarding class associated with the
referenced MPLS EXP.
    """
    return self.__forwarding_class
      
  def _set_forwarding_class(self, v, load=False):
    """
    Setter method for forwarding_class, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/forwarding_classes/forwarding_class (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_forwarding_class is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_forwarding_class() directly.

    YANG Description: SID entries for the forwarding class associated with the
referenced MPLS EXP.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("exp",yc_forwarding_class_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter_forwarding_classes_forwarding_class, yang_name="forwarding-class", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='exp', extensions=None), is_container='list', yang_name="forwarding-class", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """forwarding_class must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("exp",yc_forwarding_class_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter_forwarding_classes_forwarding_class, yang_name="forwarding-class", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='exp', extensions=None), is_container='list', yang_name="forwarding-class", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__forwarding_class = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_forwarding_class(self):
    self.__forwarding_class = YANGDynClass(base=YANGListType("exp",yc_forwarding_class_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter_forwarding_classes_forwarding_class, yang_name="forwarding-class", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='exp', extensions=None), is_container='list', yang_name="forwarding-class", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  forwarding_class = __builtin__.property(_get_forwarding_class)


  _pyangbind_elements = OrderedDict([('forwarding_class', forwarding_class), ])


class yc_sid_counter_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/segment-routing/interfaces/interface/sid-counters/sid-counter. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Per segment identifier counters for the MPLS dataplane.
  """
  __slots__ = ('_path_helper', '_extmethods', '__mpls_label','__state','__forwarding_classes',)

  _yang_name = 'sid-counter'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__mpls_label = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mpls-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__forwarding_classes = YANGDynClass(base=yc_forwarding_classes_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter_forwarding_classes, is_container='container', yang_name="forwarding-classes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'segment-routing', 'interfaces', 'interface', 'sid-counters', 'sid-counter']

  def _get_mpls_label(self):
    """
    Getter method for mpls_label, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/mpls_label (leafref)

    YANG Description: The MPLS label representing the segment identifier
    """
    return self.__mpls_label
      
  def _set_mpls_label(self, v, load=False):
    """
    Setter method for mpls_label, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/mpls_label (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mpls_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mpls_label() directly.

    YANG Description: The MPLS label representing the segment identifier
    """
    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="mpls-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mpls_label must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mpls-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__mpls_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mpls_label(self):
    self.__mpls_label = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mpls-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/state (container)

    YANG Description: State parameters for per-SID statistics
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/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 parameters for per-SID statistics
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_forwarding_classes(self):
    """
    Getter method for forwarding_classes, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/forwarding_classes (container)

    YANG Description: Per-SID per-forwarding class counters for Segment Routing.
    """
    return self.__forwarding_classes
      
  def _set_forwarding_classes(self, v, load=False):
    """
    Setter method for forwarding_classes, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/forwarding_classes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_forwarding_classes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_forwarding_classes() directly.

    YANG Description: Per-SID per-forwarding class counters for Segment Routing.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_forwarding_classes_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter_forwarding_classes, is_container='container', yang_name="forwarding-classes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """forwarding_classes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_forwarding_classes_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter_forwarding_classes, is_container='container', yang_name="forwarding-classes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__forwarding_classes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_forwarding_classes(self):
    self.__forwarding_classes = YANGDynClass(base=yc_forwarding_classes_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter_forwarding_classes, is_container='container', yang_name="forwarding-classes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  mpls_label = __builtin__.property(_get_mpls_label)
  state = __builtin__.property(_get_state)
  forwarding_classes = __builtin__.property(_get_forwarding_classes)


  _pyangbind_elements = OrderedDict([('mpls_label', mpls_label), ('state', state), ('forwarding_classes', forwarding_classes), ])


class yc_sid_counters_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/segment-routing/interfaces/interface/sid-counters. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Per-SID statistics for MPLS
  """
  __slots__ = ('_path_helper', '_extmethods', '__sid_counter',)

  _yang_name = 'sid-counters'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__sid_counter = YANGDynClass(base=YANGListType("mpls_label",yc_sid_counter_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter, yang_name="sid-counter", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mpls-label', extensions=None), is_container='list', yang_name="sid-counter", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'segment-routing', 'interfaces', 'interface', 'sid-counters']

  def _get_sid_counter(self):
    """
    Getter method for sid_counter, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter (list)

    YANG Description: Per segment identifier counters for the MPLS dataplane.
    """
    return self.__sid_counter
      
  def _set_sid_counter(self, v, load=False):
    """
    Setter method for sid_counter, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sid_counter is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sid_counter() directly.

    YANG Description: Per segment identifier counters for the MPLS dataplane.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("mpls_label",yc_sid_counter_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter, yang_name="sid-counter", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mpls-label', extensions=None), is_container='list', yang_name="sid-counter", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sid_counter must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("mpls_label",yc_sid_counter_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter, yang_name="sid-counter", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mpls-label', extensions=None), is_container='list', yang_name="sid-counter", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__sid_counter = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sid_counter(self):
    self.__sid_counter = YANGDynClass(base=YANGListType("mpls_label",yc_sid_counter_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter, yang_name="sid-counter", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mpls-label', extensions=None), is_container='list', yang_name="sid-counter", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  sid_counter = __builtin__.property(_get_sid_counter, _set_sid_counter)


  _pyangbind_elements = OrderedDict([('sid_counter', sid_counter), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_interface_ref_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/segment-routing/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'segment-routing', 'interfaces', 'interface', 'interface-ref', 'config']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/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 /network_instances/network_instance/mpls/signaling_protocols/segment_routing/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/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 /network_instances/network_instance/mpls/signaling_protocols/segment_routing/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_interface_ref_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/segment-routing/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'segment-routing', 'interfaces', 'interface', 'interface-ref', 'state']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/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 /network_instances/network_instance/mpls/signaling_protocols/segment_routing/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/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 /network_instances/network_instance/mpls/signaling_protocols/segment_routing/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_interface_ref(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/segment-routing/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
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'interface-ref'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'segment-routing', 'interfaces', 'interface', 'interface-ref']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/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 /network_instances/network_instance/mpls/signaling_protocols/segment_routing/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_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/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 /network_instances/network_instance/mpls/signaling_protocols/segment_routing/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_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', 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_interface_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/segment-routing/interfaces/interface. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Parameters and MPLS-specific configuration relating to Segment
Routing on an interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id','__config','__state','__sid_counters','__interface_ref',)

  _yang_name = 'interface'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__sid_counters = YANGDynClass(base=yc_sid_counters_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters, is_container='container', yang_name="sid-counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__interface_ref = YANGDynClass(base=yc_interface_ref_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'segment-routing', 'interfaces', 'interface']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/interface_id (leafref)

    YANG Description: A reference to the ID for the interface for which SR is
configured
    """
    return self.__interface_id
      
  def _set_interface_id(self, v, load=False):
    """
    Setter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/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: A reference to the ID for the interface for which SR is
configured
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/config (container)

    YANG Description: MPLS-specific Segment Routing configuration parameters
related to an interface.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/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: MPLS-specific Segment Routing configuration parameters
related to an interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/state (container)

    YANG Description: MPLS-specific Segment Routing operational state parameters
related to an interface.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/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: MPLS-specific Segment Routing operational state parameters
related to an interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_sid_counters(self):
    """
    Getter method for sid_counters, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters (container)

    YANG Description: Per-SID statistics for MPLS
    """
    return self.__sid_counters
      
  def _set_sid_counters(self, v, load=False):
    """
    Setter method for sid_counters, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sid_counters is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sid_counters() directly.

    YANG Description: Per-SID statistics for MPLS
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_sid_counters_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters, is_container='container', yang_name="sid-counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sid_counters must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_sid_counters_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters, is_container='container', yang_name="sid-counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__sid_counters = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sid_counters(self):
    self.__sid_counters = YANGDynClass(base=yc_sid_counters_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters, is_container='container', yang_name="sid-counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_interface_ref(self):
    """
    Getter method for interface_ref, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/interface_ref (container)

    YANG Description: Reference to an interface or subinterface
    """
    return self.__interface_ref
      
  def _set_interface_ref(self, v, load=False):
    """
    Setter method for interface_ref, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/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
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interface_ref_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', 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)
  sid_counters = __builtin__.property(_get_sid_counters, _set_sid_counters)
  interface_ref = __builtin__.property(_get_interface_ref, _set_interface_ref)


  _pyangbind_elements = OrderedDict([('interface_id', interface_id), ('config', config), ('state', state), ('sid_counters', sid_counters), ('interface_ref', interface_ref), ])


class yc_interfaces_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/segment-routing/interfaces. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Interface related Segment Routing parameters.
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface',)

  _yang_name = 'interfaces'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'segment-routing', 'interfaces']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface (list)

    YANG Description: Parameters and MPLS-specific configuration relating to Segment
Routing on an interface.
    """
    return self.__interface
      
  def _set_interface(self, v, load=False):
    """
    Setter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/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: Parameters and MPLS-specific configuration relating to Segment
Routing on an interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("interface_id",yc_interface_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  interface = __builtin__.property(_get_interface, _set_interface)


  _pyangbind_elements = OrderedDict([('interface', interface), ])


class yc_segment_routing_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols/segment-routing. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: MPLS-specific Segment Routing configuration and operational state
parameters
  """
  __slots__ = ('_path_helper', '_extmethods', '__aggregate_sid_counters','__interfaces',)

  _yang_name = 'segment-routing'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__aggregate_sid_counters = YANGDynClass(base=yc_aggregate_sid_counters_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_aggregate_sid_counters, is_container='container', yang_name="aggregate-sid-counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__interfaces = YANGDynClass(base=yc_interfaces_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'segment-routing']

  def _get_aggregate_sid_counters(self):
    """
    Getter method for aggregate_sid_counters, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/aggregate_sid_counters (container)

    YANG Description: Per-SID counters aggregated across all interfaces on the local system
    """
    return self.__aggregate_sid_counters
      
  def _set_aggregate_sid_counters(self, v, load=False):
    """
    Setter method for aggregate_sid_counters, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/aggregate_sid_counters (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_aggregate_sid_counters is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_aggregate_sid_counters() directly.

    YANG Description: Per-SID counters aggregated across all interfaces on the local system
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_aggregate_sid_counters_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_aggregate_sid_counters, is_container='container', yang_name="aggregate-sid-counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """aggregate_sid_counters must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_aggregate_sid_counters_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_aggregate_sid_counters, is_container='container', yang_name="aggregate-sid-counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__aggregate_sid_counters = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_aggregate_sid_counters(self):
    self.__aggregate_sid_counters = YANGDynClass(base=yc_aggregate_sid_counters_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_aggregate_sid_counters, is_container='container', yang_name="aggregate-sid-counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_interfaces(self):
    """
    Getter method for interfaces, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces (container)

    YANG Description: Interface related Segment Routing parameters.
    """
    return self.__interfaces
      
  def _set_interfaces(self, v, load=False):
    """
    Setter method for interfaces, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/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: Interface related Segment Routing parameters.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interfaces_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  aggregate_sid_counters = __builtin__.property(_get_aggregate_sid_counters, _set_aggregate_sid_counters)
  interfaces = __builtin__.property(_get_interfaces, _set_interfaces)


  _pyangbind_elements = OrderedDict([('aggregate_sid_counters', aggregate_sid_counters), ('interfaces', interfaces), ])


class yc_signaling_protocols_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/signaling-protocols. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: top-level signaling protocol configuration
  """
  __slots__ = ('_path_helper', '_extmethods', '__rsvp_te','__ldp','__segment_routing',)

  _yang_name = 'signaling-protocols'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__rsvp_te = YANGDynClass(base=yc_rsvp_te_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te, is_container='container', yang_name="rsvp-te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__ldp = YANGDynClass(base=yc_ldp_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp, is_container='container', yang_name="ldp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__segment_routing = YANGDynClass(base=yc_segment_routing_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing, is_container='container', yang_name="segment-routing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols']

  def _get_rsvp_te(self):
    """
    Getter method for rsvp_te, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te (container)

    YANG Description: RSVP-TE global signaling protocol configuration
    """
    return self.__rsvp_te
      
  def _set_rsvp_te(self, v, load=False):
    """
    Setter method for rsvp_te, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_rsvp_te is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_rsvp_te() directly.

    YANG Description: RSVP-TE global signaling protocol configuration
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_rsvp_te_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te, is_container='container', yang_name="rsvp-te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """rsvp_te must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_rsvp_te_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te, is_container='container', yang_name="rsvp-te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__rsvp_te = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_rsvp_te(self):
    self.__rsvp_te = YANGDynClass(base=yc_rsvp_te_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_rsvp_te, is_container='container', yang_name="rsvp-te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_ldp(self):
    """
    Getter method for ldp, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp (container)

    YANG Description: LDP global signaling configuration
    """
    return self.__ldp
      
  def _set_ldp(self, v, load=False):
    """
    Setter method for ldp, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ldp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ldp() directly.

    YANG Description: LDP global signaling configuration
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ldp_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp, is_container='container', yang_name="ldp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ldp must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ldp_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp, is_container='container', yang_name="ldp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__ldp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ldp(self):
    self.__ldp = YANGDynClass(base=yc_ldp_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_ldp, is_container='container', yang_name="ldp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_segment_routing(self):
    """
    Getter method for segment_routing, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing (container)

    YANG Description: MPLS-specific Segment Routing configuration and operational state
parameters
    """
    return self.__segment_routing
      
  def _set_segment_routing(self, v, load=False):
    """
    Setter method for segment_routing, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_segment_routing is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_segment_routing() directly.

    YANG Description: MPLS-specific Segment Routing configuration and operational state
parameters
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_segment_routing_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing, is_container='container', yang_name="segment-routing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """segment_routing must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_segment_routing_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing, is_container='container', yang_name="segment-routing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__segment_routing = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_segment_routing(self):
    self.__segment_routing = YANGDynClass(base=yc_segment_routing_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols_segment_routing, is_container='container', yang_name="segment-routing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  rsvp_te = __builtin__.property(_get_rsvp_te, _set_rsvp_te)
  ldp = __builtin__.property(_get_ldp, _set_ldp)
  segment_routing = __builtin__.property(_get_segment_routing, _set_segment_routing)


  _pyangbind_elements = OrderedDict([('rsvp_te', rsvp_te), ('ldp', ldp), ('segment_routing', segment_routing), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/named-explicit-paths/named-explicit-path/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to named explicit
paths
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__sid_selection_mode','__sid_protection_required',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__sid_selection_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ADJ_SID_ONLY': {}, 'MIXED_MODE': {}},), default=six.text_type("MIXED_MODE"), is_leaf=True, yang_name="sid-selection-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)
    self.__sid_protection_required = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="sid-protection-required", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'named-explicit-paths', 'named-explicit-path', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/config/name (string)

    YANG Description: A string name that uniquely identifies an explicit
path
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/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: A string name that uniquely identifies an explicit
path
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_sid_selection_mode(self):
    """
    Getter method for sid_selection_mode, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/config/sid_selection_mode (enumeration)

    YANG Description: The restrictions placed on the SIDs to be selected by the
calculation method for the explicit path when it is
instantiated for a SR-TE LSP
    """
    return self.__sid_selection_mode
      
  def _set_sid_selection_mode(self, v, load=False):
    """
    Setter method for sid_selection_mode, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/config/sid_selection_mode (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sid_selection_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sid_selection_mode() directly.

    YANG Description: The restrictions placed on the SIDs to be selected by the
calculation method for the explicit path when it is
instantiated for a SR-TE LSP
    """
    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={'ADJ_SID_ONLY': {}, 'MIXED_MODE': {}},), default=six.text_type("MIXED_MODE"), is_leaf=True, yang_name="sid-selection-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sid_selection_mode must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ADJ_SID_ONLY': {}, 'MIXED_MODE': {}},), default=six.text_type("MIXED_MODE"), is_leaf=True, yang_name="sid-selection-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)""",
        })

    self.__sid_selection_mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sid_selection_mode(self):
    self.__sid_selection_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ADJ_SID_ONLY': {}, 'MIXED_MODE': {}},), default=six.text_type("MIXED_MODE"), is_leaf=True, yang_name="sid-selection-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)


  def _get_sid_protection_required(self):
    """
    Getter method for sid_protection_required, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/config/sid_protection_required (boolean)

    YANG Description: When this value is set to true, only SIDs that are
protected are to be selected by the calculating method
when the explicit path is instantiated by a SR-TE LSP.
    """
    return self.__sid_protection_required
      
  def _set_sid_protection_required(self, v, load=False):
    """
    Setter method for sid_protection_required, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/config/sid_protection_required (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sid_protection_required is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sid_protection_required() directly.

    YANG Description: When this value is set to true, only SIDs that are
protected are to be selected by the calculating method
when the explicit path is instantiated by a SR-TE LSP.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="sid-protection-required", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sid_protection_required must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="sid-protection-required", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__sid_protection_required = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sid_protection_required(self):
    self.__sid_protection_required = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="sid-protection-required", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  sid_selection_mode = __builtin__.property(_get_sid_selection_mode, _set_sid_selection_mode)
  sid_protection_required = __builtin__.property(_get_sid_protection_required, _set_sid_protection_required)


  _pyangbind_elements = OrderedDict([('name', name), ('sid_selection_mode', sid_selection_mode), ('sid_protection_required', sid_protection_required), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/named-explicit-paths/named-explicit-path/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 named
explicit paths
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__sid_selection_mode','__sid_protection_required',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__sid_selection_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ADJ_SID_ONLY': {}, 'MIXED_MODE': {}},), default=six.text_type("MIXED_MODE"), is_leaf=True, yang_name="sid-selection-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__sid_protection_required = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="sid-protection-required", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'named-explicit-paths', 'named-explicit-path', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/state/name (string)

    YANG Description: A string name that uniquely identifies an explicit
path
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/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: A string name that uniquely identifies an explicit
path
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_sid_selection_mode(self):
    """
    Getter method for sid_selection_mode, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/state/sid_selection_mode (enumeration)

    YANG Description: The restrictions placed on the SIDs to be selected by the
calculation method for the explicit path when it is
instantiated for a SR-TE LSP
    """
    return self.__sid_selection_mode
      
  def _set_sid_selection_mode(self, v, load=False):
    """
    Setter method for sid_selection_mode, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/state/sid_selection_mode (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sid_selection_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sid_selection_mode() directly.

    YANG Description: The restrictions placed on the SIDs to be selected by the
calculation method for the explicit path when it is
instantiated for a SR-TE LSP
    """
    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={'ADJ_SID_ONLY': {}, 'MIXED_MODE': {}},), default=six.text_type("MIXED_MODE"), is_leaf=True, yang_name="sid-selection-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sid_selection_mode must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ADJ_SID_ONLY': {}, 'MIXED_MODE': {}},), default=six.text_type("MIXED_MODE"), is_leaf=True, yang_name="sid-selection-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__sid_selection_mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sid_selection_mode(self):
    self.__sid_selection_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ADJ_SID_ONLY': {}, 'MIXED_MODE': {}},), default=six.text_type("MIXED_MODE"), is_leaf=True, yang_name="sid-selection-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_sid_protection_required(self):
    """
    Getter method for sid_protection_required, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/state/sid_protection_required (boolean)

    YANG Description: When this value is set to true, only SIDs that are
protected are to be selected by the calculating method
when the explicit path is instantiated by a SR-TE LSP.
    """
    return self.__sid_protection_required
      
  def _set_sid_protection_required(self, v, load=False):
    """
    Setter method for sid_protection_required, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/state/sid_protection_required (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sid_protection_required is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sid_protection_required() directly.

    YANG Description: When this value is set to true, only SIDs that are
protected are to be selected by the calculating method
when the explicit path is instantiated by a SR-TE LSP.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="sid-protection-required", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sid_protection_required must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="sid-protection-required", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__sid_protection_required = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sid_protection_required(self):
    self.__sid_protection_required = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="sid-protection-required", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  name = __builtin__.property(_get_name)
  sid_selection_mode = __builtin__.property(_get_sid_selection_mode)
  sid_protection_required = __builtin__.property(_get_sid_protection_required)


  _pyangbind_elements = OrderedDict([('name', name), ('sid_selection_mode', sid_selection_mode), ('sid_protection_required', sid_protection_required), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_explicit_route_objects_explicit_route_object_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/named-explicit-paths/named-explicit-path/explicit-route-objects/explicit-route-object/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to an explicit
route
  """
  __slots__ = ('_path_helper', '_extmethods', '__address','__hop_type','__index',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__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}'}),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}|:))'}),], is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)
    self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LOOSE': {}, 'STRICT': {}},), is_leaf=True, yang_name="hop-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='mpls-hop-type', is_config=True)
    self.__index = 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'named-explicit-paths', 'named-explicit-path', 'explicit-route-objects', 'explicit-route-object', 'config']

  def _get_address(self):
    """
    Getter method for address, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects/explicit_route_object/config/address (inet:ip-address)

    YANG Description: router hop for the LSP path
    """
    return self.__address
      
  def _set_address(self, v, load=False):
    """
    Setter method for address, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects/explicit_route_object/config/address (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address() directly.

    YANG Description: router hop for the LSP path
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)""",
        })

    self.__address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address(self):
    self.__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}'}),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}|:))'}),], is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)


  def _get_hop_type(self):
    """
    Getter method for hop_type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects/explicit_route_object/config/hop_type (mpls-hop-type)

    YANG Description: strict or loose hop
    """
    return self.__hop_type
      
  def _set_hop_type(self, v, load=False):
    """
    Setter method for hop_type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects/explicit_route_object/config/hop_type (mpls-hop-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hop_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hop_type() directly.

    YANG Description: strict or loose hop
    """
    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={'LOOSE': {}, 'STRICT': {}},), is_leaf=True, yang_name="hop-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='mpls-hop-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hop_type must be of a type compatible with mpls-hop-type""",
          'defined-type': "openconfig-network-instance:mpls-hop-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LOOSE': {}, 'STRICT': {}},), is_leaf=True, yang_name="hop-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='mpls-hop-type', is_config=True)""",
        })

    self.__hop_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hop_type(self):
    self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LOOSE': {}, 'STRICT': {}},), is_leaf=True, yang_name="hop-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='mpls-hop-type', is_config=True)


  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects/explicit_route_object/config/index (uint8)

    YANG Description: Index of this explicit route object to express
the order of hops in the path
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects/explicit_route_object/config/index (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: Index of this explicit route object to express
the order of hops in the path
    """
    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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
        })

    self.__index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_index(self):
    self.__index = 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)

  address = __builtin__.property(_get_address, _set_address)
  hop_type = __builtin__.property(_get_hop_type, _set_hop_type)
  index = __builtin__.property(_get_index, _set_index)


  _pyangbind_elements = OrderedDict([('address', address), ('hop_type', hop_type), ('index', index), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_explicit_route_objects_explicit_route_object_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/named-explicit-paths/named-explicit-path/explicit-route-objects/explicit-route-object/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to an explicit route
  """
  __slots__ = ('_path_helper', '_extmethods', '__address','__hop_type','__index',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__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}'}),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}|:))'}),], is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LOOSE': {}, 'STRICT': {}},), is_leaf=True, yang_name="hop-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='mpls-hop-type', is_config=False)
    self.__index = 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'named-explicit-paths', 'named-explicit-path', 'explicit-route-objects', 'explicit-route-object', 'state']

  def _get_address(self):
    """
    Getter method for address, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects/explicit_route_object/state/address (inet:ip-address)

    YANG Description: router hop for the LSP path
    """
    return self.__address
      
  def _set_address(self, v, load=False):
    """
    Setter method for address, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects/explicit_route_object/state/address (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address() directly.

    YANG Description: router hop for the LSP path
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)""",
        })

    self.__address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address(self):
    self.__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}'}),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}|:))'}),], is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)


  def _get_hop_type(self):
    """
    Getter method for hop_type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects/explicit_route_object/state/hop_type (mpls-hop-type)

    YANG Description: strict or loose hop
    """
    return self.__hop_type
      
  def _set_hop_type(self, v, load=False):
    """
    Setter method for hop_type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects/explicit_route_object/state/hop_type (mpls-hop-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hop_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hop_type() directly.

    YANG Description: strict or loose hop
    """
    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={'LOOSE': {}, 'STRICT': {}},), is_leaf=True, yang_name="hop-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='mpls-hop-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hop_type must be of a type compatible with mpls-hop-type""",
          'defined-type': "openconfig-network-instance:mpls-hop-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LOOSE': {}, 'STRICT': {}},), is_leaf=True, yang_name="hop-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='mpls-hop-type', is_config=False)""",
        })

    self.__hop_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hop_type(self):
    self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LOOSE': {}, 'STRICT': {}},), is_leaf=True, yang_name="hop-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='mpls-hop-type', is_config=False)


  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects/explicit_route_object/state/index (uint8)

    YANG Description: Index of this explicit route object to express
the order of hops in the path
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects/explicit_route_object/state/index (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: Index of this explicit route object to express
the order of hops in the path
    """
    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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_index(self):
    self.__index = 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)

  address = __builtin__.property(_get_address)
  hop_type = __builtin__.property(_get_hop_type)
  index = __builtin__.property(_get_index)


  _pyangbind_elements = OrderedDict([('address', address), ('hop_type', hop_type), ('index', index), ])


class yc_explicit_route_object_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_explicit_route_objects_explicit_route_object(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/named-explicit-paths/named-explicit-path/explicit-route-objects/explicit-route-object. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of explicit route objects
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__config','__state',)

  _yang_name = 'explicit-route-object'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_explicit_route_objects_explicit_route_object_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_explicit_route_objects_explicit_route_object_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'named-explicit-paths', 'named-explicit-path', 'explicit-route-objects', 'explicit-route-object']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects/explicit_route_object/index (leafref)

    YANG Description: Index of this explicit route object,
to express the order of hops in path
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects/explicit_route_object/index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: Index of this explicit route object,
to express the order of hops in path
    """
    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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_index(self):
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects/explicit_route_object/config (container)

    YANG Description: Configuration parameters relating to an explicit
route
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects/explicit_route_object/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 an explicit
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_explicit_route_objects_explicit_route_object_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_explicit_route_objects_explicit_route_object_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_explicit_route_objects_explicit_route_object_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects/explicit_route_object/state (container)

    YANG Description: State parameters relating to an explicit route
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects/explicit_route_object/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 parameters relating to an explicit route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_explicit_route_objects_explicit_route_object_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_explicit_route_objects_explicit_route_object_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_explicit_route_objects_explicit_route_object_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  index = __builtin__.property(_get_index, _set_index)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('index', index), ('config', config), ('state', state), ])


class yc_explicit_route_objects_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_explicit_route_objects(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/named-explicit-paths/named-explicit-path/explicit-route-objects. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for EROs
  """
  __slots__ = ('_path_helper', '_extmethods', '__explicit_route_object',)

  _yang_name = 'explicit-route-objects'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__explicit_route_object = YANGDynClass(base=YANGListType("index",yc_explicit_route_object_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_explicit_route_objects_explicit_route_object, yang_name="explicit-route-object", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="explicit-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'named-explicit-paths', 'named-explicit-path', 'explicit-route-objects']

  def _get_explicit_route_object(self):
    """
    Getter method for explicit_route_object, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects/explicit_route_object (list)

    YANG Description: List of explicit route objects
    """
    return self.__explicit_route_object
      
  def _set_explicit_route_object(self, v, load=False):
    """
    Setter method for explicit_route_object, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects/explicit_route_object (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_explicit_route_object is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_explicit_route_object() directly.

    YANG Description: List of explicit route objects
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("index",yc_explicit_route_object_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_explicit_route_objects_explicit_route_object, yang_name="explicit-route-object", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="explicit-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """explicit_route_object must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("index",yc_explicit_route_object_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_explicit_route_objects_explicit_route_object, yang_name="explicit-route-object", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="explicit-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__explicit_route_object = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_explicit_route_object(self):
    self.__explicit_route_object = YANGDynClass(base=YANGListType("index",yc_explicit_route_object_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_explicit_route_objects_explicit_route_object, yang_name="explicit-route-object", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="explicit-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  explicit_route_object = __builtin__.property(_get_explicit_route_object, _set_explicit_route_object)


  _pyangbind_elements = OrderedDict([('explicit_route_object', explicit_route_object), ])


class yc_named_explicit_path_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/named-explicit-paths/named-explicit-path. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A list of explicit paths
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state','__explicit_route_objects',)

  _yang_name = 'named-explicit-path'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__explicit_route_objects = YANGDynClass(base=yc_explicit_route_objects_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_explicit_route_objects, is_container='container', yang_name="explicit-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'named-explicit-paths', 'named-explicit-path']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/name (leafref)

    YANG Description: A string name that uniquely identifies
an explicit path
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/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: A string name that uniquely identifies
an explicit path
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/config (container)

    YANG Description: Configuration parameters relating to named explicit
paths
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/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 named explicit
paths
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/state (container)

    YANG Description: Operational state parameters relating to the named
explicit paths
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/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 named
explicit paths
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_explicit_route_objects(self):
    """
    Getter method for explicit_route_objects, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects (container)

    YANG Description: Enclosing container for EROs
    """
    return self.__explicit_route_objects
      
  def _set_explicit_route_objects(self, v, load=False):
    """
    Setter method for explicit_route_objects, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_explicit_route_objects is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_explicit_route_objects() directly.

    YANG Description: Enclosing container for EROs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_explicit_route_objects_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_explicit_route_objects, is_container='container', yang_name="explicit-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """explicit_route_objects must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_explicit_route_objects_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_explicit_route_objects, is_container='container', yang_name="explicit-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__explicit_route_objects = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_explicit_route_objects(self):
    self.__explicit_route_objects = YANGDynClass(base=yc_explicit_route_objects_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_explicit_route_objects, is_container='container', yang_name="explicit-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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)
  explicit_route_objects = __builtin__.property(_get_explicit_route_objects, _set_explicit_route_objects)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ('explicit_route_objects', explicit_route_objects), ])


class yc_named_explicit_paths_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/named-explicit-paths. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for the named explicit paths
  """
  __slots__ = ('_path_helper', '_extmethods', '__named_explicit_path',)

  _yang_name = 'named-explicit-paths'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__named_explicit_path = YANGDynClass(base=YANGListType("name",yc_named_explicit_path_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path, yang_name="named-explicit-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="named-explicit-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'named-explicit-paths']

  def _get_named_explicit_path(self):
    """
    Getter method for named_explicit_path, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path (list)

    YANG Description: A list of explicit paths
    """
    return self.__named_explicit_path
      
  def _set_named_explicit_path(self, v, load=False):
    """
    Setter method for named_explicit_path, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_named_explicit_path is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_named_explicit_path() directly.

    YANG Description: A list of explicit paths
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_named_explicit_path_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path, yang_name="named-explicit-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="named-explicit-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """named_explicit_path must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_named_explicit_path_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path, yang_name="named-explicit-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="named-explicit-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__named_explicit_path = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_named_explicit_path(self):
    self.__named_explicit_path = YANGDynClass(base=YANGListType("name",yc_named_explicit_path_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path, yang_name="named-explicit-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="named-explicit-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  named_explicit_path = __builtin__.property(_get_named_explicit_path, _set_named_explicit_path)


  _pyangbind_elements = OrderedDict([('named_explicit_path', named_explicit_path), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters related to TE tunnels:
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__type','__signaling_protocol','__description','__admin_status','__preference','__metric_type','__metric','__shortcut_eligible','__protection_style_requested','__reoptimize_timer','__source','__soft_preemption','__setup_priority','__hold_priority',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__signaling_protocol = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="signaling-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__description = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__admin_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:ADMIN_UP"), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LSP_METRIC_INHERITED"), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='int32', is_config=True)
    self.__shortcut_eligible = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="shortcut-eligible", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__protection_style_requested = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:UNPROTECTED"), is_leaf=True, yang_name="protection-style-requested", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__reoptimize_timer = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="reoptimize-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__source = 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}'}),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}|:))'}),], is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)
    self.__soft_preemption = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="soft-preemption", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/name (string)

    YANG Description: The tunnel name
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/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: The tunnel name
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/type (identityref)

    YANG Description: Tunnel type, p2p or p2mp
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/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: Tunnel type, p2p or p2mp
    """
    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={'P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', 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={'P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_signaling_protocol(self):
    """
    Getter method for signaling_protocol, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/signaling_protocol (identityref)

    YANG Description: Signaling protocol used to set up this tunnel
    """
    return self.__signaling_protocol
      
  def _set_signaling_protocol(self, v, load=False):
    """
    Setter method for signaling_protocol, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/signaling_protocol (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_signaling_protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_signaling_protocol() directly.

    YANG Description: Signaling protocol used to set up this tunnel
    """
    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={'PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="signaling-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """signaling_protocol must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="signaling-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__signaling_protocol = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_signaling_protocol(self):
    self.__signaling_protocol = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="signaling-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_description(self):
    """
    Getter method for description, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/description (string)

    YANG Description: optional text description for the tunnel
    """
    return self.__description
      
  def _set_description(self, v, load=False):
    """
    Setter method for description, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/description (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_description is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_description() directly.

    YANG Description: optional text description for the tunnel
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """description must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)""",
        })

    self.__description = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_description(self):
    self.__description = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_admin_status(self):
    """
    Getter method for admin_status, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/admin_status (identityref)

    YANG Description: TE tunnel administrative state.
    """
    return self.__admin_status
      
  def _set_admin_status(self, v, load=False):
    """
    Setter method for admin_status, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/admin_status (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_admin_status is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_admin_status() directly.

    YANG Description: TE tunnel administrative state.
    """
    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={'ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:ADMIN_UP"), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """admin_status must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:ADMIN_UP"), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__admin_status = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_admin_status(self):
    self.__admin_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:ADMIN_UP"), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_preference(self):
    """
    Getter method for preference, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/preference (uint8)

    YANG Description: Specifies a preference for this tunnel.
A lower number signifies a better preference
    """
    return self.__preference
      
  def _set_preference(self, v, load=False):
    """
    Setter method for preference, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/preference (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_preference is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_preference() directly.

    YANG Description: Specifies a preference for this tunnel.
A lower number signifies a better preference
    """
    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': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """preference 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': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
        })

    self.__preference = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_preference(self):
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)


  def _get_metric_type(self):
    """
    Getter method for metric_type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/metric_type (identityref)

    YANG Description: The type of metric specification that should be used to set
the LSP(s) metric
    """
    return self.__metric_type
      
  def _set_metric_type(self, v, load=False):
    """
    Setter method for metric_type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/metric_type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric_type() directly.

    YANG Description: The type of metric specification that should be used to set
the LSP(s) metric
    """
    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={'LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LSP_METRIC_INHERITED"), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric_type must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LSP_METRIC_INHERITED"), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__metric_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric_type(self):
    self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LSP_METRIC_INHERITED"), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/metric (int32)

    YANG Description: The value of the metric that should be specified. The value
supplied in this leaf is used in conjunction with the metric
type to determine the value of the metric used by the system.
Where the metric-type is set to LSP_METRIC_ABSOLUTE - the
value of this leaf is used directly; where it is set to
LSP_METRIC_RELATIVE, the relevant (positive or negative)
offset is used to formulate the metric; where metric-type
is LSP_METRIC_INHERITED, the value of this leaf is not
utilised
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/metric (int32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: The value of the metric that should be specified. The value
supplied in this leaf is used in conjunction with the metric
type to determine the value of the metric used by the system.
Where the metric-type is set to LSP_METRIC_ABSOLUTE - the
value of this leaf is used directly; where it is set to
LSP_METRIC_RELATIVE, the relevant (positive or negative)
offset is used to formulate the metric; where metric-type
is LSP_METRIC_INHERITED, the value of this leaf is not
utilised
    """
    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="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='int32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric 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="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='int32', is_config=True)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='int32', is_config=True)


  def _get_shortcut_eligible(self):
    """
    Getter method for shortcut_eligible, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/shortcut_eligible (boolean)

    YANG Description: Whether this LSP is considered to be eligible for us as a
shortcut in the IGP. In the case that this leaf is set to
true, the IGP SPF calculation uses the metric specified to
determine whether traffic should be carried over this LSP
    """
    return self.__shortcut_eligible
      
  def _set_shortcut_eligible(self, v, load=False):
    """
    Setter method for shortcut_eligible, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/shortcut_eligible (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_shortcut_eligible is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_shortcut_eligible() directly.

    YANG Description: Whether this LSP is considered to be eligible for us as a
shortcut in the IGP. In the case that this leaf is set to
true, the IGP SPF calculation uses the metric specified to
determine whether traffic should be carried over this LSP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="shortcut-eligible", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """shortcut_eligible must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="shortcut-eligible", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__shortcut_eligible = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_shortcut_eligible(self):
    self.__shortcut_eligible = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="shortcut-eligible", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_protection_style_requested(self):
    """
    Getter method for protection_style_requested, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/protection_style_requested (identityref)

    YANG Description: style of mpls frr protection desired: can be
link, link-node or unprotected.
    """
    return self.__protection_style_requested
      
  def _set_protection_style_requested(self, v, load=False):
    """
    Setter method for protection_style_requested, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/protection_style_requested (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_protection_style_requested is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_protection_style_requested() directly.

    YANG Description: style of mpls frr protection desired: can be
link, link-node or unprotected.
    """
    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={'UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:UNPROTECTED"), is_leaf=True, yang_name="protection-style-requested", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """protection_style_requested must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:UNPROTECTED"), is_leaf=True, yang_name="protection-style-requested", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__protection_style_requested = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_protection_style_requested(self):
    self.__protection_style_requested = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:UNPROTECTED"), is_leaf=True, yang_name="protection-style-requested", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_reoptimize_timer(self):
    """
    Getter method for reoptimize_timer, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/reoptimize_timer (uint16)

    YANG Description: frequency of reoptimization of
a traffic engineered LSP
    """
    return self.__reoptimize_timer
      
  def _set_reoptimize_timer(self, v, load=False):
    """
    Setter method for reoptimize_timer, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/reoptimize_timer (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_reoptimize_timer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_reoptimize_timer() directly.

    YANG Description: frequency of reoptimization of
a traffic engineered LSP
    """
    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="reoptimize-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """reoptimize_timer 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="reoptimize-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__reoptimize_timer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_reoptimize_timer(self):
    self.__reoptimize_timer = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="reoptimize-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_source(self):
    """
    Getter method for source, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/source (inet:ip-address)

    YANG Description: RSVP-TE tunnel source address
    """
    return self.__source
      
  def _set_source(self, v, load=False):
    """
    Setter method for source, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/source (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source() directly.

    YANG Description: RSVP-TE tunnel source address
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)""",
        })

    self.__source = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source(self):
    self.__source = 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}'}),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}|:))'}),], is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)


  def _get_soft_preemption(self):
    """
    Getter method for soft_preemption, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/soft_preemption (boolean)

    YANG Description: Enables RSVP soft-preemption on this LSP
    """
    return self.__soft_preemption
      
  def _set_soft_preemption(self, v, load=False):
    """
    Setter method for soft_preemption, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/soft_preemption (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_soft_preemption is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_soft_preemption() directly.

    YANG Description: Enables RSVP soft-preemption on this LSP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="soft-preemption", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """soft_preemption must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="soft-preemption", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__soft_preemption = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_soft_preemption(self):
    self.__soft_preemption = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="soft-preemption", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_setup_priority(self):
    """
    Getter method for setup_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/setup_priority (uint8)

    YANG Description: RSVP-TE preemption priority during LSP setup, lower is
higher priority; default 7 indicates that LSP will not
preempt established LSPs during setup
    """
    return self.__setup_priority
      
  def _set_setup_priority(self, v, load=False):
    """
    Setter method for setup_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/setup_priority (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_setup_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_setup_priority() directly.

    YANG Description: RSVP-TE preemption priority during LSP setup, lower is
higher priority; default 7 indicates that LSP will not
preempt established LSPs during setup
    """
    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']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """setup_priority 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..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
        })

    self.__setup_priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_setup_priority(self):
    self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)


  def _get_hold_priority(self):
    """
    Getter method for hold_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/hold_priority (uint8)

    YANG Description: preemption priority once the LSP is established,
lower is higher priority; default 0 indicates other LSPs
will not preempt the LSPs once established
    """
    return self.__hold_priority
      
  def _set_hold_priority(self, v, load=False):
    """
    Setter method for hold_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/hold_priority (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hold_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hold_priority() directly.

    YANG Description: preemption priority once the LSP is established,
lower is higher priority; default 0 indicates other LSPs
will not preempt the LSPs once established
    """
    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']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hold_priority 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..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
        })

    self.__hold_priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hold_priority(self):
    self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  type = __builtin__.property(_get_type, _set_type)
  signaling_protocol = __builtin__.property(_get_signaling_protocol, _set_signaling_protocol)
  description = __builtin__.property(_get_description, _set_description)
  admin_status = __builtin__.property(_get_admin_status, _set_admin_status)
  preference = __builtin__.property(_get_preference, _set_preference)
  metric_type = __builtin__.property(_get_metric_type, _set_metric_type)
  metric = __builtin__.property(_get_metric, _set_metric)
  shortcut_eligible = __builtin__.property(_get_shortcut_eligible, _set_shortcut_eligible)
  protection_style_requested = __builtin__.property(_get_protection_style_requested, _set_protection_style_requested)
  reoptimize_timer = __builtin__.property(_get_reoptimize_timer, _set_reoptimize_timer)
  source = __builtin__.property(_get_source, _set_source)
  soft_preemption = __builtin__.property(_get_soft_preemption, _set_soft_preemption)
  setup_priority = __builtin__.property(_get_setup_priority, _set_setup_priority)
  hold_priority = __builtin__.property(_get_hold_priority, _set_hold_priority)


  _pyangbind_elements = OrderedDict([('name', name), ('type', type), ('signaling_protocol', signaling_protocol), ('description', description), ('admin_status', admin_status), ('preference', preference), ('metric_type', metric_type), ('metric', metric), ('shortcut_eligible', shortcut_eligible), ('protection_style_requested', protection_style_requested), ('reoptimize_timer', reoptimize_timer), ('source', source), ('soft_preemption', soft_preemption), ('setup_priority', setup_priority), ('hold_priority', hold_priority), ])


class yc_counters_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_state_counters(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/state/counters. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State data for MPLS label switched paths. This state
data is specific to a single label switched path.
  """
  __slots__ = ('_path_helper', '_extmethods', '__bytes','__packets','__path_changes','__state_changes','__online_time','__current_path_time','__next_reoptimization_time',)

  _yang_name = 'counters'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__bytes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bytes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__packets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__path_changes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="path-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__state_changes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="state-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__online_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="online-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__current_path_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="current-path-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__next_reoptimization_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="next-reoptimization-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'state', 'counters']

  def _get_bytes(self):
    """
    Getter method for bytes, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/counters/bytes (yang:counter64)

    YANG Description: Number of bytes that have been forwarded over the
label switched path.
    """
    return self.__bytes
      
  def _set_bytes(self, v, load=False):
    """
    Setter method for bytes, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/counters/bytes (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bytes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bytes() directly.

    YANG Description: Number of bytes that have been forwarded over the
label switched path.
    """
    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="bytes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bytes must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bytes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__bytes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bytes(self):
    self.__bytes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bytes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_packets(self):
    """
    Getter method for packets, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/counters/packets (yang:counter64)

    YANG Description: Number of pacets that have been forwarded over the
label switched path.
    """
    return self.__packets
      
  def _set_packets(self, v, load=False):
    """
    Setter method for packets, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/counters/packets (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_packets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_packets() directly.

    YANG Description: Number of pacets that have been forwarded over the
label switched path.
    """
    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="packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """packets must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__packets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_packets(self):
    self.__packets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_path_changes(self):
    """
    Getter method for path_changes, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/counters/path_changes (yang:counter64)

    YANG Description: Number of path changes for the label switched path
    """
    return self.__path_changes
      
  def _set_path_changes(self, v, load=False):
    """
    Setter method for path_changes, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/counters/path_changes (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_changes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_changes() directly.

    YANG Description: Number of path changes for the label switched path
    """
    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="path-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_changes must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="path-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__path_changes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_changes(self):
    self.__path_changes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="path-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_state_changes(self):
    """
    Getter method for state_changes, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/counters/state_changes (yang:counter64)

    YANG Description: Number of state changes for the label switched path
    """
    return self.__state_changes
      
  def _set_state_changes(self, v, load=False):
    """
    Setter method for state_changes, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/counters/state_changes (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state_changes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state_changes() directly.

    YANG Description: Number of state changes for the label switched path
    """
    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="state-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state_changes must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="state-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__state_changes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state_changes(self):
    self.__state_changes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="state-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_online_time(self):
    """
    Getter method for online_time, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/counters/online_time (oc-types:timeticks64)

    YANG Description: Indication of the time the label switched path
transitioned to an Oper Up or in-service state.

The value is the timestamp in nanoseconds relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    return self.__online_time
      
  def _set_online_time(self, v, load=False):
    """
    Setter method for online_time, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/counters/online_time (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_online_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_online_time() directly.

    YANG Description: Indication of the time the label switched path
transitioned to an Oper Up or in-service state.

The value is the timestamp in nanoseconds relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    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="online-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """online_time must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="online-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__online_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_online_time(self):
    self.__online_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="online-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_current_path_time(self):
    """
    Getter method for current_path_time, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/counters/current_path_time (oc-types:timeticks64)

    YANG Description: Indicates the time the LSP switched onto its
current path. The value is reset upon a LSP path
change.

The value is the timestamp in nanoseconds relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    return self.__current_path_time
      
  def _set_current_path_time(self, v, load=False):
    """
    Setter method for current_path_time, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/counters/current_path_time (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_current_path_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_current_path_time() directly.

    YANG Description: Indicates the time the LSP switched onto its
current path. The value is reset upon a LSP path
change.

The value is the timestamp in nanoseconds relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    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="current-path-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """current_path_time must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="current-path-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__current_path_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_current_path_time(self):
    self.__current_path_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="current-path-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_next_reoptimization_time(self):
    """
    Getter method for next_reoptimization_time, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/counters/next_reoptimization_time (oc-types:timeticks64)

    YANG Description: Indicates the next scheduled time the LSP
will be reoptimized.

The value is the timestamp in nanoseconds relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    return self.__next_reoptimization_time
      
  def _set_next_reoptimization_time(self, v, load=False):
    """
    Setter method for next_reoptimization_time, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/counters/next_reoptimization_time (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_reoptimization_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_reoptimization_time() directly.

    YANG Description: Indicates the next scheduled time the LSP
will be reoptimized.

The value is the timestamp in nanoseconds relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    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="next-reoptimization-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_reoptimization_time must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="next-reoptimization-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__next_reoptimization_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_next_reoptimization_time(self):
    self.__next_reoptimization_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="next-reoptimization-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)

  bytes = __builtin__.property(_get_bytes)
  packets = __builtin__.property(_get_packets)
  path_changes = __builtin__.property(_get_path_changes)
  state_changes = __builtin__.property(_get_state_changes)
  online_time = __builtin__.property(_get_online_time)
  current_path_time = __builtin__.property(_get_current_path_time)
  next_reoptimization_time = __builtin__.property(_get_next_reoptimization_time)


  _pyangbind_elements = OrderedDict([('bytes', bytes), ('packets', packets), ('path_changes', path_changes), ('state_changes', state_changes), ('online_time', online_time), ('current_path_time', current_path_time), ('next_reoptimization_time', next_reoptimization_time), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters related to TE tunnels
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__type','__signaling_protocol','__description','__admin_status','__preference','__metric_type','__metric','__shortcut_eligible','__protection_style_requested','__reoptimize_timer','__source','__soft_preemption','__setup_priority','__hold_priority','__oper_status','__role','__auto_generated','__counters',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__signaling_protocol = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="signaling-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__description = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__admin_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:ADMIN_UP"), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LSP_METRIC_INHERITED"), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='int32', is_config=False)
    self.__shortcut_eligible = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="shortcut-eligible", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__protection_style_requested = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:UNPROTECTED"), is_leaf=True, yang_name="protection-style-requested", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__reoptimize_timer = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="reoptimize-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__source = 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}'}),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}|:))'}),], is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    self.__soft_preemption = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="soft-preemption", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__oper_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="oper-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__role = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="role", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__auto_generated = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="auto-generated", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/name (string)

    YANG Description: The tunnel name
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/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: The tunnel name
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/type (identityref)

    YANG Description: Tunnel type, p2p or p2mp
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/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: Tunnel type, p2p or p2mp
    """
    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={'P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', 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={'P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_signaling_protocol(self):
    """
    Getter method for signaling_protocol, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/signaling_protocol (identityref)

    YANG Description: Signaling protocol used to set up this tunnel
    """
    return self.__signaling_protocol
      
  def _set_signaling_protocol(self, v, load=False):
    """
    Setter method for signaling_protocol, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/signaling_protocol (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_signaling_protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_signaling_protocol() directly.

    YANG Description: Signaling protocol used to set up this tunnel
    """
    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={'PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="signaling-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """signaling_protocol must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="signaling-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__signaling_protocol = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_signaling_protocol(self):
    self.__signaling_protocol = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="signaling-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_description(self):
    """
    Getter method for description, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/description (string)

    YANG Description: optional text description for the tunnel
    """
    return self.__description
      
  def _set_description(self, v, load=False):
    """
    Setter method for description, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/description (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_description is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_description() directly.

    YANG Description: optional text description for the tunnel
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """description must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__description = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_description(self):
    self.__description = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_admin_status(self):
    """
    Getter method for admin_status, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/admin_status (identityref)

    YANG Description: TE tunnel administrative state.
    """
    return self.__admin_status
      
  def _set_admin_status(self, v, load=False):
    """
    Setter method for admin_status, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/admin_status (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_admin_status is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_admin_status() directly.

    YANG Description: TE tunnel administrative state.
    """
    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={'ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:ADMIN_UP"), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """admin_status must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:ADMIN_UP"), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__admin_status = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_admin_status(self):
    self.__admin_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:ADMIN_UP"), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_preference(self):
    """
    Getter method for preference, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/preference (uint8)

    YANG Description: Specifies a preference for this tunnel.
A lower number signifies a better preference
    """
    return self.__preference
      
  def _set_preference(self, v, load=False):
    """
    Setter method for preference, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/preference (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_preference is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_preference() directly.

    YANG Description: Specifies a preference for this tunnel.
A lower number signifies a better preference
    """
    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': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """preference 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': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__preference = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_preference(self):
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_metric_type(self):
    """
    Getter method for metric_type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/metric_type (identityref)

    YANG Description: The type of metric specification that should be used to set
the LSP(s) metric
    """
    return self.__metric_type
      
  def _set_metric_type(self, v, load=False):
    """
    Setter method for metric_type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/metric_type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric_type() directly.

    YANG Description: The type of metric specification that should be used to set
the LSP(s) metric
    """
    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={'LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LSP_METRIC_INHERITED"), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric_type must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LSP_METRIC_INHERITED"), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__metric_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric_type(self):
    self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LSP_METRIC_INHERITED"), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/metric (int32)

    YANG Description: The value of the metric that should be specified. The value
supplied in this leaf is used in conjunction with the metric
type to determine the value of the metric used by the system.
Where the metric-type is set to LSP_METRIC_ABSOLUTE - the
value of this leaf is used directly; where it is set to
LSP_METRIC_RELATIVE, the relevant (positive or negative)
offset is used to formulate the metric; where metric-type
is LSP_METRIC_INHERITED, the value of this leaf is not
utilised
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/metric (int32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: The value of the metric that should be specified. The value
supplied in this leaf is used in conjunction with the metric
type to determine the value of the metric used by the system.
Where the metric-type is set to LSP_METRIC_ABSOLUTE - the
value of this leaf is used directly; where it is set to
LSP_METRIC_RELATIVE, the relevant (positive or negative)
offset is used to formulate the metric; where metric-type
is LSP_METRIC_INHERITED, the value of this leaf is not
utilised
    """
    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="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='int32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric 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="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='int32', is_config=False)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='int32', is_config=False)


  def _get_shortcut_eligible(self):
    """
    Getter method for shortcut_eligible, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/shortcut_eligible (boolean)

    YANG Description: Whether this LSP is considered to be eligible for us as a
shortcut in the IGP. In the case that this leaf is set to
true, the IGP SPF calculation uses the metric specified to
determine whether traffic should be carried over this LSP
    """
    return self.__shortcut_eligible
      
  def _set_shortcut_eligible(self, v, load=False):
    """
    Setter method for shortcut_eligible, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/shortcut_eligible (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_shortcut_eligible is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_shortcut_eligible() directly.

    YANG Description: Whether this LSP is considered to be eligible for us as a
shortcut in the IGP. In the case that this leaf is set to
true, the IGP SPF calculation uses the metric specified to
determine whether traffic should be carried over this LSP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="shortcut-eligible", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """shortcut_eligible must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="shortcut-eligible", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__shortcut_eligible = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_shortcut_eligible(self):
    self.__shortcut_eligible = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="shortcut-eligible", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_protection_style_requested(self):
    """
    Getter method for protection_style_requested, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/protection_style_requested (identityref)

    YANG Description: style of mpls frr protection desired: can be
link, link-node or unprotected.
    """
    return self.__protection_style_requested
      
  def _set_protection_style_requested(self, v, load=False):
    """
    Setter method for protection_style_requested, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/protection_style_requested (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_protection_style_requested is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_protection_style_requested() directly.

    YANG Description: style of mpls frr protection desired: can be
link, link-node or unprotected.
    """
    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={'UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:UNPROTECTED"), is_leaf=True, yang_name="protection-style-requested", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """protection_style_requested must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:UNPROTECTED"), is_leaf=True, yang_name="protection-style-requested", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__protection_style_requested = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_protection_style_requested(self):
    self.__protection_style_requested = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:UNPROTECTED"), is_leaf=True, yang_name="protection-style-requested", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_reoptimize_timer(self):
    """
    Getter method for reoptimize_timer, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/reoptimize_timer (uint16)

    YANG Description: frequency of reoptimization of
a traffic engineered LSP
    """
    return self.__reoptimize_timer
      
  def _set_reoptimize_timer(self, v, load=False):
    """
    Setter method for reoptimize_timer, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/reoptimize_timer (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_reoptimize_timer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_reoptimize_timer() directly.

    YANG Description: frequency of reoptimization of
a traffic engineered LSP
    """
    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="reoptimize-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """reoptimize_timer 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="reoptimize-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__reoptimize_timer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_reoptimize_timer(self):
    self.__reoptimize_timer = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="reoptimize-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_source(self):
    """
    Getter method for source, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/source (inet:ip-address)

    YANG Description: RSVP-TE tunnel source address
    """
    return self.__source
      
  def _set_source(self, v, load=False):
    """
    Setter method for source, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/source (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source() directly.

    YANG Description: RSVP-TE tunnel source address
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)""",
        })

    self.__source = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source(self):
    self.__source = 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}'}),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}|:))'}),], is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)


  def _get_soft_preemption(self):
    """
    Getter method for soft_preemption, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/soft_preemption (boolean)

    YANG Description: Enables RSVP soft-preemption on this LSP
    """
    return self.__soft_preemption
      
  def _set_soft_preemption(self, v, load=False):
    """
    Setter method for soft_preemption, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/soft_preemption (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_soft_preemption is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_soft_preemption() directly.

    YANG Description: Enables RSVP soft-preemption on this LSP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="soft-preemption", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """soft_preemption must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="soft-preemption", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__soft_preemption = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_soft_preemption(self):
    self.__soft_preemption = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="soft-preemption", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_setup_priority(self):
    """
    Getter method for setup_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/setup_priority (uint8)

    YANG Description: RSVP-TE preemption priority during LSP setup, lower is
higher priority; default 7 indicates that LSP will not
preempt established LSPs during setup
    """
    return self.__setup_priority
      
  def _set_setup_priority(self, v, load=False):
    """
    Setter method for setup_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/setup_priority (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_setup_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_setup_priority() directly.

    YANG Description: RSVP-TE preemption priority during LSP setup, lower is
higher priority; default 7 indicates that LSP will not
preempt established LSPs during setup
    """
    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']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """setup_priority 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..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__setup_priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_setup_priority(self):
    self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_hold_priority(self):
    """
    Getter method for hold_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/hold_priority (uint8)

    YANG Description: preemption priority once the LSP is established,
lower is higher priority; default 0 indicates other LSPs
will not preempt the LSPs once established
    """
    return self.__hold_priority
      
  def _set_hold_priority(self, v, load=False):
    """
    Setter method for hold_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/hold_priority (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hold_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hold_priority() directly.

    YANG Description: preemption priority once the LSP is established,
lower is higher priority; default 0 indicates other LSPs
will not preempt the LSPs once established
    """
    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']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hold_priority 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..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__hold_priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hold_priority(self):
    self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_oper_status(self):
    """
    Getter method for oper_status, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/oper_status (identityref)

    YANG Description: The operational status of the TE tunnel
    """
    return self.__oper_status
      
  def _set_oper_status(self, v, load=False):
    """
    Setter method for oper_status, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/oper_status (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_oper_status is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_oper_status() directly.

    YANG Description: The operational status of the TE tunnel
    """
    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={'DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="oper-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """oper_status must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="oper-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__oper_status = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_oper_status(self):
    self.__oper_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="oper-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_role(self):
    """
    Getter method for role, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/role (identityref)

    YANG Description: The lsp role at the current node, whether it is headend,
transit or tailend.
    """
    return self.__role
      
  def _set_role(self, v, load=False):
    """
    Setter method for role, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/role (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_role is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_role() directly.

    YANG Description: The lsp role at the current node, whether it is headend,
transit or tailend.
    """
    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={'INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="role", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """role must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="role", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__role = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_role(self):
    self.__role = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="role", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_auto_generated(self):
    """
    Getter method for auto_generated, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/auto_generated (boolean)

    YANG Description: If the LSP was auto-generated by the system this leaf
should be set to true. Examples of auto-generated LSPs
are dynamically created backup LSPs to meet a FRR
policy.
    """
    return self.__auto_generated
      
  def _set_auto_generated(self, v, load=False):
    """
    Setter method for auto_generated, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/auto_generated (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_auto_generated is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_auto_generated() directly.

    YANG Description: If the LSP was auto-generated by the system this leaf
should be set to true. Examples of auto-generated LSPs
are dynamically created backup LSPs to meet a FRR
policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="auto-generated", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """auto_generated must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="auto-generated", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__auto_generated = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_auto_generated(self):
    self.__auto_generated = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="auto-generated", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_counters(self):
    """
    Getter method for counters, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/counters (container)

    YANG Description: State data for MPLS label switched paths. This state
data is specific to a single label switched path.
    """
    return self.__counters
      
  def _set_counters(self, v, load=False):
    """
    Setter method for counters, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/counters (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_counters is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_counters() directly.

    YANG Description: State data for MPLS label switched paths. This state
data is specific to a single label switched path.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_counters_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """counters must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__counters = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_counters(self):
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  name = __builtin__.property(_get_name)
  type = __builtin__.property(_get_type)
  signaling_protocol = __builtin__.property(_get_signaling_protocol)
  description = __builtin__.property(_get_description)
  admin_status = __builtin__.property(_get_admin_status)
  preference = __builtin__.property(_get_preference)
  metric_type = __builtin__.property(_get_metric_type)
  metric = __builtin__.property(_get_metric)
  shortcut_eligible = __builtin__.property(_get_shortcut_eligible)
  protection_style_requested = __builtin__.property(_get_protection_style_requested)
  reoptimize_timer = __builtin__.property(_get_reoptimize_timer)
  source = __builtin__.property(_get_source)
  soft_preemption = __builtin__.property(_get_soft_preemption)
  setup_priority = __builtin__.property(_get_setup_priority)
  hold_priority = __builtin__.property(_get_hold_priority)
  oper_status = __builtin__.property(_get_oper_status)
  role = __builtin__.property(_get_role)
  auto_generated = __builtin__.property(_get_auto_generated)
  counters = __builtin__.property(_get_counters)


  _pyangbind_elements = OrderedDict([('name', name), ('type', type), ('signaling_protocol', signaling_protocol), ('description', description), ('admin_status', admin_status), ('preference', preference), ('metric_type', metric_type), ('metric', metric), ('shortcut_eligible', shortcut_eligible), ('protection_style_requested', protection_style_requested), ('reoptimize_timer', reoptimize_timer), ('source', source), ('soft_preemption', soft_preemption), ('setup_priority', setup_priority), ('hold_priority', hold_priority), ('oper_status', oper_status), ('role', role), ('auto_generated', auto_generated), ('counters', counters), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/bandwidth/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters related to bandwidth on TE
tunnels:
  """
  __slots__ = ('_path_helper', '_extmethods', '__specification_type','__set_bandwidth',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__specification_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SPECIFIED': {}, 'AUTO': {}},), default=six.text_type("SPECIFIED"), is_leaf=True, yang_name="specification-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='te-bandwidth-type', is_config=True)
    self.__set_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="set-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'bandwidth', 'config']

  def _get_specification_type(self):
    """
    Getter method for specification_type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/config/specification_type (te-bandwidth-type)

    YANG Description: The method used for settign the bandwidth, either explicitly
specified or configured
    """
    return self.__specification_type
      
  def _set_specification_type(self, v, load=False):
    """
    Setter method for specification_type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/config/specification_type (te-bandwidth-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_specification_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_specification_type() directly.

    YANG Description: The method used for settign the bandwidth, either explicitly
specified or 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={'SPECIFIED': {}, 'AUTO': {}},), default=six.text_type("SPECIFIED"), is_leaf=True, yang_name="specification-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='te-bandwidth-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """specification_type must be of a type compatible with te-bandwidth-type""",
          'defined-type': "openconfig-network-instance:te-bandwidth-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SPECIFIED': {}, 'AUTO': {}},), default=six.text_type("SPECIFIED"), is_leaf=True, yang_name="specification-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='te-bandwidth-type', is_config=True)""",
        })

    self.__specification_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_specification_type(self):
    self.__specification_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SPECIFIED': {}, 'AUTO': {}},), default=six.text_type("SPECIFIED"), is_leaf=True, yang_name="specification-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='te-bandwidth-type', is_config=True)


  def _get_set_bandwidth(self):
    """
    Getter method for set_bandwidth, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/config/set_bandwidth (oc-mplst:bandwidth-kbps)

    YANG Description: set bandwidth explicitly, e.g., using
offline calculation
    """
    return self.__set_bandwidth
      
  def _set_set_bandwidth(self, v, load=False):
    """
    Setter method for set_bandwidth, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/config/set_bandwidth (oc-mplst:bandwidth-kbps)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_bandwidth() directly.

    YANG Description: set bandwidth explicitly, e.g., using
offline calculation
    """
    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="set-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_bandwidth must be of a type compatible with oc-mplst:bandwidth-kbps""",
          'defined-type': "oc-mplst:bandwidth-kbps",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="set-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=True)""",
        })

    self.__set_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_bandwidth(self):
    self.__set_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="set-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=True)

  specification_type = __builtin__.property(_get_specification_type, _set_specification_type)
  set_bandwidth = __builtin__.property(_get_set_bandwidth, _set_set_bandwidth)


  _pyangbind_elements = OrderedDict([('specification_type', specification_type), ('set_bandwidth', set_bandwidth), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/bandwidth/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters related to bandwidth
configuration of TE tunnels
  """
  __slots__ = ('_path_helper', '_extmethods', '__specification_type','__set_bandwidth','__signaled_bandwidth',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__specification_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SPECIFIED': {}, 'AUTO': {}},), default=six.text_type("SPECIFIED"), is_leaf=True, yang_name="specification-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='te-bandwidth-type', is_config=False)
    self.__set_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="set-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)
    self.__signaled_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="signaled-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'bandwidth', 'state']

  def _get_specification_type(self):
    """
    Getter method for specification_type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/state/specification_type (te-bandwidth-type)

    YANG Description: The method used for settign the bandwidth, either explicitly
specified or configured
    """
    return self.__specification_type
      
  def _set_specification_type(self, v, load=False):
    """
    Setter method for specification_type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/state/specification_type (te-bandwidth-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_specification_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_specification_type() directly.

    YANG Description: The method used for settign the bandwidth, either explicitly
specified or 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={'SPECIFIED': {}, 'AUTO': {}},), default=six.text_type("SPECIFIED"), is_leaf=True, yang_name="specification-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='te-bandwidth-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """specification_type must be of a type compatible with te-bandwidth-type""",
          'defined-type': "openconfig-network-instance:te-bandwidth-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SPECIFIED': {}, 'AUTO': {}},), default=six.text_type("SPECIFIED"), is_leaf=True, yang_name="specification-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='te-bandwidth-type', is_config=False)""",
        })

    self.__specification_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_specification_type(self):
    self.__specification_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SPECIFIED': {}, 'AUTO': {}},), default=six.text_type("SPECIFIED"), is_leaf=True, yang_name="specification-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='te-bandwidth-type', is_config=False)


  def _get_set_bandwidth(self):
    """
    Getter method for set_bandwidth, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/state/set_bandwidth (oc-mplst:bandwidth-kbps)

    YANG Description: set bandwidth explicitly, e.g., using
offline calculation
    """
    return self.__set_bandwidth
      
  def _set_set_bandwidth(self, v, load=False):
    """
    Setter method for set_bandwidth, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/state/set_bandwidth (oc-mplst:bandwidth-kbps)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_bandwidth() directly.

    YANG Description: set bandwidth explicitly, e.g., using
offline calculation
    """
    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="set-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_bandwidth must be of a type compatible with oc-mplst:bandwidth-kbps""",
          'defined-type': "oc-mplst:bandwidth-kbps",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="set-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)""",
        })

    self.__set_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_bandwidth(self):
    self.__set_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="set-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)


  def _get_signaled_bandwidth(self):
    """
    Getter method for signaled_bandwidth, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/state/signaled_bandwidth (oc-mplst:bandwidth-kbps)

    YANG Description: The currently signaled bandwidth of the LSP. In the case where
the bandwidth is specified explicitly, then this will match the
value of the set-bandwidth leaf; in cases where the bandwidth is
dynamically computed by the system, the current value of the
bandwidth should be reflected.
    """
    return self.__signaled_bandwidth
      
  def _set_signaled_bandwidth(self, v, load=False):
    """
    Setter method for signaled_bandwidth, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/state/signaled_bandwidth (oc-mplst:bandwidth-kbps)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_signaled_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_signaled_bandwidth() directly.

    YANG Description: The currently signaled bandwidth of the LSP. In the case where
the bandwidth is specified explicitly, then this will match the
value of the set-bandwidth leaf; in cases where the bandwidth is
dynamically computed by the system, the current value of the
bandwidth should be reflected.
    """
    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="signaled-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """signaled_bandwidth must be of a type compatible with oc-mplst:bandwidth-kbps""",
          'defined-type': "oc-mplst:bandwidth-kbps",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="signaled-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)""",
        })

    self.__signaled_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_signaled_bandwidth(self):
    self.__signaled_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="signaled-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)

  specification_type = __builtin__.property(_get_specification_type)
  set_bandwidth = __builtin__.property(_get_set_bandwidth)
  signaled_bandwidth = __builtin__.property(_get_signaled_bandwidth)


  _pyangbind_elements = OrderedDict([('specification_type', specification_type), ('set_bandwidth', set_bandwidth), ('signaled_bandwidth', signaled_bandwidth), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/bandwidth/auto-bandwidth/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to MPLS
auto-bandwidth on the tunnel.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__min_bw','__max_bw','__adjust_interval','__adjust_threshold',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__min_bw = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=True)
    self.__max_bw = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=True)
    self.__adjust_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="adjust-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__adjust_threshold = 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="adjust-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'bandwidth', 'auto-bandwidth', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/config/enabled (boolean)

    YANG Description: enables mpls auto-bandwidth on the
lsp
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: enables mpls auto-bandwidth on the
lsp
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_min_bw(self):
    """
    Getter method for min_bw, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/config/min_bw (oc-mplst:bandwidth-kbps)

    YANG Description: set the minimum bandwidth in Kbps for an
auto-bandwidth LSP
    """
    return self.__min_bw
      
  def _set_min_bw(self, v, load=False):
    """
    Setter method for min_bw, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/config/min_bw (oc-mplst:bandwidth-kbps)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_bw is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_bw() directly.

    YANG Description: set the minimum bandwidth in Kbps for an
auto-bandwidth LSP
    """
    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-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_bw must be of a type compatible with oc-mplst:bandwidth-kbps""",
          'defined-type': "oc-mplst:bandwidth-kbps",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=True)""",
        })

    self.__min_bw = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_min_bw(self):
    self.__min_bw = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=True)


  def _get_max_bw(self):
    """
    Getter method for max_bw, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/config/max_bw (oc-mplst:bandwidth-kbps)

    YANG Description: set the maximum bandwidth in Kbps for an
auto-bandwidth LSP
    """
    return self.__max_bw
      
  def _set_max_bw(self, v, load=False):
    """
    Setter method for max_bw, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/config/max_bw (oc-mplst:bandwidth-kbps)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_bw is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_bw() directly.

    YANG Description: set the maximum bandwidth in Kbps for an
auto-bandwidth LSP
    """
    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-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_bw must be of a type compatible with oc-mplst:bandwidth-kbps""",
          'defined-type': "oc-mplst:bandwidth-kbps",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=True)""",
        })

    self.__max_bw = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_bw(self):
    self.__max_bw = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=True)


  def _get_adjust_interval(self):
    """
    Getter method for adjust_interval, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/config/adjust_interval (uint32)

    YANG Description: time in seconds between adjustments to
LSP bandwidth
    """
    return self.__adjust_interval
      
  def _set_adjust_interval(self, v, load=False):
    """
    Setter method for adjust_interval, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/config/adjust_interval (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adjust_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adjust_interval() directly.

    YANG Description: time in seconds between adjustments to
LSP bandwidth
    """
    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="adjust-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adjust_interval 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="adjust-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__adjust_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adjust_interval(self):
    self.__adjust_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="adjust-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_adjust_threshold(self):
    """
    Getter method for adjust_threshold, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/config/adjust_threshold (oc-types:percentage)

    YANG Description: percentage difference between the LSP's
specified bandwidth and its current bandwidth
allocation -- if the difference is greater than the
specified percentage, auto-bandwidth adjustment is
triggered
    """
    return self.__adjust_threshold
      
  def _set_adjust_threshold(self, v, load=False):
    """
    Setter method for adjust_threshold, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/config/adjust_threshold (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adjust_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adjust_threshold() directly.

    YANG Description: percentage difference between the LSP's
specified bandwidth and its current bandwidth
allocation -- if the difference is greater than the
specified percentage, auto-bandwidth adjustment is
triggered
    """
    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="adjust-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adjust_threshold 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="adjust-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__adjust_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adjust_threshold(self):
    self.__adjust_threshold = 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="adjust-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)
  min_bw = __builtin__.property(_get_min_bw, _set_min_bw)
  max_bw = __builtin__.property(_get_max_bw, _set_max_bw)
  adjust_interval = __builtin__.property(_get_adjust_interval, _set_adjust_interval)
  adjust_threshold = __builtin__.property(_get_adjust_threshold, _set_adjust_threshold)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('min_bw', min_bw), ('max_bw', max_bw), ('adjust_interval', adjust_interval), ('adjust_threshold', adjust_threshold), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/bandwidth/auto-bandwidth/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to MPLS
auto-bandwidth on the tunnel.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__min_bw','__max_bw','__adjust_interval','__adjust_threshold','__interval_high_bw',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__min_bw = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)
    self.__max_bw = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)
    self.__adjust_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="adjust-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__adjust_threshold = 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="adjust-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__interval_high_bw = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="interval-high-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'bandwidth', 'auto-bandwidth', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/state/enabled (boolean)

    YANG Description: enables mpls auto-bandwidth on the
lsp
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: enables mpls auto-bandwidth on the
lsp
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_min_bw(self):
    """
    Getter method for min_bw, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/state/min_bw (oc-mplst:bandwidth-kbps)

    YANG Description: set the minimum bandwidth in Kbps for an
auto-bandwidth LSP
    """
    return self.__min_bw
      
  def _set_min_bw(self, v, load=False):
    """
    Setter method for min_bw, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/state/min_bw (oc-mplst:bandwidth-kbps)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_bw is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_bw() directly.

    YANG Description: set the minimum bandwidth in Kbps for an
auto-bandwidth LSP
    """
    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-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_bw must be of a type compatible with oc-mplst:bandwidth-kbps""",
          'defined-type': "oc-mplst:bandwidth-kbps",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)""",
        })

    self.__min_bw = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_min_bw(self):
    self.__min_bw = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)


  def _get_max_bw(self):
    """
    Getter method for max_bw, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/state/max_bw (oc-mplst:bandwidth-kbps)

    YANG Description: set the maximum bandwidth in Kbps for an
auto-bandwidth LSP
    """
    return self.__max_bw
      
  def _set_max_bw(self, v, load=False):
    """
    Setter method for max_bw, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/state/max_bw (oc-mplst:bandwidth-kbps)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_bw is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_bw() directly.

    YANG Description: set the maximum bandwidth in Kbps for an
auto-bandwidth LSP
    """
    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-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_bw must be of a type compatible with oc-mplst:bandwidth-kbps""",
          'defined-type': "oc-mplst:bandwidth-kbps",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)""",
        })

    self.__max_bw = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_bw(self):
    self.__max_bw = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)


  def _get_adjust_interval(self):
    """
    Getter method for adjust_interval, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/state/adjust_interval (uint32)

    YANG Description: time in seconds between adjustments to
LSP bandwidth
    """
    return self.__adjust_interval
      
  def _set_adjust_interval(self, v, load=False):
    """
    Setter method for adjust_interval, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/state/adjust_interval (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adjust_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adjust_interval() directly.

    YANG Description: time in seconds between adjustments to
LSP bandwidth
    """
    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="adjust-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adjust_interval 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="adjust-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__adjust_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adjust_interval(self):
    self.__adjust_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="adjust-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_adjust_threshold(self):
    """
    Getter method for adjust_threshold, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/state/adjust_threshold (oc-types:percentage)

    YANG Description: percentage difference between the LSP's
specified bandwidth and its current bandwidth
allocation -- if the difference is greater than the
specified percentage, auto-bandwidth adjustment is
triggered
    """
    return self.__adjust_threshold
      
  def _set_adjust_threshold(self, v, load=False):
    """
    Setter method for adjust_threshold, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/state/adjust_threshold (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adjust_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adjust_threshold() directly.

    YANG Description: percentage difference between the LSP's
specified bandwidth and its current bandwidth
allocation -- if the difference is greater than the
specified percentage, auto-bandwidth adjustment is
triggered
    """
    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="adjust-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adjust_threshold 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="adjust-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__adjust_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adjust_threshold(self):
    self.__adjust_threshold = 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="adjust-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_interval_high_bw(self):
    """
    Getter method for interval_high_bw, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/state/interval_high_bw (oc-mplst:bandwidth-kbps)

    YANG Description: The maximum measured bandwidth during the current
auto-bandwidth adjust interval expressed in kilobits
per second.
    """
    return self.__interval_high_bw
      
  def _set_interval_high_bw(self, v, load=False):
    """
    Setter method for interval_high_bw, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/state/interval_high_bw (oc-mplst:bandwidth-kbps)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_interval_high_bw is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_interval_high_bw() directly.

    YANG Description: The maximum measured bandwidth during the current
auto-bandwidth adjust interval expressed in kilobits
per second.
    """
    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="interval-high-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interval_high_bw must be of a type compatible with oc-mplst:bandwidth-kbps""",
          'defined-type': "oc-mplst:bandwidth-kbps",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="interval-high-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)""",
        })

    self.__interval_high_bw = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_interval_high_bw(self):
    self.__interval_high_bw = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="interval-high-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)

  enabled = __builtin__.property(_get_enabled)
  min_bw = __builtin__.property(_get_min_bw)
  max_bw = __builtin__.property(_get_max_bw)
  adjust_interval = __builtin__.property(_get_adjust_interval)
  adjust_threshold = __builtin__.property(_get_adjust_threshold)
  interval_high_bw = __builtin__.property(_get_interval_high_bw)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('min_bw', min_bw), ('max_bw', max_bw), ('adjust_interval', adjust_interval), ('adjust_threshold', adjust_threshold), ('interval_high_bw', interval_high_bw), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_overflow_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/bandwidth/auto-bandwidth/overflow/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Config information for MPLS overflow bandwidth
adjustment
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__overflow_threshold','__trigger_event_count',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__overflow_threshold = 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="overflow-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    self.__trigger_event_count = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="trigger-event-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'bandwidth', 'auto-bandwidth', 'overflow', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/overflow/config/enabled (boolean)

    YANG Description: enables mpls lsp bandwidth overflow
adjustment on the lsp
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/overflow/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: enables mpls lsp bandwidth overflow
adjustment on the lsp
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_overflow_threshold(self):
    """
    Getter method for overflow_threshold, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/overflow/config/overflow_threshold (oc-types:percentage)

    YANG Description: bandwidth percentage change to trigger
an overflow event
    """
    return self.__overflow_threshold
      
  def _set_overflow_threshold(self, v, load=False):
    """
    Setter method for overflow_threshold, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/overflow/config/overflow_threshold (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_overflow_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_overflow_threshold() directly.

    YANG Description: bandwidth percentage change to trigger
an overflow event
    """
    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="overflow-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """overflow_threshold 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="overflow-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__overflow_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_overflow_threshold(self):
    self.__overflow_threshold = 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="overflow-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)


  def _get_trigger_event_count(self):
    """
    Getter method for trigger_event_count, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/overflow/config/trigger_event_count (uint16)

    YANG Description: number of consecutive overflow sample
events needed to trigger an overflow adjustment
    """
    return self.__trigger_event_count
      
  def _set_trigger_event_count(self, v, load=False):
    """
    Setter method for trigger_event_count, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/overflow/config/trigger_event_count (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_trigger_event_count is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_trigger_event_count() directly.

    YANG Description: number of consecutive overflow sample
events needed to trigger an overflow adjustment
    """
    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="trigger-event-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """trigger_event_count 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="trigger-event-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__trigger_event_count = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_trigger_event_count(self):
    self.__trigger_event_count = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="trigger-event-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)
  overflow_threshold = __builtin__.property(_get_overflow_threshold, _set_overflow_threshold)
  trigger_event_count = __builtin__.property(_get_trigger_event_count, _set_trigger_event_count)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('overflow_threshold', overflow_threshold), ('trigger_event_count', trigger_event_count), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_overflow_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/bandwidth/auto-bandwidth/overflow/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Config information for MPLS overflow bandwidth
adjustment
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__overflow_threshold','__trigger_event_count',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__overflow_threshold = 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="overflow-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__trigger_event_count = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="trigger-event-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'bandwidth', 'auto-bandwidth', 'overflow', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/overflow/state/enabled (boolean)

    YANG Description: enables mpls lsp bandwidth overflow
adjustment on the lsp
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/overflow/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: enables mpls lsp bandwidth overflow
adjustment on the lsp
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_overflow_threshold(self):
    """
    Getter method for overflow_threshold, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/overflow/state/overflow_threshold (oc-types:percentage)

    YANG Description: bandwidth percentage change to trigger
an overflow event
    """
    return self.__overflow_threshold
      
  def _set_overflow_threshold(self, v, load=False):
    """
    Setter method for overflow_threshold, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/overflow/state/overflow_threshold (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_overflow_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_overflow_threshold() directly.

    YANG Description: bandwidth percentage change to trigger
an overflow event
    """
    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="overflow-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """overflow_threshold 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="overflow-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__overflow_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_overflow_threshold(self):
    self.__overflow_threshold = 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="overflow-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_trigger_event_count(self):
    """
    Getter method for trigger_event_count, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/overflow/state/trigger_event_count (uint16)

    YANG Description: number of consecutive overflow sample
events needed to trigger an overflow adjustment
    """
    return self.__trigger_event_count
      
  def _set_trigger_event_count(self, v, load=False):
    """
    Setter method for trigger_event_count, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/overflow/state/trigger_event_count (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_trigger_event_count is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_trigger_event_count() directly.

    YANG Description: number of consecutive overflow sample
events needed to trigger an overflow adjustment
    """
    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="trigger-event-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """trigger_event_count 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="trigger-event-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__trigger_event_count = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_trigger_event_count(self):
    self.__trigger_event_count = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="trigger-event-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  enabled = __builtin__.property(_get_enabled)
  overflow_threshold = __builtin__.property(_get_overflow_threshold)
  trigger_event_count = __builtin__.property(_get_trigger_event_count)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('overflow_threshold', overflow_threshold), ('trigger_event_count', trigger_event_count), ])


class yc_overflow_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_overflow(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/bandwidth/auto-bandwidth/overflow. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: configuration of MPLS overflow bandwidth
adjustement for the LSP
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'overflow'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_overflow_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_overflow_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'bandwidth', 'auto-bandwidth', 'overflow']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/overflow/config (container)

    YANG Description: Config information for MPLS overflow bandwidth
adjustment
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/overflow/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: Config information for MPLS overflow bandwidth
adjustment
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_overflow_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_overflow_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_overflow_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/overflow/state (container)

    YANG Description: Config information for MPLS overflow bandwidth
adjustment
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/overflow/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: Config information for MPLS overflow bandwidth
adjustment
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_overflow_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_overflow_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_overflow_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_underflow_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/bandwidth/auto-bandwidth/underflow/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Config information for MPLS underflow bandwidth
adjustment
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__underflow_threshold','__trigger_event_count',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__underflow_threshold = 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="underflow-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    self.__trigger_event_count = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="trigger-event-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'bandwidth', 'auto-bandwidth', 'underflow', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/underflow/config/enabled (boolean)

    YANG Description: enables bandwidth underflow
adjustment on the lsp
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/underflow/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: enables bandwidth underflow
adjustment on the lsp
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_underflow_threshold(self):
    """
    Getter method for underflow_threshold, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/underflow/config/underflow_threshold (oc-types:percentage)

    YANG Description: bandwidth percentage change to trigger
and underflow event
    """
    return self.__underflow_threshold
      
  def _set_underflow_threshold(self, v, load=False):
    """
    Setter method for underflow_threshold, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/underflow/config/underflow_threshold (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_underflow_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_underflow_threshold() directly.

    YANG Description: bandwidth percentage change to trigger
and underflow event
    """
    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="underflow-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """underflow_threshold 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="underflow-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__underflow_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_underflow_threshold(self):
    self.__underflow_threshold = 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="underflow-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)


  def _get_trigger_event_count(self):
    """
    Getter method for trigger_event_count, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/underflow/config/trigger_event_count (uint16)

    YANG Description: number of consecutive underflow sample
events needed to trigger an underflow adjustment
    """
    return self.__trigger_event_count
      
  def _set_trigger_event_count(self, v, load=False):
    """
    Setter method for trigger_event_count, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/underflow/config/trigger_event_count (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_trigger_event_count is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_trigger_event_count() directly.

    YANG Description: number of consecutive underflow sample
events needed to trigger an underflow adjustment
    """
    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="trigger-event-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """trigger_event_count 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="trigger-event-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__trigger_event_count = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_trigger_event_count(self):
    self.__trigger_event_count = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="trigger-event-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)
  underflow_threshold = __builtin__.property(_get_underflow_threshold, _set_underflow_threshold)
  trigger_event_count = __builtin__.property(_get_trigger_event_count, _set_trigger_event_count)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('underflow_threshold', underflow_threshold), ('trigger_event_count', trigger_event_count), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_underflow_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/bandwidth/auto-bandwidth/underflow/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information for MPLS underflow bandwidth
adjustment
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__underflow_threshold','__trigger_event_count',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__underflow_threshold = 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="underflow-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__trigger_event_count = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="trigger-event-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'bandwidth', 'auto-bandwidth', 'underflow', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/underflow/state/enabled (boolean)

    YANG Description: enables bandwidth underflow
adjustment on the lsp
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/underflow/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: enables bandwidth underflow
adjustment on the lsp
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_underflow_threshold(self):
    """
    Getter method for underflow_threshold, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/underflow/state/underflow_threshold (oc-types:percentage)

    YANG Description: bandwidth percentage change to trigger
and underflow event
    """
    return self.__underflow_threshold
      
  def _set_underflow_threshold(self, v, load=False):
    """
    Setter method for underflow_threshold, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/underflow/state/underflow_threshold (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_underflow_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_underflow_threshold() directly.

    YANG Description: bandwidth percentage change to trigger
and underflow event
    """
    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="underflow-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """underflow_threshold 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="underflow-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__underflow_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_underflow_threshold(self):
    self.__underflow_threshold = 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="underflow-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_trigger_event_count(self):
    """
    Getter method for trigger_event_count, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/underflow/state/trigger_event_count (uint16)

    YANG Description: number of consecutive underflow sample
events needed to trigger an underflow adjustment
    """
    return self.__trigger_event_count
      
  def _set_trigger_event_count(self, v, load=False):
    """
    Setter method for trigger_event_count, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/underflow/state/trigger_event_count (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_trigger_event_count is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_trigger_event_count() directly.

    YANG Description: number of consecutive underflow sample
events needed to trigger an underflow adjustment
    """
    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="trigger-event-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """trigger_event_count 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="trigger-event-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__trigger_event_count = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_trigger_event_count(self):
    self.__trigger_event_count = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="trigger-event-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  enabled = __builtin__.property(_get_enabled)
  underflow_threshold = __builtin__.property(_get_underflow_threshold)
  trigger_event_count = __builtin__.property(_get_trigger_event_count)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('underflow_threshold', underflow_threshold), ('trigger_event_count', trigger_event_count), ])


class yc_underflow_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_underflow(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/bandwidth/auto-bandwidth/underflow. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: configuration of MPLS underflow bandwidth
adjustement for the LSP
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'underflow'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_underflow_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_underflow_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'bandwidth', 'auto-bandwidth', 'underflow']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/underflow/config (container)

    YANG Description: Config information for MPLS underflow bandwidth
adjustment
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/underflow/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: Config information for MPLS underflow bandwidth
adjustment
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_underflow_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_underflow_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_underflow_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/underflow/state (container)

    YANG Description: State information for MPLS underflow bandwidth
adjustment
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/underflow/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 MPLS underflow bandwidth
adjustment
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_underflow_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_underflow_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_underflow_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_auto_bandwidth_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/bandwidth/auto-bandwidth. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Parameters related to auto-bandwidth
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__overflow','__underflow',)

  _yang_name = 'auto-bandwidth'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__overflow = YANGDynClass(base=yc_overflow_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_overflow, is_container='container', yang_name="overflow", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__underflow = YANGDynClass(base=yc_underflow_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_underflow, is_container='container', yang_name="underflow", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'bandwidth', 'auto-bandwidth']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/config (container)

    YANG Description: Configuration parameters relating to MPLS
auto-bandwidth on the tunnel.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/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 MPLS
auto-bandwidth on the tunnel.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/state (container)

    YANG Description: State parameters relating to MPLS
auto-bandwidth on the tunnel.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/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 parameters relating to MPLS
auto-bandwidth on the tunnel.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_overflow(self):
    """
    Getter method for overflow, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/overflow (container)

    YANG Description: configuration of MPLS overflow bandwidth
adjustement for the LSP
    """
    return self.__overflow
      
  def _set_overflow(self, v, load=False):
    """
    Setter method for overflow, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/overflow (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_overflow is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_overflow() directly.

    YANG Description: configuration of MPLS overflow bandwidth
adjustement for the LSP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_overflow_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_overflow, is_container='container', yang_name="overflow", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """overflow must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_overflow_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_overflow, is_container='container', yang_name="overflow", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__overflow = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_overflow(self):
    self.__overflow = YANGDynClass(base=yc_overflow_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_overflow, is_container='container', yang_name="overflow", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_underflow(self):
    """
    Getter method for underflow, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/underflow (container)

    YANG Description: configuration of MPLS underflow bandwidth
adjustement for the LSP
    """
    return self.__underflow
      
  def _set_underflow(self, v, load=False):
    """
    Setter method for underflow, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/underflow (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_underflow is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_underflow() directly.

    YANG Description: configuration of MPLS underflow bandwidth
adjustement for the LSP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_underflow_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_underflow, is_container='container', yang_name="underflow", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """underflow must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_underflow_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_underflow, is_container='container', yang_name="underflow", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__underflow = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_underflow(self):
    self.__underflow = YANGDynClass(base=yc_underflow_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_underflow, is_container='container', yang_name="underflow", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  overflow = __builtin__.property(_get_overflow, _set_overflow)
  underflow = __builtin__.property(_get_underflow, _set_underflow)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('overflow', overflow), ('underflow', underflow), ])


class yc_bandwidth_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/bandwidth. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Bandwidth configuration for TE LSPs
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__auto_bandwidth',)

  _yang_name = 'bandwidth'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__auto_bandwidth = YANGDynClass(base=yc_auto_bandwidth_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth, is_container='container', yang_name="auto-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'bandwidth']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/config (container)

    YANG Description: Configuration parameters related to bandwidth on TE
tunnels:
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/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 related to bandwidth on TE
tunnels:
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/state (container)

    YANG Description: State parameters related to bandwidth
configuration of TE tunnels
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/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 parameters related to bandwidth
configuration of TE tunnels
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_auto_bandwidth(self):
    """
    Getter method for auto_bandwidth, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth (container)

    YANG Description: Parameters related to auto-bandwidth
    """
    return self.__auto_bandwidth
      
  def _set_auto_bandwidth(self, v, load=False):
    """
    Setter method for auto_bandwidth, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_auto_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_auto_bandwidth() directly.

    YANG Description: Parameters related to auto-bandwidth
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_auto_bandwidth_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth, is_container='container', yang_name="auto-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """auto_bandwidth must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_auto_bandwidth_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth, is_container='container', yang_name="auto-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__auto_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_auto_bandwidth(self):
    self.__auto_bandwidth = YANGDynClass(base=yc_auto_bandwidth_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth, is_container='container', yang_name="auto-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  auto_bandwidth = __builtin__.property(_get_auto_bandwidth, _set_auto_bandwidth)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('auto_bandwidth', auto_bandwidth), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for P2P LSPs
  """
  __slots__ = ('_path_helper', '_extmethods', '__destination',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__destination = 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}'}),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}|:))'}),], is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'config']

  def _get_destination(self):
    """
    Getter method for destination, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/config/destination (inet:ip-address)

    YANG Description: P2P tunnel destination address
    """
    return self.__destination
      
  def _set_destination(self, v, load=False):
    """
    Setter method for destination, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/config/destination (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination() directly.

    YANG Description: P2P tunnel destination address
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)""",
        })

    self.__destination = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination(self):
    self.__destination = 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}'}),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}|:))'}),], is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)

  destination = __builtin__.property(_get_destination, _set_destination)


  _pyangbind_elements = OrderedDict([('destination', destination), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters for P2P LSPs
  """
  __slots__ = ('_path_helper', '_extmethods', '__destination',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__destination = 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}'}),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}|:))'}),], is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'state']

  def _get_destination(self):
    """
    Getter method for destination, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/state/destination (inet:ip-address)

    YANG Description: P2P tunnel destination address
    """
    return self.__destination
      
  def _set_destination(self, v, load=False):
    """
    Setter method for destination, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/state/destination (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination() directly.

    YANG Description: P2P tunnel destination address
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)""",
        })

    self.__destination = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination(self):
    self.__destination = 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}'}),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}|:))'}),], is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)

  destination = __builtin__.property(_get_destination)


  _pyangbind_elements = OrderedDict([('destination', destination), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-primary-path/p2p-primary-path/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters related to paths
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__path_computation_method','__use_cspf','__cspf_tiebreaker','__path_computation_server','__path_control','__explicit_path_name','__preference','__setup_priority','__hold_priority','__retry_timer',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__path_computation_method = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LOCALLY_COMPUTED"), is_leaf=True, yang_name="path-computation-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__use_cspf = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-cspf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__cspf_tiebreaker = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'RANDOM': {}, 'LEAST_FILL': {}, 'MOST_FILL': {}},), default=six.text_type("RANDOM"), is_leaf=True, yang_name="cspf-tiebreaker", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='cspf-tie-breaking', is_config=True)
    self.__path_computation_server = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-computation-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__path_control = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PCE_DELEGATED': {}, 'PCC_CONTROLLED': {}, 'PCC_REPORT_ONLY': {}},), is_leaf=True, yang_name="path-control", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pcep:lsp-control-type', is_config=True)
    self.__explicit_path_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="explicit-path-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    self.__retry_timer = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..600']}), is_leaf=True, yang_name="retry-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-primary-path', 'p2p-primary-path', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/name (string)

    YANG Description: Path name
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/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: Path name
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_path_computation_method(self):
    """
    Getter method for path_computation_method, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/path_computation_method (identityref)

    YANG Description: The method used for computing the path, either
locally computed, queried from a server or not
computed at all (explicitly configured).
    """
    return self.__path_computation_method
      
  def _set_path_computation_method(self, v, load=False):
    """
    Setter method for path_computation_method, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/path_computation_method (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_computation_method is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_computation_method() directly.

    YANG Description: The method used for computing the path, either
locally computed, queried from a server or not
computed at all (explicitly 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={'LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LOCALLY_COMPUTED"), is_leaf=True, yang_name="path-computation-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_computation_method must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LOCALLY_COMPUTED"), is_leaf=True, yang_name="path-computation-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__path_computation_method = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_computation_method(self):
    self.__path_computation_method = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LOCALLY_COMPUTED"), is_leaf=True, yang_name="path-computation-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_use_cspf(self):
    """
    Getter method for use_cspf, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/use_cspf (boolean)

    YANG Description: Flag to enable CSPF for locally computed LSPs
    """
    return self.__use_cspf
      
  def _set_use_cspf(self, v, load=False):
    """
    Setter method for use_cspf, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/use_cspf (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_use_cspf is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_use_cspf() directly.

    YANG Description: Flag to enable CSPF for locally computed LSPs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="use-cspf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """use_cspf must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-cspf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__use_cspf = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_use_cspf(self):
    self.__use_cspf = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-cspf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_cspf_tiebreaker(self):
    """
    Getter method for cspf_tiebreaker, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/cspf_tiebreaker (cspf-tie-breaking)

    YANG Description: Determine the tie-breaking method to choose between
equally desirable paths during CSFP computation
    """
    return self.__cspf_tiebreaker
      
  def _set_cspf_tiebreaker(self, v, load=False):
    """
    Setter method for cspf_tiebreaker, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/cspf_tiebreaker (cspf-tie-breaking)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cspf_tiebreaker is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cspf_tiebreaker() directly.

    YANG Description: Determine the tie-breaking method to choose between
equally desirable paths during CSFP computation
    """
    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={'RANDOM': {}, 'LEAST_FILL': {}, 'MOST_FILL': {}},), default=six.text_type("RANDOM"), is_leaf=True, yang_name="cspf-tiebreaker", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='cspf-tie-breaking', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cspf_tiebreaker must be of a type compatible with cspf-tie-breaking""",
          'defined-type': "openconfig-network-instance:cspf-tie-breaking",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'RANDOM': {}, 'LEAST_FILL': {}, 'MOST_FILL': {}},), default=six.text_type("RANDOM"), is_leaf=True, yang_name="cspf-tiebreaker", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='cspf-tie-breaking', is_config=True)""",
        })

    self.__cspf_tiebreaker = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cspf_tiebreaker(self):
    self.__cspf_tiebreaker = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'RANDOM': {}, 'LEAST_FILL': {}, 'MOST_FILL': {}},), default=six.text_type("RANDOM"), is_leaf=True, yang_name="cspf-tiebreaker", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='cspf-tie-breaking', is_config=True)


  def _get_path_computation_server(self):
    """
    Getter method for path_computation_server, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/path_computation_server (leafref)

    YANG Description: Reference to the address of a previously configured
external path computation server.
    """
    return self.__path_computation_server
      
  def _set_path_computation_server(self, v, load=False):
    """
    Setter method for path_computation_server, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/path_computation_server (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_computation_server is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_computation_server() directly.

    YANG Description: Reference to the address of a previously configured
external path computation server.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="path-computation-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_computation_server must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-computation-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__path_computation_server = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_computation_server(self):
    self.__path_computation_server = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-computation-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_path_control(self):
    """
    Getter method for path_control, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/path_control (oc-pcep:lsp-control-type)

    YANG Description: Set the LSP path control mode as PCE_DELEGATED
PCC_CONTROLLED or PCC_REPORT_ONLY information
state to the PCE.
    """
    return self.__path_control
      
  def _set_path_control(self, v, load=False):
    """
    Setter method for path_control, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/path_control (oc-pcep:lsp-control-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_control is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_control() directly.

    YANG Description: Set the LSP path control mode as PCE_DELEGATED
PCC_CONTROLLED or PCC_REPORT_ONLY information
state to the PCE.
    """
    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={'PCE_DELEGATED': {}, 'PCC_CONTROLLED': {}, 'PCC_REPORT_ONLY': {}},), is_leaf=True, yang_name="path-control", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pcep:lsp-control-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_control must be of a type compatible with oc-pcep:lsp-control-type""",
          'defined-type': "oc-pcep:lsp-control-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PCE_DELEGATED': {}, 'PCC_CONTROLLED': {}, 'PCC_REPORT_ONLY': {}},), is_leaf=True, yang_name="path-control", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pcep:lsp-control-type', is_config=True)""",
        })

    self.__path_control = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_control(self):
    self.__path_control = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PCE_DELEGATED': {}, 'PCC_CONTROLLED': {}, 'PCC_REPORT_ONLY': {}},), is_leaf=True, yang_name="path-control", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pcep:lsp-control-type', is_config=True)


  def _get_explicit_path_name(self):
    """
    Getter method for explicit_path_name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/explicit_path_name (leafref)

    YANG Description: reference to a defined path
    """
    return self.__explicit_path_name
      
  def _set_explicit_path_name(self, v, load=False):
    """
    Setter method for explicit_path_name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/explicit_path_name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_explicit_path_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_explicit_path_name() directly.

    YANG Description: reference to a defined path
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="explicit-path-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """explicit_path_name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="explicit-path-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__explicit_path_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_explicit_path_name(self):
    self.__explicit_path_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="explicit-path-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_preference(self):
    """
    Getter method for preference, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/preference (uint8)

    YANG Description: Specifies a preference for this path. The lower the
number higher the preference
    """
    return self.__preference
      
  def _set_preference(self, v, load=False):
    """
    Setter method for preference, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/preference (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_preference is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_preference() directly.

    YANG Description: Specifies a preference for this path. The lower the
number higher the preference
    """
    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': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """preference 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': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
        })

    self.__preference = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_preference(self):
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)


  def _get_setup_priority(self):
    """
    Getter method for setup_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/setup_priority (uint8)

    YANG Description: RSVP-TE preemption priority during LSP setup, lower is
higher priority; default 7 indicates that LSP will not
preempt established LSPs during setup
    """
    return self.__setup_priority
      
  def _set_setup_priority(self, v, load=False):
    """
    Setter method for setup_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/setup_priority (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_setup_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_setup_priority() directly.

    YANG Description: RSVP-TE preemption priority during LSP setup, lower is
higher priority; default 7 indicates that LSP will not
preempt established LSPs during setup
    """
    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']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """setup_priority 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..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
        })

    self.__setup_priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_setup_priority(self):
    self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)


  def _get_hold_priority(self):
    """
    Getter method for hold_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/hold_priority (uint8)

    YANG Description: preemption priority once the LSP is established,
lower is higher priority; default 0 indicates other LSPs
will not preempt the LSPs once established
    """
    return self.__hold_priority
      
  def _set_hold_priority(self, v, load=False):
    """
    Setter method for hold_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/hold_priority (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hold_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hold_priority() directly.

    YANG Description: preemption priority once the LSP is established,
lower is higher priority; default 0 indicates other LSPs
will not preempt the LSPs once established
    """
    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']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hold_priority 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..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
        })

    self.__hold_priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hold_priority(self):
    self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)


  def _get_retry_timer(self):
    """
    Getter method for retry_timer, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/retry_timer (uint16)

    YANG Description: sets the time between attempts to establish the
LSP
    """
    return self.__retry_timer
      
  def _set_retry_timer(self, v, load=False):
    """
    Setter method for retry_timer, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/retry_timer (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_retry_timer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_retry_timer() directly.

    YANG Description: sets the time between attempts to establish the
LSP
    """
    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': ['1..600']}), is_leaf=True, yang_name="retry-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """retry_timer must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..600']}), is_leaf=True, yang_name="retry-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__retry_timer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_retry_timer(self):
    self.__retry_timer = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..600']}), is_leaf=True, yang_name="retry-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  path_computation_method = __builtin__.property(_get_path_computation_method, _set_path_computation_method)
  use_cspf = __builtin__.property(_get_use_cspf, _set_use_cspf)
  cspf_tiebreaker = __builtin__.property(_get_cspf_tiebreaker, _set_cspf_tiebreaker)
  path_computation_server = __builtin__.property(_get_path_computation_server, _set_path_computation_server)
  path_control = __builtin__.property(_get_path_control, _set_path_control)
  explicit_path_name = __builtin__.property(_get_explicit_path_name, _set_explicit_path_name)
  preference = __builtin__.property(_get_preference, _set_preference)
  setup_priority = __builtin__.property(_get_setup_priority, _set_setup_priority)
  hold_priority = __builtin__.property(_get_hold_priority, _set_hold_priority)
  retry_timer = __builtin__.property(_get_retry_timer, _set_retry_timer)


  _pyangbind_elements = OrderedDict([('name', name), ('path_computation_method', path_computation_method), ('use_cspf', use_cspf), ('cspf_tiebreaker', cspf_tiebreaker), ('path_computation_server', path_computation_server), ('path_control', path_control), ('explicit_path_name', explicit_path_name), ('preference', preference), ('setup_priority', setup_priority), ('hold_priority', hold_priority), ('retry_timer', retry_timer), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-primary-path/p2p-primary-path/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters related to paths
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__path_computation_method','__use_cspf','__cspf_tiebreaker','__path_computation_server','__path_control','__explicit_path_name','__preference','__setup_priority','__hold_priority','__retry_timer','__associated_rsvp_sessions','__spf_metric','__cspf_metric',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__path_computation_method = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LOCALLY_COMPUTED"), is_leaf=True, yang_name="path-computation-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__use_cspf = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-cspf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__cspf_tiebreaker = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'RANDOM': {}, 'LEAST_FILL': {}, 'MOST_FILL': {}},), default=six.text_type("RANDOM"), is_leaf=True, yang_name="cspf-tiebreaker", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='cspf-tie-breaking', is_config=False)
    self.__path_computation_server = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-computation-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__path_control = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PCE_DELEGATED': {}, 'PCC_CONTROLLED': {}, 'PCC_REPORT_ONLY': {}},), is_leaf=True, yang_name="path-control", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pcep:lsp-control-type', is_config=False)
    self.__explicit_path_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="explicit-path-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__retry_timer = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..600']}), is_leaf=True, yang_name="retry-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__associated_rsvp_sessions = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="associated-rsvp-sessions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__spf_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="spf-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__cspf_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cspf-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-primary-path', 'p2p-primary-path', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/name (string)

    YANG Description: Path name
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/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: Path name
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_path_computation_method(self):
    """
    Getter method for path_computation_method, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/path_computation_method (identityref)

    YANG Description: The method used for computing the path, either
locally computed, queried from a server or not
computed at all (explicitly configured).
    """
    return self.__path_computation_method
      
  def _set_path_computation_method(self, v, load=False):
    """
    Setter method for path_computation_method, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/path_computation_method (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_computation_method is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_computation_method() directly.

    YANG Description: The method used for computing the path, either
locally computed, queried from a server or not
computed at all (explicitly 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={'LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LOCALLY_COMPUTED"), is_leaf=True, yang_name="path-computation-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_computation_method must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LOCALLY_COMPUTED"), is_leaf=True, yang_name="path-computation-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__path_computation_method = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_computation_method(self):
    self.__path_computation_method = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LOCALLY_COMPUTED"), is_leaf=True, yang_name="path-computation-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_use_cspf(self):
    """
    Getter method for use_cspf, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/use_cspf (boolean)

    YANG Description: Flag to enable CSPF for locally computed LSPs
    """
    return self.__use_cspf
      
  def _set_use_cspf(self, v, load=False):
    """
    Setter method for use_cspf, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/use_cspf (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_use_cspf is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_use_cspf() directly.

    YANG Description: Flag to enable CSPF for locally computed LSPs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="use-cspf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """use_cspf must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-cspf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__use_cspf = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_use_cspf(self):
    self.__use_cspf = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-cspf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_cspf_tiebreaker(self):
    """
    Getter method for cspf_tiebreaker, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/cspf_tiebreaker (cspf-tie-breaking)

    YANG Description: Determine the tie-breaking method to choose between
equally desirable paths during CSFP computation
    """
    return self.__cspf_tiebreaker
      
  def _set_cspf_tiebreaker(self, v, load=False):
    """
    Setter method for cspf_tiebreaker, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/cspf_tiebreaker (cspf-tie-breaking)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cspf_tiebreaker is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cspf_tiebreaker() directly.

    YANG Description: Determine the tie-breaking method to choose between
equally desirable paths during CSFP computation
    """
    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={'RANDOM': {}, 'LEAST_FILL': {}, 'MOST_FILL': {}},), default=six.text_type("RANDOM"), is_leaf=True, yang_name="cspf-tiebreaker", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='cspf-tie-breaking', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cspf_tiebreaker must be of a type compatible with cspf-tie-breaking""",
          'defined-type': "openconfig-network-instance:cspf-tie-breaking",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'RANDOM': {}, 'LEAST_FILL': {}, 'MOST_FILL': {}},), default=six.text_type("RANDOM"), is_leaf=True, yang_name="cspf-tiebreaker", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='cspf-tie-breaking', is_config=False)""",
        })

    self.__cspf_tiebreaker = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cspf_tiebreaker(self):
    self.__cspf_tiebreaker = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'RANDOM': {}, 'LEAST_FILL': {}, 'MOST_FILL': {}},), default=six.text_type("RANDOM"), is_leaf=True, yang_name="cspf-tiebreaker", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='cspf-tie-breaking', is_config=False)


  def _get_path_computation_server(self):
    """
    Getter method for path_computation_server, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/path_computation_server (leafref)

    YANG Description: Reference to the address of a previously configured
external path computation server.
    """
    return self.__path_computation_server
      
  def _set_path_computation_server(self, v, load=False):
    """
    Setter method for path_computation_server, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/path_computation_server (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_computation_server is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_computation_server() directly.

    YANG Description: Reference to the address of a previously configured
external path computation server.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="path-computation-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_computation_server must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-computation-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__path_computation_server = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_computation_server(self):
    self.__path_computation_server = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-computation-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_path_control(self):
    """
    Getter method for path_control, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/path_control (oc-pcep:lsp-control-type)

    YANG Description: Set the LSP path control mode as PCE_DELEGATED
PCC_CONTROLLED or PCC_REPORT_ONLY information
state to the PCE.
    """
    return self.__path_control
      
  def _set_path_control(self, v, load=False):
    """
    Setter method for path_control, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/path_control (oc-pcep:lsp-control-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_control is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_control() directly.

    YANG Description: Set the LSP path control mode as PCE_DELEGATED
PCC_CONTROLLED or PCC_REPORT_ONLY information
state to the PCE.
    """
    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={'PCE_DELEGATED': {}, 'PCC_CONTROLLED': {}, 'PCC_REPORT_ONLY': {}},), is_leaf=True, yang_name="path-control", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pcep:lsp-control-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_control must be of a type compatible with oc-pcep:lsp-control-type""",
          'defined-type': "oc-pcep:lsp-control-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PCE_DELEGATED': {}, 'PCC_CONTROLLED': {}, 'PCC_REPORT_ONLY': {}},), is_leaf=True, yang_name="path-control", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pcep:lsp-control-type', is_config=False)""",
        })

    self.__path_control = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_control(self):
    self.__path_control = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PCE_DELEGATED': {}, 'PCC_CONTROLLED': {}, 'PCC_REPORT_ONLY': {}},), is_leaf=True, yang_name="path-control", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pcep:lsp-control-type', is_config=False)


  def _get_explicit_path_name(self):
    """
    Getter method for explicit_path_name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/explicit_path_name (leafref)

    YANG Description: reference to a defined path
    """
    return self.__explicit_path_name
      
  def _set_explicit_path_name(self, v, load=False):
    """
    Setter method for explicit_path_name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/explicit_path_name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_explicit_path_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_explicit_path_name() directly.

    YANG Description: reference to a defined path
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="explicit-path-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """explicit_path_name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="explicit-path-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__explicit_path_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_explicit_path_name(self):
    self.__explicit_path_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="explicit-path-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_preference(self):
    """
    Getter method for preference, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/preference (uint8)

    YANG Description: Specifies a preference for this path. The lower the
number higher the preference
    """
    return self.__preference
      
  def _set_preference(self, v, load=False):
    """
    Setter method for preference, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/preference (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_preference is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_preference() directly.

    YANG Description: Specifies a preference for this path. The lower the
number higher the preference
    """
    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': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """preference 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': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__preference = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_preference(self):
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_setup_priority(self):
    """
    Getter method for setup_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/setup_priority (uint8)

    YANG Description: RSVP-TE preemption priority during LSP setup, lower is
higher priority; default 7 indicates that LSP will not
preempt established LSPs during setup
    """
    return self.__setup_priority
      
  def _set_setup_priority(self, v, load=False):
    """
    Setter method for setup_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/setup_priority (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_setup_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_setup_priority() directly.

    YANG Description: RSVP-TE preemption priority during LSP setup, lower is
higher priority; default 7 indicates that LSP will not
preempt established LSPs during setup
    """
    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']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """setup_priority 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..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__setup_priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_setup_priority(self):
    self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_hold_priority(self):
    """
    Getter method for hold_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/hold_priority (uint8)

    YANG Description: preemption priority once the LSP is established,
lower is higher priority; default 0 indicates other LSPs
will not preempt the LSPs once established
    """
    return self.__hold_priority
      
  def _set_hold_priority(self, v, load=False):
    """
    Setter method for hold_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/hold_priority (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hold_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hold_priority() directly.

    YANG Description: preemption priority once the LSP is established,
lower is higher priority; default 0 indicates other LSPs
will not preempt the LSPs once established
    """
    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']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hold_priority 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..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__hold_priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hold_priority(self):
    self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_retry_timer(self):
    """
    Getter method for retry_timer, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/retry_timer (uint16)

    YANG Description: sets the time between attempts to establish the
LSP
    """
    return self.__retry_timer
      
  def _set_retry_timer(self, v, load=False):
    """
    Setter method for retry_timer, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/retry_timer (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_retry_timer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_retry_timer() directly.

    YANG Description: sets the time between attempts to establish the
LSP
    """
    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': ['1..600']}), is_leaf=True, yang_name="retry-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """retry_timer must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..600']}), is_leaf=True, yang_name="retry-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__retry_timer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_retry_timer(self):
    self.__retry_timer = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..600']}), is_leaf=True, yang_name="retry-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_associated_rsvp_sessions(self):
    """
    Getter method for associated_rsvp_sessions, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/associated_rsvp_sessions (leafref)

    YANG Description: If the signalling protocol specified for this path is
RSVP-TE, this leaf-list provides a reference to the associated
sessions within the RSVP-TE protocol sessions list, such
that details of the signaling can be retrieved. More than
one session may exist during re-signalling such as
make-before-break.
    """
    return self.__associated_rsvp_sessions
      
  def _set_associated_rsvp_sessions(self, v, load=False):
    """
    Setter method for associated_rsvp_sessions, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/associated_rsvp_sessions (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_associated_rsvp_sessions is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_associated_rsvp_sessions() directly.

    YANG Description: If the signalling protocol specified for this path is
RSVP-TE, this leaf-list provides a reference to the associated
sessions within the RSVP-TE protocol sessions list, such
that details of the signaling can be retrieved. More than
one session may exist during re-signalling such as
make-before-break.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="associated-rsvp-sessions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """associated_rsvp_sessions must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="associated-rsvp-sessions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__associated_rsvp_sessions = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_associated_rsvp_sessions(self):
    self.__associated_rsvp_sessions = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="associated-rsvp-sessions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_spf_metric(self):
    """
    Getter method for spf_metric, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/spf_metric (uint64)

    YANG Description: The IGP metric of the shortest path to the LSP destination.
This value is used to compare the current metric of the
constrained path to the shortest path that is available in
the network topology.
    """
    return self.__spf_metric
      
  def _set_spf_metric(self, v, load=False):
    """
    Setter method for spf_metric, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/spf_metric (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_spf_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_spf_metric() directly.

    YANG Description: The IGP metric of the shortest path to the LSP destination.
This value is used to compare the current metric of the
constrained path to the shortest path that is available in
the network topology.
    """
    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="spf-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """spf_metric 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="spf-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__spf_metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_spf_metric(self):
    self.__spf_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="spf-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_cspf_metric(self):
    """
    Getter method for cspf_metric, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/cspf_metric (uint64)

    YANG Description: The IGP metric of the path currently used by the LSP.
This value is used to represent the metric of the path
used by the LSP following the execution of the CSPF
algorithm and signalling of the LSP.
    """
    return self.__cspf_metric
      
  def _set_cspf_metric(self, v, load=False):
    """
    Setter method for cspf_metric, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/cspf_metric (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cspf_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cspf_metric() directly.

    YANG Description: The IGP metric of the path currently used by the LSP.
This value is used to represent the metric of the path
used by the LSP following the execution of the CSPF
algorithm and signalling of the LSP.
    """
    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="cspf-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cspf_metric 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="cspf-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__cspf_metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cspf_metric(self):
    self.__cspf_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cspf-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)

  name = __builtin__.property(_get_name)
  path_computation_method = __builtin__.property(_get_path_computation_method)
  use_cspf = __builtin__.property(_get_use_cspf)
  cspf_tiebreaker = __builtin__.property(_get_cspf_tiebreaker)
  path_computation_server = __builtin__.property(_get_path_computation_server)
  path_control = __builtin__.property(_get_path_control)
  explicit_path_name = __builtin__.property(_get_explicit_path_name)
  preference = __builtin__.property(_get_preference)
  setup_priority = __builtin__.property(_get_setup_priority)
  hold_priority = __builtin__.property(_get_hold_priority)
  retry_timer = __builtin__.property(_get_retry_timer)
  associated_rsvp_sessions = __builtin__.property(_get_associated_rsvp_sessions)
  spf_metric = __builtin__.property(_get_spf_metric)
  cspf_metric = __builtin__.property(_get_cspf_metric)


  _pyangbind_elements = OrderedDict([('name', name), ('path_computation_method', path_computation_method), ('use_cspf', use_cspf), ('cspf_tiebreaker', cspf_tiebreaker), ('path_computation_server', path_computation_server), ('path_control', path_control), ('explicit_path_name', explicit_path_name), ('preference', preference), ('setup_priority', setup_priority), ('hold_priority', hold_priority), ('retry_timer', retry_timer), ('associated_rsvp_sessions', associated_rsvp_sessions), ('spf_metric', spf_metric), ('cspf_metric', cspf_metric), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_path_metric_bound_constraints_path_metric_bound_constraint_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-primary-path/p2p-primary-path/path-metric-bound-constraints/path-metric-bound-constraint/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to path metric bound constraints.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__metric_upper_bound',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__metric_upper_bound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="metric-upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-primary-path', 'p2p-primary-path', 'path-metric-bound-constraints', 'path-metric-bound-constraint', 'config']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/path_metric_bound_constraints/path_metric_bound_constraint/config/type (identityref)

    YANG Description: Identifies an entry in the list of metric-types
bound for the TE path.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/path_metric_bound_constraints/path_metric_bound_constraint/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: Identifies an entry in the list of metric-types
bound for the TE path.
    """
    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={'TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', 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={'TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_metric_upper_bound(self):
    """
    Getter method for metric_upper_bound, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/path_metric_bound_constraints/path_metric_bound_constraint/config/metric_upper_bound (uint64)

    YANG Description: Upper bound on end-to-end path metric. A zero indicate
an unbounded upper limit for the specific metric-type.
    """
    return self.__metric_upper_bound
      
  def _set_metric_upper_bound(self, v, load=False):
    """
    Setter method for metric_upper_bound, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/path_metric_bound_constraints/path_metric_bound_constraint/config/metric_upper_bound (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric_upper_bound is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric_upper_bound() directly.

    YANG Description: Upper bound on end-to-end path metric. A zero indicate
an unbounded upper limit for the specific metric-type.
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="metric-upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric_upper_bound 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), default=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="metric-upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=True)""",
        })

    self.__metric_upper_bound = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric_upper_bound(self):
    self.__metric_upper_bound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="metric-upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=True)

  type = __builtin__.property(_get_type, _set_type)
  metric_upper_bound = __builtin__.property(_get_metric_upper_bound, _set_metric_upper_bound)


  _pyangbind_elements = OrderedDict([('type', type), ('metric_upper_bound', metric_upper_bound), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_path_metric_bound_constraints_path_metric_bound_constraint_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-primary-path/p2p-primary-path/path-metric-bound-constraints/path-metric-bound-constraint/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 path metric bound constraints.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__metric_upper_bound',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__metric_upper_bound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="metric-upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-primary-path', 'p2p-primary-path', 'path-metric-bound-constraints', 'path-metric-bound-constraint', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/path_metric_bound_constraints/path_metric_bound_constraint/state/type (identityref)

    YANG Description: Identifies an entry in the list of metric-types
bound for the TE path.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/path_metric_bound_constraints/path_metric_bound_constraint/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: Identifies an entry in the list of metric-types
bound for the TE path.
    """
    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={'TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', 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={'TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_metric_upper_bound(self):
    """
    Getter method for metric_upper_bound, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/path_metric_bound_constraints/path_metric_bound_constraint/state/metric_upper_bound (uint64)

    YANG Description: Upper bound on end-to-end path metric. A zero indicate
an unbounded upper limit for the specific metric-type.
    """
    return self.__metric_upper_bound
      
  def _set_metric_upper_bound(self, v, load=False):
    """
    Setter method for metric_upper_bound, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/path_metric_bound_constraints/path_metric_bound_constraint/state/metric_upper_bound (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric_upper_bound is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric_upper_bound() directly.

    YANG Description: Upper bound on end-to-end path metric. A zero indicate
an unbounded upper limit for the specific metric-type.
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="metric-upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric_upper_bound 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), default=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="metric-upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__metric_upper_bound = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric_upper_bound(self):
    self.__metric_upper_bound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="metric-upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)

  type = __builtin__.property(_get_type)
  metric_upper_bound = __builtin__.property(_get_metric_upper_bound)


  _pyangbind_elements = OrderedDict([('type', type), ('metric_upper_bound', metric_upper_bound), ])


class yc_path_metric_bound_constraint_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_path_metric_bound_constraints_path_metric_bound_constraint(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-primary-path/p2p-primary-path/path-metric-bound-constraints/path-metric-bound-constraint. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A list of metric bounds that are applied as constraints to the LSP.
It act as a logical AND, hence all of them must be satisfied.
If not, it will return an error.
Constraints within this list may be applicable to either
the local CSPF process (where data is available to the local device)
or be communicated to a PCE for calculation.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__config','__state',)

  _yang_name = 'path-metric-bound-constraint'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_path_metric_bound_constraints_path_metric_bound_constraint_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_path_metric_bound_constraints_path_metric_bound_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-primary-path', 'p2p-primary-path', 'path-metric-bound-constraints', 'path-metric-bound-constraint']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/path_metric_bound_constraints/path_metric_bound_constraint/type (leafref)

    YANG Description: Identifies an entry in the list of metric-types
bound for the TE path.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/path_metric_bound_constraints/path_metric_bound_constraint/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: Identifies an entry in the list of metric-types
bound for the TE path.
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/path_metric_bound_constraints/path_metric_bound_constraint/config (container)

    YANG Description: Configuration parameters relating to path metric bound constraints.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/path_metric_bound_constraints/path_metric_bound_constraint/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 path metric bound constraints.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_path_metric_bound_constraints_path_metric_bound_constraint_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_path_metric_bound_constraints_path_metric_bound_constraint_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_path_metric_bound_constraints_path_metric_bound_constraint_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/path_metric_bound_constraints/path_metric_bound_constraint/state (container)

    YANG Description: Operational state parameters relating to path metric bound constraints.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/path_metric_bound_constraints/path_metric_bound_constraint/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 path metric bound constraints.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_path_metric_bound_constraints_path_metric_bound_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_path_metric_bound_constraints_path_metric_bound_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_path_metric_bound_constraints_path_metric_bound_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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)


  _pyangbind_elements = OrderedDict([('type', type), ('config', config), ('state', state), ])


class yc_path_metric_bound_constraints_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_path_metric_bound_constraints(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-primary-path/p2p-primary-path/path-metric-bound-constraints. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for the path metric bound constraints.
  """
  __slots__ = ('_path_helper', '_extmethods', '__path_metric_bound_constraint',)

  _yang_name = 'path-metric-bound-constraints'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__path_metric_bound_constraint = YANGDynClass(base=YANGListType("type",yc_path_metric_bound_constraint_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_path_metric_bound_constraints_path_metric_bound_constraint, yang_name="path-metric-bound-constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="path-metric-bound-constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-primary-path', 'p2p-primary-path', 'path-metric-bound-constraints']

  def _get_path_metric_bound_constraint(self):
    """
    Getter method for path_metric_bound_constraint, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/path_metric_bound_constraints/path_metric_bound_constraint (list)

    YANG Description: A list of metric bounds that are applied as constraints to the LSP.
It act as a logical AND, hence all of them must be satisfied.
If not, it will return an error.
Constraints within this list may be applicable to either
the local CSPF process (where data is available to the local device)
or be communicated to a PCE for calculation.
    """
    return self.__path_metric_bound_constraint
      
  def _set_path_metric_bound_constraint(self, v, load=False):
    """
    Setter method for path_metric_bound_constraint, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/path_metric_bound_constraints/path_metric_bound_constraint (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_metric_bound_constraint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_metric_bound_constraint() directly.

    YANG Description: A list of metric bounds that are applied as constraints to the LSP.
It act as a logical AND, hence all of them must be satisfied.
If not, it will return an error.
Constraints within this list may be applicable to either
the local CSPF process (where data is available to the local device)
or be communicated to a PCE for calculation.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("type",yc_path_metric_bound_constraint_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_path_metric_bound_constraints_path_metric_bound_constraint, yang_name="path-metric-bound-constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="path-metric-bound-constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_metric_bound_constraint must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("type",yc_path_metric_bound_constraint_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_path_metric_bound_constraints_path_metric_bound_constraint, yang_name="path-metric-bound-constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="path-metric-bound-constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__path_metric_bound_constraint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_metric_bound_constraint(self):
    self.__path_metric_bound_constraint = YANGDynClass(base=YANGListType("type",yc_path_metric_bound_constraint_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_path_metric_bound_constraints_path_metric_bound_constraint, yang_name="path-metric-bound-constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="path-metric-bound-constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  path_metric_bound_constraint = __builtin__.property(_get_path_metric_bound_constraint, _set_path_metric_bound_constraint)


  _pyangbind_elements = OrderedDict([('path_metric_bound_constraint', path_metric_bound_constraint), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_candidate_secondary_paths_candidate_secondary_path_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-primary-path/p2p-primary-path/candidate-secondary-paths/candidate-secondary-path/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 candidate
secondary path
  """
  __slots__ = ('_path_helper', '_extmethods', '__secondary_path','__priority',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__secondary_path = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="secondary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-primary-path', 'p2p-primary-path', 'candidate-secondary-paths', 'candidate-secondary-path', 'config']

  def _get_secondary_path(self):
    """
    Getter method for secondary_path, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/candidate_secondary_paths/candidate_secondary_path/config/secondary_path (leafref)

    YANG Description: A reference to the secondary path that should be utilised
when the containing primary path option is in use
    """
    return self.__secondary_path
      
  def _set_secondary_path(self, v, load=False):
    """
    Setter method for secondary_path, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/candidate_secondary_paths/candidate_secondary_path/config/secondary_path (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_secondary_path is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_secondary_path() directly.

    YANG Description: A reference to the secondary path that should be utilised
when the containing primary path option is in use
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="secondary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """secondary_path must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="secondary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__secondary_path = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_secondary_path(self):
    self.__secondary_path = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="secondary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_priority(self):
    """
    Getter method for priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/candidate_secondary_paths/candidate_secondary_path/config/priority (uint16)

    YANG Description: The priority of the specified secondary path option. Higher
priority options are less preferable - such that a secondary
path reference with a priority of 0 is the most preferred
    """
    return self.__priority
      
  def _set_priority(self, v, load=False):
    """
    Setter method for priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/candidate_secondary_paths/candidate_secondary_path/config/priority (uint16)
    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: The priority of the specified secondary path option. Higher
priority options are less preferable - such that a secondary
path reference with a priority of 0 is the most preferred
    """
    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="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """priority 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="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_priority(self):
    self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

  secondary_path = __builtin__.property(_get_secondary_path, _set_secondary_path)
  priority = __builtin__.property(_get_priority, _set_priority)


  _pyangbind_elements = OrderedDict([('secondary_path', secondary_path), ('priority', priority), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_candidate_secondary_paths_candidate_secondary_path_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-primary-path/p2p-primary-path/candidate-secondary-paths/candidate-secondary-path/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 candidate
secondary path
  """
  __slots__ = ('_path_helper', '_extmethods', '__secondary_path','__priority','__active',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__secondary_path = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="secondary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__active = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="active", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-primary-path', 'p2p-primary-path', 'candidate-secondary-paths', 'candidate-secondary-path', 'state']

  def _get_secondary_path(self):
    """
    Getter method for secondary_path, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/candidate_secondary_paths/candidate_secondary_path/state/secondary_path (leafref)

    YANG Description: A reference to the secondary path that should be utilised
when the containing primary path option is in use
    """
    return self.__secondary_path
      
  def _set_secondary_path(self, v, load=False):
    """
    Setter method for secondary_path, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/candidate_secondary_paths/candidate_secondary_path/state/secondary_path (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_secondary_path is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_secondary_path() directly.

    YANG Description: A reference to the secondary path that should be utilised
when the containing primary path option is in use
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="secondary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """secondary_path must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="secondary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__secondary_path = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_secondary_path(self):
    self.__secondary_path = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="secondary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_priority(self):
    """
    Getter method for priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/candidate_secondary_paths/candidate_secondary_path/state/priority (uint16)

    YANG Description: The priority of the specified secondary path option. Higher
priority options are less preferable - such that a secondary
path reference with a priority of 0 is the most preferred
    """
    return self.__priority
      
  def _set_priority(self, v, load=False):
    """
    Setter method for priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/candidate_secondary_paths/candidate_secondary_path/state/priority (uint16)
    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: The priority of the specified secondary path option. Higher
priority options are less preferable - such that a secondary
path reference with a priority of 0 is the most preferred
    """
    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="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """priority 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="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_priority(self):
    self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_active(self):
    """
    Getter method for active, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/candidate_secondary_paths/candidate_secondary_path/state/active (boolean)

    YANG Description: Indicates the current active path option that has
been selected of the candidate secondary paths
    """
    return self.__active
      
  def _set_active(self, v, load=False):
    """
    Setter method for active, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/candidate_secondary_paths/candidate_secondary_path/state/active (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_active is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_active() directly.

    YANG Description: Indicates the current active path option that has
been selected of the candidate secondary paths
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="active", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """active must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="active", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__active = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_active(self):
    self.__active = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="active", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  secondary_path = __builtin__.property(_get_secondary_path)
  priority = __builtin__.property(_get_priority)
  active = __builtin__.property(_get_active)


  _pyangbind_elements = OrderedDict([('secondary_path', secondary_path), ('priority', priority), ('active', active), ])


class yc_candidate_secondary_path_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_candidate_secondary_paths_candidate_secondary_path(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-primary-path/p2p-primary-path/candidate-secondary-paths/candidate-secondary-path. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of secondary paths which may be utilised when the
current primary path is in use
  """
  __slots__ = ('_path_helper', '_extmethods', '__secondary_path','__config','__state',)

  _yang_name = 'candidate-secondary-path'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__secondary_path = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="secondary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_candidate_secondary_paths_candidate_secondary_path_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_candidate_secondary_paths_candidate_secondary_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-primary-path', 'p2p-primary-path', 'candidate-secondary-paths', 'candidate-secondary-path']

  def _get_secondary_path(self):
    """
    Getter method for secondary_path, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/candidate_secondary_paths/candidate_secondary_path/secondary_path (leafref)

    YANG Description: A reference to the secondary path option reference
which acts as the key of the candidate-secondary-path
list
    """
    return self.__secondary_path
      
  def _set_secondary_path(self, v, load=False):
    """
    Setter method for secondary_path, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/candidate_secondary_paths/candidate_secondary_path/secondary_path (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_secondary_path is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_secondary_path() directly.

    YANG Description: A reference to the secondary path option reference
which acts as the key of the candidate-secondary-path
list
    """
    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="secondary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """secondary_path must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="secondary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__secondary_path = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_secondary_path(self):
    self.__secondary_path = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="secondary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/candidate_secondary_paths/candidate_secondary_path/config (container)

    YANG Description: Configuration parameters relating to the candidate
secondary path
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/candidate_secondary_paths/candidate_secondary_path/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 candidate
secondary path
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_candidate_secondary_paths_candidate_secondary_path_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_candidate_secondary_paths_candidate_secondary_path_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_candidate_secondary_paths_candidate_secondary_path_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/candidate_secondary_paths/candidate_secondary_path/state (container)

    YANG Description: Operational state parameters relating to the candidate
secondary path
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/candidate_secondary_paths/candidate_secondary_path/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 candidate
secondary path
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_candidate_secondary_paths_candidate_secondary_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_candidate_secondary_paths_candidate_secondary_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_candidate_secondary_paths_candidate_secondary_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  secondary_path = __builtin__.property(_get_secondary_path, _set_secondary_path)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('secondary_path', secondary_path), ('config', config), ('state', state), ])


class yc_candidate_secondary_paths_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_candidate_secondary_paths(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-primary-path/p2p-primary-path/candidate-secondary-paths. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The set of candidate secondary paths which may be used
for this primary path. When secondary paths are specified
in the list the path of the secondary LSP in use must be
restricted to those path options referenced. The
priority of the secondary paths is specified within the
list. Higher priority values are less preferred - that is
to say that a path with priority 0 is the most preferred
path. In the case that the list is empty, any secondary
path option may be utilised when the current primary path
is in use.
  """
  __slots__ = ('_path_helper', '_extmethods', '__candidate_secondary_path',)

  _yang_name = 'candidate-secondary-paths'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__candidate_secondary_path = YANGDynClass(base=YANGListType("secondary_path",yc_candidate_secondary_path_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_candidate_secondary_paths_candidate_secondary_path, yang_name="candidate-secondary-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='secondary-path', extensions=None), is_container='list', yang_name="candidate-secondary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-primary-path', 'p2p-primary-path', 'candidate-secondary-paths']

  def _get_candidate_secondary_path(self):
    """
    Getter method for candidate_secondary_path, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/candidate_secondary_paths/candidate_secondary_path (list)

    YANG Description: List of secondary paths which may be utilised when the
current primary path is in use
    """
    return self.__candidate_secondary_path
      
  def _set_candidate_secondary_path(self, v, load=False):
    """
    Setter method for candidate_secondary_path, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/candidate_secondary_paths/candidate_secondary_path (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_candidate_secondary_path is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_candidate_secondary_path() directly.

    YANG Description: List of secondary paths which may be utilised when the
current primary path is in use
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("secondary_path",yc_candidate_secondary_path_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_candidate_secondary_paths_candidate_secondary_path, yang_name="candidate-secondary-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='secondary-path', extensions=None), is_container='list', yang_name="candidate-secondary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """candidate_secondary_path must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("secondary_path",yc_candidate_secondary_path_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_candidate_secondary_paths_candidate_secondary_path, yang_name="candidate-secondary-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='secondary-path', extensions=None), is_container='list', yang_name="candidate-secondary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__candidate_secondary_path = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_candidate_secondary_path(self):
    self.__candidate_secondary_path = YANGDynClass(base=YANGListType("secondary_path",yc_candidate_secondary_path_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_candidate_secondary_paths_candidate_secondary_path, yang_name="candidate-secondary-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='secondary-path', extensions=None), is_container='list', yang_name="candidate-secondary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  candidate_secondary_path = __builtin__.property(_get_candidate_secondary_path, _set_candidate_secondary_path)


  _pyangbind_elements = OrderedDict([('candidate_secondary_path', candidate_secondary_path), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_admin_groups_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-primary-path/p2p-primary-path/admin-groups/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', '__exclude_group','__include_all_group','__include_any_group',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__exclude_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="exclude-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__include_all_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-all-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__include_any_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-any-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-primary-path', 'p2p-primary-path', 'admin-groups', 'config']

  def _get_exclude_group(self):
    """
    Getter method for exclude_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/admin_groups/config/exclude_group (leafref)

    YANG Description: list of references to named admin-groups to exclude in
path calculation.
    """
    return self.__exclude_group
      
  def _set_exclude_group(self, v, load=False):
    """
    Setter method for exclude_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/admin_groups/config/exclude_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_exclude_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_exclude_group() directly.

    YANG Description: list of references to named admin-groups to exclude in
path calculation.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="exclude-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """exclude_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="exclude-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__exclude_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_exclude_group(self):
    self.__exclude_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="exclude-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_include_all_group(self):
    """
    Getter method for include_all_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/admin_groups/config/include_all_group (leafref)

    YANG Description: list of references to named admin-groups of which all must
be included
    """
    return self.__include_all_group
      
  def _set_include_all_group(self, v, load=False):
    """
    Setter method for include_all_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/admin_groups/config/include_all_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_include_all_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_include_all_group() directly.

    YANG Description: list of references to named admin-groups of which all must
be included
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-all-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """include_all_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-all-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__include_all_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_include_all_group(self):
    self.__include_all_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-all-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_include_any_group(self):
    """
    Getter method for include_any_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/admin_groups/config/include_any_group (leafref)

    YANG Description: list of references to named admin-groups of which one must
be included
    """
    return self.__include_any_group
      
  def _set_include_any_group(self, v, load=False):
    """
    Setter method for include_any_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/admin_groups/config/include_any_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_include_any_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_include_any_group() directly.

    YANG Description: list of references to named admin-groups of which one must
be included
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-any-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """include_any_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-any-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__include_any_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_include_any_group(self):
    self.__include_any_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-any-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)

  exclude_group = __builtin__.property(_get_exclude_group, _set_exclude_group)
  include_all_group = __builtin__.property(_get_include_all_group, _set_include_all_group)
  include_any_group = __builtin__.property(_get_include_any_group, _set_include_any_group)


  _pyangbind_elements = OrderedDict([('exclude_group', exclude_group), ('include_all_group', include_all_group), ('include_any_group', include_any_group), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_admin_groups_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-primary-path/p2p-primary-path/admin-groups/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', '__exclude_group','__include_all_group','__include_any_group',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__exclude_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="exclude-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__include_all_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-all-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__include_any_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-any-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-primary-path', 'p2p-primary-path', 'admin-groups', 'state']

  def _get_exclude_group(self):
    """
    Getter method for exclude_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/admin_groups/state/exclude_group (leafref)

    YANG Description: list of references to named admin-groups to exclude in
path calculation.
    """
    return self.__exclude_group
      
  def _set_exclude_group(self, v, load=False):
    """
    Setter method for exclude_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/admin_groups/state/exclude_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_exclude_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_exclude_group() directly.

    YANG Description: list of references to named admin-groups to exclude in
path calculation.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="exclude-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """exclude_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="exclude-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__exclude_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_exclude_group(self):
    self.__exclude_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="exclude-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_include_all_group(self):
    """
    Getter method for include_all_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/admin_groups/state/include_all_group (leafref)

    YANG Description: list of references to named admin-groups of which all must
be included
    """
    return self.__include_all_group
      
  def _set_include_all_group(self, v, load=False):
    """
    Setter method for include_all_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/admin_groups/state/include_all_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_include_all_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_include_all_group() directly.

    YANG Description: list of references to named admin-groups of which all must
be included
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-all-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """include_all_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-all-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__include_all_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_include_all_group(self):
    self.__include_all_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-all-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_include_any_group(self):
    """
    Getter method for include_any_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/admin_groups/state/include_any_group (leafref)

    YANG Description: list of references to named admin-groups of which one must
be included
    """
    return self.__include_any_group
      
  def _set_include_any_group(self, v, load=False):
    """
    Setter method for include_any_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/admin_groups/state/include_any_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_include_any_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_include_any_group() directly.

    YANG Description: list of references to named admin-groups of which one must
be included
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-any-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """include_any_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-any-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__include_any_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_include_any_group(self):
    self.__include_any_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-any-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)

  exclude_group = __builtin__.property(_get_exclude_group)
  include_all_group = __builtin__.property(_get_include_all_group)
  include_any_group = __builtin__.property(_get_include_any_group)


  _pyangbind_elements = OrderedDict([('exclude_group', exclude_group), ('include_all_group', include_all_group), ('include_any_group', include_any_group), ])


class yc_admin_groups_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_admin_groups(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-primary-path/p2p-primary-path/admin-groups. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for include/exclude constraints for
link affinities
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'admin-groups'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_admin_groups_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_admin_groups_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-primary-path', 'p2p-primary-path', 'admin-groups']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/admin_groups/config (container)

    YANG Description: Configuration data 
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/admin_groups/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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_admin_groups_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_admin_groups_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_admin_groups_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/admin_groups/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 /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/admin_groups/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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_admin_groups_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_admin_groups_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_admin_groups_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_p2p_primary_path_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-primary-path/p2p-primary-path. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of p2p primary paths for a tunnel
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state','__path_metric_bound_constraints','__candidate_secondary_paths','__admin_groups',)

  _yang_name = 'p2p-primary-path'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__path_metric_bound_constraints = YANGDynClass(base=yc_path_metric_bound_constraints_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_path_metric_bound_constraints, is_container='container', yang_name="path-metric-bound-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__candidate_secondary_paths = YANGDynClass(base=yc_candidate_secondary_paths_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_candidate_secondary_paths, is_container='container', yang_name="candidate-secondary-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__admin_groups = YANGDynClass(base=yc_admin_groups_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_admin_groups, is_container='container', yang_name="admin-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-primary-path', 'p2p-primary-path']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/name (leafref)

    YANG Description: Path name
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/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: Path 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config (container)

    YANG Description: Configuration parameters related to paths
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/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 related to paths
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state (container)

    YANG Description: State parameters related to paths
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/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 parameters related to paths
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_path_metric_bound_constraints(self):
    """
    Getter method for path_metric_bound_constraints, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/path_metric_bound_constraints (container)

    YANG Description: Enclosing container for the path metric bound constraints.
    """
    return self.__path_metric_bound_constraints
      
  def _set_path_metric_bound_constraints(self, v, load=False):
    """
    Setter method for path_metric_bound_constraints, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/path_metric_bound_constraints (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_metric_bound_constraints is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_metric_bound_constraints() directly.

    YANG Description: Enclosing container for the path metric bound constraints.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_path_metric_bound_constraints_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_path_metric_bound_constraints, is_container='container', yang_name="path-metric-bound-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_metric_bound_constraints must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_path_metric_bound_constraints_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_path_metric_bound_constraints, is_container='container', yang_name="path-metric-bound-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__path_metric_bound_constraints = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_metric_bound_constraints(self):
    self.__path_metric_bound_constraints = YANGDynClass(base=yc_path_metric_bound_constraints_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_path_metric_bound_constraints, is_container='container', yang_name="path-metric-bound-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_candidate_secondary_paths(self):
    """
    Getter method for candidate_secondary_paths, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/candidate_secondary_paths (container)

    YANG Description: The set of candidate secondary paths which may be used
for this primary path. When secondary paths are specified
in the list the path of the secondary LSP in use must be
restricted to those path options referenced. The
priority of the secondary paths is specified within the
list. Higher priority values are less preferred - that is
to say that a path with priority 0 is the most preferred
path. In the case that the list is empty, any secondary
path option may be utilised when the current primary path
is in use.
    """
    return self.__candidate_secondary_paths
      
  def _set_candidate_secondary_paths(self, v, load=False):
    """
    Setter method for candidate_secondary_paths, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/candidate_secondary_paths (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_candidate_secondary_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_candidate_secondary_paths() directly.

    YANG Description: The set of candidate secondary paths which may be used
for this primary path. When secondary paths are specified
in the list the path of the secondary LSP in use must be
restricted to those path options referenced. The
priority of the secondary paths is specified within the
list. Higher priority values are less preferred - that is
to say that a path with priority 0 is the most preferred
path. In the case that the list is empty, any secondary
path option may be utilised when the current primary path
is in use.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_candidate_secondary_paths_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_candidate_secondary_paths, is_container='container', yang_name="candidate-secondary-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """candidate_secondary_paths must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_candidate_secondary_paths_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_candidate_secondary_paths, is_container='container', yang_name="candidate-secondary-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__candidate_secondary_paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_candidate_secondary_paths(self):
    self.__candidate_secondary_paths = YANGDynClass(base=yc_candidate_secondary_paths_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_candidate_secondary_paths, is_container='container', yang_name="candidate-secondary-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_admin_groups(self):
    """
    Getter method for admin_groups, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/admin_groups (container)

    YANG Description: Top-level container for include/exclude constraints for
link affinities
    """
    return self.__admin_groups
      
  def _set_admin_groups(self, v, load=False):
    """
    Setter method for admin_groups, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/admin_groups (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_admin_groups is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_admin_groups() directly.

    YANG Description: Top-level container for include/exclude constraints for
link affinities
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_admin_groups_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_admin_groups, is_container='container', yang_name="admin-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """admin_groups must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_admin_groups_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_admin_groups, is_container='container', yang_name="admin-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__admin_groups = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_admin_groups(self):
    self.__admin_groups = YANGDynClass(base=yc_admin_groups_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_admin_groups, is_container='container', yang_name="admin-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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)
  path_metric_bound_constraints = __builtin__.property(_get_path_metric_bound_constraints, _set_path_metric_bound_constraints)
  candidate_secondary_paths = __builtin__.property(_get_candidate_secondary_paths, _set_candidate_secondary_paths)
  admin_groups = __builtin__.property(_get_admin_groups, _set_admin_groups)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ('path_metric_bound_constraints', path_metric_bound_constraints), ('candidate_secondary_paths', candidate_secondary_paths), ('admin_groups', admin_groups), ])


class yc_p2p_primary_path_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-primary-path. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Primary paths associated with the LSP
  """
  __slots__ = ('_path_helper', '_extmethods', '__p2p_primary_path',)

  _yang_name = 'p2p-primary-path'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__p2p_primary_path = YANGDynClass(base=YANGListType("name",yc_p2p_primary_path_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path, yang_name="p2p-primary-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="p2p-primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-primary-path']

  def _get_p2p_primary_path(self):
    """
    Getter method for p2p_primary_path, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path (list)

    YANG Description: List of p2p primary paths for a tunnel
    """
    return self.__p2p_primary_path
      
  def _set_p2p_primary_path(self, v, load=False):
    """
    Setter method for p2p_primary_path, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_p2p_primary_path is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_p2p_primary_path() directly.

    YANG Description: List of p2p primary paths for a tunnel
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_p2p_primary_path_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path, yang_name="p2p-primary-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="p2p-primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """p2p_primary_path must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_p2p_primary_path_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path, yang_name="p2p-primary-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="p2p-primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__p2p_primary_path = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_p2p_primary_path(self):
    self.__p2p_primary_path = YANGDynClass(base=YANGListType("name",yc_p2p_primary_path_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path, yang_name="p2p-primary-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="p2p-primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  p2p_primary_path = __builtin__.property(_get_p2p_primary_path, _set_p2p_primary_path)


  _pyangbind_elements = OrderedDict([('p2p_primary_path', p2p_primary_path), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-secondary-paths/p2p-secondary-path/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters related to paths
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__path_computation_method','__use_cspf','__cspf_tiebreaker','__path_computation_server','__path_control','__explicit_path_name','__preference','__setup_priority','__hold_priority','__retry_timer',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__path_computation_method = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LOCALLY_COMPUTED"), is_leaf=True, yang_name="path-computation-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__use_cspf = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-cspf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__cspf_tiebreaker = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'RANDOM': {}, 'LEAST_FILL': {}, 'MOST_FILL': {}},), default=six.text_type("RANDOM"), is_leaf=True, yang_name="cspf-tiebreaker", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='cspf-tie-breaking', is_config=True)
    self.__path_computation_server = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-computation-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__path_control = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PCE_DELEGATED': {}, 'PCC_CONTROLLED': {}, 'PCC_REPORT_ONLY': {}},), is_leaf=True, yang_name="path-control", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pcep:lsp-control-type', is_config=True)
    self.__explicit_path_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="explicit-path-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    self.__retry_timer = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..600']}), is_leaf=True, yang_name="retry-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-secondary-paths', 'p2p-secondary-path', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/name (string)

    YANG Description: Path name
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/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: Path name
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_path_computation_method(self):
    """
    Getter method for path_computation_method, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/path_computation_method (identityref)

    YANG Description: The method used for computing the path, either
locally computed, queried from a server or not
computed at all (explicitly configured).
    """
    return self.__path_computation_method
      
  def _set_path_computation_method(self, v, load=False):
    """
    Setter method for path_computation_method, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/path_computation_method (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_computation_method is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_computation_method() directly.

    YANG Description: The method used for computing the path, either
locally computed, queried from a server or not
computed at all (explicitly 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={'LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LOCALLY_COMPUTED"), is_leaf=True, yang_name="path-computation-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_computation_method must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LOCALLY_COMPUTED"), is_leaf=True, yang_name="path-computation-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__path_computation_method = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_computation_method(self):
    self.__path_computation_method = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LOCALLY_COMPUTED"), is_leaf=True, yang_name="path-computation-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_use_cspf(self):
    """
    Getter method for use_cspf, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/use_cspf (boolean)

    YANG Description: Flag to enable CSPF for locally computed LSPs
    """
    return self.__use_cspf
      
  def _set_use_cspf(self, v, load=False):
    """
    Setter method for use_cspf, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/use_cspf (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_use_cspf is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_use_cspf() directly.

    YANG Description: Flag to enable CSPF for locally computed LSPs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="use-cspf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """use_cspf must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-cspf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__use_cspf = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_use_cspf(self):
    self.__use_cspf = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-cspf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_cspf_tiebreaker(self):
    """
    Getter method for cspf_tiebreaker, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/cspf_tiebreaker (cspf-tie-breaking)

    YANG Description: Determine the tie-breaking method to choose between
equally desirable paths during CSFP computation
    """
    return self.__cspf_tiebreaker
      
  def _set_cspf_tiebreaker(self, v, load=False):
    """
    Setter method for cspf_tiebreaker, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/cspf_tiebreaker (cspf-tie-breaking)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cspf_tiebreaker is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cspf_tiebreaker() directly.

    YANG Description: Determine the tie-breaking method to choose between
equally desirable paths during CSFP computation
    """
    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={'RANDOM': {}, 'LEAST_FILL': {}, 'MOST_FILL': {}},), default=six.text_type("RANDOM"), is_leaf=True, yang_name="cspf-tiebreaker", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='cspf-tie-breaking', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cspf_tiebreaker must be of a type compatible with cspf-tie-breaking""",
          'defined-type': "openconfig-network-instance:cspf-tie-breaking",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'RANDOM': {}, 'LEAST_FILL': {}, 'MOST_FILL': {}},), default=six.text_type("RANDOM"), is_leaf=True, yang_name="cspf-tiebreaker", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='cspf-tie-breaking', is_config=True)""",
        })

    self.__cspf_tiebreaker = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cspf_tiebreaker(self):
    self.__cspf_tiebreaker = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'RANDOM': {}, 'LEAST_FILL': {}, 'MOST_FILL': {}},), default=six.text_type("RANDOM"), is_leaf=True, yang_name="cspf-tiebreaker", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='cspf-tie-breaking', is_config=True)


  def _get_path_computation_server(self):
    """
    Getter method for path_computation_server, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/path_computation_server (leafref)

    YANG Description: Reference to the address of a previously configured
external path computation server.
    """
    return self.__path_computation_server
      
  def _set_path_computation_server(self, v, load=False):
    """
    Setter method for path_computation_server, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/path_computation_server (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_computation_server is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_computation_server() directly.

    YANG Description: Reference to the address of a previously configured
external path computation server.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="path-computation-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_computation_server must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-computation-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__path_computation_server = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_computation_server(self):
    self.__path_computation_server = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-computation-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_path_control(self):
    """
    Getter method for path_control, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/path_control (oc-pcep:lsp-control-type)

    YANG Description: Set the LSP path control mode as PCE_DELEGATED
PCC_CONTROLLED or PCC_REPORT_ONLY information
state to the PCE.
    """
    return self.__path_control
      
  def _set_path_control(self, v, load=False):
    """
    Setter method for path_control, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/path_control (oc-pcep:lsp-control-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_control is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_control() directly.

    YANG Description: Set the LSP path control mode as PCE_DELEGATED
PCC_CONTROLLED or PCC_REPORT_ONLY information
state to the PCE.
    """
    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={'PCE_DELEGATED': {}, 'PCC_CONTROLLED': {}, 'PCC_REPORT_ONLY': {}},), is_leaf=True, yang_name="path-control", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pcep:lsp-control-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_control must be of a type compatible with oc-pcep:lsp-control-type""",
          'defined-type': "oc-pcep:lsp-control-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PCE_DELEGATED': {}, 'PCC_CONTROLLED': {}, 'PCC_REPORT_ONLY': {}},), is_leaf=True, yang_name="path-control", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pcep:lsp-control-type', is_config=True)""",
        })

    self.__path_control = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_control(self):
    self.__path_control = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PCE_DELEGATED': {}, 'PCC_CONTROLLED': {}, 'PCC_REPORT_ONLY': {}},), is_leaf=True, yang_name="path-control", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pcep:lsp-control-type', is_config=True)


  def _get_explicit_path_name(self):
    """
    Getter method for explicit_path_name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/explicit_path_name (leafref)

    YANG Description: reference to a defined path
    """
    return self.__explicit_path_name
      
  def _set_explicit_path_name(self, v, load=False):
    """
    Setter method for explicit_path_name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/explicit_path_name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_explicit_path_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_explicit_path_name() directly.

    YANG Description: reference to a defined path
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="explicit-path-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """explicit_path_name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="explicit-path-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__explicit_path_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_explicit_path_name(self):
    self.__explicit_path_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="explicit-path-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_preference(self):
    """
    Getter method for preference, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/preference (uint8)

    YANG Description: Specifies a preference for this path. The lower the
number higher the preference
    """
    return self.__preference
      
  def _set_preference(self, v, load=False):
    """
    Setter method for preference, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/preference (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_preference is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_preference() directly.

    YANG Description: Specifies a preference for this path. The lower the
number higher the preference
    """
    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': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """preference 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': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
        })

    self.__preference = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_preference(self):
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)


  def _get_setup_priority(self):
    """
    Getter method for setup_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/setup_priority (uint8)

    YANG Description: RSVP-TE preemption priority during LSP setup, lower is
higher priority; default 7 indicates that LSP will not
preempt established LSPs during setup
    """
    return self.__setup_priority
      
  def _set_setup_priority(self, v, load=False):
    """
    Setter method for setup_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/setup_priority (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_setup_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_setup_priority() directly.

    YANG Description: RSVP-TE preemption priority during LSP setup, lower is
higher priority; default 7 indicates that LSP will not
preempt established LSPs during setup
    """
    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']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """setup_priority 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..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
        })

    self.__setup_priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_setup_priority(self):
    self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)


  def _get_hold_priority(self):
    """
    Getter method for hold_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/hold_priority (uint8)

    YANG Description: preemption priority once the LSP is established,
lower is higher priority; default 0 indicates other LSPs
will not preempt the LSPs once established
    """
    return self.__hold_priority
      
  def _set_hold_priority(self, v, load=False):
    """
    Setter method for hold_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/hold_priority (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hold_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hold_priority() directly.

    YANG Description: preemption priority once the LSP is established,
lower is higher priority; default 0 indicates other LSPs
will not preempt the LSPs once established
    """
    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']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hold_priority 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..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
        })

    self.__hold_priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hold_priority(self):
    self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)


  def _get_retry_timer(self):
    """
    Getter method for retry_timer, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/retry_timer (uint16)

    YANG Description: sets the time between attempts to establish the
LSP
    """
    return self.__retry_timer
      
  def _set_retry_timer(self, v, load=False):
    """
    Setter method for retry_timer, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/retry_timer (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_retry_timer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_retry_timer() directly.

    YANG Description: sets the time between attempts to establish the
LSP
    """
    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': ['1..600']}), is_leaf=True, yang_name="retry-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """retry_timer must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..600']}), is_leaf=True, yang_name="retry-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__retry_timer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_retry_timer(self):
    self.__retry_timer = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..600']}), is_leaf=True, yang_name="retry-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  path_computation_method = __builtin__.property(_get_path_computation_method, _set_path_computation_method)
  use_cspf = __builtin__.property(_get_use_cspf, _set_use_cspf)
  cspf_tiebreaker = __builtin__.property(_get_cspf_tiebreaker, _set_cspf_tiebreaker)
  path_computation_server = __builtin__.property(_get_path_computation_server, _set_path_computation_server)
  path_control = __builtin__.property(_get_path_control, _set_path_control)
  explicit_path_name = __builtin__.property(_get_explicit_path_name, _set_explicit_path_name)
  preference = __builtin__.property(_get_preference, _set_preference)
  setup_priority = __builtin__.property(_get_setup_priority, _set_setup_priority)
  hold_priority = __builtin__.property(_get_hold_priority, _set_hold_priority)
  retry_timer = __builtin__.property(_get_retry_timer, _set_retry_timer)


  _pyangbind_elements = OrderedDict([('name', name), ('path_computation_method', path_computation_method), ('use_cspf', use_cspf), ('cspf_tiebreaker', cspf_tiebreaker), ('path_computation_server', path_computation_server), ('path_control', path_control), ('explicit_path_name', explicit_path_name), ('preference', preference), ('setup_priority', setup_priority), ('hold_priority', hold_priority), ('retry_timer', retry_timer), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-secondary-paths/p2p-secondary-path/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters related to paths
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__path_computation_method','__use_cspf','__cspf_tiebreaker','__path_computation_server','__path_control','__explicit_path_name','__preference','__setup_priority','__hold_priority','__retry_timer','__associated_rsvp_sessions','__spf_metric','__cspf_metric',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__path_computation_method = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LOCALLY_COMPUTED"), is_leaf=True, yang_name="path-computation-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__use_cspf = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-cspf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__cspf_tiebreaker = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'RANDOM': {}, 'LEAST_FILL': {}, 'MOST_FILL': {}},), default=six.text_type("RANDOM"), is_leaf=True, yang_name="cspf-tiebreaker", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='cspf-tie-breaking', is_config=False)
    self.__path_computation_server = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-computation-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__path_control = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PCE_DELEGATED': {}, 'PCC_CONTROLLED': {}, 'PCC_REPORT_ONLY': {}},), is_leaf=True, yang_name="path-control", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pcep:lsp-control-type', is_config=False)
    self.__explicit_path_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="explicit-path-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__retry_timer = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..600']}), is_leaf=True, yang_name="retry-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__associated_rsvp_sessions = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="associated-rsvp-sessions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__spf_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="spf-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__cspf_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cspf-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-secondary-paths', 'p2p-secondary-path', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/name (string)

    YANG Description: Path name
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/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: Path name
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_path_computation_method(self):
    """
    Getter method for path_computation_method, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/path_computation_method (identityref)

    YANG Description: The method used for computing the path, either
locally computed, queried from a server or not
computed at all (explicitly configured).
    """
    return self.__path_computation_method
      
  def _set_path_computation_method(self, v, load=False):
    """
    Setter method for path_computation_method, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/path_computation_method (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_computation_method is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_computation_method() directly.

    YANG Description: The method used for computing the path, either
locally computed, queried from a server or not
computed at all (explicitly 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={'LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LOCALLY_COMPUTED"), is_leaf=True, yang_name="path-computation-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_computation_method must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LOCALLY_COMPUTED"), is_leaf=True, yang_name="path-computation-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__path_computation_method = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_computation_method(self):
    self.__path_computation_method = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LOCALLY_COMPUTED"), is_leaf=True, yang_name="path-computation-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_use_cspf(self):
    """
    Getter method for use_cspf, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/use_cspf (boolean)

    YANG Description: Flag to enable CSPF for locally computed LSPs
    """
    return self.__use_cspf
      
  def _set_use_cspf(self, v, load=False):
    """
    Setter method for use_cspf, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/use_cspf (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_use_cspf is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_use_cspf() directly.

    YANG Description: Flag to enable CSPF for locally computed LSPs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="use-cspf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """use_cspf must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-cspf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__use_cspf = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_use_cspf(self):
    self.__use_cspf = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-cspf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_cspf_tiebreaker(self):
    """
    Getter method for cspf_tiebreaker, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/cspf_tiebreaker (cspf-tie-breaking)

    YANG Description: Determine the tie-breaking method to choose between
equally desirable paths during CSFP computation
    """
    return self.__cspf_tiebreaker
      
  def _set_cspf_tiebreaker(self, v, load=False):
    """
    Setter method for cspf_tiebreaker, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/cspf_tiebreaker (cspf-tie-breaking)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cspf_tiebreaker is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cspf_tiebreaker() directly.

    YANG Description: Determine the tie-breaking method to choose between
equally desirable paths during CSFP computation
    """
    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={'RANDOM': {}, 'LEAST_FILL': {}, 'MOST_FILL': {}},), default=six.text_type("RANDOM"), is_leaf=True, yang_name="cspf-tiebreaker", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='cspf-tie-breaking', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cspf_tiebreaker must be of a type compatible with cspf-tie-breaking""",
          'defined-type': "openconfig-network-instance:cspf-tie-breaking",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'RANDOM': {}, 'LEAST_FILL': {}, 'MOST_FILL': {}},), default=six.text_type("RANDOM"), is_leaf=True, yang_name="cspf-tiebreaker", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='cspf-tie-breaking', is_config=False)""",
        })

    self.__cspf_tiebreaker = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cspf_tiebreaker(self):
    self.__cspf_tiebreaker = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'RANDOM': {}, 'LEAST_FILL': {}, 'MOST_FILL': {}},), default=six.text_type("RANDOM"), is_leaf=True, yang_name="cspf-tiebreaker", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='cspf-tie-breaking', is_config=False)


  def _get_path_computation_server(self):
    """
    Getter method for path_computation_server, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/path_computation_server (leafref)

    YANG Description: Reference to the address of a previously configured
external path computation server.
    """
    return self.__path_computation_server
      
  def _set_path_computation_server(self, v, load=False):
    """
    Setter method for path_computation_server, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/path_computation_server (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_computation_server is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_computation_server() directly.

    YANG Description: Reference to the address of a previously configured
external path computation server.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="path-computation-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_computation_server must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-computation-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__path_computation_server = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_computation_server(self):
    self.__path_computation_server = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-computation-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_path_control(self):
    """
    Getter method for path_control, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/path_control (oc-pcep:lsp-control-type)

    YANG Description: Set the LSP path control mode as PCE_DELEGATED
PCC_CONTROLLED or PCC_REPORT_ONLY information
state to the PCE.
    """
    return self.__path_control
      
  def _set_path_control(self, v, load=False):
    """
    Setter method for path_control, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/path_control (oc-pcep:lsp-control-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_control is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_control() directly.

    YANG Description: Set the LSP path control mode as PCE_DELEGATED
PCC_CONTROLLED or PCC_REPORT_ONLY information
state to the PCE.
    """
    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={'PCE_DELEGATED': {}, 'PCC_CONTROLLED': {}, 'PCC_REPORT_ONLY': {}},), is_leaf=True, yang_name="path-control", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pcep:lsp-control-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_control must be of a type compatible with oc-pcep:lsp-control-type""",
          'defined-type': "oc-pcep:lsp-control-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PCE_DELEGATED': {}, 'PCC_CONTROLLED': {}, 'PCC_REPORT_ONLY': {}},), is_leaf=True, yang_name="path-control", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pcep:lsp-control-type', is_config=False)""",
        })

    self.__path_control = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_control(self):
    self.__path_control = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PCE_DELEGATED': {}, 'PCC_CONTROLLED': {}, 'PCC_REPORT_ONLY': {}},), is_leaf=True, yang_name="path-control", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pcep:lsp-control-type', is_config=False)


  def _get_explicit_path_name(self):
    """
    Getter method for explicit_path_name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/explicit_path_name (leafref)

    YANG Description: reference to a defined path
    """
    return self.__explicit_path_name
      
  def _set_explicit_path_name(self, v, load=False):
    """
    Setter method for explicit_path_name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/explicit_path_name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_explicit_path_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_explicit_path_name() directly.

    YANG Description: reference to a defined path
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="explicit-path-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """explicit_path_name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="explicit-path-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__explicit_path_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_explicit_path_name(self):
    self.__explicit_path_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="explicit-path-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_preference(self):
    """
    Getter method for preference, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/preference (uint8)

    YANG Description: Specifies a preference for this path. The lower the
number higher the preference
    """
    return self.__preference
      
  def _set_preference(self, v, load=False):
    """
    Setter method for preference, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/preference (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_preference is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_preference() directly.

    YANG Description: Specifies a preference for this path. The lower the
number higher the preference
    """
    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': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """preference 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': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__preference = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_preference(self):
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_setup_priority(self):
    """
    Getter method for setup_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/setup_priority (uint8)

    YANG Description: RSVP-TE preemption priority during LSP setup, lower is
higher priority; default 7 indicates that LSP will not
preempt established LSPs during setup
    """
    return self.__setup_priority
      
  def _set_setup_priority(self, v, load=False):
    """
    Setter method for setup_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/setup_priority (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_setup_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_setup_priority() directly.

    YANG Description: RSVP-TE preemption priority during LSP setup, lower is
higher priority; default 7 indicates that LSP will not
preempt established LSPs during setup
    """
    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']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """setup_priority 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..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__setup_priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_setup_priority(self):
    self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_hold_priority(self):
    """
    Getter method for hold_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/hold_priority (uint8)

    YANG Description: preemption priority once the LSP is established,
lower is higher priority; default 0 indicates other LSPs
will not preempt the LSPs once established
    """
    return self.__hold_priority
      
  def _set_hold_priority(self, v, load=False):
    """
    Setter method for hold_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/hold_priority (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hold_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hold_priority() directly.

    YANG Description: preemption priority once the LSP is established,
lower is higher priority; default 0 indicates other LSPs
will not preempt the LSPs once established
    """
    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']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hold_priority 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..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__hold_priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hold_priority(self):
    self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_retry_timer(self):
    """
    Getter method for retry_timer, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/retry_timer (uint16)

    YANG Description: sets the time between attempts to establish the
LSP
    """
    return self.__retry_timer
      
  def _set_retry_timer(self, v, load=False):
    """
    Setter method for retry_timer, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/retry_timer (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_retry_timer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_retry_timer() directly.

    YANG Description: sets the time between attempts to establish the
LSP
    """
    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': ['1..600']}), is_leaf=True, yang_name="retry-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """retry_timer must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..600']}), is_leaf=True, yang_name="retry-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__retry_timer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_retry_timer(self):
    self.__retry_timer = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..600']}), is_leaf=True, yang_name="retry-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_associated_rsvp_sessions(self):
    """
    Getter method for associated_rsvp_sessions, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/associated_rsvp_sessions (leafref)

    YANG Description: If the signalling protocol specified for this path is
RSVP-TE, this leaf-list provides a reference to the associated
sessions within the RSVP-TE protocol sessions list, such
that details of the signaling can be retrieved. More than
one session may exist during re-signalling such as
make-before-break.
    """
    return self.__associated_rsvp_sessions
      
  def _set_associated_rsvp_sessions(self, v, load=False):
    """
    Setter method for associated_rsvp_sessions, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/associated_rsvp_sessions (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_associated_rsvp_sessions is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_associated_rsvp_sessions() directly.

    YANG Description: If the signalling protocol specified for this path is
RSVP-TE, this leaf-list provides a reference to the associated
sessions within the RSVP-TE protocol sessions list, such
that details of the signaling can be retrieved. More than
one session may exist during re-signalling such as
make-before-break.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="associated-rsvp-sessions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """associated_rsvp_sessions must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="associated-rsvp-sessions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__associated_rsvp_sessions = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_associated_rsvp_sessions(self):
    self.__associated_rsvp_sessions = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="associated-rsvp-sessions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_spf_metric(self):
    """
    Getter method for spf_metric, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/spf_metric (uint64)

    YANG Description: The IGP metric of the shortest path to the LSP destination.
This value is used to compare the current metric of the
constrained path to the shortest path that is available in
the network topology.
    """
    return self.__spf_metric
      
  def _set_spf_metric(self, v, load=False):
    """
    Setter method for spf_metric, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/spf_metric (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_spf_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_spf_metric() directly.

    YANG Description: The IGP metric of the shortest path to the LSP destination.
This value is used to compare the current metric of the
constrained path to the shortest path that is available in
the network topology.
    """
    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="spf-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """spf_metric 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="spf-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__spf_metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_spf_metric(self):
    self.__spf_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="spf-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_cspf_metric(self):
    """
    Getter method for cspf_metric, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/cspf_metric (uint64)

    YANG Description: The IGP metric of the path currently used by the LSP.
This value is used to represent the metric of the path
used by the LSP following the execution of the CSPF
algorithm and signalling of the LSP.
    """
    return self.__cspf_metric
      
  def _set_cspf_metric(self, v, load=False):
    """
    Setter method for cspf_metric, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/cspf_metric (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cspf_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cspf_metric() directly.

    YANG Description: The IGP metric of the path currently used by the LSP.
This value is used to represent the metric of the path
used by the LSP following the execution of the CSPF
algorithm and signalling of the LSP.
    """
    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="cspf-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cspf_metric 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="cspf-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__cspf_metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cspf_metric(self):
    self.__cspf_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cspf-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)

  name = __builtin__.property(_get_name)
  path_computation_method = __builtin__.property(_get_path_computation_method)
  use_cspf = __builtin__.property(_get_use_cspf)
  cspf_tiebreaker = __builtin__.property(_get_cspf_tiebreaker)
  path_computation_server = __builtin__.property(_get_path_computation_server)
  path_control = __builtin__.property(_get_path_control)
  explicit_path_name = __builtin__.property(_get_explicit_path_name)
  preference = __builtin__.property(_get_preference)
  setup_priority = __builtin__.property(_get_setup_priority)
  hold_priority = __builtin__.property(_get_hold_priority)
  retry_timer = __builtin__.property(_get_retry_timer)
  associated_rsvp_sessions = __builtin__.property(_get_associated_rsvp_sessions)
  spf_metric = __builtin__.property(_get_spf_metric)
  cspf_metric = __builtin__.property(_get_cspf_metric)


  _pyangbind_elements = OrderedDict([('name', name), ('path_computation_method', path_computation_method), ('use_cspf', use_cspf), ('cspf_tiebreaker', cspf_tiebreaker), ('path_computation_server', path_computation_server), ('path_control', path_control), ('explicit_path_name', explicit_path_name), ('preference', preference), ('setup_priority', setup_priority), ('hold_priority', hold_priority), ('retry_timer', retry_timer), ('associated_rsvp_sessions', associated_rsvp_sessions), ('spf_metric', spf_metric), ('cspf_metric', cspf_metric), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_path_metric_bound_constraints_path_metric_bound_constraint_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-secondary-paths/p2p-secondary-path/path-metric-bound-constraints/path-metric-bound-constraint/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to path metric bound constraints.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__metric_upper_bound',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__metric_upper_bound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="metric-upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-secondary-paths', 'p2p-secondary-path', 'path-metric-bound-constraints', 'path-metric-bound-constraint', 'config']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/path_metric_bound_constraints/path_metric_bound_constraint/config/type (identityref)

    YANG Description: Identifies an entry in the list of metric-types
bound for the TE path.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/path_metric_bound_constraints/path_metric_bound_constraint/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: Identifies an entry in the list of metric-types
bound for the TE path.
    """
    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={'TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', 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={'TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_metric_upper_bound(self):
    """
    Getter method for metric_upper_bound, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/path_metric_bound_constraints/path_metric_bound_constraint/config/metric_upper_bound (uint64)

    YANG Description: Upper bound on end-to-end path metric. A zero indicate
an unbounded upper limit for the specific metric-type.
    """
    return self.__metric_upper_bound
      
  def _set_metric_upper_bound(self, v, load=False):
    """
    Setter method for metric_upper_bound, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/path_metric_bound_constraints/path_metric_bound_constraint/config/metric_upper_bound (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric_upper_bound is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric_upper_bound() directly.

    YANG Description: Upper bound on end-to-end path metric. A zero indicate
an unbounded upper limit for the specific metric-type.
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="metric-upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric_upper_bound 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), default=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="metric-upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=True)""",
        })

    self.__metric_upper_bound = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric_upper_bound(self):
    self.__metric_upper_bound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="metric-upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=True)

  type = __builtin__.property(_get_type, _set_type)
  metric_upper_bound = __builtin__.property(_get_metric_upper_bound, _set_metric_upper_bound)


  _pyangbind_elements = OrderedDict([('type', type), ('metric_upper_bound', metric_upper_bound), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_path_metric_bound_constraints_path_metric_bound_constraint_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-secondary-paths/p2p-secondary-path/path-metric-bound-constraints/path-metric-bound-constraint/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 path metric bound constraints.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__metric_upper_bound',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__metric_upper_bound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="metric-upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-secondary-paths', 'p2p-secondary-path', 'path-metric-bound-constraints', 'path-metric-bound-constraint', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/path_metric_bound_constraints/path_metric_bound_constraint/state/type (identityref)

    YANG Description: Identifies an entry in the list of metric-types
bound for the TE path.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/path_metric_bound_constraints/path_metric_bound_constraint/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: Identifies an entry in the list of metric-types
bound for the TE path.
    """
    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={'TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', 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={'TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_metric_upper_bound(self):
    """
    Getter method for metric_upper_bound, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/path_metric_bound_constraints/path_metric_bound_constraint/state/metric_upper_bound (uint64)

    YANG Description: Upper bound on end-to-end path metric. A zero indicate
an unbounded upper limit for the specific metric-type.
    """
    return self.__metric_upper_bound
      
  def _set_metric_upper_bound(self, v, load=False):
    """
    Setter method for metric_upper_bound, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/path_metric_bound_constraints/path_metric_bound_constraint/state/metric_upper_bound (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric_upper_bound is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric_upper_bound() directly.

    YANG Description: Upper bound on end-to-end path metric. A zero indicate
an unbounded upper limit for the specific metric-type.
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="metric-upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric_upper_bound 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), default=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="metric-upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__metric_upper_bound = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric_upper_bound(self):
    self.__metric_upper_bound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="metric-upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)

  type = __builtin__.property(_get_type)
  metric_upper_bound = __builtin__.property(_get_metric_upper_bound)


  _pyangbind_elements = OrderedDict([('type', type), ('metric_upper_bound', metric_upper_bound), ])


class yc_path_metric_bound_constraint_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_path_metric_bound_constraints_path_metric_bound_constraint(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-secondary-paths/p2p-secondary-path/path-metric-bound-constraints/path-metric-bound-constraint. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A list of metric bounds that are applied as constraints to the LSP.
It act as a logical AND, hence all of them must be satisfied.
If not, it will return an error.
Constraints within this list may be applicable to either
the local CSPF process (where data is available to the local device)
or be communicated to a PCE for calculation.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__config','__state',)

  _yang_name = 'path-metric-bound-constraint'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_path_metric_bound_constraints_path_metric_bound_constraint_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_path_metric_bound_constraints_path_metric_bound_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-secondary-paths', 'p2p-secondary-path', 'path-metric-bound-constraints', 'path-metric-bound-constraint']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/path_metric_bound_constraints/path_metric_bound_constraint/type (leafref)

    YANG Description: Identifies an entry in the list of metric-types
bound for the TE path.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/path_metric_bound_constraints/path_metric_bound_constraint/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: Identifies an entry in the list of metric-types
bound for the TE path.
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/path_metric_bound_constraints/path_metric_bound_constraint/config (container)

    YANG Description: Configuration parameters relating to path metric bound constraints.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/path_metric_bound_constraints/path_metric_bound_constraint/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 path metric bound constraints.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_path_metric_bound_constraints_path_metric_bound_constraint_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_path_metric_bound_constraints_path_metric_bound_constraint_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_path_metric_bound_constraints_path_metric_bound_constraint_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/path_metric_bound_constraints/path_metric_bound_constraint/state (container)

    YANG Description: Operational state parameters relating to path metric bound constraints.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/path_metric_bound_constraints/path_metric_bound_constraint/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 path metric bound constraints.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_path_metric_bound_constraints_path_metric_bound_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_path_metric_bound_constraints_path_metric_bound_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_path_metric_bound_constraints_path_metric_bound_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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)


  _pyangbind_elements = OrderedDict([('type', type), ('config', config), ('state', state), ])


class yc_path_metric_bound_constraints_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_path_metric_bound_constraints(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-secondary-paths/p2p-secondary-path/path-metric-bound-constraints. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for the path metric bound constraints.
  """
  __slots__ = ('_path_helper', '_extmethods', '__path_metric_bound_constraint',)

  _yang_name = 'path-metric-bound-constraints'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__path_metric_bound_constraint = YANGDynClass(base=YANGListType("type",yc_path_metric_bound_constraint_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_path_metric_bound_constraints_path_metric_bound_constraint, yang_name="path-metric-bound-constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="path-metric-bound-constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-secondary-paths', 'p2p-secondary-path', 'path-metric-bound-constraints']

  def _get_path_metric_bound_constraint(self):
    """
    Getter method for path_metric_bound_constraint, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/path_metric_bound_constraints/path_metric_bound_constraint (list)

    YANG Description: A list of metric bounds that are applied as constraints to the LSP.
It act as a logical AND, hence all of them must be satisfied.
If not, it will return an error.
Constraints within this list may be applicable to either
the local CSPF process (where data is available to the local device)
or be communicated to a PCE for calculation.
    """
    return self.__path_metric_bound_constraint
      
  def _set_path_metric_bound_constraint(self, v, load=False):
    """
    Setter method for path_metric_bound_constraint, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/path_metric_bound_constraints/path_metric_bound_constraint (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_metric_bound_constraint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_metric_bound_constraint() directly.

    YANG Description: A list of metric bounds that are applied as constraints to the LSP.
It act as a logical AND, hence all of them must be satisfied.
If not, it will return an error.
Constraints within this list may be applicable to either
the local CSPF process (where data is available to the local device)
or be communicated to a PCE for calculation.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("type",yc_path_metric_bound_constraint_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_path_metric_bound_constraints_path_metric_bound_constraint, yang_name="path-metric-bound-constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="path-metric-bound-constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_metric_bound_constraint must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("type",yc_path_metric_bound_constraint_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_path_metric_bound_constraints_path_metric_bound_constraint, yang_name="path-metric-bound-constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="path-metric-bound-constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__path_metric_bound_constraint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_metric_bound_constraint(self):
    self.__path_metric_bound_constraint = YANGDynClass(base=YANGListType("type",yc_path_metric_bound_constraint_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_path_metric_bound_constraints_path_metric_bound_constraint, yang_name="path-metric-bound-constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="path-metric-bound-constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  path_metric_bound_constraint = __builtin__.property(_get_path_metric_bound_constraint, _set_path_metric_bound_constraint)


  _pyangbind_elements = OrderedDict([('path_metric_bound_constraint', path_metric_bound_constraint), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_admin_groups_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-secondary-paths/p2p-secondary-path/admin-groups/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', '__exclude_group','__include_all_group','__include_any_group',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__exclude_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="exclude-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__include_all_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-all-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__include_any_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-any-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-secondary-paths', 'p2p-secondary-path', 'admin-groups', 'config']

  def _get_exclude_group(self):
    """
    Getter method for exclude_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/admin_groups/config/exclude_group (leafref)

    YANG Description: list of references to named admin-groups to exclude in
path calculation.
    """
    return self.__exclude_group
      
  def _set_exclude_group(self, v, load=False):
    """
    Setter method for exclude_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/admin_groups/config/exclude_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_exclude_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_exclude_group() directly.

    YANG Description: list of references to named admin-groups to exclude in
path calculation.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="exclude-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """exclude_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="exclude-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__exclude_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_exclude_group(self):
    self.__exclude_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="exclude-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_include_all_group(self):
    """
    Getter method for include_all_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/admin_groups/config/include_all_group (leafref)

    YANG Description: list of references to named admin-groups of which all must
be included
    """
    return self.__include_all_group
      
  def _set_include_all_group(self, v, load=False):
    """
    Setter method for include_all_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/admin_groups/config/include_all_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_include_all_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_include_all_group() directly.

    YANG Description: list of references to named admin-groups of which all must
be included
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-all-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """include_all_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-all-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__include_all_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_include_all_group(self):
    self.__include_all_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-all-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_include_any_group(self):
    """
    Getter method for include_any_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/admin_groups/config/include_any_group (leafref)

    YANG Description: list of references to named admin-groups of which one must
be included
    """
    return self.__include_any_group
      
  def _set_include_any_group(self, v, load=False):
    """
    Setter method for include_any_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/admin_groups/config/include_any_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_include_any_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_include_any_group() directly.

    YANG Description: list of references to named admin-groups of which one must
be included
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-any-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """include_any_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-any-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__include_any_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_include_any_group(self):
    self.__include_any_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-any-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)

  exclude_group = __builtin__.property(_get_exclude_group, _set_exclude_group)
  include_all_group = __builtin__.property(_get_include_all_group, _set_include_all_group)
  include_any_group = __builtin__.property(_get_include_any_group, _set_include_any_group)


  _pyangbind_elements = OrderedDict([('exclude_group', exclude_group), ('include_all_group', include_all_group), ('include_any_group', include_any_group), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_admin_groups_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-secondary-paths/p2p-secondary-path/admin-groups/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', '__exclude_group','__include_all_group','__include_any_group',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__exclude_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="exclude-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__include_all_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-all-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__include_any_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-any-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-secondary-paths', 'p2p-secondary-path', 'admin-groups', 'state']

  def _get_exclude_group(self):
    """
    Getter method for exclude_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/admin_groups/state/exclude_group (leafref)

    YANG Description: list of references to named admin-groups to exclude in
path calculation.
    """
    return self.__exclude_group
      
  def _set_exclude_group(self, v, load=False):
    """
    Setter method for exclude_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/admin_groups/state/exclude_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_exclude_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_exclude_group() directly.

    YANG Description: list of references to named admin-groups to exclude in
path calculation.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="exclude-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """exclude_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="exclude-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__exclude_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_exclude_group(self):
    self.__exclude_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="exclude-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_include_all_group(self):
    """
    Getter method for include_all_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/admin_groups/state/include_all_group (leafref)

    YANG Description: list of references to named admin-groups of which all must
be included
    """
    return self.__include_all_group
      
  def _set_include_all_group(self, v, load=False):
    """
    Setter method for include_all_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/admin_groups/state/include_all_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_include_all_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_include_all_group() directly.

    YANG Description: list of references to named admin-groups of which all must
be included
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-all-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """include_all_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-all-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__include_all_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_include_all_group(self):
    self.__include_all_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-all-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_include_any_group(self):
    """
    Getter method for include_any_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/admin_groups/state/include_any_group (leafref)

    YANG Description: list of references to named admin-groups of which one must
be included
    """
    return self.__include_any_group
      
  def _set_include_any_group(self, v, load=False):
    """
    Setter method for include_any_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/admin_groups/state/include_any_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_include_any_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_include_any_group() directly.

    YANG Description: list of references to named admin-groups of which one must
be included
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-any-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """include_any_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-any-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__include_any_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_include_any_group(self):
    self.__include_any_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-any-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)

  exclude_group = __builtin__.property(_get_exclude_group)
  include_all_group = __builtin__.property(_get_include_all_group)
  include_any_group = __builtin__.property(_get_include_any_group)


  _pyangbind_elements = OrderedDict([('exclude_group', exclude_group), ('include_all_group', include_all_group), ('include_any_group', include_any_group), ])


class yc_admin_groups_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_admin_groups(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-secondary-paths/p2p-secondary-path/admin-groups. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for include/exclude constraints for
link affinities
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'admin-groups'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_admin_groups_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_admin_groups_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-secondary-paths', 'p2p-secondary-path', 'admin-groups']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/admin_groups/config (container)

    YANG Description: Configuration data 
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/admin_groups/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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_admin_groups_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_admin_groups_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_admin_groups_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/admin_groups/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 /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/admin_groups/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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_admin_groups_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_admin_groups_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_admin_groups_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_p2p_secondary_path_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-secondary-paths/p2p-secondary-path. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of p2p primary paths for a tunnel
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state','__path_metric_bound_constraints','__admin_groups',)

  _yang_name = 'p2p-secondary-path'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__path_metric_bound_constraints = YANGDynClass(base=yc_path_metric_bound_constraints_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_path_metric_bound_constraints, is_container='container', yang_name="path-metric-bound-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__admin_groups = YANGDynClass(base=yc_admin_groups_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_admin_groups, is_container='container', yang_name="admin-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-secondary-paths', 'p2p-secondary-path']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/name (leafref)

    YANG Description: Path name
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/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: Path 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config (container)

    YANG Description: Configuration parameters related to paths
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/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 related to paths
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state (container)

    YANG Description: State parameters related to paths
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/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 parameters related to paths
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_path_metric_bound_constraints(self):
    """
    Getter method for path_metric_bound_constraints, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/path_metric_bound_constraints (container)

    YANG Description: Enclosing container for the path metric bound constraints.
    """
    return self.__path_metric_bound_constraints
      
  def _set_path_metric_bound_constraints(self, v, load=False):
    """
    Setter method for path_metric_bound_constraints, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/path_metric_bound_constraints (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_metric_bound_constraints is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_metric_bound_constraints() directly.

    YANG Description: Enclosing container for the path metric bound constraints.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_path_metric_bound_constraints_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_path_metric_bound_constraints, is_container='container', yang_name="path-metric-bound-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_metric_bound_constraints must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_path_metric_bound_constraints_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_path_metric_bound_constraints, is_container='container', yang_name="path-metric-bound-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__path_metric_bound_constraints = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_metric_bound_constraints(self):
    self.__path_metric_bound_constraints = YANGDynClass(base=yc_path_metric_bound_constraints_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_path_metric_bound_constraints, is_container='container', yang_name="path-metric-bound-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_admin_groups(self):
    """
    Getter method for admin_groups, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/admin_groups (container)

    YANG Description: Top-level container for include/exclude constraints for
link affinities
    """
    return self.__admin_groups
      
  def _set_admin_groups(self, v, load=False):
    """
    Setter method for admin_groups, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/admin_groups (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_admin_groups is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_admin_groups() directly.

    YANG Description: Top-level container for include/exclude constraints for
link affinities
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_admin_groups_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_admin_groups, is_container='container', yang_name="admin-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """admin_groups must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_admin_groups_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_admin_groups, is_container='container', yang_name="admin-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__admin_groups = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_admin_groups(self):
    self.__admin_groups = YANGDynClass(base=yc_admin_groups_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_admin_groups, is_container='container', yang_name="admin-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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)
  path_metric_bound_constraints = __builtin__.property(_get_path_metric_bound_constraints, _set_path_metric_bound_constraints)
  admin_groups = __builtin__.property(_get_admin_groups, _set_admin_groups)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ('path_metric_bound_constraints', path_metric_bound_constraints), ('admin_groups', admin_groups), ])


class yc_p2p_secondary_paths_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-secondary-paths. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Secondary paths for the LSP
  """
  __slots__ = ('_path_helper', '_extmethods', '__p2p_secondary_path',)

  _yang_name = 'p2p-secondary-paths'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__p2p_secondary_path = YANGDynClass(base=YANGListType("name",yc_p2p_secondary_path_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path, yang_name="p2p-secondary-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="p2p-secondary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-secondary-paths']

  def _get_p2p_secondary_path(self):
    """
    Getter method for p2p_secondary_path, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path (list)

    YANG Description: List of p2p primary paths for a tunnel
    """
    return self.__p2p_secondary_path
      
  def _set_p2p_secondary_path(self, v, load=False):
    """
    Setter method for p2p_secondary_path, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_p2p_secondary_path is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_p2p_secondary_path() directly.

    YANG Description: List of p2p primary paths for a tunnel
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_p2p_secondary_path_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path, yang_name="p2p-secondary-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="p2p-secondary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """p2p_secondary_path must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_p2p_secondary_path_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path, yang_name="p2p-secondary-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="p2p-secondary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__p2p_secondary_path = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_p2p_secondary_path(self):
    self.__p2p_secondary_path = YANGDynClass(base=YANGListType("name",yc_p2p_secondary_path_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path, yang_name="p2p-secondary-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="p2p-secondary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  p2p_secondary_path = __builtin__.property(_get_p2p_secondary_path, _set_p2p_secondary_path)


  _pyangbind_elements = OrderedDict([('p2p_secondary_path', p2p_secondary_path), ])


class yc_p2p_tunnel_attributes_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Parameters related to LSPs of type P2P
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__p2p_primary_path','__p2p_secondary_paths',)

  _yang_name = 'p2p-tunnel-attributes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__p2p_primary_path = YANGDynClass(base=yc_p2p_primary_path_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path, is_container='container', yang_name="p2p-primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__p2p_secondary_paths = YANGDynClass(base=yc_p2p_secondary_paths_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths, is_container='container', yang_name="p2p-secondary-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/config (container)

    YANG Description: Configuration parameters for P2P LSPs
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/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 P2P LSPs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/state (container)

    YANG Description: State parameters for P2P LSPs
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/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 parameters for P2P LSPs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_p2p_primary_path(self):
    """
    Getter method for p2p_primary_path, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path (container)

    YANG Description: Primary paths associated with the LSP
    """
    return self.__p2p_primary_path
      
  def _set_p2p_primary_path(self, v, load=False):
    """
    Setter method for p2p_primary_path, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_p2p_primary_path is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_p2p_primary_path() directly.

    YANG Description: Primary paths associated with the LSP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_p2p_primary_path_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path, is_container='container', yang_name="p2p-primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """p2p_primary_path must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_p2p_primary_path_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path, is_container='container', yang_name="p2p-primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__p2p_primary_path = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_p2p_primary_path(self):
    self.__p2p_primary_path = YANGDynClass(base=yc_p2p_primary_path_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path, is_container='container', yang_name="p2p-primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_p2p_secondary_paths(self):
    """
    Getter method for p2p_secondary_paths, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths (container)

    YANG Description: Secondary paths for the LSP
    """
    return self.__p2p_secondary_paths
      
  def _set_p2p_secondary_paths(self, v, load=False):
    """
    Setter method for p2p_secondary_paths, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_p2p_secondary_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_p2p_secondary_paths() directly.

    YANG Description: Secondary paths for the LSP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_p2p_secondary_paths_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths, is_container='container', yang_name="p2p-secondary-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """p2p_secondary_paths must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_p2p_secondary_paths_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths, is_container='container', yang_name="p2p-secondary-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__p2p_secondary_paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_p2p_secondary_paths(self):
    self.__p2p_secondary_paths = YANGDynClass(base=yc_p2p_secondary_paths_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths, is_container='container', yang_name="p2p-secondary-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  p2p_primary_path = __builtin__.property(_get_p2p_primary_path, _set_p2p_primary_path)
  p2p_secondary_paths = __builtin__.property(_get_p2p_secondary_paths, _set_p2p_secondary_paths)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('p2p_primary_path', p2p_primary_path), ('p2p_secondary_paths', p2p_secondary_paths), ])


class yc_tunnel_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of TE tunnels. This list contains only the LSPs that the
current device originates (i.e., for which it is the head-end).
Where the signaling protocol utilised for an LSP allows a mid-point
or tail device to be aware of the LSP (e.g., RSVP-TE), then the
associated sessions are maintained per protocol
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state','__bandwidth','__p2p_tunnel_attributes',)

  _yang_name = 'tunnel'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__bandwidth = YANGDynClass(base=yc_bandwidth_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth, is_container='container', yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__p2p_tunnel_attributes = YANGDynClass(base=yc_p2p_tunnel_attributes_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes, is_container='container', yang_name="p2p-tunnel-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/name (leafref)

    YANG Description: The tunnel name
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/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 tunnel 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config (container)

    YANG Description: Configuration parameters related to TE tunnels:
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/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 related to TE tunnels:
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state (container)

    YANG Description: State parameters related to TE tunnels
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/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 parameters related to TE tunnels
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_bandwidth(self):
    """
    Getter method for bandwidth, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth (container)

    YANG Description: Bandwidth configuration for TE LSPs
    """
    return self.__bandwidth
      
  def _set_bandwidth(self, v, load=False):
    """
    Setter method for bandwidth, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth() directly.

    YANG Description: Bandwidth configuration for TE LSPs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_bandwidth_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth, is_container='container', yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_bandwidth_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth, is_container='container', yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth(self):
    self.__bandwidth = YANGDynClass(base=yc_bandwidth_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth, is_container='container', yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_p2p_tunnel_attributes(self):
    """
    Getter method for p2p_tunnel_attributes, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes (container)

    YANG Description: Parameters related to LSPs of type P2P
    """
    return self.__p2p_tunnel_attributes
      
  def _set_p2p_tunnel_attributes(self, v, load=False):
    """
    Setter method for p2p_tunnel_attributes, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_p2p_tunnel_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_p2p_tunnel_attributes() directly.

    YANG Description: Parameters related to LSPs of type P2P
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_p2p_tunnel_attributes_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes, is_container='container', yang_name="p2p-tunnel-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """p2p_tunnel_attributes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_p2p_tunnel_attributes_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes, is_container='container', yang_name="p2p-tunnel-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__p2p_tunnel_attributes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_p2p_tunnel_attributes(self):
    self.__p2p_tunnel_attributes = YANGDynClass(base=yc_p2p_tunnel_attributes_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes, is_container='container', yang_name="p2p-tunnel-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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)
  bandwidth = __builtin__.property(_get_bandwidth, _set_bandwidth)
  p2p_tunnel_attributes = __builtin__.property(_get_p2p_tunnel_attributes, _set_p2p_tunnel_attributes)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ('bandwidth', bandwidth), ('p2p_tunnel_attributes', p2p_tunnel_attributes), ])


class yc_tunnels_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for tunnels
  """
  __slots__ = ('_path_helper', '_extmethods', '__tunnel',)

  _yang_name = 'tunnels'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__tunnel = YANGDynClass(base=YANGListType("name",yc_tunnel_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels']

  def _get_tunnel(self):
    """
    Getter method for tunnel, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel (list)

    YANG Description: List of TE tunnels. This list contains only the LSPs that the
current device originates (i.e., for which it is the head-end).
Where the signaling protocol utilised for an LSP allows a mid-point
or tail device to be aware of the LSP (e.g., RSVP-TE), then the
associated sessions are maintained per protocol
    """
    return self.__tunnel
      
  def _set_tunnel(self, v, load=False):
    """
    Setter method for tunnel, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tunnel is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tunnel() directly.

    YANG Description: List of TE tunnels. This list contains only the LSPs that the
current device originates (i.e., for which it is the head-end).
Where the signaling protocol utilised for an LSP allows a mid-point
or tail device to be aware of the LSP (e.g., RSVP-TE), then the
associated sessions are maintained per protocol
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_tunnel_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tunnel must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_tunnel_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__tunnel = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tunnel(self):
    self.__tunnel = YANGDynClass(base=YANGListType("name",yc_tunnel_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  tunnel = __builtin__.property(_get_tunnel, _set_tunnel)


  _pyangbind_elements = OrderedDict([('tunnel', tunnel), ])


class yc_constrained_path_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/constrained-path. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: traffic-engineered LSPs supporting different
path computation and signaling methods
  """
  __slots__ = ('_path_helper', '_extmethods', '__named_explicit_paths','__tunnels',)

  _yang_name = 'constrained-path'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__named_explicit_paths = YANGDynClass(base=yc_named_explicit_paths_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths, is_container='container', yang_name="named-explicit-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__tunnels = YANGDynClass(base=yc_tunnels_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path']

  def _get_named_explicit_paths(self):
    """
    Getter method for named_explicit_paths, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths (container)

    YANG Description: Enclosing container for the named explicit paths
    """
    return self.__named_explicit_paths
      
  def _set_named_explicit_paths(self, v, load=False):
    """
    Setter method for named_explicit_paths, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_named_explicit_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_named_explicit_paths() directly.

    YANG Description: Enclosing container for the named explicit paths
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_named_explicit_paths_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths, is_container='container', yang_name="named-explicit-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """named_explicit_paths must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_named_explicit_paths_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths, is_container='container', yang_name="named-explicit-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__named_explicit_paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_named_explicit_paths(self):
    self.__named_explicit_paths = YANGDynClass(base=yc_named_explicit_paths_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths, is_container='container', yang_name="named-explicit-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_tunnels(self):
    """
    Getter method for tunnels, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels (container)

    YANG Description: Enclosing container for tunnels
    """
    return self.__tunnels
      
  def _set_tunnels(self, v, load=False):
    """
    Setter method for tunnels, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tunnels is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tunnels() directly.

    YANG Description: Enclosing container for tunnels
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_tunnels_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tunnels must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_tunnels_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__tunnels = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tunnels(self):
    self.__tunnels = YANGDynClass(base=yc_tunnels_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path_tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  named_explicit_paths = __builtin__.property(_get_named_explicit_paths, _set_named_explicit_paths)
  tunnels = __builtin__.property(_get_tunnels, _set_tunnels)


  _pyangbind_elements = OrderedDict([('named_explicit_paths', named_explicit_paths), ('tunnels', tunnels), ])


class yc_path_setup_protocol_openconfig_network_instance__network_instances_network_instance_mpls_lsps_unconstrained_path_path_setup_protocol(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/unconstrained-path/path-setup-protocol. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: select and configure the signaling method for
 the LSP
  """
  _pyangbind_elements = {}

  

class yc_unconstrained_path_openconfig_network_instance__network_instances_network_instance_mpls_lsps_unconstrained_path(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/unconstrained-path. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: LSPs that use the IGP-determined path, i.e., non
traffic-engineered, or non constrained-path
  """
  __slots__ = ('_path_helper', '_extmethods', '__path_setup_protocol',)

  _yang_name = 'unconstrained-path'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__path_setup_protocol = YANGDynClass(base=yc_path_setup_protocol_openconfig_network_instance__network_instances_network_instance_mpls_lsps_unconstrained_path_path_setup_protocol, is_container='container', yang_name="path-setup-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'unconstrained-path']

  def _get_path_setup_protocol(self):
    """
    Getter method for path_setup_protocol, mapped from YANG variable /network_instances/network_instance/mpls/lsps/unconstrained_path/path_setup_protocol (container)

    YANG Description: select and configure the signaling method for
 the LSP
    """
    return self.__path_setup_protocol
      
  def _set_path_setup_protocol(self, v, load=False):
    """
    Setter method for path_setup_protocol, mapped from YANG variable /network_instances/network_instance/mpls/lsps/unconstrained_path/path_setup_protocol (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_setup_protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_setup_protocol() directly.

    YANG Description: select and configure the signaling method for
 the LSP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_path_setup_protocol_openconfig_network_instance__network_instances_network_instance_mpls_lsps_unconstrained_path_path_setup_protocol, is_container='container', yang_name="path-setup-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_setup_protocol must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_path_setup_protocol_openconfig_network_instance__network_instances_network_instance_mpls_lsps_unconstrained_path_path_setup_protocol, is_container='container', yang_name="path-setup-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__path_setup_protocol = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_setup_protocol(self):
    self.__path_setup_protocol = YANGDynClass(base=yc_path_setup_protocol_openconfig_network_instance__network_instances_network_instance_mpls_lsps_unconstrained_path_path_setup_protocol, is_container='container', yang_name="path-setup-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  path_setup_protocol = __builtin__.property(_get_path_setup_protocol, _set_path_setup_protocol)


  _pyangbind_elements = OrderedDict([('path_setup_protocol', path_setup_protocol), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/static-lsps/static-lsp/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for the static lsp
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'static-lsps', 'static-lsp', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/config/name (string)

    YANG Description: name to identify the LSP
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/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 to identify the LSP
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)

  name = __builtin__.property(_get_name, _set_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/static-lsps/static-lsp/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 static lsp
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'static-lsps', 'static-lsp', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/state/name (string)

    YANG Description: name to identify the LSP
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/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 to identify the LSP
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)

  name = __builtin__.property(_get_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_ingress_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/static-lsps/static-lsp/ingress/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for ingress LSPs
  """
  __slots__ = ('_path_helper', '_extmethods', '__next_hop','__incoming_label','__push_label',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__next_hop = 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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)
    self.__incoming_label = 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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)
    self.__push_label = 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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'lsps', 'static-lsps', 'static-lsp', 'ingress', 'config']

  def _get_next_hop(self):
    """
    Getter method for next_hop, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/ingress/config/next_hop (inet:ip-address)

    YANG Description: next hop IP address for the LSP
    """
    return self.__next_hop
      
  def _set_next_hop(self, v, load=False):
    """
    Setter method for next_hop, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/ingress/config/next_hop (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hop() directly.

    YANG Description: next hop IP address for the LSP
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hop must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)""",
        })

    self.__next_hop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_next_hop(self):
    self.__next_hop = 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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)


  def _get_incoming_label(self):
    """
    Getter method for incoming_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/ingress/config/incoming_label (oc-mplst:mpls-label)

    YANG Description: label value on the incoming packet
    """
    return self.__incoming_label
      
  def _set_incoming_label(self, v, load=False):
    """
    Setter method for incoming_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/ingress/config/incoming_label (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_incoming_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_incoming_label() directly.

    YANG Description: label value on the incoming packet
    """
    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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """incoming_label must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)""",
        })

    self.__incoming_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_incoming_label(self):
    self.__incoming_label = 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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)


  def _get_push_label(self):
    """
    Getter method for push_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/ingress/config/push_label (oc-mplst:mpls-label)

    YANG Description: label value to push at the current hop for the
LSP
    """
    return self.__push_label
      
  def _set_push_label(self, v, load=False):
    """
    Setter method for push_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/ingress/config/push_label (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_push_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_push_label() directly.

    YANG Description: label value to push at the current hop for the
LSP
    """
    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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """push_label must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)""",
        })

    self.__push_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_push_label(self):
    self.__push_label = 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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)

  next_hop = __builtin__.property(_get_next_hop, _set_next_hop)
  incoming_label = __builtin__.property(_get_incoming_label, _set_incoming_label)
  push_label = __builtin__.property(_get_push_label, _set_push_label)


  _pyangbind_elements = OrderedDict([('next_hop', next_hop), ('incoming_label', incoming_label), ('push_label', push_label), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_ingress_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/static-lsps/static-lsp/ingress/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for ingress LSPs
  """
  __slots__ = ('_path_helper', '_extmethods', '__next_hop','__incoming_label','__push_label',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__next_hop = 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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    self.__incoming_label = 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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    self.__push_label = 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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'static-lsps', 'static-lsp', 'ingress', 'state']

  def _get_next_hop(self):
    """
    Getter method for next_hop, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/ingress/state/next_hop (inet:ip-address)

    YANG Description: next hop IP address for the LSP
    """
    return self.__next_hop
      
  def _set_next_hop(self, v, load=False):
    """
    Setter method for next_hop, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/ingress/state/next_hop (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hop() directly.

    YANG Description: next hop IP address for the LSP
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hop must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)""",
        })

    self.__next_hop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_next_hop(self):
    self.__next_hop = 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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)


  def _get_incoming_label(self):
    """
    Getter method for incoming_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/ingress/state/incoming_label (oc-mplst:mpls-label)

    YANG Description: label value on the incoming packet
    """
    return self.__incoming_label
      
  def _set_incoming_label(self, v, load=False):
    """
    Setter method for incoming_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/ingress/state/incoming_label (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_incoming_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_incoming_label() directly.

    YANG Description: label value on the incoming packet
    """
    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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """incoming_label must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)""",
        })

    self.__incoming_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_incoming_label(self):
    self.__incoming_label = 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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)


  def _get_push_label(self):
    """
    Getter method for push_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/ingress/state/push_label (oc-mplst:mpls-label)

    YANG Description: label value to push at the current hop for the
LSP
    """
    return self.__push_label
      
  def _set_push_label(self, v, load=False):
    """
    Setter method for push_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/ingress/state/push_label (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_push_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_push_label() directly.

    YANG Description: label value to push at the current hop for the
LSP
    """
    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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """push_label must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)""",
        })

    self.__push_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_push_label(self):
    self.__push_label = 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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)

  next_hop = __builtin__.property(_get_next_hop)
  incoming_label = __builtin__.property(_get_incoming_label)
  push_label = __builtin__.property(_get_push_label)


  _pyangbind_elements = OrderedDict([('next_hop', next_hop), ('incoming_label', incoming_label), ('push_label', push_label), ])


class yc_ingress_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_ingress(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/static-lsps/static-lsp/ingress. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Static LSPs for which the router is an
 ingress node
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'ingress'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_ingress_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_ingress_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'static-lsps', 'static-lsp', 'ingress']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/ingress/config (container)

    YANG Description: Configuration data for ingress LSPs
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/ingress/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 ingress LSPs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_ingress_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_ingress_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_ingress_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/ingress/state (container)

    YANG Description: Operational state data for ingress LSPs
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/ingress/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 ingress LSPs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_ingress_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_ingress_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_ingress_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_transit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/static-lsps/static-lsp/transit/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for transit LSPs
  """
  __slots__ = ('_path_helper', '_extmethods', '__next_hop','__incoming_label','__push_label',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__next_hop = 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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)
    self.__incoming_label = 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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)
    self.__push_label = 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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'lsps', 'static-lsps', 'static-lsp', 'transit', 'config']

  def _get_next_hop(self):
    """
    Getter method for next_hop, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/transit/config/next_hop (inet:ip-address)

    YANG Description: next hop IP address for the LSP
    """
    return self.__next_hop
      
  def _set_next_hop(self, v, load=False):
    """
    Setter method for next_hop, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/transit/config/next_hop (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hop() directly.

    YANG Description: next hop IP address for the LSP
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hop must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)""",
        })

    self.__next_hop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_next_hop(self):
    self.__next_hop = 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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)


  def _get_incoming_label(self):
    """
    Getter method for incoming_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/transit/config/incoming_label (oc-mplst:mpls-label)

    YANG Description: label value on the incoming packet
    """
    return self.__incoming_label
      
  def _set_incoming_label(self, v, load=False):
    """
    Setter method for incoming_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/transit/config/incoming_label (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_incoming_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_incoming_label() directly.

    YANG Description: label value on the incoming packet
    """
    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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """incoming_label must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)""",
        })

    self.__incoming_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_incoming_label(self):
    self.__incoming_label = 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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)


  def _get_push_label(self):
    """
    Getter method for push_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/transit/config/push_label (oc-mplst:mpls-label)

    YANG Description: label value to push at the current hop for the
LSP
    """
    return self.__push_label
      
  def _set_push_label(self, v, load=False):
    """
    Setter method for push_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/transit/config/push_label (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_push_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_push_label() directly.

    YANG Description: label value to push at the current hop for the
LSP
    """
    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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """push_label must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)""",
        })

    self.__push_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_push_label(self):
    self.__push_label = 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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)

  next_hop = __builtin__.property(_get_next_hop, _set_next_hop)
  incoming_label = __builtin__.property(_get_incoming_label, _set_incoming_label)
  push_label = __builtin__.property(_get_push_label, _set_push_label)


  _pyangbind_elements = OrderedDict([('next_hop', next_hop), ('incoming_label', incoming_label), ('push_label', push_label), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_transit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/static-lsps/static-lsp/transit/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for transit LSPs
  """
  __slots__ = ('_path_helper', '_extmethods', '__next_hop','__incoming_label','__push_label',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__next_hop = 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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    self.__incoming_label = 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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    self.__push_label = 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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'static-lsps', 'static-lsp', 'transit', 'state']

  def _get_next_hop(self):
    """
    Getter method for next_hop, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/transit/state/next_hop (inet:ip-address)

    YANG Description: next hop IP address for the LSP
    """
    return self.__next_hop
      
  def _set_next_hop(self, v, load=False):
    """
    Setter method for next_hop, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/transit/state/next_hop (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hop() directly.

    YANG Description: next hop IP address for the LSP
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hop must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)""",
        })

    self.__next_hop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_next_hop(self):
    self.__next_hop = 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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)


  def _get_incoming_label(self):
    """
    Getter method for incoming_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/transit/state/incoming_label (oc-mplst:mpls-label)

    YANG Description: label value on the incoming packet
    """
    return self.__incoming_label
      
  def _set_incoming_label(self, v, load=False):
    """
    Setter method for incoming_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/transit/state/incoming_label (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_incoming_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_incoming_label() directly.

    YANG Description: label value on the incoming packet
    """
    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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """incoming_label must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)""",
        })

    self.__incoming_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_incoming_label(self):
    self.__incoming_label = 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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)


  def _get_push_label(self):
    """
    Getter method for push_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/transit/state/push_label (oc-mplst:mpls-label)

    YANG Description: label value to push at the current hop for the
LSP
    """
    return self.__push_label
      
  def _set_push_label(self, v, load=False):
    """
    Setter method for push_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/transit/state/push_label (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_push_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_push_label() directly.

    YANG Description: label value to push at the current hop for the
LSP
    """
    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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """push_label must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)""",
        })

    self.__push_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_push_label(self):
    self.__push_label = 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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)

  next_hop = __builtin__.property(_get_next_hop)
  incoming_label = __builtin__.property(_get_incoming_label)
  push_label = __builtin__.property(_get_push_label)


  _pyangbind_elements = OrderedDict([('next_hop', next_hop), ('incoming_label', incoming_label), ('push_label', push_label), ])


class yc_transit_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_transit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/static-lsps/static-lsp/transit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Static LSPs for which the router is an
 transit node
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'transit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_transit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_transit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'static-lsps', 'static-lsp', 'transit']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/transit/config (container)

    YANG Description: Configuration data for transit LSPs
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/transit/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 transit LSPs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_transit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_transit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_transit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/transit/state (container)

    YANG Description: Operational state data for transit LSPs
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/transit/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 transit LSPs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_transit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_transit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_transit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_egress_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/static-lsps/static-lsp/egress/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for egress LSPs
  """
  __slots__ = ('_path_helper', '_extmethods', '__next_hop','__incoming_label','__push_label',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__next_hop = 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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)
    self.__incoming_label = 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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)
    self.__push_label = 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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'lsps', 'static-lsps', 'static-lsp', 'egress', 'config']

  def _get_next_hop(self):
    """
    Getter method for next_hop, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/egress/config/next_hop (inet:ip-address)

    YANG Description: next hop IP address for the LSP
    """
    return self.__next_hop
      
  def _set_next_hop(self, v, load=False):
    """
    Setter method for next_hop, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/egress/config/next_hop (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hop() directly.

    YANG Description: next hop IP address for the LSP
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hop must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)""",
        })

    self.__next_hop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_next_hop(self):
    self.__next_hop = 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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)


  def _get_incoming_label(self):
    """
    Getter method for incoming_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/egress/config/incoming_label (oc-mplst:mpls-label)

    YANG Description: label value on the incoming packet
    """
    return self.__incoming_label
      
  def _set_incoming_label(self, v, load=False):
    """
    Setter method for incoming_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/egress/config/incoming_label (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_incoming_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_incoming_label() directly.

    YANG Description: label value on the incoming packet
    """
    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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """incoming_label must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)""",
        })

    self.__incoming_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_incoming_label(self):
    self.__incoming_label = 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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)


  def _get_push_label(self):
    """
    Getter method for push_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/egress/config/push_label (oc-mplst:mpls-label)

    YANG Description: label value to push at the current hop for the
LSP
    """
    return self.__push_label
      
  def _set_push_label(self, v, load=False):
    """
    Setter method for push_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/egress/config/push_label (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_push_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_push_label() directly.

    YANG Description: label value to push at the current hop for the
LSP
    """
    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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """push_label must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)""",
        })

    self.__push_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_push_label(self):
    self.__push_label = 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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)

  next_hop = __builtin__.property(_get_next_hop, _set_next_hop)
  incoming_label = __builtin__.property(_get_incoming_label, _set_incoming_label)
  push_label = __builtin__.property(_get_push_label, _set_push_label)


  _pyangbind_elements = OrderedDict([('next_hop', next_hop), ('incoming_label', incoming_label), ('push_label', push_label), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_egress_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/static-lsps/static-lsp/egress/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for egress LSPs
  """
  __slots__ = ('_path_helper', '_extmethods', '__next_hop','__incoming_label','__push_label',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__next_hop = 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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    self.__incoming_label = 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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    self.__push_label = 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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'static-lsps', 'static-lsp', 'egress', 'state']

  def _get_next_hop(self):
    """
    Getter method for next_hop, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/egress/state/next_hop (inet:ip-address)

    YANG Description: next hop IP address for the LSP
    """
    return self.__next_hop
      
  def _set_next_hop(self, v, load=False):
    """
    Setter method for next_hop, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/egress/state/next_hop (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hop() directly.

    YANG Description: next hop IP address for the LSP
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hop must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)""",
        })

    self.__next_hop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_next_hop(self):
    self.__next_hop = 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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)


  def _get_incoming_label(self):
    """
    Getter method for incoming_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/egress/state/incoming_label (oc-mplst:mpls-label)

    YANG Description: label value on the incoming packet
    """
    return self.__incoming_label
      
  def _set_incoming_label(self, v, load=False):
    """
    Setter method for incoming_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/egress/state/incoming_label (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_incoming_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_incoming_label() directly.

    YANG Description: label value on the incoming packet
    """
    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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """incoming_label must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)""",
        })

    self.__incoming_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_incoming_label(self):
    self.__incoming_label = 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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)


  def _get_push_label(self):
    """
    Getter method for push_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/egress/state/push_label (oc-mplst:mpls-label)

    YANG Description: label value to push at the current hop for the
LSP
    """
    return self.__push_label
      
  def _set_push_label(self, v, load=False):
    """
    Setter method for push_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/egress/state/push_label (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_push_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_push_label() directly.

    YANG Description: label value to push at the current hop for the
LSP
    """
    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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """push_label must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)""",
        })

    self.__push_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_push_label(self):
    self.__push_label = 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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)

  next_hop = __builtin__.property(_get_next_hop)
  incoming_label = __builtin__.property(_get_incoming_label)
  push_label = __builtin__.property(_get_push_label)


  _pyangbind_elements = OrderedDict([('next_hop', next_hop), ('incoming_label', incoming_label), ('push_label', push_label), ])


class yc_egress_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_egress(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/static-lsps/static-lsp/egress. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Static LSPs for which the router is an
 egress node
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'egress'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_egress_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_egress_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'static-lsps', 'static-lsp', 'egress']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/egress/config (container)

    YANG Description: Configuration data for egress LSPs
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/egress/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 egress LSPs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_egress_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_egress_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_egress_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/egress/state (container)

    YANG Description: Operational state data for egress LSPs
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/egress/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 egress LSPs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_egress_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_egress_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_egress_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_static_lsp_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/static-lsps/static-lsp. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: list of defined static LSPs
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state','__ingress','__transit','__egress',)

  _yang_name = 'static-lsp'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__ingress = YANGDynClass(base=yc_ingress_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_ingress, is_container='container', yang_name="ingress", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__transit = YANGDynClass(base=yc_transit_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_transit, is_container='container', yang_name="transit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__egress = YANGDynClass(base=yc_egress_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_egress, is_container='container', yang_name="egress", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'static-lsps', 'static-lsp']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/name (leafref)

    YANG Description: Reference the name list key
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/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 the 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/config (container)

    YANG Description: Configuration data for the static lsp
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/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 static lsp
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/state (container)

    YANG Description: Operational state data for the static lsp
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/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 static lsp
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_ingress(self):
    """
    Getter method for ingress, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/ingress (container)

    YANG Description: Static LSPs for which the router is an
 ingress node
    """
    return self.__ingress
      
  def _set_ingress(self, v, load=False):
    """
    Setter method for ingress, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/ingress (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ingress is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ingress() directly.

    YANG Description: Static LSPs for which the router is an
 ingress node
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ingress_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_ingress, is_container='container', yang_name="ingress", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ingress must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ingress_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_ingress, is_container='container', yang_name="ingress", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__ingress = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ingress(self):
    self.__ingress = YANGDynClass(base=yc_ingress_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_ingress, is_container='container', yang_name="ingress", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_transit(self):
    """
    Getter method for transit, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/transit (container)

    YANG Description: Static LSPs for which the router is an
 transit node
    """
    return self.__transit
      
  def _set_transit(self, v, load=False):
    """
    Setter method for transit, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/transit (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transit() directly.

    YANG Description: Static LSPs for which the router is an
 transit node
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_transit_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_transit, is_container='container', yang_name="transit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transit must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_transit_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_transit, is_container='container', yang_name="transit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__transit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transit(self):
    self.__transit = YANGDynClass(base=yc_transit_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_transit, is_container='container', yang_name="transit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_egress(self):
    """
    Getter method for egress, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/egress (container)

    YANG Description: Static LSPs for which the router is an
 egress node
    """
    return self.__egress
      
  def _set_egress(self, v, load=False):
    """
    Setter method for egress, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/egress (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_egress is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_egress() directly.

    YANG Description: Static LSPs for which the router is an
 egress node
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_egress_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_egress, is_container='container', yang_name="egress", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """egress must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_egress_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_egress, is_container='container', yang_name="egress", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__egress = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_egress(self):
    self.__egress = YANGDynClass(base=yc_egress_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_egress, is_container='container', yang_name="egress", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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)
  ingress = __builtin__.property(_get_ingress, _set_ingress)
  transit = __builtin__.property(_get_transit, _set_transit)
  egress = __builtin__.property(_get_egress, _set_egress)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ('ingress', ingress), ('transit', transit), ('egress', egress), ])


class yc_static_lsps_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps/static-lsps. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: statically configured LSPs, without dynamic
signaling
  """
  __slots__ = ('_path_helper', '_extmethods', '__static_lsp',)

  _yang_name = 'static-lsps'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__static_lsp = YANGDynClass(base=YANGListType("name",yc_static_lsp_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp, yang_name="static-lsp", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="static-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'static-lsps']

  def _get_static_lsp(self):
    """
    Getter method for static_lsp, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp (list)

    YANG Description: list of defined static LSPs
    """
    return self.__static_lsp
      
  def _set_static_lsp(self, v, load=False):
    """
    Setter method for static_lsp, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_static_lsp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_static_lsp() directly.

    YANG Description: list of defined static LSPs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_static_lsp_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp, yang_name="static-lsp", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="static-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """static_lsp must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_static_lsp_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp, yang_name="static-lsp", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="static-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__static_lsp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_static_lsp(self):
    self.__static_lsp = YANGDynClass(base=YANGListType("name",yc_static_lsp_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp, yang_name="static-lsp", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="static-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  static_lsp = __builtin__.property(_get_static_lsp, _set_static_lsp)


  _pyangbind_elements = OrderedDict([('static_lsp', static_lsp), ])


class yc_lsps_openconfig_network_instance__network_instances_network_instance_mpls_lsps(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls/lsps. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: LSP definitions and configuration
  """
  __slots__ = ('_path_helper', '_extmethods', '__constrained_path','__unconstrained_path','__static_lsps',)

  _yang_name = 'lsps'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__constrained_path = YANGDynClass(base=yc_constrained_path_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path, is_container='container', yang_name="constrained-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__unconstrained_path = YANGDynClass(base=yc_unconstrained_path_openconfig_network_instance__network_instances_network_instance_mpls_lsps_unconstrained_path, is_container='container', yang_name="unconstrained-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__static_lsps = YANGDynClass(base=yc_static_lsps_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps, is_container='container', yang_name="static-lsps", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps']

  def _get_constrained_path(self):
    """
    Getter method for constrained_path, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path (container)

    YANG Description: traffic-engineered LSPs supporting different
path computation and signaling methods
    """
    return self.__constrained_path
      
  def _set_constrained_path(self, v, load=False):
    """
    Setter method for constrained_path, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_constrained_path is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_constrained_path() directly.

    YANG Description: traffic-engineered LSPs supporting different
path computation and signaling methods
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_constrained_path_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path, is_container='container', yang_name="constrained-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """constrained_path must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_constrained_path_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path, is_container='container', yang_name="constrained-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__constrained_path = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_constrained_path(self):
    self.__constrained_path = YANGDynClass(base=yc_constrained_path_openconfig_network_instance__network_instances_network_instance_mpls_lsps_constrained_path, is_container='container', yang_name="constrained-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_unconstrained_path(self):
    """
    Getter method for unconstrained_path, mapped from YANG variable /network_instances/network_instance/mpls/lsps/unconstrained_path (container)

    YANG Description: LSPs that use the IGP-determined path, i.e., non
traffic-engineered, or non constrained-path
    """
    return self.__unconstrained_path
      
  def _set_unconstrained_path(self, v, load=False):
    """
    Setter method for unconstrained_path, mapped from YANG variable /network_instances/network_instance/mpls/lsps/unconstrained_path (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unconstrained_path is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unconstrained_path() directly.

    YANG Description: LSPs that use the IGP-determined path, i.e., non
traffic-engineered, or non constrained-path
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unconstrained_path_openconfig_network_instance__network_instances_network_instance_mpls_lsps_unconstrained_path, is_container='container', yang_name="unconstrained-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unconstrained_path must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unconstrained_path_openconfig_network_instance__network_instances_network_instance_mpls_lsps_unconstrained_path, is_container='container', yang_name="unconstrained-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__unconstrained_path = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unconstrained_path(self):
    self.__unconstrained_path = YANGDynClass(base=yc_unconstrained_path_openconfig_network_instance__network_instances_network_instance_mpls_lsps_unconstrained_path, is_container='container', yang_name="unconstrained-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_static_lsps(self):
    """
    Getter method for static_lsps, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps (container)

    YANG Description: statically configured LSPs, without dynamic
signaling
    """
    return self.__static_lsps
      
  def _set_static_lsps(self, v, load=False):
    """
    Setter method for static_lsps, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_static_lsps is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_static_lsps() directly.

    YANG Description: statically configured LSPs, without dynamic
signaling
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_static_lsps_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps, is_container='container', yang_name="static-lsps", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """static_lsps must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_static_lsps_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps, is_container='container', yang_name="static-lsps", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__static_lsps = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_static_lsps(self):
    self.__static_lsps = YANGDynClass(base=yc_static_lsps_openconfig_network_instance__network_instances_network_instance_mpls_lsps_static_lsps, is_container='container', yang_name="static-lsps", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  constrained_path = __builtin__.property(_get_constrained_path, _set_constrained_path)
  unconstrained_path = __builtin__.property(_get_unconstrained_path, _set_unconstrained_path)
  static_lsps = __builtin__.property(_get_static_lsps, _set_static_lsps)


  _pyangbind_elements = OrderedDict([('constrained_path', constrained_path), ('unconstrained_path', unconstrained_path), ('static_lsps', static_lsps), ])


class yc_mpls_openconfig_network_instance__network_instances_network_instance_mpls(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/mpls. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Anchor point for mpls configuration and operational
data
  """
  __slots__ = ('_path_helper', '_extmethods', '__global_','__te_global_attributes','__te_interface_attributes','__signaling_protocols','__lsps',)

  _yang_name = 'mpls'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__global_ = YANGDynClass(base=yc_global__openconfig_network_instance__network_instances_network_instance_mpls_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__te_global_attributes = YANGDynClass(base=yc_te_global_attributes_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes, is_container='container', yang_name="te-global-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__te_interface_attributes = YANGDynClass(base=yc_te_interface_attributes_openconfig_network_instance__network_instances_network_instance_mpls_te_interface_attributes, is_container='container', yang_name="te-interface-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__signaling_protocols = YANGDynClass(base=yc_signaling_protocols_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols, is_container='container', yang_name="signaling-protocols", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__lsps = YANGDynClass(base=yc_lsps_openconfig_network_instance__network_instances_network_instance_mpls_lsps, is_container='container', yang_name="lsps", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls']

  def _get_global_(self):
    """
    Getter method for global_, mapped from YANG variable /network_instances/network_instance/mpls/global (container)

    YANG Description: general mpls configuration applicable to any
type of LSP and signaling protocol - label ranges,
entropy label supportmay be added here
    """
    return self.__global_
      
  def _set_global_(self, v, load=False):
    """
    Setter method for global_, mapped from YANG variable /network_instances/network_instance/mpls/global (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_global_ is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_global_() directly.

    YANG Description: general mpls configuration applicable to any
type of LSP and signaling protocol - label ranges,
entropy label supportmay be added here
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_global__openconfig_network_instance__network_instances_network_instance_mpls_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """global_ must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_global__openconfig_network_instance__network_instances_network_instance_mpls_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__global_ = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_global_(self):
    self.__global_ = YANGDynClass(base=yc_global__openconfig_network_instance__network_instances_network_instance_mpls_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_te_global_attributes(self):
    """
    Getter method for te_global_attributes, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes (container)

    YANG Description: traffic-engineering global attributes
    """
    return self.__te_global_attributes
      
  def _set_te_global_attributes(self, v, load=False):
    """
    Setter method for te_global_attributes, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_te_global_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_te_global_attributes() directly.

    YANG Description: traffic-engineering global attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_te_global_attributes_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes, is_container='container', yang_name="te-global-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """te_global_attributes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_te_global_attributes_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes, is_container='container', yang_name="te-global-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__te_global_attributes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_te_global_attributes(self):
    self.__te_global_attributes = YANGDynClass(base=yc_te_global_attributes_openconfig_network_instance__network_instances_network_instance_mpls_te_global_attributes, is_container='container', yang_name="te-global-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_te_interface_attributes(self):
    """
    Getter method for te_interface_attributes, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes (container)

    YANG Description: traffic engineering attributes specific
for interfaces
    """
    return self.__te_interface_attributes
      
  def _set_te_interface_attributes(self, v, load=False):
    """
    Setter method for te_interface_attributes, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_te_interface_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_te_interface_attributes() directly.

    YANG Description: traffic engineering attributes specific
for interfaces
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_te_interface_attributes_openconfig_network_instance__network_instances_network_instance_mpls_te_interface_attributes, is_container='container', yang_name="te-interface-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """te_interface_attributes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_te_interface_attributes_openconfig_network_instance__network_instances_network_instance_mpls_te_interface_attributes, is_container='container', yang_name="te-interface-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__te_interface_attributes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_te_interface_attributes(self):
    self.__te_interface_attributes = YANGDynClass(base=yc_te_interface_attributes_openconfig_network_instance__network_instances_network_instance_mpls_te_interface_attributes, is_container='container', yang_name="te-interface-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_signaling_protocols(self):
    """
    Getter method for signaling_protocols, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols (container)

    YANG Description: top-level signaling protocol configuration
    """
    return self.__signaling_protocols
      
  def _set_signaling_protocols(self, v, load=False):
    """
    Setter method for signaling_protocols, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_signaling_protocols is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_signaling_protocols() directly.

    YANG Description: top-level signaling protocol configuration
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_signaling_protocols_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols, is_container='container', yang_name="signaling-protocols", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """signaling_protocols must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_signaling_protocols_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols, is_container='container', yang_name="signaling-protocols", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__signaling_protocols = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_signaling_protocols(self):
    self.__signaling_protocols = YANGDynClass(base=yc_signaling_protocols_openconfig_network_instance__network_instances_network_instance_mpls_signaling_protocols, is_container='container', yang_name="signaling-protocols", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_lsps(self):
    """
    Getter method for lsps, mapped from YANG variable /network_instances/network_instance/mpls/lsps (container)

    YANG Description: LSP definitions and configuration
    """
    return self.__lsps
      
  def _set_lsps(self, v, load=False):
    """
    Setter method for lsps, mapped from YANG variable /network_instances/network_instance/mpls/lsps (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsps is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsps() directly.

    YANG Description: LSP definitions and configuration
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_lsps_openconfig_network_instance__network_instances_network_instance_mpls_lsps, is_container='container', yang_name="lsps", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsps must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_lsps_openconfig_network_instance__network_instances_network_instance_mpls_lsps, is_container='container', yang_name="lsps", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__lsps = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsps(self):
    self.__lsps = YANGDynClass(base=yc_lsps_openconfig_network_instance__network_instances_network_instance_mpls_lsps, is_container='container', yang_name="lsps", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  global_ = __builtin__.property(_get_global_, _set_global_)
  te_global_attributes = __builtin__.property(_get_te_global_attributes, _set_te_global_attributes)
  te_interface_attributes = __builtin__.property(_get_te_interface_attributes, _set_te_interface_attributes)
  signaling_protocols = __builtin__.property(_get_signaling_protocols, _set_signaling_protocols)
  lsps = __builtin__.property(_get_lsps, _set_lsps)


  _pyangbind_elements = OrderedDict([('global_', global_), ('te_global_attributes', te_global_attributes), ('te_interface_attributes', te_interface_attributes), ('signaling_protocols', signaling_protocols), ('lsps', lsps), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_segment_routing_srgbs_srgb_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/segment-routing/srgbs/srgb/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 SRGB.
  """
  __slots__ = ('_path_helper', '_extmethods', '__local_id','__dataplane_type','__mpls_label_blocks','__ipv6_prefixes',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__local_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__dataplane_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'MPLS': {}, 'IPV6': {}},), is_leaf=True, yang_name="dataplane-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-dataplane-type', is_config=True)
    self.__mpls_label_blocks = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="mpls-label-blocks", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__ipv6_prefixes = YANGDynClass(unique=True, base=TypedListType(allowed_type=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=False, yang_name="ipv6-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'segment-routing', 'srgbs', 'srgb', 'config']

  def _get_local_id(self):
    """
    Getter method for local_id, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/config/local_id (string)

    YANG Description: Unique identifier for the segment routing global block on
the local system.
    """
    return self.__local_id
      
  def _set_local_id(self, v, load=False):
    """
    Setter method for local_id, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/config/local_id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_id() directly.

    YANG Description: Unique identifier for the segment routing global block on
the local system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)""",
        })

    self.__local_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_id(self):
    self.__local_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_dataplane_type(self):
    """
    Getter method for dataplane_type, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/config/dataplane_type (oc-srt:sr-dataplane-type)

    YANG Description: The dataplane being used to instantiate the SRGB. When MPLS is specified
the set of MPLS label blocks that are defined in the mpls-label-blocks
list are used to make up the SRGB. When IPv6 is specified, the set of IPv6
prefixes specified in the ipv6-prefixes list are used.
    """
    return self.__dataplane_type
      
  def _set_dataplane_type(self, v, load=False):
    """
    Setter method for dataplane_type, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/config/dataplane_type (oc-srt:sr-dataplane-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dataplane_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dataplane_type() directly.

    YANG Description: The dataplane being used to instantiate the SRGB. When MPLS is specified
the set of MPLS label blocks that are defined in the mpls-label-blocks
list are used to make up the SRGB. When IPv6 is specified, the set of IPv6
prefixes specified in the ipv6-prefixes list are used.
    """
    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={'MPLS': {}, 'IPV6': {}},), is_leaf=True, yang_name="dataplane-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-dataplane-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dataplane_type must be of a type compatible with oc-srt:sr-dataplane-type""",
          'defined-type': "oc-srt:sr-dataplane-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'MPLS': {}, 'IPV6': {}},), is_leaf=True, yang_name="dataplane-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-dataplane-type', is_config=True)""",
        })

    self.__dataplane_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dataplane_type(self):
    self.__dataplane_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'MPLS': {}, 'IPV6': {}},), is_leaf=True, yang_name="dataplane-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-dataplane-type', is_config=True)


  def _get_mpls_label_blocks(self):
    """
    Getter method for mpls_label_blocks, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/config/mpls_label_blocks (leafref)

    YANG Description: A list of refences to the label blocks that are used to make
up the SRGB.
    """
    return self.__mpls_label_blocks
      
  def _set_mpls_label_blocks(self, v, load=False):
    """
    Setter method for mpls_label_blocks, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/config/mpls_label_blocks (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mpls_label_blocks is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mpls_label_blocks() directly.

    YANG Description: A list of refences to the label blocks that are used to make
up the SRGB.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="mpls-label-blocks", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mpls_label_blocks must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="mpls-label-blocks", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__mpls_label_blocks = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mpls_label_blocks(self):
    self.__mpls_label_blocks = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="mpls-label-blocks", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_ipv6_prefixes(self):
    """
    Getter method for ipv6_prefixes, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/config/ipv6_prefixes (inet:ipv6-prefix)

    YANG Description: A list of IPv6 prefixes which are to be used for segment routing using
the IPv6 dataplane.
    """
    return self.__ipv6_prefixes
      
  def _set_ipv6_prefixes(self, v, load=False):
    """
    Setter method for ipv6_prefixes, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/config/ipv6_prefixes (inet:ipv6-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6_prefixes() directly.

    YANG Description: A list of IPv6 prefixes which are to be used for segment routing using
the IPv6 dataplane.
    """
    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_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=False, yang_name="ipv6-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6_prefixes must be of a type compatible with inet:ipv6-prefix""",
          'defined-type': "inet:ipv6-prefix",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=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=False, yang_name="ipv6-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', is_config=True)""",
        })

    self.__ipv6_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6_prefixes(self):
    self.__ipv6_prefixes = YANGDynClass(unique=True, base=TypedListType(allowed_type=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=False, yang_name="ipv6-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', is_config=True)

  local_id = __builtin__.property(_get_local_id, _set_local_id)
  dataplane_type = __builtin__.property(_get_dataplane_type, _set_dataplane_type)
  mpls_label_blocks = __builtin__.property(_get_mpls_label_blocks, _set_mpls_label_blocks)
  ipv6_prefixes = __builtin__.property(_get_ipv6_prefixes, _set_ipv6_prefixes)


  _pyangbind_elements = OrderedDict([('local_id', local_id), ('dataplane_type', dataplane_type), ('mpls_label_blocks', mpls_label_blocks), ('ipv6_prefixes', ipv6_prefixes), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_segment_routing_srgbs_srgb_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/segment-routing/srgbs/srgb/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to the SRGB.
  """
  __slots__ = ('_path_helper', '_extmethods', '__local_id','__dataplane_type','__mpls_label_blocks','__ipv6_prefixes','__size','__used',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__local_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__dataplane_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'MPLS': {}, 'IPV6': {}},), is_leaf=True, yang_name="dataplane-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-dataplane-type', is_config=False)
    self.__mpls_label_blocks = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="mpls-label-blocks", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__ipv6_prefixes = YANGDynClass(unique=True, base=TypedListType(allowed_type=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=False, yang_name="ipv6-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', is_config=False)
    self.__size = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__used = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="used", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'srgbs', 'srgb', 'state']

  def _get_local_id(self):
    """
    Getter method for local_id, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/state/local_id (string)

    YANG Description: Unique identifier for the segment routing global block on
the local system.
    """
    return self.__local_id
      
  def _set_local_id(self, v, load=False):
    """
    Setter method for local_id, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/state/local_id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_id() directly.

    YANG Description: Unique identifier for the segment routing global block on
the local system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__local_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_id(self):
    self.__local_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_dataplane_type(self):
    """
    Getter method for dataplane_type, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/state/dataplane_type (oc-srt:sr-dataplane-type)

    YANG Description: The dataplane being used to instantiate the SRGB. When MPLS is specified
the set of MPLS label blocks that are defined in the mpls-label-blocks
list are used to make up the SRGB. When IPv6 is specified, the set of IPv6
prefixes specified in the ipv6-prefixes list are used.
    """
    return self.__dataplane_type
      
  def _set_dataplane_type(self, v, load=False):
    """
    Setter method for dataplane_type, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/state/dataplane_type (oc-srt:sr-dataplane-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dataplane_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dataplane_type() directly.

    YANG Description: The dataplane being used to instantiate the SRGB. When MPLS is specified
the set of MPLS label blocks that are defined in the mpls-label-blocks
list are used to make up the SRGB. When IPv6 is specified, the set of IPv6
prefixes specified in the ipv6-prefixes list are used.
    """
    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={'MPLS': {}, 'IPV6': {}},), is_leaf=True, yang_name="dataplane-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-dataplane-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dataplane_type must be of a type compatible with oc-srt:sr-dataplane-type""",
          'defined-type': "oc-srt:sr-dataplane-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'MPLS': {}, 'IPV6': {}},), is_leaf=True, yang_name="dataplane-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-dataplane-type', is_config=False)""",
        })

    self.__dataplane_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dataplane_type(self):
    self.__dataplane_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'MPLS': {}, 'IPV6': {}},), is_leaf=True, yang_name="dataplane-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-dataplane-type', is_config=False)


  def _get_mpls_label_blocks(self):
    """
    Getter method for mpls_label_blocks, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/state/mpls_label_blocks (leafref)

    YANG Description: A list of refences to the label blocks that are used to make
up the SRGB.
    """
    return self.__mpls_label_blocks
      
  def _set_mpls_label_blocks(self, v, load=False):
    """
    Setter method for mpls_label_blocks, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/state/mpls_label_blocks (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mpls_label_blocks is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mpls_label_blocks() directly.

    YANG Description: A list of refences to the label blocks that are used to make
up the SRGB.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="mpls-label-blocks", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mpls_label_blocks must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="mpls-label-blocks", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__mpls_label_blocks = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mpls_label_blocks(self):
    self.__mpls_label_blocks = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="mpls-label-blocks", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_ipv6_prefixes(self):
    """
    Getter method for ipv6_prefixes, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/state/ipv6_prefixes (inet:ipv6-prefix)

    YANG Description: A list of IPv6 prefixes which are to be used for segment routing using
the IPv6 dataplane.
    """
    return self.__ipv6_prefixes
      
  def _set_ipv6_prefixes(self, v, load=False):
    """
    Setter method for ipv6_prefixes, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/state/ipv6_prefixes (inet:ipv6-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6_prefixes() directly.

    YANG Description: A list of IPv6 prefixes which are to be used for segment routing using
the IPv6 dataplane.
    """
    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_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=False, yang_name="ipv6-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6_prefixes must be of a type compatible with inet:ipv6-prefix""",
          'defined-type': "inet:ipv6-prefix",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=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=False, yang_name="ipv6-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', is_config=False)""",
        })

    self.__ipv6_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6_prefixes(self):
    self.__ipv6_prefixes = YANGDynClass(unique=True, base=TypedListType(allowed_type=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=False, yang_name="ipv6-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', is_config=False)


  def _get_size(self):
    """
    Getter method for size, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/state/size (uint32)

    YANG Description: The total number of SRGB entries that are available within the SRGB.
    """
    return self.__size
      
  def _set_size(self, v, load=False):
    """
    Setter method for size, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/state/size (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_size is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_size() directly.

    YANG Description: The total number of SRGB entries that are available within the SRGB.
    """
    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="size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """size 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="size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__size = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_size(self):
    self.__size = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_used(self):
    """
    Getter method for used, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/state/used (uint32)

    YANG Description: The total number of SRGB entries that have already been alocated by
protocols referencing the SRGB.
    """
    return self.__used
      
  def _set_used(self, v, load=False):
    """
    Setter method for used, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/state/used (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_used is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_used() directly.

    YANG Description: The total number of SRGB entries that have already been alocated by
protocols referencing the SRGB.
    """
    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="used", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """used 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="used", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__used = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_used(self):
    self.__used = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="used", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  local_id = __builtin__.property(_get_local_id)
  dataplane_type = __builtin__.property(_get_dataplane_type)
  mpls_label_blocks = __builtin__.property(_get_mpls_label_blocks)
  ipv6_prefixes = __builtin__.property(_get_ipv6_prefixes)
  size = __builtin__.property(_get_size)
  used = __builtin__.property(_get_used)


  _pyangbind_elements = OrderedDict([('local_id', local_id), ('dataplane_type', dataplane_type), ('mpls_label_blocks', mpls_label_blocks), ('ipv6_prefixes', ipv6_prefixes), ('size', size), ('used', used), ])


class yc_srgb_openconfig_network_instance__network_instances_network_instance_segment_routing_srgbs_srgb(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/segment-routing/srgbs/srgb. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A single definition of an SRGB which may comprise of multiple
sets of dataplane addresses (IPv6 addresses, or MPLS labels).
  """
  __slots__ = ('_path_helper', '_extmethods', '__local_id','__config','__state',)

  _yang_name = 'srgb'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__local_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_segment_routing_srgbs_srgb_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_segment_routing_srgbs_srgb_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'srgbs', 'srgb']

  def _get_local_id(self):
    """
    Getter method for local_id, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/local_id (leafref)

    YANG Description: A reference to the identifier for the SRGB.
    """
    return self.__local_id
      
  def _set_local_id(self, v, load=False):
    """
    Setter method for local_id, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/local_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_id() directly.

    YANG Description: A reference to the identifier for the SRGB.
    """
    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="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__local_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_id(self):
    self.__local_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/config (container)

    YANG Description: Configuration parameters relating to the SRGB.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/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 SRGB.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_segment_routing_srgbs_srgb_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_segment_routing_srgbs_srgb_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_segment_routing_srgbs_srgb_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/state (container)

    YANG Description: State parameters relating to the SRGB.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/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 parameters relating to the SRGB.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_segment_routing_srgbs_srgb_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_segment_routing_srgbs_srgb_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_segment_routing_srgbs_srgb_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  local_id = __builtin__.property(_get_local_id, _set_local_id)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('local_id', local_id), ('config', config), ('state', state), ])


class yc_srgbs_openconfig_network_instance__network_instances_network_instance_segment_routing_srgbs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/segment-routing/srgbs. 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 the
SRGBs defined for the system.
  """
  __slots__ = ('_path_helper', '_extmethods', '__srgb',)

  _yang_name = 'srgbs'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__srgb = YANGDynClass(base=YANGListType("local_id",yc_srgb_openconfig_network_instance__network_instances_network_instance_segment_routing_srgbs_srgb, yang_name="srgb", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='local-id', extensions=None), is_container='list', yang_name="srgb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'srgbs']

  def _get_srgb(self):
    """
    Getter method for srgb, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb (list)

    YANG Description: A single definition of an SRGB which may comprise of multiple
sets of dataplane addresses (IPv6 addresses, or MPLS labels).
    """
    return self.__srgb
      
  def _set_srgb(self, v, load=False):
    """
    Setter method for srgb, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_srgb is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_srgb() directly.

    YANG Description: A single definition of an SRGB which may comprise of multiple
sets of dataplane addresses (IPv6 addresses, or MPLS labels).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("local_id",yc_srgb_openconfig_network_instance__network_instances_network_instance_segment_routing_srgbs_srgb, yang_name="srgb", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='local-id', extensions=None), is_container='list', yang_name="srgb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """srgb must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("local_id",yc_srgb_openconfig_network_instance__network_instances_network_instance_segment_routing_srgbs_srgb, yang_name="srgb", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='local-id', extensions=None), is_container='list', yang_name="srgb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__srgb = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_srgb(self):
    self.__srgb = YANGDynClass(base=YANGListType("local_id",yc_srgb_openconfig_network_instance__network_instances_network_instance_segment_routing_srgbs_srgb, yang_name="srgb", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='local-id', extensions=None), is_container='list', yang_name="srgb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  srgb = __builtin__.property(_get_srgb, _set_srgb)


  _pyangbind_elements = OrderedDict([('srgb', srgb), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_segment_routing_srlbs_srlb_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/segment-routing/srlbs/srlb/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 SRLB.
  """
  __slots__ = ('_path_helper', '_extmethods', '__local_id','__dataplane_type','__mpls_label_block','__ipv6_prefix',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__local_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__dataplane_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'MPLS': {}, 'IPV6': {}},), is_leaf=True, yang_name="dataplane-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-dataplane-type', is_config=True)
    self.__mpls_label_block = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mpls-label-block", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__ipv6_prefix = 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="ipv6-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'segment-routing', 'srlbs', 'srlb', 'config']

  def _get_local_id(self):
    """
    Getter method for local_id, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/config/local_id (string)

    YANG Description: A unique local identifier used for the Segment Routing Local Block.
The identifier is used when referencing the SRLB within other
contexts.
    """
    return self.__local_id
      
  def _set_local_id(self, v, load=False):
    """
    Setter method for local_id, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/config/local_id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_id() directly.

    YANG Description: A unique local identifier used for the Segment Routing Local Block.
The identifier is used when referencing the SRLB within other
contexts.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)""",
        })

    self.__local_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_id(self):
    self.__local_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_dataplane_type(self):
    """
    Getter method for dataplane_type, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/config/dataplane_type (oc-srt:sr-dataplane-type)

    YANG Description: The dataplane that is to be used for the Segment Routing Local Block.
When MPLS is specified, the local block corresponds to a block of MPLS
labels; when IPv6 is specified it corresponds to an IPv6 prefix.
    """
    return self.__dataplane_type
      
  def _set_dataplane_type(self, v, load=False):
    """
    Setter method for dataplane_type, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/config/dataplane_type (oc-srt:sr-dataplane-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dataplane_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dataplane_type() directly.

    YANG Description: The dataplane that is to be used for the Segment Routing Local Block.
When MPLS is specified, the local block corresponds to a block of MPLS
labels; when IPv6 is specified it corresponds to an IPv6 prefix.
    """
    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={'MPLS': {}, 'IPV6': {}},), is_leaf=True, yang_name="dataplane-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-dataplane-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dataplane_type must be of a type compatible with oc-srt:sr-dataplane-type""",
          'defined-type': "oc-srt:sr-dataplane-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'MPLS': {}, 'IPV6': {}},), is_leaf=True, yang_name="dataplane-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-dataplane-type', is_config=True)""",
        })

    self.__dataplane_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dataplane_type(self):
    self.__dataplane_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'MPLS': {}, 'IPV6': {}},), is_leaf=True, yang_name="dataplane-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-dataplane-type', is_config=True)


  def _get_mpls_label_block(self):
    """
    Getter method for mpls_label_block, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/config/mpls_label_block (leafref)

    YANG Description: A reference to the MPLS label block that is used to contain the
SIDs of the SRLB.
    """
    return self.__mpls_label_block
      
  def _set_mpls_label_block(self, v, load=False):
    """
    Setter method for mpls_label_block, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/config/mpls_label_block (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mpls_label_block is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mpls_label_block() directly.

    YANG Description: A reference to the MPLS label block that is used to contain the
SIDs of the SRLB.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="mpls-label-block", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mpls_label_block must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mpls-label-block", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__mpls_label_block = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mpls_label_block(self):
    self.__mpls_label_block = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mpls-label-block", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_ipv6_prefix(self):
    """
    Getter method for ipv6_prefix, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/config/ipv6_prefix (inet:ipv6-prefix)

    YANG Description: The IPv6 prefix that is used for the SRLB.
    """
    return self.__ipv6_prefix
      
  def _set_ipv6_prefix(self, v, load=False):
    """
    Setter method for ipv6_prefix, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/config/ipv6_prefix (inet:ipv6-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6_prefix() directly.

    YANG Description: The IPv6 prefix that is used for the SRLB.
    """
    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="ipv6-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6_prefix must be of a type compatible with inet:ipv6-prefix""",
          'defined-type': "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="ipv6-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', is_config=True)""",
        })

    self.__ipv6_prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6_prefix(self):
    self.__ipv6_prefix = 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="ipv6-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', is_config=True)

  local_id = __builtin__.property(_get_local_id, _set_local_id)
  dataplane_type = __builtin__.property(_get_dataplane_type, _set_dataplane_type)
  mpls_label_block = __builtin__.property(_get_mpls_label_block, _set_mpls_label_block)
  ipv6_prefix = __builtin__.property(_get_ipv6_prefix, _set_ipv6_prefix)


  _pyangbind_elements = OrderedDict([('local_id', local_id), ('dataplane_type', dataplane_type), ('mpls_label_block', mpls_label_block), ('ipv6_prefix', ipv6_prefix), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_segment_routing_srlbs_srlb_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/segment-routing/srlbs/srlb/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parmeters relating to the SRLB.
  """
  __slots__ = ('_path_helper', '_extmethods', '__local_id','__dataplane_type','__mpls_label_block','__ipv6_prefix',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__local_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__dataplane_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'MPLS': {}, 'IPV6': {}},), is_leaf=True, yang_name="dataplane-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-dataplane-type', is_config=False)
    self.__mpls_label_block = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mpls-label-block", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__ipv6_prefix = 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="ipv6-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', 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 ['network-instances', 'network-instance', 'segment-routing', 'srlbs', 'srlb', 'state']

  def _get_local_id(self):
    """
    Getter method for local_id, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/state/local_id (string)

    YANG Description: A unique local identifier used for the Segment Routing Local Block.
The identifier is used when referencing the SRLB within other
contexts.
    """
    return self.__local_id
      
  def _set_local_id(self, v, load=False):
    """
    Setter method for local_id, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/state/local_id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_id() directly.

    YANG Description: A unique local identifier used for the Segment Routing Local Block.
The identifier is used when referencing the SRLB within other
contexts.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__local_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_id(self):
    self.__local_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_dataplane_type(self):
    """
    Getter method for dataplane_type, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/state/dataplane_type (oc-srt:sr-dataplane-type)

    YANG Description: The dataplane that is to be used for the Segment Routing Local Block.
When MPLS is specified, the local block corresponds to a block of MPLS
labels; when IPv6 is specified it corresponds to an IPv6 prefix.
    """
    return self.__dataplane_type
      
  def _set_dataplane_type(self, v, load=False):
    """
    Setter method for dataplane_type, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/state/dataplane_type (oc-srt:sr-dataplane-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dataplane_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dataplane_type() directly.

    YANG Description: The dataplane that is to be used for the Segment Routing Local Block.
When MPLS is specified, the local block corresponds to a block of MPLS
labels; when IPv6 is specified it corresponds to an IPv6 prefix.
    """
    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={'MPLS': {}, 'IPV6': {}},), is_leaf=True, yang_name="dataplane-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-dataplane-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dataplane_type must be of a type compatible with oc-srt:sr-dataplane-type""",
          'defined-type': "oc-srt:sr-dataplane-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'MPLS': {}, 'IPV6': {}},), is_leaf=True, yang_name="dataplane-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-dataplane-type', is_config=False)""",
        })

    self.__dataplane_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dataplane_type(self):
    self.__dataplane_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'MPLS': {}, 'IPV6': {}},), is_leaf=True, yang_name="dataplane-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-dataplane-type', is_config=False)


  def _get_mpls_label_block(self):
    """
    Getter method for mpls_label_block, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/state/mpls_label_block (leafref)

    YANG Description: A reference to the MPLS label block that is used to contain the
SIDs of the SRLB.
    """
    return self.__mpls_label_block
      
  def _set_mpls_label_block(self, v, load=False):
    """
    Setter method for mpls_label_block, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/state/mpls_label_block (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mpls_label_block is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mpls_label_block() directly.

    YANG Description: A reference to the MPLS label block that is used to contain the
SIDs of the SRLB.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="mpls-label-block", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mpls_label_block must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mpls-label-block", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__mpls_label_block = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mpls_label_block(self):
    self.__mpls_label_block = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mpls-label-block", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_ipv6_prefix(self):
    """
    Getter method for ipv6_prefix, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/state/ipv6_prefix (inet:ipv6-prefix)

    YANG Description: The IPv6 prefix that is used for the SRLB.
    """
    return self.__ipv6_prefix
      
  def _set_ipv6_prefix(self, v, load=False):
    """
    Setter method for ipv6_prefix, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/state/ipv6_prefix (inet:ipv6-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6_prefix() directly.

    YANG Description: The IPv6 prefix that is used for the SRLB.
    """
    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="ipv6-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6_prefix must be of a type compatible with inet:ipv6-prefix""",
          'defined-type': "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="ipv6-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', is_config=False)""",
        })

    self.__ipv6_prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6_prefix(self):
    self.__ipv6_prefix = 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="ipv6-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', is_config=False)

  local_id = __builtin__.property(_get_local_id)
  dataplane_type = __builtin__.property(_get_dataplane_type)
  mpls_label_block = __builtin__.property(_get_mpls_label_block)
  ipv6_prefix = __builtin__.property(_get_ipv6_prefix)


  _pyangbind_elements = OrderedDict([('local_id', local_id), ('dataplane_type', dataplane_type), ('mpls_label_block', mpls_label_block), ('ipv6_prefix', ipv6_prefix), ])


class yc_srlb_openconfig_network_instance__network_instances_network_instance_segment_routing_srlbs_srlb(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/segment-routing/srlbs/srlb. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A definition of a Segment Routing Local Block, defined to be
a set of Segment Identifiers (specified as MPLS labels or
IPv6 addreses) that are defined for local allocation by the
system. A block may optionally be advertised into an IGP.
  """
  __slots__ = ('_path_helper', '_extmethods', '__local_id','__config','__state',)

  _yang_name = 'srlb'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__local_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_segment_routing_srlbs_srlb_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_segment_routing_srlbs_srlb_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'srlbs', 'srlb']

  def _get_local_id(self):
    """
    Getter method for local_id, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/local_id (leafref)

    YANG Description: Reference to the local identifier used for the SRLB.
    """
    return self.__local_id
      
  def _set_local_id(self, v, load=False):
    """
    Setter method for local_id, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/local_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_id() directly.

    YANG Description: Reference to the local identifier used for the SRLB.
    """
    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="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__local_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_id(self):
    self.__local_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/config (container)

    YANG Description: Configuration parameters relating to the SRLB.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/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 SRLB.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_segment_routing_srlbs_srlb_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_segment_routing_srlbs_srlb_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_segment_routing_srlbs_srlb_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/state (container)

    YANG Description: Operational state parmeters relating to the SRLB.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/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 parmeters relating to the SRLB.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_segment_routing_srlbs_srlb_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_segment_routing_srlbs_srlb_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_segment_routing_srlbs_srlb_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  local_id = __builtin__.property(_get_local_id, _set_local_id)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('local_id', local_id), ('config', config), ('state', state), ])


class yc_srlbs_openconfig_network_instance__network_instances_network_instance_segment_routing_srlbs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/segment-routing/srlbs. 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 the
Segment Routing Local Blocks (SRLBs) defined for the system.
  """
  __slots__ = ('_path_helper', '_extmethods', '__srlb',)

  _yang_name = 'srlbs'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__srlb = YANGDynClass(base=YANGListType("local_id",yc_srlb_openconfig_network_instance__network_instances_network_instance_segment_routing_srlbs_srlb, yang_name="srlb", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='local-id', extensions=None), is_container='list', yang_name="srlb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'srlbs']

  def _get_srlb(self):
    """
    Getter method for srlb, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb (list)

    YANG Description: A definition of a Segment Routing Local Block, defined to be
a set of Segment Identifiers (specified as MPLS labels or
IPv6 addreses) that are defined for local allocation by the
system. A block may optionally be advertised into an IGP.
    """
    return self.__srlb
      
  def _set_srlb(self, v, load=False):
    """
    Setter method for srlb, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_srlb is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_srlb() directly.

    YANG Description: A definition of a Segment Routing Local Block, defined to be
a set of Segment Identifiers (specified as MPLS labels or
IPv6 addreses) that are defined for local allocation by the
system. A block may optionally be advertised into an IGP.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("local_id",yc_srlb_openconfig_network_instance__network_instances_network_instance_segment_routing_srlbs_srlb, yang_name="srlb", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='local-id', extensions=None), is_container='list', yang_name="srlb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """srlb must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("local_id",yc_srlb_openconfig_network_instance__network_instances_network_instance_segment_routing_srlbs_srlb, yang_name="srlb", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='local-id', extensions=None), is_container='list', yang_name="srlb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__srlb = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_srlb(self):
    self.__srlb = YANGDynClass(base=YANGListType("local_id",yc_srlb_openconfig_network_instance__network_instances_network_instance_segment_routing_srlbs_srlb, yang_name="srlb", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='local-id', extensions=None), is_container='list', yang_name="srlb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  srlb = __builtin__.property(_get_srlb, _set_srlb)


  _pyangbind_elements = OrderedDict([('srlb', srlb), ])


class yc_counters_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_state_counters(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/segment-routing/te-policies/te-policy/state/counters. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A collection of counters on the policy level. They
count the total traffic forwarded by the policy,
regardless of its installation source. The counters
should be persistent across policy state changes and
switches between active protocols.
  """
  __slots__ = ('_path_helper', '_extmethods', '__in_pkts','__in_octets','__in_labeled_pkts','__in_labeled_octets','__out_pkts','__out_octets','__out_labeled_pkts','__out_labeled_octets',)

  _yang_name = 'counters'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__in_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    self.__in_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    self.__in_labeled_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-labeled-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    self.__in_labeled_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-labeled-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    self.__out_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    self.__out_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    self.__out_labeled_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-labeled-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    self.__out_labeled_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-labeled-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'te-policies', 'te-policy', 'state', 'counters']

  def _get_in_pkts(self):
    """
    Getter method for in_pkts, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/counters/in_pkts (oc-yang:counter64)

    YANG Description: A cumulative counter of the incoming packets steered to
the SR-TE policy. It includes both labeled and unlabeled
steered traffic.
    """
    return self.__in_pkts
      
  def _set_in_pkts(self, v, load=False):
    """
    Setter method for in_pkts, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/counters/in_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_pkts() directly.

    YANG Description: A cumulative counter of the incoming packets steered to
the SR-TE policy. It includes both labeled and unlabeled
steered traffic.
    """
    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="in-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_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="in-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__in_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_pkts(self):
    self.__in_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_in_octets(self):
    """
    Getter method for in_octets, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/counters/in_octets (oc-yang:counter64)

    YANG Description: The cumulative counter of the total incoming bytes steered
to the SR-TE policy. It includes both labeled and unlabeled
steered traffic.
    """
    return self.__in_octets
      
  def _set_in_octets(self, v, load=False):
    """
    Setter method for in_octets, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/counters/in_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_octets() directly.

    YANG Description: The cumulative counter of the total incoming bytes steered
to the SR-TE policy. It includes both labeled and unlabeled
steered traffic.
    """
    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="in-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_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="in-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__in_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_octets(self):
    self.__in_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_in_labeled_pkts(self):
    """
    Getter method for in_labeled_pkts, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/counters/in_labeled_pkts (oc-yang:counter64)

    YANG Description: A cumulative counter of the incoming labeled packets steered
to the SR-TE policy. Labeled packets carries an active SID
(top-most SID in the stack) that matches the BSID associated
to this policy.
    """
    return self.__in_labeled_pkts
      
  def _set_in_labeled_pkts(self, v, load=False):
    """
    Setter method for in_labeled_pkts, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/counters/in_labeled_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_labeled_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_labeled_pkts() directly.

    YANG Description: A cumulative counter of the incoming labeled packets steered
to the SR-TE policy. Labeled packets carries an active SID
(top-most SID in the stack) that matches the BSID associated
to this policy.
    """
    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="in-labeled-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_labeled_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="in-labeled-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__in_labeled_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_labeled_pkts(self):
    self.__in_labeled_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-labeled-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_in_labeled_octets(self):
    """
    Getter method for in_labeled_octets, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/counters/in_labeled_octets (oc-yang:counter64)

    YANG Description: A cumulative counter of the total bytes of incoming labeled
traffic steered to the SR-TE policy. Labeled traffic carries
an active SID (top-most SID in the stack) that matches the
BSID associated to this policy.
    """
    return self.__in_labeled_octets
      
  def _set_in_labeled_octets(self, v, load=False):
    """
    Setter method for in_labeled_octets, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/counters/in_labeled_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_labeled_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_labeled_octets() directly.

    YANG Description: A cumulative counter of the total bytes of incoming labeled
traffic steered to the SR-TE policy. Labeled traffic carries
an active SID (top-most SID in the stack) that matches the
BSID associated to this policy.
    """
    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="in-labeled-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_labeled_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="in-labeled-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__in_labeled_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_labeled_octets(self):
    self.__in_labeled_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-labeled-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_out_pkts(self):
    """
    Getter method for out_pkts, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/counters/out_pkts (oc-yang:counter64)

    YANG Description: A cumulative counter of the outgoing packets after being
steered to the SR-TE policy. It includes both labeled and
unlabeled steered traffic.
    """
    return self.__out_pkts
      
  def _set_out_pkts(self, v, load=False):
    """
    Setter method for out_pkts, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/counters/out_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_pkts() directly.

    YANG Description: A cumulative counter of the outgoing packets after being
steered to the SR-TE policy. It includes both labeled and
unlabeled steered traffic.
    """
    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="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_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="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__out_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_pkts(self):
    self.__out_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_out_octets(self):
    """
    Getter method for out_octets, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/counters/out_octets (oc-yang:counter64)

    YANG Description: The cumulative counter of the total outgoing bytes after
being steered to the SR-TE policy. It includes both labeled
and unlabeled steered traffic. The counter should include the
segments pushed to packets.
    """
    return self.__out_octets
      
  def _set_out_octets(self, v, load=False):
    """
    Setter method for out_octets, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/counters/out_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_octets() directly.

    YANG Description: The cumulative counter of the total outgoing bytes after
being steered to the SR-TE policy. It includes both labeled
and unlabeled steered traffic. The counter should include the
segments pushed to packets.
    """
    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="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_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="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__out_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_octets(self):
    self.__out_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_out_labeled_pkts(self):
    """
    Getter method for out_labeled_pkts, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/counters/out_labeled_pkts (oc-yang:counter64)

    YANG Description: A cumulative counter of the outgoing labeled packets after
being steered to the SR-TE policy. Labeled packets carries
an active SID (top-most SID in the stack) that matches the
BSID associated to this policy.
    """
    return self.__out_labeled_pkts
      
  def _set_out_labeled_pkts(self, v, load=False):
    """
    Setter method for out_labeled_pkts, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/counters/out_labeled_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_labeled_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_labeled_pkts() directly.

    YANG Description: A cumulative counter of the outgoing labeled packets after
being steered to the SR-TE policy. Labeled packets carries
an active SID (top-most SID in the stack) that matches the
BSID associated to this policy.
    """
    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="out-labeled-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_labeled_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="out-labeled-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__out_labeled_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_labeled_pkts(self):
    self.__out_labeled_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-labeled-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_out_labeled_octets(self):
    """
    Getter method for out_labeled_octets, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/counters/out_labeled_octets (oc-yang:counter64)

    YANG Description: A cumulative counter of the total bytes of outgoing labeled
traffic after being steered to the SR-TE policy. Labeled
traffic carries an active SID (top-most SID in the stack) that
matches the BSID associated to this policy. The counter should
include the segments pushed to packets.
    """
    return self.__out_labeled_octets
      
  def _set_out_labeled_octets(self, v, load=False):
    """
    Setter method for out_labeled_octets, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/counters/out_labeled_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_labeled_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_labeled_octets() directly.

    YANG Description: A cumulative counter of the total bytes of outgoing labeled
traffic after being steered to the SR-TE policy. Labeled
traffic carries an active SID (top-most SID in the stack) that
matches the BSID associated to this policy. The counter should
include the segments pushed to packets.
    """
    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="out-labeled-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_labeled_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="out-labeled-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__out_labeled_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_labeled_octets(self):
    self.__out_labeled_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-labeled-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)

  in_pkts = __builtin__.property(_get_in_pkts)
  in_octets = __builtin__.property(_get_in_octets)
  in_labeled_pkts = __builtin__.property(_get_in_labeled_pkts)
  in_labeled_octets = __builtin__.property(_get_in_labeled_octets)
  out_pkts = __builtin__.property(_get_out_pkts)
  out_octets = __builtin__.property(_get_out_octets)
  out_labeled_pkts = __builtin__.property(_get_out_labeled_pkts)
  out_labeled_octets = __builtin__.property(_get_out_labeled_octets)


  _pyangbind_elements = OrderedDict([('in_pkts', in_pkts), ('in_octets', in_octets), ('in_labeled_pkts', in_labeled_pkts), ('in_labeled_octets', in_labeled_octets), ('out_pkts', out_pkts), ('out_octets', out_octets), ('out_labeled_pkts', out_labeled_pkts), ('out_labeled_octets', out_labeled_octets), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/segment-routing/te-policies/te-policy/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The operational state of parameters associated with
SR-TE policies.
  """
  __slots__ = ('_path_helper', '_extmethods', '__color','__endpoint','__name','__bsid','__active','__active_since','__active_transitions','__counters',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__color = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__endpoint = 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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:srte-endpoint-type', is_config=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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__bsid = 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': {}},),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}|:))'}),], is_leaf=True, yang_name="bsid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-sid-type', is_config=False)
    self.__active = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="active", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__active_since = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="active-since", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__active_transitions = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="active-transitions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'te-policies', 'te-policy', 'state']

  def _get_color(self):
    """
    Getter method for color, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/color (uint32)

    YANG Description: When the policy is used for RIB resolution to a specific
Segment Routing Traffic Engineering path, the policy is used
when the color required in the policy (which may be specified
based on the value of a BGP extended colour community) matches
the value of this leaf. The color being set to 0 indicates
that the colour is a wildcard in the policy resolution.
    """
    return self.__color
      
  def _set_color(self, v, load=False):
    """
    Setter method for color, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/color (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_color is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_color() directly.

    YANG Description: When the policy is used for RIB resolution to a specific
Segment Routing Traffic Engineering path, the policy is used
when the color required in the policy (which may be specified
based on the value of a BGP extended colour community) matches
the value of this leaf. The color being set to 0 indicates
that the colour is a wildcard in the policy resolution.
    """
    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="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """color 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="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__color = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_color(self):
    self.__color = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_endpoint(self):
    """
    Getter method for endpoint, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/endpoint (oc-srt:srte-endpoint-type)

    YANG Description: When the policy is used for RIB resolution to a Segment
Routing Traffic Engineering path, the policy is used when the
required endpoint (which may be the protocol next-hop) matches
the endpoint address specified in this leaf. When the leaf is
set to all zeros (0.0.0.0 or ::), the endpoint acts as a
wildcard in the policy resolution.
    """
    return self.__endpoint
      
  def _set_endpoint(self, v, load=False):
    """
    Setter method for endpoint, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/endpoint (oc-srt:srte-endpoint-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint() directly.

    YANG Description: When the policy is used for RIB resolution to a Segment
Routing Traffic Engineering path, the policy is used when the
required endpoint (which may be the protocol next-hop) matches
the endpoint address specified in this leaf. When the leaf is
set to all zeros (0.0.0.0 or ::), the endpoint acts as a
wildcard in the policy resolution.
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:srte-endpoint-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """endpoint must be of a type compatible with oc-srt:srte-endpoint-type""",
          'defined-type': "oc-srt:srte-endpoint-type",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:srte-endpoint-type', is_config=False)""",
        })

    self.__endpoint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_endpoint(self):
    self.__endpoint = 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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:srte-endpoint-type', is_config=False)


  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/name (string)

    YANG Description: The user friendly SR-TE policy name.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_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: The user friendly SR-TE policy name.
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_bsid(self):
    """
    Getter method for bsid, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/bsid (oc-srt:sr-sid-type)

    YANG Description: The Binding SID (BSID) assigned to the SR-TE policy,
expressed as an MPLS label or IPv6 address. Packets that are
ingress to the system with active segment matching the SID
value specified in this leaf should be forwarded according
to the policy. The specified Binding SID must be removed
from the segment list by the system.
    """
    return self.__bsid
      
  def _set_bsid(self, v, load=False):
    """
    Setter method for bsid, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/bsid (oc-srt:sr-sid-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bsid is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bsid() directly.

    YANG Description: The Binding SID (BSID) assigned to the SR-TE policy,
expressed as an MPLS label or IPv6 address. Packets that are
ingress to the system with active segment matching the SID
value specified in this leaf should be forwarded according
to the policy. The specified Binding SID must be removed
from the segment list by the system.
    """
    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': {}},),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}|:))'}),], is_leaf=True, yang_name="bsid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-sid-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bsid must be of a type compatible with oc-srt:sr-sid-type""",
          'defined-type': "oc-srt:sr-sid-type",
          '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': {}},),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}|:))'}),], is_leaf=True, yang_name="bsid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-sid-type', is_config=False)""",
        })

    self.__bsid = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bsid(self):
    self.__bsid = 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': {}},),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}|:))'}),], is_leaf=True, yang_name="bsid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-sid-type', is_config=False)


  def _get_active(self):
    """
    Getter method for active, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/active (boolean)

    YANG Description: A SR-TE policy is marked as active when at least one of its
candidate paths is valid/active and the policy has been
instantiated in the forwarding plane.
    """
    return self.__active
      
  def _set_active(self, v, load=False):
    """
    Setter method for active, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/active (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_active is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_active() directly.

    YANG Description: A SR-TE policy is marked as active when at least one of its
candidate paths is valid/active and the policy has been
instantiated in the forwarding plane.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="active", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """active must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="active", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__active = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_active(self):
    self.__active = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="active", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_active_since(self):
    """
    Getter method for active_since, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/active_since (oc-types:timeticks64)

    YANG Description: Indication of the time the policy transitioned to the active
state.

The value is the timestamp in nanoseconds relative to the Unix
Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    return self.__active_since
      
  def _set_active_since(self, v, load=False):
    """
    Setter method for active_since, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/active_since (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_active_since is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_active_since() directly.

    YANG Description: Indication of the time the policy transitioned to the active
state.

The value is the timestamp in nanoseconds relative to the Unix
Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    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="active-since", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """active_since must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="active-since", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__active_since = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_active_since(self):
    self.__active_since = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="active-since", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_active_transitions(self):
    """
    Getter method for active_transitions, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/active_transitions (oc-yang:counter64)

    YANG Description: The number of transitions to active state for the policy.
    """
    return self.__active_transitions
      
  def _set_active_transitions(self, v, load=False):
    """
    Setter method for active_transitions, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/active_transitions (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_active_transitions is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_active_transitions() directly.

    YANG Description: The number of transitions to active state for the policy.
    """
    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="active-transitions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """active_transitions 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="active-transitions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__active_transitions = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_active_transitions(self):
    self.__active_transitions = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="active-transitions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_counters(self):
    """
    Getter method for counters, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/counters (container)

    YANG Description: A collection of counters on the policy level. They
count the total traffic forwarded by the policy,
regardless of its installation source. The counters
should be persistent across policy state changes and
switches between active protocols.
    """
    return self.__counters
      
  def _set_counters(self, v, load=False):
    """
    Setter method for counters, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/counters (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_counters is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_counters() directly.

    YANG Description: A collection of counters on the policy level. They
count the total traffic forwarded by the policy,
regardless of its installation source. The counters
should be persistent across policy state changes and
switches between active protocols.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_counters_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """counters must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__counters = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_counters(self):
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  color = __builtin__.property(_get_color)
  endpoint = __builtin__.property(_get_endpoint)
  name = __builtin__.property(_get_name)
  bsid = __builtin__.property(_get_bsid)
  active = __builtin__.property(_get_active)
  active_since = __builtin__.property(_get_active_since)
  active_transitions = __builtin__.property(_get_active_transitions)
  counters = __builtin__.property(_get_counters)


  _pyangbind_elements = OrderedDict([('color', color), ('endpoint', endpoint), ('name', name), ('bsid', bsid), ('active', active), ('active_since', active_since), ('active_transitions', active_transitions), ('counters', counters), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/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 SR-TE
candidate paths.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__protocol_origin','__originator_asn','__originator_addr','__discriminator','__preference','__enlp','__valid','__active','__active_since','__active_transitions',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__protocol_origin = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PCEP': {'value': 10}, 'BGP': {'value': 20}, 'CONFIG': {'value': 30}},), is_leaf=True, yang_name="protocol-origin", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:srte-protocol-type', is_config=False)
    self.__originator_asn = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="originator-asn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__originator_addr = 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}|:))'}), is_leaf=True, yang_name="originator-addr", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-address', is_config=False)
    self.__discriminator = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="discriminator", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__enlp = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PUSH_IPV4_EXPLICIT_NULL': {}, 'PUSH_IPV6_EXPLICIT_NULL': {}, 'PUSH_IPV46_EXPLICIT_NULL': {}, 'NO_EXPLICIT_NULL': {}},), is_leaf=True, yang_name="enlp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:enlp-type', is_config=False)
    self.__valid = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__active = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="active", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__active_since = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="active-since", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__active_transitions = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="active-transitions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'te-policies', 'te-policy', 'candidate-paths', 'candidate-path', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/name (string)

    YANG Description: The user friendly SR-TE candidate path name.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/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: The user friendly SR-TE candidate path name.
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_protocol_origin(self):
    """
    Getter method for protocol_origin, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/protocol_origin (oc-srt:srte-protocol-type)

    YANG Description: The component or protocol that originates or signals the
candidate path.
    """
    return self.__protocol_origin
      
  def _set_protocol_origin(self, v, load=False):
    """
    Setter method for protocol_origin, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/protocol_origin (oc-srt:srte-protocol-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_protocol_origin is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_protocol_origin() directly.

    YANG Description: The component or protocol that originates or signals the
candidate path.
    """
    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={'PCEP': {'value': 10}, 'BGP': {'value': 20}, 'CONFIG': {'value': 30}},), is_leaf=True, yang_name="protocol-origin", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:srte-protocol-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """protocol_origin must be of a type compatible with oc-srt:srte-protocol-type""",
          'defined-type': "oc-srt:srte-protocol-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PCEP': {'value': 10}, 'BGP': {'value': 20}, 'CONFIG': {'value': 30}},), is_leaf=True, yang_name="protocol-origin", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:srte-protocol-type', is_config=False)""",
        })

    self.__protocol_origin = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_protocol_origin(self):
    self.__protocol_origin = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PCEP': {'value': 10}, 'BGP': {'value': 20}, 'CONFIG': {'value': 30}},), is_leaf=True, yang_name="protocol-origin", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:srte-protocol-type', is_config=False)


  def _get_originator_asn(self):
    """
    Getter method for originator_asn, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/originator_asn (uint32)

    YANG Description: The autonomous system that node originating the candidate
path locates.
    """
    return self.__originator_asn
      
  def _set_originator_asn(self, v, load=False):
    """
    Setter method for originator_asn, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/originator_asn (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_originator_asn is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_originator_asn() directly.

    YANG Description: The autonomous system that node originating the candidate
path locates.
    """
    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="originator-asn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """originator_asn 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="originator-asn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__originator_asn = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_originator_asn(self):
    self.__originator_asn = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="originator-asn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_originator_addr(self):
    """
    Getter method for originator_addr, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/originator_addr (oc-inet:ipv6-address)

    YANG Description: The address of the node originating the candidate path.
Address in IPv4 can be represented as IPv6-encoded-IPv4 e.g.
::FFFF:192.168.1.2 or a normal IPv6 address with the lowest
32 bits carrying the actual IPv4 address.
    """
    return self.__originator_addr
      
  def _set_originator_addr(self, v, load=False):
    """
    Setter method for originator_addr, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/originator_addr (oc-inet:ipv6-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_originator_addr is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_originator_addr() directly.

    YANG Description: The address of the node originating the candidate path.
Address in IPv4 can be represented as IPv6-encoded-IPv4 e.g.
::FFFF:192.168.1.2 or a normal IPv6 address with the lowest
32 bits carrying the actual IPv4 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]{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}|:))'}), is_leaf=True, yang_name="originator-addr", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """originator_addr must be of a type compatible with oc-inet:ipv6-address""",
          'defined-type': "oc-inet:ipv6-address",
          '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}|:))'}), is_leaf=True, yang_name="originator-addr", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-address', is_config=False)""",
        })

    self.__originator_addr = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_originator_addr(self):
    self.__originator_addr = 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}|:))'}), is_leaf=True, yang_name="originator-addr", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-address', is_config=False)


  def _get_discriminator(self):
    """
    Getter method for discriminator, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/discriminator (uint32)

    YANG Description: A 32 bit value uniquely identifying the path within the
context of a policy learnt from a protocol.
    """
    return self.__discriminator
      
  def _set_discriminator(self, v, load=False):
    """
    Setter method for discriminator, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/discriminator (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_discriminator is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_discriminator() directly.

    YANG Description: A 32 bit value uniquely identifying the path within the
context of a policy learnt from a protocol.
    """
    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="discriminator", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """discriminator 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="discriminator", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__discriminator = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_discriminator(self):
    self.__discriminator = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="discriminator", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_preference(self):
    """
    Getter method for preference, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/preference (uint32)

    YANG Description: When there are multiple candidate paths specified a
particular SR-TE policy. The preference is used to resolve
between them. And the one with higher preference is
preferred.
These paths may be learnt from a dynamic routing protocol,
or interface to the device, or from other static entries
configured on the system.
    """
    return self.__preference
      
  def _set_preference(self, v, load=False):
    """
    Setter method for preference, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/preference (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_preference is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_preference() directly.

    YANG Description: When there are multiple candidate paths specified a
particular SR-TE policy. The preference is used to resolve
between them. And the one with higher preference is
preferred.
These paths may be learnt from a dynamic routing protocol,
or interface to the device, or from other static entries
configured on the system.
    """
    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="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """preference 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="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__preference = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_preference(self):
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_enlp(self):
    """
    Getter method for enlp, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/enlp (oc-srt:enlp-type)

    YANG Description: ENLP (Explicit NULL Label Policy) indicates whether Explicit
NULL labels are to be pushed on unlabeled IP packets that are
being steered into a given SR policy.
    """
    return self.__enlp
      
  def _set_enlp(self, v, load=False):
    """
    Setter method for enlp, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/enlp (oc-srt:enlp-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enlp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enlp() directly.

    YANG Description: ENLP (Explicit NULL Label Policy) indicates whether Explicit
NULL labels are to be pushed on unlabeled IP packets that are
being steered into a given SR 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={'PUSH_IPV4_EXPLICIT_NULL': {}, 'PUSH_IPV6_EXPLICIT_NULL': {}, 'PUSH_IPV46_EXPLICIT_NULL': {}, 'NO_EXPLICIT_NULL': {}},), is_leaf=True, yang_name="enlp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:enlp-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enlp must be of a type compatible with oc-srt:enlp-type""",
          'defined-type': "oc-srt:enlp-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PUSH_IPV4_EXPLICIT_NULL': {}, 'PUSH_IPV6_EXPLICIT_NULL': {}, 'PUSH_IPV46_EXPLICIT_NULL': {}, 'NO_EXPLICIT_NULL': {}},), is_leaf=True, yang_name="enlp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:enlp-type', is_config=False)""",
        })

    self.__enlp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enlp(self):
    self.__enlp = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PUSH_IPV4_EXPLICIT_NULL': {}, 'PUSH_IPV6_EXPLICIT_NULL': {}, 'PUSH_IPV46_EXPLICIT_NULL': {}, 'NO_EXPLICIT_NULL': {}},), is_leaf=True, yang_name="enlp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:enlp-type', is_config=False)


  def _get_valid(self):
    """
    Getter method for valid, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/valid (boolean)

    YANG Description: A path should be marked as valid when it is usable e.g. the
at least one segment-list is valid even though the path may
not be the best.
    """
    return self.__valid
      
  def _set_valid(self, v, load=False):
    """
    Setter method for valid, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/valid (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_valid is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_valid() directly.

    YANG Description: A path should be marked as valid when it is usable e.g. the
at least one segment-list is valid even though the path may
not be the best.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="valid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """valid must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__valid = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_valid(self):
    self.__valid = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_active(self):
    """
    Getter method for active, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/active (boolean)

    YANG Description: A candidate path is active when it is valid and it is
determined to be the best path of the SR-TE Policy.
    """
    return self.__active
      
  def _set_active(self, v, load=False):
    """
    Setter method for active, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/active (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_active is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_active() directly.

    YANG Description: A candidate path is active when it is valid and it is
determined to be the best path of the SR-TE Policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="active", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """active must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="active", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__active = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_active(self):
    self.__active = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="active", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_active_since(self):
    """
    Getter method for active_since, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/active_since (oc-types:timeticks64)

    YANG Description: Indication of the time the path transitioned to the active
state.

The value is the timestamp in nanoseconds relative to the
Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    return self.__active_since
      
  def _set_active_since(self, v, load=False):
    """
    Setter method for active_since, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/active_since (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_active_since is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_active_since() directly.

    YANG Description: Indication of the time the path transitioned to the active
state.

The value is the timestamp in nanoseconds relative to the
Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    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="active-since", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """active_since must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="active-since", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__active_since = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_active_since(self):
    self.__active_since = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="active-since", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_active_transitions(self):
    """
    Getter method for active_transitions, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/active_transitions (oc-yang:counter64)

    YANG Description: The number of transitions to active state for the candidate
path.
    """
    return self.__active_transitions
      
  def _set_active_transitions(self, v, load=False):
    """
    Setter method for active_transitions, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/active_transitions (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_active_transitions is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_active_transitions() directly.

    YANG Description: The number of transitions to active state for the candidate
path.
    """
    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="active-transitions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """active_transitions 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="active-transitions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__active_transitions = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_active_transitions(self):
    self.__active_transitions = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="active-transitions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)

  name = __builtin__.property(_get_name)
  protocol_origin = __builtin__.property(_get_protocol_origin)
  originator_asn = __builtin__.property(_get_originator_asn)
  originator_addr = __builtin__.property(_get_originator_addr)
  discriminator = __builtin__.property(_get_discriminator)
  preference = __builtin__.property(_get_preference)
  enlp = __builtin__.property(_get_enlp)
  valid = __builtin__.property(_get_valid)
  active = __builtin__.property(_get_active)
  active_since = __builtin__.property(_get_active_since)
  active_transitions = __builtin__.property(_get_active_transitions)


  _pyangbind_elements = OrderedDict([('name', name), ('protocol_origin', protocol_origin), ('originator_asn', originator_asn), ('originator_addr', originator_addr), ('discriminator', discriminator), ('preference', preference), ('enlp', enlp), ('valid', valid), ('active', active), ('active_since', active_since), ('active_transitions', active_transitions), ])


class yc_counters_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_state_counters(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/state/counters. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The counters of traffic steered to the segment-list.
  """
  __slots__ = ('_path_helper', '_extmethods', '__out_pkts','__out_octets','__out_labeled_pkts','__out_labeled_octets',)

  _yang_name = 'counters'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__out_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    self.__out_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    self.__out_labeled_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-labeled-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    self.__out_labeled_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-labeled-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'te-policies', 'te-policy', 'candidate-paths', 'candidate-path', 'segment-lists', 'segment-list', 'state', 'counters']

  def _get_out_pkts(self):
    """
    Getter method for out_pkts, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/state/counters/out_pkts (oc-yang:counter64)

    YANG Description: A cumulative counter of the outgoing packets steered to the
segment list. The counter includes both labeled and unlabeled
steered traffic.
    """
    return self.__out_pkts
      
  def _set_out_pkts(self, v, load=False):
    """
    Setter method for out_pkts, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/state/counters/out_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_pkts() directly.

    YANG Description: A cumulative counter of the outgoing packets steered to the
segment list. The counter includes both labeled and unlabeled
steered traffic.
    """
    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="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_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="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__out_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_pkts(self):
    self.__out_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_out_octets(self):
    """
    Getter method for out_octets, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/state/counters/out_octets (oc-yang:counter64)

    YANG Description: The cumulative counter of the total outgoing bytes steered
to the segment list. The counter includes both labeled and
unlabeled steerted traffic.
    """
    return self.__out_octets
      
  def _set_out_octets(self, v, load=False):
    """
    Setter method for out_octets, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/state/counters/out_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_octets() directly.

    YANG Description: The cumulative counter of the total outgoing bytes steered
to the segment list. The counter includes both labeled and
unlabeled steerted traffic.
    """
    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="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_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="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__out_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_octets(self):
    self.__out_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_out_labeled_pkts(self):
    """
    Getter method for out_labeled_pkts, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/state/counters/out_labeled_pkts (oc-yang:counter64)

    YANG Description: A cumulative counter of the incoming labeled packets steered
to the segment list.
    """
    return self.__out_labeled_pkts
      
  def _set_out_labeled_pkts(self, v, load=False):
    """
    Setter method for out_labeled_pkts, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/state/counters/out_labeled_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_labeled_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_labeled_pkts() directly.

    YANG Description: A cumulative counter of the incoming labeled packets steered
to the segment list.
    """
    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="out-labeled-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_labeled_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="out-labeled-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__out_labeled_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_labeled_pkts(self):
    self.__out_labeled_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-labeled-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_out_labeled_octets(self):
    """
    Getter method for out_labeled_octets, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/state/counters/out_labeled_octets (oc-yang:counter64)

    YANG Description: A cumulative counter of the total bytes of incoming labeled
traffic steered to the segment list.
    """
    return self.__out_labeled_octets
      
  def _set_out_labeled_octets(self, v, load=False):
    """
    Setter method for out_labeled_octets, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/state/counters/out_labeled_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_labeled_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_labeled_octets() directly.

    YANG Description: A cumulative counter of the total bytes of incoming labeled
traffic steered to the segment list.
    """
    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="out-labeled-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_labeled_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="out-labeled-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__out_labeled_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_labeled_octets(self):
    self.__out_labeled_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-labeled-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)

  out_pkts = __builtin__.property(_get_out_pkts)
  out_octets = __builtin__.property(_get_out_octets)
  out_labeled_pkts = __builtin__.property(_get_out_labeled_pkts)
  out_labeled_octets = __builtin__.property(_get_out_labeled_octets)


  _pyangbind_elements = OrderedDict([('out_pkts', out_pkts), ('out_octets', out_octets), ('out_labeled_pkts', out_labeled_pkts), ('out_labeled_octets', out_labeled_octets), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/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 a
segment-list in a SR-TE candidate paths.
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__valid','__invalid_reason','__weight','__counters',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__valid = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EMPTY_SL': {}, 'ZERO_WEIGHT': {}, 'FIRST_SID_UNRESOLVABLE': {}, 'OTHER_SID_UNRESOLVABLE': {}, 'VERIFICATION_FAIL': {}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:srte-invalid-sl-reason', 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/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'te-policies', 'te-policy', 'candidate-paths', 'candidate-path', 'segment-lists', 'segment-list', 'state']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/state/id (uint32)

    YANG Description: A unique id identifying the segment-list.
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/state/id (uint32)
    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: A unique id identifying the segment-list.
    """
    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="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id 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="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_id(self):
    self.__id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_valid(self):
    """
    Getter method for valid, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/state/valid (boolean)

    YANG Description: The validity of a segment-list should marked as true
when it is usable.
    """
    return self.__valid
      
  def _set_valid(self, v, load=False):
    """
    Setter method for valid, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/state/valid (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_valid is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_valid() directly.

    YANG Description: The validity of a segment-list should marked as true
when it is usable.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="valid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """valid must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__valid = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_valid(self):
    self.__valid = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_invalid_reason(self):
    """
    Getter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/state/invalid_reason (oc-srt:srte-invalid-sl-reason)

    YANG Description: If a segment-list is marked as invalid, this leaf should
indicate the reason.
    """
    return self.__invalid_reason
      
  def _set_invalid_reason(self, v, load=False):
    """
    Setter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/state/invalid_reason (oc-srt:srte-invalid-sl-reason)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_invalid_reason is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_invalid_reason() directly.

    YANG Description: If a segment-list is marked as invalid, this leaf should
indicate the reason.
    """
    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={'EMPTY_SL': {}, 'ZERO_WEIGHT': {}, 'FIRST_SID_UNRESOLVABLE': {}, 'OTHER_SID_UNRESOLVABLE': {}, 'VERIFICATION_FAIL': {}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:srte-invalid-sl-reason', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """invalid_reason must be of a type compatible with oc-srt:srte-invalid-sl-reason""",
          'defined-type': "oc-srt:srte-invalid-sl-reason",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EMPTY_SL': {}, 'ZERO_WEIGHT': {}, 'FIRST_SID_UNRESOLVABLE': {}, 'OTHER_SID_UNRESOLVABLE': {}, 'VERIFICATION_FAIL': {}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:srte-invalid-sl-reason', is_config=False)""",
        })

    self.__invalid_reason = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_invalid_reason(self):
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EMPTY_SL': {}, 'ZERO_WEIGHT': {}, 'FIRST_SID_UNRESOLVABLE': {}, 'OTHER_SID_UNRESOLVABLE': {}, 'VERIFICATION_FAIL': {}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:srte-invalid-sl-reason', is_config=False)


  def _get_weight(self):
    """
    Getter method for weight, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/state/weight (uint32)

    YANG Description: The weight of the segment list within the set of
segment lists specified for the candidate path. The
traffic that is forwarded according to the policy is
distributed across the set of segment-lists such that
each list receives weight/(sum of all weights) traffic.
    """
    return self.__weight
      
  def _set_weight(self, v, load=False):
    """
    Setter method for weight, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/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 weight of the segment list within the set of
segment lists specified for the candidate path. The
traffic that is forwarded according to the policy is
distributed across the set of segment-lists such that
each list receives weight/(sum of all weights) traffic.
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_counters(self):
    """
    Getter method for counters, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/state/counters (container)

    YANG Description: The counters of traffic steered to the segment-list.
    """
    return self.__counters
      
  def _set_counters(self, v, load=False):
    """
    Setter method for counters, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/state/counters (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_counters is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_counters() directly.

    YANG Description: The counters of traffic steered to the segment-list.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_counters_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """counters must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__counters = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_counters(self):
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  id = __builtin__.property(_get_id)
  valid = __builtin__.property(_get_valid)
  invalid_reason = __builtin__.property(_get_invalid_reason)
  weight = __builtin__.property(_get_weight)
  counters = __builtin__.property(_get_counters)


  _pyangbind_elements = OrderedDict([('id', id), ('valid', valid), ('invalid_reason', invalid_reason), ('weight', weight), ('counters', counters), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_sids_sid_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/sids/sid/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 SID within
the segment list.
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__value','__mpls_ttl','__mpls_tc',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__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': {}},),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}|:))'}),], is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-sid-type', is_config=False)
    self.__mpls_ttl = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="mpls-ttl", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'te-policies', 'te-policy', 'candidate-paths', 'candidate-path', 'segment-lists', 'segment-list', 'sids', 'sid', 'state']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/sids/sid/state/index (uint64)

    YANG Description: The index of the SID within the segment list. The segment list is
applied by ordering the SID entries in ascending numerical order
beginning at 0.
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/sids/sid/state/index (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: The index of the SID within the segment list. The segment list is
applied by ordering the SID entries in ascending numerical order
beginning at 0.
    """
    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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_index(self):
    self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/sids/sid/state/value (oc-srt:sr-sid-type)

    YANG Description: The value of the SID that is to be used. Specified as an MPLS
label or IPv6 address.
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/sids/sid/state/value (oc-srt:sr-sid-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: The value of the SID that is to be used. Specified as an MPLS
label or IPv6 address.
    """
    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': {}},),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}|:))'}),], is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-sid-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value must be of a type compatible with oc-srt:sr-sid-type""",
          'defined-type': "oc-srt:sr-sid-type",
          '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': {}},),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}|:))'}),], is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-sid-type', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__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': {}},),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}|:))'}),], is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-sid-type', is_config=False)


  def _get_mpls_ttl(self):
    """
    Getter method for mpls_ttl, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/sids/sid/state/mpls_ttl (uint8)

    YANG Description: The TTL to be set if the type of the SID is an MPLS label. If the
value of the TTL is set to be 0, the value is picked by the local
implementation.
    """
    return self.__mpls_ttl
      
  def _set_mpls_ttl(self, v, load=False):
    """
    Setter method for mpls_ttl, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/sids/sid/state/mpls_ttl (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mpls_ttl is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mpls_ttl() directly.

    YANG Description: The TTL to be set if the type of the SID is an MPLS label. If the
value of the TTL is set to be 0, the value is picked by the local
implementation.
    """
    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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="mpls-ttl", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mpls_ttl 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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="mpls-ttl", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__mpls_ttl = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mpls_ttl(self):
    self.__mpls_ttl = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="mpls-ttl", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_mpls_tc(self):
    """
    Getter method for mpls_tc, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/sids/sid/state/mpls_tc (uint8)

    YANG Description: The value of the MPLS Traffic Class (TC) bits to be used if the
value of the SID is an MPLS label. In the case that the value is
set to 0, then the local implementation should choose the value.
    """
    return self.__mpls_tc
      
  def _set_mpls_tc(self, v, load=False):
    """
    Setter method for mpls_tc, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/sids/sid/state/mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mpls_tc() directly.

    YANG Description: The value of the MPLS Traffic Class (TC) bits to be used if the
value of the SID is an MPLS label. In the case that the value is
set to 0, then the local implementation should choose the value.
    """
    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']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mpls_tc 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..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__mpls_tc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mpls_tc(self):
    self.__mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)

  index = __builtin__.property(_get_index)
  value = __builtin__.property(_get_value)
  mpls_ttl = __builtin__.property(_get_mpls_ttl)
  mpls_tc = __builtin__.property(_get_mpls_tc)


  _pyangbind_elements = OrderedDict([('index', index), ('value', value), ('mpls_ttl', mpls_ttl), ('mpls_tc', mpls_tc), ])


class yc_sid_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_sids_sid(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/sids/sid. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of SIDs that make up the segment list. The segment
list is formed by ordering the set of SIDs that are
specified by their index in ascending numerical order.
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__state',)

  _yang_name = 'sid'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_sids_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'te-policies', 'te-policy', 'candidate-paths', 'candidate-path', 'segment-lists', 'segment-list', 'sids', 'sid']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/sids/sid/index (leafref)

    YANG Description: Reference to the SID's index within the segment list
which acts as the key of the list.
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/sids/sid/index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: Reference to the SID's index within the segment list
which acts as the key of the list.
    """
    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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_index(self):
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/sids/sid/state (container)

    YANG Description: Operational state parameters relating to the SID within
the segment list.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/sids/sid/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 SID within
the segment list.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_sids_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_sids_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_sids_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  index = __builtin__.property(_get_index)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('index', index), ('state', state), ])


class yc_sids_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_sids(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/sids. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The list of SIDs that make up the segment list. The
order of the SIDs is specified by ordering the list
according to index, in ascending order. The network
device should consider the top-most SID the entry with
the lowest index.
  """
  __slots__ = ('_path_helper', '_extmethods', '__sid',)

  _yang_name = 'sids'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__sid = YANGDynClass(base=YANGListType("index",yc_sid_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_sids_sid, yang_name="sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'te-policies', 'te-policy', 'candidate-paths', 'candidate-path', 'segment-lists', 'segment-list', 'sids']

  def _get_sid(self):
    """
    Getter method for sid, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/sids/sid (list)

    YANG Description: List of SIDs that make up the segment list. The segment
list is formed by ordering the set of SIDs that are
specified by their index in ascending numerical order.
    """
    return self.__sid
      
  def _set_sid(self, v, load=False):
    """
    Setter method for sid, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/sids/sid (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sid is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sid() directly.

    YANG Description: List of SIDs that make up the segment list. The segment
list is formed by ordering the set of SIDs that are
specified by their index in ascending numerical order.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("index",yc_sid_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_sids_sid, yang_name="sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sid must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("index",yc_sid_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_sids_sid, yang_name="sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__sid = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sid(self):
    self.__sid = YANGDynClass(base=YANGListType("index",yc_sid_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_sids_sid, yang_name="sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  sid = __builtin__.property(_get_sid)


  _pyangbind_elements = OrderedDict([('sid', sid), ])


class yc_counters_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop_state_counters(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops/next-hop/state/counters. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The counters of traffic steered to the segment-list on
per next-hop basis.
  """
  __slots__ = ('_path_helper', '_extmethods', '__out_pkts','__out_octets','__out_labeled_pkts','__out_labeled_octets',)

  _yang_name = 'counters'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__out_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    self.__out_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    self.__out_labeled_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-labeled-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    self.__out_labeled_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-labeled-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'te-policies', 'te-policy', 'candidate-paths', 'candidate-path', 'segment-lists', 'segment-list', 'next-hops', 'next-hop', 'state', 'counters']

  def _get_out_pkts(self):
    """
    Getter method for out_pkts, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/counters/out_pkts (oc-yang:counter64)

    YANG Description: A cumulative counter of the outgoing packets steered to the
segment list. The counter includes both labeled and unlabeled
steered traffic.
    """
    return self.__out_pkts
      
  def _set_out_pkts(self, v, load=False):
    """
    Setter method for out_pkts, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/counters/out_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_pkts() directly.

    YANG Description: A cumulative counter of the outgoing packets steered to the
segment list. The counter includes both labeled and unlabeled
steered traffic.
    """
    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="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_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="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__out_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_pkts(self):
    self.__out_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_out_octets(self):
    """
    Getter method for out_octets, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/counters/out_octets (oc-yang:counter64)

    YANG Description: The cumulative counter of the total outgoing bytes steered
to the segment list. The counter includes both labeled and
unlabeled steerted traffic.
    """
    return self.__out_octets
      
  def _set_out_octets(self, v, load=False):
    """
    Setter method for out_octets, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/counters/out_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_octets() directly.

    YANG Description: The cumulative counter of the total outgoing bytes steered
to the segment list. The counter includes both labeled and
unlabeled steerted traffic.
    """
    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="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_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="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__out_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_octets(self):
    self.__out_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_out_labeled_pkts(self):
    """
    Getter method for out_labeled_pkts, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/counters/out_labeled_pkts (oc-yang:counter64)

    YANG Description: A cumulative counter of the incoming labeled packets steered
to the segment list.
    """
    return self.__out_labeled_pkts
      
  def _set_out_labeled_pkts(self, v, load=False):
    """
    Setter method for out_labeled_pkts, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/counters/out_labeled_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_labeled_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_labeled_pkts() directly.

    YANG Description: A cumulative counter of the incoming labeled packets steered
to the segment list.
    """
    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="out-labeled-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_labeled_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="out-labeled-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__out_labeled_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_labeled_pkts(self):
    self.__out_labeled_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-labeled-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_out_labeled_octets(self):
    """
    Getter method for out_labeled_octets, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/counters/out_labeled_octets (oc-yang:counter64)

    YANG Description: A cumulative counter of the total bytes of incoming labeled
traffic steered to the segment list.
    """
    return self.__out_labeled_octets
      
  def _set_out_labeled_octets(self, v, load=False):
    """
    Setter method for out_labeled_octets, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/counters/out_labeled_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_labeled_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_labeled_octets() directly.

    YANG Description: A cumulative counter of the total bytes of incoming labeled
traffic steered to the segment list.
    """
    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="out-labeled-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_labeled_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="out-labeled-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__out_labeled_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_labeled_octets(self):
    self.__out_labeled_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-labeled-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)

  out_pkts = __builtin__.property(_get_out_pkts)
  out_octets = __builtin__.property(_get_out_octets)
  out_labeled_pkts = __builtin__.property(_get_out_labeled_pkts)
  out_labeled_octets = __builtin__.property(_get_out_labeled_octets)


  _pyangbind_elements = OrderedDict([('out_pkts', out_pkts), ('out_octets', out_octets), ('out_labeled_pkts', out_labeled_pkts), ('out_labeled_octets', out_labeled_octets), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops/next-hop/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters for the nexthop.
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__programmed_index','__ip_address','__mac_address','__pop_top_label','__pushed_mpls_label_stack','__encapsulate_header','__decapsulate_header','__origin_protocol','__counters',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__programmed_index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="programmed-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__ip_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}'}),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}|:))'}),], is_leaf=True, yang_name="ip-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__mac_address = 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)
    self.__pop_top_label = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="pop-top-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__pushed_mpls_label_stack = YANGDynClass(unique=True, base=TypedListType(allowed_type=[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=False, yang_name="pushed-mpls-label-stack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    self.__encapsulate_header = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'GRE': {}, 'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'VXLAN': {}},), is_leaf=True, yang_name="encapsulate-header", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-aftt:encapsulation-header-type', is_config=False)
    self.__decapsulate_header = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'GRE': {}, 'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'VXLAN': {}},), is_leaf=True, yang_name="decapsulate-header", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-aftt:encapsulation-header-type', is_config=False)
    self.__origin_protocol = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}},), is_leaf=True, yang_name="origin-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'te-policies', 'te-policy', 'candidate-paths', 'candidate-path', 'segment-lists', 'segment-list', 'next-hops', 'next-hop', 'state']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/index (uint64)

    YANG Description: A unique entry for the next-hop.
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/index (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: A unique entry for the next-hop.
    """
    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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_index(self):
    self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_programmed_index(self):
    """
    Getter method for programmed_index, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/programmed_index (uint64)

    YANG Description: In some routing protocols, or route injection mechanisms it
is possible to set the index of the next-hop via configuration
or the protocol itself. In some systems it may not be possible
to maintain the index provided by an external client when
advertising the same entry via telemetry.

This leaf reflects the configured or client-supplied index of
the next-hop. This allows a client to create an assocation or
mapping back to the original index pushed by the client, and
the ID used as a key in the next-hop AFT list.
    """
    return self.__programmed_index
      
  def _set_programmed_index(self, v, load=False):
    """
    Setter method for programmed_index, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/programmed_index (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_programmed_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_programmed_index() directly.

    YANG Description: In some routing protocols, or route injection mechanisms it
is possible to set the index of the next-hop via configuration
or the protocol itself. In some systems it may not be possible
to maintain the index provided by an external client when
advertising the same entry via telemetry.

This leaf reflects the configured or client-supplied index of
the next-hop. This allows a client to create an assocation or
mapping back to the original index pushed by the client, and
the ID used as a key in the next-hop AFT list.
    """
    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="programmed-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """programmed_index 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="programmed-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__programmed_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_programmed_index(self):
    self.__programmed_index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="programmed-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_ip_address(self):
    """
    Getter method for ip_address, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/ip_address (oc-inet:ip-address)

    YANG Description: The IP address of the next-hop system.
    """
    return self.__ip_address
      
  def _set_ip_address(self, v, load=False):
    """
    Setter method for ip_address, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/ip_address (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ip_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ip_address() directly.

    YANG Description: The IP address of the next-hop system.
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="ip-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ip_address must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="ip-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__ip_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ip_address(self):
    self.__ip_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}'}),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}|:))'}),], is_leaf=True, yang_name="ip-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_mac_address(self):
    """
    Getter method for mac_address, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/mac_address (oc-yang:mac-address)

    YANG Description: The MAC address of the next-hop if resolved by the local
network instance.
    """
    return self.__mac_address
      
  def _set_mac_address(self, v, load=False):
    """
    Setter method for mac_address, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/mac_address (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_address() directly.

    YANG Description: The MAC address of the next-hop if resolved by the local
network instance.
    """
    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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_address 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)""",
        })

    self.__mac_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mac_address(self):
    self.__mac_address = 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)


  def _get_pop_top_label(self):
    """
    Getter method for pop_top_label, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/pop_top_label (boolean)

    YANG Description: Flag that controls pop action, i.e., the top-most MPLS label
should be popped from the packet when switched by the system.

The top-most MPLS label associated with pop action is equal to
the label key used in 'mpls' AFT 'label-entry' list.
    """
    return self.__pop_top_label
      
  def _set_pop_top_label(self, v, load=False):
    """
    Setter method for pop_top_label, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/pop_top_label (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pop_top_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pop_top_label() directly.

    YANG Description: Flag that controls pop action, i.e., the top-most MPLS label
should be popped from the packet when switched by the system.

The top-most MPLS label associated with pop action is equal to
the label key used in 'mpls' AFT 'label-entry' list.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="pop-top-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pop_top_label must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="pop-top-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__pop_top_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_pop_top_label(self):
    self.__pop_top_label = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="pop-top-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_pushed_mpls_label_stack(self):
    """
    Getter method for pushed_mpls_label_stack, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/pushed_mpls_label_stack (oc-mplst:mpls-label)

    YANG Description: The MPLS label stack imposed when forwarding packets to the
next-hop
- the stack is encoded as a leaf list whereby the order of the
 entries is such that the first entry in the list is the
 label at the bottom of the stack to be pushed.

To this end, a packet which is to forwarded to a device using
a service label of 42, and a transport label of 8072 will be
represented with a label stack list of [42, 8072].

The MPLS label stack list is ordered by the user, such that no
system re-ordering of leaves is permitted by the system.

A swap operation is reflected by entries in the
popped-mpls-label-stack and pushed-mpls-label-stack nodes.
    """
    return self.__pushed_mpls_label_stack
      
  def _set_pushed_mpls_label_stack(self, v, load=False):
    """
    Setter method for pushed_mpls_label_stack, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/pushed_mpls_label_stack (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pushed_mpls_label_stack is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pushed_mpls_label_stack() directly.

    YANG Description: The MPLS label stack imposed when forwarding packets to the
next-hop
- the stack is encoded as a leaf list whereby the order of the
 entries is such that the first entry in the list is the
 label at the bottom of the stack to be pushed.

To this end, a packet which is to forwarded to a device using
a service label of 42, and a transport label of 8072 will be
represented with a label stack list of [42, 8072].

The MPLS label stack list is ordered by the user, such that no
system re-ordering of leaves is permitted by the system.

A swap operation is reflected by entries in the
popped-mpls-label-stack and pushed-mpls-label-stack nodes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=[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=False, yang_name="pushed-mpls-label-stack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pushed_mpls_label_stack must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst:mpls-label",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=[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=False, yang_name="pushed-mpls-label-stack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)""",
        })

    self.__pushed_mpls_label_stack = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_pushed_mpls_label_stack(self):
    self.__pushed_mpls_label_stack = YANGDynClass(unique=True, base=TypedListType(allowed_type=[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=False, yang_name="pushed-mpls-label-stack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)


  def _get_encapsulate_header(self):
    """
    Getter method for encapsulate_header, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/encapsulate_header (oc-aftt:encapsulation-header-type)

    YANG Description: When forwarding a packet to the specified next-hop the local
system performs an encapsulation of the packet - adding the
specified header type.
    """
    return self.__encapsulate_header
      
  def _set_encapsulate_header(self, v, load=False):
    """
    Setter method for encapsulate_header, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/encapsulate_header (oc-aftt:encapsulation-header-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_encapsulate_header is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_encapsulate_header() directly.

    YANG Description: When forwarding a packet to the specified next-hop the local
system performs an encapsulation of the packet - adding the
specified header type.
    """
    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={'GRE': {}, 'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'VXLAN': {}},), is_leaf=True, yang_name="encapsulate-header", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-aftt:encapsulation-header-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """encapsulate_header must be of a type compatible with oc-aftt:encapsulation-header-type""",
          'defined-type': "oc-aftt:encapsulation-header-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'GRE': {}, 'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'VXLAN': {}},), is_leaf=True, yang_name="encapsulate-header", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-aftt:encapsulation-header-type', is_config=False)""",
        })

    self.__encapsulate_header = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_encapsulate_header(self):
    self.__encapsulate_header = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'GRE': {}, 'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'VXLAN': {}},), is_leaf=True, yang_name="encapsulate-header", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-aftt:encapsulation-header-type', is_config=False)


  def _get_decapsulate_header(self):
    """
    Getter method for decapsulate_header, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/decapsulate_header (oc-aftt:encapsulation-header-type)

    YANG Description: When forwarding a packet to the specified next-hop, the local
system performs a decapsulation of the packet - removing the
specified header type. In the case that no next-hop is
specified, the packet header is removed, and a subsequent
forwarding lookup is performed on the packet encapsulated
within the header, matched within the relevant AFT within the
specified network-instance.
    """
    return self.__decapsulate_header
      
  def _set_decapsulate_header(self, v, load=False):
    """
    Setter method for decapsulate_header, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/decapsulate_header (oc-aftt:encapsulation-header-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_decapsulate_header is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_decapsulate_header() directly.

    YANG Description: When forwarding a packet to the specified next-hop, the local
system performs a decapsulation of the packet - removing the
specified header type. In the case that no next-hop is
specified, the packet header is removed, and a subsequent
forwarding lookup is performed on the packet encapsulated
within the header, matched within the relevant AFT within the
specified network-instance.
    """
    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={'GRE': {}, 'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'VXLAN': {}},), is_leaf=True, yang_name="decapsulate-header", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-aftt:encapsulation-header-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """decapsulate_header must be of a type compatible with oc-aftt:encapsulation-header-type""",
          'defined-type': "oc-aftt:encapsulation-header-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'GRE': {}, 'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'VXLAN': {}},), is_leaf=True, yang_name="decapsulate-header", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-aftt:encapsulation-header-type', is_config=False)""",
        })

    self.__decapsulate_header = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_decapsulate_header(self):
    self.__decapsulate_header = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'GRE': {}, 'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'VXLAN': {}},), is_leaf=True, yang_name="decapsulate-header", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-aftt:encapsulation-header-type', is_config=False)


  def _get_origin_protocol(self):
    """
    Getter method for origin_protocol, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/origin_protocol (identityref)

    YANG Description: The protocol from which the AFT entry was learned.
    """
    return self.__origin_protocol
      
  def _set_origin_protocol(self, v, load=False):
    """
    Setter method for origin_protocol, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/origin_protocol (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_origin_protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_origin_protocol() directly.

    YANG Description: The protocol from which the AFT entry was learned.
    """
    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={'BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}},), is_leaf=True, yang_name="origin-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """origin_protocol must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}},), is_leaf=True, yang_name="origin-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__origin_protocol = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_origin_protocol(self):
    self.__origin_protocol = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}},), is_leaf=True, yang_name="origin-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_counters(self):
    """
    Getter method for counters, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/counters (container)

    YANG Description: The counters of traffic steered to the segment-list on
per next-hop basis.
    """
    return self.__counters
      
  def _set_counters(self, v, load=False):
    """
    Setter method for counters, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/counters (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_counters is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_counters() directly.

    YANG Description: The counters of traffic steered to the segment-list on
per next-hop basis.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_counters_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """counters must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__counters = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_counters(self):
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  index = __builtin__.property(_get_index)
  programmed_index = __builtin__.property(_get_programmed_index)
  ip_address = __builtin__.property(_get_ip_address)
  mac_address = __builtin__.property(_get_mac_address)
  pop_top_label = __builtin__.property(_get_pop_top_label)
  pushed_mpls_label_stack = __builtin__.property(_get_pushed_mpls_label_stack)
  encapsulate_header = __builtin__.property(_get_encapsulate_header)
  decapsulate_header = __builtin__.property(_get_decapsulate_header)
  origin_protocol = __builtin__.property(_get_origin_protocol)
  counters = __builtin__.property(_get_counters)


  _pyangbind_elements = OrderedDict([('index', index), ('programmed_index', programmed_index), ('ip_address', ip_address), ('mac_address', mac_address), ('pop_top_label', pop_top_label), ('pushed_mpls_label_stack', pushed_mpls_label_stack), ('encapsulate_header', encapsulate_header), ('decapsulate_header', decapsulate_header), ('origin_protocol', origin_protocol), ('counters', counters), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop_interface_ref_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops/next-hop/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'te-policies', 'te-policy', 'candidate-paths', 'candidate-path', 'segment-lists', 'segment-list', 'next-hops', 'next-hop', 'interface-ref', 'state']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/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 /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/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 /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop_interface_ref(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops/next-hop/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
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'interface-ref'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'te-policies', 'te-policy', 'candidate-paths', 'candidate-path', 'segment-lists', 'segment-list', 'next-hops', 'next-hop', 'interface-ref']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/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 /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/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_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_next_hop_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops/next-hop. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A next-hop the segment list is resolved to.
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__state','__interface_ref',)

  _yang_name = 'next-hop'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__interface_ref = YANGDynClass(base=yc_interface_ref_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'te-policies', 'te-policy', 'candidate-paths', 'candidate-path', 'segment-lists', 'segment-list', 'next-hops', 'next-hop']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/index (leafref)

    YANG Description: A reference to the nexthop index in the state.
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: A reference to the nexthop index in the state.
    """
    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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_index(self):
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state (container)

    YANG Description: State parameters for the nexthop.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/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 parameters for the nexthop.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_interface_ref(self):
    """
    Getter method for interface_ref, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/interface_ref (container)

    YANG Description: Reference to an interface or subinterface
    """
    return self.__interface_ref
      
  def _set_interface_ref(self, v, load=False):
    """
    Setter method for interface_ref, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/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
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interface_ref_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    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_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__interface_ref = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_interface_ref(self):
    self.__interface_ref = YANGDynClass(base=yc_interface_ref_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  index = __builtin__.property(_get_index)
  state = __builtin__.property(_get_state)
  interface_ref = __builtin__.property(_get_interface_ref)


  _pyangbind_elements = OrderedDict([('index', index), ('state', state), ('interface_ref', interface_ref), ])


class yc_next_hops_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The set of next-hops which the segment-list is resolved to.
Traffic steered to the segment-list should be forwarded over
them.
  """
  __slots__ = ('_path_helper', '_extmethods', '__next_hop',)

  _yang_name = 'next-hops'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__next_hop = YANGDynClass(base=YANGListType("index",yc_next_hop_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop, yang_name="next-hop", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'te-policies', 'te-policy', 'candidate-paths', 'candidate-path', 'segment-lists', 'segment-list', 'next-hops']

  def _get_next_hop(self):
    """
    Getter method for next_hop, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop (list)

    YANG Description: A next-hop the segment list is resolved to.
    """
    return self.__next_hop
      
  def _set_next_hop(self, v, load=False):
    """
    Setter method for next_hop, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hop() directly.

    YANG Description: A next-hop the segment list is resolved to.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("index",yc_next_hop_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop, yang_name="next-hop", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hop must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("index",yc_next_hop_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop, yang_name="next-hop", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__next_hop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_next_hop(self):
    self.__next_hop = YANGDynClass(base=YANGListType("index",yc_next_hop_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop, yang_name="next-hop", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  next_hop = __builtin__.property(_get_next_hop)


  _pyangbind_elements = OrderedDict([('next_hop', next_hop), ])


class yc_segment_list_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: An individual segment list within the list of segment
lists associated with this candidate path.
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__state','__sids','__next_hops',)

  _yang_name = 'segment-list'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__sids = YANGDynClass(base=yc_sids_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_sids, is_container='container', yang_name="sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__next_hops = YANGDynClass(base=yc_next_hops_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops, is_container='container', yang_name="next-hops", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'te-policies', 'te-policy', 'candidate-paths', 'candidate-path', 'segment-lists', 'segment-list']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/id (leafref)

    YANG Description: A reference to the segment-list that in use for the
candidate path.
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/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: A reference to the segment-list that in use for the
candidate path.
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/state (container)

    YANG Description: Operational state parameters associated with a
segment-list in a SR-TE candidate paths.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/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 a
segment-list in a SR-TE candidate paths.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_sids(self):
    """
    Getter method for sids, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/sids (container)

    YANG Description: The list of SIDs that make up the segment list. The
order of the SIDs is specified by ordering the list
according to index, in ascending order. The network
device should consider the top-most SID the entry with
the lowest index.
    """
    return self.__sids
      
  def _set_sids(self, v, load=False):
    """
    Setter method for sids, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/sids (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sids is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sids() directly.

    YANG Description: The list of SIDs that make up the segment list. The
order of the SIDs is specified by ordering the list
according to index, in ascending order. The network
device should consider the top-most SID the entry with
the lowest index.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_sids_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_sids, is_container='container', yang_name="sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sids must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_sids_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_sids, is_container='container', yang_name="sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__sids = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sids(self):
    self.__sids = YANGDynClass(base=yc_sids_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_sids, is_container='container', yang_name="sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_next_hops(self):
    """
    Getter method for next_hops, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops (container)

    YANG Description: The set of next-hops which the segment-list is resolved to.
Traffic steered to the segment-list should be forwarded over
them.
    """
    return self.__next_hops
      
  def _set_next_hops(self, v, load=False):
    """
    Setter method for next_hops, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hops is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hops() directly.

    YANG Description: The set of next-hops which the segment-list is resolved to.
Traffic steered to the segment-list should be forwarded over
them.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_next_hops_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops, is_container='container', yang_name="next-hops", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hops must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_next_hops_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops, is_container='container', yang_name="next-hops", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__next_hops = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_next_hops(self):
    self.__next_hops = YANGDynClass(base=yc_next_hops_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops, is_container='container', yang_name="next-hops", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  id = __builtin__.property(_get_id)
  state = __builtin__.property(_get_state)
  sids = __builtin__.property(_get_sids)
  next_hops = __builtin__.property(_get_next_hops)


  _pyangbind_elements = OrderedDict([('id', id), ('state', state), ('sids', sids), ('next_hops', next_hops), ])


class yc_segment_lists_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A collection of segment lists associated with the policy
candidate path.
  """
  __slots__ = ('_path_helper', '_extmethods', '__segment_list',)

  _yang_name = 'segment-lists'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__segment_list = YANGDynClass(base=YANGListType("id",yc_segment_list_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list, yang_name="segment-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="segment-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'te-policies', 'te-policy', 'candidate-paths', 'candidate-path', 'segment-lists']

  def _get_segment_list(self):
    """
    Getter method for segment_list, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list (list)

    YANG Description: An individual segment list within the list of segment
lists associated with this candidate path.
    """
    return self.__segment_list
      
  def _set_segment_list(self, v, load=False):
    """
    Setter method for segment_list, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_segment_list is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_segment_list() directly.

    YANG Description: An individual segment list within the list of segment
lists associated with this candidate path.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("id",yc_segment_list_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list, yang_name="segment-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="segment-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """segment_list must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("id",yc_segment_list_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list, yang_name="segment-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="segment-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__segment_list = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_segment_list(self):
    self.__segment_list = YANGDynClass(base=YANGListType("id",yc_segment_list_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list, yang_name="segment-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="segment-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  segment_list = __builtin__.property(_get_segment_list)


  _pyangbind_elements = OrderedDict([('segment_list', segment_list), ])


class yc_candidate_path_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: An individual candidate path within the list of candidate
paths associated with this SR-TE policy. It is uniquely
identified by the combination of protocol-origin,
originator and discriminator
  """
  __slots__ = ('_path_helper', '_extmethods', '__protocol_origin','__originator_asn','__originator_addr','__discriminator','__state','__segment_lists',)

  _yang_name = 'candidate-path'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__protocol_origin = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="protocol-origin", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__originator_asn = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="originator-asn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__originator_addr = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="originator-addr", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__discriminator = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="discriminator", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__segment_lists = YANGDynClass(base=yc_segment_lists_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists, is_container='container', yang_name="segment-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'te-policies', 'te-policy', 'candidate-paths', 'candidate-path']

  def _get_protocol_origin(self):
    """
    Getter method for protocol_origin, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/protocol_origin (leafref)

    YANG Description: A reference to the component or protocol that originates
or signals the candidate path
    """
    return self.__protocol_origin
      
  def _set_protocol_origin(self, v, load=False):
    """
    Setter method for protocol_origin, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/protocol_origin (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_protocol_origin is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_protocol_origin() directly.

    YANG Description: A reference to the component or protocol that originates
or signals the candidate path
    """
    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="protocol-origin", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """protocol_origin must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="protocol-origin", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__protocol_origin = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_protocol_origin(self):
    self.__protocol_origin = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="protocol-origin", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_originator_asn(self):
    """
    Getter method for originator_asn, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/originator_asn (leafref)

    YANG Description: A reference to the autonomous system that the node
originating the candidate path locates.
    """
    return self.__originator_asn
      
  def _set_originator_asn(self, v, load=False):
    """
    Setter method for originator_asn, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/originator_asn (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_originator_asn is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_originator_asn() directly.

    YANG Description: A reference to the autonomous system that the node
originating the candidate path locates.
    """
    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="originator-asn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """originator_asn must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="originator-asn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__originator_asn = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_originator_asn(self):
    self.__originator_asn = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="originator-asn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_originator_addr(self):
    """
    Getter method for originator_addr, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/originator_addr (leafref)

    YANG Description: A reference to the address of the node originating the
candidate path.
    """
    return self.__originator_addr
      
  def _set_originator_addr(self, v, load=False):
    """
    Setter method for originator_addr, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/originator_addr (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_originator_addr is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_originator_addr() directly.

    YANG Description: A reference to the address of the node originating the
candidate path.
    """
    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="originator-addr", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """originator_addr must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="originator-addr", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__originator_addr = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_originator_addr(self):
    self.__originator_addr = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="originator-addr", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_discriminator(self):
    """
    Getter method for discriminator, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/discriminator (leafref)

    YANG Description: A reference to the ID uniquely identifying the path
within the context of a policy learnt from a protocol.
    """
    return self.__discriminator
      
  def _set_discriminator(self, v, load=False):
    """
    Setter method for discriminator, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/discriminator (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_discriminator is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_discriminator() directly.

    YANG Description: A reference to the ID uniquely identifying the path
within the context of a policy learnt from a protocol.
    """
    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="discriminator", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """discriminator must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="discriminator", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__discriminator = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_discriminator(self):
    self.__discriminator = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="discriminator", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state (container)

    YANG Description: Operational state parameters associated with SR-TE
candidate paths.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/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 SR-TE
candidate paths.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_segment_lists(self):
    """
    Getter method for segment_lists, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists (container)

    YANG Description: A collection of segment lists associated with the policy
candidate path.
    """
    return self.__segment_lists
      
  def _set_segment_lists(self, v, load=False):
    """
    Setter method for segment_lists, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_segment_lists is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_segment_lists() directly.

    YANG Description: A collection of segment lists associated with the policy
candidate path.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_segment_lists_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists, is_container='container', yang_name="segment-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """segment_lists must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_segment_lists_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists, is_container='container', yang_name="segment-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__segment_lists = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_segment_lists(self):
    self.__segment_lists = YANGDynClass(base=yc_segment_lists_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists, is_container='container', yang_name="segment-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  protocol_origin = __builtin__.property(_get_protocol_origin)
  originator_asn = __builtin__.property(_get_originator_asn)
  originator_addr = __builtin__.property(_get_originator_addr)
  discriminator = __builtin__.property(_get_discriminator)
  state = __builtin__.property(_get_state)
  segment_lists = __builtin__.property(_get_segment_lists)


  _pyangbind_elements = OrderedDict([('protocol_origin', protocol_origin), ('originator_asn', originator_asn), ('originator_addr', originator_addr), ('discriminator', discriminator), ('state', state), ('segment_lists', segment_lists), ])


class yc_candidate_paths_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: One or more candidate paths may be associated to a SR-TE
policy. The best and usable one should be used as forwarding
next-hops.
  """
  __slots__ = ('_path_helper', '_extmethods', '__candidate_path',)

  _yang_name = 'candidate-paths'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__candidate_path = YANGDynClass(base=YANGListType("protocol_origin originator_asn originator_addr discriminator",yc_candidate_path_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path, yang_name="candidate-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='protocol-origin originator-asn originator-addr discriminator', extensions=None), is_container='list', yang_name="candidate-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'te-policies', 'te-policy', 'candidate-paths']

  def _get_candidate_path(self):
    """
    Getter method for candidate_path, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path (list)

    YANG Description: An individual candidate path within the list of candidate
paths associated with this SR-TE policy. It is uniquely
identified by the combination of protocol-origin,
originator and discriminator
    """
    return self.__candidate_path
      
  def _set_candidate_path(self, v, load=False):
    """
    Setter method for candidate_path, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_candidate_path is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_candidate_path() directly.

    YANG Description: An individual candidate path within the list of candidate
paths associated with this SR-TE policy. It is uniquely
identified by the combination of protocol-origin,
originator and discriminator
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("protocol_origin originator_asn originator_addr discriminator",yc_candidate_path_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path, yang_name="candidate-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='protocol-origin originator-asn originator-addr discriminator', extensions=None), is_container='list', yang_name="candidate-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """candidate_path must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("protocol_origin originator_asn originator_addr discriminator",yc_candidate_path_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path, yang_name="candidate-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='protocol-origin originator-asn originator-addr discriminator', extensions=None), is_container='list', yang_name="candidate-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__candidate_path = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_candidate_path(self):
    self.__candidate_path = YANGDynClass(base=YANGListType("protocol_origin originator_asn originator_addr discriminator",yc_candidate_path_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path, yang_name="candidate-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='protocol-origin originator-asn originator-addr discriminator', extensions=None), is_container='list', yang_name="candidate-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  candidate_path = __builtin__.property(_get_candidate_path)


  _pyangbind_elements = OrderedDict([('candidate_path', candidate_path), ])


class yc_te_policy_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/segment-routing/te-policies/te-policy. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: An individual SR-TE policy is identified by a combination
of color and endpoint.
  """
  __slots__ = ('_path_helper', '_extmethods', '__color','__endpoint','__state','__candidate_paths',)

  _yang_name = 'te-policy'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__color = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__endpoint = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__candidate_paths = YANGDynClass(base=yc_candidate_paths_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths, is_container='container', yang_name="candidate-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'te-policies', 'te-policy']

  def _get_color(self):
    """
    Getter method for color, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/color (leafref)

    YANG Description: A reference to the srte color in the state.
    """
    return self.__color
      
  def _set_color(self, v, load=False):
    """
    Setter method for color, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/color (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_color is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_color() directly.

    YANG Description: A reference to the srte color in the state.
    """
    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="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """color must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__color = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_color(self):
    self.__color = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_endpoint(self):
    """
    Getter method for endpoint, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/endpoint (leafref)

    YANG Description: A reference to the srte endpoint in the state.
    """
    return self.__endpoint
      
  def _set_endpoint(self, v, load=False):
    """
    Setter method for endpoint, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/endpoint (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint() directly.

    YANG Description: A reference to the srte endpoint in the state.
    """
    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="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """endpoint must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__endpoint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_endpoint(self):
    self.__endpoint = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state (container)

    YANG Description: The operational state of parameters associated with
SR-TE policies.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_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: The operational state of parameters associated with
SR-TE policies.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_segment_routing_te_policies_te_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_segment_routing_te_policies_te_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_candidate_paths(self):
    """
    Getter method for candidate_paths, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths (container)

    YANG Description: One or more candidate paths may be associated to a SR-TE
policy. The best and usable one should be used as forwarding
next-hops.
    """
    return self.__candidate_paths
      
  def _set_candidate_paths(self, v, load=False):
    """
    Setter method for candidate_paths, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_candidate_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_candidate_paths() directly.

    YANG Description: One or more candidate paths may be associated to a SR-TE
policy. The best and usable one should be used as forwarding
next-hops.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_candidate_paths_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths, is_container='container', yang_name="candidate-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """candidate_paths must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_candidate_paths_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths, is_container='container', yang_name="candidate-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__candidate_paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_candidate_paths(self):
    self.__candidate_paths = YANGDynClass(base=yc_candidate_paths_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths, is_container='container', yang_name="candidate-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  color = __builtin__.property(_get_color)
  endpoint = __builtin__.property(_get_endpoint)
  state = __builtin__.property(_get_state)
  candidate_paths = __builtin__.property(_get_candidate_paths)


  _pyangbind_elements = OrderedDict([('color', color), ('endpoint', endpoint), ('state', state), ('candidate_paths', candidate_paths), ])


class yc_te_policies_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/segment-routing/te-policies. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A collection of SR-TE policies in the system.
  """
  __slots__ = ('_path_helper', '_extmethods', '__te_policy',)

  _yang_name = 'te-policies'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__te_policy = YANGDynClass(base=YANGListType("color endpoint",yc_te_policy_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy, yang_name="te-policy", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='color endpoint', extensions=None), is_container='list', yang_name="te-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'te-policies']

  def _get_te_policy(self):
    """
    Getter method for te_policy, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy (list)

    YANG Description: An individual SR-TE policy is identified by a combination
of color and endpoint.
    """
    return self.__te_policy
      
  def _set_te_policy(self, v, load=False):
    """
    Setter method for te_policy, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_te_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_te_policy() directly.

    YANG Description: An individual SR-TE policy is identified by a combination
of color and endpoint.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("color endpoint",yc_te_policy_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy, yang_name="te-policy", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='color endpoint', extensions=None), is_container='list', yang_name="te-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """te_policy must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("color endpoint",yc_te_policy_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy, yang_name="te-policy", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='color endpoint', extensions=None), is_container='list', yang_name="te-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__te_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_te_policy(self):
    self.__te_policy = YANGDynClass(base=YANGListType("color endpoint",yc_te_policy_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies_te_policy, yang_name="te-policy", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='color endpoint', extensions=None), is_container='list', yang_name="te-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  te_policy = __builtin__.property(_get_te_policy)


  _pyangbind_elements = OrderedDict([('te_policy', te_policy), ])


class yc_segment_routing_openconfig_network_instance__network_instances_network_instance_segment_routing(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/segment-routing. 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
segment routing.
  """
  __slots__ = ('_path_helper', '_extmethods', '__srgbs','__srlbs','__te_policies',)

  _yang_name = 'segment-routing'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__srgbs = YANGDynClass(base=yc_srgbs_openconfig_network_instance__network_instances_network_instance_segment_routing_srgbs, is_container='container', yang_name="srgbs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__srlbs = YANGDynClass(base=yc_srlbs_openconfig_network_instance__network_instances_network_instance_segment_routing_srlbs, is_container='container', yang_name="srlbs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__te_policies = YANGDynClass(base=yc_te_policies_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies, is_container='container', yang_name="te-policies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing']

  def _get_srgbs(self):
    """
    Getter method for srgbs, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs (container)

    YANG Description: Configuration and operational state parameters relating to the
SRGBs defined for the system.
    """
    return self.__srgbs
      
  def _set_srgbs(self, v, load=False):
    """
    Setter method for srgbs, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_srgbs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_srgbs() directly.

    YANG Description: Configuration and operational state parameters relating to the
SRGBs defined for the system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_srgbs_openconfig_network_instance__network_instances_network_instance_segment_routing_srgbs, is_container='container', yang_name="srgbs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """srgbs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_srgbs_openconfig_network_instance__network_instances_network_instance_segment_routing_srgbs, is_container='container', yang_name="srgbs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__srgbs = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_srgbs(self):
    self.__srgbs = YANGDynClass(base=yc_srgbs_openconfig_network_instance__network_instances_network_instance_segment_routing_srgbs, is_container='container', yang_name="srgbs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_srlbs(self):
    """
    Getter method for srlbs, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs (container)

    YANG Description: Configuration and operational state parameters relating to the
Segment Routing Local Blocks (SRLBs) defined for the system.
    """
    return self.__srlbs
      
  def _set_srlbs(self, v, load=False):
    """
    Setter method for srlbs, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_srlbs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_srlbs() directly.

    YANG Description: Configuration and operational state parameters relating to the
Segment Routing Local Blocks (SRLBs) defined for the system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_srlbs_openconfig_network_instance__network_instances_network_instance_segment_routing_srlbs, is_container='container', yang_name="srlbs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """srlbs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_srlbs_openconfig_network_instance__network_instances_network_instance_segment_routing_srlbs, is_container='container', yang_name="srlbs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__srlbs = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_srlbs(self):
    self.__srlbs = YANGDynClass(base=yc_srlbs_openconfig_network_instance__network_instances_network_instance_segment_routing_srlbs, is_container='container', yang_name="srlbs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_te_policies(self):
    """
    Getter method for te_policies, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies (container)

    YANG Description: A collection of SR-TE policies in the system.
    """
    return self.__te_policies
      
  def _set_te_policies(self, v, load=False):
    """
    Setter method for te_policies, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_te_policies is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_te_policies() directly.

    YANG Description: A collection of SR-TE policies in the system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_te_policies_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies, is_container='container', yang_name="te-policies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """te_policies must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_te_policies_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies, is_container='container', yang_name="te-policies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__te_policies = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_te_policies(self):
    self.__te_policies = YANGDynClass(base=yc_te_policies_openconfig_network_instance__network_instances_network_instance_segment_routing_te_policies, is_container='container', yang_name="te-policies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  srgbs = __builtin__.property(_get_srgbs, _set_srgbs)
  srlbs = __builtin__.property(_get_srlbs, _set_srlbs)
  te_policies = __builtin__.property(_get_te_policies, _set_te_policies)


  _pyangbind_elements = OrderedDict([('srgbs', srgbs), ('srlbs', srlbs), ('te_policies', te_policies), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_vlans_vlan_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/vlans/vlan/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for VLANs
  """
  __slots__ = ('_path_helper', '_extmethods', '__vlan_id','__name','__status',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__vlan_id = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlan-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-vlan-types:vlan-id', is_config=True)
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACTIVE': {}, 'SUSPENDED': {}},), default=six.text_type("ACTIVE"), is_leaf=True, yang_name="status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'vlans', 'vlan', 'config']

  def _get_vlan_id(self):
    """
    Getter method for vlan_id, mapped from YANG variable /network_instances/network_instance/vlans/vlan/config/vlan_id (oc-vlan-types:vlan-id)

    YANG Description: Interface VLAN id.
    """
    return self.__vlan_id
      
  def _set_vlan_id(self, v, load=False):
    """
    Setter method for vlan_id, mapped from YANG variable /network_instances/network_instance/vlans/vlan/config/vlan_id (oc-vlan-types:vlan-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_vlan_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_vlan_id() directly.

    YANG Description: Interface VLAN id.
    """
    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': ['1..4094']}), is_leaf=True, yang_name="vlan-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-vlan-types:vlan-id', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """vlan_id must be of a type compatible with oc-vlan-types:vlan-id""",
          'defined-type': "oc-vlan-types:vlan-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlan-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-vlan-types:vlan-id', is_config=True)""",
        })

    self.__vlan_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_vlan_id(self):
    self.__vlan_id = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlan-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-vlan-types:vlan-id', is_config=True)


  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/vlans/vlan/config/name (string)

    YANG Description: Interface VLAN name.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/vlans/vlan/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: Interface VLAN name.
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_status(self):
    """
    Getter method for status, mapped from YANG variable /network_instances/network_instance/vlans/vlan/config/status (enumeration)

    YANG Description: Admin state of the VLAN
    """
    return self.__status
      
  def _set_status(self, v, load=False):
    """
    Setter method for status, mapped from YANG variable /network_instances/network_instance/vlans/vlan/config/status (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_status is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_status() directly.

    YANG Description: Admin state of the VLAN
    """
    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={'ACTIVE': {}, 'SUSPENDED': {}},), default=six.text_type("ACTIVE"), is_leaf=True, yang_name="status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """status must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACTIVE': {}, 'SUSPENDED': {}},), default=six.text_type("ACTIVE"), is_leaf=True, yang_name="status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)""",
        })

    self.__status = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_status(self):
    self.__status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACTIVE': {}, 'SUSPENDED': {}},), default=six.text_type("ACTIVE"), is_leaf=True, yang_name="status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)

  vlan_id = __builtin__.property(_get_vlan_id, _set_vlan_id)
  name = __builtin__.property(_get_name, _set_name)
  status = __builtin__.property(_get_status, _set_status)


  _pyangbind_elements = OrderedDict([('vlan_id', vlan_id), ('name', name), ('status', status), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_vlans_vlan_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/vlans/vlan/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State variables for VLANs
  """
  __slots__ = ('_path_helper', '_extmethods', '__vlan_id','__name','__status',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__vlan_id = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlan-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-vlan-types:vlan-id', is_config=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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACTIVE': {}, 'SUSPENDED': {}},), default=six.text_type("ACTIVE"), is_leaf=True, yang_name="status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'vlans', 'vlan', 'state']

  def _get_vlan_id(self):
    """
    Getter method for vlan_id, mapped from YANG variable /network_instances/network_instance/vlans/vlan/state/vlan_id (oc-vlan-types:vlan-id)

    YANG Description: Interface VLAN id.
    """
    return self.__vlan_id
      
  def _set_vlan_id(self, v, load=False):
    """
    Setter method for vlan_id, mapped from YANG variable /network_instances/network_instance/vlans/vlan/state/vlan_id (oc-vlan-types:vlan-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_vlan_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_vlan_id() directly.

    YANG Description: Interface VLAN id.
    """
    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': ['1..4094']}), is_leaf=True, yang_name="vlan-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-vlan-types:vlan-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """vlan_id must be of a type compatible with oc-vlan-types:vlan-id""",
          'defined-type': "oc-vlan-types:vlan-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlan-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-vlan-types:vlan-id', is_config=False)""",
        })

    self.__vlan_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_vlan_id(self):
    self.__vlan_id = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlan-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-vlan-types:vlan-id', is_config=False)


  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/vlans/vlan/state/name (string)

    YANG Description: Interface VLAN name.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/vlans/vlan/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: Interface VLAN name.
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_status(self):
    """
    Getter method for status, mapped from YANG variable /network_instances/network_instance/vlans/vlan/state/status (enumeration)

    YANG Description: Admin state of the VLAN
    """
    return self.__status
      
  def _set_status(self, v, load=False):
    """
    Setter method for status, mapped from YANG variable /network_instances/network_instance/vlans/vlan/state/status (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_status is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_status() directly.

    YANG Description: Admin state of the VLAN
    """
    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={'ACTIVE': {}, 'SUSPENDED': {}},), default=six.text_type("ACTIVE"), is_leaf=True, yang_name="status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """status must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACTIVE': {}, 'SUSPENDED': {}},), default=six.text_type("ACTIVE"), is_leaf=True, yang_name="status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__status = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_status(self):
    self.__status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACTIVE': {}, 'SUSPENDED': {}},), default=six.text_type("ACTIVE"), is_leaf=True, yang_name="status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)

  vlan_id = __builtin__.property(_get_vlan_id)
  name = __builtin__.property(_get_name)
  status = __builtin__.property(_get_status)


  _pyangbind_elements = OrderedDict([('vlan_id', vlan_id), ('name', name), ('status', status), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_vlans_vlan_members_member_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/vlans/vlan/members/member/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for base interface reference
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='base-interface-ref', 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 ['network-instances', 'network-instance', 'vlans', 'vlan', 'members', 'member', 'state']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/vlans/vlan/members/member/state/interface (base-interface-ref)

    YANG Description: Reference to a base interface.
    """
    return self.__interface
      
  def _set_interface(self, v, load=False):
    """
    Setter method for interface, mapped from YANG variable /network_instances/network_instance/vlans/vlan/members/member/state/interface (base-interface-ref)
    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 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/network-instance', defining_module='openconfig-network-instance', yang_type='base-interface-ref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface must be of a type compatible with base-interface-ref""",
          'defined-type': "openconfig-network-instance:base-interface-ref",
          '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/network-instance', defining_module='openconfig-network-instance', yang_type='base-interface-ref', 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/network-instance', defining_module='openconfig-network-instance', yang_type='base-interface-ref', is_config=False)

  interface = __builtin__.property(_get_interface)


  _pyangbind_elements = OrderedDict([('interface', interface), ])


class yc_member_openconfig_network_instance__network_instances_network_instance_vlans_vlan_members_member(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/vlans/vlan/members/member. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of references to interfaces / subinterfaces
associated with the VLAN.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'member'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_vlans_vlan_members_member_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'vlans', 'vlan', 'members', 'member']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/vlans/vlan/members/member/state (container)

    YANG Description: Operational state for base interface reference
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/vlans/vlan/members/member/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 base interface reference
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_vlans_vlan_members_member_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_vlans_vlan_members_member_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_vlans_vlan_members_member_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_members_openconfig_network_instance__network_instances_network_instance_vlans_vlan_members(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/vlans/vlan/members. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for list of member interfaces
  """
  __slots__ = ('_path_helper', '_extmethods', '__member',)

  _yang_name = 'members'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__member = YANGDynClass(base=YANGListType(False,yc_member_openconfig_network_instance__network_instances_network_instance_vlans_vlan_members_member, yang_name="member", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="member", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'vlans', 'vlan', 'members']

  def _get_member(self):
    """
    Getter method for member, mapped from YANG variable /network_instances/network_instance/vlans/vlan/members/member (list)

    YANG Description: List of references to interfaces / subinterfaces
associated with the VLAN.
    """
    return self.__member
      
  def _set_member(self, v, load=False):
    """
    Setter method for member, mapped from YANG variable /network_instances/network_instance/vlans/vlan/members/member (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_member is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_member() directly.

    YANG Description: List of references to interfaces / subinterfaces
associated with the VLAN.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType(False,yc_member_openconfig_network_instance__network_instances_network_instance_vlans_vlan_members_member, yang_name="member", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="member", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """member must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType(False,yc_member_openconfig_network_instance__network_instances_network_instance_vlans_vlan_members_member, yang_name="member", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="member", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__member = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_member(self):
    self.__member = YANGDynClass(base=YANGListType(False,yc_member_openconfig_network_instance__network_instances_network_instance_vlans_vlan_members_member, yang_name="member", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="member", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  member = __builtin__.property(_get_member, _set_member)


  _pyangbind_elements = OrderedDict([('member', member), ])


class yc_vlan_openconfig_network_instance__network_instances_network_instance_vlans_vlan(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/vlans/vlan. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configured VLANs keyed by id
  """
  __slots__ = ('_path_helper', '_extmethods', '__vlan_id','__config','__state','__members',)

  _yang_name = 'vlan'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__vlan_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="vlan-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_vlans_vlan_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_vlans_vlan_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__members = YANGDynClass(base=yc_members_openconfig_network_instance__network_instances_network_instance_vlans_vlan_members, is_container='container', yang_name="members", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'vlans', 'vlan']

  def _get_vlan_id(self):
    """
    Getter method for vlan_id, mapped from YANG variable /network_instances/network_instance/vlans/vlan/vlan_id (leafref)

    YANG Description: references the configured vlan-id
    """
    return self.__vlan_id
      
  def _set_vlan_id(self, v, load=False):
    """
    Setter method for vlan_id, mapped from YANG variable /network_instances/network_instance/vlans/vlan/vlan_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_vlan_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_vlan_id() directly.

    YANG Description: references the configured vlan-id
    """
    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="vlan-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """vlan_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="vlan-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__vlan_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_vlan_id(self):
    self.__vlan_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="vlan-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/vlans/vlan/config (container)

    YANG Description: Configuration parameters for VLANs
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/vlans/vlan/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 VLANs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_vlans_vlan_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_vlans_vlan_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_vlans_vlan_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/vlans/vlan/state (container)

    YANG Description: State variables for VLANs
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/vlans/vlan/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 variables for VLANs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_vlans_vlan_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_vlans_vlan_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_vlans_vlan_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_members(self):
    """
    Getter method for members, mapped from YANG variable /network_instances/network_instance/vlans/vlan/members (container)

    YANG Description: Enclosing container for list of member interfaces
    """
    return self.__members
      
  def _set_members(self, v, load=False):
    """
    Setter method for members, mapped from YANG variable /network_instances/network_instance/vlans/vlan/members (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_members is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_members() directly.

    YANG Description: Enclosing container for list of member interfaces
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_members_openconfig_network_instance__network_instances_network_instance_vlans_vlan_members, is_container='container', yang_name="members", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """members must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_members_openconfig_network_instance__network_instances_network_instance_vlans_vlan_members, is_container='container', yang_name="members", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__members = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_members(self):
    self.__members = YANGDynClass(base=yc_members_openconfig_network_instance__network_instances_network_instance_vlans_vlan_members, is_container='container', yang_name="members", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  vlan_id = __builtin__.property(_get_vlan_id, _set_vlan_id)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  members = __builtin__.property(_get_members, _set_members)


  _pyangbind_elements = OrderedDict([('vlan_id', vlan_id), ('config', config), ('state', state), ('members', members), ])


class yc_vlans_openconfig_network_instance__network_instances_network_instance_vlans(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/vlans. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Container for VLAN configuration and state
variables
  """
  __slots__ = ('_path_helper', '_extmethods', '__vlan',)

  _yang_name = 'vlans'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__vlan = YANGDynClass(base=YANGListType("vlan_id",yc_vlan_openconfig_network_instance__network_instances_network_instance_vlans_vlan, yang_name="vlan", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='vlan-id', extensions=None), is_container='list', yang_name="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'vlans']

  def _get_vlan(self):
    """
    Getter method for vlan, mapped from YANG variable /network_instances/network_instance/vlans/vlan (list)

    YANG Description: Configured VLANs keyed by id
    """
    return self.__vlan
      
  def _set_vlan(self, v, load=False):
    """
    Setter method for vlan, mapped from YANG variable /network_instances/network_instance/vlans/vlan (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_vlan is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_vlan() directly.

    YANG Description: Configured VLANs keyed by id
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("vlan_id",yc_vlan_openconfig_network_instance__network_instances_network_instance_vlans_vlan, yang_name="vlan", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='vlan-id', extensions=None), is_container='list', yang_name="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """vlan must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("vlan_id",yc_vlan_openconfig_network_instance__network_instances_network_instance_vlans_vlan, yang_name="vlan", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='vlan-id', extensions=None), is_container='list', yang_name="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__vlan = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_vlan(self):
    self.__vlan = YANGDynClass(base=YANGListType("vlan_id",yc_vlan_openconfig_network_instance__network_instances_network_instance_vlans_vlan, yang_name="vlan", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='vlan-id', extensions=None), is_container='list', yang_name="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  vlan = __builtin__.property(_get_vlan, _set_vlan)


  _pyangbind_elements = OrderedDict([('vlan', vlan), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding/policies/policy/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration options relating to the forwarding
policy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__policy_id','__type',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__policy_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="policy-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PBR_POLICY': {}, 'VRF_SELECTION_POLICY': {}},), default=six.text_type("PBR_POLICY"), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'policy-forwarding', 'policies', 'policy', 'config']

  def _get_policy_id(self):
    """
    Getter method for policy_id, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/config/policy_id (string)

    YANG Description: A unique name identifying the forwarding policy. This name is
used when applying the policy to a particular interface.
    """
    return self.__policy_id
      
  def _set_policy_id(self, v, load=False):
    """
    Setter method for policy_id, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/config/policy_id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_policy_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_policy_id() directly.

    YANG Description: A unique name identifying the forwarding policy. This name is
used when applying the policy to a particular interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="policy-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """policy_id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="policy-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)""",
        })

    self.__policy_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_policy_id(self):
    self.__policy_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="policy-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/config/type (enumeration)

    YANG Description: The type of the policy. By default policies are generally usable for policy-based
routing, and have no restrictions on their implementation. Where there are alternate
policy types, this leaf specifies that a policy is expected to conform with a subset
of the functionality as described in the specified type.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/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: The type of the policy. By default policies are generally usable for policy-based
routing, and have no restrictions on their implementation. Where there are alternate
policy types, this leaf specifies that a policy is expected to conform with a subset
of the functionality as described in the specified type.
    """
    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={'PBR_POLICY': {}, 'VRF_SELECTION_POLICY': {}},), default=six.text_type("PBR_POLICY"), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PBR_POLICY': {}, 'VRF_SELECTION_POLICY': {}},), default=six.text_type("PBR_POLICY"), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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={'PBR_POLICY': {}, 'VRF_SELECTION_POLICY': {}},), default=six.text_type("PBR_POLICY"), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)

  policy_id = __builtin__.property(_get_policy_id, _set_policy_id)
  type = __builtin__.property(_get_type, _set_type)


  _pyangbind_elements = OrderedDict([('policy_id', policy_id), ('type', type), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding/policies/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 the forwarding
policy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__policy_id','__type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__policy_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="policy-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PBR_POLICY': {}, 'VRF_SELECTION_POLICY': {}},), default=six.text_type("PBR_POLICY"), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'policy-forwarding', 'policies', 'policy', 'state']

  def _get_policy_id(self):
    """
    Getter method for policy_id, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/state/policy_id (string)

    YANG Description: A unique name identifying the forwarding policy. This name is
used when applying the policy to a particular interface.
    """
    return self.__policy_id
      
  def _set_policy_id(self, v, load=False):
    """
    Setter method for policy_id, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/state/policy_id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_policy_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_policy_id() directly.

    YANG Description: A unique name identifying the forwarding policy. This name is
used when applying the policy to a particular interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="policy-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """policy_id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="policy-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__policy_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_policy_id(self):
    self.__policy_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="policy-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/state/type (enumeration)

    YANG Description: The type of the policy. By default policies are generally usable for policy-based
routing, and have no restrictions on their implementation. Where there are alternate
policy types, this leaf specifies that a policy is expected to conform with a subset
of the functionality as described in the specified type.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/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: The type of the policy. By default policies are generally usable for policy-based
routing, and have no restrictions on their implementation. Where there are alternate
policy types, this leaf specifies that a policy is expected to conform with a subset
of the functionality as described in the specified type.
    """
    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={'PBR_POLICY': {}, 'VRF_SELECTION_POLICY': {}},), default=six.text_type("PBR_POLICY"), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PBR_POLICY': {}, 'VRF_SELECTION_POLICY': {}},), default=six.text_type("PBR_POLICY"), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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={'PBR_POLICY': {}, 'VRF_SELECTION_POLICY': {}},), default=six.text_type("PBR_POLICY"), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)

  policy_id = __builtin__.property(_get_policy_id)
  type = __builtin__.property(_get_type)


  _pyangbind_elements = OrderedDict([('policy_id', policy_id), ('type', type), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/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 match
rule.
  """
  __slots__ = ('_path_helper', '_extmethods', '__sequence_id',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__sequence_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sequence-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'policy-forwarding', 'policies', 'policy', 'rules', 'rule', 'config']

  def _get_sequence_id(self):
    """
    Getter method for sequence_id, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/config/sequence_id (uint32)

    YANG Description: Unique sequence number for the policy rule.
    """
    return self.__sequence_id
      
  def _set_sequence_id(self, v, load=False):
    """
    Setter method for sequence_id, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/config/sequence_id (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sequence_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sequence_id() directly.

    YANG Description: Unique sequence number for the policy rule.
    """
    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-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sequence_id 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-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__sequence_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sequence_id(self):
    self.__sequence_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sequence-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)

  sequence_id = __builtin__.property(_get_sequence_id, _set_sequence_id)


  _pyangbind_elements = OrderedDict([('sequence_id', sequence_id), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/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 match
rule.
  """
  __slots__ = ('_path_helper', '_extmethods', '__sequence_id','__matched_pkts','__matched_octets',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__sequence_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sequence-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__matched_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'policy-forwarding', 'policies', 'policy', 'rules', 'rule', 'state']

  def _get_sequence_id(self):
    """
    Getter method for sequence_id, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/state/sequence_id (uint32)

    YANG Description: Unique sequence number for the policy rule.
    """
    return self.__sequence_id
      
  def _set_sequence_id(self, v, load=False):
    """
    Setter method for sequence_id, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/state/sequence_id (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sequence_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sequence_id() directly.

    YANG Description: Unique sequence number for the policy rule.
    """
    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-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sequence_id 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-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__sequence_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sequence_id(self):
    self.__sequence_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sequence-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_matched_pkts(self):
    """
    Getter method for matched_pkts, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/state/matched_pkts (oc-yang:counter64)

    YANG Description: Number of packets matched by the rule.
    """
    return self.__matched_pkts
      
  def _set_matched_pkts(self, v, load=False):
    """
    Setter method for matched_pkts, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/state/matched_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_matched_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_matched_pkts() directly.

    YANG Description: Number of packets matched by the rule.
    """
    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-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """matched_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="matched-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__matched_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_matched_pkts(self):
    self.__matched_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="matched-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_matched_octets(self):
    """
    Getter method for matched_octets, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/state/matched_octets (oc-yang:counter64)

    YANG Description: Bytes matched by the rule.
    """
    return self.__matched_octets
      
  def _set_matched_octets(self, v, load=False):
    """
    Setter method for matched_octets, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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: Bytes matched by the rule.
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)

  sequence_id = __builtin__.property(_get_sequence_id)
  matched_pkts = __builtin__.property(_get_matched_pkts)
  matched_octets = __builtin__.property(_get_matched_octets)


  _pyangbind_elements = OrderedDict([('sequence_id', sequence_id), ('matched_pkts', matched_pkts), ('matched_octets', matched_octets), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_l2_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'policy-forwarding', 'policies', 'policy', 'rules', 'rule', 'l2', 'config']

  def _get_source_mac(self):
    """
    Getter method for source_mac, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=True)


  def _get_destination_mac(self):
    """
    Getter method for destination_mac, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=True)


  def _get_ethertype(self):
    """
    Getter method for ethertype, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_l2_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'policy-forwarding', 'policies', 'policy', 'rules', 'rule', 'l2', 'state']

  def _get_source_mac(self):
    """
    Getter method for source_mac, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)


  def _get_destination_mac(self):
    """
    Getter method for destination_mac, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)


  def _get_ethertype(self):
    """
    Getter method for ethertype, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_l2(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/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/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'policy-forwarding', 'policies', 'policy', 'rules', 'rule', 'l2']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_ipv4_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/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','__protocol','__hop_limit',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:dscp', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'policy-forwarding', 'policies', 'policy', 'rules', 'rule', 'ipv4', 'config']

  def _get_source_address(self):
    """
    Getter method for source_address, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_destination_address(self):
    """
    Getter method for destination_address, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_dscp(self):
    """
    Getter method for dscp, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:dscp', is_config=True)


  def _get_dscp_set(self):
    """
    Getter method for dscp_set, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:dscp', is_config=True)


  def _get_protocol(self):
    """
    Getter method for protocol, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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)
  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), ('protocol', protocol), ('hop_limit', hop_limit), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_ipv4_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/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','__protocol','__hop_limit',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:dscp', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'policy-forwarding', 'policies', 'policy', 'rules', 'rule', 'ipv4', 'state']

  def _get_source_address(self):
    """
    Getter method for source_address, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_destination_address(self):
    """
    Getter method for destination_address, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_dscp(self):
    """
    Getter method for dscp, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:dscp', is_config=False)


  def _get_dscp_set(self):
    """
    Getter method for dscp_set, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:dscp', is_config=False)


  def _get_protocol(self):
    """
    Getter method for protocol, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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)
  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), ('protocol', protocol), ('hop_limit', hop_limit), ])


class yc_ipv4_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_ipv4(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/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',)

  _yang_name = 'ipv4'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'policy-forwarding', 'policies', 'policy', 'rules', 'rule', 'ipv4']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_ipv6_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/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','__protocol','__hop_limit',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:dscp', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'policy-forwarding', 'policies', 'policy', 'rules', 'rule', 'ipv6', 'config']

  def _get_source_address(self):
    """
    Getter method for source_address, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_source_flow_label(self):
    """
    Getter method for source_flow_label, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-flow-label', is_config=True)


  def _get_destination_address(self):
    """
    Getter method for destination_address, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_destination_flow_label(self):
    """
    Getter method for destination_flow_label, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-flow-label', is_config=True)


  def _get_dscp(self):
    """
    Getter method for dscp, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:dscp', is_config=True)


  def _get_dscp_set(self):
    """
    Getter method for dscp_set, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:dscp', is_config=True)


  def _get_protocol(self):
    """
    Getter method for protocol, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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)
  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), ('protocol', protocol), ('hop_limit', hop_limit), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_ipv6_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/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','__protocol','__hop_limit',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:dscp', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'policy-forwarding', 'policies', 'policy', 'rules', 'rule', 'ipv6', 'state']

  def _get_source_address(self):
    """
    Getter method for source_address, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_source_flow_label(self):
    """
    Getter method for source_flow_label, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-flow-label', is_config=False)


  def _get_destination_address(self):
    """
    Getter method for destination_address, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_destination_flow_label(self):
    """
    Getter method for destination_flow_label, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-flow-label', is_config=False)


  def _get_dscp(self):
    """
    Getter method for dscp, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:dscp', is_config=False)


  def _get_dscp_set(self):
    """
    Getter method for dscp_set, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:dscp', is_config=False)


  def _get_protocol(self):
    """
    Getter method for protocol, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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)
  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), ('protocol', protocol), ('hop_limit', hop_limit), ])


class yc_ipv6_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_ipv6(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/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',)

  _yang_name = 'ipv6'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'policy-forwarding', 'policies', 'policy', 'rules', 'rule', 'ipv6']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_transport_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/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','__tcp_flags',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__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="tcp-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'policy-forwarding', 'policies', 'policy', 'rules', 'rule', 'transport', 'config']

  def _get_source_port(self):
    """
    Getter method for source_port, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_destination_port(self):
    """
    Getter method for destination_port, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_tcp_flags(self):
    """
    Getter method for tcp_flags, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/transport/config/tcp_flags (identityref)

    YANG Description: List of TCP flags to match
    """
    return self.__tcp_flags
      
  def _set_tcp_flags(self, v, load=False):
    """
    Setter method for tcp_flags, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/transport/config/tcp_flags (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tcp_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tcp_flags() directly.

    YANG Description: List of TCP flags to match
    """
    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="tcp-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tcp_flags must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance: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="tcp-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__tcp_flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tcp_flags(self):
    self.__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="tcp-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', 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)
  tcp_flags = __builtin__.property(_get_tcp_flags, _set_tcp_flags)


  _pyangbind_elements = OrderedDict([('source_port', source_port), ('source_port_set', source_port_set), ('destination_port', destination_port), ('destination_port_set', destination_port_set), ('tcp_flags', tcp_flags), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_transport_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/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','__tcp_flags',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__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="tcp-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'policy-forwarding', 'policies', 'policy', 'rules', 'rule', 'transport', 'state']

  def _get_source_port(self):
    """
    Getter method for source_port, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_destination_port(self):
    """
    Getter method for destination_port, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_tcp_flags(self):
    """
    Getter method for tcp_flags, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/transport/state/tcp_flags (identityref)

    YANG Description: List of TCP flags to match
    """
    return self.__tcp_flags
      
  def _set_tcp_flags(self, v, load=False):
    """
    Setter method for tcp_flags, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/transport/state/tcp_flags (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tcp_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tcp_flags() directly.

    YANG Description: List of TCP flags to match
    """
    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="tcp-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tcp_flags must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance: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="tcp-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__tcp_flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tcp_flags(self):
    self.__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="tcp-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', 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)
  tcp_flags = __builtin__.property(_get_tcp_flags)


  _pyangbind_elements = OrderedDict([('source_port', source_port), ('source_port_set', source_port_set), ('destination_port', destination_port), ('destination_port_set', destination_port_set), ('tcp_flags', tcp_flags), ])


class yc_transport_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_transport(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/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/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'policy-forwarding', 'policies', 'policy', 'rules', 'rule', 'transport']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/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 forwarding
rule's action.
  """
  __slots__ = ('_path_helper', '_extmethods', '__discard','__decapsulate_gre','__network_instance','__path_selection_group','__next_hop','__decapsulate_mpls_in_udp','__decapsulate_gue',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__discard = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="discard", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__decapsulate_gre = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="decapsulate-gre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__network_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__path_selection_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-selection-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__next_hop = 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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    self.__decapsulate_mpls_in_udp = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="decapsulate-mpls-in-udp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__decapsulate_gue = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="decapsulate-gue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'policy-forwarding', 'policies', 'policy', 'rules', 'rule', 'action', 'config']

  def _get_discard(self):
    """
    Getter method for discard, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/config/discard (boolean)

    YANG Description: When this leaf is set to true, the local system should drop
packets that match the rule.
    """
    return self.__discard
      
  def _set_discard(self, v, load=False):
    """
    Setter method for discard, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/config/discard (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_discard is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_discard() directly.

    YANG Description: When this leaf is set to true, the local system should drop
packets that match the rule.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="discard", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """discard must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="discard", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__discard = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_discard(self):
    self.__discard = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="discard", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_decapsulate_gre(self):
    """
    Getter method for decapsulate_gre, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/config/decapsulate_gre (boolean)

    YANG Description: When this leaf is set to true, the local system should remove
the GRE header from the packet matching the rule. Following
the decapsulation it should subsequently forward the
encapsulated packet according to the relevant lookup (e.g., if
the encapsulated packet is IP, the packet should be routed
according to the IP destination).
    """
    return self.__decapsulate_gre
      
  def _set_decapsulate_gre(self, v, load=False):
    """
    Setter method for decapsulate_gre, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/config/decapsulate_gre (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_decapsulate_gre is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_decapsulate_gre() directly.

    YANG Description: When this leaf is set to true, the local system should remove
the GRE header from the packet matching the rule. Following
the decapsulation it should subsequently forward the
encapsulated packet according to the relevant lookup (e.g., if
the encapsulated packet is IP, the packet should be routed
according to the IP destination).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="decapsulate-gre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """decapsulate_gre must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="decapsulate-gre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__decapsulate_gre = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_decapsulate_gre(self):
    self.__decapsulate_gre = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="decapsulate-gre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_network_instance(self):
    """
    Getter method for network_instance, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/config/network_instance (leafref)

    YANG Description: When this leaf is set, packets matching the match criteria
for the forwarding rule should be looked up in the
network-instance that is referenced rather than the
network-instance with which the interface is associated.
Such configuration allows policy-routing into multiple
sub-topologies from a single ingress access interface, or
different send and receive contexts for a particular
interface (sometimes referred to as half-duplex VRF).
    """
    return self.__network_instance
      
  def _set_network_instance(self, v, load=False):
    """
    Setter method for network_instance, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/config/network_instance (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_network_instance is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_network_instance() directly.

    YANG Description: When this leaf is set, packets matching the match criteria
for the forwarding rule should be looked up in the
network-instance that is referenced rather than the
network-instance with which the interface is associated.
Such configuration allows policy-routing into multiple
sub-topologies from a single ingress access interface, or
different send and receive contexts for a particular
interface (sometimes referred to as half-duplex VRF).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """network_instance must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__network_instance = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_network_instance(self):
    self.__network_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_path_selection_group(self):
    """
    Getter method for path_selection_group, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/config/path_selection_group (leafref)

    YANG Description: When path-selection-group is set, packets matching the
match criteria for the forwarding rule should be forwarded
only via one of the paths that is specified within the
referenced path-selection-group. The next-hop of the packet
within the routing context should be used to determine between
multiple paths that are specified within the group.
    """
    return self.__path_selection_group
      
  def _set_path_selection_group(self, v, load=False):
    """
    Setter method for path_selection_group, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/config/path_selection_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_selection_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_selection_group() directly.

    YANG Description: When path-selection-group is set, packets matching the
match criteria for the forwarding rule should be forwarded
only via one of the paths that is specified within the
referenced path-selection-group. The next-hop of the packet
within the routing context should be used to determine between
multiple paths that are specified within the group.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="path-selection-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_selection_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-selection-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__path_selection_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_selection_group(self):
    self.__path_selection_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-selection-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_next_hop(self):
    """
    Getter method for next_hop, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/config/next_hop (oc-inet:ip-address)

    YANG Description: When an IP next-hop is specified in the next-hop field,
packets matching the match criteria for the forwarding rule
should be forwarded to the next-hop IP address, bypassing any
lookup on the local system.
    """
    return self.__next_hop
      
  def _set_next_hop(self, v, load=False):
    """
    Setter method for next_hop, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/config/next_hop (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hop() directly.

    YANG Description: When an IP next-hop is specified in the next-hop field,
packets matching the match criteria for the forwarding rule
should be forwarded to the next-hop IP address, bypassing any
lookup on the local system.
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hop must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)""",
        })

    self.__next_hop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_next_hop(self):
    self.__next_hop = 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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)


  def _get_decapsulate_mpls_in_udp(self):
    """
    Getter method for decapsulate_mpls_in_udp, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/config/decapsulate_mpls_in_udp (boolean)

    YANG Description: When this leaf is set to true, the local system should remove
the UDP header from the packet matching the rule.
Following the decapsulation it should subsequently forward the
encapsulated packet according to the underlying MPLS label.
    """
    return self.__decapsulate_mpls_in_udp
      
  def _set_decapsulate_mpls_in_udp(self, v, load=False):
    """
    Setter method for decapsulate_mpls_in_udp, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/config/decapsulate_mpls_in_udp (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_decapsulate_mpls_in_udp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_decapsulate_mpls_in_udp() directly.

    YANG Description: When this leaf is set to true, the local system should remove
the UDP header from the packet matching the rule.
Following the decapsulation it should subsequently forward the
encapsulated packet according to the underlying MPLS label.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="decapsulate-mpls-in-udp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """decapsulate_mpls_in_udp must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="decapsulate-mpls-in-udp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__decapsulate_mpls_in_udp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_decapsulate_mpls_in_udp(self):
    self.__decapsulate_mpls_in_udp = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="decapsulate-mpls-in-udp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_decapsulate_gue(self):
    """
    Getter method for decapsulate_gue, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/config/decapsulate_gue (boolean)

    YANG Description: When this leaf is set to true, the local system should remove
the Generic UDP Encapsulation (GUE) header from the packet matching
the rule. Following the decapsulation it should subsequently forward the
encapsulated packet according to the underlying IPv4 or IPv6 header.
    """
    return self.__decapsulate_gue
      
  def _set_decapsulate_gue(self, v, load=False):
    """
    Setter method for decapsulate_gue, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/config/decapsulate_gue (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_decapsulate_gue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_decapsulate_gue() directly.

    YANG Description: When this leaf is set to true, the local system should remove
the Generic UDP Encapsulation (GUE) header from the packet matching
the rule. Following the decapsulation it should subsequently forward the
encapsulated packet according to the underlying IPv4 or IPv6 header.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="decapsulate-gue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """decapsulate_gue must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="decapsulate-gue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__decapsulate_gue = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_decapsulate_gue(self):
    self.__decapsulate_gue = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="decapsulate-gue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  discard = __builtin__.property(_get_discard, _set_discard)
  decapsulate_gre = __builtin__.property(_get_decapsulate_gre, _set_decapsulate_gre)
  network_instance = __builtin__.property(_get_network_instance, _set_network_instance)
  path_selection_group = __builtin__.property(_get_path_selection_group, _set_path_selection_group)
  next_hop = __builtin__.property(_get_next_hop, _set_next_hop)
  decapsulate_mpls_in_udp = __builtin__.property(_get_decapsulate_mpls_in_udp, _set_decapsulate_mpls_in_udp)
  decapsulate_gue = __builtin__.property(_get_decapsulate_gue, _set_decapsulate_gue)


  _pyangbind_elements = OrderedDict([('discard', discard), ('decapsulate_gre', decapsulate_gre), ('network_instance', network_instance), ('path_selection_group', path_selection_group), ('next_hop', next_hop), ('decapsulate_mpls_in_udp', decapsulate_mpls_in_udp), ('decapsulate_gue', decapsulate_gue), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/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
forwarding rule's action.
  """
  __slots__ = ('_path_helper', '_extmethods', '__discard','__decapsulate_gre','__network_instance','__path_selection_group','__next_hop','__decapsulate_mpls_in_udp','__decapsulate_gue',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__discard = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="discard", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__decapsulate_gre = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="decapsulate-gre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__network_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__path_selection_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-selection-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__next_hop = 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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__decapsulate_mpls_in_udp = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="decapsulate-mpls-in-udp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__decapsulate_gue = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="decapsulate-gue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'policy-forwarding', 'policies', 'policy', 'rules', 'rule', 'action', 'state']

  def _get_discard(self):
    """
    Getter method for discard, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/state/discard (boolean)

    YANG Description: When this leaf is set to true, the local system should drop
packets that match the rule.
    """
    return self.__discard
      
  def _set_discard(self, v, load=False):
    """
    Setter method for discard, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/state/discard (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_discard is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_discard() directly.

    YANG Description: When this leaf is set to true, the local system should drop
packets that match the rule.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="discard", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """discard must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="discard", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__discard = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_discard(self):
    self.__discard = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="discard", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_decapsulate_gre(self):
    """
    Getter method for decapsulate_gre, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/state/decapsulate_gre (boolean)

    YANG Description: When this leaf is set to true, the local system should remove
the GRE header from the packet matching the rule. Following
the decapsulation it should subsequently forward the
encapsulated packet according to the relevant lookup (e.g., if
the encapsulated packet is IP, the packet should be routed
according to the IP destination).
    """
    return self.__decapsulate_gre
      
  def _set_decapsulate_gre(self, v, load=False):
    """
    Setter method for decapsulate_gre, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/state/decapsulate_gre (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_decapsulate_gre is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_decapsulate_gre() directly.

    YANG Description: When this leaf is set to true, the local system should remove
the GRE header from the packet matching the rule. Following
the decapsulation it should subsequently forward the
encapsulated packet according to the relevant lookup (e.g., if
the encapsulated packet is IP, the packet should be routed
according to the IP destination).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="decapsulate-gre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """decapsulate_gre must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="decapsulate-gre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__decapsulate_gre = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_decapsulate_gre(self):
    self.__decapsulate_gre = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="decapsulate-gre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_network_instance(self):
    """
    Getter method for network_instance, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/state/network_instance (leafref)

    YANG Description: When this leaf is set, packets matching the match criteria
for the forwarding rule should be looked up in the
network-instance that is referenced rather than the
network-instance with which the interface is associated.
Such configuration allows policy-routing into multiple
sub-topologies from a single ingress access interface, or
different send and receive contexts for a particular
interface (sometimes referred to as half-duplex VRF).
    """
    return self.__network_instance
      
  def _set_network_instance(self, v, load=False):
    """
    Setter method for network_instance, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/state/network_instance (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_network_instance is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_network_instance() directly.

    YANG Description: When this leaf is set, packets matching the match criteria
for the forwarding rule should be looked up in the
network-instance that is referenced rather than the
network-instance with which the interface is associated.
Such configuration allows policy-routing into multiple
sub-topologies from a single ingress access interface, or
different send and receive contexts for a particular
interface (sometimes referred to as half-duplex VRF).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """network_instance must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__network_instance = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_network_instance(self):
    self.__network_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_path_selection_group(self):
    """
    Getter method for path_selection_group, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/state/path_selection_group (leafref)

    YANG Description: When path-selection-group is set, packets matching the
match criteria for the forwarding rule should be forwarded
only via one of the paths that is specified within the
referenced path-selection-group. The next-hop of the packet
within the routing context should be used to determine between
multiple paths that are specified within the group.
    """
    return self.__path_selection_group
      
  def _set_path_selection_group(self, v, load=False):
    """
    Setter method for path_selection_group, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/state/path_selection_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_selection_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_selection_group() directly.

    YANG Description: When path-selection-group is set, packets matching the
match criteria for the forwarding rule should be forwarded
only via one of the paths that is specified within the
referenced path-selection-group. The next-hop of the packet
within the routing context should be used to determine between
multiple paths that are specified within the group.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="path-selection-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_selection_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-selection-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__path_selection_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_selection_group(self):
    self.__path_selection_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-selection-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_next_hop(self):
    """
    Getter method for next_hop, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/state/next_hop (oc-inet:ip-address)

    YANG Description: When an IP next-hop is specified in the next-hop field,
packets matching the match criteria for the forwarding rule
should be forwarded to the next-hop IP address, bypassing any
lookup on the local system.
    """
    return self.__next_hop
      
  def _set_next_hop(self, v, load=False):
    """
    Setter method for next_hop, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/state/next_hop (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hop() directly.

    YANG Description: When an IP next-hop is specified in the next-hop field,
packets matching the match criteria for the forwarding rule
should be forwarded to the next-hop IP address, bypassing any
lookup on the local system.
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hop must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__next_hop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_next_hop(self):
    self.__next_hop = 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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_decapsulate_mpls_in_udp(self):
    """
    Getter method for decapsulate_mpls_in_udp, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/state/decapsulate_mpls_in_udp (boolean)

    YANG Description: When this leaf is set to true, the local system should remove
the UDP header from the packet matching the rule.
Following the decapsulation it should subsequently forward the
encapsulated packet according to the underlying MPLS label.
    """
    return self.__decapsulate_mpls_in_udp
      
  def _set_decapsulate_mpls_in_udp(self, v, load=False):
    """
    Setter method for decapsulate_mpls_in_udp, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/state/decapsulate_mpls_in_udp (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_decapsulate_mpls_in_udp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_decapsulate_mpls_in_udp() directly.

    YANG Description: When this leaf is set to true, the local system should remove
the UDP header from the packet matching the rule.
Following the decapsulation it should subsequently forward the
encapsulated packet according to the underlying MPLS label.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="decapsulate-mpls-in-udp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """decapsulate_mpls_in_udp must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="decapsulate-mpls-in-udp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__decapsulate_mpls_in_udp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_decapsulate_mpls_in_udp(self):
    self.__decapsulate_mpls_in_udp = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="decapsulate-mpls-in-udp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_decapsulate_gue(self):
    """
    Getter method for decapsulate_gue, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/state/decapsulate_gue (boolean)

    YANG Description: When this leaf is set to true, the local system should remove
the Generic UDP Encapsulation (GUE) header from the packet matching
the rule. Following the decapsulation it should subsequently forward the
encapsulated packet according to the underlying IPv4 or IPv6 header.
    """
    return self.__decapsulate_gue
      
  def _set_decapsulate_gue(self, v, load=False):
    """
    Setter method for decapsulate_gue, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/state/decapsulate_gue (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_decapsulate_gue is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_decapsulate_gue() directly.

    YANG Description: When this leaf is set to true, the local system should remove
the Generic UDP Encapsulation (GUE) header from the packet matching
the rule. Following the decapsulation it should subsequently forward the
encapsulated packet according to the underlying IPv4 or IPv6 header.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="decapsulate-gue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """decapsulate_gue must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="decapsulate-gue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__decapsulate_gue = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_decapsulate_gue(self):
    self.__decapsulate_gue = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="decapsulate-gue", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  discard = __builtin__.property(_get_discard)
  decapsulate_gre = __builtin__.property(_get_decapsulate_gre)
  network_instance = __builtin__.property(_get_network_instance)
  path_selection_group = __builtin__.property(_get_path_selection_group)
  next_hop = __builtin__.property(_get_next_hop)
  decapsulate_mpls_in_udp = __builtin__.property(_get_decapsulate_mpls_in_udp)
  decapsulate_gue = __builtin__.property(_get_decapsulate_gue)


  _pyangbind_elements = OrderedDict([('discard', discard), ('decapsulate_gre', decapsulate_gre), ('network_instance', network_instance), ('path_selection_group', path_selection_group), ('next_hop', next_hop), ('decapsulate_mpls_in_udp', decapsulate_mpls_in_udp), ('decapsulate_gue', decapsulate_gue), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action_encapsulate_gre_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/action/encapsulate-gre/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for the GRE encapsulation rules action.
  """
  __slots__ = ('_path_helper', '_extmethods', '__identifying_prefix',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__identifying_prefix = 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])'}),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="identifying-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'policy-forwarding', 'policies', 'policy', 'rules', 'rule', 'action', 'encapsulate-gre', 'config']

  def _get_identifying_prefix(self):
    """
    Getter method for identifying_prefix, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/encapsulate_gre/config/identifying_prefix (oc-inet:ip-prefix)

    YANG Description: An IP prefix that can be used to identify the group of
GRE endpoints that are being encapsulated towards. Systems
that require an IP identifier for the tunnel set
should use this prefix as the next-hop identifier.
    """
    return self.__identifying_prefix
      
  def _set_identifying_prefix(self, v, load=False):
    """
    Setter method for identifying_prefix, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/encapsulate_gre/config/identifying_prefix (oc-inet:ip-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_identifying_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_identifying_prefix() directly.

    YANG Description: An IP prefix that can be used to identify the group of
GRE endpoints that are being encapsulated towards. Systems
that require an IP identifier for the tunnel set
should use this prefix as the next-hop identifier.
    """
    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])'}),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="identifying-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """identifying_prefix must be of a type compatible with oc-inet:ip-prefix""",
          'defined-type': "oc-inet:ip-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])'}),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="identifying-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=True)""",
        })

    self.__identifying_prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_identifying_prefix(self):
    self.__identifying_prefix = 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])'}),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="identifying-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=True)

  identifying_prefix = __builtin__.property(_get_identifying_prefix, _set_identifying_prefix)


  _pyangbind_elements = OrderedDict([('identifying_prefix', identifying_prefix), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action_encapsulate_gre_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/action/encapsulate-gre/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 GRE encapsulation rule
action.
  """
  __slots__ = ('_path_helper', '_extmethods', '__identifying_prefix',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__identifying_prefix = 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])'}),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="identifying-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', 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 ['network-instances', 'network-instance', 'policy-forwarding', 'policies', 'policy', 'rules', 'rule', 'action', 'encapsulate-gre', 'state']

  def _get_identifying_prefix(self):
    """
    Getter method for identifying_prefix, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/encapsulate_gre/state/identifying_prefix (oc-inet:ip-prefix)

    YANG Description: An IP prefix that can be used to identify the group of
GRE endpoints that are being encapsulated towards. Systems
that require an IP identifier for the tunnel set
should use this prefix as the next-hop identifier.
    """
    return self.__identifying_prefix
      
  def _set_identifying_prefix(self, v, load=False):
    """
    Setter method for identifying_prefix, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/encapsulate_gre/state/identifying_prefix (oc-inet:ip-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_identifying_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_identifying_prefix() directly.

    YANG Description: An IP prefix that can be used to identify the group of
GRE endpoints that are being encapsulated towards. Systems
that require an IP identifier for the tunnel set
should use this prefix as the next-hop identifier.
    """
    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])'}),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="identifying-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """identifying_prefix must be of a type compatible with oc-inet:ip-prefix""",
          'defined-type': "oc-inet:ip-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])'}),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="identifying-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=False)""",
        })

    self.__identifying_prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_identifying_prefix(self):
    self.__identifying_prefix = 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])'}),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="identifying-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=False)

  identifying_prefix = __builtin__.property(_get_identifying_prefix)


  _pyangbind_elements = OrderedDict([('identifying_prefix', identifying_prefix), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action_encapsulate_gre_targets_target_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/action/encapsulate-gre/targets/target/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for the GRE target.
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__source','__destination','__ip_ttl',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__source = 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}'}),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}|:))'}),], is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    self.__destination = 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])'}),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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=True)
    self.__ip_ttl = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="ip-ttl", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'policy-forwarding', 'policies', 'policy', 'rules', 'rule', 'action', 'encapsulate-gre', 'targets', 'target', 'config']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/encapsulate_gre/targets/target/config/id (string)

    YANG Description: A unique identifier for the target.
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/encapsulate_gre/targets/target/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: A unique identifier for the target.
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_source(self):
    """
    Getter method for source, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/encapsulate_gre/targets/target/config/source (oc-inet:ip-address)

    YANG Description: The source IP address that should be used when encapsulating
packets from the local system.
    """
    return self.__source
      
  def _set_source(self, v, load=False):
    """
    Setter method for source, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/encapsulate_gre/targets/target/config/source (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source() directly.

    YANG Description: The source IP address that should be used when encapsulating
packets from the local system.
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)""",
        })

    self.__source = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source(self):
    self.__source = 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}'}),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}|:))'}),], is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)


  def _get_destination(self):
    """
    Getter method for destination, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/encapsulate_gre/targets/target/config/destination (oc-inet:ip-prefix)

    YANG Description: The set of destination addresses that should be encapsulated towards.
Where a subnet is specified, each address within the subnet should be
treated as an independent destination for encapsulated traffic. Packets
should be distributed with ECMP across the set of tunnel destination
addresses.
    """
    return self.__destination
      
  def _set_destination(self, v, load=False):
    """
    Setter method for destination, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/encapsulate_gre/targets/target/config/destination (oc-inet:ip-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination() directly.

    YANG Description: The set of destination addresses that should be encapsulated towards.
Where a subnet is specified, each address within the subnet should be
treated as an independent destination for encapsulated traffic. Packets
should be distributed with ECMP across the set of tunnel destination
addresses.
    """
    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])'}),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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination must be of a type compatible with oc-inet:ip-prefix""",
          'defined-type': "oc-inet:ip-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])'}),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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=True)""",
        })

    self.__destination = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination(self):
    self.__destination = 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])'}),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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=True)


  def _get_ip_ttl(self):
    """
    Getter method for ip_ttl, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/encapsulate_gre/targets/target/config/ip_ttl (uint8)

    YANG Description: The TTL that should be specified in the IP header of the GRE packet
encapsulating the packet matching the rule.
    """
    return self.__ip_ttl
      
  def _set_ip_ttl(self, v, load=False):
    """
    Setter method for ip_ttl, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/encapsulate_gre/targets/target/config/ip_ttl (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ip_ttl is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ip_ttl() directly.

    YANG Description: The TTL that should be specified in the IP header of the GRE packet
encapsulating the packet matching the rule.
    """
    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="ip-ttl", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ip_ttl 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="ip-ttl", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
        })

    self.__ip_ttl = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ip_ttl(self):
    self.__ip_ttl = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="ip-ttl", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)

  id = __builtin__.property(_get_id, _set_id)
  source = __builtin__.property(_get_source, _set_source)
  destination = __builtin__.property(_get_destination, _set_destination)
  ip_ttl = __builtin__.property(_get_ip_ttl, _set_ip_ttl)


  _pyangbind_elements = OrderedDict([('id', id), ('source', source), ('destination', destination), ('ip_ttl', ip_ttl), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action_encapsulate_gre_targets_target_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/action/encapsulate-gre/targets/target/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 GRE target.
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__source','__destination','__ip_ttl',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__source = 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}'}),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}|:))'}),], is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__destination = 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])'}),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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=False)
    self.__ip_ttl = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="ip-ttl", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'policy-forwarding', 'policies', 'policy', 'rules', 'rule', 'action', 'encapsulate-gre', 'targets', 'target', 'state']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/encapsulate_gre/targets/target/state/id (string)

    YANG Description: A unique identifier for the target.
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/encapsulate_gre/targets/target/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: A unique identifier for the target.
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_source(self):
    """
    Getter method for source, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/encapsulate_gre/targets/target/state/source (oc-inet:ip-address)

    YANG Description: The source IP address that should be used when encapsulating
packets from the local system.
    """
    return self.__source
      
  def _set_source(self, v, load=False):
    """
    Setter method for source, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/encapsulate_gre/targets/target/state/source (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source() directly.

    YANG Description: The source IP address that should be used when encapsulating
packets from the local system.
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__source = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source(self):
    self.__source = 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}'}),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}|:))'}),], is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_destination(self):
    """
    Getter method for destination, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/encapsulate_gre/targets/target/state/destination (oc-inet:ip-prefix)

    YANG Description: The set of destination addresses that should be encapsulated towards.
Where a subnet is specified, each address within the subnet should be
treated as an independent destination for encapsulated traffic. Packets
should be distributed with ECMP across the set of tunnel destination
addresses.
    """
    return self.__destination
      
  def _set_destination(self, v, load=False):
    """
    Setter method for destination, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/encapsulate_gre/targets/target/state/destination (oc-inet:ip-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination() directly.

    YANG Description: The set of destination addresses that should be encapsulated towards.
Where a subnet is specified, each address within the subnet should be
treated as an independent destination for encapsulated traffic. Packets
should be distributed with ECMP across the set of tunnel destination
addresses.
    """
    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])'}),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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination must be of a type compatible with oc-inet:ip-prefix""",
          'defined-type': "oc-inet:ip-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])'}),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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=False)""",
        })

    self.__destination = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination(self):
    self.__destination = 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])'}),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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=False)


  def _get_ip_ttl(self):
    """
    Getter method for ip_ttl, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/encapsulate_gre/targets/target/state/ip_ttl (uint8)

    YANG Description: The TTL that should be specified in the IP header of the GRE packet
encapsulating the packet matching the rule.
    """
    return self.__ip_ttl
      
  def _set_ip_ttl(self, v, load=False):
    """
    Setter method for ip_ttl, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/encapsulate_gre/targets/target/state/ip_ttl (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ip_ttl is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ip_ttl() directly.

    YANG Description: The TTL that should be specified in the IP header of the GRE packet
encapsulating the packet matching the rule.
    """
    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="ip-ttl", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ip_ttl 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="ip-ttl", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__ip_ttl = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ip_ttl(self):
    self.__ip_ttl = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="ip-ttl", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)

  id = __builtin__.property(_get_id)
  source = __builtin__.property(_get_source)
  destination = __builtin__.property(_get_destination)
  ip_ttl = __builtin__.property(_get_ip_ttl)


  _pyangbind_elements = OrderedDict([('id', id), ('source', source), ('destination', destination), ('ip_ttl', ip_ttl), ])


class yc_target_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action_encapsulate_gre_targets_target(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/action/encapsulate-gre/targets/target. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Each target specified within this list should be treated as a
endpoint to which packets should be GRE encapsulated. Where the
set of destinations described within a single entry expands to
more than one destination IP address, packets should be load
shared across the destination using the local system's ECMP hashing
mechanisms.
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__config','__state',)

  _yang_name = 'target'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action_encapsulate_gre_targets_target_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action_encapsulate_gre_targets_target_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'policy-forwarding', 'policies', 'policy', 'rules', 'rule', 'action', 'encapsulate-gre', 'targets', 'target']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/encapsulate_gre/targets/target/id (leafref)

    YANG Description: Reference to the unique identifier for the target.
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/encapsulate_gre/targets/target/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 the unique identifier for the target.
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/encapsulate_gre/targets/target/config (container)

    YANG Description: Configuration parameters for the GRE target.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/encapsulate_gre/targets/target/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 GRE target.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action_encapsulate_gre_targets_target_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action_encapsulate_gre_targets_target_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action_encapsulate_gre_targets_target_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/encapsulate_gre/targets/target/state (container)

    YANG Description: Operational state parameters for the GRE target.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/encapsulate_gre/targets/target/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 GRE target.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action_encapsulate_gre_targets_target_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action_encapsulate_gre_targets_target_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action_encapsulate_gre_targets_target_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_targets_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action_encapsulate_gre_targets(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/action/encapsulate-gre/targets. 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 GRE tunnel targets that
should be encapsulated towards.
  """
  __slots__ = ('_path_helper', '_extmethods', '__target',)

  _yang_name = 'targets'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__target = YANGDynClass(base=YANGListType("id",yc_target_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action_encapsulate_gre_targets_target, yang_name="target", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'policy-forwarding', 'policies', 'policy', 'rules', 'rule', 'action', 'encapsulate-gre', 'targets']

  def _get_target(self):
    """
    Getter method for target, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/encapsulate_gre/targets/target (list)

    YANG Description: Each target specified within this list should be treated as a
endpoint to which packets should be GRE encapsulated. Where the
set of destinations described within a single entry expands to
more than one destination IP address, packets should be load
shared across the destination using the local system's ECMP hashing
mechanisms.
    """
    return self.__target
      
  def _set_target(self, v, load=False):
    """
    Setter method for target, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/encapsulate_gre/targets/target (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_target is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_target() directly.

    YANG Description: Each target specified within this list should be treated as a
endpoint to which packets should be GRE encapsulated. Where the
set of destinations described within a single entry expands to
more than one destination IP address, packets should be load
shared across the destination using the local system's ECMP hashing
mechanisms.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("id",yc_target_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action_encapsulate_gre_targets_target, yang_name="target", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """target must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("id",yc_target_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action_encapsulate_gre_targets_target, yang_name="target", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__target = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_target(self):
    self.__target = YANGDynClass(base=YANGListType("id",yc_target_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action_encapsulate_gre_targets_target, yang_name="target", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  target = __builtin__.property(_get_target, _set_target)


  _pyangbind_elements = OrderedDict([('target', target), ])


class yc_encapsulate_gre_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action_encapsulate_gre(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/action/encapsulate-gre. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Packets matching the policy rule should be GRE encapsulated
towards the set of targets defined within the target list. Where
more than one target is specified, or the target subnet expands
to more than one endpoint, packets should be load-balanced across
the destination addresses within the subnets.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__targets',)

  _yang_name = 'encapsulate-gre'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action_encapsulate_gre_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action_encapsulate_gre_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__targets = YANGDynClass(base=yc_targets_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action_encapsulate_gre_targets, is_container='container', yang_name="targets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'policy-forwarding', 'policies', 'policy', 'rules', 'rule', 'action', 'encapsulate-gre']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/encapsulate_gre/config (container)

    YANG Description: Configuration parameters for the GRE encapsulation rules action.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/encapsulate_gre/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 GRE encapsulation rules action.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action_encapsulate_gre_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action_encapsulate_gre_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action_encapsulate_gre_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/encapsulate_gre/state (container)

    YANG Description: Operational state parameters for the GRE encapsulation rule
action.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/encapsulate_gre/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 GRE encapsulation rule
action.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action_encapsulate_gre_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action_encapsulate_gre_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action_encapsulate_gre_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_targets(self):
    """
    Getter method for targets, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/encapsulate_gre/targets (container)

    YANG Description: Surrounding container for the list of GRE tunnel targets that
should be encapsulated towards.
    """
    return self.__targets
      
  def _set_targets(self, v, load=False):
    """
    Setter method for targets, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/encapsulate_gre/targets (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_targets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_targets() directly.

    YANG Description: Surrounding container for the list of GRE tunnel targets that
should be encapsulated towards.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_targets_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action_encapsulate_gre_targets, is_container='container', yang_name="targets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """targets must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_targets_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action_encapsulate_gre_targets, is_container='container', yang_name="targets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__targets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_targets(self):
    self.__targets = YANGDynClass(base=yc_targets_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action_encapsulate_gre_targets, is_container='container', yang_name="targets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  targets = __builtin__.property(_get_targets, _set_targets)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('targets', targets), ])


class yc_action_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/action. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The forwarding policy action to be applied for
packets matching the rule.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__encapsulate_gre',)

  _yang_name = 'action'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__encapsulate_gre = YANGDynClass(base=yc_encapsulate_gre_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action_encapsulate_gre, is_container='container', yang_name="encapsulate-gre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'policy-forwarding', 'policies', 'policy', 'rules', 'rule', 'action']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/config (container)

    YANG Description: Configuration parameters relating to the forwarding
rule's action.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 forwarding
rule's action.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/state (container)

    YANG Description: Operational state parameters relating to the
forwarding rule's action.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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
forwarding rule's action.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_encapsulate_gre(self):
    """
    Getter method for encapsulate_gre, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/encapsulate_gre (container)

    YANG Description: Packets matching the policy rule should be GRE encapsulated
towards the set of targets defined within the target list. Where
more than one target is specified, or the target subnet expands
to more than one endpoint, packets should be load-balanced across
the destination addresses within the subnets.
    """
    return self.__encapsulate_gre
      
  def _set_encapsulate_gre(self, v, load=False):
    """
    Setter method for encapsulate_gre, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action/encapsulate_gre (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_encapsulate_gre is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_encapsulate_gre() directly.

    YANG Description: Packets matching the policy rule should be GRE encapsulated
towards the set of targets defined within the target list. Where
more than one target is specified, or the target subnet expands
to more than one endpoint, packets should be load-balanced across
the destination addresses within the subnets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_encapsulate_gre_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action_encapsulate_gre, is_container='container', yang_name="encapsulate-gre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """encapsulate_gre must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_encapsulate_gre_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action_encapsulate_gre, is_container='container', yang_name="encapsulate-gre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__encapsulate_gre = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_encapsulate_gre(self):
    self.__encapsulate_gre = YANGDynClass(base=yc_encapsulate_gre_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action_encapsulate_gre, is_container='container', yang_name="encapsulate-gre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  encapsulate_gre = __builtin__.property(_get_encapsulate_gre, _set_encapsulate_gre)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('encapsulate_gre', encapsulate_gre), ])


class yc_rule_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding/policies/policy/rules/rule. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A match rule for the policy. In the case that multiple
criteria are specified within a single rule, all criteria
must be met for the rule to be applied to a packet.
  """
  __slots__ = ('_path_helper', '_extmethods', '__sequence_id','__config','__state','__l2','__ipv4','__ipv6','__transport','__action',)

  _yang_name = 'rule'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__sequence_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__l2 = YANGDynClass(base=yc_l2_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__ipv4 = YANGDynClass(base=yc_ipv4_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__ipv6 = YANGDynClass(base=yc_ipv6_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__transport = YANGDynClass(base=yc_transport_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__action = YANGDynClass(base=yc_action_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action, is_container='container', yang_name="action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'policy-forwarding', 'policies', 'policy', 'rules', 'rule']

  def _get_sequence_id(self):
    """
    Getter method for sequence_id, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/sequence_id (leafref)

    YANG Description: A unique sequence identifier for the match rule.
    """
    return self.__sequence_id
      
  def _set_sequence_id(self, v, load=False):
    """
    Setter method for sequence_id, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/sequence_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sequence_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sequence_id() directly.

    YANG Description: A unique sequence identifier for the match rule.
    """
    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-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sequence_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__sequence_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sequence_id(self):
    self.__sequence_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sequence-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/config (container)

    YANG Description: Configuration parameters relating to the match
rule.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 match
rule.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/state (container)

    YANG Description: Operational state parameters relating to the match
rule.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 match
rule.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_l2(self):
    """
    Getter method for l2, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_ipv4(self):
    """
    Getter method for ipv4, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_ipv6(self):
    """
    Getter method for ipv6, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_transport(self):
    """
    Getter method for transport, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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 /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_action(self):
    """
    Getter method for action, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action (container)

    YANG Description: The forwarding policy action to be applied for
packets matching the rule.
    """
    return self.__action
      
  def _set_action(self, v, load=False):
    """
    Setter method for action, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule/action (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_action is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_action() directly.

    YANG Description: The forwarding policy action to be applied for
packets matching the rule.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_action_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action, is_container='container', yang_name="action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """action must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_action_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action, is_container='container', yang_name="action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__action = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_action(self):
    self.__action = YANGDynClass(base=yc_action_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule_action, is_container='container', yang_name="action", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  sequence_id = __builtin__.property(_get_sequence_id, _set_sequence_id)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  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)
  action = __builtin__.property(_get_action, _set_action)


  _pyangbind_elements = OrderedDict([('sequence_id', sequence_id), ('config', config), ('state', state), ('l2', l2), ('ipv4', ipv4), ('ipv6', ipv6), ('transport', transport), ('action', action), ])


class yc_rules_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding/policies/policy/rules. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The criteria that should be matched for a packet to be
forwarded according to the policy action.
  """
  __slots__ = ('_path_helper', '_extmethods', '__rule',)

  _yang_name = 'rules'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__rule = YANGDynClass(base=YANGListType("sequence_id",yc_rule_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule, yang_name="rule", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence-id', extensions=None), is_container='list', yang_name="rule", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'policy-forwarding', 'policies', 'policy', 'rules']

  def _get_rule(self):
    """
    Getter method for rule, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule (list)

    YANG Description: A match rule for the policy. In the case that multiple
criteria are specified within a single rule, all criteria
must be met for the rule to be applied to a packet.
    """
    return self.__rule
      
  def _set_rule(self, v, load=False):
    """
    Setter method for rule, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules/rule (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_rule is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_rule() directly.

    YANG Description: A match rule for the policy. In the case that multiple
criteria are specified within a single rule, all criteria
must be met for the rule to be applied to a packet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("sequence_id",yc_rule_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule, yang_name="rule", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence-id', extensions=None), is_container='list', yang_name="rule", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """rule must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("sequence_id",yc_rule_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule, yang_name="rule", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence-id', extensions=None), is_container='list', yang_name="rule", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__rule = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_rule(self):
    self.__rule = YANGDynClass(base=YANGListType("sequence_id",yc_rule_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules_rule, yang_name="rule", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence-id', extensions=None), is_container='list', yang_name="rule", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  rule = __builtin__.property(_get_rule, _set_rule)


  _pyangbind_elements = OrderedDict([('rule', rule), ])


class yc_policy_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding/policies/policy. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A forwarding policy is defined to have a set of match
criteria, allowing particular fields of a packet's header to
be matched, and a set of forwarding actions which determines
how the local system should forward the packet.
  """
  __slots__ = ('_path_helper', '_extmethods', '__policy_id','__config','__state','__rules',)

  _yang_name = 'policy'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__policy_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="policy-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__rules = YANGDynClass(base=yc_rules_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules, is_container='container', yang_name="rules", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'policy-forwarding', 'policies', 'policy']

  def _get_policy_id(self):
    """
    Getter method for policy_id, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/policy_id (leafref)

    YANG Description: Reference to the identifier for the forwarding-policy.
    """
    return self.__policy_id
      
  def _set_policy_id(self, v, load=False):
    """
    Setter method for policy_id, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/policy_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_policy_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_policy_id() directly.

    YANG Description: Reference to the identifier for the forwarding-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="policy-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """policy_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="policy-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__policy_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_policy_id(self):
    self.__policy_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="policy-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/config (container)

    YANG Description: Configuration options relating to the forwarding
policy.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/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 options relating to the forwarding
policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/state (container)

    YANG Description: Operational state parameters relating to the forwarding
policy.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/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 the forwarding
policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_policies_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_rules(self):
    """
    Getter method for rules, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules (container)

    YANG Description: The criteria that should be matched for a packet to be
forwarded according to the policy action.
    """
    return self.__rules
      
  def _set_rules(self, v, load=False):
    """
    Setter method for rules, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy/rules (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_rules is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_rules() directly.

    YANG Description: The criteria that should be matched for a packet to be
forwarded according to the policy action.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_rules_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules, is_container='container', yang_name="rules", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """rules must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_rules_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules, is_container='container', yang_name="rules", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__rules = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_rules(self):
    self.__rules = YANGDynClass(base=yc_rules_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy_rules, is_container='container', yang_name="rules", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  policy_id = __builtin__.property(_get_policy_id, _set_policy_id)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  rules = __builtin__.property(_get_rules, _set_rules)


  _pyangbind_elements = OrderedDict([('policy_id', policy_id), ('config', config), ('state', state), ('rules', rules), ])


class yc_policies_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding/policies. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Forwarding policies defined to enact policy-based forwarding
on the local system.
  """
  __slots__ = ('_path_helper', '_extmethods', '__policy',)

  _yang_name = 'policies'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__policy = YANGDynClass(base=YANGListType("policy_id",yc_policy_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy, yang_name="policy", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='policy-id', extensions=None), is_container='list', yang_name="policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'policy-forwarding', 'policies']

  def _get_policy(self):
    """
    Getter method for policy, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy (list)

    YANG Description: A forwarding policy is defined to have a set of match
criteria, allowing particular fields of a packet's header to
be matched, and a set of forwarding actions which determines
how the local system should forward the packet.
    """
    return self.__policy
      
  def _set_policy(self, v, load=False):
    """
    Setter method for policy, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies/policy (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_policy() directly.

    YANG Description: A forwarding policy is defined to have a set of match
criteria, allowing particular fields of a packet's header to
be matched, and a set of forwarding actions which determines
how the local system should forward the packet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("policy_id",yc_policy_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy, yang_name="policy", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='policy-id', extensions=None), is_container='list', yang_name="policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """policy must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("policy_id",yc_policy_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy, yang_name="policy", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='policy-id', extensions=None), is_container='list', yang_name="policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_policy(self):
    self.__policy = YANGDynClass(base=YANGListType("policy_id",yc_policy_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies_policy, yang_name="policy", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='policy-id', extensions=None), is_container='list', yang_name="policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  policy = __builtin__.property(_get_policy, _set_policy)


  _pyangbind_elements = OrderedDict([('policy', policy), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_policy_forwarding_interfaces_interface_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding/interfaces/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 an interface to
policy forwarding rule binding.
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id','__apply_forwarding_policy','__apply_vrf_selection_policy',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=True)
    self.__apply_forwarding_policy = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="apply-forwarding-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__apply_vrf_selection_policy = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="apply-vrf-selection-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'policy-forwarding', 'interfaces', 'interface', 'config']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/policy_forwarding/interfaces/interface/config/interface_id (oc-if:interface-id)

    YANG Description: A unique 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 /network_instances/network_instance/policy_forwarding/interfaces/interface/config/interface_id (oc-if:interface-id)
    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: A unique 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_id must be of a type compatible with oc-if:interface-id""",
          'defined-type': "oc-if:interface-id",
          '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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=True)


  def _get_apply_forwarding_policy(self):
    """
    Getter method for apply_forwarding_policy, mapped from YANG variable /network_instances/network_instance/policy_forwarding/interfaces/interface/config/apply_forwarding_policy (leafref)

    YANG Description: The policy to be applied on the interface. Packets ingress on
the referenced interface should be compared to the match
criteria within the specified policy, and in the case that
these criteria are met, the forwarding actions specified
applied. These policies should be applied following quality of
service classification, and ACL actions if such entities are
referenced by the corresponding interface.
    """
    return self.__apply_forwarding_policy
      
  def _set_apply_forwarding_policy(self, v, load=False):
    """
    Setter method for apply_forwarding_policy, mapped from YANG variable /network_instances/network_instance/policy_forwarding/interfaces/interface/config/apply_forwarding_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_apply_forwarding_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_apply_forwarding_policy() directly.

    YANG Description: The policy to be applied on the interface. Packets ingress on
the referenced interface should be compared to the match
criteria within the specified policy, and in the case that
these criteria are met, the forwarding actions specified
applied. These policies should be applied following quality of
service classification, and ACL actions if such entities are
referenced by the corresponding interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="apply-forwarding-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """apply_forwarding_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="apply-forwarding-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__apply_forwarding_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_apply_forwarding_policy(self):
    self.__apply_forwarding_policy = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="apply-forwarding-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_apply_vrf_selection_policy(self):
    """
    Getter method for apply_vrf_selection_policy, mapped from YANG variable /network_instances/network_instance/policy_forwarding/interfaces/interface/config/apply_vrf_selection_policy (leafref)

    YANG Description: Apply the specific VRF selection policy on the interface. The referenced policy
MUST be of type VRF_SELECTION_POLICY. The VRF selection policy may coexist with
a policy-forwarding policy.

The policy specified in this leaf is used to specifically choose the L3VRF network
instance that is used for specific input criteria of packets.
    """
    return self.__apply_vrf_selection_policy
      
  def _set_apply_vrf_selection_policy(self, v, load=False):
    """
    Setter method for apply_vrf_selection_policy, mapped from YANG variable /network_instances/network_instance/policy_forwarding/interfaces/interface/config/apply_vrf_selection_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_apply_vrf_selection_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_apply_vrf_selection_policy() directly.

    YANG Description: Apply the specific VRF selection policy on the interface. The referenced policy
MUST be of type VRF_SELECTION_POLICY. The VRF selection policy may coexist with
a policy-forwarding policy.

The policy specified in this leaf is used to specifically choose the L3VRF network
instance that is used for specific input criteria of packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="apply-vrf-selection-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """apply_vrf_selection_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="apply-vrf-selection-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__apply_vrf_selection_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_apply_vrf_selection_policy(self):
    self.__apply_vrf_selection_policy = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="apply-vrf-selection-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)

  interface_id = __builtin__.property(_get_interface_id, _set_interface_id)
  apply_forwarding_policy = __builtin__.property(_get_apply_forwarding_policy, _set_apply_forwarding_policy)
  apply_vrf_selection_policy = __builtin__.property(_get_apply_vrf_selection_policy, _set_apply_vrf_selection_policy)


  _pyangbind_elements = OrderedDict([('interface_id', interface_id), ('apply_forwarding_policy', apply_forwarding_policy), ('apply_vrf_selection_policy', apply_vrf_selection_policy), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_policy_forwarding_interfaces_interface_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding/interfaces/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 an interface to
policy forwarding rule binding.
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id','__apply_forwarding_policy','__apply_vrf_selection_policy',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=False)
    self.__apply_forwarding_policy = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="apply-forwarding-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__apply_vrf_selection_policy = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="apply-vrf-selection-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'policy-forwarding', 'interfaces', 'interface', 'state']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/policy_forwarding/interfaces/interface/state/interface_id (oc-if:interface-id)

    YANG Description: A unique 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 /network_instances/network_instance/policy_forwarding/interfaces/interface/state/interface_id (oc-if:interface-id)
    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: A unique 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_id must be of a type compatible with oc-if:interface-id""",
          'defined-type': "oc-if:interface-id",
          '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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=False)


  def _get_apply_forwarding_policy(self):
    """
    Getter method for apply_forwarding_policy, mapped from YANG variable /network_instances/network_instance/policy_forwarding/interfaces/interface/state/apply_forwarding_policy (leafref)

    YANG Description: The policy to be applied on the interface. Packets ingress on
the referenced interface should be compared to the match
criteria within the specified policy, and in the case that
these criteria are met, the forwarding actions specified
applied. These policies should be applied following quality of
service classification, and ACL actions if such entities are
referenced by the corresponding interface.
    """
    return self.__apply_forwarding_policy
      
  def _set_apply_forwarding_policy(self, v, load=False):
    """
    Setter method for apply_forwarding_policy, mapped from YANG variable /network_instances/network_instance/policy_forwarding/interfaces/interface/state/apply_forwarding_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_apply_forwarding_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_apply_forwarding_policy() directly.

    YANG Description: The policy to be applied on the interface. Packets ingress on
the referenced interface should be compared to the match
criteria within the specified policy, and in the case that
these criteria are met, the forwarding actions specified
applied. These policies should be applied following quality of
service classification, and ACL actions if such entities are
referenced by the corresponding interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="apply-forwarding-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """apply_forwarding_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="apply-forwarding-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__apply_forwarding_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_apply_forwarding_policy(self):
    self.__apply_forwarding_policy = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="apply-forwarding-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_apply_vrf_selection_policy(self):
    """
    Getter method for apply_vrf_selection_policy, mapped from YANG variable /network_instances/network_instance/policy_forwarding/interfaces/interface/state/apply_vrf_selection_policy (leafref)

    YANG Description: Apply the specific VRF selection policy on the interface. The referenced policy
MUST be of type VRF_SELECTION_POLICY. The VRF selection policy may coexist with
a policy-forwarding policy.

The policy specified in this leaf is used to specifically choose the L3VRF network
instance that is used for specific input criteria of packets.
    """
    return self.__apply_vrf_selection_policy
      
  def _set_apply_vrf_selection_policy(self, v, load=False):
    """
    Setter method for apply_vrf_selection_policy, mapped from YANG variable /network_instances/network_instance/policy_forwarding/interfaces/interface/state/apply_vrf_selection_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_apply_vrf_selection_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_apply_vrf_selection_policy() directly.

    YANG Description: Apply the specific VRF selection policy on the interface. The referenced policy
MUST be of type VRF_SELECTION_POLICY. The VRF selection policy may coexist with
a policy-forwarding policy.

The policy specified in this leaf is used to specifically choose the L3VRF network
instance that is used for specific input criteria of packets.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="apply-vrf-selection-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """apply_vrf_selection_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="apply-vrf-selection-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__apply_vrf_selection_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_apply_vrf_selection_policy(self):
    self.__apply_vrf_selection_policy = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="apply-vrf-selection-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)

  interface_id = __builtin__.property(_get_interface_id)
  apply_forwarding_policy = __builtin__.property(_get_apply_forwarding_policy)
  apply_vrf_selection_policy = __builtin__.property(_get_apply_vrf_selection_policy)


  _pyangbind_elements = OrderedDict([('interface_id', interface_id), ('apply_forwarding_policy', apply_forwarding_policy), ('apply_vrf_selection_policy', apply_vrf_selection_policy), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_policy_forwarding_interfaces_interface_interface_ref_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'policy-forwarding', 'interfaces', 'interface', 'interface-ref', 'config']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/policy_forwarding/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 /network_instances/network_instance/policy_forwarding/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/policy_forwarding/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 /network_instances/network_instance/policy_forwarding/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_interfaces_interface_interface_ref_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'policy-forwarding', 'interfaces', 'interface', 'interface-ref', 'state']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/policy_forwarding/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 /network_instances/network_instance/policy_forwarding/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/policy_forwarding/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 /network_instances/network_instance/policy_forwarding/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_interfaces_interface_interface_ref(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding/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
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'interface-ref'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_policy_forwarding_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_policy_forwarding_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'policy-forwarding', 'interfaces', 'interface', 'interface-ref']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/policy_forwarding/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 /network_instances/network_instance/policy_forwarding/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_network_instance__network_instances_network_instance_policy_forwarding_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/policy_forwarding/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 /network_instances/network_instance/policy_forwarding/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_network_instance__network_instances_network_instance_policy_forwarding_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_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/network-instance', defining_module='openconfig-network-instance', 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_interface_openconfig_network_instance__network_instances_network_instance_policy_forwarding_interfaces_interface(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding/interfaces/interface. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration and operationals state relating to the
relationship between interfaces and policy-based forwarding
rules.
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id','__config','__state','__interface_ref',)

  _yang_name = 'interface'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_policy_forwarding_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_policy_forwarding_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__interface_ref = YANGDynClass(base=yc_interface_ref_openconfig_network_instance__network_instances_network_instance_policy_forwarding_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'policy-forwarding', 'interfaces', 'interface']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/policy_forwarding/interfaces/interface/interface_id (leafref)

    YANG Description: A reference to the unique identifier for the interface
being referenced by the policy.
    """
    return self.__interface_id
      
  def _set_interface_id(self, v, load=False):
    """
    Setter method for interface_id, mapped from YANG variable /network_instances/network_instance/policy_forwarding/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: A reference to the unique identifier for the interface
being referenced by the 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="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/policy_forwarding/interfaces/interface/config (container)

    YANG Description: Configuration parameters relating to an interface to
policy forwarding rule binding.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/policy_forwarding/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 parameters relating to an interface to
policy forwarding rule binding.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_policy_forwarding_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/policy_forwarding/interfaces/interface/state (container)

    YANG Description: Operational state parameters relating to an interface to
policy forwarding rule binding.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/policy_forwarding/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 parameters relating to an interface to
policy forwarding rule binding.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_policy_forwarding_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_interface_ref(self):
    """
    Getter method for interface_ref, mapped from YANG variable /network_instances/network_instance/policy_forwarding/interfaces/interface/interface_ref (container)

    YANG Description: Reference to an interface or subinterface
    """
    return self.__interface_ref
      
  def _set_interface_ref(self, v, load=False):
    """
    Setter method for interface_ref, mapped from YANG variable /network_instances/network_instance/policy_forwarding/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
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interface_ref_openconfig_network_instance__network_instances_network_instance_policy_forwarding_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_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/network-instance', defining_module='openconfig-network-instance', 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)


  _pyangbind_elements = OrderedDict([('interface_id', interface_id), ('config', config), ('state', state), ('interface_ref', interface_ref), ])


class yc_interfaces_openconfig_network_instance__network_instances_network_instance_policy_forwarding_interfaces(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding/interfaces. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration and operational state relating policy
forwarding on interfaces.
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface',)

  _yang_name = 'interfaces'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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_network_instance__network_instances_network_instance_policy_forwarding_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'policy-forwarding', 'interfaces']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/policy_forwarding/interfaces/interface (list)

    YANG Description: Configuration and operationals state relating to the
relationship between interfaces and policy-based forwarding
rules.
    """
    return self.__interface
      
  def _set_interface(self, v, load=False):
    """
    Setter method for interface, mapped from YANG variable /network_instances/network_instance/policy_forwarding/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: Configuration and operationals state relating to the
relationship between interfaces and policy-based forwarding
rules.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("interface_id",yc_interface_openconfig_network_instance__network_instances_network_instance_policy_forwarding_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_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/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  interface = __builtin__.property(_get_interface, _set_interface)


  _pyangbind_elements = OrderedDict([('interface', interface), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_policy_forwarding_path_selection_groups_path_selection_group_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding/path-selection-groups/path-selection-group/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 path selection
group.
  """
  __slots__ = ('_path_helper', '_extmethods', '__group_id','__mpls_lsp',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__group_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="group-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__mpls_lsp = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="mpls-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'policy-forwarding', 'path-selection-groups', 'path-selection-group', 'config']

  def _get_group_id(self):
    """
    Getter method for group_id, mapped from YANG variable /network_instances/network_instance/policy_forwarding/path_selection_groups/path_selection_group/config/group_id (string)

    YANG Description: A unique name for the path-selection-group
    """
    return self.__group_id
      
  def _set_group_id(self, v, load=False):
    """
    Setter method for group_id, mapped from YANG variable /network_instances/network_instance/policy_forwarding/path_selection_groups/path_selection_group/config/group_id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_group_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_group_id() directly.

    YANG Description: A unique name for the path-selection-group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="group-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """group_id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="group-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)""",
        })

    self.__group_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_group_id(self):
    self.__group_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="group-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_mpls_lsp(self):
    """
    Getter method for mpls_lsp, mapped from YANG variable /network_instances/network_instance/policy_forwarding/path_selection_groups/path_selection_group/config/mpls_lsp (leafref)

    YANG Description: A set of MPLS constrained-path LSPs which should be
considered for the policy forwarding next-hop. In order to
select between the LSPs within the path-selection-group, the
system should determine which LSP provides the best path to
the next-hop for the routed packet.
    """
    return self.__mpls_lsp
      
  def _set_mpls_lsp(self, v, load=False):
    """
    Setter method for mpls_lsp, mapped from YANG variable /network_instances/network_instance/policy_forwarding/path_selection_groups/path_selection_group/config/mpls_lsp (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mpls_lsp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mpls_lsp() directly.

    YANG Description: A set of MPLS constrained-path LSPs which should be
considered for the policy forwarding next-hop. In order to
select between the LSPs within the path-selection-group, the
system should determine which LSP provides the best path to
the next-hop for the routed packet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="mpls-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mpls_lsp must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="mpls-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__mpls_lsp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mpls_lsp(self):
    self.__mpls_lsp = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="mpls-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)

  group_id = __builtin__.property(_get_group_id, _set_group_id)
  mpls_lsp = __builtin__.property(_get_mpls_lsp, _set_mpls_lsp)


  _pyangbind_elements = OrderedDict([('group_id', group_id), ('mpls_lsp', mpls_lsp), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_policy_forwarding_path_selection_groups_path_selection_group_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding/path-selection-groups/path-selection-group/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 path
selection group.
  """
  __slots__ = ('_path_helper', '_extmethods', '__group_id','__mpls_lsp',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__group_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="group-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__mpls_lsp = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="mpls-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'policy-forwarding', 'path-selection-groups', 'path-selection-group', 'state']

  def _get_group_id(self):
    """
    Getter method for group_id, mapped from YANG variable /network_instances/network_instance/policy_forwarding/path_selection_groups/path_selection_group/state/group_id (string)

    YANG Description: A unique name for the path-selection-group
    """
    return self.__group_id
      
  def _set_group_id(self, v, load=False):
    """
    Setter method for group_id, mapped from YANG variable /network_instances/network_instance/policy_forwarding/path_selection_groups/path_selection_group/state/group_id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_group_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_group_id() directly.

    YANG Description: A unique name for the path-selection-group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="group-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """group_id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="group-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__group_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_group_id(self):
    self.__group_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="group-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_mpls_lsp(self):
    """
    Getter method for mpls_lsp, mapped from YANG variable /network_instances/network_instance/policy_forwarding/path_selection_groups/path_selection_group/state/mpls_lsp (leafref)

    YANG Description: A set of MPLS constrained-path LSPs which should be
considered for the policy forwarding next-hop. In order to
select between the LSPs within the path-selection-group, the
system should determine which LSP provides the best path to
the next-hop for the routed packet.
    """
    return self.__mpls_lsp
      
  def _set_mpls_lsp(self, v, load=False):
    """
    Setter method for mpls_lsp, mapped from YANG variable /network_instances/network_instance/policy_forwarding/path_selection_groups/path_selection_group/state/mpls_lsp (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mpls_lsp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mpls_lsp() directly.

    YANG Description: A set of MPLS constrained-path LSPs which should be
considered for the policy forwarding next-hop. In order to
select between the LSPs within the path-selection-group, the
system should determine which LSP provides the best path to
the next-hop for the routed packet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="mpls-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mpls_lsp must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="mpls-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__mpls_lsp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mpls_lsp(self):
    self.__mpls_lsp = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="mpls-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)

  group_id = __builtin__.property(_get_group_id)
  mpls_lsp = __builtin__.property(_get_mpls_lsp)


  _pyangbind_elements = OrderedDict([('group_id', group_id), ('mpls_lsp', mpls_lsp), ])


class yc_path_selection_group_openconfig_network_instance__network_instances_network_instance_policy_forwarding_path_selection_groups_path_selection_group(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding/path-selection-groups/path-selection-group. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A path selection group is a set of forwarding resources,
which are grouped as eligible paths for a particular
policy-based forwarding rule. A policy rule may select a
path-selection-group as the egress for a particular type of
traffic (e.g., DSCP value). The system then utilises its
standard forwarding lookup mechanism to select from the
paths that are specified within the group - for IP packets,
the destination IP address is used such that the packet is
routed to the entity within the path-selection-group that
corresponds to the next-hop for the destination IP address
of the packet; for L2 packets, the selection is based on the
destination MAC address. If multiple paths within the
selection group are eligible to be used for forwarding,
the packets are load-balanced between them according to
the system's usual load balancing logic.
  """
  __slots__ = ('_path_helper', '_extmethods', '__group_id','__config','__state',)

  _yang_name = 'path-selection-group'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__group_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="group-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_policy_forwarding_path_selection_groups_path_selection_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_policy_forwarding_path_selection_groups_path_selection_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'policy-forwarding', 'path-selection-groups', 'path-selection-group']

  def _get_group_id(self):
    """
    Getter method for group_id, mapped from YANG variable /network_instances/network_instance/policy_forwarding/path_selection_groups/path_selection_group/group_id (leafref)

    YANG Description: Reference to a unique identifier for the path selection
group
    """
    return self.__group_id
      
  def _set_group_id(self, v, load=False):
    """
    Setter method for group_id, mapped from YANG variable /network_instances/network_instance/policy_forwarding/path_selection_groups/path_selection_group/group_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_group_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_group_id() directly.

    YANG Description: Reference to a unique identifier for the path selection
group
    """
    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="group-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """group_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="group-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__group_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_group_id(self):
    self.__group_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="group-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/policy_forwarding/path_selection_groups/path_selection_group/config (container)

    YANG Description: Configuration parameters relating to the path selection
group.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/policy_forwarding/path_selection_groups/path_selection_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 parameters relating to the path selection
group.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_policy_forwarding_path_selection_groups_path_selection_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_path_selection_groups_path_selection_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_path_selection_groups_path_selection_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/policy_forwarding/path_selection_groups/path_selection_group/state (container)

    YANG Description: Operational state parameters relating to the path
selection group.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/policy_forwarding/path_selection_groups/path_selection_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 parameters relating to the path
selection group.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_policy_forwarding_path_selection_groups_path_selection_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_path_selection_groups_path_selection_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_path_selection_groups_path_selection_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  group_id = __builtin__.property(_get_group_id, _set_group_id)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('group_id', group_id), ('config', config), ('state', state), ])


class yc_path_selection_groups_openconfig_network_instance__network_instances_network_instance_policy_forwarding_path_selection_groups(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding/path-selection-groups. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Surrounding container for the path selection groups defined
within the policy forwarding model.
  """
  __slots__ = ('_path_helper', '_extmethods', '__path_selection_group',)

  _yang_name = 'path-selection-groups'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__path_selection_group = YANGDynClass(base=YANGListType("group_id",yc_path_selection_group_openconfig_network_instance__network_instances_network_instance_policy_forwarding_path_selection_groups_path_selection_group, yang_name="path-selection-group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='group-id', extensions=None), is_container='list', yang_name="path-selection-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'policy-forwarding', 'path-selection-groups']

  def _get_path_selection_group(self):
    """
    Getter method for path_selection_group, mapped from YANG variable /network_instances/network_instance/policy_forwarding/path_selection_groups/path_selection_group (list)

    YANG Description: A path selection group is a set of forwarding resources,
which are grouped as eligible paths for a particular
policy-based forwarding rule. A policy rule may select a
path-selection-group as the egress for a particular type of
traffic (e.g., DSCP value). The system then utilises its
standard forwarding lookup mechanism to select from the
paths that are specified within the group - for IP packets,
the destination IP address is used such that the packet is
routed to the entity within the path-selection-group that
corresponds to the next-hop for the destination IP address
of the packet; for L2 packets, the selection is based on the
destination MAC address. If multiple paths within the
selection group are eligible to be used for forwarding,
the packets are load-balanced between them according to
the system's usual load balancing logic.
    """
    return self.__path_selection_group
      
  def _set_path_selection_group(self, v, load=False):
    """
    Setter method for path_selection_group, mapped from YANG variable /network_instances/network_instance/policy_forwarding/path_selection_groups/path_selection_group (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_selection_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_selection_group() directly.

    YANG Description: A path selection group is a set of forwarding resources,
which are grouped as eligible paths for a particular
policy-based forwarding rule. A policy rule may select a
path-selection-group as the egress for a particular type of
traffic (e.g., DSCP value). The system then utilises its
standard forwarding lookup mechanism to select from the
paths that are specified within the group - for IP packets,
the destination IP address is used such that the packet is
routed to the entity within the path-selection-group that
corresponds to the next-hop for the destination IP address
of the packet; for L2 packets, the selection is based on the
destination MAC address. If multiple paths within the
selection group are eligible to be used for forwarding,
the packets are load-balanced between them according to
the system's usual load balancing logic.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("group_id",yc_path_selection_group_openconfig_network_instance__network_instances_network_instance_policy_forwarding_path_selection_groups_path_selection_group, yang_name="path-selection-group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='group-id', extensions=None), is_container='list', yang_name="path-selection-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_selection_group must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("group_id",yc_path_selection_group_openconfig_network_instance__network_instances_network_instance_policy_forwarding_path_selection_groups_path_selection_group, yang_name="path-selection-group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='group-id', extensions=None), is_container='list', yang_name="path-selection-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__path_selection_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_selection_group(self):
    self.__path_selection_group = YANGDynClass(base=YANGListType("group_id",yc_path_selection_group_openconfig_network_instance__network_instances_network_instance_policy_forwarding_path_selection_groups_path_selection_group, yang_name="path-selection-group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='group-id', extensions=None), is_container='list', yang_name="path-selection-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  path_selection_group = __builtin__.property(_get_path_selection_group, _set_path_selection_group)


  _pyangbind_elements = OrderedDict([('path_selection_group', path_selection_group), ])


class yc_policy_forwarding_openconfig_network_instance__network_instances_network_instance_policy_forwarding(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/policy-forwarding. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration and operational state relating to policy-forwarding within
a network instance.
  """
  __slots__ = ('_path_helper', '_extmethods', '__policies','__interfaces','__path_selection_groups',)

  _yang_name = 'policy-forwarding'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__policies = YANGDynClass(base=yc_policies_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies, is_container='container', yang_name="policies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__interfaces = YANGDynClass(base=yc_interfaces_openconfig_network_instance__network_instances_network_instance_policy_forwarding_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__path_selection_groups = YANGDynClass(base=yc_path_selection_groups_openconfig_network_instance__network_instances_network_instance_policy_forwarding_path_selection_groups, is_container='container', yang_name="path-selection-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'policy-forwarding']

  def _get_policies(self):
    """
    Getter method for policies, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies (container)

    YANG Description: Forwarding policies defined to enact policy-based forwarding
on the local system.
    """
    return self.__policies
      
  def _set_policies(self, v, load=False):
    """
    Setter method for policies, mapped from YANG variable /network_instances/network_instance/policy_forwarding/policies (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_policies is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_policies() directly.

    YANG Description: Forwarding policies defined to enact policy-based forwarding
on the local system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_policies_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies, is_container='container', yang_name="policies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """policies must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_policies_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies, is_container='container', yang_name="policies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__policies = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_policies(self):
    self.__policies = YANGDynClass(base=yc_policies_openconfig_network_instance__network_instances_network_instance_policy_forwarding_policies, is_container='container', yang_name="policies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_interfaces(self):
    """
    Getter method for interfaces, mapped from YANG variable /network_instances/network_instance/policy_forwarding/interfaces (container)

    YANG Description: Configuration and operational state relating policy
forwarding on interfaces.
    """
    return self.__interfaces
      
  def _set_interfaces(self, v, load=False):
    """
    Setter method for interfaces, mapped from YANG variable /network_instances/network_instance/policy_forwarding/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: Configuration and operational state relating policy
forwarding on interfaces.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interfaces_openconfig_network_instance__network_instances_network_instance_policy_forwarding_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_policy_forwarding_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_path_selection_groups(self):
    """
    Getter method for path_selection_groups, mapped from YANG variable /network_instances/network_instance/policy_forwarding/path_selection_groups (container)

    YANG Description: Surrounding container for the path selection groups defined
within the policy forwarding model.
    """
    return self.__path_selection_groups
      
  def _set_path_selection_groups(self, v, load=False):
    """
    Setter method for path_selection_groups, mapped from YANG variable /network_instances/network_instance/policy_forwarding/path_selection_groups (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_selection_groups is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_selection_groups() directly.

    YANG Description: Surrounding container for the path selection groups defined
within the policy forwarding model.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_path_selection_groups_openconfig_network_instance__network_instances_network_instance_policy_forwarding_path_selection_groups, is_container='container', yang_name="path-selection-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_selection_groups must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_path_selection_groups_openconfig_network_instance__network_instances_network_instance_policy_forwarding_path_selection_groups, is_container='container', yang_name="path-selection-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__path_selection_groups = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_selection_groups(self):
    self.__path_selection_groups = YANGDynClass(base=yc_path_selection_groups_openconfig_network_instance__network_instances_network_instance_policy_forwarding_path_selection_groups, is_container='container', yang_name="path-selection-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  policies = __builtin__.property(_get_policies, _set_policies)
  interfaces = __builtin__.property(_get_interfaces, _set_interfaces)
  path_selection_groups = __builtin__.property(_get_path_selection_groups, _set_path_selection_groups)


  _pyangbind_elements = OrderedDict([('policies', policies), ('interfaces', interfaces), ('path_selection_groups', path_selection_groups), ])


class yc_counters_openconfig_network_instance__network_instances_network_instance_afts_ipv4_unicast_ipv4_entry_state_counters(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/ipv4-unicast/ipv4-entry/state/counters. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Surrounding container for counters.
  """
  __slots__ = ('_path_helper', '_extmethods', '__packets_forwarded','__octets_forwarded','__packets_forwarded_backup','__octets_forwarded_backup',)

  _yang_name = 'counters'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__packets_forwarded = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="packets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    self.__octets_forwarded = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="octets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    self.__packets_forwarded_backup = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="packets-forwarded-backup", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    self.__octets_forwarded_backup = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="octets-forwarded-backup", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'afts', 'ipv4-unicast', 'ipv4-entry', 'state', 'counters']

  def _get_packets_forwarded(self):
    """
    Getter method for packets_forwarded, mapped from YANG variable /network_instances/network_instance/afts/ipv4_unicast/ipv4_entry/state/counters/packets_forwarded (oc-yang:counter64)

    YANG Description: The number of packets which have matched, and been forwarded,
based on the AFT entry.
    """
    return self.__packets_forwarded
      
  def _set_packets_forwarded(self, v, load=False):
    """
    Setter method for packets_forwarded, mapped from YANG variable /network_instances/network_instance/afts/ipv4_unicast/ipv4_entry/state/counters/packets_forwarded (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_packets_forwarded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_packets_forwarded() directly.

    YANG Description: The number of packets which have matched, and been forwarded,
based on the AFT entry.
    """
    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="packets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """packets_forwarded 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="packets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__packets_forwarded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_packets_forwarded(self):
    self.__packets_forwarded = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="packets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_octets_forwarded(self):
    """
    Getter method for octets_forwarded, mapped from YANG variable /network_instances/network_instance/afts/ipv4_unicast/ipv4_entry/state/counters/octets_forwarded (oc-yang:counter64)

    YANG Description: The number of octets which have matched, and been forwarded,
based on the AFT entry
    """
    return self.__octets_forwarded
      
  def _set_octets_forwarded(self, v, load=False):
    """
    Setter method for octets_forwarded, mapped from YANG variable /network_instances/network_instance/afts/ipv4_unicast/ipv4_entry/state/counters/octets_forwarded (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_octets_forwarded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_octets_forwarded() directly.

    YANG Description: The number of octets which have matched, and been forwarded,
based on the AFT entry
    """
    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="octets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """octets_forwarded 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="octets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__octets_forwarded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_octets_forwarded(self):
    self.__octets_forwarded = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="octets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_packets_forwarded_backup(self):
    """
    Getter method for packets_forwarded_backup, mapped from YANG variable /network_instances/network_instance/afts/ipv4_unicast/ipv4_entry/state/counters/packets_forwarded_backup (oc-yang:counter64)

    YANG Description: The number of packets which have matched, and been forwarded,
based on the AFT backup entry.
    """
    return self.__packets_forwarded_backup
      
  def _set_packets_forwarded_backup(self, v, load=False):
    """
    Setter method for packets_forwarded_backup, mapped from YANG variable /network_instances/network_instance/afts/ipv4_unicast/ipv4_entry/state/counters/packets_forwarded_backup (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_packets_forwarded_backup is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_packets_forwarded_backup() directly.

    YANG Description: The number of packets which have matched, and been forwarded,
based on the AFT backup entry.
    """
    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="packets-forwarded-backup", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """packets_forwarded_backup 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="packets-forwarded-backup", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__packets_forwarded_backup = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_packets_forwarded_backup(self):
    self.__packets_forwarded_backup = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="packets-forwarded-backup", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_octets_forwarded_backup(self):
    """
    Getter method for octets_forwarded_backup, mapped from YANG variable /network_instances/network_instance/afts/ipv4_unicast/ipv4_entry/state/counters/octets_forwarded_backup (oc-yang:counter64)

    YANG Description: The number of octets which have matched, and been forwarded,
based on the AFT backup entry
    """
    return self.__octets_forwarded_backup
      
  def _set_octets_forwarded_backup(self, v, load=False):
    """
    Setter method for octets_forwarded_backup, mapped from YANG variable /network_instances/network_instance/afts/ipv4_unicast/ipv4_entry/state/counters/octets_forwarded_backup (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_octets_forwarded_backup is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_octets_forwarded_backup() directly.

    YANG Description: The number of octets which have matched, and been forwarded,
based on the AFT backup entry
    """
    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="octets-forwarded-backup", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """octets_forwarded_backup 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="octets-forwarded-backup", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__octets_forwarded_backup = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_octets_forwarded_backup(self):
    self.__octets_forwarded_backup = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="octets-forwarded-backup", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)

  packets_forwarded = __builtin__.property(_get_packets_forwarded)
  octets_forwarded = __builtin__.property(_get_octets_forwarded)
  packets_forwarded_backup = __builtin__.property(_get_packets_forwarded_backup)
  octets_forwarded_backup = __builtin__.property(_get_octets_forwarded_backup)


  _pyangbind_elements = OrderedDict([('packets_forwarded', packets_forwarded), ('octets_forwarded', octets_forwarded), ('packets_forwarded_backup', packets_forwarded_backup), ('octets_forwarded_backup', octets_forwarded_backup), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_afts_ipv4_unicast_ipv4_entry_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/ipv4-unicast/ipv4-entry/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 IPv4 unicast AFT
entry.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix','__counters','__entry_metadata','__origin_protocol','__decapsulate_header',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-prefix', is_config=False)
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_afts_ipv4_unicast_ipv4_entry_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__entry_metadata = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['0..8']}), is_leaf=True, yang_name="entry-metadata", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    self.__origin_protocol = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}},), is_leaf=True, yang_name="origin-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__decapsulate_header = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'GRE': {}, 'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'VXLAN': {}},), is_leaf=True, yang_name="decapsulate-header", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-aftt:encapsulation-header-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 ['network-instances', 'network-instance', 'afts', 'ipv4-unicast', 'ipv4-entry', 'state']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/afts/ipv4_unicast/ipv4_entry/state/prefix (oc-inet:ipv4-prefix)

    YANG Description: The IPv4 destination prefix that should be matched to
utilise the AFT entry.
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/afts/ipv4_unicast/ipv4_entry/state/prefix (oc-inet:ipv4-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: The IPv4 destination prefix that should be matched to
utilise the AFT entry.
    """
    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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-prefix', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-prefix', is_config=False)


  def _get_counters(self):
    """
    Getter method for counters, mapped from YANG variable /network_instances/network_instance/afts/ipv4_unicast/ipv4_entry/state/counters (container)

    YANG Description: Surrounding container for counters.
    """
    return self.__counters
      
  def _set_counters(self, v, load=False):
    """
    Setter method for counters, mapped from YANG variable /network_instances/network_instance/afts/ipv4_unicast/ipv4_entry/state/counters (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_counters is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_counters() directly.

    YANG Description: Surrounding container for counters.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_counters_openconfig_network_instance__network_instances_network_instance_afts_ipv4_unicast_ipv4_entry_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """counters must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_afts_ipv4_unicast_ipv4_entry_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__counters = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_counters(self):
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_afts_ipv4_unicast_ipv4_entry_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_entry_metadata(self):
    """
    Getter method for entry_metadata, mapped from YANG variable /network_instances/network_instance/afts/ipv4_unicast/ipv4_entry/state/entry_metadata (binary)

    YANG Description: Metadata persistently stored with the entry.
    """
    return self.__entry_metadata
      
  def _set_entry_metadata(self, v, load=False):
    """
    Setter method for entry_metadata, mapped from YANG variable /network_instances/network_instance/afts/ipv4_unicast/ipv4_entry/state/entry_metadata (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_entry_metadata is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_entry_metadata() directly.

    YANG Description: Metadata persistently stored with the entry.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['0..8']}), is_leaf=True, yang_name="entry-metadata", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """entry_metadata must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['0..8']}), is_leaf=True, yang_name="entry-metadata", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__entry_metadata = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_entry_metadata(self):
    self.__entry_metadata = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['0..8']}), is_leaf=True, yang_name="entry-metadata", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)


  def _get_origin_protocol(self):
    """
    Getter method for origin_protocol, mapped from YANG variable /network_instances/network_instance/afts/ipv4_unicast/ipv4_entry/state/origin_protocol (identityref)

    YANG Description: The protocol from which the AFT entry was learned.
    """
    return self.__origin_protocol
      
  def _set_origin_protocol(self, v, load=False):
    """
    Setter method for origin_protocol, mapped from YANG variable /network_instances/network_instance/afts/ipv4_unicast/ipv4_entry/state/origin_protocol (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_origin_protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_origin_protocol() directly.

    YANG Description: The protocol from which the AFT entry was learned.
    """
    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={'BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}},), is_leaf=True, yang_name="origin-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """origin_protocol must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}},), is_leaf=True, yang_name="origin-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__origin_protocol = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_origin_protocol(self):
    self.__origin_protocol = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}},), is_leaf=True, yang_name="origin-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_decapsulate_header(self):
    """
    Getter method for decapsulate_header, mapped from YANG variable /network_instances/network_instance/afts/ipv4_unicast/ipv4_entry/state/decapsulate_header (oc-aftt:encapsulation-header-type)

    YANG Description: When forwarding a packet to the specified next-hop, the local
system performs a decapsulation of the packet - removing the
specified header type. In the case that no next-hop is
specified, the packet header is removed, and a subsequent
forwarding lookup is performed on the packet encapsulated
within the header, matched within the relevant AFT within the
specified network-instance.
    """
    return self.__decapsulate_header
      
  def _set_decapsulate_header(self, v, load=False):
    """
    Setter method for decapsulate_header, mapped from YANG variable /network_instances/network_instance/afts/ipv4_unicast/ipv4_entry/state/decapsulate_header (oc-aftt:encapsulation-header-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_decapsulate_header is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_decapsulate_header() directly.

    YANG Description: When forwarding a packet to the specified next-hop, the local
system performs a decapsulation of the packet - removing the
specified header type. In the case that no next-hop is
specified, the packet header is removed, and a subsequent
forwarding lookup is performed on the packet encapsulated
within the header, matched within the relevant AFT within the
specified network-instance.
    """
    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={'GRE': {}, 'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'VXLAN': {}},), is_leaf=True, yang_name="decapsulate-header", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-aftt:encapsulation-header-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """decapsulate_header must be of a type compatible with oc-aftt:encapsulation-header-type""",
          'defined-type': "oc-aftt:encapsulation-header-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'GRE': {}, 'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'VXLAN': {}},), is_leaf=True, yang_name="decapsulate-header", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-aftt:encapsulation-header-type', is_config=False)""",
        })

    self.__decapsulate_header = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_decapsulate_header(self):
    self.__decapsulate_header = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'GRE': {}, 'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'VXLAN': {}},), is_leaf=True, yang_name="decapsulate-header", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-aftt:encapsulation-header-type', is_config=False)

  prefix = __builtin__.property(_get_prefix)
  counters = __builtin__.property(_get_counters)
  entry_metadata = __builtin__.property(_get_entry_metadata)
  origin_protocol = __builtin__.property(_get_origin_protocol)
  decapsulate_header = __builtin__.property(_get_decapsulate_header)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ('counters', counters), ('entry_metadata', entry_metadata), ('origin_protocol', origin_protocol), ('decapsulate_header', decapsulate_header), ])


class yc_ipv4_entry_openconfig_network_instance__network_instances_network_instance_afts_ipv4_unicast_ipv4_entry(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/ipv4-unicast/ipv4-entry. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of the IPv4 unicast entries within the abstract
forwarding table. This list is keyed by the destination IPv4
prefix.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix','__state',)

  _yang_name = 'ipv4-entry'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_afts_ipv4_unicast_ipv4_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'afts', 'ipv4-unicast', 'ipv4-entry']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/afts/ipv4_unicast/ipv4_entry/prefix (leafref)

    YANG Description: Reference to the IPv4 unicast destination prefix which
must be matched to utilise the AFT entry.
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/afts/ipv4_unicast/ipv4_entry/prefix (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: Reference to the IPv4 unicast destination prefix which
must be matched to utilise the AFT entry.
    """
    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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/afts/ipv4_unicast/ipv4_entry/state (container)

    YANG Description: Operational state parameters for the IPv4 unicast AFT
entry.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/afts/ipv4_unicast/ipv4_entry/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 IPv4 unicast AFT
entry.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_afts_ipv4_unicast_ipv4_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_afts_ipv4_unicast_ipv4_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_afts_ipv4_unicast_ipv4_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  prefix = __builtin__.property(_get_prefix)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ('state', state), ])


class yc_ipv4_unicast_openconfig_network_instance__network_instances_network_instance_afts_ipv4_unicast(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/ipv4-unicast. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The abstract forwarding table for IPv4 unicast. Entries
within this table are uniquely keyed on the IPv4 unicast
destination prefix which is matched by ingress packets.

The data set represented by the IPv4 Unicast AFT is the set
of entries from the IPv4 unicast RIB that have been selected
for installation into the FIB of the device exporting the
data structure.
  """
  __slots__ = ('_path_helper', '_extmethods', '__ipv4_entry',)

  _yang_name = 'ipv4-unicast'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__ipv4_entry = YANGDynClass(base=YANGListType("prefix",yc_ipv4_entry_openconfig_network_instance__network_instances_network_instance_afts_ipv4_unicast_ipv4_entry, yang_name="ipv4-entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix', extensions=None), is_container='list', yang_name="ipv4-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'afts', 'ipv4-unicast']

  def _get_ipv4_entry(self):
    """
    Getter method for ipv4_entry, mapped from YANG variable /network_instances/network_instance/afts/ipv4_unicast/ipv4_entry (list)

    YANG Description: List of the IPv4 unicast entries within the abstract
forwarding table. This list is keyed by the destination IPv4
prefix.
    """
    return self.__ipv4_entry
      
  def _set_ipv4_entry(self, v, load=False):
    """
    Setter method for ipv4_entry, mapped from YANG variable /network_instances/network_instance/afts/ipv4_unicast/ipv4_entry (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv4_entry is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv4_entry() directly.

    YANG Description: List of the IPv4 unicast entries within the abstract
forwarding table. This list is keyed by the destination IPv4
prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("prefix",yc_ipv4_entry_openconfig_network_instance__network_instances_network_instance_afts_ipv4_unicast_ipv4_entry, yang_name="ipv4-entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix', extensions=None), is_container='list', yang_name="ipv4-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv4_entry must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("prefix",yc_ipv4_entry_openconfig_network_instance__network_instances_network_instance_afts_ipv4_unicast_ipv4_entry, yang_name="ipv4-entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix', extensions=None), is_container='list', yang_name="ipv4-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__ipv4_entry = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv4_entry(self):
    self.__ipv4_entry = YANGDynClass(base=YANGListType("prefix",yc_ipv4_entry_openconfig_network_instance__network_instances_network_instance_afts_ipv4_unicast_ipv4_entry, yang_name="ipv4-entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix', extensions=None), is_container='list', yang_name="ipv4-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  ipv4_entry = __builtin__.property(_get_ipv4_entry)


  _pyangbind_elements = OrderedDict([('ipv4_entry', ipv4_entry), ])


class yc_counters_openconfig_network_instance__network_instances_network_instance_afts_ipv6_unicast_ipv6_entry_state_counters(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/ipv6-unicast/ipv6-entry/state/counters. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Surrounding container for counters.
  """
  __slots__ = ('_path_helper', '_extmethods', '__packets_forwarded','__octets_forwarded','__packets_forwarded_backup','__octets_forwarded_backup',)

  _yang_name = 'counters'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__packets_forwarded = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="packets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    self.__octets_forwarded = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="octets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    self.__packets_forwarded_backup = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="packets-forwarded-backup", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    self.__octets_forwarded_backup = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="octets-forwarded-backup", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'afts', 'ipv6-unicast', 'ipv6-entry', 'state', 'counters']

  def _get_packets_forwarded(self):
    """
    Getter method for packets_forwarded, mapped from YANG variable /network_instances/network_instance/afts/ipv6_unicast/ipv6_entry/state/counters/packets_forwarded (oc-yang:counter64)

    YANG Description: The number of packets which have matched, and been forwarded,
based on the AFT entry.
    """
    return self.__packets_forwarded
      
  def _set_packets_forwarded(self, v, load=False):
    """
    Setter method for packets_forwarded, mapped from YANG variable /network_instances/network_instance/afts/ipv6_unicast/ipv6_entry/state/counters/packets_forwarded (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_packets_forwarded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_packets_forwarded() directly.

    YANG Description: The number of packets which have matched, and been forwarded,
based on the AFT entry.
    """
    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="packets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """packets_forwarded 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="packets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__packets_forwarded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_packets_forwarded(self):
    self.__packets_forwarded = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="packets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_octets_forwarded(self):
    """
    Getter method for octets_forwarded, mapped from YANG variable /network_instances/network_instance/afts/ipv6_unicast/ipv6_entry/state/counters/octets_forwarded (oc-yang:counter64)

    YANG Description: The number of octets which have matched, and been forwarded,
based on the AFT entry
    """
    return self.__octets_forwarded
      
  def _set_octets_forwarded(self, v, load=False):
    """
    Setter method for octets_forwarded, mapped from YANG variable /network_instances/network_instance/afts/ipv6_unicast/ipv6_entry/state/counters/octets_forwarded (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_octets_forwarded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_octets_forwarded() directly.

    YANG Description: The number of octets which have matched, and been forwarded,
based on the AFT entry
    """
    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="octets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """octets_forwarded 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="octets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__octets_forwarded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_octets_forwarded(self):
    self.__octets_forwarded = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="octets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_packets_forwarded_backup(self):
    """
    Getter method for packets_forwarded_backup, mapped from YANG variable /network_instances/network_instance/afts/ipv6_unicast/ipv6_entry/state/counters/packets_forwarded_backup (oc-yang:counter64)

    YANG Description: The number of packets which have matched, and been forwarded,
based on the AFT backup entry.
    """
    return self.__packets_forwarded_backup
      
  def _set_packets_forwarded_backup(self, v, load=False):
    """
    Setter method for packets_forwarded_backup, mapped from YANG variable /network_instances/network_instance/afts/ipv6_unicast/ipv6_entry/state/counters/packets_forwarded_backup (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_packets_forwarded_backup is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_packets_forwarded_backup() directly.

    YANG Description: The number of packets which have matched, and been forwarded,
based on the AFT backup entry.
    """
    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="packets-forwarded-backup", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """packets_forwarded_backup 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="packets-forwarded-backup", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__packets_forwarded_backup = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_packets_forwarded_backup(self):
    self.__packets_forwarded_backup = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="packets-forwarded-backup", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_octets_forwarded_backup(self):
    """
    Getter method for octets_forwarded_backup, mapped from YANG variable /network_instances/network_instance/afts/ipv6_unicast/ipv6_entry/state/counters/octets_forwarded_backup (oc-yang:counter64)

    YANG Description: The number of octets which have matched, and been forwarded,
based on the AFT backup entry
    """
    return self.__octets_forwarded_backup
      
  def _set_octets_forwarded_backup(self, v, load=False):
    """
    Setter method for octets_forwarded_backup, mapped from YANG variable /network_instances/network_instance/afts/ipv6_unicast/ipv6_entry/state/counters/octets_forwarded_backup (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_octets_forwarded_backup is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_octets_forwarded_backup() directly.

    YANG Description: The number of octets which have matched, and been forwarded,
based on the AFT backup entry
    """
    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="octets-forwarded-backup", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """octets_forwarded_backup 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="octets-forwarded-backup", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__octets_forwarded_backup = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_octets_forwarded_backup(self):
    self.__octets_forwarded_backup = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="octets-forwarded-backup", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)

  packets_forwarded = __builtin__.property(_get_packets_forwarded)
  octets_forwarded = __builtin__.property(_get_octets_forwarded)
  packets_forwarded_backup = __builtin__.property(_get_packets_forwarded_backup)
  octets_forwarded_backup = __builtin__.property(_get_octets_forwarded_backup)


  _pyangbind_elements = OrderedDict([('packets_forwarded', packets_forwarded), ('octets_forwarded', octets_forwarded), ('packets_forwarded_backup', packets_forwarded_backup), ('octets_forwarded_backup', octets_forwarded_backup), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_afts_ipv6_unicast_ipv6_entry_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/ipv6-unicast/ipv6-entry/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 IPv6 unicast AFT
entry.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix','__counters','__entry_metadata','__origin_protocol','__decapsulate_header',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-prefix', is_config=False)
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_afts_ipv6_unicast_ipv6_entry_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__entry_metadata = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['0..8']}), is_leaf=True, yang_name="entry-metadata", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    self.__origin_protocol = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}},), is_leaf=True, yang_name="origin-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__decapsulate_header = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'GRE': {}, 'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'VXLAN': {}},), is_leaf=True, yang_name="decapsulate-header", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-aftt:encapsulation-header-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 ['network-instances', 'network-instance', 'afts', 'ipv6-unicast', 'ipv6-entry', 'state']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/afts/ipv6_unicast/ipv6_entry/state/prefix (oc-inet:ipv6-prefix)

    YANG Description: The IPv6 destination prefix that should be matched to
utilise the AFT entry.
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/afts/ipv6_unicast/ipv6_entry/state/prefix (oc-inet:ipv6-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: The IPv6 destination prefix that should be matched to
utilise the AFT entry.
    """
    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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-prefix', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-prefix', is_config=False)


  def _get_counters(self):
    """
    Getter method for counters, mapped from YANG variable /network_instances/network_instance/afts/ipv6_unicast/ipv6_entry/state/counters (container)

    YANG Description: Surrounding container for counters.
    """
    return self.__counters
      
  def _set_counters(self, v, load=False):
    """
    Setter method for counters, mapped from YANG variable /network_instances/network_instance/afts/ipv6_unicast/ipv6_entry/state/counters (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_counters is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_counters() directly.

    YANG Description: Surrounding container for counters.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_counters_openconfig_network_instance__network_instances_network_instance_afts_ipv6_unicast_ipv6_entry_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """counters must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_afts_ipv6_unicast_ipv6_entry_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__counters = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_counters(self):
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_afts_ipv6_unicast_ipv6_entry_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_entry_metadata(self):
    """
    Getter method for entry_metadata, mapped from YANG variable /network_instances/network_instance/afts/ipv6_unicast/ipv6_entry/state/entry_metadata (binary)

    YANG Description: Metadata persistently stored with the entry.
    """
    return self.__entry_metadata
      
  def _set_entry_metadata(self, v, load=False):
    """
    Setter method for entry_metadata, mapped from YANG variable /network_instances/network_instance/afts/ipv6_unicast/ipv6_entry/state/entry_metadata (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_entry_metadata is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_entry_metadata() directly.

    YANG Description: Metadata persistently stored with the entry.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['0..8']}), is_leaf=True, yang_name="entry-metadata", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """entry_metadata must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['0..8']}), is_leaf=True, yang_name="entry-metadata", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__entry_metadata = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_entry_metadata(self):
    self.__entry_metadata = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['0..8']}), is_leaf=True, yang_name="entry-metadata", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)


  def _get_origin_protocol(self):
    """
    Getter method for origin_protocol, mapped from YANG variable /network_instances/network_instance/afts/ipv6_unicast/ipv6_entry/state/origin_protocol (identityref)

    YANG Description: The protocol from which the AFT entry was learned.
    """
    return self.__origin_protocol
      
  def _set_origin_protocol(self, v, load=False):
    """
    Setter method for origin_protocol, mapped from YANG variable /network_instances/network_instance/afts/ipv6_unicast/ipv6_entry/state/origin_protocol (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_origin_protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_origin_protocol() directly.

    YANG Description: The protocol from which the AFT entry was learned.
    """
    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={'BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}},), is_leaf=True, yang_name="origin-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """origin_protocol must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}},), is_leaf=True, yang_name="origin-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__origin_protocol = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_origin_protocol(self):
    self.__origin_protocol = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}},), is_leaf=True, yang_name="origin-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_decapsulate_header(self):
    """
    Getter method for decapsulate_header, mapped from YANG variable /network_instances/network_instance/afts/ipv6_unicast/ipv6_entry/state/decapsulate_header (oc-aftt:encapsulation-header-type)

    YANG Description: When forwarding a packet to the specified next-hop, the local
system performs a decapsulation of the packet - removing the
specified header type. In the case that no next-hop is
specified, the packet header is removed, and a subsequent
forwarding lookup is performed on the packet encapsulated
within the header, matched within the relevant AFT within the
specified network-instance.
    """
    return self.__decapsulate_header
      
  def _set_decapsulate_header(self, v, load=False):
    """
    Setter method for decapsulate_header, mapped from YANG variable /network_instances/network_instance/afts/ipv6_unicast/ipv6_entry/state/decapsulate_header (oc-aftt:encapsulation-header-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_decapsulate_header is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_decapsulate_header() directly.

    YANG Description: When forwarding a packet to the specified next-hop, the local
system performs a decapsulation of the packet - removing the
specified header type. In the case that no next-hop is
specified, the packet header is removed, and a subsequent
forwarding lookup is performed on the packet encapsulated
within the header, matched within the relevant AFT within the
specified network-instance.
    """
    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={'GRE': {}, 'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'VXLAN': {}},), is_leaf=True, yang_name="decapsulate-header", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-aftt:encapsulation-header-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """decapsulate_header must be of a type compatible with oc-aftt:encapsulation-header-type""",
          'defined-type': "oc-aftt:encapsulation-header-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'GRE': {}, 'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'VXLAN': {}},), is_leaf=True, yang_name="decapsulate-header", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-aftt:encapsulation-header-type', is_config=False)""",
        })

    self.__decapsulate_header = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_decapsulate_header(self):
    self.__decapsulate_header = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'GRE': {}, 'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'VXLAN': {}},), is_leaf=True, yang_name="decapsulate-header", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-aftt:encapsulation-header-type', is_config=False)

  prefix = __builtin__.property(_get_prefix)
  counters = __builtin__.property(_get_counters)
  entry_metadata = __builtin__.property(_get_entry_metadata)
  origin_protocol = __builtin__.property(_get_origin_protocol)
  decapsulate_header = __builtin__.property(_get_decapsulate_header)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ('counters', counters), ('entry_metadata', entry_metadata), ('origin_protocol', origin_protocol), ('decapsulate_header', decapsulate_header), ])


class yc_ipv6_entry_openconfig_network_instance__network_instances_network_instance_afts_ipv6_unicast_ipv6_entry(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/ipv6-unicast/ipv6-entry. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of the IPv6 unicast entries within the abstract
forwarding table. This list is keyed by the destination IPv6
prefix.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix','__state',)

  _yang_name = 'ipv6-entry'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_afts_ipv6_unicast_ipv6_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'afts', 'ipv6-unicast', 'ipv6-entry']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/afts/ipv6_unicast/ipv6_entry/prefix (leafref)

    YANG Description: Reference to the IPv6 unicast destination prefix which
must be matched to utilise the AFT entry.
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/afts/ipv6_unicast/ipv6_entry/prefix (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: Reference to the IPv6 unicast destination prefix which
must be matched to utilise the AFT entry.
    """
    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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/afts/ipv6_unicast/ipv6_entry/state (container)

    YANG Description: Operational state parameters for the IPv6 unicast AFT
entry.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/afts/ipv6_unicast/ipv6_entry/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 IPv6 unicast AFT
entry.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_afts_ipv6_unicast_ipv6_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_afts_ipv6_unicast_ipv6_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_afts_ipv6_unicast_ipv6_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  prefix = __builtin__.property(_get_prefix)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ('state', state), ])


class yc_ipv6_unicast_openconfig_network_instance__network_instances_network_instance_afts_ipv6_unicast(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/ipv6-unicast. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The abstract forwarding table for IPv6 unicast. Entries
within this table are uniquely keyed on the IPv6 unicast
destination prefix which is matched by ingress packets.

The data set represented by the IPv6 Unicast AFTis the set
of entries within the IPv6 unicast RIB that have been
selected for installation into the FIB of the device
exporting the data structure.
  """
  __slots__ = ('_path_helper', '_extmethods', '__ipv6_entry',)

  _yang_name = 'ipv6-unicast'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__ipv6_entry = YANGDynClass(base=YANGListType("prefix",yc_ipv6_entry_openconfig_network_instance__network_instances_network_instance_afts_ipv6_unicast_ipv6_entry, yang_name="ipv6-entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix', extensions=None), is_container='list', yang_name="ipv6-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'afts', 'ipv6-unicast']

  def _get_ipv6_entry(self):
    """
    Getter method for ipv6_entry, mapped from YANG variable /network_instances/network_instance/afts/ipv6_unicast/ipv6_entry (list)

    YANG Description: List of the IPv6 unicast entries within the abstract
forwarding table. This list is keyed by the destination IPv6
prefix.
    """
    return self.__ipv6_entry
      
  def _set_ipv6_entry(self, v, load=False):
    """
    Setter method for ipv6_entry, mapped from YANG variable /network_instances/network_instance/afts/ipv6_unicast/ipv6_entry (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6_entry is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6_entry() directly.

    YANG Description: List of the IPv6 unicast entries within the abstract
forwarding table. This list is keyed by the destination IPv6
prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("prefix",yc_ipv6_entry_openconfig_network_instance__network_instances_network_instance_afts_ipv6_unicast_ipv6_entry, yang_name="ipv6-entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix', extensions=None), is_container='list', yang_name="ipv6-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6_entry must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("prefix",yc_ipv6_entry_openconfig_network_instance__network_instances_network_instance_afts_ipv6_unicast_ipv6_entry, yang_name="ipv6-entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix', extensions=None), is_container='list', yang_name="ipv6-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__ipv6_entry = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6_entry(self):
    self.__ipv6_entry = YANGDynClass(base=YANGListType("prefix",yc_ipv6_entry_openconfig_network_instance__network_instances_network_instance_afts_ipv6_unicast_ipv6_entry, yang_name="ipv6-entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix', extensions=None), is_container='list', yang_name="ipv6-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  ipv6_entry = __builtin__.property(_get_ipv6_entry)


  _pyangbind_elements = OrderedDict([('ipv6_entry', ipv6_entry), ])


class yc_counters_openconfig_network_instance__network_instances_network_instance_afts_policy_forwarding_policy_forwarding_entry_state_counters(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/policy-forwarding/policy-forwarding-entry/state/counters. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Surrounding container for counters.
  """
  __slots__ = ('_path_helper', '_extmethods', '__packets_forwarded','__octets_forwarded',)

  _yang_name = 'counters'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__packets_forwarded = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="packets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    self.__octets_forwarded = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="octets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'afts', 'policy-forwarding', 'policy-forwarding-entry', 'state', 'counters']

  def _get_packets_forwarded(self):
    """
    Getter method for packets_forwarded, mapped from YANG variable /network_instances/network_instance/afts/policy_forwarding/policy_forwarding_entry/state/counters/packets_forwarded (oc-yang:counter64)

    YANG Description: The number of packets which have matched, and been forwarded,
based on the AFT entry.
    """
    return self.__packets_forwarded
      
  def _set_packets_forwarded(self, v, load=False):
    """
    Setter method for packets_forwarded, mapped from YANG variable /network_instances/network_instance/afts/policy_forwarding/policy_forwarding_entry/state/counters/packets_forwarded (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_packets_forwarded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_packets_forwarded() directly.

    YANG Description: The number of packets which have matched, and been forwarded,
based on the AFT entry.
    """
    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="packets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """packets_forwarded 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="packets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__packets_forwarded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_packets_forwarded(self):
    self.__packets_forwarded = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="packets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_octets_forwarded(self):
    """
    Getter method for octets_forwarded, mapped from YANG variable /network_instances/network_instance/afts/policy_forwarding/policy_forwarding_entry/state/counters/octets_forwarded (oc-yang:counter64)

    YANG Description: The number of octets which have matched, and been forwarded,
based on the AFT entry
    """
    return self.__octets_forwarded
      
  def _set_octets_forwarded(self, v, load=False):
    """
    Setter method for octets_forwarded, mapped from YANG variable /network_instances/network_instance/afts/policy_forwarding/policy_forwarding_entry/state/counters/octets_forwarded (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_octets_forwarded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_octets_forwarded() directly.

    YANG Description: The number of octets which have matched, and been forwarded,
based on the AFT entry
    """
    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="octets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """octets_forwarded 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="octets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__octets_forwarded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_octets_forwarded(self):
    self.__octets_forwarded = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="octets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)

  packets_forwarded = __builtin__.property(_get_packets_forwarded)
  octets_forwarded = __builtin__.property(_get_octets_forwarded)


  _pyangbind_elements = OrderedDict([('packets_forwarded', packets_forwarded), ('octets_forwarded', octets_forwarded), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_afts_policy_forwarding_policy_forwarding_entry_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/policy-forwarding/policy-forwarding-entry/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 Policy Forwarding
AFT entry.
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__ip_prefix','__mac_address','__mpls_label','__mpls_tc','__ip_dscp','__ip_protocol','__l4_src_port','__l4_dst_port','__counters','__entry_metadata',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__ip_prefix = 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])'}),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="ip-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=False)
    self.__mac_address = 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)
    self.__mpls_label = 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="mpls-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    self.__mpls_tc = 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="mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-tc', is_config=False)
    self.__ip_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="ip-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:dscp', is_config=False)
    self.__ip_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="ip-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=False)
    self.__l4_src_port = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="l4-src-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:port-number', is_config=False)
    self.__l4_dst_port = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="l4-dst-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:port-number', is_config=False)
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_afts_policy_forwarding_policy_forwarding_entry_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__entry_metadata = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['0..8']}), is_leaf=True, yang_name="entry-metadata", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'afts', 'policy-forwarding', 'policy-forwarding-entry', 'state']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/afts/policy_forwarding/policy_forwarding_entry/state/index (uint64)

    YANG Description: An arbitrary 64-bit index identifying the policy forwarding
AFT entry.
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/afts/policy_forwarding/policy_forwarding_entry/state/index (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: An arbitrary 64-bit index identifying the policy forwarding
AFT entry.
    """
    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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_index(self):
    self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_ip_prefix(self):
    """
    Getter method for ip_prefix, mapped from YANG variable /network_instances/network_instance/afts/policy_forwarding/policy_forwarding_entry/state/ip_prefix (oc-inet:ip-prefix)

    YANG Description: The IP prefix that the forwarding entry matches.
    """
    return self.__ip_prefix
      
  def _set_ip_prefix(self, v, load=False):
    """
    Setter method for ip_prefix, mapped from YANG variable /network_instances/network_instance/afts/policy_forwarding/policy_forwarding_entry/state/ip_prefix (oc-inet:ip-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ip_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ip_prefix() directly.

    YANG Description: The IP prefix that the forwarding entry matches.
    """
    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])'}),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="ip-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ip_prefix must be of a type compatible with oc-inet:ip-prefix""",
          'defined-type': "oc-inet:ip-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])'}),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="ip-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=False)""",
        })

    self.__ip_prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ip_prefix(self):
    self.__ip_prefix = 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])'}),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="ip-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=False)


  def _get_mac_address(self):
    """
    Getter method for mac_address, mapped from YANG variable /network_instances/network_instance/afts/policy_forwarding/policy_forwarding_entry/state/mac_address (oc-yang:mac-address)

    YANG Description: The MAC address that the forwarding entry matches. Used for
Layer 2 forwarding entries, e.g., within a VSI instance.
    """
    return self.__mac_address
      
  def _set_mac_address(self, v, load=False):
    """
    Setter method for mac_address, mapped from YANG variable /network_instances/network_instance/afts/policy_forwarding/policy_forwarding_entry/state/mac_address (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_address() directly.

    YANG Description: The MAC address that the forwarding entry matches. Used for
Layer 2 forwarding entries, e.g., within a VSI instance.
    """
    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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_address 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)""",
        })

    self.__mac_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mac_address(self):
    self.__mac_address = 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)


  def _get_mpls_label(self):
    """
    Getter method for mpls_label, mapped from YANG variable /network_instances/network_instance/afts/policy_forwarding/policy_forwarding_entry/state/mpls_label (oc-mplst:mpls-label)

    YANG Description: The MPLS label that the forwarding entry matches. Used for
MPLS forwarding entries, whereby the local device acts as an
LSR.
    """
    return self.__mpls_label
      
  def _set_mpls_label(self, v, load=False):
    """
    Setter method for mpls_label, mapped from YANG variable /network_instances/network_instance/afts/policy_forwarding/policy_forwarding_entry/state/mpls_label (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mpls_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mpls_label() directly.

    YANG Description: The MPLS label that the forwarding entry matches. Used for
MPLS forwarding entries, whereby the local device acts as an
LSR.
    """
    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="mpls-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mpls_label must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="mpls-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)""",
        })

    self.__mpls_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mpls_label(self):
    self.__mpls_label = 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="mpls-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)


  def _get_mpls_tc(self):
    """
    Getter method for mpls_tc, mapped from YANG variable /network_instances/network_instance/afts/policy_forwarding/policy_forwarding_entry/state/mpls_tc (oc-mplst:mpls-tc)

    YANG Description: The value of the MPLS Traffic Class bits (formerly known as
the MPLS experimental bits) that are to be matched by the AFT
entry.
    """
    return self.__mpls_tc
      
  def _set_mpls_tc(self, v, load=False):
    """
    Setter method for mpls_tc, mapped from YANG variable /network_instances/network_instance/afts/policy_forwarding/policy_forwarding_entry/state/mpls_tc (oc-mplst:mpls-tc)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mpls_tc() directly.

    YANG Description: The value of the MPLS Traffic Class bits (formerly known as
the MPLS experimental bits) that are to be matched by the AFT
entry.
    """
    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="mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-tc', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mpls_tc must be of a type compatible with oc-mplst:mpls-tc""",
          'defined-type': "oc-mplst: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="mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-tc', is_config=False)""",
        })

    self.__mpls_tc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mpls_tc(self):
    self.__mpls_tc = 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="mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-tc', is_config=False)


  def _get_ip_dscp(self):
    """
    Getter method for ip_dscp, mapped from YANG variable /network_instances/network_instance/afts/policy_forwarding/policy_forwarding_entry/state/ip_dscp (oc-inet:dscp)

    YANG Description: The value of the differentiated services code point (DSCP) to
be matched for the forwarding entry. The value is specified in
cases where specific class-based forwarding based on IP is
implemented by the device.
    """
    return self.__ip_dscp
      
  def _set_ip_dscp(self, v, load=False):
    """
    Setter method for ip_dscp, mapped from YANG variable /network_instances/network_instance/afts/policy_forwarding/policy_forwarding_entry/state/ip_dscp (oc-inet:dscp)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ip_dscp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ip_dscp() directly.

    YANG Description: The value of the differentiated services code point (DSCP) to
be matched for the forwarding entry. The value is specified in
cases where specific class-based forwarding based on IP is
implemented by the device.
    """
    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="ip-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:dscp', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ip_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="ip-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:dscp', is_config=False)""",
        })

    self.__ip_dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ip_dscp(self):
    self.__ip_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="ip-dscp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:dscp', is_config=False)


  def _get_ip_protocol(self):
    """
    Getter method for ip_protocol, mapped from YANG variable /network_instances/network_instance/afts/policy_forwarding/policy_forwarding_entry/state/ip_protocol (oc-pkt-match-types:ip-protocol-type)

    YANG Description: The value of the IP protocol field of an IPv4 packet, or the
next-header field of an IPv6 packet which is to be matched by
the AFT entry. This field is utilised where forwarding is
performed based on L4 information.
    """
    return self.__ip_protocol
      
  def _set_ip_protocol(self, v, load=False):
    """
    Setter method for ip_protocol, mapped from YANG variable /network_instances/network_instance/afts/policy_forwarding/policy_forwarding_entry/state/ip_protocol (oc-pkt-match-types:ip-protocol-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ip_protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ip_protocol() directly.

    YANG Description: The value of the IP protocol field of an IPv4 packet, or the
next-header field of an IPv6 packet which is to be matched by
the AFT entry. This field is utilised where forwarding is
performed based on L4 information.
    """
    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="ip-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ip_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="ip-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=False)""",
        })

    self.__ip_protocol = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ip_protocol(self):
    self.__ip_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="ip-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pkt-match-types:ip-protocol-type', is_config=False)


  def _get_l4_src_port(self):
    """
    Getter method for l4_src_port, mapped from YANG variable /network_instances/network_instance/afts/policy_forwarding/policy_forwarding_entry/state/l4_src_port (oc-inet:port-number)

    YANG Description: The value of the source port field of the transport header
that is to be matched by the AFT entry.
    """
    return self.__l4_src_port
      
  def _set_l4_src_port(self, v, load=False):
    """
    Setter method for l4_src_port, mapped from YANG variable /network_instances/network_instance/afts/policy_forwarding/policy_forwarding_entry/state/l4_src_port (oc-inet:port-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_l4_src_port is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_l4_src_port() directly.

    YANG Description: The value of the source port field of the transport header
that is to be matched by the AFT entry.
    """
    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="l4-src-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:port-number', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """l4_src_port must be of a type compatible with oc-inet:port-number""",
          'defined-type': "oc-inet:port-number",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="l4-src-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:port-number', is_config=False)""",
        })

    self.__l4_src_port = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_l4_src_port(self):
    self.__l4_src_port = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="l4-src-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:port-number', is_config=False)


  def _get_l4_dst_port(self):
    """
    Getter method for l4_dst_port, mapped from YANG variable /network_instances/network_instance/afts/policy_forwarding/policy_forwarding_entry/state/l4_dst_port (oc-inet:port-number)

    YANG Description: The value of the destination port field of the transport
header that is to be matched by the AFT entry.
    """
    return self.__l4_dst_port
      
  def _set_l4_dst_port(self, v, load=False):
    """
    Setter method for l4_dst_port, mapped from YANG variable /network_instances/network_instance/afts/policy_forwarding/policy_forwarding_entry/state/l4_dst_port (oc-inet:port-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_l4_dst_port is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_l4_dst_port() directly.

    YANG Description: The value of the destination port field of the transport
header that is to be matched by the AFT entry.
    """
    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="l4-dst-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:port-number', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """l4_dst_port must be of a type compatible with oc-inet:port-number""",
          'defined-type': "oc-inet:port-number",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="l4-dst-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:port-number', is_config=False)""",
        })

    self.__l4_dst_port = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_l4_dst_port(self):
    self.__l4_dst_port = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="l4-dst-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:port-number', is_config=False)


  def _get_counters(self):
    """
    Getter method for counters, mapped from YANG variable /network_instances/network_instance/afts/policy_forwarding/policy_forwarding_entry/state/counters (container)

    YANG Description: Surrounding container for counters.
    """
    return self.__counters
      
  def _set_counters(self, v, load=False):
    """
    Setter method for counters, mapped from YANG variable /network_instances/network_instance/afts/policy_forwarding/policy_forwarding_entry/state/counters (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_counters is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_counters() directly.

    YANG Description: Surrounding container for counters.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_counters_openconfig_network_instance__network_instances_network_instance_afts_policy_forwarding_policy_forwarding_entry_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """counters must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_afts_policy_forwarding_policy_forwarding_entry_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__counters = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_counters(self):
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_afts_policy_forwarding_policy_forwarding_entry_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_entry_metadata(self):
    """
    Getter method for entry_metadata, mapped from YANG variable /network_instances/network_instance/afts/policy_forwarding/policy_forwarding_entry/state/entry_metadata (binary)

    YANG Description: Metadata persistently stored with the entry.
    """
    return self.__entry_metadata
      
  def _set_entry_metadata(self, v, load=False):
    """
    Setter method for entry_metadata, mapped from YANG variable /network_instances/network_instance/afts/policy_forwarding/policy_forwarding_entry/state/entry_metadata (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_entry_metadata is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_entry_metadata() directly.

    YANG Description: Metadata persistently stored with the entry.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['0..8']}), is_leaf=True, yang_name="entry-metadata", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """entry_metadata must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['0..8']}), is_leaf=True, yang_name="entry-metadata", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__entry_metadata = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_entry_metadata(self):
    self.__entry_metadata = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['0..8']}), is_leaf=True, yang_name="entry-metadata", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  index = __builtin__.property(_get_index)
  ip_prefix = __builtin__.property(_get_ip_prefix)
  mac_address = __builtin__.property(_get_mac_address)
  mpls_label = __builtin__.property(_get_mpls_label)
  mpls_tc = __builtin__.property(_get_mpls_tc)
  ip_dscp = __builtin__.property(_get_ip_dscp)
  ip_protocol = __builtin__.property(_get_ip_protocol)
  l4_src_port = __builtin__.property(_get_l4_src_port)
  l4_dst_port = __builtin__.property(_get_l4_dst_port)
  counters = __builtin__.property(_get_counters)
  entry_metadata = __builtin__.property(_get_entry_metadata)


  _pyangbind_elements = OrderedDict([('index', index), ('ip_prefix', ip_prefix), ('mac_address', mac_address), ('mpls_label', mpls_label), ('mpls_tc', mpls_tc), ('ip_dscp', ip_dscp), ('ip_protocol', ip_protocol), ('l4_src_port', l4_src_port), ('l4_dst_port', l4_dst_port), ('counters', counters), ('entry_metadata', entry_metadata), ])


class yc_policy_forwarding_entry_openconfig_network_instance__network_instances_network_instance_afts_policy_forwarding_policy_forwarding_entry(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/policy-forwarding/policy-forwarding-entry. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of the policy forwarding entries within the abstract
forwarding table. Each entry is uniquely identified by an
index on the system, due to the arbitrary match conditions
that may be implemented within the policy forwarding AFT.
The index may change upon changes of the entry if, and only
if, the device exporting the AFT replaces the entire entry
by removing the previous entry and replacing it with a
subsequent updated version.
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__state',)

  _yang_name = 'policy-forwarding-entry'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_afts_policy_forwarding_policy_forwarding_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'afts', 'policy-forwarding', 'policy-forwarding-entry']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/afts/policy_forwarding/policy_forwarding_entry/index (leafref)

    YANG Description: Reference to the arbitary index for the policy forwarding
AFT entry.
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/afts/policy_forwarding/policy_forwarding_entry/index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: Reference to the arbitary index for the policy forwarding
AFT entry.
    """
    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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_index(self):
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/afts/policy_forwarding/policy_forwarding_entry/state (container)

    YANG Description: Operational state parameters for the Policy Forwarding
AFT entry.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/afts/policy_forwarding/policy_forwarding_entry/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 Policy Forwarding
AFT entry.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_afts_policy_forwarding_policy_forwarding_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_afts_policy_forwarding_policy_forwarding_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_afts_policy_forwarding_policy_forwarding_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  index = __builtin__.property(_get_index)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('index', index), ('state', state), ])


class yc_policy_forwarding_openconfig_network_instance__network_instances_network_instance_afts_policy_forwarding(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/policy-forwarding. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The abstract forwarding table for policy-based forwarding
entries. Since multiple match criteria can be utilised
within a policy-based forwarding rule, this AFT provides a
flexible match criteria, and is indexed based on an
arbitrary 64-bit index. Entries within the AFT may match on
multiple field types (e.g., L4 header fields, as well as L2
fields).

Examples of entries within this table are:
 - IPv4 policy-based routing based on DSCP.
 - MPLS policy-based forwarding entries.
  """
  __slots__ = ('_path_helper', '_extmethods', '__policy_forwarding_entry',)

  _yang_name = 'policy-forwarding'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__policy_forwarding_entry = YANGDynClass(base=YANGListType("index",yc_policy_forwarding_entry_openconfig_network_instance__network_instances_network_instance_afts_policy_forwarding_policy_forwarding_entry, yang_name="policy-forwarding-entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="policy-forwarding-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'afts', 'policy-forwarding']

  def _get_policy_forwarding_entry(self):
    """
    Getter method for policy_forwarding_entry, mapped from YANG variable /network_instances/network_instance/afts/policy_forwarding/policy_forwarding_entry (list)

    YANG Description: List of the policy forwarding entries within the abstract
forwarding table. Each entry is uniquely identified by an
index on the system, due to the arbitrary match conditions
that may be implemented within the policy forwarding AFT.
The index may change upon changes of the entry if, and only
if, the device exporting the AFT replaces the entire entry
by removing the previous entry and replacing it with a
subsequent updated version.
    """
    return self.__policy_forwarding_entry
      
  def _set_policy_forwarding_entry(self, v, load=False):
    """
    Setter method for policy_forwarding_entry, mapped from YANG variable /network_instances/network_instance/afts/policy_forwarding/policy_forwarding_entry (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_policy_forwarding_entry is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_policy_forwarding_entry() directly.

    YANG Description: List of the policy forwarding entries within the abstract
forwarding table. Each entry is uniquely identified by an
index on the system, due to the arbitrary match conditions
that may be implemented within the policy forwarding AFT.
The index may change upon changes of the entry if, and only
if, the device exporting the AFT replaces the entire entry
by removing the previous entry and replacing it with a
subsequent updated version.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("index",yc_policy_forwarding_entry_openconfig_network_instance__network_instances_network_instance_afts_policy_forwarding_policy_forwarding_entry, yang_name="policy-forwarding-entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="policy-forwarding-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """policy_forwarding_entry must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("index",yc_policy_forwarding_entry_openconfig_network_instance__network_instances_network_instance_afts_policy_forwarding_policy_forwarding_entry, yang_name="policy-forwarding-entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="policy-forwarding-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__policy_forwarding_entry = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_policy_forwarding_entry(self):
    self.__policy_forwarding_entry = YANGDynClass(base=YANGListType("index",yc_policy_forwarding_entry_openconfig_network_instance__network_instances_network_instance_afts_policy_forwarding_policy_forwarding_entry, yang_name="policy-forwarding-entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="policy-forwarding-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  policy_forwarding_entry = __builtin__.property(_get_policy_forwarding_entry)


  _pyangbind_elements = OrderedDict([('policy_forwarding_entry', policy_forwarding_entry), ])


class yc_counters_openconfig_network_instance__network_instances_network_instance_afts_mpls_label_entry_state_counters(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/mpls/label-entry/state/counters. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Surrounding container for counters.
  """
  __slots__ = ('_path_helper', '_extmethods', '__packets_forwarded','__octets_forwarded',)

  _yang_name = 'counters'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__packets_forwarded = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="packets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    self.__octets_forwarded = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="octets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'afts', 'mpls', 'label-entry', 'state', 'counters']

  def _get_packets_forwarded(self):
    """
    Getter method for packets_forwarded, mapped from YANG variable /network_instances/network_instance/afts/mpls/label_entry/state/counters/packets_forwarded (oc-yang:counter64)

    YANG Description: The number of packets which have matched, and been forwarded,
based on the AFT entry.
    """
    return self.__packets_forwarded
      
  def _set_packets_forwarded(self, v, load=False):
    """
    Setter method for packets_forwarded, mapped from YANG variable /network_instances/network_instance/afts/mpls/label_entry/state/counters/packets_forwarded (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_packets_forwarded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_packets_forwarded() directly.

    YANG Description: The number of packets which have matched, and been forwarded,
based on the AFT entry.
    """
    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="packets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """packets_forwarded 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="packets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__packets_forwarded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_packets_forwarded(self):
    self.__packets_forwarded = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="packets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_octets_forwarded(self):
    """
    Getter method for octets_forwarded, mapped from YANG variable /network_instances/network_instance/afts/mpls/label_entry/state/counters/octets_forwarded (oc-yang:counter64)

    YANG Description: The number of octets which have matched, and been forwarded,
based on the AFT entry
    """
    return self.__octets_forwarded
      
  def _set_octets_forwarded(self, v, load=False):
    """
    Setter method for octets_forwarded, mapped from YANG variable /network_instances/network_instance/afts/mpls/label_entry/state/counters/octets_forwarded (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_octets_forwarded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_octets_forwarded() directly.

    YANG Description: The number of octets which have matched, and been forwarded,
based on the AFT entry
    """
    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="octets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """octets_forwarded 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="octets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__octets_forwarded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_octets_forwarded(self):
    self.__octets_forwarded = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="octets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)

  packets_forwarded = __builtin__.property(_get_packets_forwarded)
  octets_forwarded = __builtin__.property(_get_octets_forwarded)


  _pyangbind_elements = OrderedDict([('packets_forwarded', packets_forwarded), ('octets_forwarded', octets_forwarded), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_afts_mpls_label_entry_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/mpls/label-entry/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 MPLS AFT
entry.
  """
  __slots__ = ('_path_helper', '_extmethods', '__label','__counters','__entry_metadata','__popped_mpls_label_stack',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__label = 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="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_afts_mpls_label_entry_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__entry_metadata = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['0..8']}), is_leaf=True, yang_name="entry-metadata", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    self.__popped_mpls_label_stack = YANGDynClass(unique=True, base=TypedListType(allowed_type=[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=False, yang_name="popped-mpls-label-stack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', 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 ['network-instances', 'network-instance', 'afts', 'mpls', 'label-entry', 'state']

  def _get_label(self):
    """
    Getter method for label, mapped from YANG variable /network_instances/network_instance/afts/mpls/label_entry/state/label (oc-mplst:mpls-label)

    YANG Description: The top-most MPLS label that should be matched to
utilise the AFT entry.
    """
    return self.__label
      
  def _set_label(self, v, load=False):
    """
    Setter method for label, mapped from YANG variable /network_instances/network_instance/afts/mpls/label_entry/state/label (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_label() directly.

    YANG Description: The top-most MPLS label that should be matched to
utilise the AFT entry.
    """
    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="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """label must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)""",
        })

    self.__label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_label(self):
    self.__label = 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="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)


  def _get_counters(self):
    """
    Getter method for counters, mapped from YANG variable /network_instances/network_instance/afts/mpls/label_entry/state/counters (container)

    YANG Description: Surrounding container for counters.
    """
    return self.__counters
      
  def _set_counters(self, v, load=False):
    """
    Setter method for counters, mapped from YANG variable /network_instances/network_instance/afts/mpls/label_entry/state/counters (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_counters is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_counters() directly.

    YANG Description: Surrounding container for counters.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_counters_openconfig_network_instance__network_instances_network_instance_afts_mpls_label_entry_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """counters must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_afts_mpls_label_entry_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__counters = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_counters(self):
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_afts_mpls_label_entry_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_entry_metadata(self):
    """
    Getter method for entry_metadata, mapped from YANG variable /network_instances/network_instance/afts/mpls/label_entry/state/entry_metadata (binary)

    YANG Description: Metadata persistently stored with the entry.
    """
    return self.__entry_metadata
      
  def _set_entry_metadata(self, v, load=False):
    """
    Setter method for entry_metadata, mapped from YANG variable /network_instances/network_instance/afts/mpls/label_entry/state/entry_metadata (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_entry_metadata is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_entry_metadata() directly.

    YANG Description: Metadata persistently stored with the entry.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['0..8']}), is_leaf=True, yang_name="entry-metadata", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """entry_metadata must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['0..8']}), is_leaf=True, yang_name="entry-metadata", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__entry_metadata = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_entry_metadata(self):
    self.__entry_metadata = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['0..8']}), is_leaf=True, yang_name="entry-metadata", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)


  def _get_popped_mpls_label_stack(self):
    """
    Getter method for popped_mpls_label_stack, mapped from YANG variable /network_instances/network_instance/afts/mpls/label_entry/state/popped_mpls_label_stack (oc-mplst:mpls-label)

    YANG Description: The MPLS label stack to be popped from the packet when
switched by the system. The stack is encoded as a leaf-list
such that the first entry is the label that is outer-most (i.e.,
furthest from the bottom of the stack).

If the local system pops the outer-most label 400, then the
value of this list is [400,]. If the local system removes two
labels, the outer-most being 500, and the second of which is
400, then the value of the list is [500, 400].

A swap operation is reflected by entries in the
popped-mpls-label-stack and pushed-mpls-label-stack nodes.
    """
    return self.__popped_mpls_label_stack
      
  def _set_popped_mpls_label_stack(self, v, load=False):
    """
    Setter method for popped_mpls_label_stack, mapped from YANG variable /network_instances/network_instance/afts/mpls/label_entry/state/popped_mpls_label_stack (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_popped_mpls_label_stack is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_popped_mpls_label_stack() directly.

    YANG Description: The MPLS label stack to be popped from the packet when
switched by the system. The stack is encoded as a leaf-list
such that the first entry is the label that is outer-most (i.e.,
furthest from the bottom of the stack).

If the local system pops the outer-most label 400, then the
value of this list is [400,]. If the local system removes two
labels, the outer-most being 500, and the second of which is
400, then the value of the list is [500, 400].

A swap operation is reflected by entries in the
popped-mpls-label-stack and pushed-mpls-label-stack nodes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=[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=False, yang_name="popped-mpls-label-stack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """popped_mpls_label_stack must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst:mpls-label",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=[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=False, yang_name="popped-mpls-label-stack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)""",
        })

    self.__popped_mpls_label_stack = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_popped_mpls_label_stack(self):
    self.__popped_mpls_label_stack = YANGDynClass(unique=True, base=TypedListType(allowed_type=[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=False, yang_name="popped-mpls-label-stack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)

  label = __builtin__.property(_get_label)
  counters = __builtin__.property(_get_counters)
  entry_metadata = __builtin__.property(_get_entry_metadata)
  popped_mpls_label_stack = __builtin__.property(_get_popped_mpls_label_stack)


  _pyangbind_elements = OrderedDict([('label', label), ('counters', counters), ('entry_metadata', entry_metadata), ('popped_mpls_label_stack', popped_mpls_label_stack), ])


class yc_label_entry_openconfig_network_instance__network_instances_network_instance_afts_mpls_label_entry(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/mpls/label-entry. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of the MPLS entries within the abstract
forwarding table. This list is keyed by the top-most MPLS
label.
  """
  __slots__ = ('_path_helper', '_extmethods', '__label','__state',)

  _yang_name = 'label-entry'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__label = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_afts_mpls_label_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'afts', 'mpls', 'label-entry']

  def _get_label(self):
    """
    Getter method for label, mapped from YANG variable /network_instances/network_instance/afts/mpls/label_entry/label (leafref)

    YANG Description: Reference to the top-most MPLS label matched by the
entry.
    """
    return self.__label
      
  def _set_label(self, v, load=False):
    """
    Setter method for label, mapped from YANG variable /network_instances/network_instance/afts/mpls/label_entry/label (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_label() directly.

    YANG Description: Reference to the top-most MPLS label matched by the
entry.
    """
    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="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """label must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_label(self):
    self.__label = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/afts/mpls/label_entry/state (container)

    YANG Description: Operational state parameters for the MPLS AFT
entry.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/afts/mpls/label_entry/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 MPLS AFT
entry.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_afts_mpls_label_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_afts_mpls_label_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_afts_mpls_label_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  label = __builtin__.property(_get_label)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('label', label), ('state', state), ])


class yc_mpls_openconfig_network_instance__network_instances_network_instance_afts_mpls(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/mpls. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The abstract forwarding table for MPLS label based
forwarding entries. Entries within the table are keyed based
on the top-most MPLS label in the stack on the ingress
packet.
  """
  __slots__ = ('_path_helper', '_extmethods', '__label_entry',)

  _yang_name = 'mpls'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__label_entry = YANGDynClass(base=YANGListType("label",yc_label_entry_openconfig_network_instance__network_instances_network_instance_afts_mpls_label_entry, yang_name="label-entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='label', extensions=None), is_container='list', yang_name="label-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'afts', 'mpls']

  def _get_label_entry(self):
    """
    Getter method for label_entry, mapped from YANG variable /network_instances/network_instance/afts/mpls/label_entry (list)

    YANG Description: List of the MPLS entries within the abstract
forwarding table. This list is keyed by the top-most MPLS
label.
    """
    return self.__label_entry
      
  def _set_label_entry(self, v, load=False):
    """
    Setter method for label_entry, mapped from YANG variable /network_instances/network_instance/afts/mpls/label_entry (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_label_entry is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_label_entry() directly.

    YANG Description: List of the MPLS entries within the abstract
forwarding table. This list is keyed by the top-most MPLS
label.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("label",yc_label_entry_openconfig_network_instance__network_instances_network_instance_afts_mpls_label_entry, yang_name="label-entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='label', extensions=None), is_container='list', yang_name="label-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """label_entry must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("label",yc_label_entry_openconfig_network_instance__network_instances_network_instance_afts_mpls_label_entry, yang_name="label-entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='label', extensions=None), is_container='list', yang_name="label-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__label_entry = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_label_entry(self):
    self.__label_entry = YANGDynClass(base=YANGListType("label",yc_label_entry_openconfig_network_instance__network_instances_network_instance_afts_mpls_label_entry, yang_name="label-entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='label', extensions=None), is_container='list', yang_name="label-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  label_entry = __builtin__.property(_get_label_entry)


  _pyangbind_elements = OrderedDict([('label_entry', label_entry), ])


class yc_counters_openconfig_network_instance__network_instances_network_instance_afts_ethernet_mac_entry_state_counters(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/ethernet/mac-entry/state/counters. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Surrounding container for counters.
  """
  __slots__ = ('_path_helper', '_extmethods', '__packets_forwarded','__octets_forwarded',)

  _yang_name = 'counters'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__packets_forwarded = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="packets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    self.__octets_forwarded = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="octets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'afts', 'ethernet', 'mac-entry', 'state', 'counters']

  def _get_packets_forwarded(self):
    """
    Getter method for packets_forwarded, mapped from YANG variable /network_instances/network_instance/afts/ethernet/mac_entry/state/counters/packets_forwarded (oc-yang:counter64)

    YANG Description: The number of packets which have matched, and been forwarded,
based on the AFT entry.
    """
    return self.__packets_forwarded
      
  def _set_packets_forwarded(self, v, load=False):
    """
    Setter method for packets_forwarded, mapped from YANG variable /network_instances/network_instance/afts/ethernet/mac_entry/state/counters/packets_forwarded (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_packets_forwarded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_packets_forwarded() directly.

    YANG Description: The number of packets which have matched, and been forwarded,
based on the AFT entry.
    """
    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="packets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """packets_forwarded 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="packets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__packets_forwarded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_packets_forwarded(self):
    self.__packets_forwarded = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="packets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_octets_forwarded(self):
    """
    Getter method for octets_forwarded, mapped from YANG variable /network_instances/network_instance/afts/ethernet/mac_entry/state/counters/octets_forwarded (oc-yang:counter64)

    YANG Description: The number of octets which have matched, and been forwarded,
based on the AFT entry
    """
    return self.__octets_forwarded
      
  def _set_octets_forwarded(self, v, load=False):
    """
    Setter method for octets_forwarded, mapped from YANG variable /network_instances/network_instance/afts/ethernet/mac_entry/state/counters/octets_forwarded (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_octets_forwarded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_octets_forwarded() directly.

    YANG Description: The number of octets which have matched, and been forwarded,
based on the AFT entry
    """
    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="octets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """octets_forwarded 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="octets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__octets_forwarded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_octets_forwarded(self):
    self.__octets_forwarded = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="octets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)

  packets_forwarded = __builtin__.property(_get_packets_forwarded)
  octets_forwarded = __builtin__.property(_get_octets_forwarded)


  _pyangbind_elements = OrderedDict([('packets_forwarded', packets_forwarded), ('octets_forwarded', octets_forwarded), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_afts_ethernet_mac_entry_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/ethernet/mac-entry/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 Ethernet AFT
entry.
  """
  __slots__ = ('_path_helper', '_extmethods', '__mac_address','__counters','__entry_metadata',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__mac_address = 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_afts_ethernet_mac_entry_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__entry_metadata = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['0..8']}), is_leaf=True, yang_name="entry-metadata", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'afts', 'ethernet', 'mac-entry', 'state']

  def _get_mac_address(self):
    """
    Getter method for mac_address, mapped from YANG variable /network_instances/network_instance/afts/ethernet/mac_entry/state/mac_address (oc-yang:mac-address)

    YANG Description: The outer MAC address of the Ethernet frame that must
be matched for the AFT entry to be utilised.
    """
    return self.__mac_address
      
  def _set_mac_address(self, v, load=False):
    """
    Setter method for mac_address, mapped from YANG variable /network_instances/network_instance/afts/ethernet/mac_entry/state/mac_address (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_address() directly.

    YANG Description: The outer MAC address of the Ethernet frame that must
be matched for the AFT entry to be utilised.
    """
    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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_address 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)""",
        })

    self.__mac_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mac_address(self):
    self.__mac_address = 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)


  def _get_counters(self):
    """
    Getter method for counters, mapped from YANG variable /network_instances/network_instance/afts/ethernet/mac_entry/state/counters (container)

    YANG Description: Surrounding container for counters.
    """
    return self.__counters
      
  def _set_counters(self, v, load=False):
    """
    Setter method for counters, mapped from YANG variable /network_instances/network_instance/afts/ethernet/mac_entry/state/counters (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_counters is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_counters() directly.

    YANG Description: Surrounding container for counters.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_counters_openconfig_network_instance__network_instances_network_instance_afts_ethernet_mac_entry_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """counters must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_afts_ethernet_mac_entry_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__counters = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_counters(self):
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_afts_ethernet_mac_entry_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_entry_metadata(self):
    """
    Getter method for entry_metadata, mapped from YANG variable /network_instances/network_instance/afts/ethernet/mac_entry/state/entry_metadata (binary)

    YANG Description: Metadata persistently stored with the entry.
    """
    return self.__entry_metadata
      
  def _set_entry_metadata(self, v, load=False):
    """
    Setter method for entry_metadata, mapped from YANG variable /network_instances/network_instance/afts/ethernet/mac_entry/state/entry_metadata (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_entry_metadata is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_entry_metadata() directly.

    YANG Description: Metadata persistently stored with the entry.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['0..8']}), is_leaf=True, yang_name="entry-metadata", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """entry_metadata must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['0..8']}), is_leaf=True, yang_name="entry-metadata", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__entry_metadata = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_entry_metadata(self):
    self.__entry_metadata = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['0..8']}), is_leaf=True, yang_name="entry-metadata", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  mac_address = __builtin__.property(_get_mac_address)
  counters = __builtin__.property(_get_counters)
  entry_metadata = __builtin__.property(_get_entry_metadata)


  _pyangbind_elements = OrderedDict([('mac_address', mac_address), ('counters', counters), ('entry_metadata', entry_metadata), ])


class yc_mac_entry_openconfig_network_instance__network_instances_network_instance_afts_ethernet_mac_entry(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/ethernet/mac-entry. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of the Ethernet entries within the abstract
forwarding table. This list is keyed by the outer MAC address
of the Ethernet frame.
  """
  __slots__ = ('_path_helper', '_extmethods', '__mac_address','__state',)

  _yang_name = 'mac-entry'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__mac_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_afts_ethernet_mac_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'afts', 'ethernet', 'mac-entry']

  def _get_mac_address(self):
    """
    Getter method for mac_address, mapped from YANG variable /network_instances/network_instance/afts/ethernet/mac_entry/mac_address (leafref)

    YANG Description: Reference to the outer MAC address matched by the
entry.
    """
    return self.__mac_address
      
  def _set_mac_address(self, v, load=False):
    """
    Setter method for mac_address, mapped from YANG variable /network_instances/network_instance/afts/ethernet/mac_entry/mac_address (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_address() directly.

    YANG Description: Reference to the outer MAC address matched by the
entry.
    """
    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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_address must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__mac_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mac_address(self):
    self.__mac_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/afts/ethernet/mac_entry/state (container)

    YANG Description: Operational state parameters for the Ethernet AFT
entry.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/afts/ethernet/mac_entry/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 Ethernet AFT
entry.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_afts_ethernet_mac_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_afts_ethernet_mac_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_afts_ethernet_mac_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  mac_address = __builtin__.property(_get_mac_address)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('mac_address', mac_address), ('state', state), ])


class yc_ethernet_openconfig_network_instance__network_instances_network_instance_afts_ethernet(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/ethernet. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The abstract forwarding table for Ethernet based forwarding
entries. Entries within the table are keyed based on the
destination MAC address on the ingress packet.
  """
  __slots__ = ('_path_helper', '_extmethods', '__mac_entry',)

  _yang_name = 'ethernet'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__mac_entry = YANGDynClass(base=YANGListType("mac_address",yc_mac_entry_openconfig_network_instance__network_instances_network_instance_afts_ethernet_mac_entry, yang_name="mac-entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mac-address', extensions=None), is_container='list', yang_name="mac-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'afts', 'ethernet']

  def _get_mac_entry(self):
    """
    Getter method for mac_entry, mapped from YANG variable /network_instances/network_instance/afts/ethernet/mac_entry (list)

    YANG Description: List of the Ethernet entries within the abstract
forwarding table. This list is keyed by the outer MAC address
of the Ethernet frame.
    """
    return self.__mac_entry
      
  def _set_mac_entry(self, v, load=False):
    """
    Setter method for mac_entry, mapped from YANG variable /network_instances/network_instance/afts/ethernet/mac_entry (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_entry is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_entry() directly.

    YANG Description: List of the Ethernet entries within the abstract
forwarding table. This list is keyed by the outer MAC address
of the Ethernet frame.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("mac_address",yc_mac_entry_openconfig_network_instance__network_instances_network_instance_afts_ethernet_mac_entry, yang_name="mac-entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mac-address', extensions=None), is_container='list', yang_name="mac-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_entry must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("mac_address",yc_mac_entry_openconfig_network_instance__network_instances_network_instance_afts_ethernet_mac_entry, yang_name="mac-entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mac-address', extensions=None), is_container='list', yang_name="mac-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__mac_entry = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mac_entry(self):
    self.__mac_entry = YANGDynClass(base=YANGListType("mac_address",yc_mac_entry_openconfig_network_instance__network_instances_network_instance_afts_ethernet_mac_entry, yang_name="mac-entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mac-address', extensions=None), is_container='list', yang_name="mac-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  mac_entry = __builtin__.property(_get_mac_entry)


  _pyangbind_elements = OrderedDict([('mac_entry', mac_entry), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_afts_state_synced_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/state-synced/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 state
synced signals of various AFTs.
  """
  __slots__ = ('_path_helper', '_extmethods', '__ipv4_unicast','__ipv6_unicast',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__ipv4_unicast = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ipv4-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__ipv6_unicast = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ipv6-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'afts', 'state-synced', 'state']

  def _get_ipv4_unicast(self):
    """
    Getter method for ipv4_unicast, mapped from YANG variable /network_instances/network_instance/afts/state_synced/state/ipv4_unicast (boolean)

    YANG Description: State synced signal indicating consistent device snapshot of
IPv4 unicast AFT entries. Before setting this flag to true
next-hop-groups and next-hops AFT entries, associated with
ipv4-unicast AFT entries, are expected to be consistent with
device snapshot.
    """
    return self.__ipv4_unicast
      
  def _set_ipv4_unicast(self, v, load=False):
    """
    Setter method for ipv4_unicast, mapped from YANG variable /network_instances/network_instance/afts/state_synced/state/ipv4_unicast (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv4_unicast is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv4_unicast() directly.

    YANG Description: State synced signal indicating consistent device snapshot of
IPv4 unicast AFT entries. Before setting this flag to true
next-hop-groups and next-hops AFT entries, associated with
ipv4-unicast AFT entries, are expected to be consistent with
device snapshot.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ipv4-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv4_unicast must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ipv4-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__ipv4_unicast = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv4_unicast(self):
    self.__ipv4_unicast = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ipv4-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_ipv6_unicast(self):
    """
    Getter method for ipv6_unicast, mapped from YANG variable /network_instances/network_instance/afts/state_synced/state/ipv6_unicast (boolean)

    YANG Description: State synced signal indicating consistent device snapshot of
IPv6 unicast AFT entries. Before setting this flag to true
next-hop-groups and next-hops AFT entries, associated with
ipv6-unicast AFT entries, are expected to be consistent with
device snapshot.
    """
    return self.__ipv6_unicast
      
  def _set_ipv6_unicast(self, v, load=False):
    """
    Setter method for ipv6_unicast, mapped from YANG variable /network_instances/network_instance/afts/state_synced/state/ipv6_unicast (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6_unicast is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6_unicast() directly.

    YANG Description: State synced signal indicating consistent device snapshot of
IPv6 unicast AFT entries. Before setting this flag to true
next-hop-groups and next-hops AFT entries, associated with
ipv6-unicast AFT entries, are expected to be consistent with
device snapshot.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ipv6-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6_unicast must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ipv6-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__ipv6_unicast = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6_unicast(self):
    self.__ipv6_unicast = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ipv6-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  ipv4_unicast = __builtin__.property(_get_ipv4_unicast)
  ipv6_unicast = __builtin__.property(_get_ipv6_unicast)


  _pyangbind_elements = OrderedDict([('ipv4_unicast', ipv4_unicast), ('ipv6_unicast', ipv6_unicast), ])


class yc_state_synced_openconfig_network_instance__network_instances_network_instance_afts_state_synced(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/state-synced. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: In some cases AFT streaming (e.g., over gNMI) is an eventually consistent system.
When the device updates an entry it is usually expected to
stream an update to the client within a vert short amount
of time (few milliseconds). Given this is the casee, a telemetry collector or a
controller that parse the AFT doesn't have a consistent
snapshot, or overall versioned copy of AFT with the device
at any specific point of time.

In certain failure modes like device boot up, gNMI daemon
failure and device/routing engine stateful switchover
a telemetry collector or a controller need a flag to
determine whether it is in consistent with the device or
not such that it can a corrective action when needed.
A device sets this leaf or flag to indicate to the
client that AFT data/view is consistent.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'state-synced'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_afts_state_synced_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'afts', 'state-synced']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/afts/state_synced/state (container)

    YANG Description: Operational state parameters relating to the state
synced signals of various AFTs.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/afts/state_synced/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 state
synced signals of various AFTs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_afts_state_synced_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_afts_state_synced_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_afts_state_synced_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/next-hop-groups/next-hop-group/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 next-hop-groups.
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__programmed_id','__color','__backup_next_hop_group',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__programmed_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="programmed-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__color = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__backup_next_hop_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="backup-next-hop-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'afts', 'next-hop-groups', 'next-hop-group', 'state']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/state/id (uint64)

    YANG Description: A unique identifier for the next-hop-group. This index
is not expected to be consistent across reboots, or
reprogramming of the next-hop-group. When updating
a next-hop-group, if the group is removed by the system
or assigned an alternate identifier, the system should
send telemetry notifications deleting the previous
identifier. If the identifier of the next-hop-group
is changed, all AFT entries that reference it must
also be updated.
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/state/id (uint64)
    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: A unique identifier for the next-hop-group. This index
is not expected to be consistent across reboots, or
reprogramming of the next-hop-group. When updating
a next-hop-group, if the group is removed by the system
or assigned an alternate identifier, the system should
send telemetry notifications deleting the previous
identifier. If the identifier of the next-hop-group
is changed, all AFT entries that reference it must
also be updated.
    """
    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="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id 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="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_id(self):
    self.__id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_programmed_id(self):
    """
    Getter method for programmed_id, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/state/programmed_id (uint64)

    YANG Description: In some routing protocols or route injection mechanisms it
is possible to supply the ID of the next-hop-group via
configuration or the protocol itself. In some systems, it
may not be possible to use this same ID when returning the
NHG via telemetry.

This leaf reflects the ID of the next-hop group that was
used by the original programming mechanism.

This leaf allows a client to create an association between
a programmed next-hop's original ID, and the ID that is
extracted via telemetry as a key in the next-hop-group AFT
list.
    """
    return self.__programmed_id
      
  def _set_programmed_id(self, v, load=False):
    """
    Setter method for programmed_id, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/state/programmed_id (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_programmed_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_programmed_id() directly.

    YANG Description: In some routing protocols or route injection mechanisms it
is possible to supply the ID of the next-hop-group via
configuration or the protocol itself. In some systems, it
may not be possible to use this same ID when returning the
NHG via telemetry.

This leaf reflects the ID of the next-hop group that was
used by the original programming mechanism.

This leaf allows a client to create an association between
a programmed next-hop's original ID, and the ID that is
extracted via telemetry as a key in the next-hop-group AFT
list.
    """
    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="programmed-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """programmed_id 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="programmed-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__programmed_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_programmed_id(self):
    self.__programmed_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="programmed-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_color(self):
    """
    Getter method for color, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/state/color (uint64)

    YANG Description: An arbitrary colour that is used as an identifier for the next-hop
group. Some next-hop resolutions may utilise the colour to select
the particular next-hop-group that a routing entry should be resolved
to. In this case, next-hop-group selection may be based on colour
matches rather than the protocol specified next-hop.

Regardless of whether the next-hop-group's specified colour is
used to select an AFT's active forwarding entry, the next-hop-group
referenced by an entry should be the currently active value.

Next-hop-groups that are installed on the system through a protocol
that allows injection of such entries (e.g., BGP using the SR-TE
Policy SAFI, or gRPC-based RIB programming) should have the colour
specified in the injecting protocol within this leaf.
    """
    return self.__color
      
  def _set_color(self, v, load=False):
    """
    Setter method for color, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/state/color (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_color is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_color() directly.

    YANG Description: An arbitrary colour that is used as an identifier for the next-hop
group. Some next-hop resolutions may utilise the colour to select
the particular next-hop-group that a routing entry should be resolved
to. In this case, next-hop-group selection may be based on colour
matches rather than the protocol specified next-hop.

Regardless of whether the next-hop-group's specified colour is
used to select an AFT's active forwarding entry, the next-hop-group
referenced by an entry should be the currently active value.

Next-hop-groups that are installed on the system through a protocol
that allows injection of such entries (e.g., BGP using the SR-TE
Policy SAFI, or gRPC-based RIB programming) should have the colour
specified in the injecting protocol within this leaf.
    """
    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="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """color 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="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__color = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_color(self):
    self.__color = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_backup_next_hop_group(self):
    """
    Getter method for backup_next_hop_group, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/state/backup_next_hop_group (leafref)

    YANG Description: The backup next-hop-group for the current group. When all
entries within the next-hop group become unusable, the backup
next-hop group is used if specified.
    """
    return self.__backup_next_hop_group
      
  def _set_backup_next_hop_group(self, v, load=False):
    """
    Setter method for backup_next_hop_group, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/state/backup_next_hop_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_backup_next_hop_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_backup_next_hop_group() directly.

    YANG Description: The backup next-hop-group for the current group. When all
entries within the next-hop group become unusable, the backup
next-hop group is used if specified.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="backup-next-hop-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """backup_next_hop_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="backup-next-hop-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__backup_next_hop_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_backup_next_hop_group(self):
    self.__backup_next_hop_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="backup-next-hop-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)

  id = __builtin__.property(_get_id)
  programmed_id = __builtin__.property(_get_programmed_id)
  color = __builtin__.property(_get_color)
  backup_next_hop_group = __builtin__.property(_get_backup_next_hop_group)


  _pyangbind_elements = OrderedDict([('id', id), ('programmed_id', programmed_id), ('color', color), ('backup_next_hop_group', backup_next_hop_group), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_next_hops_next_hop_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/next-hop-groups/next-hop-group/next-hops/next-hop/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters related to a next-hop
within the next-hop-group.
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__weight',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'afts', 'next-hop-groups', 'next-hop-group', 'next-hops', 'next-hop', 'state']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/next_hops/next_hop/state/index (leafref)

    YANG Description: A reference to the identifier for the next-hop to which
the entry in the next-hop group corresponds.
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/next_hops/next_hop/state/index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: A reference to the identifier for the next-hop to which
the entry in the next-hop group corresponds.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_index(self):
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_weight(self):
    """
    Getter method for weight, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/next_hops/next_hop/state/weight (uint64)

    YANG Description: The weight applied to the next-hop within the group. Traffic
is balanced across the next-hops within the group in the
proportion of weight/(sum of weights of the next-hops within
the next-hop group).
    """
    return self.__weight
      
  def _set_weight(self, v, load=False):
    """
    Setter method for weight, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/next_hops/next_hop/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: The weight applied to the next-hop within the group. Traffic
is balanced across the next-hops within the group in the
proportion of weight/(sum of weights of the next-hops within
the next-hop group).
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)

  index = __builtin__.property(_get_index)
  weight = __builtin__.property(_get_weight)


  _pyangbind_elements = OrderedDict([('index', index), ('weight', weight), ])


class yc_next_hop_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_next_hops_next_hop(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/next-hop-groups/next-hop-group/next-hops/next-hop. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: An individual next-hop within the next-hop-group. Each
next-hop is a reference to an entry within the next-hop
list.
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__state',)

  _yang_name = 'next-hop'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_next_hops_next_hop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'afts', 'next-hop-groups', 'next-hop-group', 'next-hops', 'next-hop']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/next_hops/next_hop/index (leafref)

    YANG Description: A reference to the index for the next-hop within the
the next-hop-group.
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/next_hops/next_hop/index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: A reference to the index for the next-hop within the
the next-hop-group.
    """
    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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_index(self):
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/next_hops/next_hop/state (container)

    YANG Description: Operational state parameters related to a next-hop
within the next-hop-group.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/next_hops/next_hop/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 related to a next-hop
within the next-hop-group.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_next_hops_next_hop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_next_hops_next_hop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_next_hops_next_hop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  index = __builtin__.property(_get_index)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('index', index), ('state', state), ])


class yc_next_hops_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_next_hops(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/next-hop-groups/next-hop-group/next-hops. 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 next-hops within
the next-hop-group.
  """
  __slots__ = ('_path_helper', '_extmethods', '__next_hop',)

  _yang_name = 'next-hops'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__next_hop = YANGDynClass(base=YANGListType("index",yc_next_hop_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_next_hops_next_hop, yang_name="next-hop", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'afts', 'next-hop-groups', 'next-hop-group', 'next-hops']

  def _get_next_hop(self):
    """
    Getter method for next_hop, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/next_hops/next_hop (list)

    YANG Description: An individual next-hop within the next-hop-group. Each
next-hop is a reference to an entry within the next-hop
list.
    """
    return self.__next_hop
      
  def _set_next_hop(self, v, load=False):
    """
    Setter method for next_hop, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/next_hops/next_hop (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hop() directly.

    YANG Description: An individual next-hop within the next-hop-group. Each
next-hop is a reference to an entry within the next-hop
list.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("index",yc_next_hop_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_next_hops_next_hop, yang_name="next-hop", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hop must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("index",yc_next_hop_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_next_hops_next_hop, yang_name="next-hop", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__next_hop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_next_hop(self):
    self.__next_hop = YANGDynClass(base=YANGListType("index",yc_next_hop_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_next_hops_next_hop, yang_name="next-hop", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  next_hop = __builtin__.property(_get_next_hop)


  _pyangbind_elements = OrderedDict([('next_hop', next_hop), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_conditional_condition_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/next-hop-groups/next-hop-group/conditional/condition/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters related to the conditional
next-hop selection.
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__dscp','__next_hop_group',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__dscp = 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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:dscp', is_config=False)
    self.__next_hop_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="next-hop-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'afts', 'next-hop-groups', 'next-hop-group', 'conditional', 'condition', 'state']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/conditional/condition/state/id (uint64)

    YANG Description: A unique identifier for the conditional criteria.
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/conditional/condition/state/id (uint64)
    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: A unique identifier for the conditional criteria.
    """
    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="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id 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="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_id(self):
    self.__id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_dscp(self):
    """
    Getter method for dscp, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/conditional/condition/state/dscp (oc-inet:dscp)

    YANG Description: A set of DSCP values that must be matched by an input packet for
the next-hop-group specified to be selected. A logical OR is applied
across the DSCP values.
    """
    return self.__dscp
      
  def _set_dscp(self, v, load=False):
    """
    Setter method for dscp, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/conditional/condition/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: A set of DSCP values that must be matched by an input packet for
the next-hop-group specified to be selected. A logical OR is applied
across the DSCP values.
    """
    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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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(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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:dscp', is_config=False)""",
        })

    self.__dscp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dscp(self):
    self.__dscp = 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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:dscp', is_config=False)


  def _get_next_hop_group(self):
    """
    Getter method for next_hop_group, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/conditional/condition/state/next_hop_group (leafref)

    YANG Description: The next-hop-group that is used by the system for packets that match
the criteria specified.
    """
    return self.__next_hop_group
      
  def _set_next_hop_group(self, v, load=False):
    """
    Setter method for next_hop_group, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/conditional/condition/state/next_hop_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hop_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hop_group() directly.

    YANG Description: The next-hop-group that is used by the system for packets that match
the criteria specified.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="next-hop-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hop_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="next-hop-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__next_hop_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_next_hop_group(self):
    self.__next_hop_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="next-hop-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)

  id = __builtin__.property(_get_id)
  dscp = __builtin__.property(_get_dscp)
  next_hop_group = __builtin__.property(_get_next_hop_group)


  _pyangbind_elements = OrderedDict([('id', id), ('dscp', dscp), ('next_hop_group', next_hop_group), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_conditional_condition_input_interfaces_input_interface_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/next-hop-groups/next-hop-group/conditional/condition/input-interfaces/input-interface/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters that relate to the input interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__interface','__subinterface',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'afts', 'next-hop-groups', 'next-hop-group', 'conditional', 'condition', 'input-interfaces', 'input-interface', 'state']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/conditional/condition/input_interfaces/input_interface/state/id (string)

    YANG Description: A unique reference for the input interface.
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/conditional/condition/input_interfaces/input_interface/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: A unique reference for the input interface.
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/conditional/condition/input_interfaces/input_interface/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 /network_instances/network_instance/afts/next_hop_groups/next_hop_group/conditional/condition/input_interfaces/input_interface/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/conditional/condition/input_interfaces/input_interface/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 /network_instances/network_instance/afts/next_hop_groups/next_hop_group/conditional/condition/input_interfaces/input_interface/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)

  id = __builtin__.property(_get_id)
  interface = __builtin__.property(_get_interface)
  subinterface = __builtin__.property(_get_subinterface)


  _pyangbind_elements = OrderedDict([('id', id), ('interface', interface), ('subinterface', subinterface), ])


class yc_input_interface_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_conditional_condition_input_interfaces_input_interface(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/next-hop-groups/next-hop-group/conditional/condition/input-interfaces/input-interface. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The input interface that must be matched for the condition to be met.
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__state',)

  _yang_name = 'input-interface'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_conditional_condition_input_interfaces_input_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'afts', 'next-hop-groups', 'next-hop-group', 'conditional', 'condition', 'input-interfaces', 'input-interface']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/conditional/condition/input_interfaces/input_interface/id (leafref)

    YANG Description: Reference to the unique ID assigned to the input interface within
the conditions list.
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/conditional/condition/input_interfaces/input_interface/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 the unique ID assigned to the input interface within
the conditions list.
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/conditional/condition/input_interfaces/input_interface/state (container)

    YANG Description: Operational state parameters that relate to the input interface.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/conditional/condition/input_interfaces/input_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 that relate to the input interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_conditional_condition_input_interfaces_input_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_conditional_condition_input_interfaces_input_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_conditional_condition_input_interfaces_input_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/network-instance', defining_module='openconfig-network-instance', 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_input_interfaces_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_conditional_condition_input_interfaces(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/next-hop-groups/next-hop-group/conditional/condition/input-interfaces. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The set of input interfaces that are required to be matched for
the next-hop-group condition to be met. Each non-interface condition
is logically ANDed with each member of the list -- i.e., interfaces in
the list are logically ORed.

If the input-interface list is empty, the condition applies to ALL input
interfaces.
  """
  __slots__ = ('_path_helper', '_extmethods', '__input_interface',)

  _yang_name = 'input-interfaces'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__input_interface = YANGDynClass(base=YANGListType("id",yc_input_interface_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_conditional_condition_input_interfaces_input_interface, yang_name="input-interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="input-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'afts', 'next-hop-groups', 'next-hop-group', 'conditional', 'condition', 'input-interfaces']

  def _get_input_interface(self):
    """
    Getter method for input_interface, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/conditional/condition/input_interfaces/input_interface (list)

    YANG Description: The input interface that must be matched for the condition to be met.
    """
    return self.__input_interface
      
  def _set_input_interface(self, v, load=False):
    """
    Setter method for input_interface, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/conditional/condition/input_interfaces/input_interface (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_input_interface is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_input_interface() directly.

    YANG Description: The input interface that must be matched for the condition to be met.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("id",yc_input_interface_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_conditional_condition_input_interfaces_input_interface, yang_name="input-interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="input-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """input_interface must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("id",yc_input_interface_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_conditional_condition_input_interfaces_input_interface, yang_name="input-interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="input-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__input_interface = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_input_interface(self):
    self.__input_interface = YANGDynClass(base=YANGListType("id",yc_input_interface_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_conditional_condition_input_interfaces_input_interface, yang_name="input-interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="input-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  input_interface = __builtin__.property(_get_input_interface)


  _pyangbind_elements = OrderedDict([('input_interface', input_interface), ])


class yc_condition_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_conditional_condition(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/next-hop-groups/next-hop-group/conditional/condition. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A conditional next-hop-group that is used by the AFT
entry. The conditions that are specified within the
group are logically ANDed together. If a condition
is a leaf-list field its contents are logically ORed.
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__state','__input_interfaces',)

  _yang_name = 'condition'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_conditional_condition_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__input_interfaces = YANGDynClass(base=yc_input_interfaces_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_conditional_condition_input_interfaces, is_container='container', yang_name="input-interfaces", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'afts', 'next-hop-groups', 'next-hop-group', 'conditional', 'condition']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/conditional/condition/id (leafref)

    YANG Description: A reference to the identifier for the condition.
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/conditional/condition/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: A reference to the identifier for the condition.
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/conditional/condition/state (container)

    YANG Description: Operational state parameters related to the conditional
next-hop selection.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/conditional/condition/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 related to the conditional
next-hop selection.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_conditional_condition_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_conditional_condition_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_conditional_condition_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_input_interfaces(self):
    """
    Getter method for input_interfaces, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/conditional/condition/input_interfaces (container)

    YANG Description: The set of input interfaces that are required to be matched for
the next-hop-group condition to be met. Each non-interface condition
is logically ANDed with each member of the list -- i.e., interfaces in
the list are logically ORed.

If the input-interface list is empty, the condition applies to ALL input
interfaces.
    """
    return self.__input_interfaces
      
  def _set_input_interfaces(self, v, load=False):
    """
    Setter method for input_interfaces, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/conditional/condition/input_interfaces (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_input_interfaces is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_input_interfaces() directly.

    YANG Description: The set of input interfaces that are required to be matched for
the next-hop-group condition to be met. Each non-interface condition
is logically ANDed with each member of the list -- i.e., interfaces in
the list are logically ORed.

If the input-interface list is empty, the condition applies to ALL input
interfaces.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_input_interfaces_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_conditional_condition_input_interfaces, is_container='container', yang_name="input-interfaces", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """input_interfaces must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_input_interfaces_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_conditional_condition_input_interfaces, is_container='container', yang_name="input-interfaces", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__input_interfaces = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_input_interfaces(self):
    self.__input_interfaces = YANGDynClass(base=yc_input_interfaces_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_conditional_condition_input_interfaces, is_container='container', yang_name="input-interfaces", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  id = __builtin__.property(_get_id)
  state = __builtin__.property(_get_state)
  input_interfaces = __builtin__.property(_get_input_interfaces)


  _pyangbind_elements = OrderedDict([('id', id), ('state', state), ('input_interfaces', input_interfaces), ])


class yc_conditional_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_conditional(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/next-hop-groups/next-hop-group/conditional. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: When a system selects a next-hop-group based on conditions
in addition to those specified in the referencing table entries
(for example, DSCP is used in addition to the IPv4 destination
prefix), these conditions are specified in the conditions list.
Where such conditions exist, the next-hop-group MUST only
specify next-hop-groups under the conditional list, and therefore
MUST NOT specify any corresponding next-hops. The
next-hop-groups that are referenced by any conditions MUST
reference only next-hops and therefore MUST NOT be conditional
themselves.
  """
  __slots__ = ('_path_helper', '_extmethods', '__condition',)

  _yang_name = 'conditional'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__condition = YANGDynClass(base=YANGListType("id",yc_condition_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_conditional_condition, yang_name="condition", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="condition", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'afts', 'next-hop-groups', 'next-hop-group', 'conditional']

  def _get_condition(self):
    """
    Getter method for condition, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/conditional/condition (list)

    YANG Description: A conditional next-hop-group that is used by the AFT
entry. The conditions that are specified within the
group are logically ANDed together. If a condition
is a leaf-list field its contents are logically ORed.
    """
    return self.__condition
      
  def _set_condition(self, v, load=False):
    """
    Setter method for condition, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/conditional/condition (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_condition is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_condition() directly.

    YANG Description: A conditional next-hop-group that is used by the AFT
entry. The conditions that are specified within the
group are logically ANDed together. If a condition
is a leaf-list field its contents are logically ORed.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("id",yc_condition_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_conditional_condition, yang_name="condition", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="condition", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """condition must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("id",yc_condition_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_conditional_condition, yang_name="condition", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="condition", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__condition = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_condition(self):
    self.__condition = YANGDynClass(base=YANGListType("id",yc_condition_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_conditional_condition, yang_name="condition", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="condition", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  condition = __builtin__.property(_get_condition)


  _pyangbind_elements = OrderedDict([('condition', condition), ])


class yc_next_hop_group_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/next-hop-groups/next-hop-group. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: An individual set of next-hops grouped into a common group.
Each entry within an abstract forwarding table points to a
next-hop-group. Entries in the next-hop-group are forwarded to
according to the weights specified for each next-hop group.

If an entry within the next-hop group becomes unusable, for
example due to an interface failure, the remaining entries
are used until all entries become unusable - at which point
the backup next-hop-group (if specified) is used.
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__state','__next_hops','__conditional',)

  _yang_name = 'next-hop-group'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__next_hops = YANGDynClass(base=yc_next_hops_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_next_hops, is_container='container', yang_name="next-hops", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__conditional = YANGDynClass(base=yc_conditional_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_conditional, is_container='container', yang_name="conditional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'afts', 'next-hop-groups', 'next-hop-group']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/id (leafref)

    YANG Description: A reference to a unique identifier for the next-hop-group.
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/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: A reference to a unique identifier for the next-hop-group.
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/state (container)

    YANG Description: Operational state parameters relating to next-hop-groups.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_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 parameters relating to next-hop-groups.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_next_hops(self):
    """
    Getter method for next_hops, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/next_hops (container)

    YANG Description: Surrounding container for the list of next-hops within
the next-hop-group.
    """
    return self.__next_hops
      
  def _set_next_hops(self, v, load=False):
    """
    Setter method for next_hops, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/next_hops (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hops is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hops() directly.

    YANG Description: Surrounding container for the list of next-hops within
the next-hop-group.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_next_hops_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_next_hops, is_container='container', yang_name="next-hops", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hops must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_next_hops_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_next_hops, is_container='container', yang_name="next-hops", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__next_hops = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_next_hops(self):
    self.__next_hops = YANGDynClass(base=yc_next_hops_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_next_hops, is_container='container', yang_name="next-hops", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_conditional(self):
    """
    Getter method for conditional, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/conditional (container)

    YANG Description: When a system selects a next-hop-group based on conditions
in addition to those specified in the referencing table entries
(for example, DSCP is used in addition to the IPv4 destination
prefix), these conditions are specified in the conditions list.
Where such conditions exist, the next-hop-group MUST only
specify next-hop-groups under the conditional list, and therefore
MUST NOT specify any corresponding next-hops. The
next-hop-groups that are referenced by any conditions MUST
reference only next-hops and therefore MUST NOT be conditional
themselves.
    """
    return self.__conditional
      
  def _set_conditional(self, v, load=False):
    """
    Setter method for conditional, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group/conditional (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_conditional is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_conditional() directly.

    YANG Description: When a system selects a next-hop-group based on conditions
in addition to those specified in the referencing table entries
(for example, DSCP is used in addition to the IPv4 destination
prefix), these conditions are specified in the conditions list.
Where such conditions exist, the next-hop-group MUST only
specify next-hop-groups under the conditional list, and therefore
MUST NOT specify any corresponding next-hops. The
next-hop-groups that are referenced by any conditions MUST
reference only next-hops and therefore MUST NOT be conditional
themselves.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_conditional_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_conditional, is_container='container', yang_name="conditional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """conditional must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_conditional_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_conditional, is_container='container', yang_name="conditional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__conditional = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_conditional(self):
    self.__conditional = YANGDynClass(base=yc_conditional_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group_conditional, is_container='container', yang_name="conditional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  id = __builtin__.property(_get_id)
  state = __builtin__.property(_get_state)
  next_hops = __builtin__.property(_get_next_hops)
  conditional = __builtin__.property(_get_conditional)


  _pyangbind_elements = OrderedDict([('id', id), ('state', state), ('next_hops', next_hops), ('conditional', conditional), ])


class yc_next_hop_groups_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/next-hop-groups. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Surrounding container for groups of next-hops.
  """
  __slots__ = ('_path_helper', '_extmethods', '__next_hop_group',)

  _yang_name = 'next-hop-groups'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__next_hop_group = YANGDynClass(base=YANGListType("id",yc_next_hop_group_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group, yang_name="next-hop-group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="next-hop-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'afts', 'next-hop-groups']

  def _get_next_hop_group(self):
    """
    Getter method for next_hop_group, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group (list)

    YANG Description: An individual set of next-hops grouped into a common group.
Each entry within an abstract forwarding table points to a
next-hop-group. Entries in the next-hop-group are forwarded to
according to the weights specified for each next-hop group.

If an entry within the next-hop group becomes unusable, for
example due to an interface failure, the remaining entries
are used until all entries become unusable - at which point
the backup next-hop-group (if specified) is used.
    """
    return self.__next_hop_group
      
  def _set_next_hop_group(self, v, load=False):
    """
    Setter method for next_hop_group, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups/next_hop_group (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hop_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hop_group() directly.

    YANG Description: An individual set of next-hops grouped into a common group.
Each entry within an abstract forwarding table points to a
next-hop-group. Entries in the next-hop-group are forwarded to
according to the weights specified for each next-hop group.

If an entry within the next-hop group becomes unusable, for
example due to an interface failure, the remaining entries
are used until all entries become unusable - at which point
the backup next-hop-group (if specified) is used.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("id",yc_next_hop_group_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group, yang_name="next-hop-group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="next-hop-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hop_group must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("id",yc_next_hop_group_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group, yang_name="next-hop-group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="next-hop-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__next_hop_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_next_hop_group(self):
    self.__next_hop_group = YANGDynClass(base=YANGListType("id",yc_next_hop_group_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups_next_hop_group, yang_name="next-hop-group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="next-hop-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  next_hop_group = __builtin__.property(_get_next_hop_group)


  _pyangbind_elements = OrderedDict([('next_hop_group', next_hop_group), ])


class yc_counters_openconfig_network_instance__network_instances_network_instance_afts_next_hops_next_hop_state_counters(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/next-hops/next-hop/state/counters. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Surrounding container for counters.
  """
  __slots__ = ('_path_helper', '_extmethods', '__packets_forwarded','__octets_forwarded',)

  _yang_name = 'counters'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__packets_forwarded = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="packets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    self.__octets_forwarded = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="octets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'afts', 'next-hops', 'next-hop', 'state', 'counters']

  def _get_packets_forwarded(self):
    """
    Getter method for packets_forwarded, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/state/counters/packets_forwarded (oc-yang:counter64)

    YANG Description: The number of packets which have matched, and been forwarded,
based on the AFT entry.
    """
    return self.__packets_forwarded
      
  def _set_packets_forwarded(self, v, load=False):
    """
    Setter method for packets_forwarded, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/state/counters/packets_forwarded (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_packets_forwarded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_packets_forwarded() directly.

    YANG Description: The number of packets which have matched, and been forwarded,
based on the AFT entry.
    """
    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="packets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """packets_forwarded 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="packets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__packets_forwarded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_packets_forwarded(self):
    self.__packets_forwarded = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="packets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_octets_forwarded(self):
    """
    Getter method for octets_forwarded, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/state/counters/octets_forwarded (oc-yang:counter64)

    YANG Description: The number of octets which have matched, and been forwarded,
based on the AFT entry
    """
    return self.__octets_forwarded
      
  def _set_octets_forwarded(self, v, load=False):
    """
    Setter method for octets_forwarded, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/state/counters/octets_forwarded (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_octets_forwarded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_octets_forwarded() directly.

    YANG Description: The number of octets which have matched, and been forwarded,
based on the AFT entry
    """
    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="octets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """octets_forwarded 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="octets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__octets_forwarded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_octets_forwarded(self):
    self.__octets_forwarded = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="octets-forwarded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)

  packets_forwarded = __builtin__.property(_get_packets_forwarded)
  octets_forwarded = __builtin__.property(_get_octets_forwarded)


  _pyangbind_elements = OrderedDict([('packets_forwarded', packets_forwarded), ('octets_forwarded', octets_forwarded), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_afts_next_hops_next_hop_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/next-hops/next-hop/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 AFT
next-hop entry
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__programmed_index','__ip_address','__mac_address','__pop_top_label','__pushed_mpls_label_stack','__encapsulate_header','__decapsulate_header','__origin_protocol','__lsp_name','__counters','__vni_label','__tunnel_src_ip_address',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__programmed_index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="programmed-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__ip_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}'}),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}|:))'}),], is_leaf=True, yang_name="ip-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__mac_address = 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)
    self.__pop_top_label = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="pop-top-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__pushed_mpls_label_stack = YANGDynClass(unique=True, base=TypedListType(allowed_type=[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=False, yang_name="pushed-mpls-label-stack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    self.__encapsulate_header = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'GRE': {}, 'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'VXLAN': {}},), is_leaf=True, yang_name="encapsulate-header", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-aftt:encapsulation-header-type', is_config=False)
    self.__decapsulate_header = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'GRE': {}, 'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'VXLAN': {}},), is_leaf=True, yang_name="decapsulate-header", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-aftt:encapsulation-header-type', is_config=False)
    self.__origin_protocol = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}},), is_leaf=True, yang_name="origin-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__lsp_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="lsp-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_afts_next_hops_next_hop_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__vni_label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="vni-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)
    self.__tunnel_src_ip_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}'}),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}|:))'}),], is_leaf=True, yang_name="tunnel-src-ip-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', 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 ['network-instances', 'network-instance', 'afts', 'next-hops', 'next-hop', 'state']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/state/index (uint64)

    YANG Description: A unique entry for the next-hop.
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/state/index (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: A unique entry for the next-hop.
    """
    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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_index(self):
    self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_programmed_index(self):
    """
    Getter method for programmed_index, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/state/programmed_index (uint64)

    YANG Description: In some routing protocols, or route injection mechanisms it
is possible to set the index of the next-hop via configuration
or the protocol itself. In some systems it may not be possible
to maintain the index provided by an external client when
advertising the same entry via telemetry.

This leaf reflects the configured or client-supplied index of
the next-hop. This allows a client to create an assocation or
mapping back to the original index pushed by the client, and
the ID used as a key in the next-hop AFT list.
    """
    return self.__programmed_index
      
  def _set_programmed_index(self, v, load=False):
    """
    Setter method for programmed_index, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/state/programmed_index (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_programmed_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_programmed_index() directly.

    YANG Description: In some routing protocols, or route injection mechanisms it
is possible to set the index of the next-hop via configuration
or the protocol itself. In some systems it may not be possible
to maintain the index provided by an external client when
advertising the same entry via telemetry.

This leaf reflects the configured or client-supplied index of
the next-hop. This allows a client to create an assocation or
mapping back to the original index pushed by the client, and
the ID used as a key in the next-hop AFT list.
    """
    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="programmed-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """programmed_index 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="programmed-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__programmed_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_programmed_index(self):
    self.__programmed_index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="programmed-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_ip_address(self):
    """
    Getter method for ip_address, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/state/ip_address (oc-inet:ip-address)

    YANG Description: The IP address of the next-hop system.
    """
    return self.__ip_address
      
  def _set_ip_address(self, v, load=False):
    """
    Setter method for ip_address, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/state/ip_address (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ip_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ip_address() directly.

    YANG Description: The IP address of the next-hop system.
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="ip-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ip_address must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="ip-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__ip_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ip_address(self):
    self.__ip_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}'}),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}|:))'}),], is_leaf=True, yang_name="ip-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_mac_address(self):
    """
    Getter method for mac_address, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/state/mac_address (oc-yang:mac-address)

    YANG Description: The MAC address of the next-hop if resolved by the local
network instance.
    """
    return self.__mac_address
      
  def _set_mac_address(self, v, load=False):
    """
    Setter method for mac_address, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/state/mac_address (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_address() directly.

    YANG Description: The MAC address of the next-hop if resolved by the local
network instance.
    """
    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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_address 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)""",
        })

    self.__mac_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mac_address(self):
    self.__mac_address = 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)


  def _get_pop_top_label(self):
    """
    Getter method for pop_top_label, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/state/pop_top_label (boolean)

    YANG Description: Flag that controls pop action, i.e., the top-most MPLS label
should be popped from the packet when switched by the system.

The top-most MPLS label associated with pop action is equal to
the label key used in 'mpls' AFT 'label-entry' list.
    """
    return self.__pop_top_label
      
  def _set_pop_top_label(self, v, load=False):
    """
    Setter method for pop_top_label, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/state/pop_top_label (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pop_top_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pop_top_label() directly.

    YANG Description: Flag that controls pop action, i.e., the top-most MPLS label
should be popped from the packet when switched by the system.

The top-most MPLS label associated with pop action is equal to
the label key used in 'mpls' AFT 'label-entry' list.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="pop-top-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pop_top_label must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="pop-top-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__pop_top_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_pop_top_label(self):
    self.__pop_top_label = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="pop-top-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_pushed_mpls_label_stack(self):
    """
    Getter method for pushed_mpls_label_stack, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/state/pushed_mpls_label_stack (oc-mplst:mpls-label)

    YANG Description: The MPLS label stack imposed when forwarding packets to the
next-hop
- the stack is encoded as a leaf list whereby the order of the
 entries is such that the first entry in the list is the
 label at the bottom of the stack to be pushed.

To this end, a packet which is to forwarded to a device using
a service label of 42, and a transport label of 8072 will be
represented with a label stack list of [42, 8072].

The MPLS label stack list is ordered by the user, such that no
system re-ordering of leaves is permitted by the system.

A swap operation is reflected by entries in the
popped-mpls-label-stack and pushed-mpls-label-stack nodes.
    """
    return self.__pushed_mpls_label_stack
      
  def _set_pushed_mpls_label_stack(self, v, load=False):
    """
    Setter method for pushed_mpls_label_stack, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/state/pushed_mpls_label_stack (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pushed_mpls_label_stack is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pushed_mpls_label_stack() directly.

    YANG Description: The MPLS label stack imposed when forwarding packets to the
next-hop
- the stack is encoded as a leaf list whereby the order of the
 entries is such that the first entry in the list is the
 label at the bottom of the stack to be pushed.

To this end, a packet which is to forwarded to a device using
a service label of 42, and a transport label of 8072 will be
represented with a label stack list of [42, 8072].

The MPLS label stack list is ordered by the user, such that no
system re-ordering of leaves is permitted by the system.

A swap operation is reflected by entries in the
popped-mpls-label-stack and pushed-mpls-label-stack nodes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=[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=False, yang_name="pushed-mpls-label-stack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pushed_mpls_label_stack must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst:mpls-label",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=[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=False, yang_name="pushed-mpls-label-stack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)""",
        })

    self.__pushed_mpls_label_stack = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_pushed_mpls_label_stack(self):
    self.__pushed_mpls_label_stack = YANGDynClass(unique=True, base=TypedListType(allowed_type=[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=False, yang_name="pushed-mpls-label-stack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)


  def _get_encapsulate_header(self):
    """
    Getter method for encapsulate_header, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/state/encapsulate_header (oc-aftt:encapsulation-header-type)

    YANG Description: When forwarding a packet to the specified next-hop the local
system performs an encapsulation of the packet - adding the
specified header type.
    """
    return self.__encapsulate_header
      
  def _set_encapsulate_header(self, v, load=False):
    """
    Setter method for encapsulate_header, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/state/encapsulate_header (oc-aftt:encapsulation-header-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_encapsulate_header is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_encapsulate_header() directly.

    YANG Description: When forwarding a packet to the specified next-hop the local
system performs an encapsulation of the packet - adding the
specified header type.
    """
    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={'GRE': {}, 'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'VXLAN': {}},), is_leaf=True, yang_name="encapsulate-header", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-aftt:encapsulation-header-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """encapsulate_header must be of a type compatible with oc-aftt:encapsulation-header-type""",
          'defined-type': "oc-aftt:encapsulation-header-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'GRE': {}, 'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'VXLAN': {}},), is_leaf=True, yang_name="encapsulate-header", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-aftt:encapsulation-header-type', is_config=False)""",
        })

    self.__encapsulate_header = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_encapsulate_header(self):
    self.__encapsulate_header = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'GRE': {}, 'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'VXLAN': {}},), is_leaf=True, yang_name="encapsulate-header", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-aftt:encapsulation-header-type', is_config=False)


  def _get_decapsulate_header(self):
    """
    Getter method for decapsulate_header, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/state/decapsulate_header (oc-aftt:encapsulation-header-type)

    YANG Description: When forwarding a packet to the specified next-hop, the local
system performs a decapsulation of the packet - removing the
specified header type. In the case that no next-hop is
specified, the packet header is removed, and a subsequent
forwarding lookup is performed on the packet encapsulated
within the header, matched within the relevant AFT within the
specified network-instance.
    """
    return self.__decapsulate_header
      
  def _set_decapsulate_header(self, v, load=False):
    """
    Setter method for decapsulate_header, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/state/decapsulate_header (oc-aftt:encapsulation-header-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_decapsulate_header is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_decapsulate_header() directly.

    YANG Description: When forwarding a packet to the specified next-hop, the local
system performs a decapsulation of the packet - removing the
specified header type. In the case that no next-hop is
specified, the packet header is removed, and a subsequent
forwarding lookup is performed on the packet encapsulated
within the header, matched within the relevant AFT within the
specified network-instance.
    """
    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={'GRE': {}, 'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'VXLAN': {}},), is_leaf=True, yang_name="decapsulate-header", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-aftt:encapsulation-header-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """decapsulate_header must be of a type compatible with oc-aftt:encapsulation-header-type""",
          'defined-type': "oc-aftt:encapsulation-header-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'GRE': {}, 'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'VXLAN': {}},), is_leaf=True, yang_name="decapsulate-header", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-aftt:encapsulation-header-type', is_config=False)""",
        })

    self.__decapsulate_header = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_decapsulate_header(self):
    self.__decapsulate_header = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'GRE': {}, 'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'VXLAN': {}},), is_leaf=True, yang_name="decapsulate-header", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-aftt:encapsulation-header-type', is_config=False)


  def _get_origin_protocol(self):
    """
    Getter method for origin_protocol, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/state/origin_protocol (identityref)

    YANG Description: The protocol from which the AFT entry was learned.
    """
    return self.__origin_protocol
      
  def _set_origin_protocol(self, v, load=False):
    """
    Setter method for origin_protocol, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/state/origin_protocol (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_origin_protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_origin_protocol() directly.

    YANG Description: The protocol from which the AFT entry was learned.
    """
    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={'BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}},), is_leaf=True, yang_name="origin-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """origin_protocol must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}},), is_leaf=True, yang_name="origin-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__origin_protocol = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_origin_protocol(self):
    self.__origin_protocol = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}},), is_leaf=True, yang_name="origin-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_lsp_name(self):
    """
    Getter method for lsp_name, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/state/lsp_name (string)

    YANG Description: Where applicable, the protocol name for the next-hop labelled
forwarding entry. This leaf is applicable only to next-hops
which include MPLS label information, and its value typically
corresponds to the RSVP-TE LSP name.
    """
    return self.__lsp_name
      
  def _set_lsp_name(self, v, load=False):
    """
    Setter method for lsp_name, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/state/lsp_name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsp_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsp_name() directly.

    YANG Description: Where applicable, the protocol name for the next-hop labelled
forwarding entry. This leaf is applicable only to next-hops
which include MPLS label information, and its value typically
corresponds to the RSVP-TE LSP name.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="lsp-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsp_name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="lsp-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__lsp_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsp_name(self):
    self.__lsp_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="lsp-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_counters(self):
    """
    Getter method for counters, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/state/counters (container)

    YANG Description: Surrounding container for counters.
    """
    return self.__counters
      
  def _set_counters(self, v, load=False):
    """
    Setter method for counters, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/state/counters (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_counters is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_counters() directly.

    YANG Description: Surrounding container for counters.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_counters_openconfig_network_instance__network_instances_network_instance_afts_next_hops_next_hop_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """counters must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_afts_next_hops_next_hop_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__counters = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_counters(self):
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_afts_next_hops_next_hop_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_vni_label(self):
    """
    Getter method for vni_label, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/state/vni_label (oc-evpn-types:evi-id)

    YANG Description: Where applicable, the next hop label representing the virtual
network identifier (VNI) for the forwarding entry. This leaf is
applicable only to next-hops which include VXLAN encapsulation
header information
    """
    return self.__vni_label
      
  def _set_vni_label(self, v, load=False):
    """
    Setter method for vni_label, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/state/vni_label (oc-evpn-types:evi-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_vni_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_vni_label() directly.

    YANG Description: Where applicable, the next hop label representing the virtual
network identifier (VNI) for the forwarding entry. This leaf is
applicable only to next-hops which include VXLAN encapsulation
header information
    """
    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': ['1..16777215']}), is_leaf=True, yang_name="vni-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """vni_label must be of a type compatible with oc-evpn-types:evi-id""",
          'defined-type': "oc-evpn-types:evi-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="vni-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)""",
        })

    self.__vni_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_vni_label(self):
    self.__vni_label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="vni-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)


  def _get_tunnel_src_ip_address(self):
    """
    Getter method for tunnel_src_ip_address, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/state/tunnel_src_ip_address (oc-inet:ip-address)

    YANG Description: Where applicable this represents the tunnel source ip address.
For VXLAN this represents the source VTEP ip address
    """
    return self.__tunnel_src_ip_address
      
  def _set_tunnel_src_ip_address(self, v, load=False):
    """
    Setter method for tunnel_src_ip_address, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/state/tunnel_src_ip_address (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tunnel_src_ip_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tunnel_src_ip_address() directly.

    YANG Description: Where applicable this represents the tunnel source ip address.
For VXLAN this represents the source VTEP ip address
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="tunnel-src-ip-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tunnel_src_ip_address must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="tunnel-src-ip-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__tunnel_src_ip_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tunnel_src_ip_address(self):
    self.__tunnel_src_ip_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}'}),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}|:))'}),], is_leaf=True, yang_name="tunnel-src-ip-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)

  index = __builtin__.property(_get_index)
  programmed_index = __builtin__.property(_get_programmed_index)
  ip_address = __builtin__.property(_get_ip_address)
  mac_address = __builtin__.property(_get_mac_address)
  pop_top_label = __builtin__.property(_get_pop_top_label)
  pushed_mpls_label_stack = __builtin__.property(_get_pushed_mpls_label_stack)
  encapsulate_header = __builtin__.property(_get_encapsulate_header)
  decapsulate_header = __builtin__.property(_get_decapsulate_header)
  origin_protocol = __builtin__.property(_get_origin_protocol)
  lsp_name = __builtin__.property(_get_lsp_name)
  counters = __builtin__.property(_get_counters)
  vni_label = __builtin__.property(_get_vni_label)
  tunnel_src_ip_address = __builtin__.property(_get_tunnel_src_ip_address)


  _pyangbind_elements = OrderedDict([('index', index), ('programmed_index', programmed_index), ('ip_address', ip_address), ('mac_address', mac_address), ('pop_top_label', pop_top_label), ('pushed_mpls_label_stack', pushed_mpls_label_stack), ('encapsulate_header', encapsulate_header), ('decapsulate_header', decapsulate_header), ('origin_protocol', origin_protocol), ('lsp_name', lsp_name), ('counters', counters), ('vni_label', vni_label), ('tunnel_src_ip_address', tunnel_src_ip_address), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_afts_next_hops_next_hop_ip_in_ip_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/next-hops/next-hop/ip-in-ip/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to IP-in-IP encapsulation.
  """
  __slots__ = ('_path_helper', '_extmethods', '__src_ip','__dst_ip',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__src_ip = 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}'}),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}|:))'}),], is_leaf=True, yang_name="src-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__dst_ip = 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}'}),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}|:))'}),], is_leaf=True, yang_name="dst-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', 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 ['network-instances', 'network-instance', 'afts', 'next-hops', 'next-hop', 'ip-in-ip', 'state']

  def _get_src_ip(self):
    """
    Getter method for src_ip, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/ip_in_ip/state/src_ip (oc-inet:ip-address)

    YANG Description: Source IP address to use for the encapsulated packet.
    """
    return self.__src_ip
      
  def _set_src_ip(self, v, load=False):
    """
    Setter method for src_ip, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/ip_in_ip/state/src_ip (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_src_ip is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_src_ip() directly.

    YANG Description: Source IP address to use for the encapsulated packet.
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="src-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """src_ip must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="src-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__src_ip = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_src_ip(self):
    self.__src_ip = 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}'}),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}|:))'}),], is_leaf=True, yang_name="src-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_dst_ip(self):
    """
    Getter method for dst_ip, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/ip_in_ip/state/dst_ip (oc-inet:ip-address)

    YANG Description: Destination IP address to use for the encapsulated packet.
    """
    return self.__dst_ip
      
  def _set_dst_ip(self, v, load=False):
    """
    Setter method for dst_ip, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/ip_in_ip/state/dst_ip (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dst_ip is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dst_ip() directly.

    YANG Description: Destination IP address to use for the encapsulated packet.
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="dst-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dst_ip must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="dst-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__dst_ip = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dst_ip(self):
    self.__dst_ip = 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}'}),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}|:))'}),], is_leaf=True, yang_name="dst-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)

  src_ip = __builtin__.property(_get_src_ip)
  dst_ip = __builtin__.property(_get_dst_ip)


  _pyangbind_elements = OrderedDict([('src_ip', src_ip), ('dst_ip', dst_ip), ])


class yc_ip_in_ip_openconfig_network_instance__network_instances_network_instance_afts_next_hops_next_hop_ip_in_ip(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/next-hops/next-hop/ip-in-ip. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: When specified, the packet has an IP-in-IP header applied to it before
forwarding to the specified next-hop.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'ip-in-ip'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_afts_next_hops_next_hop_ip_in_ip_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'afts', 'next-hops', 'next-hop', 'ip-in-ip']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/ip_in_ip/state (container)

    YANG Description: State parameters relating to IP-in-IP encapsulation.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/ip_in_ip/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 parameters relating to IP-in-IP encapsulation.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_afts_next_hops_next_hop_ip_in_ip_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_afts_next_hops_next_hop_ip_in_ip_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_afts_next_hops_next_hop_ip_in_ip_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_afts_next_hops_next_hop_interface_ref_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/next-hops/next-hop/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'afts', 'next-hops', 'next-hop', 'interface-ref', 'state']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/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 /network_instances/network_instance/afts/next_hops/next_hop/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/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 /network_instances/network_instance/afts/next_hops/next_hop/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_afts_next_hops_next_hop_interface_ref(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/next-hops/next-hop/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
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'interface-ref'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_afts_next_hops_next_hop_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'afts', 'next-hops', 'next-hop', 'interface-ref']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/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 /network_instances/network_instance/afts/next_hops/next_hop/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_network_instance__network_instances_network_instance_afts_next_hops_next_hop_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_afts_next_hops_next_hop_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_afts_next_hops_next_hop_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_next_hop_openconfig_network_instance__network_instances_network_instance_afts_next_hops_next_hop(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/next-hops/next-hop. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A next-hop associated with the forwarding instance.
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__state','__ip_in_ip','__interface_ref',)

  _yang_name = 'next-hop'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_afts_next_hops_next_hop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ip_in_ip = YANGDynClass(base=yc_ip_in_ip_openconfig_network_instance__network_instances_network_instance_afts_next_hops_next_hop_ip_in_ip, is_container='container', yang_name="ip-in-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__interface_ref = YANGDynClass(base=yc_interface_ref_openconfig_network_instance__network_instances_network_instance_afts_next_hops_next_hop_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'afts', 'next-hops', 'next-hop']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/index (leafref)

    YANG Description: A unique index identifying the next-hop entry for the
AFT entry
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: A unique index identifying the next-hop entry for the
AFT entry
    """
    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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_index(self):
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/state (container)

    YANG Description: Operational state parameters relating to the AFT
next-hop entry
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/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 AFT
next-hop entry
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_afts_next_hops_next_hop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_afts_next_hops_next_hop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_afts_next_hops_next_hop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ip_in_ip(self):
    """
    Getter method for ip_in_ip, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/ip_in_ip (container)

    YANG Description: When specified, the packet has an IP-in-IP header applied to it before
forwarding to the specified next-hop.
    """
    return self.__ip_in_ip
      
  def _set_ip_in_ip(self, v, load=False):
    """
    Setter method for ip_in_ip, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/ip_in_ip (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ip_in_ip is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ip_in_ip() directly.

    YANG Description: When specified, the packet has an IP-in-IP header applied to it before
forwarding to the specified next-hop.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ip_in_ip_openconfig_network_instance__network_instances_network_instance_afts_next_hops_next_hop_ip_in_ip, is_container='container', yang_name="ip-in-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ip_in_ip must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ip_in_ip_openconfig_network_instance__network_instances_network_instance_afts_next_hops_next_hop_ip_in_ip, is_container='container', yang_name="ip-in-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ip_in_ip = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ip_in_ip(self):
    self.__ip_in_ip = YANGDynClass(base=yc_ip_in_ip_openconfig_network_instance__network_instances_network_instance_afts_next_hops_next_hop_ip_in_ip, is_container='container', yang_name="ip-in-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_interface_ref(self):
    """
    Getter method for interface_ref, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/interface_ref (container)

    YANG Description: Reference to an interface or subinterface
    """
    return self.__interface_ref
      
  def _set_interface_ref(self, v, load=False):
    """
    Setter method for interface_ref, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop/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
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interface_ref_openconfig_network_instance__network_instances_network_instance_afts_next_hops_next_hop_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    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_network_instance__network_instances_network_instance_afts_next_hops_next_hop_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__interface_ref = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_interface_ref(self):
    self.__interface_ref = YANGDynClass(base=yc_interface_ref_openconfig_network_instance__network_instances_network_instance_afts_next_hops_next_hop_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  index = __builtin__.property(_get_index)
  state = __builtin__.property(_get_state)
  ip_in_ip = __builtin__.property(_get_ip_in_ip)
  interface_ref = __builtin__.property(_get_interface_ref)


  _pyangbind_elements = OrderedDict([('index', index), ('state', state), ('ip_in_ip', ip_in_ip), ('interface_ref', interface_ref), ])


class yc_next_hops_openconfig_network_instance__network_instances_network_instance_afts_next_hops(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts/next-hops. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The list of next-hops that are to be used for entry within
the AFT table. The structure of each next-hop is address
family independent, such that it is possible to resolve fully
how the next-hop is treated. For example:

- Where ingress IPv4 unicast packets are to be forwarded via
 an MPLS LSP, the next-hop list should indicate the MPLS
 label stack that is used to the next-hop.
- Where ingress MPLS labelled packets are to be forwarded to
 an IPv6 nexthop (for example, a CE within a VPN, then the
 popped label stack, and IPv6 next-hop address should be
 indicated).
  """
  __slots__ = ('_path_helper', '_extmethods', '__next_hop',)

  _yang_name = 'next-hops'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__next_hop = YANGDynClass(base=YANGListType("index",yc_next_hop_openconfig_network_instance__network_instances_network_instance_afts_next_hops_next_hop, yang_name="next-hop", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'afts', 'next-hops']

  def _get_next_hop(self):
    """
    Getter method for next_hop, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop (list)

    YANG Description: A next-hop associated with the forwarding instance.
    """
    return self.__next_hop
      
  def _set_next_hop(self, v, load=False):
    """
    Setter method for next_hop, mapped from YANG variable /network_instances/network_instance/afts/next_hops/next_hop (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hop() directly.

    YANG Description: A next-hop associated with the forwarding instance.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("index",yc_next_hop_openconfig_network_instance__network_instances_network_instance_afts_next_hops_next_hop, yang_name="next-hop", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hop must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("index",yc_next_hop_openconfig_network_instance__network_instances_network_instance_afts_next_hops_next_hop, yang_name="next-hop", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__next_hop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_next_hop(self):
    self.__next_hop = YANGDynClass(base=YANGListType("index",yc_next_hop_openconfig_network_instance__network_instances_network_instance_afts_next_hops_next_hop, yang_name="next-hop", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  next_hop = __builtin__.property(_get_next_hop)


  _pyangbind_elements = OrderedDict([('next_hop', next_hop), ])


class yc_afts_openconfig_network_instance__network_instances_network_instance_afts(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/afts. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The abstract forwarding tables (AFTs) that are associated
with the network instance. An AFT is instantiated per-protocol
running within the network-instance - such that one exists for
IPv4 Unicast, IPv6 Unicast, MPLS, L2 forwarding entries, etc.
A forwarding entry within the FIB has a set of next-hops,
which may be a reference to an entry within another table -
e.g., where a Layer 3 next-hop has an associated Layer 2
forwarding entry.
  """
  __slots__ = ('_path_helper', '_extmethods', '__ipv4_unicast','__ipv6_unicast','__policy_forwarding','__mpls','__ethernet','__state_synced','__next_hop_groups','__next_hops',)

  _yang_name = 'afts'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__ipv4_unicast = YANGDynClass(base=yc_ipv4_unicast_openconfig_network_instance__network_instances_network_instance_afts_ipv4_unicast, is_container='container', yang_name="ipv4-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ipv6_unicast = YANGDynClass(base=yc_ipv6_unicast_openconfig_network_instance__network_instances_network_instance_afts_ipv6_unicast, is_container='container', yang_name="ipv6-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__policy_forwarding = YANGDynClass(base=yc_policy_forwarding_openconfig_network_instance__network_instances_network_instance_afts_policy_forwarding, is_container='container', yang_name="policy-forwarding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__mpls = YANGDynClass(base=yc_mpls_openconfig_network_instance__network_instances_network_instance_afts_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ethernet = YANGDynClass(base=yc_ethernet_openconfig_network_instance__network_instances_network_instance_afts_ethernet, is_container='container', yang_name="ethernet", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__state_synced = YANGDynClass(base=yc_state_synced_openconfig_network_instance__network_instances_network_instance_afts_state_synced, is_container='container', yang_name="state-synced", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__next_hop_groups = YANGDynClass(base=yc_next_hop_groups_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups, is_container='container', yang_name="next-hop-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__next_hops = YANGDynClass(base=yc_next_hops_openconfig_network_instance__network_instances_network_instance_afts_next_hops, is_container='container', yang_name="next-hops", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'afts']

  def _get_ipv4_unicast(self):
    """
    Getter method for ipv4_unicast, mapped from YANG variable /network_instances/network_instance/afts/ipv4_unicast (container)

    YANG Description: The abstract forwarding table for IPv4 unicast. Entries
within this table are uniquely keyed on the IPv4 unicast
destination prefix which is matched by ingress packets.

The data set represented by the IPv4 Unicast AFT is the set
of entries from the IPv4 unicast RIB that have been selected
for installation into the FIB of the device exporting the
data structure.
    """
    return self.__ipv4_unicast
      
  def _set_ipv4_unicast(self, v, load=False):
    """
    Setter method for ipv4_unicast, mapped from YANG variable /network_instances/network_instance/afts/ipv4_unicast (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv4_unicast is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv4_unicast() directly.

    YANG Description: The abstract forwarding table for IPv4 unicast. Entries
within this table are uniquely keyed on the IPv4 unicast
destination prefix which is matched by ingress packets.

The data set represented by the IPv4 Unicast AFT is the set
of entries from the IPv4 unicast RIB that have been selected
for installation into the FIB of the device exporting the
data structure.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv4_unicast_openconfig_network_instance__network_instances_network_instance_afts_ipv4_unicast, is_container='container', yang_name="ipv4-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv4_unicast must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv4_unicast_openconfig_network_instance__network_instances_network_instance_afts_ipv4_unicast, is_container='container', yang_name="ipv4-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ipv4_unicast = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv4_unicast(self):
    self.__ipv4_unicast = YANGDynClass(base=yc_ipv4_unicast_openconfig_network_instance__network_instances_network_instance_afts_ipv4_unicast, is_container='container', yang_name="ipv4-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ipv6_unicast(self):
    """
    Getter method for ipv6_unicast, mapped from YANG variable /network_instances/network_instance/afts/ipv6_unicast (container)

    YANG Description: The abstract forwarding table for IPv6 unicast. Entries
within this table are uniquely keyed on the IPv6 unicast
destination prefix which is matched by ingress packets.

The data set represented by the IPv6 Unicast AFTis the set
of entries within the IPv6 unicast RIB that have been
selected for installation into the FIB of the device
exporting the data structure.
    """
    return self.__ipv6_unicast
      
  def _set_ipv6_unicast(self, v, load=False):
    """
    Setter method for ipv6_unicast, mapped from YANG variable /network_instances/network_instance/afts/ipv6_unicast (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6_unicast is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6_unicast() directly.

    YANG Description: The abstract forwarding table for IPv6 unicast. Entries
within this table are uniquely keyed on the IPv6 unicast
destination prefix which is matched by ingress packets.

The data set represented by the IPv6 Unicast AFTis the set
of entries within the IPv6 unicast RIB that have been
selected for installation into the FIB of the device
exporting the data structure.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv6_unicast_openconfig_network_instance__network_instances_network_instance_afts_ipv6_unicast, is_container='container', yang_name="ipv6-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6_unicast must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv6_unicast_openconfig_network_instance__network_instances_network_instance_afts_ipv6_unicast, is_container='container', yang_name="ipv6-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ipv6_unicast = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6_unicast(self):
    self.__ipv6_unicast = YANGDynClass(base=yc_ipv6_unicast_openconfig_network_instance__network_instances_network_instance_afts_ipv6_unicast, is_container='container', yang_name="ipv6-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_policy_forwarding(self):
    """
    Getter method for policy_forwarding, mapped from YANG variable /network_instances/network_instance/afts/policy_forwarding (container)

    YANG Description: The abstract forwarding table for policy-based forwarding
entries. Since multiple match criteria can be utilised
within a policy-based forwarding rule, this AFT provides a
flexible match criteria, and is indexed based on an
arbitrary 64-bit index. Entries within the AFT may match on
multiple field types (e.g., L4 header fields, as well as L2
fields).

Examples of entries within this table are:
 - IPv4 policy-based routing based on DSCP.
 - MPLS policy-based forwarding entries.
    """
    return self.__policy_forwarding
      
  def _set_policy_forwarding(self, v, load=False):
    """
    Setter method for policy_forwarding, mapped from YANG variable /network_instances/network_instance/afts/policy_forwarding (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_policy_forwarding is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_policy_forwarding() directly.

    YANG Description: The abstract forwarding table for policy-based forwarding
entries. Since multiple match criteria can be utilised
within a policy-based forwarding rule, this AFT provides a
flexible match criteria, and is indexed based on an
arbitrary 64-bit index. Entries within the AFT may match on
multiple field types (e.g., L4 header fields, as well as L2
fields).

Examples of entries within this table are:
 - IPv4 policy-based routing based on DSCP.
 - MPLS policy-based forwarding entries.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_policy_forwarding_openconfig_network_instance__network_instances_network_instance_afts_policy_forwarding, is_container='container', yang_name="policy-forwarding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """policy_forwarding must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_policy_forwarding_openconfig_network_instance__network_instances_network_instance_afts_policy_forwarding, is_container='container', yang_name="policy-forwarding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__policy_forwarding = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_policy_forwarding(self):
    self.__policy_forwarding = YANGDynClass(base=yc_policy_forwarding_openconfig_network_instance__network_instances_network_instance_afts_policy_forwarding, is_container='container', yang_name="policy-forwarding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_mpls(self):
    """
    Getter method for mpls, mapped from YANG variable /network_instances/network_instance/afts/mpls (container)

    YANG Description: The abstract forwarding table for MPLS label based
forwarding entries. Entries within the table are keyed based
on the top-most MPLS label in the stack on the ingress
packet.
    """
    return self.__mpls
      
  def _set_mpls(self, v, load=False):
    """
    Setter method for mpls, mapped from YANG variable /network_instances/network_instance/afts/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: The abstract forwarding table for MPLS label based
forwarding entries. Entries within the table are keyed based
on the top-most MPLS label in the stack on the ingress
packet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_mpls_openconfig_network_instance__network_instances_network_instance_afts_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    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_network_instance__network_instances_network_instance_afts_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__mpls = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mpls(self):
    self.__mpls = YANGDynClass(base=yc_mpls_openconfig_network_instance__network_instances_network_instance_afts_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ethernet(self):
    """
    Getter method for ethernet, mapped from YANG variable /network_instances/network_instance/afts/ethernet (container)

    YANG Description: The abstract forwarding table for Ethernet based forwarding
entries. Entries within the table are keyed based on the
destination MAC address on the ingress packet.
    """
    return self.__ethernet
      
  def _set_ethernet(self, v, load=False):
    """
    Setter method for ethernet, mapped from YANG variable /network_instances/network_instance/afts/ethernet (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ethernet is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ethernet() directly.

    YANG Description: The abstract forwarding table for Ethernet based forwarding
entries. Entries within the table are keyed based on the
destination MAC address on the ingress packet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ethernet_openconfig_network_instance__network_instances_network_instance_afts_ethernet, is_container='container', yang_name="ethernet", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ethernet must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ethernet_openconfig_network_instance__network_instances_network_instance_afts_ethernet, is_container='container', yang_name="ethernet", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ethernet = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ethernet(self):
    self.__ethernet = YANGDynClass(base=yc_ethernet_openconfig_network_instance__network_instances_network_instance_afts_ethernet, is_container='container', yang_name="ethernet", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_state_synced(self):
    """
    Getter method for state_synced, mapped from YANG variable /network_instances/network_instance/afts/state_synced (container)

    YANG Description: In some cases AFT streaming (e.g., over gNMI) is an eventually consistent system.
When the device updates an entry it is usually expected to
stream an update to the client within a vert short amount
of time (few milliseconds). Given this is the casee, a telemetry collector or a
controller that parse the AFT doesn't have a consistent
snapshot, or overall versioned copy of AFT with the device
at any specific point of time.

In certain failure modes like device boot up, gNMI daemon
failure and device/routing engine stateful switchover
a telemetry collector or a controller need a flag to
determine whether it is in consistent with the device or
not such that it can a corrective action when needed.
A device sets this leaf or flag to indicate to the
client that AFT data/view is consistent.
    """
    return self.__state_synced
      
  def _set_state_synced(self, v, load=False):
    """
    Setter method for state_synced, mapped from YANG variable /network_instances/network_instance/afts/state_synced (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state_synced is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state_synced() directly.

    YANG Description: In some cases AFT streaming (e.g., over gNMI) is an eventually consistent system.
When the device updates an entry it is usually expected to
stream an update to the client within a vert short amount
of time (few milliseconds). Given this is the casee, a telemetry collector or a
controller that parse the AFT doesn't have a consistent
snapshot, or overall versioned copy of AFT with the device
at any specific point of time.

In certain failure modes like device boot up, gNMI daemon
failure and device/routing engine stateful switchover
a telemetry collector or a controller need a flag to
determine whether it is in consistent with the device or
not such that it can a corrective action when needed.
A device sets this leaf or flag to indicate to the
client that AFT data/view is consistent.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_synced_openconfig_network_instance__network_instances_network_instance_afts_state_synced, is_container='container', yang_name="state-synced", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state_synced must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_state_synced_openconfig_network_instance__network_instances_network_instance_afts_state_synced, is_container='container', yang_name="state-synced", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__state_synced = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state_synced(self):
    self.__state_synced = YANGDynClass(base=yc_state_synced_openconfig_network_instance__network_instances_network_instance_afts_state_synced, is_container='container', yang_name="state-synced", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_next_hop_groups(self):
    """
    Getter method for next_hop_groups, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups (container)

    YANG Description: Surrounding container for groups of next-hops.
    """
    return self.__next_hop_groups
      
  def _set_next_hop_groups(self, v, load=False):
    """
    Setter method for next_hop_groups, mapped from YANG variable /network_instances/network_instance/afts/next_hop_groups (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hop_groups is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hop_groups() directly.

    YANG Description: Surrounding container for groups of next-hops.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_next_hop_groups_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups, is_container='container', yang_name="next-hop-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hop_groups must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_next_hop_groups_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups, is_container='container', yang_name="next-hop-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__next_hop_groups = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_next_hop_groups(self):
    self.__next_hop_groups = YANGDynClass(base=yc_next_hop_groups_openconfig_network_instance__network_instances_network_instance_afts_next_hop_groups, is_container='container', yang_name="next-hop-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_next_hops(self):
    """
    Getter method for next_hops, mapped from YANG variable /network_instances/network_instance/afts/next_hops (container)

    YANG Description: The list of next-hops that are to be used for entry within
the AFT table. The structure of each next-hop is address
family independent, such that it is possible to resolve fully
how the next-hop is treated. For example:

- Where ingress IPv4 unicast packets are to be forwarded via
 an MPLS LSP, the next-hop list should indicate the MPLS
 label stack that is used to the next-hop.
- Where ingress MPLS labelled packets are to be forwarded to
 an IPv6 nexthop (for example, a CE within a VPN, then the
 popped label stack, and IPv6 next-hop address should be
 indicated).
    """
    return self.__next_hops
      
  def _set_next_hops(self, v, load=False):
    """
    Setter method for next_hops, mapped from YANG variable /network_instances/network_instance/afts/next_hops (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hops is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hops() directly.

    YANG Description: The list of next-hops that are to be used for entry within
the AFT table. The structure of each next-hop is address
family independent, such that it is possible to resolve fully
how the next-hop is treated. For example:

- Where ingress IPv4 unicast packets are to be forwarded via
 an MPLS LSP, the next-hop list should indicate the MPLS
 label stack that is used to the next-hop.
- Where ingress MPLS labelled packets are to be forwarded to
 an IPv6 nexthop (for example, a CE within a VPN, then the
 popped label stack, and IPv6 next-hop address should be
 indicated).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_next_hops_openconfig_network_instance__network_instances_network_instance_afts_next_hops, is_container='container', yang_name="next-hops", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hops must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_next_hops_openconfig_network_instance__network_instances_network_instance_afts_next_hops, is_container='container', yang_name="next-hops", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__next_hops = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_next_hops(self):
    self.__next_hops = YANGDynClass(base=yc_next_hops_openconfig_network_instance__network_instances_network_instance_afts_next_hops, is_container='container', yang_name="next-hops", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  ipv4_unicast = __builtin__.property(_get_ipv4_unicast)
  ipv6_unicast = __builtin__.property(_get_ipv6_unicast)
  policy_forwarding = __builtin__.property(_get_policy_forwarding)
  mpls = __builtin__.property(_get_mpls)
  ethernet = __builtin__.property(_get_ethernet)
  state_synced = __builtin__.property(_get_state_synced)
  next_hop_groups = __builtin__.property(_get_next_hop_groups)
  next_hops = __builtin__.property(_get_next_hops)


  _pyangbind_elements = OrderedDict([('ipv4_unicast', ipv4_unicast), ('ipv6_unicast', ipv6_unicast), ('policy_forwarding', policy_forwarding), ('mpls', mpls), ('ethernet', ethernet), ('state_synced', state_synced), ('next_hop_groups', next_hop_groups), ('next_hops', next_hops), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/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 routing
protocol instance
  """
  __slots__ = ('_path_helper', '_extmethods', '__identifier','__name','__enabled','__default_metric',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__identifier = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}},), is_leaf=True, yang_name="identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__name = YANGDynClass(base=six.text_type, default=six.text_type("DEFAULT"), is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__default_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'config']

  def _get_identifier(self):
    """
    Getter method for identifier, mapped from YANG variable /network_instances/network_instance/protocols/protocol/config/identifier (identityref)

    YANG Description: The protocol identifier for the instance
    """
    return self.__identifier
      
  def _set_identifier(self, v, load=False):
    """
    Setter method for identifier, mapped from YANG variable /network_instances/network_instance/protocols/protocol/config/identifier (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_identifier is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_identifier() directly.

    YANG Description: The protocol identifier for the instance
    """
    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={'BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}},), is_leaf=True, yang_name="identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """identifier must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}},), is_leaf=True, yang_name="identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__identifier = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_identifier(self):
    self.__identifier = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}},), is_leaf=True, yang_name="identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/config/name (string)

    YANG Description: A unique name for the protocol instance.

If the operator does not designate a name for the protocol
instance (e.g. config), the implementation should use the
name of 'DEFAULT' (e.g. state).  In addition, for
implementations that support single protocol instances, the
default value is recommended for consistency and uniqueness
per protocol instance.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/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: A unique name for the protocol instance.

If the operator does not designate a name for the protocol
instance (e.g. config), the implementation should use the
name of 'DEFAULT' (e.g. state).  In addition, for
implementations that support single protocol instances, the
default value is recommended for consistency and uniqueness
per protocol instance.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, default=six.text_type("DEFAULT"), is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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, default=six.text_type("DEFAULT"), is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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, default=six.text_type("DEFAULT"), is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/config/enabled (boolean)

    YANG Description: A boolean value indicating whether the local protocol
instance is enabled.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: A boolean value indicating whether the local protocol
instance is enabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_default_metric(self):
    """
    Getter method for default_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/config/default_metric (uint32)

    YANG Description: The default metric within the RIB for entries that are
installed by this protocol instance. This value may
be overridden by protocol specific configuration options.
The lower the metric specified the more preferable the RIB
entry is to be selected for use within the network instance.
Where multiple entries have the same metric value then these
equal cost paths should be treated according to the specified
ECMP path selection behaviour for the instance
    """
    return self.__default_metric
      
  def _set_default_metric(self, v, load=False):
    """
    Setter method for default_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/config/default_metric (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_default_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_default_metric() directly.

    YANG Description: The default metric within the RIB for entries that are
installed by this protocol instance. This value may
be overridden by protocol specific configuration options.
The lower the metric specified the more preferable the RIB
entry is to be selected for use within the network instance.
Where multiple entries have the same metric value then these
equal cost paths should be treated according to the specified
ECMP path selection behaviour for the instance
    """
    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="default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """default_metric 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="default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__default_metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_default_metric(self):
    self.__default_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)

  identifier = __builtin__.property(_get_identifier, _set_identifier)
  name = __builtin__.property(_get_name, _set_name)
  enabled = __builtin__.property(_get_enabled, _set_enabled)
  default_metric = __builtin__.property(_get_default_metric, _set_default_metric)


  _pyangbind_elements = OrderedDict([('identifier', identifier), ('name', name), ('enabled', enabled), ('default_metric', default_metric), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to the routing protocol
instance
  """
  __slots__ = ('_path_helper', '_extmethods', '__identifier','__name','__enabled','__default_metric',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__identifier = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}},), is_leaf=True, yang_name="identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__name = YANGDynClass(base=six.text_type, default=six.text_type("DEFAULT"), is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__default_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'state']

  def _get_identifier(self):
    """
    Getter method for identifier, mapped from YANG variable /network_instances/network_instance/protocols/protocol/state/identifier (identityref)

    YANG Description: The protocol identifier for the instance
    """
    return self.__identifier
      
  def _set_identifier(self, v, load=False):
    """
    Setter method for identifier, mapped from YANG variable /network_instances/network_instance/protocols/protocol/state/identifier (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_identifier is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_identifier() directly.

    YANG Description: The protocol identifier for the instance
    """
    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={'BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}},), is_leaf=True, yang_name="identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """identifier must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}},), is_leaf=True, yang_name="identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__identifier = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_identifier(self):
    self.__identifier = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}},), is_leaf=True, yang_name="identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/state/name (string)

    YANG Description: A unique name for the protocol instance.

If the operator does not designate a name for the protocol
instance (e.g. config), the implementation should use the
name of 'DEFAULT' (e.g. state).  In addition, for
implementations that support single protocol instances, the
default value is recommended for consistency and uniqueness
per protocol instance.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/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: A unique name for the protocol instance.

If the operator does not designate a name for the protocol
instance (e.g. config), the implementation should use the
name of 'DEFAULT' (e.g. state).  In addition, for
implementations that support single protocol instances, the
default value is recommended for consistency and uniqueness
per protocol instance.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, default=six.text_type("DEFAULT"), is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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, default=six.text_type("DEFAULT"), is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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, default=six.text_type("DEFAULT"), is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/state/enabled (boolean)

    YANG Description: A boolean value indicating whether the local protocol
instance is enabled.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: A boolean value indicating whether the local protocol
instance is enabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_default_metric(self):
    """
    Getter method for default_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/state/default_metric (uint32)

    YANG Description: The default metric within the RIB for entries that are
installed by this protocol instance. This value may
be overridden by protocol specific configuration options.
The lower the metric specified the more preferable the RIB
entry is to be selected for use within the network instance.
Where multiple entries have the same metric value then these
equal cost paths should be treated according to the specified
ECMP path selection behaviour for the instance
    """
    return self.__default_metric
      
  def _set_default_metric(self, v, load=False):
    """
    Setter method for default_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/state/default_metric (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_default_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_default_metric() directly.

    YANG Description: The default metric within the RIB for entries that are
installed by this protocol instance. This value may
be overridden by protocol specific configuration options.
The lower the metric specified the more preferable the RIB
entry is to be selected for use within the network instance.
Where multiple entries have the same metric value then these
equal cost paths should be treated according to the specified
ECMP path selection behaviour for the instance
    """
    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="default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """default_metric 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="default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__default_metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_default_metric(self):
    self.__default_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  identifier = __builtin__.property(_get_identifier)
  name = __builtin__.property(_get_name)
  enabled = __builtin__.property(_get_enabled)
  default_metric = __builtin__.property(_get_default_metric)


  _pyangbind_elements = OrderedDict([('identifier', identifier), ('name', name), ('enabled', enabled), ('default_metric', default_metric), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/static-routes/static/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for static routes
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix','__set_tag','__description',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = 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])'}),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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-prefix', is_config=True)
    self.__set_tag = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], is_leaf=True, yang_name="set-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pt:tag-type', is_config=True)
    self.__description = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'static-routes', 'static', 'config']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/config/prefix (inet:ip-prefix)

    YANG Description: Destination prefix for the static route, either IPv4 or
IPv6.
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/config/prefix (inet:ip-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: Destination prefix for the static route, either IPv4 or
IPv6.
    """
    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])'}),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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-prefix', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with inet:ip-prefix""",
          'defined-type': "inet:ip-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])'}),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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-prefix', is_config=True)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = 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])'}),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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-prefix', is_config=True)


  def _get_set_tag(self):
    """
    Getter method for set_tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/config/set_tag (oc-pt:tag-type)

    YANG Description: Set a generic tag value on the route. This tag can be
used for filtering routes that are distributed to other
routing protocols.
    """
    return self.__set_tag
      
  def _set_set_tag(self, v, load=False):
    """
    Setter method for set_tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/config/set_tag (oc-pt:tag-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_tag is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_tag() directly.

    YANG Description: Set a generic tag value on the route. This tag can be
used for filtering routes that are distributed to other
routing protocols.
    """
    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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], is_leaf=True, yang_name="set-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pt:tag-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_tag must be of a type compatible with oc-pt:tag-type""",
          'defined-type': "oc-pt:tag-type",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], is_leaf=True, yang_name="set-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pt:tag-type', is_config=True)""",
        })

    self.__set_tag = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_tag(self):
    self.__set_tag = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], is_leaf=True, yang_name="set-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pt:tag-type', is_config=True)


  def _get_description(self):
    """
    Getter method for description, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/config/description (string)

    YANG Description: An optional textual description for the route.
    """
    return self.__description
      
  def _set_description(self, v, load=False):
    """
    Setter method for description, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/config/description (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_description is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_description() directly.

    YANG Description: An optional textual description for the route.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """description must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)""",
        })

    self.__description = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_description(self):
    self.__description = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)

  prefix = __builtin__.property(_get_prefix, _set_prefix)
  set_tag = __builtin__.property(_get_set_tag, _set_set_tag)
  description = __builtin__.property(_get_description, _set_description)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ('set_tag', set_tag), ('description', description), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/static-routes/static/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for static routes
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix','__set_tag','__description',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = 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])'}),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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-prefix', is_config=False)
    self.__set_tag = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], is_leaf=True, yang_name="set-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pt:tag-type', is_config=False)
    self.__description = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'static-routes', 'static', 'state']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/state/prefix (inet:ip-prefix)

    YANG Description: Destination prefix for the static route, either IPv4 or
IPv6.
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/state/prefix (inet:ip-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: Destination prefix for the static route, either IPv4 or
IPv6.
    """
    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])'}),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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with inet:ip-prefix""",
          'defined-type': "inet:ip-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])'}),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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-prefix', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = 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])'}),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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-prefix', is_config=False)


  def _get_set_tag(self):
    """
    Getter method for set_tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/state/set_tag (oc-pt:tag-type)

    YANG Description: Set a generic tag value on the route. This tag can be
used for filtering routes that are distributed to other
routing protocols.
    """
    return self.__set_tag
      
  def _set_set_tag(self, v, load=False):
    """
    Setter method for set_tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/state/set_tag (oc-pt:tag-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_tag is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_tag() directly.

    YANG Description: Set a generic tag value on the route. This tag can be
used for filtering routes that are distributed to other
routing protocols.
    """
    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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], is_leaf=True, yang_name="set-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pt:tag-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_tag must be of a type compatible with oc-pt:tag-type""",
          'defined-type': "oc-pt:tag-type",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], is_leaf=True, yang_name="set-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pt:tag-type', is_config=False)""",
        })

    self.__set_tag = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_tag(self):
    self.__set_tag = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], is_leaf=True, yang_name="set-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pt:tag-type', is_config=False)


  def _get_description(self):
    """
    Getter method for description, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/state/description (string)

    YANG Description: An optional textual description for the route.
    """
    return self.__description
      
  def _set_description(self, v, load=False):
    """
    Setter method for description, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/state/description (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_description is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_description() directly.

    YANG Description: An optional textual description for the route.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """description must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__description = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_description(self):
    self.__description = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)

  prefix = __builtin__.property(_get_prefix)
  set_tag = __builtin__.property(_get_set_tag)
  description = __builtin__.property(_get_description)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ('set_tag', set_tag), ('description', description), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop/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 next-hop
entry
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__next_hop','__recurse','__metric','__preference',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__next_hop = 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}'}),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}|:))'}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DROP': {'@module': 'openconfig-local-routing', '@namespace': 'http://openconfig.net/yang/local-routing'}, 'oc-loc-rt:DROP': {'@module': 'openconfig-local-routing', '@namespace': 'http://openconfig.net/yang/local-routing'}, 'LOCAL_LINK': {'@module': 'openconfig-local-routing', '@namespace': 'http://openconfig.net/yang/local-routing'}, 'oc-loc-rt:LOCAL_LINK': {'@module': 'openconfig-local-routing', '@namespace': 'http://openconfig.net/yang/local-routing'}},),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)
    self.__recurse = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="recurse", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'static-routes', 'static', 'next-hops', 'next-hop', 'config']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/config/index (string)

    YANG Description: An user-specified identifier utilised to uniquely reference
the next-hop entry in the next-hop list. The value of this
index has no semantic meaning other than for referencing
the entry.  It is observed that implementations typically
only support a numeric value for this string. 
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/config/index (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: An user-specified identifier utilised to uniquely reference
the next-hop entry in the next-hop list. The value of this
index has no semantic meaning other than for referencing
the entry.  It is observed that implementations typically
only support a numeric value for this string. 
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)""",
        })

    self.__index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_index(self):
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_next_hop(self):
    """
    Getter method for next_hop, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/config/next_hop (union)

    YANG Description: The next-hop that is to be used for the static route
- this may be specified as an IP address, an interface
or a pre-defined next-hop type - for instance, DROP or
LOCAL_LINK. When this leaf is not set, and the interface-ref
value is specified for the next-hop, then the system should
treat the prefix as though it is directly connected to the
interface.
    """
    return self.__next_hop
      
  def _set_next_hop(self, v, load=False):
    """
    Setter method for next_hop, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/config/next_hop (union)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hop() directly.

    YANG Description: The next-hop that is to be used for the static route
- this may be specified as an IP address, an interface
or a pre-defined next-hop type - for instance, DROP or
LOCAL_LINK. When this leaf is not set, and the interface-ref
value is specified for the next-hop, then the system should
treat the prefix as though it is directly connected to the
interface.
    """
    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}'}),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}|:))'}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DROP': {'@module': 'openconfig-local-routing', '@namespace': 'http://openconfig.net/yang/local-routing'}, 'oc-loc-rt:DROP': {'@module': 'openconfig-local-routing', '@namespace': 'http://openconfig.net/yang/local-routing'}, 'LOCAL_LINK': {'@module': 'openconfig-local-routing', '@namespace': 'http://openconfig.net/yang/local-routing'}, 'oc-loc-rt:LOCAL_LINK': {'@module': 'openconfig-local-routing', '@namespace': 'http://openconfig.net/yang/local-routing'}},),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hop must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          '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}'}),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}|:))'}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DROP': {'@module': 'openconfig-local-routing', '@namespace': 'http://openconfig.net/yang/local-routing'}, 'oc-loc-rt:DROP': {'@module': 'openconfig-local-routing', '@namespace': 'http://openconfig.net/yang/local-routing'}, 'LOCAL_LINK': {'@module': 'openconfig-local-routing', '@namespace': 'http://openconfig.net/yang/local-routing'}, 'oc-loc-rt:LOCAL_LINK': {'@module': 'openconfig-local-routing', '@namespace': 'http://openconfig.net/yang/local-routing'}},),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)""",
        })

    self.__next_hop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_next_hop(self):
    self.__next_hop = 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}'}),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}|:))'}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DROP': {'@module': 'openconfig-local-routing', '@namespace': 'http://openconfig.net/yang/local-routing'}, 'oc-loc-rt:DROP': {'@module': 'openconfig-local-routing', '@namespace': 'http://openconfig.net/yang/local-routing'}, 'LOCAL_LINK': {'@module': 'openconfig-local-routing', '@namespace': 'http://openconfig.net/yang/local-routing'}, 'oc-loc-rt:LOCAL_LINK': {'@module': 'openconfig-local-routing', '@namespace': 'http://openconfig.net/yang/local-routing'}},),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)


  def _get_recurse(self):
    """
    Getter method for recurse, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/config/recurse (boolean)

    YANG Description: Determines whether the next-hop should be allowed to
be looked up recursively - i.e., via a RIB entry which has
been installed by a routing protocol, or another static route
- rather than needing to be connected directly to an
interface of the local system within the current network
instance. When the interface reference specified within the
next-hop entry is set (i.e., is not null) then forwarding is
restricted to being via the interface specified - and
recursion is hence disabled.
    """
    return self.__recurse
      
  def _set_recurse(self, v, load=False):
    """
    Setter method for recurse, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/config/recurse (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_recurse is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_recurse() directly.

    YANG Description: Determines whether the next-hop should be allowed to
be looked up recursively - i.e., via a RIB entry which has
been installed by a routing protocol, or another static route
- rather than needing to be connected directly to an
interface of the local system within the current network
instance. When the interface reference specified within the
next-hop entry is set (i.e., is not null) then forwarding is
restricted to being via the interface specified - and
recursion is hence disabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="recurse", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """recurse must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="recurse", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__recurse = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_recurse(self):
    self.__recurse = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="recurse", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/config/metric (uint32)

    YANG Description: A metric (or cost) which is utilized to specify the order of
selection of the next-hop entry.  The lower the metric, the more
preferable the prefix entry is.  When this value is not
specified, the metric is inherited from the default metric of
the implementation for static route entries.  When multiple
next-hops are specified for a static route, the metric is
utilized to determine which of the next-hops to be installed in
the RIB.  When multiple next-hops have the same metric (be it
specified, or simply the default) then these next-hops should
all be installed in the RIB.
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/config/metric (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: A metric (or cost) which is utilized to specify the order of
selection of the next-hop entry.  The lower the metric, the more
preferable the prefix entry is.  When this value is not
specified, the metric is inherited from the default metric of
the implementation for static route entries.  When multiple
next-hops are specified for a static route, the metric is
utilized to determine which of the next-hops to be installed in
the RIB.  When multiple next-hops have the same metric (be it
specified, or simply the default) then these next-hops should
all be installed in the RIB.
    """
    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="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric 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="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_preference(self):
    """
    Getter method for preference, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/config/preference (uint32)

    YANG Description: Administrative Distance (preference) of the entry.  The
preference defines the order of selection when multiple
sources (protocols, static, etc.) contribute to the same
prefix entry.  The lower the preference, the more preferable the
prefix is.  When this value is not specified, the preference is
inherited from the default preference of the implementation for
static routes.
    """
    return self.__preference
      
  def _set_preference(self, v, load=False):
    """
    Setter method for preference, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/config/preference (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_preference is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_preference() directly.

    YANG Description: Administrative Distance (preference) of the entry.  The
preference defines the order of selection when multiple
sources (protocols, static, etc.) contribute to the same
prefix entry.  The lower the preference, the more preferable the
prefix is.  When this value is not specified, the preference is
inherited from the default preference of the implementation for
static routes.
    """
    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="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """preference 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="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__preference = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_preference(self):
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)

  index = __builtin__.property(_get_index, _set_index)
  next_hop = __builtin__.property(_get_next_hop, _set_next_hop)
  recurse = __builtin__.property(_get_recurse, _set_recurse)
  metric = __builtin__.property(_get_metric, _set_metric)
  preference = __builtin__.property(_get_preference, _set_preference)


  _pyangbind_elements = OrderedDict([('index', index), ('next_hop', next_hop), ('recurse', recurse), ('metric', metric), ('preference', preference), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop/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
next-hop entry
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__next_hop','__recurse','__metric','__preference',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__next_hop = 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}'}),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}|:))'}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DROP': {'@module': 'openconfig-local-routing', '@namespace': 'http://openconfig.net/yang/local-routing'}, 'oc-loc-rt:DROP': {'@module': 'openconfig-local-routing', '@namespace': 'http://openconfig.net/yang/local-routing'}, 'LOCAL_LINK': {'@module': 'openconfig-local-routing', '@namespace': 'http://openconfig.net/yang/local-routing'}, 'oc-loc-rt:LOCAL_LINK': {'@module': 'openconfig-local-routing', '@namespace': 'http://openconfig.net/yang/local-routing'}},),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    self.__recurse = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="recurse", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'static-routes', 'static', 'next-hops', 'next-hop', 'state']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/state/index (string)

    YANG Description: An user-specified identifier utilised to uniquely reference
the next-hop entry in the next-hop list. The value of this
index has no semantic meaning other than for referencing
the entry.  It is observed that implementations typically
only support a numeric value for this string. 
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/state/index (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: An user-specified identifier utilised to uniquely reference
the next-hop entry in the next-hop list. The value of this
index has no semantic meaning other than for referencing
the entry.  It is observed that implementations typically
only support a numeric value for this string. 
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_index(self):
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_next_hop(self):
    """
    Getter method for next_hop, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/state/next_hop (union)

    YANG Description: The next-hop that is to be used for the static route
- this may be specified as an IP address, an interface
or a pre-defined next-hop type - for instance, DROP or
LOCAL_LINK. When this leaf is not set, and the interface-ref
value is specified for the next-hop, then the system should
treat the prefix as though it is directly connected to the
interface.
    """
    return self.__next_hop
      
  def _set_next_hop(self, v, load=False):
    """
    Setter method for next_hop, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/state/next_hop (union)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hop() directly.

    YANG Description: The next-hop that is to be used for the static route
- this may be specified as an IP address, an interface
or a pre-defined next-hop type - for instance, DROP or
LOCAL_LINK. When this leaf is not set, and the interface-ref
value is specified for the next-hop, then the system should
treat the prefix as though it is directly connected to the
interface.
    """
    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}'}),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}|:))'}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DROP': {'@module': 'openconfig-local-routing', '@namespace': 'http://openconfig.net/yang/local-routing'}, 'oc-loc-rt:DROP': {'@module': 'openconfig-local-routing', '@namespace': 'http://openconfig.net/yang/local-routing'}, 'LOCAL_LINK': {'@module': 'openconfig-local-routing', '@namespace': 'http://openconfig.net/yang/local-routing'}, 'oc-loc-rt:LOCAL_LINK': {'@module': 'openconfig-local-routing', '@namespace': 'http://openconfig.net/yang/local-routing'}},),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hop must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          '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}'}),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}|:))'}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DROP': {'@module': 'openconfig-local-routing', '@namespace': 'http://openconfig.net/yang/local-routing'}, 'oc-loc-rt:DROP': {'@module': 'openconfig-local-routing', '@namespace': 'http://openconfig.net/yang/local-routing'}, 'LOCAL_LINK': {'@module': 'openconfig-local-routing', '@namespace': 'http://openconfig.net/yang/local-routing'}, 'oc-loc-rt:LOCAL_LINK': {'@module': 'openconfig-local-routing', '@namespace': 'http://openconfig.net/yang/local-routing'}},),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)""",
        })

    self.__next_hop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_next_hop(self):
    self.__next_hop = 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}'}),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}|:))'}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DROP': {'@module': 'openconfig-local-routing', '@namespace': 'http://openconfig.net/yang/local-routing'}, 'oc-loc-rt:DROP': {'@module': 'openconfig-local-routing', '@namespace': 'http://openconfig.net/yang/local-routing'}, 'LOCAL_LINK': {'@module': 'openconfig-local-routing', '@namespace': 'http://openconfig.net/yang/local-routing'}, 'oc-loc-rt:LOCAL_LINK': {'@module': 'openconfig-local-routing', '@namespace': 'http://openconfig.net/yang/local-routing'}},),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)


  def _get_recurse(self):
    """
    Getter method for recurse, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/state/recurse (boolean)

    YANG Description: Determines whether the next-hop should be allowed to
be looked up recursively - i.e., via a RIB entry which has
been installed by a routing protocol, or another static route
- rather than needing to be connected directly to an
interface of the local system within the current network
instance. When the interface reference specified within the
next-hop entry is set (i.e., is not null) then forwarding is
restricted to being via the interface specified - and
recursion is hence disabled.
    """
    return self.__recurse
      
  def _set_recurse(self, v, load=False):
    """
    Setter method for recurse, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/state/recurse (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_recurse is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_recurse() directly.

    YANG Description: Determines whether the next-hop should be allowed to
be looked up recursively - i.e., via a RIB entry which has
been installed by a routing protocol, or another static route
- rather than needing to be connected directly to an
interface of the local system within the current network
instance. When the interface reference specified within the
next-hop entry is set (i.e., is not null) then forwarding is
restricted to being via the interface specified - and
recursion is hence disabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="recurse", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """recurse must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="recurse", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__recurse = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_recurse(self):
    self.__recurse = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="recurse", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/state/metric (uint32)

    YANG Description: A metric (or cost) which is utilized to specify the order of
selection of the next-hop entry.  The lower the metric, the more
preferable the prefix entry is.  When this value is not
specified, the metric is inherited from the default metric of
the implementation for static route entries.  When multiple
next-hops are specified for a static route, the metric is
utilized to determine which of the next-hops to be installed in
the RIB.  When multiple next-hops have the same metric (be it
specified, or simply the default) then these next-hops should
all be installed in the RIB.
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/state/metric (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: A metric (or cost) which is utilized to specify the order of
selection of the next-hop entry.  The lower the metric, the more
preferable the prefix entry is.  When this value is not
specified, the metric is inherited from the default metric of
the implementation for static route entries.  When multiple
next-hops are specified for a static route, the metric is
utilized to determine which of the next-hops to be installed in
the RIB.  When multiple next-hops have the same metric (be it
specified, or simply the default) then these next-hops should
all be installed in the RIB.
    """
    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="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric 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="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_preference(self):
    """
    Getter method for preference, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/state/preference (uint32)

    YANG Description: Administrative Distance (preference) of the entry.  The
preference defines the order of selection when multiple
sources (protocols, static, etc.) contribute to the same
prefix entry.  The lower the preference, the more preferable the
prefix is.  When this value is not specified, the preference is
inherited from the default preference of the implementation for
static routes.
    """
    return self.__preference
      
  def _set_preference(self, v, load=False):
    """
    Setter method for preference, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/state/preference (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_preference is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_preference() directly.

    YANG Description: Administrative Distance (preference) of the entry.  The
preference defines the order of selection when multiple
sources (protocols, static, etc.) contribute to the same
prefix entry.  The lower the preference, the more preferable the
prefix is.  When this value is not specified, the preference is
inherited from the default preference of the implementation for
static routes.
    """
    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="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """preference 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="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__preference = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_preference(self):
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  index = __builtin__.property(_get_index)
  next_hop = __builtin__.property(_get_next_hop)
  recurse = __builtin__.property(_get_recurse)
  metric = __builtin__.property(_get_metric)
  preference = __builtin__.property(_get_preference)


  _pyangbind_elements = OrderedDict([('index', index), ('next_hop', next_hop), ('recurse', recurse), ('metric', metric), ('preference', preference), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop_enable_bfd_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop/enable-bfd/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to enabling BFD.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'static-routes', 'static', 'next-hops', 'next-hop', 'enable-bfd', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/enable_bfd/config/enabled (boolean)

    YANG Description: When this leaf is set to true, BFD is used to detect the
liveliness of the remote peer or next-hop.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/enable_bfd/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When this leaf is set to true, BFD is used to detect the
liveliness of the remote peer or next-hop.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop_enable_bfd_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop/enable-bfd/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 enabing BFD.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'static-routes', 'static', 'next-hops', 'next-hop', 'enable-bfd', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/enable_bfd/state/enabled (boolean)

    YANG Description: When this leaf is set to true, BFD is used to detect the
liveliness of the remote peer or next-hop.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/enable_bfd/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When this leaf is set to true, BFD is used to detect the
liveliness of the remote peer or next-hop.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  enabled = __builtin__.property(_get_enabled)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ])


class yc_enable_bfd_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop_enable_bfd(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop/enable-bfd. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enable BFD for liveliness detection to the next-hop or
neighbour.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'enable-bfd'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop_enable_bfd_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop_enable_bfd_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'static-routes', 'static', 'next-hops', 'next-hop', 'enable-bfd']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/enable_bfd/config (container)

    YANG Description: Configuration parameters relating to enabling BFD.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/enable_bfd/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 enabling BFD.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop_enable_bfd_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop_enable_bfd_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop_enable_bfd_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/enable_bfd/state (container)

    YANG Description: Operational state parameters relating to enabing BFD.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/enable_bfd/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 enabing BFD.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop_enable_bfd_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop_enable_bfd_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop_enable_bfd_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop_interface_ref_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'static-routes', 'static', 'next-hops', 'next-hop', 'interface-ref', 'config']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/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 /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/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 /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop_interface_ref_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'static-routes', 'static', 'next-hops', 'next-hop', 'interface-ref', 'state']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/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 /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/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 /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop_interface_ref(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop/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
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'interface-ref'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'static-routes', 'static', 'next-hops', 'next-hop', 'interface-ref']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/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 /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/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_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/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 /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/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_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop_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/network-instance', defining_module='openconfig-network-instance', 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_next_hop_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A list of next-hops to be utilised for the static
route being specified.
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__config','__state','__enable_bfd','__interface_ref',)

  _yang_name = 'next-hop'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__enable_bfd = YANGDynClass(base=yc_enable_bfd_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop_enable_bfd, is_container='container', yang_name="enable-bfd", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__interface_ref = YANGDynClass(base=yc_interface_ref_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'static-routes', 'static', 'next-hops', 'next-hop']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/index (leafref)

    YANG Description: A reference to the index of the current next-hop.
The index is intended to be a user-specified value
which can be used to reference the next-hop in
question, without any other semantics being
assigned to it.
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: A reference to the index of the current next-hop.
The index is intended to be a user-specified value
which can be used to reference the next-hop in
question, without any other semantics being
assigned to it.
    """
    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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_index(self):
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/config (container)

    YANG Description: Configuration parameters relating to the next-hop
entry
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/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 next-hop
entry
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/state (container)

    YANG Description: Operational state parameters relating to the
next-hop entry
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/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
next-hop entry
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_enable_bfd(self):
    """
    Getter method for enable_bfd, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/enable_bfd (container)

    YANG Description: Enable BFD for liveliness detection to the next-hop or
neighbour.
    """
    return self.__enable_bfd
      
  def _set_enable_bfd(self, v, load=False):
    """
    Setter method for enable_bfd, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/enable_bfd (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable_bfd is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable_bfd() directly.

    YANG Description: Enable BFD for liveliness detection to the next-hop or
neighbour.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_enable_bfd_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop_enable_bfd, is_container='container', yang_name="enable-bfd", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable_bfd must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_enable_bfd_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop_enable_bfd, is_container='container', yang_name="enable-bfd", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__enable_bfd = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable_bfd(self):
    self.__enable_bfd = YANGDynClass(base=yc_enable_bfd_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop_enable_bfd, is_container='container', yang_name="enable-bfd", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_interface_ref(self):
    """
    Getter method for interface_ref, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/interface_ref (container)

    YANG Description: Reference to an interface or subinterface
    """
    return self.__interface_ref
      
  def _set_interface_ref(self, v, load=False):
    """
    Setter method for interface_ref, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop/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
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interface_ref_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  index = __builtin__.property(_get_index, _set_index)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  enable_bfd = __builtin__.property(_get_enable_bfd, _set_enable_bfd)
  interface_ref = __builtin__.property(_get_interface_ref, _set_interface_ref)


  _pyangbind_elements = OrderedDict([('index', index), ('config', config), ('state', state), ('enable_bfd', enable_bfd), ('interface_ref', interface_ref), ])


class yc_next_hops_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration and state parameters relating to the
next-hops that are to be utilised for the static
route being specified
  """
  __slots__ = ('_path_helper', '_extmethods', '__next_hop',)

  _yang_name = 'next-hops'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__next_hop = YANGDynClass(base=YANGListType("index",yc_next_hop_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop, yang_name="next-hop", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'static-routes', 'static', 'next-hops']

  def _get_next_hop(self):
    """
    Getter method for next_hop, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop (list)

    YANG Description: A list of next-hops to be utilised for the static
route being specified.
    """
    return self.__next_hop
      
  def _set_next_hop(self, v, load=False):
    """
    Setter method for next_hop, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops/next_hop (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hop() directly.

    YANG Description: A list of next-hops to be utilised for the static
route being specified.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("index",yc_next_hop_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop, yang_name="next-hop", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hop must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("index",yc_next_hop_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop, yang_name="next-hop", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__next_hop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_next_hop(self):
    self.__next_hop = YANGDynClass(base=YANGListType("index",yc_next_hop_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops_next_hop, yang_name="next-hop", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  next_hop = __builtin__.property(_get_next_hop, _set_next_hop)


  _pyangbind_elements = OrderedDict([('next_hop', next_hop), ])


class yc_static_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/static-routes/static. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of locally configured static routes
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix','__config','__state','__next_hops',)

  _yang_name = 'static'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__next_hops = YANGDynClass(base=yc_next_hops_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops, is_container='container', yang_name="next-hops", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'static-routes', 'static']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/prefix (leafref)

    YANG Description: Reference to the destination prefix list key.
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/prefix (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: Reference to the destination prefix 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/config (container)

    YANG Description: Configuration data for static routes
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/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 static routes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/state (container)

    YANG Description: Operational state data for static routes
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/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 static routes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_next_hops(self):
    """
    Getter method for next_hops, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops (container)

    YANG Description: Configuration and state parameters relating to the
next-hops that are to be utilised for the static
route being specified
    """
    return self.__next_hops
      
  def _set_next_hops(self, v, load=False):
    """
    Setter method for next_hops, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static/next_hops (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hops is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hops() directly.

    YANG Description: Configuration and state parameters relating to the
next-hops that are to be utilised for the static
route being specified
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_next_hops_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops, is_container='container', yang_name="next-hops", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hops must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_next_hops_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops, is_container='container', yang_name="next-hops", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__next_hops = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_next_hops(self):
    self.__next_hops = YANGDynClass(base=yc_next_hops_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static_next_hops, is_container='container', yang_name="next-hops", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  prefix = __builtin__.property(_get_prefix, _set_prefix)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  next_hops = __builtin__.property(_get_next_hops, _set_next_hops)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ('config', config), ('state', state), ('next_hops', next_hops), ])


class yc_static_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/static-routes. 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 static routes
  """
  __slots__ = ('_path_helper', '_extmethods', '__static',)

  _yang_name = 'static-routes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__static = YANGDynClass(base=YANGListType("prefix",yc_static_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static, yang_name="static", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix', extensions=None), is_container='list', yang_name="static", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'static-routes']

  def _get_static(self):
    """
    Getter method for static, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static (list)

    YANG Description: List of locally configured static routes
    """
    return self.__static
      
  def _set_static(self, v, load=False):
    """
    Setter method for static, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes/static (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_static is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_static() directly.

    YANG Description: List of locally configured static routes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("prefix",yc_static_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static, yang_name="static", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix', extensions=None), is_container='list', yang_name="static", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """static must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("prefix",yc_static_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static, yang_name="static", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix', extensions=None), is_container='list', yang_name="static", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__static = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_static(self):
    self.__static = YANGDynClass(base=YANGListType("prefix",yc_static_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes_static, yang_name="static", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix', extensions=None), is_container='list', yang_name="static", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  static = __builtin__.property(_get_static, _set_static)


  _pyangbind_elements = OrderedDict([('static', static), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_local_aggregates_aggregate_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/local-aggregates/aggregate/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for aggregate advertisements
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix','__discard','__set_tag','__description','__metric','__preference',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = 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])'}),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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-prefix', is_config=True)
    self.__discard = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="discard", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__set_tag = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], is_leaf=True, yang_name="set-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pt:tag-type', is_config=True)
    self.__description = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'local-aggregates', 'aggregate', 'config']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/local_aggregates/aggregate/config/prefix (inet:ip-prefix)

    YANG Description: Aggregate prefix to be advertised
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/local_aggregates/aggregate/config/prefix (inet:ip-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: Aggregate prefix to be advertised
    """
    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])'}),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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-prefix', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with inet:ip-prefix""",
          'defined-type': "inet:ip-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])'}),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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-prefix', is_config=True)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = 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])'}),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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-prefix', is_config=True)


  def _get_discard(self):
    """
    Getter method for discard, mapped from YANG variable /network_instances/network_instance/protocols/protocol/local_aggregates/aggregate/config/discard (boolean)

    YANG Description: When true, install the aggregate route with a discard
next-hop -- traffic destined to the aggregate will be
discarded with no ICMP message generated.  When false,
traffic destined to an aggregate address when no
constituent routes are present will generate an ICMP
unreachable message.
    """
    return self.__discard
      
  def _set_discard(self, v, load=False):
    """
    Setter method for discard, mapped from YANG variable /network_instances/network_instance/protocols/protocol/local_aggregates/aggregate/config/discard (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_discard is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_discard() directly.

    YANG Description: When true, install the aggregate route with a discard
next-hop -- traffic destined to the aggregate will be
discarded with no ICMP message generated.  When false,
traffic destined to an aggregate address when no
constituent routes are present will generate an ICMP
unreachable message.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="discard", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """discard must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="discard", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__discard = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_discard(self):
    self.__discard = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="discard", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_set_tag(self):
    """
    Getter method for set_tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/local_aggregates/aggregate/config/set_tag (oc-pt:tag-type)

    YANG Description: Set a generic tag value on the route. This tag can be
used for filtering routes that are distributed to other
routing protocols.
    """
    return self.__set_tag
      
  def _set_set_tag(self, v, load=False):
    """
    Setter method for set_tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/local_aggregates/aggregate/config/set_tag (oc-pt:tag-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_tag is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_tag() directly.

    YANG Description: Set a generic tag value on the route. This tag can be
used for filtering routes that are distributed to other
routing protocols.
    """
    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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], is_leaf=True, yang_name="set-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pt:tag-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_tag must be of a type compatible with oc-pt:tag-type""",
          'defined-type': "oc-pt:tag-type",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], is_leaf=True, yang_name="set-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pt:tag-type', is_config=True)""",
        })

    self.__set_tag = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_tag(self):
    self.__set_tag = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], is_leaf=True, yang_name="set-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pt:tag-type', is_config=True)


  def _get_description(self):
    """
    Getter method for description, mapped from YANG variable /network_instances/network_instance/protocols/protocol/local_aggregates/aggregate/config/description (string)

    YANG Description: An optional textual description for the route.
    """
    return self.__description
      
  def _set_description(self, v, load=False):
    """
    Setter method for description, mapped from YANG variable /network_instances/network_instance/protocols/protocol/local_aggregates/aggregate/config/description (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_description is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_description() directly.

    YANG Description: An optional textual description for the route.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """description must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)""",
        })

    self.__description = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_description(self):
    self.__description = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/local_aggregates/aggregate/config/metric (uint32)

    YANG Description: A metric (or cost) which is utilized to specify the order of
selection of the next-hop entry.  The lower the metric, the more
preferable the prefix entry is.  When this value is not
specified, the metric is inherited from the default metric of
the implementation for static route entries.  When multiple
next-hops are specified for a static route, the metric is
utilized to determine which of the next-hops to be installed in
the RIB.  When multiple next-hops have the same metric (be it
specified, or simply the default) then these next-hops should
all be installed in the RIB.
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/local_aggregates/aggregate/config/metric (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: A metric (or cost) which is utilized to specify the order of
selection of the next-hop entry.  The lower the metric, the more
preferable the prefix entry is.  When this value is not
specified, the metric is inherited from the default metric of
the implementation for static route entries.  When multiple
next-hops are specified for a static route, the metric is
utilized to determine which of the next-hops to be installed in
the RIB.  When multiple next-hops have the same metric (be it
specified, or simply the default) then these next-hops should
all be installed in the RIB.
    """
    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="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric 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="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_preference(self):
    """
    Getter method for preference, mapped from YANG variable /network_instances/network_instance/protocols/protocol/local_aggregates/aggregate/config/preference (uint32)

    YANG Description: Administrative Distance (preference) of the entry.  The
preference defines the order of selection when multiple
sources (protocols, static, etc.) contribute to the same
prefix entry.  The lower the preference, the more preferable the
prefix is.  When this value is not specified, the preference is
inherited from the default preference of the implementation for
static routes.
    """
    return self.__preference
      
  def _set_preference(self, v, load=False):
    """
    Setter method for preference, mapped from YANG variable /network_instances/network_instance/protocols/protocol/local_aggregates/aggregate/config/preference (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_preference is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_preference() directly.

    YANG Description: Administrative Distance (preference) of the entry.  The
preference defines the order of selection when multiple
sources (protocols, static, etc.) contribute to the same
prefix entry.  The lower the preference, the more preferable the
prefix is.  When this value is not specified, the preference is
inherited from the default preference of the implementation for
static routes.
    """
    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="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """preference 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="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__preference = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_preference(self):
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)

  prefix = __builtin__.property(_get_prefix, _set_prefix)
  discard = __builtin__.property(_get_discard, _set_discard)
  set_tag = __builtin__.property(_get_set_tag, _set_set_tag)
  description = __builtin__.property(_get_description, _set_description)
  metric = __builtin__.property(_get_metric, _set_metric)
  preference = __builtin__.property(_get_preference, _set_preference)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ('discard', discard), ('set_tag', set_tag), ('description', description), ('metric', metric), ('preference', preference), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_local_aggregates_aggregate_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/local-aggregates/aggregate/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for aggregate
advertisements
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix','__discard','__set_tag','__description','__metric','__preference',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = 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])'}),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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-prefix', is_config=False)
    self.__discard = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="discard", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__set_tag = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], is_leaf=True, yang_name="set-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pt:tag-type', is_config=False)
    self.__description = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'local-aggregates', 'aggregate', 'state']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/local_aggregates/aggregate/state/prefix (inet:ip-prefix)

    YANG Description: Aggregate prefix to be advertised
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/local_aggregates/aggregate/state/prefix (inet:ip-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: Aggregate prefix to be advertised
    """
    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])'}),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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with inet:ip-prefix""",
          'defined-type': "inet:ip-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])'}),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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-prefix', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = 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])'}),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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-prefix', is_config=False)


  def _get_discard(self):
    """
    Getter method for discard, mapped from YANG variable /network_instances/network_instance/protocols/protocol/local_aggregates/aggregate/state/discard (boolean)

    YANG Description: When true, install the aggregate route with a discard
next-hop -- traffic destined to the aggregate will be
discarded with no ICMP message generated.  When false,
traffic destined to an aggregate address when no
constituent routes are present will generate an ICMP
unreachable message.
    """
    return self.__discard
      
  def _set_discard(self, v, load=False):
    """
    Setter method for discard, mapped from YANG variable /network_instances/network_instance/protocols/protocol/local_aggregates/aggregate/state/discard (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_discard is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_discard() directly.

    YANG Description: When true, install the aggregate route with a discard
next-hop -- traffic destined to the aggregate will be
discarded with no ICMP message generated.  When false,
traffic destined to an aggregate address when no
constituent routes are present will generate an ICMP
unreachable message.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="discard", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """discard must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="discard", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__discard = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_discard(self):
    self.__discard = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="discard", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_set_tag(self):
    """
    Getter method for set_tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/local_aggregates/aggregate/state/set_tag (oc-pt:tag-type)

    YANG Description: Set a generic tag value on the route. This tag can be
used for filtering routes that are distributed to other
routing protocols.
    """
    return self.__set_tag
      
  def _set_set_tag(self, v, load=False):
    """
    Setter method for set_tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/local_aggregates/aggregate/state/set_tag (oc-pt:tag-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_tag is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_tag() directly.

    YANG Description: Set a generic tag value on the route. This tag can be
used for filtering routes that are distributed to other
routing protocols.
    """
    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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], is_leaf=True, yang_name="set-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pt:tag-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_tag must be of a type compatible with oc-pt:tag-type""",
          'defined-type': "oc-pt:tag-type",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], is_leaf=True, yang_name="set-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pt:tag-type', is_config=False)""",
        })

    self.__set_tag = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_tag(self):
    self.__set_tag = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], is_leaf=True, yang_name="set-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pt:tag-type', is_config=False)


  def _get_description(self):
    """
    Getter method for description, mapped from YANG variable /network_instances/network_instance/protocols/protocol/local_aggregates/aggregate/state/description (string)

    YANG Description: An optional textual description for the route.
    """
    return self.__description
      
  def _set_description(self, v, load=False):
    """
    Setter method for description, mapped from YANG variable /network_instances/network_instance/protocols/protocol/local_aggregates/aggregate/state/description (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_description is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_description() directly.

    YANG Description: An optional textual description for the route.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """description must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__description = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_description(self):
    self.__description = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/local_aggregates/aggregate/state/metric (uint32)

    YANG Description: A metric (or cost) which is utilized to specify the order of
selection of the next-hop entry.  The lower the metric, the more
preferable the prefix entry is.  When this value is not
specified, the metric is inherited from the default metric of
the implementation for static route entries.  When multiple
next-hops are specified for a static route, the metric is
utilized to determine which of the next-hops to be installed in
the RIB.  When multiple next-hops have the same metric (be it
specified, or simply the default) then these next-hops should
all be installed in the RIB.
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/local_aggregates/aggregate/state/metric (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: A metric (or cost) which is utilized to specify the order of
selection of the next-hop entry.  The lower the metric, the more
preferable the prefix entry is.  When this value is not
specified, the metric is inherited from the default metric of
the implementation for static route entries.  When multiple
next-hops are specified for a static route, the metric is
utilized to determine which of the next-hops to be installed in
the RIB.  When multiple next-hops have the same metric (be it
specified, or simply the default) then these next-hops should
all be installed in the RIB.
    """
    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="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric 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="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_preference(self):
    """
    Getter method for preference, mapped from YANG variable /network_instances/network_instance/protocols/protocol/local_aggregates/aggregate/state/preference (uint32)

    YANG Description: Administrative Distance (preference) of the entry.  The
preference defines the order of selection when multiple
sources (protocols, static, etc.) contribute to the same
prefix entry.  The lower the preference, the more preferable the
prefix is.  When this value is not specified, the preference is
inherited from the default preference of the implementation for
static routes.
    """
    return self.__preference
      
  def _set_preference(self, v, load=False):
    """
    Setter method for preference, mapped from YANG variable /network_instances/network_instance/protocols/protocol/local_aggregates/aggregate/state/preference (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_preference is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_preference() directly.

    YANG Description: Administrative Distance (preference) of the entry.  The
preference defines the order of selection when multiple
sources (protocols, static, etc.) contribute to the same
prefix entry.  The lower the preference, the more preferable the
prefix is.  When this value is not specified, the preference is
inherited from the default preference of the implementation for
static routes.
    """
    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="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """preference 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="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__preference = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_preference(self):
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  prefix = __builtin__.property(_get_prefix)
  discard = __builtin__.property(_get_discard)
  set_tag = __builtin__.property(_get_set_tag)
  description = __builtin__.property(_get_description)
  metric = __builtin__.property(_get_metric)
  preference = __builtin__.property(_get_preference)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ('discard', discard), ('set_tag', set_tag), ('description', description), ('metric', metric), ('preference', preference), ])


class yc_aggregate_openconfig_network_instance__network_instances_network_instance_protocols_protocol_local_aggregates_aggregate(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/local-aggregates/aggregate. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of aggregates
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix','__config','__state',)

  _yang_name = 'aggregate'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_local_aggregates_aggregate_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_local_aggregates_aggregate_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'local-aggregates', 'aggregate']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/local_aggregates/aggregate/prefix (leafref)

    YANG Description: Reference to the configured prefix for this aggregate
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/local_aggregates/aggregate/prefix (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: Reference to the configured prefix for this aggregate
    """
    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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/local_aggregates/aggregate/config (container)

    YANG Description: Configuration data for aggregate advertisements
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/local_aggregates/aggregate/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 aggregate advertisements
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_local_aggregates_aggregate_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_local_aggregates_aggregate_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_local_aggregates_aggregate_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/local_aggregates/aggregate/state (container)

    YANG Description: Operational state data for aggregate
advertisements
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/local_aggregates/aggregate/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 aggregate
advertisements
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_local_aggregates_aggregate_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_local_aggregates_aggregate_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_local_aggregates_aggregate_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  prefix = __builtin__.property(_get_prefix, _set_prefix)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ('config', config), ('state', state), ])


class yc_local_aggregates_openconfig_network_instance__network_instances_network_instance_protocols_protocol_local_aggregates(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/local-aggregates. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for locally-defined aggregate
routes
  """
  __slots__ = ('_path_helper', '_extmethods', '__aggregate',)

  _yang_name = 'local-aggregates'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__aggregate = YANGDynClass(base=YANGListType("prefix",yc_aggregate_openconfig_network_instance__network_instances_network_instance_protocols_protocol_local_aggregates_aggregate, yang_name="aggregate", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix', extensions=None), is_container='list', yang_name="aggregate", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'local-aggregates']

  def _get_aggregate(self):
    """
    Getter method for aggregate, mapped from YANG variable /network_instances/network_instance/protocols/protocol/local_aggregates/aggregate (list)

    YANG Description: List of aggregates
    """
    return self.__aggregate
      
  def _set_aggregate(self, v, load=False):
    """
    Setter method for aggregate, mapped from YANG variable /network_instances/network_instance/protocols/protocol/local_aggregates/aggregate (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_aggregate is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_aggregate() directly.

    YANG Description: List of aggregates
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("prefix",yc_aggregate_openconfig_network_instance__network_instances_network_instance_protocols_protocol_local_aggregates_aggregate, yang_name="aggregate", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix', extensions=None), is_container='list', yang_name="aggregate", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """aggregate must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("prefix",yc_aggregate_openconfig_network_instance__network_instances_network_instance_protocols_protocol_local_aggregates_aggregate, yang_name="aggregate", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix', extensions=None), is_container='list', yang_name="aggregate", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__aggregate = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_aggregate(self):
    self.__aggregate = YANGDynClass(base=YANGListType("prefix",yc_aggregate_openconfig_network_instance__network_instances_network_instance_protocols_protocol_local_aggregates_aggregate, yang_name="aggregate", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix', extensions=None), is_container='list', yang_name="aggregate", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  aggregate = __builtin__.property(_get_aggregate, _set_aggregate)


  _pyangbind_elements = OrderedDict([('aggregate', aggregate), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/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 global BGP router
  """
  __slots__ = ('_path_helper', '_extmethods', '__as_','__router_id',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__as_ = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=True)
    self.__router_id = 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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:dotted-quad', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'config']

  def _get_as_(self):
    """
    Getter method for as_, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/config/as (oc-inet:as-number)

    YANG Description: Local autonomous system number of the router.  Uses
the 32-bit as-number type from the model in RFC 6991.
    """
    return self.__as_
      
  def _set_as_(self, v, load=False):
    """
    Setter method for as_, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/config/as (oc-inet:as-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_as_ is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_as_() directly.

    YANG Description: Local autonomous system number of the router.  Uses
the 32-bit as-number type from the model in RFC 6991.
    """
    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="as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """as_ must be of a type compatible with oc-inet:as-number""",
          'defined-type': "oc-inet:as-number",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=True)""",
        })

    self.__as_ = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_as_(self):
    self.__as_ = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=True)


  def _get_router_id(self):
    """
    Getter method for router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/config/router_id (oc-yang:dotted-quad)

    YANG Description: Router id of the router - an unsigned 32-bit integer
expressed in dotted quad notation.
    """
    return self.__router_id
      
  def _set_router_id(self, v, load=False):
    """
    Setter method for router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/config/router_id (oc-yang:dotted-quad)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_router_id() directly.

    YANG Description: Router id of the router - an unsigned 32-bit integer
expressed in dotted quad notation.
    """
    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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:dotted-quad', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """router_id must be of a type compatible with oc-yang:dotted-quad""",
          'defined-type': "oc-yang:dotted-quad",
          '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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:dotted-quad', is_config=True)""",
        })

    self.__router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_router_id(self):
    self.__router_id = 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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:dotted-quad', is_config=True)

  as_ = __builtin__.property(_get_as_, _set_as_)
  router_id = __builtin__.property(_get_router_id, _set_router_id)


  _pyangbind_elements = OrderedDict([('as_', as_), ('router_id', router_id), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the global BGP router
  """
  __slots__ = ('_path_helper', '_extmethods', '__as_','__router_id','__total_paths','__total_prefixes',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__as_ = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)
    self.__router_id = 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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:dotted-quad', is_config=False)
    self.__total_paths = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="total-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__total_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="total-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'state']

  def _get_as_(self):
    """
    Getter method for as_, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/state/as (oc-inet:as-number)

    YANG Description: Local autonomous system number of the router.  Uses
the 32-bit as-number type from the model in RFC 6991.
    """
    return self.__as_
      
  def _set_as_(self, v, load=False):
    """
    Setter method for as_, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/state/as (oc-inet:as-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_as_ is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_as_() directly.

    YANG Description: Local autonomous system number of the router.  Uses
the 32-bit as-number type from the model in RFC 6991.
    """
    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="as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """as_ must be of a type compatible with oc-inet:as-number""",
          'defined-type': "oc-inet:as-number",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)""",
        })

    self.__as_ = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_as_(self):
    self.__as_ = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)


  def _get_router_id(self):
    """
    Getter method for router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/state/router_id (oc-yang:dotted-quad)

    YANG Description: Router id of the router - an unsigned 32-bit integer
expressed in dotted quad notation.
    """
    return self.__router_id
      
  def _set_router_id(self, v, load=False):
    """
    Setter method for router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/state/router_id (oc-yang:dotted-quad)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_router_id() directly.

    YANG Description: Router id of the router - an unsigned 32-bit integer
expressed in dotted quad notation.
    """
    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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:dotted-quad', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """router_id must be of a type compatible with oc-yang:dotted-quad""",
          'defined-type': "oc-yang:dotted-quad",
          '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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:dotted-quad', is_config=False)""",
        })

    self.__router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_router_id(self):
    self.__router_id = 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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:dotted-quad', is_config=False)


  def _get_total_paths(self):
    """
    Getter method for total_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/state/total_paths (uint32)

    YANG Description: Total number of BGP paths within the context
    """
    return self.__total_paths
      
  def _set_total_paths(self, v, load=False):
    """
    Setter method for total_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/state/total_paths (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_total_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_total_paths() directly.

    YANG Description: Total number of BGP paths within the context
    """
    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="total-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """total_paths 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="total-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__total_paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_total_paths(self):
    self.__total_paths = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="total-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_total_prefixes(self):
    """
    Getter method for total_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/state/total_prefixes (uint32)

    YANG Description: Total number of BGP prefixes received within the context
    """
    return self.__total_prefixes
      
  def _set_total_prefixes(self, v, load=False):
    """
    Setter method for total_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/state/total_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_total_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_total_prefixes() directly.

    YANG Description: Total number of BGP prefixes received within the context
    """
    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="total-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """total_prefixes 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="total-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__total_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_total_prefixes(self):
    self.__total_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="total-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  as_ = __builtin__.property(_get_as_)
  router_id = __builtin__.property(_get_router_id)
  total_paths = __builtin__.property(_get_total_paths)
  total_prefixes = __builtin__.property(_get_total_prefixes)


  _pyangbind_elements = OrderedDict([('as_', as_), ('router_id', router_id), ('total_paths', total_paths), ('total_prefixes', total_prefixes), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_default_route_distance_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/default-route-distance/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 default route
distance
  """
  __slots__ = ('_path_helper', '_extmethods', '__external_route_distance','__internal_route_distance',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__external_route_distance = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="external-route-distance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    self.__internal_route_distance = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="internal-route-distance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'default-route-distance', 'config']

  def _get_external_route_distance(self):
    """
    Getter method for external_route_distance, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/default_route_distance/config/external_route_distance (uint8)

    YANG Description: Administrative distance for routes learned from external
BGP (eBGP).
    """
    return self.__external_route_distance
      
  def _set_external_route_distance(self, v, load=False):
    """
    Setter method for external_route_distance, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/default_route_distance/config/external_route_distance (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_external_route_distance is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_external_route_distance() directly.

    YANG Description: Administrative distance for routes learned from external
BGP (eBGP).
    """
    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': ['1..255']}), is_leaf=True, yang_name="external-route-distance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """external_route_distance 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': ['1..255']}), is_leaf=True, yang_name="external-route-distance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
        })

    self.__external_route_distance = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_external_route_distance(self):
    self.__external_route_distance = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="external-route-distance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)


  def _get_internal_route_distance(self):
    """
    Getter method for internal_route_distance, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/default_route_distance/config/internal_route_distance (uint8)

    YANG Description: Administrative distance for routes learned from internal
BGP (iBGP).
    """
    return self.__internal_route_distance
      
  def _set_internal_route_distance(self, v, load=False):
    """
    Setter method for internal_route_distance, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/default_route_distance/config/internal_route_distance (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_internal_route_distance is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_internal_route_distance() directly.

    YANG Description: Administrative distance for routes learned from internal
BGP (iBGP).
    """
    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': ['1..255']}), is_leaf=True, yang_name="internal-route-distance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """internal_route_distance 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': ['1..255']}), is_leaf=True, yang_name="internal-route-distance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
        })

    self.__internal_route_distance = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_internal_route_distance(self):
    self.__internal_route_distance = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="internal-route-distance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)

  external_route_distance = __builtin__.property(_get_external_route_distance, _set_external_route_distance)
  internal_route_distance = __builtin__.property(_get_internal_route_distance, _set_internal_route_distance)


  _pyangbind_elements = OrderedDict([('external_route_distance', external_route_distance), ('internal_route_distance', internal_route_distance), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_default_route_distance_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/default-route-distance/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the default route distance
  """
  __slots__ = ('_path_helper', '_extmethods', '__external_route_distance','__internal_route_distance',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__external_route_distance = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="external-route-distance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__internal_route_distance = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="internal-route-distance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'default-route-distance', 'state']

  def _get_external_route_distance(self):
    """
    Getter method for external_route_distance, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/default_route_distance/state/external_route_distance (uint8)

    YANG Description: Administrative distance for routes learned from external
BGP (eBGP).
    """
    return self.__external_route_distance
      
  def _set_external_route_distance(self, v, load=False):
    """
    Setter method for external_route_distance, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/default_route_distance/state/external_route_distance (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_external_route_distance is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_external_route_distance() directly.

    YANG Description: Administrative distance for routes learned from external
BGP (eBGP).
    """
    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': ['1..255']}), is_leaf=True, yang_name="external-route-distance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """external_route_distance 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': ['1..255']}), is_leaf=True, yang_name="external-route-distance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__external_route_distance = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_external_route_distance(self):
    self.__external_route_distance = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="external-route-distance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_internal_route_distance(self):
    """
    Getter method for internal_route_distance, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/default_route_distance/state/internal_route_distance (uint8)

    YANG Description: Administrative distance for routes learned from internal
BGP (iBGP).
    """
    return self.__internal_route_distance
      
  def _set_internal_route_distance(self, v, load=False):
    """
    Setter method for internal_route_distance, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/default_route_distance/state/internal_route_distance (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_internal_route_distance is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_internal_route_distance() directly.

    YANG Description: Administrative distance for routes learned from internal
BGP (iBGP).
    """
    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': ['1..255']}), is_leaf=True, yang_name="internal-route-distance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """internal_route_distance 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': ['1..255']}), is_leaf=True, yang_name="internal-route-distance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__internal_route_distance = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_internal_route_distance(self):
    self.__internal_route_distance = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="internal-route-distance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)

  external_route_distance = __builtin__.property(_get_external_route_distance)
  internal_route_distance = __builtin__.property(_get_internal_route_distance)


  _pyangbind_elements = OrderedDict([('external_route_distance', external_route_distance), ('internal_route_distance', internal_route_distance), ])


class yc_default_route_distance_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_default_route_distance(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/default-route-distance. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Administrative distance (or preference) assigned to
routes received from different sources
(external, internal, and local).
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'default-route-distance'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_default_route_distance_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_default_route_distance_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'default-route-distance']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/default_route_distance/config (container)

    YANG Description: Configuration parameters relating to the default route
distance
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/default_route_distance/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 default route
distance
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_default_route_distance_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_default_route_distance_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_default_route_distance_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/default_route_distance/state (container)

    YANG Description: State information relating to the default route distance
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/default_route_distance/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 relating to the default route distance
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_default_route_distance_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_default_route_distance_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_default_route_distance_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_confederation_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/confederation/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to BGP confederations
  """
  __slots__ = ('_path_helper', '_extmethods', '__identifier','__member_as',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__identifier = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=True)
    self.__member_as = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="member-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'confederation', 'config']

  def _get_identifier(self):
    """
    Getter method for identifier, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/confederation/config/identifier (oc-inet:as-number)

    YANG Description: Confederation identifier for the autonomous system.
Setting the identifier indicates that the local-AS is part
of a BGP confederation.
    """
    return self.__identifier
      
  def _set_identifier(self, v, load=False):
    """
    Setter method for identifier, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/confederation/config/identifier (oc-inet:as-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_identifier is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_identifier() directly.

    YANG Description: Confederation identifier for the autonomous system.
Setting the identifier indicates that the local-AS is part
of a BGP confederation.
    """
    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="identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """identifier must be of a type compatible with oc-inet:as-number""",
          'defined-type': "oc-inet:as-number",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=True)""",
        })

    self.__identifier = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_identifier(self):
    self.__identifier = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=True)


  def _get_member_as(self):
    """
    Getter method for member_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/confederation/config/member_as (oc-inet:as-number)

    YANG Description: Remote autonomous systems that are to be treated
as part of the local confederation.
    """
    return self.__member_as
      
  def _set_member_as(self, v, load=False):
    """
    Setter method for member_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/confederation/config/member_as (oc-inet:as-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_member_as is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_member_as() directly.

    YANG Description: Remote autonomous systems that are to be treated
as part of the local confederation.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="member-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """member_as must be of a type compatible with oc-inet:as-number""",
          'defined-type': "oc-inet:as-number",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="member-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=True)""",
        })

    self.__member_as = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_member_as(self):
    self.__member_as = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="member-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=True)

  identifier = __builtin__.property(_get_identifier, _set_identifier)
  member_as = __builtin__.property(_get_member_as, _set_member_as)


  _pyangbind_elements = OrderedDict([('identifier', identifier), ('member_as', member_as), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_confederation_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/confederation/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the BGP confederations
  """
  __slots__ = ('_path_helper', '_extmethods', '__identifier','__member_as',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__identifier = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)
    self.__member_as = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="member-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'confederation', 'state']

  def _get_identifier(self):
    """
    Getter method for identifier, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/confederation/state/identifier (oc-inet:as-number)

    YANG Description: Confederation identifier for the autonomous system.
Setting the identifier indicates that the local-AS is part
of a BGP confederation.
    """
    return self.__identifier
      
  def _set_identifier(self, v, load=False):
    """
    Setter method for identifier, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/confederation/state/identifier (oc-inet:as-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_identifier is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_identifier() directly.

    YANG Description: Confederation identifier for the autonomous system.
Setting the identifier indicates that the local-AS is part
of a BGP confederation.
    """
    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="identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """identifier must be of a type compatible with oc-inet:as-number""",
          'defined-type': "oc-inet:as-number",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)""",
        })

    self.__identifier = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_identifier(self):
    self.__identifier = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)


  def _get_member_as(self):
    """
    Getter method for member_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/confederation/state/member_as (oc-inet:as-number)

    YANG Description: Remote autonomous systems that are to be treated
as part of the local confederation.
    """
    return self.__member_as
      
  def _set_member_as(self, v, load=False):
    """
    Setter method for member_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/confederation/state/member_as (oc-inet:as-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_member_as is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_member_as() directly.

    YANG Description: Remote autonomous systems that are to be treated
as part of the local confederation.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="member-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """member_as must be of a type compatible with oc-inet:as-number""",
          'defined-type': "oc-inet:as-number",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="member-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)""",
        })

    self.__member_as = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_member_as(self):
    self.__member_as = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="member-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)

  identifier = __builtin__.property(_get_identifier)
  member_as = __builtin__.property(_get_member_as)


  _pyangbind_elements = OrderedDict([('identifier', identifier), ('member_as', member_as), ])


class yc_confederation_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_confederation(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/confederation. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Parameters indicating whether the local system acts as part
of a BGP confederation
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'confederation'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_confederation_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_confederation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'confederation']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/confederation/config (container)

    YANG Description: Configuration parameters relating to BGP confederations
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/confederation/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 BGP confederations
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_confederation_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_confederation_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_confederation_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/confederation/state (container)

    YANG Description: State information relating to the BGP confederations
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/confederation/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 relating to the BGP confederations
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_confederation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_confederation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_confederation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_graceful_restart_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/graceful-restart/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to graceful-restart
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__restart_time','__stale_routes_time','__helper_only',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__restart_time = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..4096']}), is_leaf=True, yang_name="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__stale_routes_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="stale-routes-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__helper_only = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'graceful-restart', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/graceful_restart/config/enabled (boolean)

    YANG Description: Enable or disable the graceful-restart capability.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/graceful_restart/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: Enable or disable the graceful-restart capability.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_restart_time(self):
    """
    Getter method for restart_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/graceful_restart/config/restart_time (uint16)

    YANG Description: Estimated time (in seconds) for the local BGP speaker to
restart a session. This value is advertise in the graceful
restart BGP capability.  This is a 12-bit value, referred to
as Restart Time in RFC4724.  Per RFC4724, the suggested
default value is <= the hold-time value.
    """
    return self.__restart_time
      
  def _set_restart_time(self, v, load=False):
    """
    Setter method for restart_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/graceful_restart/config/restart_time (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_restart_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_restart_time() directly.

    YANG Description: Estimated time (in seconds) for the local BGP speaker to
restart a session. This value is advertise in the graceful
restart BGP capability.  This is a 12-bit value, referred to
as Restart Time in RFC4724.  Per RFC4724, the suggested
default value is <= the hold-time value.
    """
    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': ['0..4096']}), is_leaf=True, yang_name="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """restart_time must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..4096']}), is_leaf=True, yang_name="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__restart_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_restart_time(self):
    self.__restart_time = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..4096']}), is_leaf=True, yang_name="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_stale_routes_time(self):
    """
    Getter method for stale_routes_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/graceful_restart/config/stale_routes_time (uint16)

    YANG Description: An upper-bound on the time thate stale routes will be
retained by a router after a session is restarted. If an
End-of-RIB (EOR) marker is received prior to this timer
expiring stale-routes will be flushed upon its receipt - if
no EOR is received, then when this timer expires stale paths
will be purged. This timer is referred to as the
Selection_Deferral_Timer in RFC4724
    """
    return self.__stale_routes_time
      
  def _set_stale_routes_time(self, v, load=False):
    """
    Setter method for stale_routes_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/graceful_restart/config/stale_routes_time (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_stale_routes_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_stale_routes_time() directly.

    YANG Description: An upper-bound on the time thate stale routes will be
retained by a router after a session is restarted. If an
End-of-RIB (EOR) marker is received prior to this timer
expiring stale-routes will be flushed upon its receipt - if
no EOR is received, then when this timer expires stale paths
will be purged. This timer is referred to as the
Selection_Deferral_Timer in RFC4724
    """
    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="stale-routes-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """stale_routes_time 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="stale-routes-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__stale_routes_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_stale_routes_time(self):
    self.__stale_routes_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="stale-routes-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_helper_only(self):
    """
    Getter method for helper_only, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/graceful_restart/config/helper_only (boolean)

    YANG Description: Enable graceful-restart in helper mode only. When this
leaf is set, the local system does not retain forwarding
its own state during a restart, but supports procedures
for the receiving speaker, as defined in RFC4724.
    """
    return self.__helper_only
      
  def _set_helper_only(self, v, load=False):
    """
    Setter method for helper_only, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/graceful_restart/config/helper_only (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_helper_only is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_helper_only() directly.

    YANG Description: Enable graceful-restart in helper mode only. When this
leaf is set, the local system does not retain forwarding
its own state during a restart, but supports procedures
for the receiving speaker, as defined in RFC4724.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="helper-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """helper_only must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__helper_only = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_helper_only(self):
    self.__helper_only = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)
  restart_time = __builtin__.property(_get_restart_time, _set_restart_time)
  stale_routes_time = __builtin__.property(_get_stale_routes_time, _set_stale_routes_time)
  helper_only = __builtin__.property(_get_helper_only, _set_helper_only)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('restart_time', restart_time), ('stale_routes_time', stale_routes_time), ('helper_only', helper_only), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_graceful_restart_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/graceful-restart/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information associated with graceful-restart
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__restart_time','__stale_routes_time','__helper_only',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__restart_time = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..4096']}), is_leaf=True, yang_name="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__stale_routes_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="stale-routes-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__helper_only = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'graceful-restart', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/graceful_restart/state/enabled (boolean)

    YANG Description: Enable or disable the graceful-restart capability.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/graceful_restart/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: Enable or disable the graceful-restart capability.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_restart_time(self):
    """
    Getter method for restart_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/graceful_restart/state/restart_time (uint16)

    YANG Description: Estimated time (in seconds) for the local BGP speaker to
restart a session. This value is advertise in the graceful
restart BGP capability.  This is a 12-bit value, referred to
as Restart Time in RFC4724.  Per RFC4724, the suggested
default value is <= the hold-time value.
    """
    return self.__restart_time
      
  def _set_restart_time(self, v, load=False):
    """
    Setter method for restart_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/graceful_restart/state/restart_time (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_restart_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_restart_time() directly.

    YANG Description: Estimated time (in seconds) for the local BGP speaker to
restart a session. This value is advertise in the graceful
restart BGP capability.  This is a 12-bit value, referred to
as Restart Time in RFC4724.  Per RFC4724, the suggested
default value is <= the hold-time value.
    """
    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': ['0..4096']}), is_leaf=True, yang_name="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """restart_time must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..4096']}), is_leaf=True, yang_name="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__restart_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_restart_time(self):
    self.__restart_time = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..4096']}), is_leaf=True, yang_name="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_stale_routes_time(self):
    """
    Getter method for stale_routes_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/graceful_restart/state/stale_routes_time (uint16)

    YANG Description: An upper-bound on the time thate stale routes will be
retained by a router after a session is restarted. If an
End-of-RIB (EOR) marker is received prior to this timer
expiring stale-routes will be flushed upon its receipt - if
no EOR is received, then when this timer expires stale paths
will be purged. This timer is referred to as the
Selection_Deferral_Timer in RFC4724
    """
    return self.__stale_routes_time
      
  def _set_stale_routes_time(self, v, load=False):
    """
    Setter method for stale_routes_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/graceful_restart/state/stale_routes_time (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_stale_routes_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_stale_routes_time() directly.

    YANG Description: An upper-bound on the time thate stale routes will be
retained by a router after a session is restarted. If an
End-of-RIB (EOR) marker is received prior to this timer
expiring stale-routes will be flushed upon its receipt - if
no EOR is received, then when this timer expires stale paths
will be purged. This timer is referred to as the
Selection_Deferral_Timer in RFC4724
    """
    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="stale-routes-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """stale_routes_time 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="stale-routes-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__stale_routes_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_stale_routes_time(self):
    self.__stale_routes_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="stale-routes-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_helper_only(self):
    """
    Getter method for helper_only, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/graceful_restart/state/helper_only (boolean)

    YANG Description: Enable graceful-restart in helper mode only. When this
leaf is set, the local system does not retain forwarding
its own state during a restart, but supports procedures
for the receiving speaker, as defined in RFC4724.
    """
    return self.__helper_only
      
  def _set_helper_only(self, v, load=False):
    """
    Setter method for helper_only, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/graceful_restart/state/helper_only (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_helper_only is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_helper_only() directly.

    YANG Description: Enable graceful-restart in helper mode only. When this
leaf is set, the local system does not retain forwarding
its own state during a restart, but supports procedures
for the receiving speaker, as defined in RFC4724.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="helper-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """helper_only must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__helper_only = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_helper_only(self):
    self.__helper_only = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  enabled = __builtin__.property(_get_enabled)
  restart_time = __builtin__.property(_get_restart_time)
  stale_routes_time = __builtin__.property(_get_stale_routes_time)
  helper_only = __builtin__.property(_get_helper_only)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('restart_time', restart_time), ('stale_routes_time', stale_routes_time), ('helper_only', helper_only), ])


class yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_graceful_restart(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/graceful-restart. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Parameters relating the graceful restart mechanism for BGP
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'graceful-restart'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'graceful-restart']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/graceful_restart/config (container)

    YANG Description: Configuration parameters relating to graceful-restart
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/graceful_restart/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 graceful-restart
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/graceful_restart/state (container)

    YANG Description: State information associated with graceful-restart
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/graceful_restart/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 associated with graceful-restart
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/use-multiple-paths/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to multipath
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'use-multiple-paths', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/use_multiple_paths/config/enabled (boolean)

    YANG Description: Whether the use of multiple paths for the same NLRI is
enabled for the neighbor. This value is overridden by
any more specific configuration value.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/use_multiple_paths/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: Whether the use of multiple paths for the same NLRI is
enabled for the neighbor. This value is overridden by
any more specific configuration value.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/use-multiple-paths/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to multipath
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'use-multiple-paths', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/use_multiple_paths/state/enabled (boolean)

    YANG Description: Whether the use of multiple paths for the same NLRI is
enabled for the neighbor. This value is overridden by
any more specific configuration value.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/use_multiple_paths/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: Whether the use of multiple paths for the same NLRI is
enabled for the neighbor. This value is overridden by
any more specific configuration value.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  enabled = __builtin__.property(_get_enabled)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths_ebgp_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/use-multiple-paths/ebgp/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to eBGP multipath
  """
  __slots__ = ('_path_helper', '_extmethods', '__allow_multiple_as','__maximum_paths',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__allow_multiple_as = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__maximum_paths = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'use-multiple-paths', 'ebgp', 'config']

  def _get_allow_multiple_as(self):
    """
    Getter method for allow_multiple_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/use_multiple_paths/ebgp/config/allow_multiple_as (boolean)

    YANG Description: Allow multipath to use paths from different neighbouring
ASes.  The default is to only consider multiple paths from
the same neighbouring AS.
    """
    return self.__allow_multiple_as
      
  def _set_allow_multiple_as(self, v, load=False):
    """
    Setter method for allow_multiple_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/use_multiple_paths/ebgp/config/allow_multiple_as (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_allow_multiple_as is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_allow_multiple_as() directly.

    YANG Description: Allow multipath to use paths from different neighbouring
ASes.  The default is to only consider multiple paths from
the same neighbouring AS.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """allow_multiple_as must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__allow_multiple_as = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_allow_multiple_as(self):
    self.__allow_multiple_as = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_maximum_paths(self):
    """
    Getter method for maximum_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/use_multiple_paths/ebgp/config/maximum_paths (uint32)

    YANG Description: Maximum number of parallel paths to consider when using
BGP multipath. The default is use a single path.
    """
    return self.__maximum_paths
      
  def _set_maximum_paths(self, v, load=False):
    """
    Setter method for maximum_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/use_multiple_paths/ebgp/config/maximum_paths (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_maximum_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_maximum_paths() directly.

    YANG Description: Maximum number of parallel paths to consider when using
BGP multipath. The default is use a single path.
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """maximum_paths 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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__maximum_paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_maximum_paths(self):
    self.__maximum_paths = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)

  allow_multiple_as = __builtin__.property(_get_allow_multiple_as, _set_allow_multiple_as)
  maximum_paths = __builtin__.property(_get_maximum_paths, _set_maximum_paths)


  _pyangbind_elements = OrderedDict([('allow_multiple_as', allow_multiple_as), ('maximum_paths', maximum_paths), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths_ebgp_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/use-multiple-paths/ebgp/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to eBGP multipath
  """
  __slots__ = ('_path_helper', '_extmethods', '__allow_multiple_as','__maximum_paths',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__allow_multiple_as = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__maximum_paths = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'use-multiple-paths', 'ebgp', 'state']

  def _get_allow_multiple_as(self):
    """
    Getter method for allow_multiple_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/use_multiple_paths/ebgp/state/allow_multiple_as (boolean)

    YANG Description: Allow multipath to use paths from different neighbouring
ASes.  The default is to only consider multiple paths from
the same neighbouring AS.
    """
    return self.__allow_multiple_as
      
  def _set_allow_multiple_as(self, v, load=False):
    """
    Setter method for allow_multiple_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/use_multiple_paths/ebgp/state/allow_multiple_as (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_allow_multiple_as is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_allow_multiple_as() directly.

    YANG Description: Allow multipath to use paths from different neighbouring
ASes.  The default is to only consider multiple paths from
the same neighbouring AS.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """allow_multiple_as must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__allow_multiple_as = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_allow_multiple_as(self):
    self.__allow_multiple_as = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_maximum_paths(self):
    """
    Getter method for maximum_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/use_multiple_paths/ebgp/state/maximum_paths (uint32)

    YANG Description: Maximum number of parallel paths to consider when using
BGP multipath. The default is use a single path.
    """
    return self.__maximum_paths
      
  def _set_maximum_paths(self, v, load=False):
    """
    Setter method for maximum_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/use_multiple_paths/ebgp/state/maximum_paths (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_maximum_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_maximum_paths() directly.

    YANG Description: Maximum number of parallel paths to consider when using
BGP multipath. The default is use a single path.
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """maximum_paths 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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__maximum_paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_maximum_paths(self):
    self.__maximum_paths = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  allow_multiple_as = __builtin__.property(_get_allow_multiple_as)
  maximum_paths = __builtin__.property(_get_maximum_paths)


  _pyangbind_elements = OrderedDict([('allow_multiple_as', allow_multiple_as), ('maximum_paths', maximum_paths), ])


class yc_ebgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths_ebgp(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/use-multiple-paths/ebgp. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Multipath parameters for eBGP
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'ebgp'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths_ebgp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths_ebgp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'use-multiple-paths', 'ebgp']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/use_multiple_paths/ebgp/config (container)

    YANG Description: Configuration parameters relating to eBGP multipath
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/use_multiple_paths/ebgp/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 eBGP multipath
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths_ebgp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths_ebgp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths_ebgp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/use_multiple_paths/ebgp/state (container)

    YANG Description: State information relating to eBGP multipath
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/use_multiple_paths/ebgp/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 relating to eBGP multipath
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths_ebgp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths_ebgp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths_ebgp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths_ibgp_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/use-multiple-paths/ibgp/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to iBGP multipath
  """
  __slots__ = ('_path_helper', '_extmethods', '__maximum_paths',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__maximum_paths = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'use-multiple-paths', 'ibgp', 'config']

  def _get_maximum_paths(self):
    """
    Getter method for maximum_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/use_multiple_paths/ibgp/config/maximum_paths (uint32)

    YANG Description: Maximum number of parallel paths to consider when using
iBGP multipath. The default is to use a single path
    """
    return self.__maximum_paths
      
  def _set_maximum_paths(self, v, load=False):
    """
    Setter method for maximum_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/use_multiple_paths/ibgp/config/maximum_paths (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_maximum_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_maximum_paths() directly.

    YANG Description: Maximum number of parallel paths to consider when using
iBGP multipath. The default is to use a single path
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """maximum_paths 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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__maximum_paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_maximum_paths(self):
    self.__maximum_paths = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)

  maximum_paths = __builtin__.property(_get_maximum_paths, _set_maximum_paths)


  _pyangbind_elements = OrderedDict([('maximum_paths', maximum_paths), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths_ibgp_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/use-multiple-paths/ibgp/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to iBGP multipath
  """
  __slots__ = ('_path_helper', '_extmethods', '__maximum_paths',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__maximum_paths = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'use-multiple-paths', 'ibgp', 'state']

  def _get_maximum_paths(self):
    """
    Getter method for maximum_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/use_multiple_paths/ibgp/state/maximum_paths (uint32)

    YANG Description: Maximum number of parallel paths to consider when using
iBGP multipath. The default is to use a single path
    """
    return self.__maximum_paths
      
  def _set_maximum_paths(self, v, load=False):
    """
    Setter method for maximum_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/use_multiple_paths/ibgp/state/maximum_paths (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_maximum_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_maximum_paths() directly.

    YANG Description: Maximum number of parallel paths to consider when using
iBGP multipath. The default is to use a single path
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """maximum_paths 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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__maximum_paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_maximum_paths(self):
    self.__maximum_paths = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  maximum_paths = __builtin__.property(_get_maximum_paths)


  _pyangbind_elements = OrderedDict([('maximum_paths', maximum_paths), ])


class yc_ibgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths_ibgp(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/use-multiple-paths/ibgp. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Multipath parameters for iBGP
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'ibgp'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths_ibgp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths_ibgp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'use-multiple-paths', 'ibgp']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/use_multiple_paths/ibgp/config (container)

    YANG Description: Configuration parameters relating to iBGP multipath
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/use_multiple_paths/ibgp/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 iBGP multipath
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths_ibgp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths_ibgp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths_ibgp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/use_multiple_paths/ibgp/state (container)

    YANG Description: State information relating to iBGP multipath
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/use_multiple_paths/ibgp/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 relating to iBGP multipath
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths_ibgp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths_ibgp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths_ibgp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_use_multiple_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/use-multiple-paths. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Parameters related to the use of multiple paths for the
same NLRI
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__ebgp','__ibgp',)

  _yang_name = 'use-multiple-paths'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__ebgp = YANGDynClass(base=yc_ebgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths_ebgp, is_container='container', yang_name="ebgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__ibgp = YANGDynClass(base=yc_ibgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths_ibgp, is_container='container', yang_name="ibgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'use-multiple-paths']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/use_multiple_paths/config (container)

    YANG Description: Configuration parameters relating to multipath
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/use_multiple_paths/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 multipath
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/use_multiple_paths/state (container)

    YANG Description: State parameters relating to multipath
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/use_multiple_paths/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 parameters relating to multipath
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_ebgp(self):
    """
    Getter method for ebgp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/use_multiple_paths/ebgp (container)

    YANG Description: Multipath parameters for eBGP
    """
    return self.__ebgp
      
  def _set_ebgp(self, v, load=False):
    """
    Setter method for ebgp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/use_multiple_paths/ebgp (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ebgp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ebgp() directly.

    YANG Description: Multipath parameters for eBGP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ebgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths_ebgp, is_container='container', yang_name="ebgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ebgp must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ebgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths_ebgp, is_container='container', yang_name="ebgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__ebgp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ebgp(self):
    self.__ebgp = YANGDynClass(base=yc_ebgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths_ebgp, is_container='container', yang_name="ebgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_ibgp(self):
    """
    Getter method for ibgp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/use_multiple_paths/ibgp (container)

    YANG Description: Multipath parameters for iBGP
    """
    return self.__ibgp
      
  def _set_ibgp(self, v, load=False):
    """
    Setter method for ibgp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/use_multiple_paths/ibgp (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ibgp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ibgp() directly.

    YANG Description: Multipath parameters for iBGP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ibgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths_ibgp, is_container='container', yang_name="ibgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ibgp must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ibgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths_ibgp, is_container='container', yang_name="ibgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__ibgp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ibgp(self):
    self.__ibgp = YANGDynClass(base=yc_ibgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths_ibgp, is_container='container', yang_name="ibgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  ebgp = __builtin__.property(_get_ebgp, _set_ebgp)
  ibgp = __builtin__.property(_get_ibgp, _set_ibgp)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('ebgp', ebgp), ('ibgp', ibgp), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_route_selection_options_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/route-selection-options/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to route selection
options
  """
  __slots__ = ('_path_helper', '_extmethods', '__always_compare_med','__ignore_as_path_length','__external_compare_router_id','__advertise_inactive_routes','__enable_aigp','__ignore_next_hop_igp_metric',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__always_compare_med = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="always-compare-med", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__ignore_as_path_length = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ignore-as-path-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__external_compare_router_id = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="external-compare-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__advertise_inactive_routes = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="advertise-inactive-routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__enable_aigp = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-aigp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__ignore_next_hop_igp_metric = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ignore-next-hop-igp-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'route-selection-options', 'config']

  def _get_always_compare_med(self):
    """
    Getter method for always_compare_med, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/route_selection_options/config/always_compare_med (boolean)

    YANG Description: Compare multi-exit discriminator (MED) value from
different ASes when selecting the best route.  The
default behavior is to only compare MEDs for paths
received from the same AS.
    """
    return self.__always_compare_med
      
  def _set_always_compare_med(self, v, load=False):
    """
    Setter method for always_compare_med, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/route_selection_options/config/always_compare_med (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_always_compare_med is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_always_compare_med() directly.

    YANG Description: Compare multi-exit discriminator (MED) value from
different ASes when selecting the best route.  The
default behavior is to only compare MEDs for paths
received from the same AS.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="always-compare-med", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """always_compare_med must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="always-compare-med", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__always_compare_med = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_always_compare_med(self):
    self.__always_compare_med = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="always-compare-med", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_ignore_as_path_length(self):
    """
    Getter method for ignore_as_path_length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/route_selection_options/config/ignore_as_path_length (boolean)

    YANG Description: Ignore the AS path length when selecting the best path.
The default is to use the AS path length and prefer paths
with shorter length.
    """
    return self.__ignore_as_path_length
      
  def _set_ignore_as_path_length(self, v, load=False):
    """
    Setter method for ignore_as_path_length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/route_selection_options/config/ignore_as_path_length (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ignore_as_path_length is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ignore_as_path_length() directly.

    YANG Description: Ignore the AS path length when selecting the best path.
The default is to use the AS path length and prefer paths
with shorter length.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ignore-as-path-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ignore_as_path_length must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ignore-as-path-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__ignore_as_path_length = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ignore_as_path_length(self):
    self.__ignore_as_path_length = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ignore-as-path-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_external_compare_router_id(self):
    """
    Getter method for external_compare_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/route_selection_options/config/external_compare_router_id (boolean)

    YANG Description: When comparing similar routes received from external
BGP peers, use the router-id as a criterion to select
the active path.
    """
    return self.__external_compare_router_id
      
  def _set_external_compare_router_id(self, v, load=False):
    """
    Setter method for external_compare_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/route_selection_options/config/external_compare_router_id (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_external_compare_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_external_compare_router_id() directly.

    YANG Description: When comparing similar routes received from external
BGP peers, use the router-id as a criterion to select
the active path.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="external-compare-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """external_compare_router_id must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="external-compare-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__external_compare_router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_external_compare_router_id(self):
    self.__external_compare_router_id = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="external-compare-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_advertise_inactive_routes(self):
    """
    Getter method for advertise_inactive_routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/route_selection_options/config/advertise_inactive_routes (boolean)

    YANG Description: Advertise inactive routes to external peers.  The
default is to only advertise active routes.
    """
    return self.__advertise_inactive_routes
      
  def _set_advertise_inactive_routes(self, v, load=False):
    """
    Setter method for advertise_inactive_routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/route_selection_options/config/advertise_inactive_routes (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_advertise_inactive_routes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_advertise_inactive_routes() directly.

    YANG Description: Advertise inactive routes to external peers.  The
default is to only advertise active routes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="advertise-inactive-routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """advertise_inactive_routes must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="advertise-inactive-routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__advertise_inactive_routes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_advertise_inactive_routes(self):
    self.__advertise_inactive_routes = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="advertise-inactive-routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_enable_aigp(self):
    """
    Getter method for enable_aigp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/route_selection_options/config/enable_aigp (boolean)

    YANG Description: Flag to enable sending / receiving accumulated IGP
attribute in routing updates
    """
    return self.__enable_aigp
      
  def _set_enable_aigp(self, v, load=False):
    """
    Setter method for enable_aigp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/route_selection_options/config/enable_aigp (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable_aigp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable_aigp() directly.

    YANG Description: Flag to enable sending / receiving accumulated IGP
attribute in routing updates
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-aigp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable_aigp 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-aigp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enable_aigp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable_aigp(self):
    self.__enable_aigp = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-aigp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_ignore_next_hop_igp_metric(self):
    """
    Getter method for ignore_next_hop_igp_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/route_selection_options/config/ignore_next_hop_igp_metric (boolean)

    YANG Description: Ignore the IGP metric to the next-hop when calculating
BGP best-path. The default is to select the route for
which the metric to the next-hop is lowest
    """
    return self.__ignore_next_hop_igp_metric
      
  def _set_ignore_next_hop_igp_metric(self, v, load=False):
    """
    Setter method for ignore_next_hop_igp_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/route_selection_options/config/ignore_next_hop_igp_metric (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ignore_next_hop_igp_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ignore_next_hop_igp_metric() directly.

    YANG Description: Ignore the IGP metric to the next-hop when calculating
BGP best-path. The default is to select the route for
which the metric to the next-hop is lowest
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ignore-next-hop-igp-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ignore_next_hop_igp_metric must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ignore-next-hop-igp-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__ignore_next_hop_igp_metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ignore_next_hop_igp_metric(self):
    self.__ignore_next_hop_igp_metric = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ignore-next-hop-igp-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  always_compare_med = __builtin__.property(_get_always_compare_med, _set_always_compare_med)
  ignore_as_path_length = __builtin__.property(_get_ignore_as_path_length, _set_ignore_as_path_length)
  external_compare_router_id = __builtin__.property(_get_external_compare_router_id, _set_external_compare_router_id)
  advertise_inactive_routes = __builtin__.property(_get_advertise_inactive_routes, _set_advertise_inactive_routes)
  enable_aigp = __builtin__.property(_get_enable_aigp, _set_enable_aigp)
  ignore_next_hop_igp_metric = __builtin__.property(_get_ignore_next_hop_igp_metric, _set_ignore_next_hop_igp_metric)


  _pyangbind_elements = OrderedDict([('always_compare_med', always_compare_med), ('ignore_as_path_length', ignore_as_path_length), ('external_compare_router_id', external_compare_router_id), ('advertise_inactive_routes', advertise_inactive_routes), ('enable_aigp', enable_aigp), ('ignore_next_hop_igp_metric', ignore_next_hop_igp_metric), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_route_selection_options_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/route-selection-options/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information for the route selection options
  """
  __slots__ = ('_path_helper', '_extmethods', '__always_compare_med','__ignore_as_path_length','__external_compare_router_id','__advertise_inactive_routes','__enable_aigp','__ignore_next_hop_igp_metric',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__always_compare_med = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="always-compare-med", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__ignore_as_path_length = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ignore-as-path-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__external_compare_router_id = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="external-compare-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__advertise_inactive_routes = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="advertise-inactive-routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__enable_aigp = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-aigp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__ignore_next_hop_igp_metric = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ignore-next-hop-igp-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'route-selection-options', 'state']

  def _get_always_compare_med(self):
    """
    Getter method for always_compare_med, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/route_selection_options/state/always_compare_med (boolean)

    YANG Description: Compare multi-exit discriminator (MED) value from
different ASes when selecting the best route.  The
default behavior is to only compare MEDs for paths
received from the same AS.
    """
    return self.__always_compare_med
      
  def _set_always_compare_med(self, v, load=False):
    """
    Setter method for always_compare_med, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/route_selection_options/state/always_compare_med (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_always_compare_med is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_always_compare_med() directly.

    YANG Description: Compare multi-exit discriminator (MED) value from
different ASes when selecting the best route.  The
default behavior is to only compare MEDs for paths
received from the same AS.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="always-compare-med", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """always_compare_med must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="always-compare-med", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__always_compare_med = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_always_compare_med(self):
    self.__always_compare_med = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="always-compare-med", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_ignore_as_path_length(self):
    """
    Getter method for ignore_as_path_length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/route_selection_options/state/ignore_as_path_length (boolean)

    YANG Description: Ignore the AS path length when selecting the best path.
The default is to use the AS path length and prefer paths
with shorter length.
    """
    return self.__ignore_as_path_length
      
  def _set_ignore_as_path_length(self, v, load=False):
    """
    Setter method for ignore_as_path_length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/route_selection_options/state/ignore_as_path_length (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ignore_as_path_length is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ignore_as_path_length() directly.

    YANG Description: Ignore the AS path length when selecting the best path.
The default is to use the AS path length and prefer paths
with shorter length.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ignore-as-path-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ignore_as_path_length must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ignore-as-path-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__ignore_as_path_length = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ignore_as_path_length(self):
    self.__ignore_as_path_length = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ignore-as-path-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_external_compare_router_id(self):
    """
    Getter method for external_compare_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/route_selection_options/state/external_compare_router_id (boolean)

    YANG Description: When comparing similar routes received from external
BGP peers, use the router-id as a criterion to select
the active path.
    """
    return self.__external_compare_router_id
      
  def _set_external_compare_router_id(self, v, load=False):
    """
    Setter method for external_compare_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/route_selection_options/state/external_compare_router_id (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_external_compare_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_external_compare_router_id() directly.

    YANG Description: When comparing similar routes received from external
BGP peers, use the router-id as a criterion to select
the active path.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="external-compare-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """external_compare_router_id must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="external-compare-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__external_compare_router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_external_compare_router_id(self):
    self.__external_compare_router_id = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="external-compare-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_advertise_inactive_routes(self):
    """
    Getter method for advertise_inactive_routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/route_selection_options/state/advertise_inactive_routes (boolean)

    YANG Description: Advertise inactive routes to external peers.  The
default is to only advertise active routes.
    """
    return self.__advertise_inactive_routes
      
  def _set_advertise_inactive_routes(self, v, load=False):
    """
    Setter method for advertise_inactive_routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/route_selection_options/state/advertise_inactive_routes (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_advertise_inactive_routes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_advertise_inactive_routes() directly.

    YANG Description: Advertise inactive routes to external peers.  The
default is to only advertise active routes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="advertise-inactive-routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """advertise_inactive_routes must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="advertise-inactive-routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__advertise_inactive_routes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_advertise_inactive_routes(self):
    self.__advertise_inactive_routes = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="advertise-inactive-routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_enable_aigp(self):
    """
    Getter method for enable_aigp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/route_selection_options/state/enable_aigp (boolean)

    YANG Description: Flag to enable sending / receiving accumulated IGP
attribute in routing updates
    """
    return self.__enable_aigp
      
  def _set_enable_aigp(self, v, load=False):
    """
    Setter method for enable_aigp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/route_selection_options/state/enable_aigp (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable_aigp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable_aigp() directly.

    YANG Description: Flag to enable sending / receiving accumulated IGP
attribute in routing updates
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-aigp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable_aigp 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-aigp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enable_aigp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable_aigp(self):
    self.__enable_aigp = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-aigp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_ignore_next_hop_igp_metric(self):
    """
    Getter method for ignore_next_hop_igp_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/route_selection_options/state/ignore_next_hop_igp_metric (boolean)

    YANG Description: Ignore the IGP metric to the next-hop when calculating
BGP best-path. The default is to select the route for
which the metric to the next-hop is lowest
    """
    return self.__ignore_next_hop_igp_metric
      
  def _set_ignore_next_hop_igp_metric(self, v, load=False):
    """
    Setter method for ignore_next_hop_igp_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/route_selection_options/state/ignore_next_hop_igp_metric (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ignore_next_hop_igp_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ignore_next_hop_igp_metric() directly.

    YANG Description: Ignore the IGP metric to the next-hop when calculating
BGP best-path. The default is to select the route for
which the metric to the next-hop is lowest
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ignore-next-hop-igp-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ignore_next_hop_igp_metric must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ignore-next-hop-igp-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__ignore_next_hop_igp_metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ignore_next_hop_igp_metric(self):
    self.__ignore_next_hop_igp_metric = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ignore-next-hop-igp-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  always_compare_med = __builtin__.property(_get_always_compare_med)
  ignore_as_path_length = __builtin__.property(_get_ignore_as_path_length)
  external_compare_router_id = __builtin__.property(_get_external_compare_router_id)
  advertise_inactive_routes = __builtin__.property(_get_advertise_inactive_routes)
  enable_aigp = __builtin__.property(_get_enable_aigp)
  ignore_next_hop_igp_metric = __builtin__.property(_get_ignore_next_hop_igp_metric)


  _pyangbind_elements = OrderedDict([('always_compare_med', always_compare_med), ('ignore_as_path_length', ignore_as_path_length), ('external_compare_router_id', external_compare_router_id), ('advertise_inactive_routes', advertise_inactive_routes), ('enable_aigp', enable_aigp), ('ignore_next_hop_igp_metric', ignore_next_hop_igp_metric), ])


class yc_route_selection_options_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_route_selection_options(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/route-selection-options. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Parameters relating to options for route selection
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'route-selection-options'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_route_selection_options_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_route_selection_options_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'route-selection-options']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/route_selection_options/config (container)

    YANG Description: Configuration parameters relating to route selection
options
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/route_selection_options/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 route selection
options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_route_selection_options_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_route_selection_options_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_route_selection_options_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/route_selection_options/state (container)

    YANG Description: State information for the route selection options
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/route_selection_options/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 the route selection options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_route_selection_options_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_route_selection_options_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_route_selection_options_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi_safi_name','__enabled',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi_safi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'config']

  def _get_afi_safi_name(self):
    """
    Getter method for afi_safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/config/afi_safi_name (identityref)

    YANG Description: AFI,SAFI
    """
    return self.__afi_safi_name
      
  def _set_afi_safi_name(self, v, load=False):
    """
    Setter method for afi_safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/config/afi_safi_name (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_safi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_safi_name() directly.

    YANG Description: AFI,SAFI
    """
    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_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_safi_name must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__afi_safi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_safi_name(self):
    self.__afi_safi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/config/enabled (boolean)

    YANG Description: This leaf indicates whether the AFI-SAFI is
enabled for the neighbor or group
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: This leaf indicates whether the AFI-SAFI is
enabled for the neighbor or group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  afi_safi_name = __builtin__.property(_get_afi_safi_name, _set_afi_safi_name)
  enabled = __builtin__.property(_get_enabled, _set_enabled)


  _pyangbind_elements = OrderedDict([('afi_safi_name', afi_safi_name), ('enabled', enabled), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi_safi_name','__enabled','__total_paths','__total_prefixes',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi_safi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__total_paths = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="total-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__total_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="total-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'state']

  def _get_afi_safi_name(self):
    """
    Getter method for afi_safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/state/afi_safi_name (identityref)

    YANG Description: AFI,SAFI
    """
    return self.__afi_safi_name
      
  def _set_afi_safi_name(self, v, load=False):
    """
    Setter method for afi_safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/state/afi_safi_name (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_safi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_safi_name() directly.

    YANG Description: AFI,SAFI
    """
    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_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_safi_name must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__afi_safi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_safi_name(self):
    self.__afi_safi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/state/enabled (boolean)

    YANG Description: This leaf indicates whether the AFI-SAFI is
enabled for the neighbor or group
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: This leaf indicates whether the AFI-SAFI is
enabled for the neighbor or group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_total_paths(self):
    """
    Getter method for total_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/state/total_paths (uint32)

    YANG Description: Total number of BGP paths within the context
    """
    return self.__total_paths
      
  def _set_total_paths(self, v, load=False):
    """
    Setter method for total_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/state/total_paths (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_total_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_total_paths() directly.

    YANG Description: Total number of BGP paths within the context
    """
    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="total-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """total_paths 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="total-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__total_paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_total_paths(self):
    self.__total_paths = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="total-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_total_prefixes(self):
    """
    Getter method for total_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/state/total_prefixes (uint32)

    YANG Description: Total number of BGP prefixes received within the context
    """
    return self.__total_prefixes
      
  def _set_total_prefixes(self, v, load=False):
    """
    Setter method for total_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/state/total_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_total_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_total_prefixes() directly.

    YANG Description: Total number of BGP prefixes received within the context
    """
    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="total-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """total_prefixes 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="total-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__total_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_total_prefixes(self):
    self.__total_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="total-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  afi_safi_name = __builtin__.property(_get_afi_safi_name)
  enabled = __builtin__.property(_get_enabled)
  total_paths = __builtin__.property(_get_total_paths)
  total_prefixes = __builtin__.property(_get_total_prefixes)


  _pyangbind_elements = OrderedDict([('afi_safi_name', afi_safi_name), ('enabled', enabled), ('total_paths', total_paths), ('total_prefixes', total_prefixes), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_graceful_restart_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/graceful-restart/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration options for BGP graceful-restart
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'graceful-restart', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/graceful_restart/config/enabled (boolean)

    YANG Description: This leaf indicates whether graceful-restart is enabled for
this AFI-SAFI
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/graceful_restart/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: This leaf indicates whether graceful-restart is enabled for
this AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_graceful_restart_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/graceful-restart/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information for BGP graceful-restart
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'graceful-restart', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/graceful_restart/state/enabled (boolean)

    YANG Description: This leaf indicates whether graceful-restart is enabled for
this AFI-SAFI
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/graceful_restart/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: This leaf indicates whether graceful-restart is enabled for
this AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  enabled = __builtin__.property(_get_enabled)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ])


class yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_graceful_restart(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/graceful-restart. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Parameters relating to BGP graceful-restart
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'graceful-restart'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'graceful-restart']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/graceful_restart/config (container)

    YANG Description: Configuration options for BGP graceful-restart
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/graceful_restart/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 options for BGP graceful-restart
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/graceful_restart/state (container)

    YANG Description: State information for BGP graceful-restart
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/graceful_restart/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 BGP graceful-restart
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_route_selection_options_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/route-selection-options/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to route selection
options
  """
  __slots__ = ('_path_helper', '_extmethods', '__always_compare_med','__ignore_as_path_length','__external_compare_router_id','__advertise_inactive_routes','__enable_aigp','__ignore_next_hop_igp_metric',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__always_compare_med = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="always-compare-med", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__ignore_as_path_length = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ignore-as-path-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__external_compare_router_id = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="external-compare-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__advertise_inactive_routes = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="advertise-inactive-routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__enable_aigp = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-aigp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__ignore_next_hop_igp_metric = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ignore-next-hop-igp-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'route-selection-options', 'config']

  def _get_always_compare_med(self):
    """
    Getter method for always_compare_med, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/route_selection_options/config/always_compare_med (boolean)

    YANG Description: Compare multi-exit discriminator (MED) value from
different ASes when selecting the best route.  The
default behavior is to only compare MEDs for paths
received from the same AS.
    """
    return self.__always_compare_med
      
  def _set_always_compare_med(self, v, load=False):
    """
    Setter method for always_compare_med, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/route_selection_options/config/always_compare_med (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_always_compare_med is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_always_compare_med() directly.

    YANG Description: Compare multi-exit discriminator (MED) value from
different ASes when selecting the best route.  The
default behavior is to only compare MEDs for paths
received from the same AS.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="always-compare-med", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """always_compare_med must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="always-compare-med", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__always_compare_med = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_always_compare_med(self):
    self.__always_compare_med = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="always-compare-med", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_ignore_as_path_length(self):
    """
    Getter method for ignore_as_path_length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/route_selection_options/config/ignore_as_path_length (boolean)

    YANG Description: Ignore the AS path length when selecting the best path.
The default is to use the AS path length and prefer paths
with shorter length.
    """
    return self.__ignore_as_path_length
      
  def _set_ignore_as_path_length(self, v, load=False):
    """
    Setter method for ignore_as_path_length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/route_selection_options/config/ignore_as_path_length (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ignore_as_path_length is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ignore_as_path_length() directly.

    YANG Description: Ignore the AS path length when selecting the best path.
The default is to use the AS path length and prefer paths
with shorter length.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ignore-as-path-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ignore_as_path_length must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ignore-as-path-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__ignore_as_path_length = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ignore_as_path_length(self):
    self.__ignore_as_path_length = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ignore-as-path-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_external_compare_router_id(self):
    """
    Getter method for external_compare_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/route_selection_options/config/external_compare_router_id (boolean)

    YANG Description: When comparing similar routes received from external
BGP peers, use the router-id as a criterion to select
the active path.
    """
    return self.__external_compare_router_id
      
  def _set_external_compare_router_id(self, v, load=False):
    """
    Setter method for external_compare_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/route_selection_options/config/external_compare_router_id (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_external_compare_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_external_compare_router_id() directly.

    YANG Description: When comparing similar routes received from external
BGP peers, use the router-id as a criterion to select
the active path.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="external-compare-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """external_compare_router_id must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="external-compare-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__external_compare_router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_external_compare_router_id(self):
    self.__external_compare_router_id = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="external-compare-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_advertise_inactive_routes(self):
    """
    Getter method for advertise_inactive_routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/route_selection_options/config/advertise_inactive_routes (boolean)

    YANG Description: Advertise inactive routes to external peers.  The
default is to only advertise active routes.
    """
    return self.__advertise_inactive_routes
      
  def _set_advertise_inactive_routes(self, v, load=False):
    """
    Setter method for advertise_inactive_routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/route_selection_options/config/advertise_inactive_routes (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_advertise_inactive_routes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_advertise_inactive_routes() directly.

    YANG Description: Advertise inactive routes to external peers.  The
default is to only advertise active routes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="advertise-inactive-routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """advertise_inactive_routes must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="advertise-inactive-routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__advertise_inactive_routes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_advertise_inactive_routes(self):
    self.__advertise_inactive_routes = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="advertise-inactive-routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_enable_aigp(self):
    """
    Getter method for enable_aigp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/route_selection_options/config/enable_aigp (boolean)

    YANG Description: Flag to enable sending / receiving accumulated IGP
attribute in routing updates
    """
    return self.__enable_aigp
      
  def _set_enable_aigp(self, v, load=False):
    """
    Setter method for enable_aigp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/route_selection_options/config/enable_aigp (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable_aigp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable_aigp() directly.

    YANG Description: Flag to enable sending / receiving accumulated IGP
attribute in routing updates
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-aigp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable_aigp 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-aigp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enable_aigp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable_aigp(self):
    self.__enable_aigp = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-aigp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_ignore_next_hop_igp_metric(self):
    """
    Getter method for ignore_next_hop_igp_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/route_selection_options/config/ignore_next_hop_igp_metric (boolean)

    YANG Description: Ignore the IGP metric to the next-hop when calculating
BGP best-path. The default is to select the route for
which the metric to the next-hop is lowest
    """
    return self.__ignore_next_hop_igp_metric
      
  def _set_ignore_next_hop_igp_metric(self, v, load=False):
    """
    Setter method for ignore_next_hop_igp_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/route_selection_options/config/ignore_next_hop_igp_metric (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ignore_next_hop_igp_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ignore_next_hop_igp_metric() directly.

    YANG Description: Ignore the IGP metric to the next-hop when calculating
BGP best-path. The default is to select the route for
which the metric to the next-hop is lowest
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ignore-next-hop-igp-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ignore_next_hop_igp_metric must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ignore-next-hop-igp-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__ignore_next_hop_igp_metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ignore_next_hop_igp_metric(self):
    self.__ignore_next_hop_igp_metric = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ignore-next-hop-igp-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  always_compare_med = __builtin__.property(_get_always_compare_med, _set_always_compare_med)
  ignore_as_path_length = __builtin__.property(_get_ignore_as_path_length, _set_ignore_as_path_length)
  external_compare_router_id = __builtin__.property(_get_external_compare_router_id, _set_external_compare_router_id)
  advertise_inactive_routes = __builtin__.property(_get_advertise_inactive_routes, _set_advertise_inactive_routes)
  enable_aigp = __builtin__.property(_get_enable_aigp, _set_enable_aigp)
  ignore_next_hop_igp_metric = __builtin__.property(_get_ignore_next_hop_igp_metric, _set_ignore_next_hop_igp_metric)


  _pyangbind_elements = OrderedDict([('always_compare_med', always_compare_med), ('ignore_as_path_length', ignore_as_path_length), ('external_compare_router_id', external_compare_router_id), ('advertise_inactive_routes', advertise_inactive_routes), ('enable_aigp', enable_aigp), ('ignore_next_hop_igp_metric', ignore_next_hop_igp_metric), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_route_selection_options_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/route-selection-options/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information for the route selection options
  """
  __slots__ = ('_path_helper', '_extmethods', '__always_compare_med','__ignore_as_path_length','__external_compare_router_id','__advertise_inactive_routes','__enable_aigp','__ignore_next_hop_igp_metric',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__always_compare_med = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="always-compare-med", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__ignore_as_path_length = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ignore-as-path-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__external_compare_router_id = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="external-compare-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__advertise_inactive_routes = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="advertise-inactive-routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__enable_aigp = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-aigp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__ignore_next_hop_igp_metric = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ignore-next-hop-igp-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'route-selection-options', 'state']

  def _get_always_compare_med(self):
    """
    Getter method for always_compare_med, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/route_selection_options/state/always_compare_med (boolean)

    YANG Description: Compare multi-exit discriminator (MED) value from
different ASes when selecting the best route.  The
default behavior is to only compare MEDs for paths
received from the same AS.
    """
    return self.__always_compare_med
      
  def _set_always_compare_med(self, v, load=False):
    """
    Setter method for always_compare_med, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/route_selection_options/state/always_compare_med (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_always_compare_med is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_always_compare_med() directly.

    YANG Description: Compare multi-exit discriminator (MED) value from
different ASes when selecting the best route.  The
default behavior is to only compare MEDs for paths
received from the same AS.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="always-compare-med", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """always_compare_med must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="always-compare-med", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__always_compare_med = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_always_compare_med(self):
    self.__always_compare_med = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="always-compare-med", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_ignore_as_path_length(self):
    """
    Getter method for ignore_as_path_length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/route_selection_options/state/ignore_as_path_length (boolean)

    YANG Description: Ignore the AS path length when selecting the best path.
The default is to use the AS path length and prefer paths
with shorter length.
    """
    return self.__ignore_as_path_length
      
  def _set_ignore_as_path_length(self, v, load=False):
    """
    Setter method for ignore_as_path_length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/route_selection_options/state/ignore_as_path_length (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ignore_as_path_length is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ignore_as_path_length() directly.

    YANG Description: Ignore the AS path length when selecting the best path.
The default is to use the AS path length and prefer paths
with shorter length.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ignore-as-path-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ignore_as_path_length must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ignore-as-path-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__ignore_as_path_length = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ignore_as_path_length(self):
    self.__ignore_as_path_length = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ignore-as-path-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_external_compare_router_id(self):
    """
    Getter method for external_compare_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/route_selection_options/state/external_compare_router_id (boolean)

    YANG Description: When comparing similar routes received from external
BGP peers, use the router-id as a criterion to select
the active path.
    """
    return self.__external_compare_router_id
      
  def _set_external_compare_router_id(self, v, load=False):
    """
    Setter method for external_compare_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/route_selection_options/state/external_compare_router_id (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_external_compare_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_external_compare_router_id() directly.

    YANG Description: When comparing similar routes received from external
BGP peers, use the router-id as a criterion to select
the active path.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="external-compare-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """external_compare_router_id must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="external-compare-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__external_compare_router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_external_compare_router_id(self):
    self.__external_compare_router_id = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="external-compare-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_advertise_inactive_routes(self):
    """
    Getter method for advertise_inactive_routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/route_selection_options/state/advertise_inactive_routes (boolean)

    YANG Description: Advertise inactive routes to external peers.  The
default is to only advertise active routes.
    """
    return self.__advertise_inactive_routes
      
  def _set_advertise_inactive_routes(self, v, load=False):
    """
    Setter method for advertise_inactive_routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/route_selection_options/state/advertise_inactive_routes (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_advertise_inactive_routes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_advertise_inactive_routes() directly.

    YANG Description: Advertise inactive routes to external peers.  The
default is to only advertise active routes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="advertise-inactive-routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """advertise_inactive_routes must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="advertise-inactive-routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__advertise_inactive_routes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_advertise_inactive_routes(self):
    self.__advertise_inactive_routes = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="advertise-inactive-routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_enable_aigp(self):
    """
    Getter method for enable_aigp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/route_selection_options/state/enable_aigp (boolean)

    YANG Description: Flag to enable sending / receiving accumulated IGP
attribute in routing updates
    """
    return self.__enable_aigp
      
  def _set_enable_aigp(self, v, load=False):
    """
    Setter method for enable_aigp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/route_selection_options/state/enable_aigp (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable_aigp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable_aigp() directly.

    YANG Description: Flag to enable sending / receiving accumulated IGP
attribute in routing updates
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-aigp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable_aigp 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-aigp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enable_aigp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable_aigp(self):
    self.__enable_aigp = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-aigp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_ignore_next_hop_igp_metric(self):
    """
    Getter method for ignore_next_hop_igp_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/route_selection_options/state/ignore_next_hop_igp_metric (boolean)

    YANG Description: Ignore the IGP metric to the next-hop when calculating
BGP best-path. The default is to select the route for
which the metric to the next-hop is lowest
    """
    return self.__ignore_next_hop_igp_metric
      
  def _set_ignore_next_hop_igp_metric(self, v, load=False):
    """
    Setter method for ignore_next_hop_igp_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/route_selection_options/state/ignore_next_hop_igp_metric (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ignore_next_hop_igp_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ignore_next_hop_igp_metric() directly.

    YANG Description: Ignore the IGP metric to the next-hop when calculating
BGP best-path. The default is to select the route for
which the metric to the next-hop is lowest
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ignore-next-hop-igp-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ignore_next_hop_igp_metric must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ignore-next-hop-igp-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__ignore_next_hop_igp_metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ignore_next_hop_igp_metric(self):
    self.__ignore_next_hop_igp_metric = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ignore-next-hop-igp-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  always_compare_med = __builtin__.property(_get_always_compare_med)
  ignore_as_path_length = __builtin__.property(_get_ignore_as_path_length)
  external_compare_router_id = __builtin__.property(_get_external_compare_router_id)
  advertise_inactive_routes = __builtin__.property(_get_advertise_inactive_routes)
  enable_aigp = __builtin__.property(_get_enable_aigp)
  ignore_next_hop_igp_metric = __builtin__.property(_get_ignore_next_hop_igp_metric)


  _pyangbind_elements = OrderedDict([('always_compare_med', always_compare_med), ('ignore_as_path_length', ignore_as_path_length), ('external_compare_router_id', external_compare_router_id), ('advertise_inactive_routes', advertise_inactive_routes), ('enable_aigp', enable_aigp), ('ignore_next_hop_igp_metric', ignore_next_hop_igp_metric), ])


class yc_route_selection_options_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_route_selection_options(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/route-selection-options. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Parameters relating to options for route selection
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'route-selection-options'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_route_selection_options_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_route_selection_options_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'route-selection-options']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/route_selection_options/config (container)

    YANG Description: Configuration parameters relating to route selection
options
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/route_selection_options/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 route selection
options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_route_selection_options_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_route_selection_options_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_route_selection_options_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/route_selection_options/state (container)

    YANG Description: State information for the route selection options
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/route_selection_options/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 the route selection options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_route_selection_options_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_route_selection_options_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_route_selection_options_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/use-multiple-paths/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to multipath
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'use-multiple-paths', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/use_multiple_paths/config/enabled (boolean)

    YANG Description: Whether the use of multiple paths for the same NLRI is
enabled for the neighbor. This value is overridden by
any more specific configuration value.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/use_multiple_paths/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: Whether the use of multiple paths for the same NLRI is
enabled for the neighbor. This value is overridden by
any more specific configuration value.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/use-multiple-paths/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to multipath
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'use-multiple-paths', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/use_multiple_paths/state/enabled (boolean)

    YANG Description: Whether the use of multiple paths for the same NLRI is
enabled for the neighbor. This value is overridden by
any more specific configuration value.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/use_multiple_paths/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: Whether the use of multiple paths for the same NLRI is
enabled for the neighbor. This value is overridden by
any more specific configuration value.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  enabled = __builtin__.property(_get_enabled)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths_ebgp_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/use-multiple-paths/ebgp/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to eBGP multipath
  """
  __slots__ = ('_path_helper', '_extmethods', '__allow_multiple_as','__maximum_paths',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__allow_multiple_as = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__maximum_paths = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'use-multiple-paths', 'ebgp', 'config']

  def _get_allow_multiple_as(self):
    """
    Getter method for allow_multiple_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/use_multiple_paths/ebgp/config/allow_multiple_as (boolean)

    YANG Description: Allow multipath to use paths from different neighbouring
ASes.  The default is to only consider multiple paths from
the same neighbouring AS.
    """
    return self.__allow_multiple_as
      
  def _set_allow_multiple_as(self, v, load=False):
    """
    Setter method for allow_multiple_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/use_multiple_paths/ebgp/config/allow_multiple_as (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_allow_multiple_as is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_allow_multiple_as() directly.

    YANG Description: Allow multipath to use paths from different neighbouring
ASes.  The default is to only consider multiple paths from
the same neighbouring AS.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """allow_multiple_as must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__allow_multiple_as = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_allow_multiple_as(self):
    self.__allow_multiple_as = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_maximum_paths(self):
    """
    Getter method for maximum_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/use_multiple_paths/ebgp/config/maximum_paths (uint32)

    YANG Description: Maximum number of parallel paths to consider when using
BGP multipath. The default is use a single path.
    """
    return self.__maximum_paths
      
  def _set_maximum_paths(self, v, load=False):
    """
    Setter method for maximum_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/use_multiple_paths/ebgp/config/maximum_paths (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_maximum_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_maximum_paths() directly.

    YANG Description: Maximum number of parallel paths to consider when using
BGP multipath. The default is use a single path.
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """maximum_paths 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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__maximum_paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_maximum_paths(self):
    self.__maximum_paths = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)

  allow_multiple_as = __builtin__.property(_get_allow_multiple_as, _set_allow_multiple_as)
  maximum_paths = __builtin__.property(_get_maximum_paths, _set_maximum_paths)


  _pyangbind_elements = OrderedDict([('allow_multiple_as', allow_multiple_as), ('maximum_paths', maximum_paths), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths_ebgp_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/use-multiple-paths/ebgp/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to eBGP multipath
  """
  __slots__ = ('_path_helper', '_extmethods', '__allow_multiple_as','__maximum_paths',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__allow_multiple_as = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__maximum_paths = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'use-multiple-paths', 'ebgp', 'state']

  def _get_allow_multiple_as(self):
    """
    Getter method for allow_multiple_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/use_multiple_paths/ebgp/state/allow_multiple_as (boolean)

    YANG Description: Allow multipath to use paths from different neighbouring
ASes.  The default is to only consider multiple paths from
the same neighbouring AS.
    """
    return self.__allow_multiple_as
      
  def _set_allow_multiple_as(self, v, load=False):
    """
    Setter method for allow_multiple_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/use_multiple_paths/ebgp/state/allow_multiple_as (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_allow_multiple_as is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_allow_multiple_as() directly.

    YANG Description: Allow multipath to use paths from different neighbouring
ASes.  The default is to only consider multiple paths from
the same neighbouring AS.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """allow_multiple_as must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__allow_multiple_as = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_allow_multiple_as(self):
    self.__allow_multiple_as = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_maximum_paths(self):
    """
    Getter method for maximum_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/use_multiple_paths/ebgp/state/maximum_paths (uint32)

    YANG Description: Maximum number of parallel paths to consider when using
BGP multipath. The default is use a single path.
    """
    return self.__maximum_paths
      
  def _set_maximum_paths(self, v, load=False):
    """
    Setter method for maximum_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/use_multiple_paths/ebgp/state/maximum_paths (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_maximum_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_maximum_paths() directly.

    YANG Description: Maximum number of parallel paths to consider when using
BGP multipath. The default is use a single path.
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """maximum_paths 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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__maximum_paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_maximum_paths(self):
    self.__maximum_paths = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  allow_multiple_as = __builtin__.property(_get_allow_multiple_as)
  maximum_paths = __builtin__.property(_get_maximum_paths)


  _pyangbind_elements = OrderedDict([('allow_multiple_as', allow_multiple_as), ('maximum_paths', maximum_paths), ])


class yc_ebgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths_ebgp(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/use-multiple-paths/ebgp. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Multipath parameters for eBGP
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'ebgp'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths_ebgp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths_ebgp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'use-multiple-paths', 'ebgp']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/use_multiple_paths/ebgp/config (container)

    YANG Description: Configuration parameters relating to eBGP multipath
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/use_multiple_paths/ebgp/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 eBGP multipath
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths_ebgp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths_ebgp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths_ebgp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/use_multiple_paths/ebgp/state (container)

    YANG Description: State information relating to eBGP multipath
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/use_multiple_paths/ebgp/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 relating to eBGP multipath
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths_ebgp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths_ebgp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths_ebgp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths_ibgp_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/use-multiple-paths/ibgp/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to iBGP multipath
  """
  __slots__ = ('_path_helper', '_extmethods', '__maximum_paths',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__maximum_paths = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'use-multiple-paths', 'ibgp', 'config']

  def _get_maximum_paths(self):
    """
    Getter method for maximum_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/use_multiple_paths/ibgp/config/maximum_paths (uint32)

    YANG Description: Maximum number of parallel paths to consider when using
iBGP multipath. The default is to use a single path
    """
    return self.__maximum_paths
      
  def _set_maximum_paths(self, v, load=False):
    """
    Setter method for maximum_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/use_multiple_paths/ibgp/config/maximum_paths (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_maximum_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_maximum_paths() directly.

    YANG Description: Maximum number of parallel paths to consider when using
iBGP multipath. The default is to use a single path
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """maximum_paths 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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__maximum_paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_maximum_paths(self):
    self.__maximum_paths = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)

  maximum_paths = __builtin__.property(_get_maximum_paths, _set_maximum_paths)


  _pyangbind_elements = OrderedDict([('maximum_paths', maximum_paths), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths_ibgp_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/use-multiple-paths/ibgp/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to iBGP multipath
  """
  __slots__ = ('_path_helper', '_extmethods', '__maximum_paths',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__maximum_paths = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'use-multiple-paths', 'ibgp', 'state']

  def _get_maximum_paths(self):
    """
    Getter method for maximum_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/use_multiple_paths/ibgp/state/maximum_paths (uint32)

    YANG Description: Maximum number of parallel paths to consider when using
iBGP multipath. The default is to use a single path
    """
    return self.__maximum_paths
      
  def _set_maximum_paths(self, v, load=False):
    """
    Setter method for maximum_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/use_multiple_paths/ibgp/state/maximum_paths (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_maximum_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_maximum_paths() directly.

    YANG Description: Maximum number of parallel paths to consider when using
iBGP multipath. The default is to use a single path
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """maximum_paths 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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__maximum_paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_maximum_paths(self):
    self.__maximum_paths = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  maximum_paths = __builtin__.property(_get_maximum_paths)


  _pyangbind_elements = OrderedDict([('maximum_paths', maximum_paths), ])


class yc_ibgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths_ibgp(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/use-multiple-paths/ibgp. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Multipath parameters for iBGP
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'ibgp'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths_ibgp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths_ibgp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'use-multiple-paths', 'ibgp']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/use_multiple_paths/ibgp/config (container)

    YANG Description: Configuration parameters relating to iBGP multipath
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/use_multiple_paths/ibgp/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 iBGP multipath
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths_ibgp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths_ibgp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths_ibgp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/use_multiple_paths/ibgp/state (container)

    YANG Description: State information relating to iBGP multipath
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/use_multiple_paths/ibgp/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 relating to iBGP multipath
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths_ibgp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths_ibgp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths_ibgp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_use_multiple_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/use-multiple-paths. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Parameters related to the use of multiple paths for the
same NLRI
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__ebgp','__ibgp',)

  _yang_name = 'use-multiple-paths'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__ebgp = YANGDynClass(base=yc_ebgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths_ebgp, is_container='container', yang_name="ebgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__ibgp = YANGDynClass(base=yc_ibgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths_ibgp, is_container='container', yang_name="ibgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'use-multiple-paths']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/use_multiple_paths/config (container)

    YANG Description: Configuration parameters relating to multipath
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/use_multiple_paths/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 multipath
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/use_multiple_paths/state (container)

    YANG Description: State parameters relating to multipath
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/use_multiple_paths/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 parameters relating to multipath
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_ebgp(self):
    """
    Getter method for ebgp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/use_multiple_paths/ebgp (container)

    YANG Description: Multipath parameters for eBGP
    """
    return self.__ebgp
      
  def _set_ebgp(self, v, load=False):
    """
    Setter method for ebgp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/use_multiple_paths/ebgp (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ebgp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ebgp() directly.

    YANG Description: Multipath parameters for eBGP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ebgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths_ebgp, is_container='container', yang_name="ebgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ebgp must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ebgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths_ebgp, is_container='container', yang_name="ebgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__ebgp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ebgp(self):
    self.__ebgp = YANGDynClass(base=yc_ebgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths_ebgp, is_container='container', yang_name="ebgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_ibgp(self):
    """
    Getter method for ibgp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/use_multiple_paths/ibgp (container)

    YANG Description: Multipath parameters for iBGP
    """
    return self.__ibgp
      
  def _set_ibgp(self, v, load=False):
    """
    Setter method for ibgp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/use_multiple_paths/ibgp (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ibgp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ibgp() directly.

    YANG Description: Multipath parameters for iBGP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ibgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths_ibgp, is_container='container', yang_name="ibgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ibgp must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ibgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths_ibgp, is_container='container', yang_name="ibgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__ibgp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ibgp(self):
    self.__ibgp = YANGDynClass(base=yc_ibgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths_ibgp, is_container='container', yang_name="ibgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  ebgp = __builtin__.property(_get_ebgp, _set_ebgp)
  ibgp = __builtin__.property(_get_ibgp, _set_ibgp)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('ebgp', ebgp), ('ibgp', ibgp), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_add_paths_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/add-paths/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to ADD_PATHS
  """
  __slots__ = ('_path_helper', '_extmethods', '__receive','__send','__send_max','__eligible_prefix_policy',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__receive = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="receive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__send = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__send_max = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="send-max", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    self.__eligible_prefix_policy = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="eligible-prefix-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'add-paths', 'config']

  def _get_receive(self):
    """
    Getter method for receive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/add_paths/config/receive (boolean)

    YANG Description: Enable capability negotiation to receive multiple path
advertisements for an NLRI from the neighbor or group
    """
    return self.__receive
      
  def _set_receive(self, v, load=False):
    """
    Setter method for receive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/add_paths/config/receive (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_receive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_receive() directly.

    YANG Description: Enable capability negotiation to receive multiple path
advertisements for an NLRI from the neighbor or group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="receive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """receive must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="receive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__receive = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_receive(self):
    self.__receive = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="receive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_send(self):
    """
    Getter method for send, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/add_paths/config/send (boolean)

    YANG Description: Enable capability negotiation to send multiple path
advertisements for an NLRI from the neighbor or group
    """
    return self.__send
      
  def _set_send(self, v, load=False):
    """
    Setter method for send, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/add_paths/config/send (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_send is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_send() directly.

    YANG Description: Enable capability negotiation to send multiple path
advertisements for an NLRI from the neighbor or group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """send must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__send = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_send(self):
    self.__send = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_send_max(self):
    """
    Getter method for send_max, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/add_paths/config/send_max (uint8)

    YANG Description: The maximum total number of paths to advertise to neighbors
for a single NLRI.  This includes the single best path as
well as additional paths advertised when add-paths is
enabled.
    """
    return self.__send_max
      
  def _set_send_max(self, v, load=False):
    """
    Setter method for send_max, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/add_paths/config/send_max (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_send_max is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_send_max() directly.

    YANG Description: The maximum total number of paths to advertise to neighbors
for a single NLRI.  This includes the single best path as
well as additional paths advertised when add-paths is
enabled.
    """
    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="send-max", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """send_max 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="send-max", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
        })

    self.__send_max = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_send_max(self):
    self.__send_max = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="send-max", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)


  def _get_eligible_prefix_policy(self):
    """
    Getter method for eligible_prefix_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/add_paths/config/eligible_prefix_policy (leafref)

    YANG Description: A reference to a routing policy which can be used to
restrict the prefixes for which add-paths is enabled
    """
    return self.__eligible_prefix_policy
      
  def _set_eligible_prefix_policy(self, v, load=False):
    """
    Setter method for eligible_prefix_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/add_paths/config/eligible_prefix_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_eligible_prefix_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_eligible_prefix_policy() directly.

    YANG Description: A reference to a routing policy which can be used to
restrict the prefixes for which add-paths is enabled
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="eligible-prefix-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """eligible_prefix_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="eligible-prefix-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__eligible_prefix_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_eligible_prefix_policy(self):
    self.__eligible_prefix_policy = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="eligible-prefix-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)

  receive = __builtin__.property(_get_receive, _set_receive)
  send = __builtin__.property(_get_send, _set_send)
  send_max = __builtin__.property(_get_send_max, _set_send_max)
  eligible_prefix_policy = __builtin__.property(_get_eligible_prefix_policy, _set_eligible_prefix_policy)


  _pyangbind_elements = OrderedDict([('receive', receive), ('send', send), ('send_max', send_max), ('eligible_prefix_policy', eligible_prefix_policy), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_add_paths_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/add-paths/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information associated with ADD_PATHS
  """
  __slots__ = ('_path_helper', '_extmethods', '__receive','__send','__send_max','__eligible_prefix_policy',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__receive = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="receive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__send = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__send_max = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="send-max", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__eligible_prefix_policy = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="eligible-prefix-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'add-paths', 'state']

  def _get_receive(self):
    """
    Getter method for receive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/add_paths/state/receive (boolean)

    YANG Description: Enable capability negotiation to receive multiple path
advertisements for an NLRI from the neighbor or group
    """
    return self.__receive
      
  def _set_receive(self, v, load=False):
    """
    Setter method for receive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/add_paths/state/receive (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_receive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_receive() directly.

    YANG Description: Enable capability negotiation to receive multiple path
advertisements for an NLRI from the neighbor or group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="receive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """receive must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="receive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__receive = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_receive(self):
    self.__receive = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="receive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_send(self):
    """
    Getter method for send, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/add_paths/state/send (boolean)

    YANG Description: Enable capability negotiation to send multiple path
advertisements for an NLRI from the neighbor or group
    """
    return self.__send
      
  def _set_send(self, v, load=False):
    """
    Setter method for send, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/add_paths/state/send (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_send is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_send() directly.

    YANG Description: Enable capability negotiation to send multiple path
advertisements for an NLRI from the neighbor or group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """send must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__send = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_send(self):
    self.__send = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_send_max(self):
    """
    Getter method for send_max, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/add_paths/state/send_max (uint8)

    YANG Description: The maximum total number of paths to advertise to neighbors
for a single NLRI.  This includes the single best path as
well as additional paths advertised when add-paths is
enabled.
    """
    return self.__send_max
      
  def _set_send_max(self, v, load=False):
    """
    Setter method for send_max, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/add_paths/state/send_max (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_send_max is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_send_max() directly.

    YANG Description: The maximum total number of paths to advertise to neighbors
for a single NLRI.  This includes the single best path as
well as additional paths advertised when add-paths is
enabled.
    """
    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="send-max", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """send_max 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="send-max", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__send_max = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_send_max(self):
    self.__send_max = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="send-max", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_eligible_prefix_policy(self):
    """
    Getter method for eligible_prefix_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/add_paths/state/eligible_prefix_policy (leafref)

    YANG Description: A reference to a routing policy which can be used to
restrict the prefixes for which add-paths is enabled
    """
    return self.__eligible_prefix_policy
      
  def _set_eligible_prefix_policy(self, v, load=False):
    """
    Setter method for eligible_prefix_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/add_paths/state/eligible_prefix_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_eligible_prefix_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_eligible_prefix_policy() directly.

    YANG Description: A reference to a routing policy which can be used to
restrict the prefixes for which add-paths is enabled
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="eligible-prefix-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """eligible_prefix_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="eligible-prefix-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__eligible_prefix_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_eligible_prefix_policy(self):
    self.__eligible_prefix_policy = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="eligible-prefix-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)

  receive = __builtin__.property(_get_receive)
  send = __builtin__.property(_get_send)
  send_max = __builtin__.property(_get_send_max)
  eligible_prefix_policy = __builtin__.property(_get_eligible_prefix_policy)


  _pyangbind_elements = OrderedDict([('receive', receive), ('send', send), ('send_max', send_max), ('eligible_prefix_policy', eligible_prefix_policy), ])


class yc_add_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_add_paths(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/add-paths. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Parameters relating to the advertisement and receipt of
multiple paths for a single NLRI (add-paths)
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'add-paths'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_add_paths_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_add_paths_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'add-paths']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/add_paths/config (container)

    YANG Description: Configuration parameters relating to ADD_PATHS
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/add_paths/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 ADD_PATHS
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_add_paths_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_add_paths_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_add_paths_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/add_paths/state (container)

    YANG Description: State information associated with ADD_PATHS
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/add_paths/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 associated with ADD_PATHS
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_add_paths_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_add_paths_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_add_paths_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast_prefix_limit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/ipv4-unicast/prefix-limit/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'prefix-limit', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/prefix_limit/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/prefix_limit/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/prefix_limit/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/prefix_limit/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast_prefix_limit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/ipv4-unicast/prefix-limit/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'prefix-limit', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/prefix_limit/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/prefix_limit/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/prefix_limit/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/prefix_limit/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/prefix_limit/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/prefix_limit/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast_prefix_limit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/ipv4-unicast/prefix-limit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'prefix-limit']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/prefix_limit/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/prefix_limit/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/prefix_limit/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/prefix_limit/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/ipv4-unicast/prefix-limit-received/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'prefix-limit-received', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/ipv4-unicast/prefix-limit-received/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'prefix-limit-received', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/ipv4-unicast/prefix-limit-received. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
received from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit-received'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'prefix-limit-received']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/ipv4-unicast/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for IPv4 unicast AFI-SAFI options
  """
  __slots__ = ('_path_helper', '_extmethods', '__send_default_route','__extended_next_hop_encoding',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__send_default_route = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__extended_next_hop_encoding = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="extended-next-hop-encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'config']

  def _get_send_default_route(self):
    """
    Getter method for send_default_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/config/send_default_route (boolean)

    YANG Description: If set to true, send the default-route to the neighbor(s)
    """
    return self.__send_default_route
      
  def _set_send_default_route(self, v, load=False):
    """
    Setter method for send_default_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/config/send_default_route (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_send_default_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_send_default_route() directly.

    YANG Description: If set to true, send the default-route to the neighbor(s)
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """send_default_route must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__send_default_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_send_default_route(self):
    self.__send_default_route = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_extended_next_hop_encoding(self):
    """
    Getter method for extended_next_hop_encoding, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/config/extended_next_hop_encoding (boolean)

    YANG Description: This leaf indicates whether extended next-hop encoding is enabled for
this AFI-SAFI
    """
    return self.__extended_next_hop_encoding
      
  def _set_extended_next_hop_encoding(self, v, load=False):
    """
    Setter method for extended_next_hop_encoding, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/config/extended_next_hop_encoding (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended_next_hop_encoding is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended_next_hop_encoding() directly.

    YANG Description: This leaf indicates whether extended next-hop encoding is enabled for
this AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="extended-next-hop-encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended_next_hop_encoding must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="extended-next-hop-encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__extended_next_hop_encoding = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended_next_hop_encoding(self):
    self.__extended_next_hop_encoding = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="extended-next-hop-encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  send_default_route = __builtin__.property(_get_send_default_route, _set_send_default_route)
  extended_next_hop_encoding = __builtin__.property(_get_extended_next_hop_encoding, _set_extended_next_hop_encoding)


  _pyangbind_elements = OrderedDict([('send_default_route', send_default_route), ('extended_next_hop_encoding', extended_next_hop_encoding), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/ipv4-unicast/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information for IPv4 parameters
  """
  __slots__ = ('_path_helper', '_extmethods', '__send_default_route','__extended_next_hop_encoding',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__send_default_route = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__extended_next_hop_encoding = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="extended-next-hop-encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'state']

  def _get_send_default_route(self):
    """
    Getter method for send_default_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/state/send_default_route (boolean)

    YANG Description: If set to true, send the default-route to the neighbor(s)
    """
    return self.__send_default_route
      
  def _set_send_default_route(self, v, load=False):
    """
    Setter method for send_default_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/state/send_default_route (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_send_default_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_send_default_route() directly.

    YANG Description: If set to true, send the default-route to the neighbor(s)
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """send_default_route must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__send_default_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_send_default_route(self):
    self.__send_default_route = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_extended_next_hop_encoding(self):
    """
    Getter method for extended_next_hop_encoding, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/state/extended_next_hop_encoding (boolean)

    YANG Description: This leaf indicates whether extended next-hop encoding is enabled for
this AFI-SAFI
    """
    return self.__extended_next_hop_encoding
      
  def _set_extended_next_hop_encoding(self, v, load=False):
    """
    Setter method for extended_next_hop_encoding, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/state/extended_next_hop_encoding (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended_next_hop_encoding is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended_next_hop_encoding() directly.

    YANG Description: This leaf indicates whether extended next-hop encoding is enabled for
this AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="extended-next-hop-encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended_next_hop_encoding must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="extended-next-hop-encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__extended_next_hop_encoding = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended_next_hop_encoding(self):
    self.__extended_next_hop_encoding = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="extended-next-hop-encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  send_default_route = __builtin__.property(_get_send_default_route)
  extended_next_hop_encoding = __builtin__.property(_get_extended_next_hop_encoding)


  _pyangbind_elements = OrderedDict([('send_default_route', send_default_route), ('extended_next_hop_encoding', extended_next_hop_encoding), ])


class yc_ipv4_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/ipv4-unicast. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: IPv4 unicast configuration options
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_limit','__prefix_limit_received','__config','__state',)

  _yang_name = 'ipv4-unicast'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'ipv4-unicast']

  def _get_prefix_limit(self):
    """
    Getter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/prefix_limit (container)

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    return self.__prefix_limit
      
  def _set_prefix_limit(self, v, load=False):
    """
    Setter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/prefix_limit (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit() directly.

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit(self):
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_prefix_limit_received(self):
    """
    Getter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received (container)

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    return self.__prefix_limit_received
      
  def _set_prefix_limit_received(self, v, load=False):
    """
    Setter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_received() directly.

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_received must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit_received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_received(self):
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/config (container)

    YANG Description: Configuration parameters for IPv4 unicast AFI-SAFI options
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/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 IPv4 unicast AFI-SAFI options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/state (container)

    YANG Description: State information for IPv4 parameters
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast/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 parameters
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  prefix_limit = __builtin__.property(_get_prefix_limit, _set_prefix_limit)
  prefix_limit_received = __builtin__.property(_get_prefix_limit_received, _set_prefix_limit_received)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('prefix_limit', prefix_limit), ('prefix_limit_received', prefix_limit_received), ('config', config), ('state', state), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast_prefix_limit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/ipv6-unicast/prefix-limit/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'prefix-limit', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/prefix_limit/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/prefix_limit/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/prefix_limit/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/prefix_limit/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast_prefix_limit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/ipv6-unicast/prefix-limit/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'prefix-limit', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/prefix_limit/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/prefix_limit/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/prefix_limit/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/prefix_limit/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/prefix_limit/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/prefix_limit/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast_prefix_limit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/ipv6-unicast/prefix-limit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'prefix-limit']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/prefix_limit/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/prefix_limit/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/prefix_limit/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/prefix_limit/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/ipv6-unicast/prefix-limit-received/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'prefix-limit-received', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/ipv6-unicast/prefix-limit-received/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'prefix-limit-received', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/ipv6-unicast/prefix-limit-received. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
received from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit-received'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'prefix-limit-received']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/ipv6-unicast/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for IPv6 unicast AFI-SAFI options
  """
  __slots__ = ('_path_helper', '_extmethods', '__send_default_route',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__send_default_route = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'config']

  def _get_send_default_route(self):
    """
    Getter method for send_default_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/config/send_default_route (boolean)

    YANG Description: If set to true, send the default-route to the neighbor(s)
    """
    return self.__send_default_route
      
  def _set_send_default_route(self, v, load=False):
    """
    Setter method for send_default_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/config/send_default_route (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_send_default_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_send_default_route() directly.

    YANG Description: If set to true, send the default-route to the neighbor(s)
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """send_default_route must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__send_default_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_send_default_route(self):
    self.__send_default_route = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  send_default_route = __builtin__.property(_get_send_default_route, _set_send_default_route)


  _pyangbind_elements = OrderedDict([('send_default_route', send_default_route), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/ipv6-unicast/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information for IPv6 unicast parameters
  """
  __slots__ = ('_path_helper', '_extmethods', '__send_default_route',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__send_default_route = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'state']

  def _get_send_default_route(self):
    """
    Getter method for send_default_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/state/send_default_route (boolean)

    YANG Description: If set to true, send the default-route to the neighbor(s)
    """
    return self.__send_default_route
      
  def _set_send_default_route(self, v, load=False):
    """
    Setter method for send_default_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/state/send_default_route (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_send_default_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_send_default_route() directly.

    YANG Description: If set to true, send the default-route to the neighbor(s)
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """send_default_route must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__send_default_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_send_default_route(self):
    self.__send_default_route = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  send_default_route = __builtin__.property(_get_send_default_route)


  _pyangbind_elements = OrderedDict([('send_default_route', send_default_route), ])


class yc_ipv6_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/ipv6-unicast. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: IPv6 unicast configuration options
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_limit','__prefix_limit_received','__config','__state',)

  _yang_name = 'ipv6-unicast'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'ipv6-unicast']

  def _get_prefix_limit(self):
    """
    Getter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/prefix_limit (container)

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    return self.__prefix_limit
      
  def _set_prefix_limit(self, v, load=False):
    """
    Setter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/prefix_limit (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit() directly.

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit(self):
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_prefix_limit_received(self):
    """
    Getter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received (container)

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    return self.__prefix_limit_received
      
  def _set_prefix_limit_received(self, v, load=False):
    """
    Setter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_received() directly.

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_received must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit_received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_received(self):
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/config (container)

    YANG Description: Configuration parameters for IPv6 unicast AFI-SAFI options
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/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 IPv6 unicast AFI-SAFI options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/state (container)

    YANG Description: State information for IPv6 unicast parameters
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast/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 IPv6 unicast parameters
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  prefix_limit = __builtin__.property(_get_prefix_limit, _set_prefix_limit)
  prefix_limit_received = __builtin__.property(_get_prefix_limit_received, _set_prefix_limit_received)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('prefix_limit', prefix_limit), ('prefix_limit_received', prefix_limit_received), ('config', config), ('state', state), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'ipv4-labeled-unicast', 'prefix-limit', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'ipv4-labeled-unicast', 'prefix-limit', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'ipv4-labeled-unicast', 'prefix-limit']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit-received/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'ipv4-labeled-unicast', 'prefix-limit-received', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit-received/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'ipv4-labeled-unicast', 'prefix-limit-received', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit-received. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
received from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit-received'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'ipv4-labeled-unicast', 'prefix-limit-received']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_labeled_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/ipv4-labeled-unicast. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: IPv4 Labeled Unicast configuration options
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_limit','__prefix_limit_received',)

  _yang_name = 'ipv4-labeled-unicast'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'ipv4-labeled-unicast']

  def _get_prefix_limit(self):
    """
    Getter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit (container)

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    return self.__prefix_limit
      
  def _set_prefix_limit(self, v, load=False):
    """
    Setter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit() directly.

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit(self):
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_prefix_limit_received(self):
    """
    Getter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received (container)

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    return self.__prefix_limit_received
      
  def _set_prefix_limit_received(self, v, load=False):
    """
    Setter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_received() directly.

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_received must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit_received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_received(self):
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  prefix_limit = __builtin__.property(_get_prefix_limit, _set_prefix_limit)
  prefix_limit_received = __builtin__.property(_get_prefix_limit_received, _set_prefix_limit_received)


  _pyangbind_elements = OrderedDict([('prefix_limit', prefix_limit), ('prefix_limit_received', prefix_limit_received), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'ipv6-labeled-unicast', 'prefix-limit', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'ipv6-labeled-unicast', 'prefix-limit', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'ipv6-labeled-unicast', 'prefix-limit']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit-received/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'ipv6-labeled-unicast', 'prefix-limit-received', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit-received/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'ipv6-labeled-unicast', 'prefix-limit-received', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit-received. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
received from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit-received'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'ipv6-labeled-unicast', 'prefix-limit-received']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_labeled_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/ipv6-labeled-unicast. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: IPv6 Labeled Unicast configuration options
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_limit','__prefix_limit_received',)

  _yang_name = 'ipv6-labeled-unicast'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'ipv6-labeled-unicast']

  def _get_prefix_limit(self):
    """
    Getter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit (container)

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    return self.__prefix_limit
      
  def _set_prefix_limit(self, v, load=False):
    """
    Setter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit() directly.

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit(self):
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_prefix_limit_received(self):
    """
    Getter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received (container)

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    return self.__prefix_limit_received
      
  def _set_prefix_limit_received(self, v, load=False):
    """
    Setter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_received() directly.

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_received must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit_received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_received(self):
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  prefix_limit = __builtin__.property(_get_prefix_limit, _set_prefix_limit)
  prefix_limit_received = __builtin__.property(_get_prefix_limit_received, _set_prefix_limit_received)


  _pyangbind_elements = OrderedDict([('prefix_limit', prefix_limit), ('prefix_limit_received', prefix_limit_received), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-unicast', 'prefix-limit', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-unicast', 'prefix-limit', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-unicast', 'prefix-limit']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit-received/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-unicast', 'prefix-limit-received', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit-received/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-unicast', 'prefix-limit-received', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit-received. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
received from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit-received'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-unicast', 'prefix-limit-received']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_l3vpn_ipv4_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l3vpn-ipv4-unicast. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Unicast IPv4 L3VPN configuration options
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_limit','__prefix_limit_received',)

  _yang_name = 'l3vpn-ipv4-unicast'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-unicast']

  def _get_prefix_limit(self):
    """
    Getter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit (container)

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    return self.__prefix_limit
      
  def _set_prefix_limit(self, v, load=False):
    """
    Setter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit() directly.

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit(self):
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_prefix_limit_received(self):
    """
    Getter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received (container)

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    return self.__prefix_limit_received
      
  def _set_prefix_limit_received(self, v, load=False):
    """
    Setter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_received() directly.

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_received must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit_received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_received(self):
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  prefix_limit = __builtin__.property(_get_prefix_limit, _set_prefix_limit)
  prefix_limit_received = __builtin__.property(_get_prefix_limit_received, _set_prefix_limit_received)


  _pyangbind_elements = OrderedDict([('prefix_limit', prefix_limit), ('prefix_limit_received', prefix_limit_received), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-unicast', 'prefix-limit', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-unicast', 'prefix-limit', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-unicast', 'prefix-limit']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit-received/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-unicast', 'prefix-limit-received', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit-received/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-unicast', 'prefix-limit-received', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit-received. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
received from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit-received'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-unicast', 'prefix-limit-received']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_l3vpn_ipv6_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l3vpn-ipv6-unicast. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Unicast IPv6 L3VPN configuration options
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_limit','__prefix_limit_received',)

  _yang_name = 'l3vpn-ipv6-unicast'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-unicast']

  def _get_prefix_limit(self):
    """
    Getter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit (container)

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    return self.__prefix_limit
      
  def _set_prefix_limit(self, v, load=False):
    """
    Setter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit() directly.

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit(self):
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_prefix_limit_received(self):
    """
    Getter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received (container)

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    return self.__prefix_limit_received
      
  def _set_prefix_limit_received(self, v, load=False):
    """
    Setter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_received() directly.

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_received must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit_received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_received(self):
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  prefix_limit = __builtin__.property(_get_prefix_limit, _set_prefix_limit)
  prefix_limit_received = __builtin__.property(_get_prefix_limit_received, _set_prefix_limit_received)


  _pyangbind_elements = OrderedDict([('prefix_limit', prefix_limit), ('prefix_limit_received', prefix_limit_received), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l3vpn-ipv4-multicast/prefix-limit/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-multicast', 'prefix-limit', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l3vpn-ipv4-multicast/prefix-limit/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-multicast', 'prefix-limit', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l3vpn-ipv4-multicast/prefix-limit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-multicast', 'prefix-limit']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l3vpn-ipv4-multicast/prefix-limit-received/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-multicast', 'prefix-limit-received', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l3vpn-ipv4-multicast/prefix-limit-received/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-multicast', 'prefix-limit-received', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l3vpn-ipv4-multicast/prefix-limit-received. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
received from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit-received'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-multicast', 'prefix-limit-received']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_l3vpn_ipv4_multicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_multicast(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l3vpn-ipv4-multicast. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Multicast IPv4 L3VPN configuration options
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_limit','__prefix_limit_received',)

  _yang_name = 'l3vpn-ipv4-multicast'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-multicast']

  def _get_prefix_limit(self):
    """
    Getter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit (container)

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    return self.__prefix_limit
      
  def _set_prefix_limit(self, v, load=False):
    """
    Setter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit() directly.

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit(self):
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_prefix_limit_received(self):
    """
    Getter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received (container)

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    return self.__prefix_limit_received
      
  def _set_prefix_limit_received(self, v, load=False):
    """
    Setter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_received() directly.

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_received must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit_received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_received(self):
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  prefix_limit = __builtin__.property(_get_prefix_limit, _set_prefix_limit)
  prefix_limit_received = __builtin__.property(_get_prefix_limit_received, _set_prefix_limit_received)


  _pyangbind_elements = OrderedDict([('prefix_limit', prefix_limit), ('prefix_limit_received', prefix_limit_received), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l3vpn-ipv6-multicast/prefix-limit/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-multicast', 'prefix-limit', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l3vpn-ipv6-multicast/prefix-limit/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-multicast', 'prefix-limit', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l3vpn-ipv6-multicast/prefix-limit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-multicast', 'prefix-limit']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l3vpn-ipv6-multicast/prefix-limit-received/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-multicast', 'prefix-limit-received', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l3vpn-ipv6-multicast/prefix-limit-received/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-multicast', 'prefix-limit-received', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l3vpn-ipv6-multicast/prefix-limit-received. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
received from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit-received'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-multicast', 'prefix-limit-received']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_l3vpn_ipv6_multicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_multicast(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l3vpn-ipv6-multicast. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Multicast IPv6 L3VPN configuration options
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_limit','__prefix_limit_received',)

  _yang_name = 'l3vpn-ipv6-multicast'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-multicast']

  def _get_prefix_limit(self):
    """
    Getter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit (container)

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    return self.__prefix_limit
      
  def _set_prefix_limit(self, v, load=False):
    """
    Setter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit() directly.

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit(self):
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_prefix_limit_received(self):
    """
    Getter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received (container)

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    return self.__prefix_limit_received
      
  def _set_prefix_limit_received(self, v, load=False):
    """
    Setter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_received() directly.

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_received must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit_received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_received(self):
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  prefix_limit = __builtin__.property(_get_prefix_limit, _set_prefix_limit)
  prefix_limit_received = __builtin__.property(_get_prefix_limit_received, _set_prefix_limit_received)


  _pyangbind_elements = OrderedDict([('prefix_limit', prefix_limit), ('prefix_limit_received', prefix_limit_received), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l2vpn-vpls/prefix-limit/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l2vpn-vpls', 'prefix-limit', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l2vpn-vpls/prefix-limit/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l2vpn-vpls', 'prefix-limit', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_vpls_prefix_limit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l2vpn-vpls/prefix-limit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l2vpn-vpls', 'prefix-limit']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l2vpn-vpls/prefix-limit-received/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l2vpn-vpls', 'prefix-limit-received', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l2vpn-vpls/prefix-limit-received/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l2vpn-vpls', 'prefix-limit-received', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l2vpn-vpls/prefix-limit-received. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
received from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit-received'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l2vpn-vpls', 'prefix-limit-received']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_l2vpn_vpls_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_vpls(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l2vpn-vpls. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: BGP-signalled VPLS configuration options
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_limit','__prefix_limit_received',)

  _yang_name = 'l2vpn-vpls'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_vpls_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l2vpn-vpls']

  def _get_prefix_limit(self):
    """
    Getter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls/prefix_limit (container)

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    return self.__prefix_limit
      
  def _set_prefix_limit(self, v, load=False):
    """
    Setter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls/prefix_limit (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit() directly.

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_vpls_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_vpls_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit(self):
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_vpls_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_prefix_limit_received(self):
    """
    Getter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received (container)

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    return self.__prefix_limit_received
      
  def _set_prefix_limit_received(self, v, load=False):
    """
    Setter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_received() directly.

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_received must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit_received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_received(self):
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  prefix_limit = __builtin__.property(_get_prefix_limit, _set_prefix_limit)
  prefix_limit_received = __builtin__.property(_get_prefix_limit_received, _set_prefix_limit_received)


  _pyangbind_elements = OrderedDict([('prefix_limit', prefix_limit), ('prefix_limit_received', prefix_limit_received), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l2vpn-evpn/prefix-limit/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'prefix-limit', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l2vpn-evpn/prefix-limit/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'prefix-limit', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_evpn_prefix_limit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l2vpn-evpn/prefix-limit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'prefix-limit']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l2vpn-evpn/prefix-limit-received/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'prefix-limit-received', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l2vpn-evpn/prefix-limit-received/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'prefix-limit-received', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l2vpn-evpn/prefix-limit-received. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
received from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit-received'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'prefix-limit-received']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_l2vpn_evpn_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_evpn(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/l2vpn-evpn. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: BGP EVPN configuration options
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_limit','__prefix_limit_received',)

  _yang_name = 'l2vpn-evpn'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_evpn_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'l2vpn-evpn']

  def _get_prefix_limit(self):
    """
    Getter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn/prefix_limit (container)

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    return self.__prefix_limit
      
  def _set_prefix_limit(self, v, load=False):
    """
    Setter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn/prefix_limit (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit() directly.

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_evpn_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_evpn_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit(self):
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_evpn_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_prefix_limit_received(self):
    """
    Getter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received (container)

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    return self.__prefix_limit_received
      
  def _set_prefix_limit_received(self, v, load=False):
    """
    Setter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_received() directly.

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_received must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit_received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_received(self):
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  prefix_limit = __builtin__.property(_get_prefix_limit, _set_prefix_limit)
  prefix_limit_received = __builtin__.property(_get_prefix_limit_received, _set_prefix_limit_received)


  _pyangbind_elements = OrderedDict([('prefix_limit', prefix_limit), ('prefix_limit_received', prefix_limit_received), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/srte-policy-ipv4/prefix-limit/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'srte-policy-ipv4', 'prefix-limit', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/srte-policy-ipv4/prefix-limit/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'srte-policy-ipv4', 'prefix-limit', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/srte-policy-ipv4/prefix-limit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'srte-policy-ipv4', 'prefix-limit']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/srte-policy-ipv4/prefix-limit-received/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'srte-policy-ipv4', 'prefix-limit-received', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/srte-policy-ipv4/prefix-limit-received/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'srte-policy-ipv4', 'prefix-limit-received', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/srte-policy-ipv4/prefix-limit-received. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
received from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit-received'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'srte-policy-ipv4', 'prefix-limit-received']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_srte_policy_ipv4_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv4(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/srte-policy-ipv4. 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
the SR-TE Policy SAFI for IPv4 Unicast.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_limit','__prefix_limit_received',)

  _yang_name = 'srte-policy-ipv4'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'srte-policy-ipv4']

  def _get_prefix_limit(self):
    """
    Getter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit (container)

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    return self.__prefix_limit
      
  def _set_prefix_limit(self, v, load=False):
    """
    Setter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit() directly.

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit(self):
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_prefix_limit_received(self):
    """
    Getter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received (container)

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    return self.__prefix_limit_received
      
  def _set_prefix_limit_received(self, v, load=False):
    """
    Setter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_received() directly.

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_received must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit_received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_received(self):
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  prefix_limit = __builtin__.property(_get_prefix_limit, _set_prefix_limit)
  prefix_limit_received = __builtin__.property(_get_prefix_limit_received, _set_prefix_limit_received)


  _pyangbind_elements = OrderedDict([('prefix_limit', prefix_limit), ('prefix_limit_received', prefix_limit_received), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/srte-policy-ipv6/prefix-limit/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'srte-policy-ipv6', 'prefix-limit', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/srte-policy-ipv6/prefix-limit/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'srte-policy-ipv6', 'prefix-limit', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/srte-policy-ipv6/prefix-limit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'srte-policy-ipv6', 'prefix-limit']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/srte-policy-ipv6/prefix-limit-received/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'srte-policy-ipv6', 'prefix-limit-received', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/srte-policy-ipv6/prefix-limit-received/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'srte-policy-ipv6', 'prefix-limit-received', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/srte-policy-ipv6/prefix-limit-received. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
received from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit-received'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'srte-policy-ipv6', 'prefix-limit-received']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_srte_policy_ipv6_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv6(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/srte-policy-ipv6. 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
the SR-TE Policy SAFI for IPv6 Unicast.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_limit','__prefix_limit_received',)

  _yang_name = 'srte-policy-ipv6'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi', 'srte-policy-ipv6']

  def _get_prefix_limit(self):
    """
    Getter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit (container)

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    return self.__prefix_limit
      
  def _set_prefix_limit(self, v, load=False):
    """
    Setter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit() directly.

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit(self):
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_prefix_limit_received(self):
    """
    Getter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received (container)

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    return self.__prefix_limit_received
      
  def _set_prefix_limit_received(self, v, load=False):
    """
    Setter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_received() directly.

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_received must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit_received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_received(self):
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  prefix_limit = __builtin__.property(_get_prefix_limit, _set_prefix_limit)
  prefix_limit_received = __builtin__.property(_get_prefix_limit_received, _set_prefix_limit_received)


  _pyangbind_elements = OrderedDict([('prefix_limit', prefix_limit), ('prefix_limit_received', prefix_limit_received), ])


class yc_afi_safi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: AFI,SAFI configuration available for the
neighbour or group
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi_safi_name','__config','__state','__graceful_restart','__route_selection_options','__use_multiple_paths','__add_paths','__ipv4_unicast','__ipv6_unicast','__ipv4_labeled_unicast','__ipv6_labeled_unicast','__l3vpn_ipv4_unicast','__l3vpn_ipv6_unicast','__l3vpn_ipv4_multicast','__l3vpn_ipv6_multicast','__l2vpn_vpls','__l2vpn_evpn','__srte_policy_ipv4','__srte_policy_ipv6',)

  _yang_name = 'afi-safi'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi_safi_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__graceful_restart = YANGDynClass(base=yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__route_selection_options = YANGDynClass(base=yc_route_selection_options_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_route_selection_options, is_container='container', yang_name="route-selection-options", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__use_multiple_paths = YANGDynClass(base=yc_use_multiple_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths, is_container='container', yang_name="use-multiple-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__add_paths = YANGDynClass(base=yc_add_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_add_paths, is_container='container', yang_name="add-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__ipv4_unicast = YANGDynClass(base=yc_ipv4_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast, is_container='container', yang_name="ipv4-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__ipv6_unicast = YANGDynClass(base=yc_ipv6_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast, is_container='container', yang_name="ipv6-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__ipv4_labeled_unicast = YANGDynClass(base=yc_ipv4_labeled_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast, is_container='container', yang_name="ipv4-labeled-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__ipv6_labeled_unicast = YANGDynClass(base=yc_ipv6_labeled_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast, is_container='container', yang_name="ipv6-labeled-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__l3vpn_ipv4_unicast = YANGDynClass(base=yc_l3vpn_ipv4_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast, is_container='container', yang_name="l3vpn-ipv4-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__l3vpn_ipv6_unicast = YANGDynClass(base=yc_l3vpn_ipv6_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast, is_container='container', yang_name="l3vpn-ipv6-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__l3vpn_ipv4_multicast = YANGDynClass(base=yc_l3vpn_ipv4_multicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_multicast, is_container='container', yang_name="l3vpn-ipv4-multicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__l3vpn_ipv6_multicast = YANGDynClass(base=yc_l3vpn_ipv6_multicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_multicast, is_container='container', yang_name="l3vpn-ipv6-multicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__l2vpn_vpls = YANGDynClass(base=yc_l2vpn_vpls_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_vpls, is_container='container', yang_name="l2vpn-vpls", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__l2vpn_evpn = YANGDynClass(base=yc_l2vpn_evpn_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_evpn, is_container='container', yang_name="l2vpn-evpn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__srte_policy_ipv4 = YANGDynClass(base=yc_srte_policy_ipv4_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv4, is_container='container', yang_name="srte-policy-ipv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__srte_policy_ipv6 = YANGDynClass(base=yc_srte_policy_ipv6_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv6, is_container='container', yang_name="srte-policy-ipv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis', 'afi-safi']

  def _get_afi_safi_name(self):
    """
    Getter method for afi_safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/afi_safi_name (leafref)

    YANG Description: Reference to the AFI-SAFI name used as a key
for the AFI-SAFI list
    """
    return self.__afi_safi_name
      
  def _set_afi_safi_name(self, v, load=False):
    """
    Setter method for afi_safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/afi_safi_name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_safi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_safi_name() directly.

    YANG Description: Reference to the AFI-SAFI name used as a key
for the AFI-SAFI list
    """
    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="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_safi_name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__afi_safi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_safi_name(self):
    self.__afi_safi_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/config (container)

    YANG Description: Configuration parameters for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/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 AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/state (container)

    YANG Description: State information relating to the AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/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 relating to the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_graceful_restart(self):
    """
    Getter method for graceful_restart, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/graceful_restart (container)

    YANG Description: Parameters relating to BGP graceful-restart
    """
    return self.__graceful_restart
      
  def _set_graceful_restart(self, v, load=False):
    """
    Setter method for graceful_restart, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/graceful_restart (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_graceful_restart is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_graceful_restart() directly.

    YANG Description: Parameters relating to BGP graceful-restart
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """graceful_restart must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__graceful_restart = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_graceful_restart(self):
    self.__graceful_restart = YANGDynClass(base=yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_route_selection_options(self):
    """
    Getter method for route_selection_options, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/route_selection_options (container)

    YANG Description: Parameters relating to options for route selection
    """
    return self.__route_selection_options
      
  def _set_route_selection_options(self, v, load=False):
    """
    Setter method for route_selection_options, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/route_selection_options (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route_selection_options is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route_selection_options() directly.

    YANG Description: Parameters relating to options for route selection
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_route_selection_options_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_route_selection_options, is_container='container', yang_name="route-selection-options", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route_selection_options must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_route_selection_options_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_route_selection_options, is_container='container', yang_name="route-selection-options", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__route_selection_options = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route_selection_options(self):
    self.__route_selection_options = YANGDynClass(base=yc_route_selection_options_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_route_selection_options, is_container='container', yang_name="route-selection-options", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_use_multiple_paths(self):
    """
    Getter method for use_multiple_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/use_multiple_paths (container)

    YANG Description: Parameters related to the use of multiple paths for the
same NLRI
    """
    return self.__use_multiple_paths
      
  def _set_use_multiple_paths(self, v, load=False):
    """
    Setter method for use_multiple_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/use_multiple_paths (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_use_multiple_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_use_multiple_paths() directly.

    YANG Description: Parameters related to the use of multiple paths for the
same NLRI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_use_multiple_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths, is_container='container', yang_name="use-multiple-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """use_multiple_paths must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_use_multiple_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths, is_container='container', yang_name="use-multiple-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__use_multiple_paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_use_multiple_paths(self):
    self.__use_multiple_paths = YANGDynClass(base=yc_use_multiple_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_use_multiple_paths, is_container='container', yang_name="use-multiple-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_add_paths(self):
    """
    Getter method for add_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/add_paths (container)

    YANG Description: Parameters relating to the advertisement and receipt of
multiple paths for a single NLRI (add-paths)
    """
    return self.__add_paths
      
  def _set_add_paths(self, v, load=False):
    """
    Setter method for add_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/add_paths (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_add_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_add_paths() directly.

    YANG Description: Parameters relating to the advertisement and receipt of
multiple paths for a single NLRI (add-paths)
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_add_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_add_paths, is_container='container', yang_name="add-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """add_paths must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_add_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_add_paths, is_container='container', yang_name="add-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__add_paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_add_paths(self):
    self.__add_paths = YANGDynClass(base=yc_add_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_add_paths, is_container='container', yang_name="add-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_ipv4_unicast(self):
    """
    Getter method for ipv4_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast (container)

    YANG Description: IPv4 unicast configuration options
    """
    return self.__ipv4_unicast
      
  def _set_ipv4_unicast(self, v, load=False):
    """
    Setter method for ipv4_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_unicast (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv4_unicast is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv4_unicast() directly.

    YANG Description: IPv4 unicast configuration options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv4_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast, is_container='container', yang_name="ipv4-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv4_unicast must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv4_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast, is_container='container', yang_name="ipv4-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__ipv4_unicast = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv4_unicast(self):
    self.__ipv4_unicast = YANGDynClass(base=yc_ipv4_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_unicast, is_container='container', yang_name="ipv4-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_ipv6_unicast(self):
    """
    Getter method for ipv6_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast (container)

    YANG Description: IPv6 unicast configuration options
    """
    return self.__ipv6_unicast
      
  def _set_ipv6_unicast(self, v, load=False):
    """
    Setter method for ipv6_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_unicast (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6_unicast is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6_unicast() directly.

    YANG Description: IPv6 unicast configuration options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv6_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast, is_container='container', yang_name="ipv6-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6_unicast must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv6_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast, is_container='container', yang_name="ipv6-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__ipv6_unicast = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6_unicast(self):
    self.__ipv6_unicast = YANGDynClass(base=yc_ipv6_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_unicast, is_container='container', yang_name="ipv6-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_ipv4_labeled_unicast(self):
    """
    Getter method for ipv4_labeled_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast (container)

    YANG Description: IPv4 Labeled Unicast configuration options
    """
    return self.__ipv4_labeled_unicast
      
  def _set_ipv4_labeled_unicast(self, v, load=False):
    """
    Setter method for ipv4_labeled_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv4_labeled_unicast (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv4_labeled_unicast is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv4_labeled_unicast() directly.

    YANG Description: IPv4 Labeled Unicast configuration options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv4_labeled_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast, is_container='container', yang_name="ipv4-labeled-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv4_labeled_unicast must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv4_labeled_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast, is_container='container', yang_name="ipv4-labeled-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__ipv4_labeled_unicast = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv4_labeled_unicast(self):
    self.__ipv4_labeled_unicast = YANGDynClass(base=yc_ipv4_labeled_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast, is_container='container', yang_name="ipv4-labeled-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_ipv6_labeled_unicast(self):
    """
    Getter method for ipv6_labeled_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast (container)

    YANG Description: IPv6 Labeled Unicast configuration options
    """
    return self.__ipv6_labeled_unicast
      
  def _set_ipv6_labeled_unicast(self, v, load=False):
    """
    Setter method for ipv6_labeled_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/ipv6_labeled_unicast (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6_labeled_unicast is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6_labeled_unicast() directly.

    YANG Description: IPv6 Labeled Unicast configuration options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv6_labeled_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast, is_container='container', yang_name="ipv6-labeled-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6_labeled_unicast must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv6_labeled_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast, is_container='container', yang_name="ipv6-labeled-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__ipv6_labeled_unicast = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6_labeled_unicast(self):
    self.__ipv6_labeled_unicast = YANGDynClass(base=yc_ipv6_labeled_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast, is_container='container', yang_name="ipv6-labeled-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_l3vpn_ipv4_unicast(self):
    """
    Getter method for l3vpn_ipv4_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast (container)

    YANG Description: Unicast IPv4 L3VPN configuration options
    """
    return self.__l3vpn_ipv4_unicast
      
  def _set_l3vpn_ipv4_unicast(self, v, load=False):
    """
    Setter method for l3vpn_ipv4_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_unicast (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_l3vpn_ipv4_unicast is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_l3vpn_ipv4_unicast() directly.

    YANG Description: Unicast IPv4 L3VPN configuration options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_l3vpn_ipv4_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast, is_container='container', yang_name="l3vpn-ipv4-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """l3vpn_ipv4_unicast must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_l3vpn_ipv4_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast, is_container='container', yang_name="l3vpn-ipv4-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__l3vpn_ipv4_unicast = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_l3vpn_ipv4_unicast(self):
    self.__l3vpn_ipv4_unicast = YANGDynClass(base=yc_l3vpn_ipv4_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast, is_container='container', yang_name="l3vpn-ipv4-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_l3vpn_ipv6_unicast(self):
    """
    Getter method for l3vpn_ipv6_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast (container)

    YANG Description: Unicast IPv6 L3VPN configuration options
    """
    return self.__l3vpn_ipv6_unicast
      
  def _set_l3vpn_ipv6_unicast(self, v, load=False):
    """
    Setter method for l3vpn_ipv6_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_unicast (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_l3vpn_ipv6_unicast is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_l3vpn_ipv6_unicast() directly.

    YANG Description: Unicast IPv6 L3VPN configuration options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_l3vpn_ipv6_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast, is_container='container', yang_name="l3vpn-ipv6-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """l3vpn_ipv6_unicast must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_l3vpn_ipv6_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast, is_container='container', yang_name="l3vpn-ipv6-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__l3vpn_ipv6_unicast = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_l3vpn_ipv6_unicast(self):
    self.__l3vpn_ipv6_unicast = YANGDynClass(base=yc_l3vpn_ipv6_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast, is_container='container', yang_name="l3vpn-ipv6-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_l3vpn_ipv4_multicast(self):
    """
    Getter method for l3vpn_ipv4_multicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast (container)

    YANG Description: Multicast IPv4 L3VPN configuration options
    """
    return self.__l3vpn_ipv4_multicast
      
  def _set_l3vpn_ipv4_multicast(self, v, load=False):
    """
    Setter method for l3vpn_ipv4_multicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv4_multicast (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_l3vpn_ipv4_multicast is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_l3vpn_ipv4_multicast() directly.

    YANG Description: Multicast IPv4 L3VPN configuration options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_l3vpn_ipv4_multicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_multicast, is_container='container', yang_name="l3vpn-ipv4-multicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """l3vpn_ipv4_multicast must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_l3vpn_ipv4_multicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_multicast, is_container='container', yang_name="l3vpn-ipv4-multicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__l3vpn_ipv4_multicast = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_l3vpn_ipv4_multicast(self):
    self.__l3vpn_ipv4_multicast = YANGDynClass(base=yc_l3vpn_ipv4_multicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv4_multicast, is_container='container', yang_name="l3vpn-ipv4-multicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_l3vpn_ipv6_multicast(self):
    """
    Getter method for l3vpn_ipv6_multicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast (container)

    YANG Description: Multicast IPv6 L3VPN configuration options
    """
    return self.__l3vpn_ipv6_multicast
      
  def _set_l3vpn_ipv6_multicast(self, v, load=False):
    """
    Setter method for l3vpn_ipv6_multicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l3vpn_ipv6_multicast (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_l3vpn_ipv6_multicast is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_l3vpn_ipv6_multicast() directly.

    YANG Description: Multicast IPv6 L3VPN configuration options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_l3vpn_ipv6_multicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_multicast, is_container='container', yang_name="l3vpn-ipv6-multicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """l3vpn_ipv6_multicast must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_l3vpn_ipv6_multicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_multicast, is_container='container', yang_name="l3vpn-ipv6-multicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__l3vpn_ipv6_multicast = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_l3vpn_ipv6_multicast(self):
    self.__l3vpn_ipv6_multicast = YANGDynClass(base=yc_l3vpn_ipv6_multicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l3vpn_ipv6_multicast, is_container='container', yang_name="l3vpn-ipv6-multicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_l2vpn_vpls(self):
    """
    Getter method for l2vpn_vpls, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls (container)

    YANG Description: BGP-signalled VPLS configuration options
    """
    return self.__l2vpn_vpls
      
  def _set_l2vpn_vpls(self, v, load=False):
    """
    Setter method for l2vpn_vpls, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_vpls (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_l2vpn_vpls is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_l2vpn_vpls() directly.

    YANG Description: BGP-signalled VPLS configuration options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_l2vpn_vpls_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_vpls, is_container='container', yang_name="l2vpn-vpls", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """l2vpn_vpls must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_l2vpn_vpls_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_vpls, is_container='container', yang_name="l2vpn-vpls", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__l2vpn_vpls = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_l2vpn_vpls(self):
    self.__l2vpn_vpls = YANGDynClass(base=yc_l2vpn_vpls_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_vpls, is_container='container', yang_name="l2vpn-vpls", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_l2vpn_evpn(self):
    """
    Getter method for l2vpn_evpn, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn (container)

    YANG Description: BGP EVPN configuration options
    """
    return self.__l2vpn_evpn
      
  def _set_l2vpn_evpn(self, v, load=False):
    """
    Setter method for l2vpn_evpn, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/l2vpn_evpn (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_l2vpn_evpn is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_l2vpn_evpn() directly.

    YANG Description: BGP EVPN configuration options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_l2vpn_evpn_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_evpn, is_container='container', yang_name="l2vpn-evpn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """l2vpn_evpn must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_l2vpn_evpn_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_evpn, is_container='container', yang_name="l2vpn-evpn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__l2vpn_evpn = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_l2vpn_evpn(self):
    self.__l2vpn_evpn = YANGDynClass(base=yc_l2vpn_evpn_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_l2vpn_evpn, is_container='container', yang_name="l2vpn-evpn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_srte_policy_ipv4(self):
    """
    Getter method for srte_policy_ipv4, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4 (container)

    YANG Description: Configuration and operational state parameters relating to
the SR-TE Policy SAFI for IPv4 Unicast.
    """
    return self.__srte_policy_ipv4
      
  def _set_srte_policy_ipv4(self, v, load=False):
    """
    Setter method for srte_policy_ipv4, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv4 (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_srte_policy_ipv4 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_srte_policy_ipv4() directly.

    YANG Description: Configuration and operational state parameters relating to
the SR-TE Policy SAFI for IPv4 Unicast.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_srte_policy_ipv4_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv4, is_container='container', yang_name="srte-policy-ipv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """srte_policy_ipv4 must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_srte_policy_ipv4_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv4, is_container='container', yang_name="srte-policy-ipv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__srte_policy_ipv4 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_srte_policy_ipv4(self):
    self.__srte_policy_ipv4 = YANGDynClass(base=yc_srte_policy_ipv4_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv4, is_container='container', yang_name="srte-policy-ipv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_srte_policy_ipv6(self):
    """
    Getter method for srte_policy_ipv6, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6 (container)

    YANG Description: Configuration and operational state parameters relating to
the SR-TE Policy SAFI for IPv6 Unicast.
    """
    return self.__srte_policy_ipv6
      
  def _set_srte_policy_ipv6(self, v, load=False):
    """
    Setter method for srte_policy_ipv6, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi/srte_policy_ipv6 (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_srte_policy_ipv6 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_srte_policy_ipv6() directly.

    YANG Description: Configuration and operational state parameters relating to
the SR-TE Policy SAFI for IPv6 Unicast.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_srte_policy_ipv6_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv6, is_container='container', yang_name="srte-policy-ipv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """srte_policy_ipv6 must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_srte_policy_ipv6_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv6, is_container='container', yang_name="srte-policy-ipv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__srte_policy_ipv6 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_srte_policy_ipv6(self):
    self.__srte_policy_ipv6 = YANGDynClass(base=yc_srte_policy_ipv6_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi_srte_policy_ipv6, is_container='container', yang_name="srte-policy-ipv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  afi_safi_name = __builtin__.property(_get_afi_safi_name, _set_afi_safi_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  graceful_restart = __builtin__.property(_get_graceful_restart, _set_graceful_restart)
  route_selection_options = __builtin__.property(_get_route_selection_options, _set_route_selection_options)
  use_multiple_paths = __builtin__.property(_get_use_multiple_paths, _set_use_multiple_paths)
  add_paths = __builtin__.property(_get_add_paths, _set_add_paths)
  ipv4_unicast = __builtin__.property(_get_ipv4_unicast, _set_ipv4_unicast)
  ipv6_unicast = __builtin__.property(_get_ipv6_unicast, _set_ipv6_unicast)
  ipv4_labeled_unicast = __builtin__.property(_get_ipv4_labeled_unicast, _set_ipv4_labeled_unicast)
  ipv6_labeled_unicast = __builtin__.property(_get_ipv6_labeled_unicast, _set_ipv6_labeled_unicast)
  l3vpn_ipv4_unicast = __builtin__.property(_get_l3vpn_ipv4_unicast, _set_l3vpn_ipv4_unicast)
  l3vpn_ipv6_unicast = __builtin__.property(_get_l3vpn_ipv6_unicast, _set_l3vpn_ipv6_unicast)
  l3vpn_ipv4_multicast = __builtin__.property(_get_l3vpn_ipv4_multicast, _set_l3vpn_ipv4_multicast)
  l3vpn_ipv6_multicast = __builtin__.property(_get_l3vpn_ipv6_multicast, _set_l3vpn_ipv6_multicast)
  l2vpn_vpls = __builtin__.property(_get_l2vpn_vpls, _set_l2vpn_vpls)
  l2vpn_evpn = __builtin__.property(_get_l2vpn_evpn, _set_l2vpn_evpn)
  srte_policy_ipv4 = __builtin__.property(_get_srte_policy_ipv4, _set_srte_policy_ipv4)
  srte_policy_ipv6 = __builtin__.property(_get_srte_policy_ipv6, _set_srte_policy_ipv6)


  _pyangbind_elements = OrderedDict([('afi_safi_name', afi_safi_name), ('config', config), ('state', state), ('graceful_restart', graceful_restart), ('route_selection_options', route_selection_options), ('use_multiple_paths', use_multiple_paths), ('add_paths', add_paths), ('ipv4_unicast', ipv4_unicast), ('ipv6_unicast', ipv6_unicast), ('ipv4_labeled_unicast', ipv4_labeled_unicast), ('ipv6_labeled_unicast', ipv6_labeled_unicast), ('l3vpn_ipv4_unicast', l3vpn_ipv4_unicast), ('l3vpn_ipv6_unicast', l3vpn_ipv6_unicast), ('l3vpn_ipv4_multicast', l3vpn_ipv4_multicast), ('l3vpn_ipv6_multicast', l3vpn_ipv6_multicast), ('l2vpn_vpls', l2vpn_vpls), ('l2vpn_evpn', l2vpn_evpn), ('srte_policy_ipv4', srte_policy_ipv4), ('srte_policy_ipv6', srte_policy_ipv6), ])


class yc_afi_safis_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/afi-safis. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Address family specific configuration
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi_safi',)

  _yang_name = 'afi-safis'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi_safi = YANGDynClass(base=YANGListType("afi_safi_name",yc_afi_safi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi, yang_name="afi-safi", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-safi-name', extensions=None), is_container='list', yang_name="afi-safi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'afi-safis']

  def _get_afi_safi(self):
    """
    Getter method for afi_safi, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi (list)

    YANG Description: AFI,SAFI configuration available for the
neighbour or group
    """
    return self.__afi_safi
      
  def _set_afi_safi(self, v, load=False):
    """
    Setter method for afi_safi, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis/afi_safi (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_safi is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_safi() directly.

    YANG Description: AFI,SAFI configuration available for the
neighbour or group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("afi_safi_name",yc_afi_safi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi, yang_name="afi-safi", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-safi-name', extensions=None), is_container='list', yang_name="afi-safi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_safi must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("afi_safi_name",yc_afi_safi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi, yang_name="afi-safi", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-safi-name', extensions=None), is_container='list', yang_name="afi-safi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__afi_safi = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_safi(self):
    self.__afi_safi = YANGDynClass(base=YANGListType("afi_safi_name",yc_afi_safi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis_afi_safi, yang_name="afi-safi", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-safi-name', extensions=None), is_container='list', yang_name="afi-safi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  afi_safi = __builtin__.property(_get_afi_safi, _set_afi_safi)


  _pyangbind_elements = OrderedDict([('afi_safi', afi_safi), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_dynamic_neighbor_prefixes_dynamic_neighbor_prefix_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/dynamic-neighbor-prefixes/dynamic-neighbor-prefix/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 source prefix
for the dynamic BGP neighbor connections.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix','__peer_group',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = 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])'}),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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=True)
    self.__peer_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'dynamic-neighbor-prefixes', 'dynamic-neighbor-prefix', 'config']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/dynamic_neighbor_prefixes/dynamic_neighbor_prefix/config/prefix (oc-inet:ip-prefix)

    YANG Description: The IP prefix within which the source address of the remote
BGP speaker must fall to be considered eligible to the
dynamically configured.
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/dynamic_neighbor_prefixes/dynamic_neighbor_prefix/config/prefix (oc-inet:ip-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: The IP prefix within which the source address of the remote
BGP speaker must fall to be considered eligible to the
dynamically configured.
    """
    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])'}),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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with oc-inet:ip-prefix""",
          'defined-type': "oc-inet:ip-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])'}),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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=True)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = 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])'}),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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=True)


  def _get_peer_group(self):
    """
    Getter method for peer_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/dynamic_neighbor_prefixes/dynamic_neighbor_prefix/config/peer_group (leafref)

    YANG Description: The peer-group within which the dynamic neighbor will be
configured.  The configuration parameters used for the dynamic
neighbor are those specified within the referenced peer
group.
    """
    return self.__peer_group
      
  def _set_peer_group(self, v, load=False):
    """
    Setter method for peer_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/dynamic_neighbor_prefixes/dynamic_neighbor_prefix/config/peer_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_group() directly.

    YANG Description: The peer-group within which the dynamic neighbor will be
configured.  The configuration parameters used for the dynamic
neighbor are those specified within the referenced peer
group.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="peer-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__peer_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_group(self):
    self.__peer_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)

  prefix = __builtin__.property(_get_prefix, _set_prefix)
  peer_group = __builtin__.property(_get_peer_group, _set_peer_group)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ('peer_group', peer_group), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_dynamic_neighbor_prefixes_dynamic_neighbor_prefix_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/dynamic-neighbor-prefixes/dynamic-neighbor-prefix/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 source
prefix for the dynamic BGP neighbor connections.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix','__peer_group',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = 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])'}),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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=False)
    self.__peer_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'dynamic-neighbor-prefixes', 'dynamic-neighbor-prefix', 'state']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/dynamic_neighbor_prefixes/dynamic_neighbor_prefix/state/prefix (oc-inet:ip-prefix)

    YANG Description: The IP prefix within which the source address of the remote
BGP speaker must fall to be considered eligible to the
dynamically configured.
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/dynamic_neighbor_prefixes/dynamic_neighbor_prefix/state/prefix (oc-inet:ip-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: The IP prefix within which the source address of the remote
BGP speaker must fall to be considered eligible to the
dynamically configured.
    """
    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])'}),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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with oc-inet:ip-prefix""",
          'defined-type': "oc-inet:ip-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])'}),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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = 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])'}),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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=False)


  def _get_peer_group(self):
    """
    Getter method for peer_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/dynamic_neighbor_prefixes/dynamic_neighbor_prefix/state/peer_group (leafref)

    YANG Description: The peer-group within which the dynamic neighbor will be
configured.  The configuration parameters used for the dynamic
neighbor are those specified within the referenced peer
group.
    """
    return self.__peer_group
      
  def _set_peer_group(self, v, load=False):
    """
    Setter method for peer_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/dynamic_neighbor_prefixes/dynamic_neighbor_prefix/state/peer_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_group() directly.

    YANG Description: The peer-group within which the dynamic neighbor will be
configured.  The configuration parameters used for the dynamic
neighbor are those specified within the referenced peer
group.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="peer-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__peer_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_group(self):
    self.__peer_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)

  prefix = __builtin__.property(_get_prefix)
  peer_group = __builtin__.property(_get_peer_group)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ('peer_group', peer_group), ])


class yc_dynamic_neighbor_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_dynamic_neighbor_prefixes_dynamic_neighbor_prefix(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/dynamic-neighbor-prefixes/dynamic-neighbor-prefix. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: An individual prefix from which dynamic neighbor
connections are allowed.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix','__config','__state',)

  _yang_name = 'dynamic-neighbor-prefix'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_dynamic_neighbor_prefixes_dynamic_neighbor_prefix_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_dynamic_neighbor_prefixes_dynamic_neighbor_prefix_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'dynamic-neighbor-prefixes', 'dynamic-neighbor-prefix']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/dynamic_neighbor_prefixes/dynamic_neighbor_prefix/prefix (leafref)

    YANG Description: Reference to the IP prefix from which source connections
are allowed for the dynamic neighbor group.
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/dynamic_neighbor_prefixes/dynamic_neighbor_prefix/prefix (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: Reference to the IP prefix from which source connections
are allowed for the dynamic neighbor group.
    """
    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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/dynamic_neighbor_prefixes/dynamic_neighbor_prefix/config (container)

    YANG Description: Configuration parameters relating to the source prefix
for the dynamic BGP neighbor connections.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/dynamic_neighbor_prefixes/dynamic_neighbor_prefix/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 source prefix
for the dynamic BGP neighbor connections.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_dynamic_neighbor_prefixes_dynamic_neighbor_prefix_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_dynamic_neighbor_prefixes_dynamic_neighbor_prefix_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_dynamic_neighbor_prefixes_dynamic_neighbor_prefix_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/dynamic_neighbor_prefixes/dynamic_neighbor_prefix/state (container)

    YANG Description: Operational state parameters relating to the source
prefix for the dynamic BGP neighbor connections.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/dynamic_neighbor_prefixes/dynamic_neighbor_prefix/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 source
prefix for the dynamic BGP neighbor connections.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_dynamic_neighbor_prefixes_dynamic_neighbor_prefix_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_dynamic_neighbor_prefixes_dynamic_neighbor_prefix_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_dynamic_neighbor_prefixes_dynamic_neighbor_prefix_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  prefix = __builtin__.property(_get_prefix, _set_prefix)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ('config', config), ('state', state), ])


class yc_dynamic_neighbor_prefixes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_dynamic_neighbor_prefixes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global/dynamic-neighbor-prefixes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A list of IP prefixes from which the system should:
 - Accept connections to the BGP daemon
 - Dynamically configure a BGP neighbor corresponding to the
   source address of the remote system, using the parameters
   of the specified peer-group.
For such neighbors, an entry within the neighbor list should
be created, indicating that the peer was dynamically
configured, and referencing the peer-group from which the
configuration was derived.
  """
  __slots__ = ('_path_helper', '_extmethods', '__dynamic_neighbor_prefix',)

  _yang_name = 'dynamic-neighbor-prefixes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__dynamic_neighbor_prefix = YANGDynClass(base=YANGListType("prefix",yc_dynamic_neighbor_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_dynamic_neighbor_prefixes_dynamic_neighbor_prefix, yang_name="dynamic-neighbor-prefix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix', extensions=None), is_container='list', yang_name="dynamic-neighbor-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global', 'dynamic-neighbor-prefixes']

  def _get_dynamic_neighbor_prefix(self):
    """
    Getter method for dynamic_neighbor_prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/dynamic_neighbor_prefixes/dynamic_neighbor_prefix (list)

    YANG Description: An individual prefix from which dynamic neighbor
connections are allowed.
    """
    return self.__dynamic_neighbor_prefix
      
  def _set_dynamic_neighbor_prefix(self, v, load=False):
    """
    Setter method for dynamic_neighbor_prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/dynamic_neighbor_prefixes/dynamic_neighbor_prefix (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dynamic_neighbor_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dynamic_neighbor_prefix() directly.

    YANG Description: An individual prefix from which dynamic neighbor
connections are allowed.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("prefix",yc_dynamic_neighbor_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_dynamic_neighbor_prefixes_dynamic_neighbor_prefix, yang_name="dynamic-neighbor-prefix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix', extensions=None), is_container='list', yang_name="dynamic-neighbor-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dynamic_neighbor_prefix must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("prefix",yc_dynamic_neighbor_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_dynamic_neighbor_prefixes_dynamic_neighbor_prefix, yang_name="dynamic-neighbor-prefix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix', extensions=None), is_container='list', yang_name="dynamic-neighbor-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__dynamic_neighbor_prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dynamic_neighbor_prefix(self):
    self.__dynamic_neighbor_prefix = YANGDynClass(base=YANGListType("prefix",yc_dynamic_neighbor_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_dynamic_neighbor_prefixes_dynamic_neighbor_prefix, yang_name="dynamic-neighbor-prefix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix', extensions=None), is_container='list', yang_name="dynamic-neighbor-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  dynamic_neighbor_prefix = __builtin__.property(_get_dynamic_neighbor_prefix, _set_dynamic_neighbor_prefix)


  _pyangbind_elements = OrderedDict([('dynamic_neighbor_prefix', dynamic_neighbor_prefix), ])


class yc_global__openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/global. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Global configuration for the BGP router
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__default_route_distance','__confederation','__graceful_restart','__use_multiple_paths','__route_selection_options','__afi_safis','__dynamic_neighbor_prefixes',)

  _yang_name = 'global'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__default_route_distance = YANGDynClass(base=yc_default_route_distance_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_default_route_distance, is_container='container', yang_name="default-route-distance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__confederation = YANGDynClass(base=yc_confederation_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_confederation, is_container='container', yang_name="confederation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__graceful_restart = YANGDynClass(base=yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__use_multiple_paths = YANGDynClass(base=yc_use_multiple_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths, is_container='container', yang_name="use-multiple-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__route_selection_options = YANGDynClass(base=yc_route_selection_options_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_route_selection_options, is_container='container', yang_name="route-selection-options", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__afi_safis = YANGDynClass(base=yc_afi_safis_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis, is_container='container', yang_name="afi-safis", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__dynamic_neighbor_prefixes = YANGDynClass(base=yc_dynamic_neighbor_prefixes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_dynamic_neighbor_prefixes, is_container='container', yang_name="dynamic-neighbor-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'global']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/config (container)

    YANG Description: Configuration parameters relating to the global BGP router
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/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 global BGP router
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/state (container)

    YANG Description: State information relating to the global BGP router
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/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 relating to the global BGP router
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_default_route_distance(self):
    """
    Getter method for default_route_distance, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/default_route_distance (container)

    YANG Description: Administrative distance (or preference) assigned to
routes received from different sources
(external, internal, and local).
    """
    return self.__default_route_distance
      
  def _set_default_route_distance(self, v, load=False):
    """
    Setter method for default_route_distance, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/default_route_distance (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_default_route_distance is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_default_route_distance() directly.

    YANG Description: Administrative distance (or preference) assigned to
routes received from different sources
(external, internal, and local).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_default_route_distance_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_default_route_distance, is_container='container', yang_name="default-route-distance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """default_route_distance must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_default_route_distance_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_default_route_distance, is_container='container', yang_name="default-route-distance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__default_route_distance = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_default_route_distance(self):
    self.__default_route_distance = YANGDynClass(base=yc_default_route_distance_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_default_route_distance, is_container='container', yang_name="default-route-distance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_confederation(self):
    """
    Getter method for confederation, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/confederation (container)

    YANG Description: Parameters indicating whether the local system acts as part
of a BGP confederation
    """
    return self.__confederation
      
  def _set_confederation(self, v, load=False):
    """
    Setter method for confederation, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/confederation (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_confederation is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_confederation() directly.

    YANG Description: Parameters indicating whether the local system acts as part
of a BGP confederation
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_confederation_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_confederation, is_container='container', yang_name="confederation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """confederation must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_confederation_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_confederation, is_container='container', yang_name="confederation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__confederation = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_confederation(self):
    self.__confederation = YANGDynClass(base=yc_confederation_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_confederation, is_container='container', yang_name="confederation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_graceful_restart(self):
    """
    Getter method for graceful_restart, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/graceful_restart (container)

    YANG Description: Parameters relating the graceful restart mechanism for BGP
    """
    return self.__graceful_restart
      
  def _set_graceful_restart(self, v, load=False):
    """
    Setter method for graceful_restart, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/graceful_restart (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_graceful_restart is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_graceful_restart() directly.

    YANG Description: Parameters relating the graceful restart mechanism for BGP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """graceful_restart must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__graceful_restart = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_graceful_restart(self):
    self.__graceful_restart = YANGDynClass(base=yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_use_multiple_paths(self):
    """
    Getter method for use_multiple_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/use_multiple_paths (container)

    YANG Description: Parameters related to the use of multiple paths for the
same NLRI
    """
    return self.__use_multiple_paths
      
  def _set_use_multiple_paths(self, v, load=False):
    """
    Setter method for use_multiple_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/use_multiple_paths (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_use_multiple_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_use_multiple_paths() directly.

    YANG Description: Parameters related to the use of multiple paths for the
same NLRI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_use_multiple_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths, is_container='container', yang_name="use-multiple-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """use_multiple_paths must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_use_multiple_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths, is_container='container', yang_name="use-multiple-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__use_multiple_paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_use_multiple_paths(self):
    self.__use_multiple_paths = YANGDynClass(base=yc_use_multiple_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_use_multiple_paths, is_container='container', yang_name="use-multiple-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_route_selection_options(self):
    """
    Getter method for route_selection_options, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/route_selection_options (container)

    YANG Description: Parameters relating to options for route selection
    """
    return self.__route_selection_options
      
  def _set_route_selection_options(self, v, load=False):
    """
    Setter method for route_selection_options, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/route_selection_options (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route_selection_options is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route_selection_options() directly.

    YANG Description: Parameters relating to options for route selection
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_route_selection_options_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_route_selection_options, is_container='container', yang_name="route-selection-options", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route_selection_options must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_route_selection_options_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_route_selection_options, is_container='container', yang_name="route-selection-options", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__route_selection_options = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route_selection_options(self):
    self.__route_selection_options = YANGDynClass(base=yc_route_selection_options_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_route_selection_options, is_container='container', yang_name="route-selection-options", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_afi_safis(self):
    """
    Getter method for afi_safis, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis (container)

    YANG Description: Address family specific configuration
    """
    return self.__afi_safis
      
  def _set_afi_safis(self, v, load=False):
    """
    Setter method for afi_safis, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/afi_safis (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_safis is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_safis() directly.

    YANG Description: Address family specific configuration
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_afi_safis_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis, is_container='container', yang_name="afi-safis", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_safis must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_afi_safis_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis, is_container='container', yang_name="afi-safis", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__afi_safis = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_safis(self):
    self.__afi_safis = YANGDynClass(base=yc_afi_safis_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_afi_safis, is_container='container', yang_name="afi-safis", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_dynamic_neighbor_prefixes(self):
    """
    Getter method for dynamic_neighbor_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/dynamic_neighbor_prefixes (container)

    YANG Description: A list of IP prefixes from which the system should:
 - Accept connections to the BGP daemon
 - Dynamically configure a BGP neighbor corresponding to the
   source address of the remote system, using the parameters
   of the specified peer-group.
For such neighbors, an entry within the neighbor list should
be created, indicating that the peer was dynamically
configured, and referencing the peer-group from which the
configuration was derived.
    """
    return self.__dynamic_neighbor_prefixes
      
  def _set_dynamic_neighbor_prefixes(self, v, load=False):
    """
    Setter method for dynamic_neighbor_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/dynamic_neighbor_prefixes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dynamic_neighbor_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dynamic_neighbor_prefixes() directly.

    YANG Description: A list of IP prefixes from which the system should:
 - Accept connections to the BGP daemon
 - Dynamically configure a BGP neighbor corresponding to the
   source address of the remote system, using the parameters
   of the specified peer-group.
For such neighbors, an entry within the neighbor list should
be created, indicating that the peer was dynamically
configured, and referencing the peer-group from which the
configuration was derived.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_dynamic_neighbor_prefixes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_dynamic_neighbor_prefixes, is_container='container', yang_name="dynamic-neighbor-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dynamic_neighbor_prefixes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_dynamic_neighbor_prefixes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_dynamic_neighbor_prefixes, is_container='container', yang_name="dynamic-neighbor-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__dynamic_neighbor_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dynamic_neighbor_prefixes(self):
    self.__dynamic_neighbor_prefixes = YANGDynClass(base=yc_dynamic_neighbor_prefixes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global_dynamic_neighbor_prefixes, is_container='container', yang_name="dynamic-neighbor-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  default_route_distance = __builtin__.property(_get_default_route_distance, _set_default_route_distance)
  confederation = __builtin__.property(_get_confederation, _set_confederation)
  graceful_restart = __builtin__.property(_get_graceful_restart, _set_graceful_restart)
  use_multiple_paths = __builtin__.property(_get_use_multiple_paths, _set_use_multiple_paths)
  route_selection_options = __builtin__.property(_get_route_selection_options, _set_route_selection_options)
  afi_safis = __builtin__.property(_get_afi_safis, _set_afi_safis)
  dynamic_neighbor_prefixes = __builtin__.property(_get_dynamic_neighbor_prefixes, _set_dynamic_neighbor_prefixes)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('default_route_distance', default_route_distance), ('confederation', confederation), ('graceful_restart', graceful_restart), ('use_multiple_paths', use_multiple_paths), ('route_selection_options', route_selection_options), ('afi_safis', afi_safis), ('dynamic_neighbor_prefixes', dynamic_neighbor_prefixes), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/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 BGP neighbor or
group
  """
  __slots__ = ('_path_helper', '_extmethods', '__peer_group','__neighbor_address','__neighbor_port','__enabled','__peer_as','__local_as','__peer_type','__auth_password','__remove_private_as','__route_flap_damping','__send_community','__description',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__peer_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__neighbor_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}'}),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}|:))'}),], is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    self.__neighbor_port = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(179), is_leaf=True, yang_name="neighbor-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:port-number', is_config=True)
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__peer_as = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="peer-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=True)
    self.__local_as = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="local-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=True)
    self.__peer_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}, 'EXTERNAL': {}},), is_leaf=True, yang_name="peer-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:peer-type', is_config=True)
    self.__auth_password = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="auth-password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)
    self.__remove_private_as = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="remove-private-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:remove-private-as-option', is_config=True)
    self.__route_flap_damping = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="route-flap-damping", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__send_community = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STANDARD': {}, 'EXTENDED': {}, 'BOTH': {}, 'NONE': {}},), default=six.text_type("NONE"), is_leaf=True, yang_name="send-community", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:community-type', is_config=True)
    self.__description = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'config']

  def _get_peer_group(self):
    """
    Getter method for peer_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/config/peer_group (leafref)

    YANG Description: The peer-group with which this neighbor is associated
    """
    return self.__peer_group
      
  def _set_peer_group(self, v, load=False):
    """
    Setter method for peer_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/config/peer_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_group() directly.

    YANG Description: The peer-group with which this neighbor is associated
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="peer-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__peer_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_group(self):
    self.__peer_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_neighbor_address(self):
    """
    Getter method for neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/config/neighbor_address (oc-inet:ip-address)

    YANG Description: Address of the BGP peer, either in IPv4 or IPv6
    """
    return self.__neighbor_address
      
  def _set_neighbor_address(self, v, load=False):
    """
    Setter method for neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/config/neighbor_address (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor_address() directly.

    YANG Description: Address of the BGP peer, either in IPv4 or IPv6
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor_address must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)""",
        })

    self.__neighbor_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor_address(self):
    self.__neighbor_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}'}),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}|:))'}),], is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)


  def _get_neighbor_port(self):
    """
    Getter method for neighbor_port, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/config/neighbor_port (oc-inet:port-number)

    YANG Description: Port number of the BGP peer
    """
    return self.__neighbor_port
      
  def _set_neighbor_port(self, v, load=False):
    """
    Setter method for neighbor_port, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/config/neighbor_port (oc-inet:port-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor_port is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor_port() directly.

    YANG Description: Port number of the BGP peer
    """
    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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(179), is_leaf=True, yang_name="neighbor-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:port-number', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor_port must be of a type compatible with oc-inet:port-number""",
          'defined-type': "oc-inet:port-number",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(179), is_leaf=True, yang_name="neighbor-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:port-number', is_config=True)""",
        })

    self.__neighbor_port = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor_port(self):
    self.__neighbor_port = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(179), is_leaf=True, yang_name="neighbor-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:port-number', is_config=True)


  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/config/enabled (boolean)

    YANG Description: Whether the BGP peer is enabled. In cases where the
enabled leaf is set to false, the local system should not
initiate connections to the neighbor, and should not
respond to TCP connections attempts from the neighbor. If
the state of the BGP session is ESTABLISHED at the time
that this leaf is set to false, the BGP session should be
ceased.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: Whether the BGP peer is enabled. In cases where the
enabled leaf is set to false, the local system should not
initiate connections to the neighbor, and should not
respond to TCP connections attempts from the neighbor. If
the state of the BGP session is ESTABLISHED at the time
that this leaf is set to false, the BGP session should be
ceased.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_peer_as(self):
    """
    Getter method for peer_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/config/peer_as (oc-inet:as-number)

    YANG Description: AS number of the peer.
    """
    return self.__peer_as
      
  def _set_peer_as(self, v, load=False):
    """
    Setter method for peer_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/config/peer_as (oc-inet:as-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_as is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_as() directly.

    YANG Description: AS number of the peer.
    """
    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="peer-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_as must be of a type compatible with oc-inet:as-number""",
          'defined-type': "oc-inet:as-number",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="peer-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=True)""",
        })

    self.__peer_as = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_as(self):
    self.__peer_as = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="peer-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=True)


  def _get_local_as(self):
    """
    Getter method for local_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/config/local_as (oc-inet:as-number)

    YANG Description: The local autonomous system number that is to be used
when establishing sessions with the remote peer or peer
group, if this differs from the global BGP router
autonomous system number.
    """
    return self.__local_as
      
  def _set_local_as(self, v, load=False):
    """
    Setter method for local_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/config/local_as (oc-inet:as-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_as is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_as() directly.

    YANG Description: The local autonomous system number that is to be used
when establishing sessions with the remote peer or peer
group, if this differs from the global BGP router
autonomous system number.
    """
    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="local-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_as must be of a type compatible with oc-inet:as-number""",
          'defined-type': "oc-inet:as-number",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="local-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=True)""",
        })

    self.__local_as = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_as(self):
    self.__local_as = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="local-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=True)


  def _get_peer_type(self):
    """
    Getter method for peer_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/config/peer_type (oc-bgp-types:peer-type)

    YANG Description: Explicitly designate the peer or peer group as internal
(iBGP) or external (eBGP).
    """
    return self.__peer_type
      
  def _set_peer_type(self, v, load=False):
    """
    Setter method for peer_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/config/peer_type (oc-bgp-types:peer-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_type() directly.

    YANG Description: Explicitly designate the peer or peer group as internal
(iBGP) or external (eBGP).
    """
    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={'INTERNAL': {}, 'EXTERNAL': {}},), is_leaf=True, yang_name="peer-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:peer-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_type must be of a type compatible with oc-bgp-types:peer-type""",
          'defined-type': "oc-bgp-types:peer-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}, 'EXTERNAL': {}},), is_leaf=True, yang_name="peer-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:peer-type', is_config=True)""",
        })

    self.__peer_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_type(self):
    self.__peer_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}, 'EXTERNAL': {}},), is_leaf=True, yang_name="peer-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:peer-type', is_config=True)


  def _get_auth_password(self):
    """
    Getter method for auth_password, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/config/auth_password (oc-types:routing-password)

    YANG Description: Configures an MD5 authentication password for use with
neighboring devices.
    """
    return self.__auth_password
      
  def _set_auth_password(self, v, load=False):
    """
    Setter method for auth_password, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/config/auth_password (oc-types:routing-password)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_auth_password is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_auth_password() directly.

    YANG Description: Configures an MD5 authentication password for use with
neighboring devices.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="auth-password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """auth_password must be of a type compatible with oc-types:routing-password""",
          'defined-type': "oc-types:routing-password",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="auth-password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)""",
        })

    self.__auth_password = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_auth_password(self):
    self.__auth_password = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="auth-password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)


  def _get_remove_private_as(self):
    """
    Getter method for remove_private_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/config/remove_private_as (oc-bgp-types:remove-private-as-option)

    YANG Description: Remove private AS numbers from updates sent to peers - when
this leaf is not specified, the AS_PATH attribute should be
sent to the peer unchanged
    """
    return self.__remove_private_as
      
  def _set_remove_private_as(self, v, load=False):
    """
    Setter method for remove_private_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/config/remove_private_as (oc-bgp-types:remove-private-as-option)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_remove_private_as is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_remove_private_as() directly.

    YANG Description: Remove private AS numbers from updates sent to peers - when
this leaf is not specified, the AS_PATH attribute should be
sent to the peer unchanged
    """
    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={'PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="remove-private-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:remove-private-as-option', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """remove_private_as must be of a type compatible with oc-bgp-types:remove-private-as-option""",
          'defined-type': "oc-bgp-types:remove-private-as-option",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="remove-private-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:remove-private-as-option', is_config=True)""",
        })

    self.__remove_private_as = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_remove_private_as(self):
    self.__remove_private_as = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="remove-private-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:remove-private-as-option', is_config=True)


  def _get_route_flap_damping(self):
    """
    Getter method for route_flap_damping, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/config/route_flap_damping (boolean)

    YANG Description: Enable route flap damping.
    """
    return self.__route_flap_damping
      
  def _set_route_flap_damping(self, v, load=False):
    """
    Setter method for route_flap_damping, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/config/route_flap_damping (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route_flap_damping is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route_flap_damping() directly.

    YANG Description: Enable route flap damping.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="route-flap-damping", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route_flap_damping must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="route-flap-damping", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__route_flap_damping = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route_flap_damping(self):
    self.__route_flap_damping = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="route-flap-damping", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_send_community(self):
    """
    Getter method for send_community, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/config/send_community (oc-bgp-types:community-type)

    YANG Description: Specify which types of community should be sent to the
neighbor or group. The default is to not send the
community attribute
    """
    return self.__send_community
      
  def _set_send_community(self, v, load=False):
    """
    Setter method for send_community, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/config/send_community (oc-bgp-types:community-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_send_community is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_send_community() directly.

    YANG Description: Specify which types of community should be sent to the
neighbor or group. The default is to not send the
community attribute
    """
    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={'STANDARD': {}, 'EXTENDED': {}, 'BOTH': {}, 'NONE': {}},), default=six.text_type("NONE"), is_leaf=True, yang_name="send-community", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:community-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """send_community must be of a type compatible with oc-bgp-types:community-type""",
          'defined-type': "oc-bgp-types:community-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STANDARD': {}, 'EXTENDED': {}, 'BOTH': {}, 'NONE': {}},), default=six.text_type("NONE"), is_leaf=True, yang_name="send-community", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:community-type', is_config=True)""",
        })

    self.__send_community = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_send_community(self):
    self.__send_community = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STANDARD': {}, 'EXTENDED': {}, 'BOTH': {}, 'NONE': {}},), default=six.text_type("NONE"), is_leaf=True, yang_name="send-community", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:community-type', is_config=True)


  def _get_description(self):
    """
    Getter method for description, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/config/description (string)

    YANG Description: An optional textual description (intended primarily for use
with a peer or group
    """
    return self.__description
      
  def _set_description(self, v, load=False):
    """
    Setter method for description, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/config/description (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_description is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_description() directly.

    YANG Description: An optional textual description (intended primarily for use
with a peer or group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """description must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)""",
        })

    self.__description = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_description(self):
    self.__description = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)

  peer_group = __builtin__.property(_get_peer_group, _set_peer_group)
  neighbor_address = __builtin__.property(_get_neighbor_address, _set_neighbor_address)
  neighbor_port = __builtin__.property(_get_neighbor_port, _set_neighbor_port)
  enabled = __builtin__.property(_get_enabled, _set_enabled)
  peer_as = __builtin__.property(_get_peer_as, _set_peer_as)
  local_as = __builtin__.property(_get_local_as, _set_local_as)
  peer_type = __builtin__.property(_get_peer_type, _set_peer_type)
  auth_password = __builtin__.property(_get_auth_password, _set_auth_password)
  remove_private_as = __builtin__.property(_get_remove_private_as, _set_remove_private_as)
  route_flap_damping = __builtin__.property(_get_route_flap_damping, _set_route_flap_damping)
  send_community = __builtin__.property(_get_send_community, _set_send_community)
  description = __builtin__.property(_get_description, _set_description)


  _pyangbind_elements = OrderedDict([('peer_group', peer_group), ('neighbor_address', neighbor_address), ('neighbor_port', neighbor_port), ('enabled', enabled), ('peer_as', peer_as), ('local_as', local_as), ('peer_type', peer_type), ('auth_password', auth_password), ('remove_private_as', remove_private_as), ('route_flap_damping', route_flap_damping), ('send_community', send_community), ('description', description), ])


class yc_sent_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_state_messages_sent(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/messages/sent. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Counters relating to BGP messages sent to the neighbor
  """
  __slots__ = ('_path_helper', '_extmethods', '__UPDATE','__NOTIFICATION','__last_notification_time','__last_notification_error_code','__last_notification_error_subcode',)

  _yang_name = 'sent'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__UPDATE = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="UPDATE", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__NOTIFICATION = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="NOTIFICATION", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__last_notification_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-notification-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__last_notification_error_code = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MESSAGE_HEADER_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MESSAGE_HEADER_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MESSAGE_HEADER_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'OPEN_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:OPEN_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:OPEN_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UPDATE_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UPDATE_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UPDATE_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'HOLD_TIMER_EXPIRED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:HOLD_TIMER_EXPIRED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:HOLD_TIMER_EXPIRED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'FINITE_STATE_MACHINE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:FINITE_STATE_MACHINE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:FINITE_STATE_MACHINE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'CEASE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:CEASE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:CEASE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ROUTE_REFRESH_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ROUTE_REFRESH_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ROUTE_REFRESH_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="last-notification-error-code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__last_notification_error_subcode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNSPECIFIC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNSPECIFIC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNSPECIFIC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'MESSAGE_HEADER_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MESSAGE_HEADER_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MESSAGE_HEADER_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'CONNECTION_NOT_SYNCHRONIZED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:CONNECTION_NOT_SYNCHRONIZED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:CONNECTION_NOT_SYNCHRONIZED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'BAD_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:BAD_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:BAD_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'BAD_MESSAGE_TYPE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:BAD_MESSAGE_TYPE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:BAD_MESSAGE_TYPE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'OPEN_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:OPEN_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:OPEN_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UNSUPPORTED_VERSION_NUMBER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNSUPPORTED_VERSION_NUMBER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNSUPPORTED_VERSION_NUMBER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'BAD_PEER_AS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:BAD_PEER_AS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:BAD_PEER_AS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'BAD_BGP_IDENTIFIER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:BAD_BGP_IDENTIFIER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:BAD_BGP_IDENTIFIER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UNSUPPORTED_OPTIONAL_PARAMETER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNSUPPORTED_OPTIONAL_PARAMETER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNSUPPORTED_OPTIONAL_PARAMETER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UNACCEPTABLE_HOLD_TIME': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNACCEPTABLE_HOLD_TIME': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNACCEPTABLE_HOLD_TIME': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UNSUPPORTED_CAPABILITY': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNSUPPORTED_CAPABILITY': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNSUPPORTED_CAPABILITY': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UPDATE_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UPDATE_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UPDATE_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'MALFORMED_ATTRIBUTE_LIST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MALFORMED_ATTRIBUTE_LIST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MALFORMED_ATTRIBUTE_LIST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UNRECOGNIZED_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNRECOGNIZED_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNRECOGNIZED_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'MISSING_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MISSING_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MISSING_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ATTRIBUTE_FLAGS_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ATTRIBUTE_FLAGS_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ATTRIBUTE_FLAGS_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ATTRIBUTE_LENGTH_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ATTRIBUTE_LENGTH_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ATTRIBUTE_LENGTH_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'INVALID_ORIGIN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:INVALID_ORIGIN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:INVALID_ORIGIN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'INVALID_NEXT_HOP_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:INVALID_NEXT_HOP_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:INVALID_NEXT_HOP_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'OPTIONAL_ATTRIBUTE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:OPTIONAL_ATTRIBUTE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:OPTIONAL_ATTRIBUTE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'INVALID_NETWORK_FIELD': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:INVALID_NETWORK_FIELD': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:INVALID_NETWORK_FIELD': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'MALFORMED_AS_PATH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MALFORMED_AS_PATH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MALFORMED_AS_PATH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'FINITE_STATE_MACHINE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:FINITE_STATE_MACHINE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:FINITE_STATE_MACHINE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'RECEIVE_UNEXPECTED_MESSAGE_OPENSENT': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:RECEIVE_UNEXPECTED_MESSAGE_OPENSENT': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:RECEIVE_UNEXPECTED_MESSAGE_OPENSENT': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'RECEIVE_UNEXPECTED_MESSAGE_OPENCONFIRM': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:RECEIVE_UNEXPECTED_MESSAGE_OPENCONFIRM': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:RECEIVE_UNEXPECTED_MESSAGE_OPENCONFIRM': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'RECEIVE_UNEXPECTED_MESSAGE_ESTABLISHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:RECEIVE_UNEXPECTED_MESSAGE_ESTABLISHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:RECEIVE_UNEXPECTED_MESSAGE_ESTABLISHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'CEASE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:CEASE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:CEASE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'MAX_NUM_PREFIXES_REACHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MAX_NUM_PREFIXES_REACHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MAX_NUM_PREFIXES_REACHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ADMINISTRATIVE_SHUTDOWN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ADMINISTRATIVE_SHUTDOWN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ADMINISTRATIVE_SHUTDOWN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'PEER_DE_CONFIGURED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:PEER_DE_CONFIGURED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:PEER_DE_CONFIGURED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ADMINISTRATIVE_RESET': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ADMINISTRATIVE_RESET': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ADMINISTRATIVE_RESET': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'CONNECTION_REJECTED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:CONNECTION_REJECTED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:CONNECTION_REJECTED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'OTHER_CONFIG_CHANGE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:OTHER_CONFIG_CHANGE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:OTHER_CONFIG_CHANGE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'CONN_COLLISION_RESOLUTION': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:CONN_COLLISION_RESOLUTION': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:CONN_COLLISION_RESOLUTION': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'OUT_OF_RESOURCES': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:OUT_OF_RESOURCES': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:OUT_OF_RESOURCES': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ROUTE_REFRESH_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ROUTE_REFRESH_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ROUTE_REFRESH_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'INVALID_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:INVALID_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:INVALID_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="last-notification-error-subcode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'state', 'messages', 'sent']

  def _get_UPDATE(self):
    """
    Getter method for UPDATE, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/messages/sent/UPDATE (uint64)

    YANG Description: Number of BGP UPDATE messages announcing, withdrawing
or modifying paths exchanged.
    """
    return self.__UPDATE
      
  def _set_UPDATE(self, v, load=False):
    """
    Setter method for UPDATE, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/messages/sent/UPDATE (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_UPDATE is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_UPDATE() directly.

    YANG Description: Number of BGP UPDATE messages announcing, withdrawing
or modifying paths exchanged.
    """
    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="UPDATE", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """UPDATE 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="UPDATE", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__UPDATE = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_UPDATE(self):
    self.__UPDATE = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="UPDATE", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_NOTIFICATION(self):
    """
    Getter method for NOTIFICATION, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/messages/sent/NOTIFICATION (uint64)

    YANG Description: Number of BGP NOTIFICATION messages indicating an
error condition has occurred exchanged.
    """
    return self.__NOTIFICATION
      
  def _set_NOTIFICATION(self, v, load=False):
    """
    Setter method for NOTIFICATION, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/messages/sent/NOTIFICATION (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_NOTIFICATION is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_NOTIFICATION() directly.

    YANG Description: Number of BGP NOTIFICATION messages indicating an
error condition has occurred exchanged.
    """
    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="NOTIFICATION", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """NOTIFICATION 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="NOTIFICATION", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__NOTIFICATION = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_NOTIFICATION(self):
    self.__NOTIFICATION = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="NOTIFICATION", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_last_notification_time(self):
    """
    Getter method for last_notification_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/messages/sent/last_notification_time (oc-types:timeticks64)

    YANG Description: This timestamp indicates the time that a NOTIFICATION
message was sent or received on the peering session
(based on whether this leaf is associated with
sent or received messages).

The value is the timestamp in nanoseconds relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    return self.__last_notification_time
      
  def _set_last_notification_time(self, v, load=False):
    """
    Setter method for last_notification_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/messages/sent/last_notification_time (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_last_notification_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_last_notification_time() directly.

    YANG Description: This timestamp indicates the time that a NOTIFICATION
message was sent or received on the peering session
(based on whether this leaf is associated with
sent or received messages).

The value is the timestamp in nanoseconds relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    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="last-notification-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """last_notification_time must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-notification-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__last_notification_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_last_notification_time(self):
    self.__last_notification_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-notification-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_last_notification_error_code(self):
    """
    Getter method for last_notification_error_code, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/messages/sent/last_notification_error_code (identityref)

    YANG Description: Indicates the last BGP error sent or received on the peering
session (based on whether this leaf is associated with
sent or received messages).
    """
    return self.__last_notification_error_code
      
  def _set_last_notification_error_code(self, v, load=False):
    """
    Setter method for last_notification_error_code, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/messages/sent/last_notification_error_code (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_last_notification_error_code is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_last_notification_error_code() directly.

    YANG Description: Indicates the last BGP error sent or received on the peering
session (based on whether this leaf is associated with
sent or received messages).
    """
    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={'MESSAGE_HEADER_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MESSAGE_HEADER_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MESSAGE_HEADER_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'OPEN_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:OPEN_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:OPEN_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UPDATE_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UPDATE_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UPDATE_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'HOLD_TIMER_EXPIRED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:HOLD_TIMER_EXPIRED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:HOLD_TIMER_EXPIRED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'FINITE_STATE_MACHINE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:FINITE_STATE_MACHINE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:FINITE_STATE_MACHINE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'CEASE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:CEASE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:CEASE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ROUTE_REFRESH_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ROUTE_REFRESH_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ROUTE_REFRESH_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="last-notification-error-code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """last_notification_error_code must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MESSAGE_HEADER_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MESSAGE_HEADER_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MESSAGE_HEADER_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'OPEN_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:OPEN_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:OPEN_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UPDATE_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UPDATE_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UPDATE_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'HOLD_TIMER_EXPIRED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:HOLD_TIMER_EXPIRED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:HOLD_TIMER_EXPIRED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'FINITE_STATE_MACHINE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:FINITE_STATE_MACHINE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:FINITE_STATE_MACHINE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'CEASE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:CEASE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:CEASE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ROUTE_REFRESH_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ROUTE_REFRESH_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ROUTE_REFRESH_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="last-notification-error-code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__last_notification_error_code = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_last_notification_error_code(self):
    self.__last_notification_error_code = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MESSAGE_HEADER_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MESSAGE_HEADER_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MESSAGE_HEADER_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'OPEN_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:OPEN_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:OPEN_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UPDATE_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UPDATE_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UPDATE_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'HOLD_TIMER_EXPIRED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:HOLD_TIMER_EXPIRED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:HOLD_TIMER_EXPIRED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'FINITE_STATE_MACHINE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:FINITE_STATE_MACHINE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:FINITE_STATE_MACHINE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'CEASE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:CEASE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:CEASE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ROUTE_REFRESH_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ROUTE_REFRESH_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ROUTE_REFRESH_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="last-notification-error-code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_last_notification_error_subcode(self):
    """
    Getter method for last_notification_error_subcode, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/messages/sent/last_notification_error_subcode (identityref)

    YANG Description: Indicates the last BGP error subcode sent or received on
the peering session (based on whether this leaf is associated
with sent or received messages)
    """
    return self.__last_notification_error_subcode
      
  def _set_last_notification_error_subcode(self, v, load=False):
    """
    Setter method for last_notification_error_subcode, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/messages/sent/last_notification_error_subcode (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_last_notification_error_subcode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_last_notification_error_subcode() directly.

    YANG Description: Indicates the last BGP error subcode sent or received on
the peering session (based on whether this leaf is associated
with sent or received messages)
    """
    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={'UNSPECIFIC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNSPECIFIC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNSPECIFIC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'MESSAGE_HEADER_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MESSAGE_HEADER_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MESSAGE_HEADER_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'CONNECTION_NOT_SYNCHRONIZED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:CONNECTION_NOT_SYNCHRONIZED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:CONNECTION_NOT_SYNCHRONIZED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'BAD_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:BAD_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:BAD_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'BAD_MESSAGE_TYPE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:BAD_MESSAGE_TYPE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:BAD_MESSAGE_TYPE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'OPEN_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:OPEN_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:OPEN_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UNSUPPORTED_VERSION_NUMBER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNSUPPORTED_VERSION_NUMBER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNSUPPORTED_VERSION_NUMBER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'BAD_PEER_AS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:BAD_PEER_AS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:BAD_PEER_AS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'BAD_BGP_IDENTIFIER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:BAD_BGP_IDENTIFIER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:BAD_BGP_IDENTIFIER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UNSUPPORTED_OPTIONAL_PARAMETER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNSUPPORTED_OPTIONAL_PARAMETER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNSUPPORTED_OPTIONAL_PARAMETER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UNACCEPTABLE_HOLD_TIME': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNACCEPTABLE_HOLD_TIME': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNACCEPTABLE_HOLD_TIME': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UNSUPPORTED_CAPABILITY': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNSUPPORTED_CAPABILITY': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNSUPPORTED_CAPABILITY': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UPDATE_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UPDATE_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UPDATE_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'MALFORMED_ATTRIBUTE_LIST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MALFORMED_ATTRIBUTE_LIST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MALFORMED_ATTRIBUTE_LIST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UNRECOGNIZED_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNRECOGNIZED_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNRECOGNIZED_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'MISSING_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MISSING_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MISSING_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ATTRIBUTE_FLAGS_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ATTRIBUTE_FLAGS_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ATTRIBUTE_FLAGS_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ATTRIBUTE_LENGTH_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ATTRIBUTE_LENGTH_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ATTRIBUTE_LENGTH_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'INVALID_ORIGIN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:INVALID_ORIGIN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:INVALID_ORIGIN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'INVALID_NEXT_HOP_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:INVALID_NEXT_HOP_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:INVALID_NEXT_HOP_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'OPTIONAL_ATTRIBUTE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:OPTIONAL_ATTRIBUTE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:OPTIONAL_ATTRIBUTE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'INVALID_NETWORK_FIELD': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:INVALID_NETWORK_FIELD': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:INVALID_NETWORK_FIELD': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'MALFORMED_AS_PATH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MALFORMED_AS_PATH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MALFORMED_AS_PATH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'FINITE_STATE_MACHINE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:FINITE_STATE_MACHINE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:FINITE_STATE_MACHINE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'RECEIVE_UNEXPECTED_MESSAGE_OPENSENT': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:RECEIVE_UNEXPECTED_MESSAGE_OPENSENT': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:RECEIVE_UNEXPECTED_MESSAGE_OPENSENT': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'RECEIVE_UNEXPECTED_MESSAGE_OPENCONFIRM': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:RECEIVE_UNEXPECTED_MESSAGE_OPENCONFIRM': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:RECEIVE_UNEXPECTED_MESSAGE_OPENCONFIRM': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'RECEIVE_UNEXPECTED_MESSAGE_ESTABLISHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:RECEIVE_UNEXPECTED_MESSAGE_ESTABLISHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:RECEIVE_UNEXPECTED_MESSAGE_ESTABLISHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'CEASE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:CEASE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:CEASE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'MAX_NUM_PREFIXES_REACHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MAX_NUM_PREFIXES_REACHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MAX_NUM_PREFIXES_REACHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ADMINISTRATIVE_SHUTDOWN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ADMINISTRATIVE_SHUTDOWN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ADMINISTRATIVE_SHUTDOWN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'PEER_DE_CONFIGURED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:PEER_DE_CONFIGURED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:PEER_DE_CONFIGURED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ADMINISTRATIVE_RESET': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ADMINISTRATIVE_RESET': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ADMINISTRATIVE_RESET': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'CONNECTION_REJECTED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:CONNECTION_REJECTED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:CONNECTION_REJECTED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'OTHER_CONFIG_CHANGE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:OTHER_CONFIG_CHANGE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:OTHER_CONFIG_CHANGE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'CONN_COLLISION_RESOLUTION': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:CONN_COLLISION_RESOLUTION': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:CONN_COLLISION_RESOLUTION': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'OUT_OF_RESOURCES': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:OUT_OF_RESOURCES': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:OUT_OF_RESOURCES': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ROUTE_REFRESH_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ROUTE_REFRESH_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ROUTE_REFRESH_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'INVALID_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:INVALID_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:INVALID_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="last-notification-error-subcode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """last_notification_error_subcode must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNSPECIFIC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNSPECIFIC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNSPECIFIC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'MESSAGE_HEADER_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MESSAGE_HEADER_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MESSAGE_HEADER_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'CONNECTION_NOT_SYNCHRONIZED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:CONNECTION_NOT_SYNCHRONIZED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:CONNECTION_NOT_SYNCHRONIZED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'BAD_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:BAD_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:BAD_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'BAD_MESSAGE_TYPE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:BAD_MESSAGE_TYPE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:BAD_MESSAGE_TYPE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'OPEN_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:OPEN_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:OPEN_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UNSUPPORTED_VERSION_NUMBER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNSUPPORTED_VERSION_NUMBER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNSUPPORTED_VERSION_NUMBER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'BAD_PEER_AS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:BAD_PEER_AS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:BAD_PEER_AS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'BAD_BGP_IDENTIFIER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:BAD_BGP_IDENTIFIER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:BAD_BGP_IDENTIFIER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UNSUPPORTED_OPTIONAL_PARAMETER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNSUPPORTED_OPTIONAL_PARAMETER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNSUPPORTED_OPTIONAL_PARAMETER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UNACCEPTABLE_HOLD_TIME': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNACCEPTABLE_HOLD_TIME': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNACCEPTABLE_HOLD_TIME': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UNSUPPORTED_CAPABILITY': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNSUPPORTED_CAPABILITY': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNSUPPORTED_CAPABILITY': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UPDATE_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UPDATE_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UPDATE_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'MALFORMED_ATTRIBUTE_LIST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MALFORMED_ATTRIBUTE_LIST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MALFORMED_ATTRIBUTE_LIST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UNRECOGNIZED_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNRECOGNIZED_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNRECOGNIZED_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'MISSING_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MISSING_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MISSING_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ATTRIBUTE_FLAGS_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ATTRIBUTE_FLAGS_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ATTRIBUTE_FLAGS_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ATTRIBUTE_LENGTH_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ATTRIBUTE_LENGTH_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ATTRIBUTE_LENGTH_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'INVALID_ORIGIN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:INVALID_ORIGIN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:INVALID_ORIGIN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'INVALID_NEXT_HOP_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:INVALID_NEXT_HOP_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:INVALID_NEXT_HOP_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'OPTIONAL_ATTRIBUTE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:OPTIONAL_ATTRIBUTE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:OPTIONAL_ATTRIBUTE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'INVALID_NETWORK_FIELD': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:INVALID_NETWORK_FIELD': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:INVALID_NETWORK_FIELD': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'MALFORMED_AS_PATH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MALFORMED_AS_PATH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MALFORMED_AS_PATH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'FINITE_STATE_MACHINE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:FINITE_STATE_MACHINE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:FINITE_STATE_MACHINE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'RECEIVE_UNEXPECTED_MESSAGE_OPENSENT': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:RECEIVE_UNEXPECTED_MESSAGE_OPENSENT': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:RECEIVE_UNEXPECTED_MESSAGE_OPENSENT': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'RECEIVE_UNEXPECTED_MESSAGE_OPENCONFIRM': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:RECEIVE_UNEXPECTED_MESSAGE_OPENCONFIRM': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:RECEIVE_UNEXPECTED_MESSAGE_OPENCONFIRM': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'RECEIVE_UNEXPECTED_MESSAGE_ESTABLISHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:RECEIVE_UNEXPECTED_MESSAGE_ESTABLISHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:RECEIVE_UNEXPECTED_MESSAGE_ESTABLISHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'CEASE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:CEASE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:CEASE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'MAX_NUM_PREFIXES_REACHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MAX_NUM_PREFIXES_REACHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MAX_NUM_PREFIXES_REACHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ADMINISTRATIVE_SHUTDOWN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ADMINISTRATIVE_SHUTDOWN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ADMINISTRATIVE_SHUTDOWN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'PEER_DE_CONFIGURED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:PEER_DE_CONFIGURED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:PEER_DE_CONFIGURED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ADMINISTRATIVE_RESET': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ADMINISTRATIVE_RESET': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ADMINISTRATIVE_RESET': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'CONNECTION_REJECTED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:CONNECTION_REJECTED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:CONNECTION_REJECTED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'OTHER_CONFIG_CHANGE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:OTHER_CONFIG_CHANGE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:OTHER_CONFIG_CHANGE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'CONN_COLLISION_RESOLUTION': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:CONN_COLLISION_RESOLUTION': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:CONN_COLLISION_RESOLUTION': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'OUT_OF_RESOURCES': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:OUT_OF_RESOURCES': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:OUT_OF_RESOURCES': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ROUTE_REFRESH_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ROUTE_REFRESH_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ROUTE_REFRESH_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'INVALID_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:INVALID_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:INVALID_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="last-notification-error-subcode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__last_notification_error_subcode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_last_notification_error_subcode(self):
    self.__last_notification_error_subcode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNSPECIFIC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNSPECIFIC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNSPECIFIC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'MESSAGE_HEADER_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MESSAGE_HEADER_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MESSAGE_HEADER_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'CONNECTION_NOT_SYNCHRONIZED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:CONNECTION_NOT_SYNCHRONIZED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:CONNECTION_NOT_SYNCHRONIZED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'BAD_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:BAD_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:BAD_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'BAD_MESSAGE_TYPE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:BAD_MESSAGE_TYPE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:BAD_MESSAGE_TYPE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'OPEN_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:OPEN_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:OPEN_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UNSUPPORTED_VERSION_NUMBER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNSUPPORTED_VERSION_NUMBER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNSUPPORTED_VERSION_NUMBER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'BAD_PEER_AS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:BAD_PEER_AS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:BAD_PEER_AS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'BAD_BGP_IDENTIFIER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:BAD_BGP_IDENTIFIER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:BAD_BGP_IDENTIFIER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UNSUPPORTED_OPTIONAL_PARAMETER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNSUPPORTED_OPTIONAL_PARAMETER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNSUPPORTED_OPTIONAL_PARAMETER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UNACCEPTABLE_HOLD_TIME': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNACCEPTABLE_HOLD_TIME': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNACCEPTABLE_HOLD_TIME': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UNSUPPORTED_CAPABILITY': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNSUPPORTED_CAPABILITY': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNSUPPORTED_CAPABILITY': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UPDATE_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UPDATE_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UPDATE_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'MALFORMED_ATTRIBUTE_LIST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MALFORMED_ATTRIBUTE_LIST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MALFORMED_ATTRIBUTE_LIST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UNRECOGNIZED_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNRECOGNIZED_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNRECOGNIZED_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'MISSING_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MISSING_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MISSING_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ATTRIBUTE_FLAGS_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ATTRIBUTE_FLAGS_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ATTRIBUTE_FLAGS_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ATTRIBUTE_LENGTH_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ATTRIBUTE_LENGTH_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ATTRIBUTE_LENGTH_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'INVALID_ORIGIN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:INVALID_ORIGIN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:INVALID_ORIGIN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'INVALID_NEXT_HOP_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:INVALID_NEXT_HOP_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:INVALID_NEXT_HOP_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'OPTIONAL_ATTRIBUTE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:OPTIONAL_ATTRIBUTE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:OPTIONAL_ATTRIBUTE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'INVALID_NETWORK_FIELD': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:INVALID_NETWORK_FIELD': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:INVALID_NETWORK_FIELD': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'MALFORMED_AS_PATH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MALFORMED_AS_PATH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MALFORMED_AS_PATH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'FINITE_STATE_MACHINE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:FINITE_STATE_MACHINE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:FINITE_STATE_MACHINE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'RECEIVE_UNEXPECTED_MESSAGE_OPENSENT': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:RECEIVE_UNEXPECTED_MESSAGE_OPENSENT': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:RECEIVE_UNEXPECTED_MESSAGE_OPENSENT': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'RECEIVE_UNEXPECTED_MESSAGE_OPENCONFIRM': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:RECEIVE_UNEXPECTED_MESSAGE_OPENCONFIRM': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:RECEIVE_UNEXPECTED_MESSAGE_OPENCONFIRM': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'RECEIVE_UNEXPECTED_MESSAGE_ESTABLISHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:RECEIVE_UNEXPECTED_MESSAGE_ESTABLISHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:RECEIVE_UNEXPECTED_MESSAGE_ESTABLISHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'CEASE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:CEASE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:CEASE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'MAX_NUM_PREFIXES_REACHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MAX_NUM_PREFIXES_REACHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MAX_NUM_PREFIXES_REACHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ADMINISTRATIVE_SHUTDOWN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ADMINISTRATIVE_SHUTDOWN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ADMINISTRATIVE_SHUTDOWN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'PEER_DE_CONFIGURED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:PEER_DE_CONFIGURED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:PEER_DE_CONFIGURED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ADMINISTRATIVE_RESET': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ADMINISTRATIVE_RESET': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ADMINISTRATIVE_RESET': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'CONNECTION_REJECTED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:CONNECTION_REJECTED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:CONNECTION_REJECTED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'OTHER_CONFIG_CHANGE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:OTHER_CONFIG_CHANGE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:OTHER_CONFIG_CHANGE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'CONN_COLLISION_RESOLUTION': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:CONN_COLLISION_RESOLUTION': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:CONN_COLLISION_RESOLUTION': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'OUT_OF_RESOURCES': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:OUT_OF_RESOURCES': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:OUT_OF_RESOURCES': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ROUTE_REFRESH_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ROUTE_REFRESH_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ROUTE_REFRESH_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'INVALID_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:INVALID_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:INVALID_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="last-notification-error-subcode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  UPDATE = __builtin__.property(_get_UPDATE)
  NOTIFICATION = __builtin__.property(_get_NOTIFICATION)
  last_notification_time = __builtin__.property(_get_last_notification_time)
  last_notification_error_code = __builtin__.property(_get_last_notification_error_code)
  last_notification_error_subcode = __builtin__.property(_get_last_notification_error_subcode)


  _pyangbind_elements = OrderedDict([('UPDATE', UPDATE), ('NOTIFICATION', NOTIFICATION), ('last_notification_time', last_notification_time), ('last_notification_error_code', last_notification_error_code), ('last_notification_error_subcode', last_notification_error_subcode), ])


class yc_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_state_messages_received(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/messages/received. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Counters for BGP messages received from the neighbor
  """
  __slots__ = ('_path_helper', '_extmethods', '__UPDATE','__NOTIFICATION','__last_notification_time','__last_notification_error_code','__last_notification_error_subcode',)

  _yang_name = 'received'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__UPDATE = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="UPDATE", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__NOTIFICATION = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="NOTIFICATION", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__last_notification_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-notification-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__last_notification_error_code = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MESSAGE_HEADER_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MESSAGE_HEADER_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MESSAGE_HEADER_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'OPEN_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:OPEN_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:OPEN_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UPDATE_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UPDATE_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UPDATE_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'HOLD_TIMER_EXPIRED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:HOLD_TIMER_EXPIRED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:HOLD_TIMER_EXPIRED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'FINITE_STATE_MACHINE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:FINITE_STATE_MACHINE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:FINITE_STATE_MACHINE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'CEASE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:CEASE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:CEASE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ROUTE_REFRESH_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ROUTE_REFRESH_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ROUTE_REFRESH_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="last-notification-error-code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__last_notification_error_subcode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNSPECIFIC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNSPECIFIC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNSPECIFIC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'MESSAGE_HEADER_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MESSAGE_HEADER_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MESSAGE_HEADER_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'CONNECTION_NOT_SYNCHRONIZED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:CONNECTION_NOT_SYNCHRONIZED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:CONNECTION_NOT_SYNCHRONIZED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'BAD_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:BAD_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:BAD_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'BAD_MESSAGE_TYPE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:BAD_MESSAGE_TYPE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:BAD_MESSAGE_TYPE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'OPEN_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:OPEN_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:OPEN_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UNSUPPORTED_VERSION_NUMBER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNSUPPORTED_VERSION_NUMBER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNSUPPORTED_VERSION_NUMBER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'BAD_PEER_AS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:BAD_PEER_AS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:BAD_PEER_AS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'BAD_BGP_IDENTIFIER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:BAD_BGP_IDENTIFIER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:BAD_BGP_IDENTIFIER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UNSUPPORTED_OPTIONAL_PARAMETER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNSUPPORTED_OPTIONAL_PARAMETER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNSUPPORTED_OPTIONAL_PARAMETER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UNACCEPTABLE_HOLD_TIME': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNACCEPTABLE_HOLD_TIME': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNACCEPTABLE_HOLD_TIME': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UNSUPPORTED_CAPABILITY': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNSUPPORTED_CAPABILITY': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNSUPPORTED_CAPABILITY': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UPDATE_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UPDATE_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UPDATE_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'MALFORMED_ATTRIBUTE_LIST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MALFORMED_ATTRIBUTE_LIST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MALFORMED_ATTRIBUTE_LIST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UNRECOGNIZED_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNRECOGNIZED_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNRECOGNIZED_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'MISSING_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MISSING_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MISSING_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ATTRIBUTE_FLAGS_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ATTRIBUTE_FLAGS_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ATTRIBUTE_FLAGS_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ATTRIBUTE_LENGTH_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ATTRIBUTE_LENGTH_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ATTRIBUTE_LENGTH_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'INVALID_ORIGIN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:INVALID_ORIGIN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:INVALID_ORIGIN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'INVALID_NEXT_HOP_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:INVALID_NEXT_HOP_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:INVALID_NEXT_HOP_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'OPTIONAL_ATTRIBUTE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:OPTIONAL_ATTRIBUTE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:OPTIONAL_ATTRIBUTE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'INVALID_NETWORK_FIELD': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:INVALID_NETWORK_FIELD': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:INVALID_NETWORK_FIELD': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'MALFORMED_AS_PATH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MALFORMED_AS_PATH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MALFORMED_AS_PATH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'FINITE_STATE_MACHINE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:FINITE_STATE_MACHINE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:FINITE_STATE_MACHINE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'RECEIVE_UNEXPECTED_MESSAGE_OPENSENT': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:RECEIVE_UNEXPECTED_MESSAGE_OPENSENT': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:RECEIVE_UNEXPECTED_MESSAGE_OPENSENT': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'RECEIVE_UNEXPECTED_MESSAGE_OPENCONFIRM': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:RECEIVE_UNEXPECTED_MESSAGE_OPENCONFIRM': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:RECEIVE_UNEXPECTED_MESSAGE_OPENCONFIRM': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'RECEIVE_UNEXPECTED_MESSAGE_ESTABLISHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:RECEIVE_UNEXPECTED_MESSAGE_ESTABLISHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:RECEIVE_UNEXPECTED_MESSAGE_ESTABLISHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'CEASE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:CEASE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:CEASE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'MAX_NUM_PREFIXES_REACHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MAX_NUM_PREFIXES_REACHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MAX_NUM_PREFIXES_REACHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ADMINISTRATIVE_SHUTDOWN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ADMINISTRATIVE_SHUTDOWN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ADMINISTRATIVE_SHUTDOWN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'PEER_DE_CONFIGURED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:PEER_DE_CONFIGURED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:PEER_DE_CONFIGURED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ADMINISTRATIVE_RESET': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ADMINISTRATIVE_RESET': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ADMINISTRATIVE_RESET': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'CONNECTION_REJECTED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:CONNECTION_REJECTED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:CONNECTION_REJECTED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'OTHER_CONFIG_CHANGE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:OTHER_CONFIG_CHANGE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:OTHER_CONFIG_CHANGE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'CONN_COLLISION_RESOLUTION': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:CONN_COLLISION_RESOLUTION': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:CONN_COLLISION_RESOLUTION': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'OUT_OF_RESOURCES': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:OUT_OF_RESOURCES': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:OUT_OF_RESOURCES': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ROUTE_REFRESH_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ROUTE_REFRESH_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ROUTE_REFRESH_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'INVALID_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:INVALID_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:INVALID_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="last-notification-error-subcode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'state', 'messages', 'received']

  def _get_UPDATE(self):
    """
    Getter method for UPDATE, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/messages/received/UPDATE (uint64)

    YANG Description: Number of BGP UPDATE messages announcing, withdrawing
or modifying paths exchanged.
    """
    return self.__UPDATE
      
  def _set_UPDATE(self, v, load=False):
    """
    Setter method for UPDATE, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/messages/received/UPDATE (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_UPDATE is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_UPDATE() directly.

    YANG Description: Number of BGP UPDATE messages announcing, withdrawing
or modifying paths exchanged.
    """
    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="UPDATE", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """UPDATE 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="UPDATE", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__UPDATE = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_UPDATE(self):
    self.__UPDATE = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="UPDATE", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_NOTIFICATION(self):
    """
    Getter method for NOTIFICATION, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/messages/received/NOTIFICATION (uint64)

    YANG Description: Number of BGP NOTIFICATION messages indicating an
error condition has occurred exchanged.
    """
    return self.__NOTIFICATION
      
  def _set_NOTIFICATION(self, v, load=False):
    """
    Setter method for NOTIFICATION, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/messages/received/NOTIFICATION (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_NOTIFICATION is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_NOTIFICATION() directly.

    YANG Description: Number of BGP NOTIFICATION messages indicating an
error condition has occurred exchanged.
    """
    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="NOTIFICATION", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """NOTIFICATION 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="NOTIFICATION", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__NOTIFICATION = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_NOTIFICATION(self):
    self.__NOTIFICATION = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="NOTIFICATION", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_last_notification_time(self):
    """
    Getter method for last_notification_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/messages/received/last_notification_time (oc-types:timeticks64)

    YANG Description: This timestamp indicates the time that a NOTIFICATION
message was sent or received on the peering session
(based on whether this leaf is associated with
sent or received messages).

The value is the timestamp in nanoseconds relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    return self.__last_notification_time
      
  def _set_last_notification_time(self, v, load=False):
    """
    Setter method for last_notification_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/messages/received/last_notification_time (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_last_notification_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_last_notification_time() directly.

    YANG Description: This timestamp indicates the time that a NOTIFICATION
message was sent or received on the peering session
(based on whether this leaf is associated with
sent or received messages).

The value is the timestamp in nanoseconds relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    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="last-notification-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """last_notification_time must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-notification-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__last_notification_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_last_notification_time(self):
    self.__last_notification_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-notification-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_last_notification_error_code(self):
    """
    Getter method for last_notification_error_code, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/messages/received/last_notification_error_code (identityref)

    YANG Description: Indicates the last BGP error sent or received on the peering
session (based on whether this leaf is associated with
sent or received messages).
    """
    return self.__last_notification_error_code
      
  def _set_last_notification_error_code(self, v, load=False):
    """
    Setter method for last_notification_error_code, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/messages/received/last_notification_error_code (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_last_notification_error_code is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_last_notification_error_code() directly.

    YANG Description: Indicates the last BGP error sent or received on the peering
session (based on whether this leaf is associated with
sent or received messages).
    """
    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={'MESSAGE_HEADER_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MESSAGE_HEADER_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MESSAGE_HEADER_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'OPEN_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:OPEN_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:OPEN_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UPDATE_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UPDATE_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UPDATE_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'HOLD_TIMER_EXPIRED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:HOLD_TIMER_EXPIRED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:HOLD_TIMER_EXPIRED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'FINITE_STATE_MACHINE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:FINITE_STATE_MACHINE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:FINITE_STATE_MACHINE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'CEASE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:CEASE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:CEASE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ROUTE_REFRESH_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ROUTE_REFRESH_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ROUTE_REFRESH_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="last-notification-error-code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """last_notification_error_code must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MESSAGE_HEADER_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MESSAGE_HEADER_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MESSAGE_HEADER_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'OPEN_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:OPEN_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:OPEN_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UPDATE_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UPDATE_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UPDATE_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'HOLD_TIMER_EXPIRED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:HOLD_TIMER_EXPIRED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:HOLD_TIMER_EXPIRED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'FINITE_STATE_MACHINE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:FINITE_STATE_MACHINE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:FINITE_STATE_MACHINE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'CEASE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:CEASE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:CEASE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ROUTE_REFRESH_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ROUTE_REFRESH_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ROUTE_REFRESH_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="last-notification-error-code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__last_notification_error_code = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_last_notification_error_code(self):
    self.__last_notification_error_code = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MESSAGE_HEADER_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MESSAGE_HEADER_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MESSAGE_HEADER_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'OPEN_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:OPEN_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:OPEN_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UPDATE_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UPDATE_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UPDATE_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'HOLD_TIMER_EXPIRED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:HOLD_TIMER_EXPIRED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:HOLD_TIMER_EXPIRED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'FINITE_STATE_MACHINE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:FINITE_STATE_MACHINE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:FINITE_STATE_MACHINE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'CEASE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:CEASE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:CEASE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ROUTE_REFRESH_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ROUTE_REFRESH_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ROUTE_REFRESH_MESSAGE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="last-notification-error-code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_last_notification_error_subcode(self):
    """
    Getter method for last_notification_error_subcode, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/messages/received/last_notification_error_subcode (identityref)

    YANG Description: Indicates the last BGP error subcode sent or received on
the peering session (based on whether this leaf is associated
with sent or received messages)
    """
    return self.__last_notification_error_subcode
      
  def _set_last_notification_error_subcode(self, v, load=False):
    """
    Setter method for last_notification_error_subcode, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/messages/received/last_notification_error_subcode (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_last_notification_error_subcode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_last_notification_error_subcode() directly.

    YANG Description: Indicates the last BGP error subcode sent or received on
the peering session (based on whether this leaf is associated
with sent or received messages)
    """
    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={'UNSPECIFIC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNSPECIFIC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNSPECIFIC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'MESSAGE_HEADER_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MESSAGE_HEADER_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MESSAGE_HEADER_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'CONNECTION_NOT_SYNCHRONIZED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:CONNECTION_NOT_SYNCHRONIZED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:CONNECTION_NOT_SYNCHRONIZED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'BAD_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:BAD_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:BAD_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'BAD_MESSAGE_TYPE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:BAD_MESSAGE_TYPE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:BAD_MESSAGE_TYPE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'OPEN_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:OPEN_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:OPEN_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UNSUPPORTED_VERSION_NUMBER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNSUPPORTED_VERSION_NUMBER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNSUPPORTED_VERSION_NUMBER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'BAD_PEER_AS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:BAD_PEER_AS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:BAD_PEER_AS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'BAD_BGP_IDENTIFIER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:BAD_BGP_IDENTIFIER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:BAD_BGP_IDENTIFIER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UNSUPPORTED_OPTIONAL_PARAMETER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNSUPPORTED_OPTIONAL_PARAMETER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNSUPPORTED_OPTIONAL_PARAMETER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UNACCEPTABLE_HOLD_TIME': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNACCEPTABLE_HOLD_TIME': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNACCEPTABLE_HOLD_TIME': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UNSUPPORTED_CAPABILITY': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNSUPPORTED_CAPABILITY': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNSUPPORTED_CAPABILITY': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UPDATE_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UPDATE_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UPDATE_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'MALFORMED_ATTRIBUTE_LIST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MALFORMED_ATTRIBUTE_LIST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MALFORMED_ATTRIBUTE_LIST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UNRECOGNIZED_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNRECOGNIZED_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNRECOGNIZED_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'MISSING_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MISSING_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MISSING_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ATTRIBUTE_FLAGS_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ATTRIBUTE_FLAGS_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ATTRIBUTE_FLAGS_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ATTRIBUTE_LENGTH_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ATTRIBUTE_LENGTH_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ATTRIBUTE_LENGTH_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'INVALID_ORIGIN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:INVALID_ORIGIN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:INVALID_ORIGIN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'INVALID_NEXT_HOP_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:INVALID_NEXT_HOP_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:INVALID_NEXT_HOP_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'OPTIONAL_ATTRIBUTE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:OPTIONAL_ATTRIBUTE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:OPTIONAL_ATTRIBUTE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'INVALID_NETWORK_FIELD': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:INVALID_NETWORK_FIELD': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:INVALID_NETWORK_FIELD': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'MALFORMED_AS_PATH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MALFORMED_AS_PATH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MALFORMED_AS_PATH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'FINITE_STATE_MACHINE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:FINITE_STATE_MACHINE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:FINITE_STATE_MACHINE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'RECEIVE_UNEXPECTED_MESSAGE_OPENSENT': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:RECEIVE_UNEXPECTED_MESSAGE_OPENSENT': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:RECEIVE_UNEXPECTED_MESSAGE_OPENSENT': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'RECEIVE_UNEXPECTED_MESSAGE_OPENCONFIRM': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:RECEIVE_UNEXPECTED_MESSAGE_OPENCONFIRM': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:RECEIVE_UNEXPECTED_MESSAGE_OPENCONFIRM': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'RECEIVE_UNEXPECTED_MESSAGE_ESTABLISHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:RECEIVE_UNEXPECTED_MESSAGE_ESTABLISHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:RECEIVE_UNEXPECTED_MESSAGE_ESTABLISHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'CEASE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:CEASE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:CEASE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'MAX_NUM_PREFIXES_REACHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MAX_NUM_PREFIXES_REACHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MAX_NUM_PREFIXES_REACHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ADMINISTRATIVE_SHUTDOWN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ADMINISTRATIVE_SHUTDOWN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ADMINISTRATIVE_SHUTDOWN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'PEER_DE_CONFIGURED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:PEER_DE_CONFIGURED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:PEER_DE_CONFIGURED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ADMINISTRATIVE_RESET': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ADMINISTRATIVE_RESET': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ADMINISTRATIVE_RESET': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'CONNECTION_REJECTED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:CONNECTION_REJECTED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:CONNECTION_REJECTED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'OTHER_CONFIG_CHANGE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:OTHER_CONFIG_CHANGE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:OTHER_CONFIG_CHANGE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'CONN_COLLISION_RESOLUTION': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:CONN_COLLISION_RESOLUTION': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:CONN_COLLISION_RESOLUTION': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'OUT_OF_RESOURCES': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:OUT_OF_RESOURCES': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:OUT_OF_RESOURCES': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ROUTE_REFRESH_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ROUTE_REFRESH_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ROUTE_REFRESH_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'INVALID_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:INVALID_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:INVALID_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="last-notification-error-subcode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """last_notification_error_subcode must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNSPECIFIC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNSPECIFIC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNSPECIFIC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'MESSAGE_HEADER_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MESSAGE_HEADER_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MESSAGE_HEADER_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'CONNECTION_NOT_SYNCHRONIZED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:CONNECTION_NOT_SYNCHRONIZED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:CONNECTION_NOT_SYNCHRONIZED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'BAD_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:BAD_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:BAD_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'BAD_MESSAGE_TYPE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:BAD_MESSAGE_TYPE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:BAD_MESSAGE_TYPE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'OPEN_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:OPEN_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:OPEN_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UNSUPPORTED_VERSION_NUMBER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNSUPPORTED_VERSION_NUMBER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNSUPPORTED_VERSION_NUMBER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'BAD_PEER_AS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:BAD_PEER_AS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:BAD_PEER_AS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'BAD_BGP_IDENTIFIER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:BAD_BGP_IDENTIFIER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:BAD_BGP_IDENTIFIER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UNSUPPORTED_OPTIONAL_PARAMETER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNSUPPORTED_OPTIONAL_PARAMETER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNSUPPORTED_OPTIONAL_PARAMETER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UNACCEPTABLE_HOLD_TIME': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNACCEPTABLE_HOLD_TIME': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNACCEPTABLE_HOLD_TIME': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UNSUPPORTED_CAPABILITY': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNSUPPORTED_CAPABILITY': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNSUPPORTED_CAPABILITY': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UPDATE_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UPDATE_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UPDATE_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'MALFORMED_ATTRIBUTE_LIST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MALFORMED_ATTRIBUTE_LIST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MALFORMED_ATTRIBUTE_LIST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UNRECOGNIZED_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNRECOGNIZED_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNRECOGNIZED_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'MISSING_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MISSING_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MISSING_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ATTRIBUTE_FLAGS_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ATTRIBUTE_FLAGS_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ATTRIBUTE_FLAGS_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ATTRIBUTE_LENGTH_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ATTRIBUTE_LENGTH_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ATTRIBUTE_LENGTH_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'INVALID_ORIGIN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:INVALID_ORIGIN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:INVALID_ORIGIN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'INVALID_NEXT_HOP_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:INVALID_NEXT_HOP_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:INVALID_NEXT_HOP_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'OPTIONAL_ATTRIBUTE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:OPTIONAL_ATTRIBUTE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:OPTIONAL_ATTRIBUTE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'INVALID_NETWORK_FIELD': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:INVALID_NETWORK_FIELD': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:INVALID_NETWORK_FIELD': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'MALFORMED_AS_PATH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MALFORMED_AS_PATH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MALFORMED_AS_PATH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'FINITE_STATE_MACHINE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:FINITE_STATE_MACHINE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:FINITE_STATE_MACHINE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'RECEIVE_UNEXPECTED_MESSAGE_OPENSENT': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:RECEIVE_UNEXPECTED_MESSAGE_OPENSENT': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:RECEIVE_UNEXPECTED_MESSAGE_OPENSENT': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'RECEIVE_UNEXPECTED_MESSAGE_OPENCONFIRM': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:RECEIVE_UNEXPECTED_MESSAGE_OPENCONFIRM': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:RECEIVE_UNEXPECTED_MESSAGE_OPENCONFIRM': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'RECEIVE_UNEXPECTED_MESSAGE_ESTABLISHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:RECEIVE_UNEXPECTED_MESSAGE_ESTABLISHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:RECEIVE_UNEXPECTED_MESSAGE_ESTABLISHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'CEASE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:CEASE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:CEASE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'MAX_NUM_PREFIXES_REACHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MAX_NUM_PREFIXES_REACHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MAX_NUM_PREFIXES_REACHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ADMINISTRATIVE_SHUTDOWN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ADMINISTRATIVE_SHUTDOWN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ADMINISTRATIVE_SHUTDOWN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'PEER_DE_CONFIGURED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:PEER_DE_CONFIGURED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:PEER_DE_CONFIGURED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ADMINISTRATIVE_RESET': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ADMINISTRATIVE_RESET': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ADMINISTRATIVE_RESET': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'CONNECTION_REJECTED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:CONNECTION_REJECTED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:CONNECTION_REJECTED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'OTHER_CONFIG_CHANGE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:OTHER_CONFIG_CHANGE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:OTHER_CONFIG_CHANGE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'CONN_COLLISION_RESOLUTION': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:CONN_COLLISION_RESOLUTION': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:CONN_COLLISION_RESOLUTION': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'OUT_OF_RESOURCES': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:OUT_OF_RESOURCES': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:OUT_OF_RESOURCES': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ROUTE_REFRESH_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ROUTE_REFRESH_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ROUTE_REFRESH_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'INVALID_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:INVALID_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:INVALID_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="last-notification-error-subcode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__last_notification_error_subcode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_last_notification_error_subcode(self):
    self.__last_notification_error_subcode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNSPECIFIC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNSPECIFIC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNSPECIFIC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'MESSAGE_HEADER_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MESSAGE_HEADER_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MESSAGE_HEADER_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'CONNECTION_NOT_SYNCHRONIZED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:CONNECTION_NOT_SYNCHRONIZED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:CONNECTION_NOT_SYNCHRONIZED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'BAD_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:BAD_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:BAD_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'BAD_MESSAGE_TYPE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:BAD_MESSAGE_TYPE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:BAD_MESSAGE_TYPE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'OPEN_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:OPEN_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:OPEN_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UNSUPPORTED_VERSION_NUMBER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNSUPPORTED_VERSION_NUMBER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNSUPPORTED_VERSION_NUMBER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'BAD_PEER_AS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:BAD_PEER_AS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:BAD_PEER_AS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'BAD_BGP_IDENTIFIER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:BAD_BGP_IDENTIFIER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:BAD_BGP_IDENTIFIER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UNSUPPORTED_OPTIONAL_PARAMETER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNSUPPORTED_OPTIONAL_PARAMETER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNSUPPORTED_OPTIONAL_PARAMETER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UNACCEPTABLE_HOLD_TIME': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNACCEPTABLE_HOLD_TIME': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNACCEPTABLE_HOLD_TIME': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UNSUPPORTED_CAPABILITY': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNSUPPORTED_CAPABILITY': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNSUPPORTED_CAPABILITY': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UPDATE_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UPDATE_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UPDATE_MESSAGE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'MALFORMED_ATTRIBUTE_LIST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MALFORMED_ATTRIBUTE_LIST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MALFORMED_ATTRIBUTE_LIST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'UNRECOGNIZED_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:UNRECOGNIZED_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:UNRECOGNIZED_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'MISSING_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MISSING_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MISSING_WELL_KNOWN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ATTRIBUTE_FLAGS_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ATTRIBUTE_FLAGS_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ATTRIBUTE_FLAGS_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ATTRIBUTE_LENGTH_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ATTRIBUTE_LENGTH_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ATTRIBUTE_LENGTH_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'INVALID_ORIGIN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:INVALID_ORIGIN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:INVALID_ORIGIN_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'INVALID_NEXT_HOP_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:INVALID_NEXT_HOP_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:INVALID_NEXT_HOP_ATTRIBUTE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'OPTIONAL_ATTRIBUTE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:OPTIONAL_ATTRIBUTE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:OPTIONAL_ATTRIBUTE_ERROR': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'INVALID_NETWORK_FIELD': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:INVALID_NETWORK_FIELD': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:INVALID_NETWORK_FIELD': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'MALFORMED_AS_PATH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MALFORMED_AS_PATH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MALFORMED_AS_PATH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'FINITE_STATE_MACHINE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:FINITE_STATE_MACHINE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:FINITE_STATE_MACHINE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'RECEIVE_UNEXPECTED_MESSAGE_OPENSENT': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:RECEIVE_UNEXPECTED_MESSAGE_OPENSENT': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:RECEIVE_UNEXPECTED_MESSAGE_OPENSENT': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'RECEIVE_UNEXPECTED_MESSAGE_OPENCONFIRM': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:RECEIVE_UNEXPECTED_MESSAGE_OPENCONFIRM': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:RECEIVE_UNEXPECTED_MESSAGE_OPENCONFIRM': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'RECEIVE_UNEXPECTED_MESSAGE_ESTABLISHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:RECEIVE_UNEXPECTED_MESSAGE_ESTABLISHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:RECEIVE_UNEXPECTED_MESSAGE_ESTABLISHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'CEASE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:CEASE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:CEASE_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'MAX_NUM_PREFIXES_REACHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MAX_NUM_PREFIXES_REACHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MAX_NUM_PREFIXES_REACHED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ADMINISTRATIVE_SHUTDOWN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ADMINISTRATIVE_SHUTDOWN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ADMINISTRATIVE_SHUTDOWN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'PEER_DE_CONFIGURED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:PEER_DE_CONFIGURED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:PEER_DE_CONFIGURED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ADMINISTRATIVE_RESET': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ADMINISTRATIVE_RESET': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ADMINISTRATIVE_RESET': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'CONNECTION_REJECTED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:CONNECTION_REJECTED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:CONNECTION_REJECTED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'OTHER_CONFIG_CHANGE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:OTHER_CONFIG_CHANGE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:OTHER_CONFIG_CHANGE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'CONN_COLLISION_RESOLUTION': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:CONN_COLLISION_RESOLUTION': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:CONN_COLLISION_RESOLUTION': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'OUT_OF_RESOURCES': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:OUT_OF_RESOURCES': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:OUT_OF_RESOURCES': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ROUTE_REFRESH_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ROUTE_REFRESH_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ROUTE_REFRESH_SUBCODE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'INVALID_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:INVALID_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:INVALID_MESSAGE_LENGTH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="last-notification-error-subcode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  UPDATE = __builtin__.property(_get_UPDATE)
  NOTIFICATION = __builtin__.property(_get_NOTIFICATION)
  last_notification_time = __builtin__.property(_get_last_notification_time)
  last_notification_error_code = __builtin__.property(_get_last_notification_error_code)
  last_notification_error_subcode = __builtin__.property(_get_last_notification_error_subcode)


  _pyangbind_elements = OrderedDict([('UPDATE', UPDATE), ('NOTIFICATION', NOTIFICATION), ('last_notification_time', last_notification_time), ('last_notification_error_code', last_notification_error_code), ('last_notification_error_subcode', last_notification_error_subcode), ])


class yc_messages_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_state_messages(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/messages. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Counters for BGP messages sent and received from the
neighbor
  """
  __slots__ = ('_path_helper', '_extmethods', '__sent','__received',)

  _yang_name = 'messages'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__sent = YANGDynClass(base=yc_sent_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_state_messages_sent, is_container='container', yang_name="sent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__received = YANGDynClass(base=yc_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_state_messages_received, is_container='container', yang_name="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'state', 'messages']

  def _get_sent(self):
    """
    Getter method for sent, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/messages/sent (container)

    YANG Description: Counters relating to BGP messages sent to the neighbor
    """
    return self.__sent
      
  def _set_sent(self, v, load=False):
    """
    Setter method for sent, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/messages/sent (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sent() directly.

    YANG Description: Counters relating to BGP messages sent to the neighbor
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_sent_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_state_messages_sent, is_container='container', yang_name="sent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sent must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_sent_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_state_messages_sent, is_container='container', yang_name="sent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__sent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sent(self):
    self.__sent = YANGDynClass(base=yc_sent_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_state_messages_sent, is_container='container', yang_name="sent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_received(self):
    """
    Getter method for received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/messages/received (container)

    YANG Description: Counters for BGP messages received from the neighbor
    """
    return self.__received
      
  def _set_received(self, v, load=False):
    """
    Setter method for received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/messages/received (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_received() directly.

    YANG Description: Counters for BGP messages received from the neighbor
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_state_messages_received, is_container='container', yang_name="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """received must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_state_messages_received, is_container='container', yang_name="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_received(self):
    self.__received = YANGDynClass(base=yc_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_state_messages_received, is_container='container', yang_name="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  sent = __builtin__.property(_get_sent)
  received = __builtin__.property(_get_received)


  _pyangbind_elements = OrderedDict([('sent', sent), ('received', received), ])


class yc_queues_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_state_queues(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/queues. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Counters related to queued messages associated with the
BGP neighbor
  """
  __slots__ = ('_path_helper', '_extmethods', '__input','__output',)

  _yang_name = 'queues'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__input = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="input", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__output = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="output", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'state', 'queues']

  def _get_input(self):
    """
    Getter method for input, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/queues/input (uint32)

    YANG Description: The number of messages received from the peer currently
queued
    """
    return self.__input
      
  def _set_input(self, v, load=False):
    """
    Setter method for input, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/queues/input (uint32)
    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: The number of messages received from the peer currently
queued
    """
    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="input", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """input 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="input", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__input = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_input(self):
    self.__input = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="input", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_output(self):
    """
    Getter method for output, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/queues/output (uint32)

    YANG Description: The number of messages queued to be sent to the peer
    """
    return self.__output
      
  def _set_output(self, v, load=False):
    """
    Setter method for output, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/queues/output (uint32)
    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: The number of messages queued to be sent to the peer
    """
    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="output", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """output 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="output", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__output = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_output(self):
    self.__output = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="output", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  input = __builtin__.property(_get_input)
  output = __builtin__.property(_get_output)


  _pyangbind_elements = OrderedDict([('input', input), ('output', output), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the BGP neighbor
  """
  __slots__ = ('_path_helper', '_extmethods', '__peer_group','__neighbor_address','__neighbor_port','__enabled','__peer_as','__local_as','__peer_type','__auth_password','__remove_private_as','__route_flap_damping','__send_community','__description','__session_state','__last_established','__established_transitions','__supported_capabilities','__messages','__queues','__dynamically_configured','__last_prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__peer_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__neighbor_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}'}),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}|:))'}),], is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__neighbor_port = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(179), is_leaf=True, yang_name="neighbor-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:port-number', is_config=False)
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__peer_as = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="peer-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)
    self.__local_as = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="local-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)
    self.__peer_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}, 'EXTERNAL': {}},), is_leaf=True, yang_name="peer-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:peer-type', is_config=False)
    self.__auth_password = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="auth-password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=False)
    self.__remove_private_as = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="remove-private-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:remove-private-as-option', is_config=False)
    self.__route_flap_damping = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="route-flap-damping", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__send_community = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STANDARD': {}, 'EXTENDED': {}, 'BOTH': {}, 'NONE': {}},), default=six.text_type("NONE"), is_leaf=True, yang_name="send-community", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:community-type', is_config=False)
    self.__description = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__session_state = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IDLE': {}, 'CONNECT': {}, 'ACTIVE': {}, 'OPENSENT': {}, 'OPENCONFIRM': {}, 'ESTABLISHED': {}},), is_leaf=True, yang_name="session-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__last_established = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-established", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__established_transitions = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="established-transitions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    self.__supported_capabilities = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MPBGP': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MPBGP': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MPBGP': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ROUTE_REFRESH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ROUTE_REFRESH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ROUTE_REFRESH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ASN32': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ASN32': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ASN32': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'GRACEFUL_RESTART': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:GRACEFUL_RESTART': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:GRACEFUL_RESTART': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ADD_PATHS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ADD_PATHS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ADD_PATHS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'EXTENDED_NEXTHOP_ENCODING': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:EXTENDED_NEXTHOP_ENCODING': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:EXTENDED_NEXTHOP_ENCODING': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},)), is_leaf=False, yang_name="supported-capabilities", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__messages = YANGDynClass(base=yc_messages_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_state_messages, is_container='container', yang_name="messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__queues = YANGDynClass(base=yc_queues_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_state_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__dynamically_configured = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="dynamically-configured", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__last_prefix_limit_exceeded = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'state']

  def _get_peer_group(self):
    """
    Getter method for peer_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/peer_group (leafref)

    YANG Description: The peer-group with which this neighbor is associated
    """
    return self.__peer_group
      
  def _set_peer_group(self, v, load=False):
    """
    Setter method for peer_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/peer_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_group() directly.

    YANG Description: The peer-group with which this neighbor is associated
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="peer-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__peer_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_group(self):
    self.__peer_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_neighbor_address(self):
    """
    Getter method for neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/neighbor_address (oc-inet:ip-address)

    YANG Description: Address of the BGP peer, either in IPv4 or IPv6
    """
    return self.__neighbor_address
      
  def _set_neighbor_address(self, v, load=False):
    """
    Setter method for neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/neighbor_address (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor_address() directly.

    YANG Description: Address of the BGP peer, either in IPv4 or IPv6
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor_address must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__neighbor_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor_address(self):
    self.__neighbor_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}'}),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}|:))'}),], is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_neighbor_port(self):
    """
    Getter method for neighbor_port, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/neighbor_port (oc-inet:port-number)

    YANG Description: Port number of the BGP peer
    """
    return self.__neighbor_port
      
  def _set_neighbor_port(self, v, load=False):
    """
    Setter method for neighbor_port, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/neighbor_port (oc-inet:port-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor_port is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor_port() directly.

    YANG Description: Port number of the BGP peer
    """
    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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(179), is_leaf=True, yang_name="neighbor-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:port-number', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor_port must be of a type compatible with oc-inet:port-number""",
          'defined-type': "oc-inet:port-number",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(179), is_leaf=True, yang_name="neighbor-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:port-number', is_config=False)""",
        })

    self.__neighbor_port = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor_port(self):
    self.__neighbor_port = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(179), is_leaf=True, yang_name="neighbor-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:port-number', is_config=False)


  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/enabled (boolean)

    YANG Description: Whether the BGP peer is enabled. In cases where the
enabled leaf is set to false, the local system should not
initiate connections to the neighbor, and should not
respond to TCP connections attempts from the neighbor. If
the state of the BGP session is ESTABLISHED at the time
that this leaf is set to false, the BGP session should be
ceased.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: Whether the BGP peer is enabled. In cases where the
enabled leaf is set to false, the local system should not
initiate connections to the neighbor, and should not
respond to TCP connections attempts from the neighbor. If
the state of the BGP session is ESTABLISHED at the time
that this leaf is set to false, the BGP session should be
ceased.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_peer_as(self):
    """
    Getter method for peer_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/peer_as (oc-inet:as-number)

    YANG Description: AS number of the peer.
    """
    return self.__peer_as
      
  def _set_peer_as(self, v, load=False):
    """
    Setter method for peer_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/peer_as (oc-inet:as-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_as is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_as() directly.

    YANG Description: AS number of the peer.
    """
    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="peer-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_as must be of a type compatible with oc-inet:as-number""",
          'defined-type': "oc-inet:as-number",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="peer-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)""",
        })

    self.__peer_as = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_as(self):
    self.__peer_as = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="peer-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)


  def _get_local_as(self):
    """
    Getter method for local_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/local_as (oc-inet:as-number)

    YANG Description: The local autonomous system number that is to be used
when establishing sessions with the remote peer or peer
group, if this differs from the global BGP router
autonomous system number.
    """
    return self.__local_as
      
  def _set_local_as(self, v, load=False):
    """
    Setter method for local_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/local_as (oc-inet:as-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_as is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_as() directly.

    YANG Description: The local autonomous system number that is to be used
when establishing sessions with the remote peer or peer
group, if this differs from the global BGP router
autonomous system number.
    """
    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="local-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_as must be of a type compatible with oc-inet:as-number""",
          'defined-type': "oc-inet:as-number",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="local-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)""",
        })

    self.__local_as = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_as(self):
    self.__local_as = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="local-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)


  def _get_peer_type(self):
    """
    Getter method for peer_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/peer_type (oc-bgp-types:peer-type)

    YANG Description: Explicitly designate the peer or peer group as internal
(iBGP) or external (eBGP).
    """
    return self.__peer_type
      
  def _set_peer_type(self, v, load=False):
    """
    Setter method for peer_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/peer_type (oc-bgp-types:peer-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_type() directly.

    YANG Description: Explicitly designate the peer or peer group as internal
(iBGP) or external (eBGP).
    """
    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={'INTERNAL': {}, 'EXTERNAL': {}},), is_leaf=True, yang_name="peer-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:peer-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_type must be of a type compatible with oc-bgp-types:peer-type""",
          'defined-type': "oc-bgp-types:peer-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}, 'EXTERNAL': {}},), is_leaf=True, yang_name="peer-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:peer-type', is_config=False)""",
        })

    self.__peer_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_type(self):
    self.__peer_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}, 'EXTERNAL': {}},), is_leaf=True, yang_name="peer-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:peer-type', is_config=False)


  def _get_auth_password(self):
    """
    Getter method for auth_password, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/auth_password (oc-types:routing-password)

    YANG Description: Configures an MD5 authentication password for use with
neighboring devices.
    """
    return self.__auth_password
      
  def _set_auth_password(self, v, load=False):
    """
    Setter method for auth_password, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/auth_password (oc-types:routing-password)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_auth_password is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_auth_password() directly.

    YANG Description: Configures an MD5 authentication password for use with
neighboring devices.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="auth-password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """auth_password must be of a type compatible with oc-types:routing-password""",
          'defined-type': "oc-types:routing-password",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="auth-password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=False)""",
        })

    self.__auth_password = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_auth_password(self):
    self.__auth_password = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="auth-password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=False)


  def _get_remove_private_as(self):
    """
    Getter method for remove_private_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/remove_private_as (oc-bgp-types:remove-private-as-option)

    YANG Description: Remove private AS numbers from updates sent to peers - when
this leaf is not specified, the AS_PATH attribute should be
sent to the peer unchanged
    """
    return self.__remove_private_as
      
  def _set_remove_private_as(self, v, load=False):
    """
    Setter method for remove_private_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/remove_private_as (oc-bgp-types:remove-private-as-option)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_remove_private_as is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_remove_private_as() directly.

    YANG Description: Remove private AS numbers from updates sent to peers - when
this leaf is not specified, the AS_PATH attribute should be
sent to the peer unchanged
    """
    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={'PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="remove-private-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:remove-private-as-option', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """remove_private_as must be of a type compatible with oc-bgp-types:remove-private-as-option""",
          'defined-type': "oc-bgp-types:remove-private-as-option",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="remove-private-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:remove-private-as-option', is_config=False)""",
        })

    self.__remove_private_as = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_remove_private_as(self):
    self.__remove_private_as = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="remove-private-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:remove-private-as-option', is_config=False)


  def _get_route_flap_damping(self):
    """
    Getter method for route_flap_damping, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/route_flap_damping (boolean)

    YANG Description: Enable route flap damping.
    """
    return self.__route_flap_damping
      
  def _set_route_flap_damping(self, v, load=False):
    """
    Setter method for route_flap_damping, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/route_flap_damping (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route_flap_damping is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route_flap_damping() directly.

    YANG Description: Enable route flap damping.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="route-flap-damping", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route_flap_damping must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="route-flap-damping", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__route_flap_damping = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route_flap_damping(self):
    self.__route_flap_damping = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="route-flap-damping", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_send_community(self):
    """
    Getter method for send_community, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/send_community (oc-bgp-types:community-type)

    YANG Description: Specify which types of community should be sent to the
neighbor or group. The default is to not send the
community attribute
    """
    return self.__send_community
      
  def _set_send_community(self, v, load=False):
    """
    Setter method for send_community, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/send_community (oc-bgp-types:community-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_send_community is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_send_community() directly.

    YANG Description: Specify which types of community should be sent to the
neighbor or group. The default is to not send the
community attribute
    """
    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={'STANDARD': {}, 'EXTENDED': {}, 'BOTH': {}, 'NONE': {}},), default=six.text_type("NONE"), is_leaf=True, yang_name="send-community", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:community-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """send_community must be of a type compatible with oc-bgp-types:community-type""",
          'defined-type': "oc-bgp-types:community-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STANDARD': {}, 'EXTENDED': {}, 'BOTH': {}, 'NONE': {}},), default=six.text_type("NONE"), is_leaf=True, yang_name="send-community", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:community-type', is_config=False)""",
        })

    self.__send_community = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_send_community(self):
    self.__send_community = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STANDARD': {}, 'EXTENDED': {}, 'BOTH': {}, 'NONE': {}},), default=six.text_type("NONE"), is_leaf=True, yang_name="send-community", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:community-type', is_config=False)


  def _get_description(self):
    """
    Getter method for description, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/description (string)

    YANG Description: An optional textual description (intended primarily for use
with a peer or group
    """
    return self.__description
      
  def _set_description(self, v, load=False):
    """
    Setter method for description, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/description (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_description is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_description() directly.

    YANG Description: An optional textual description (intended primarily for use
with a peer or group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """description must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__description = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_description(self):
    self.__description = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_session_state(self):
    """
    Getter method for session_state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/session_state (enumeration)

    YANG Description: Operational state of the BGP peer
    """
    return self.__session_state
      
  def _set_session_state(self, v, load=False):
    """
    Setter method for session_state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/session_state (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_session_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_session_state() directly.

    YANG Description: Operational state of the BGP peer
    """
    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={'IDLE': {}, 'CONNECT': {}, 'ACTIVE': {}, 'OPENSENT': {}, 'OPENCONFIRM': {}, 'ESTABLISHED': {}},), is_leaf=True, yang_name="session-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """session_state must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IDLE': {}, 'CONNECT': {}, 'ACTIVE': {}, 'OPENSENT': {}, 'OPENCONFIRM': {}, 'ESTABLISHED': {}},), is_leaf=True, yang_name="session-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__session_state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_session_state(self):
    self.__session_state = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IDLE': {}, 'CONNECT': {}, 'ACTIVE': {}, 'OPENSENT': {}, 'OPENCONFIRM': {}, 'ESTABLISHED': {}},), is_leaf=True, yang_name="session-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_last_established(self):
    """
    Getter method for last_established, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/last_established (oc-types:timeticks64)

    YANG Description: This timestamp indicates the time that the
BGP session last transitioned in or out of the Established
state.  The value is the timestamp in nanoseconds relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).

The BGP session uptime can be computed by clients as the
difference between this value and the current time in UTC
(assuming the session is in the ESTABLISHED state, per the
session-state leaf).
    """
    return self.__last_established
      
  def _set_last_established(self, v, load=False):
    """
    Setter method for last_established, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/last_established (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_last_established is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_last_established() directly.

    YANG Description: This timestamp indicates the time that the
BGP session last transitioned in or out of the Established
state.  The value is the timestamp in nanoseconds relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).

The BGP session uptime can be computed by clients as the
difference between this value and the current time in UTC
(assuming the session is in the ESTABLISHED state, per the
session-state leaf).
    """
    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="last-established", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """last_established must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-established", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__last_established = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_last_established(self):
    self.__last_established = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-established", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_established_transitions(self):
    """
    Getter method for established_transitions, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/established_transitions (oc-yang:counter64)

    YANG Description: Number of transitions to the Established state for
the neighbor session.  This value is analogous to the
bgpPeerFsmEstablishedTransitions object from the standard
BGP-4 MIB
    """
    return self.__established_transitions
      
  def _set_established_transitions(self, v, load=False):
    """
    Setter method for established_transitions, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/established_transitions (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_established_transitions is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_established_transitions() directly.

    YANG Description: Number of transitions to the Established state for
the neighbor session.  This value is analogous to the
bgpPeerFsmEstablishedTransitions object from the standard
BGP-4 MIB
    """
    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="established-transitions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """established_transitions 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="established-transitions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__established_transitions = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_established_transitions(self):
    self.__established_transitions = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="established-transitions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_supported_capabilities(self):
    """
    Getter method for supported_capabilities, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/supported_capabilities (identityref)

    YANG Description: BGP capabilities negotiated as supported with the peer
    """
    return self.__supported_capabilities
      
  def _set_supported_capabilities(self, v, load=False):
    """
    Setter method for supported_capabilities, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/supported_capabilities (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_supported_capabilities is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_supported_capabilities() directly.

    YANG Description: BGP capabilities negotiated as supported with the peer
    """
    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={'MPBGP': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MPBGP': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MPBGP': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ROUTE_REFRESH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ROUTE_REFRESH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ROUTE_REFRESH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ASN32': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ASN32': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ASN32': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'GRACEFUL_RESTART': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:GRACEFUL_RESTART': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:GRACEFUL_RESTART': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ADD_PATHS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ADD_PATHS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ADD_PATHS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'EXTENDED_NEXTHOP_ENCODING': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:EXTENDED_NEXTHOP_ENCODING': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:EXTENDED_NEXTHOP_ENCODING': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},)), is_leaf=False, yang_name="supported-capabilities", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """supported_capabilities must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MPBGP': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MPBGP': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MPBGP': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ROUTE_REFRESH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ROUTE_REFRESH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ROUTE_REFRESH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ASN32': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ASN32': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ASN32': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'GRACEFUL_RESTART': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:GRACEFUL_RESTART': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:GRACEFUL_RESTART': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ADD_PATHS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ADD_PATHS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ADD_PATHS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'EXTENDED_NEXTHOP_ENCODING': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:EXTENDED_NEXTHOP_ENCODING': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:EXTENDED_NEXTHOP_ENCODING': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},)), is_leaf=False, yang_name="supported-capabilities", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__supported_capabilities = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_supported_capabilities(self):
    self.__supported_capabilities = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MPBGP': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:MPBGP': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:MPBGP': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ROUTE_REFRESH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ROUTE_REFRESH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ROUTE_REFRESH': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ASN32': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ASN32': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ASN32': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'GRACEFUL_RESTART': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:GRACEFUL_RESTART': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:GRACEFUL_RESTART': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'ADD_PATHS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:ADD_PATHS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:ADD_PATHS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'EXTENDED_NEXTHOP_ENCODING': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:EXTENDED_NEXTHOP_ENCODING': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:EXTENDED_NEXTHOP_ENCODING': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},)), is_leaf=False, yang_name="supported-capabilities", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_messages(self):
    """
    Getter method for messages, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/messages (container)

    YANG Description: Counters for BGP messages sent and received from the
neighbor
    """
    return self.__messages
      
  def _set_messages(self, v, load=False):
    """
    Setter method for messages, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/messages (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_messages() directly.

    YANG Description: Counters for BGP messages sent and received from the
neighbor
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_messages_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_state_messages, is_container='container', yang_name="messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """messages must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_messages_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_state_messages, is_container='container', yang_name="messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_messages(self):
    self.__messages = YANGDynClass(base=yc_messages_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_state_messages, is_container='container', yang_name="messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_queues(self):
    """
    Getter method for queues, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/queues (container)

    YANG Description: Counters related to queued messages associated with the
BGP neighbor
    """
    return self.__queues
      
  def _set_queues(self, v, load=False):
    """
    Setter method for queues, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/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: Counters related to queued messages associated with the
BGP neighbor
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_queues_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_state_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_state_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__queues = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queues(self):
    self.__queues = YANGDynClass(base=yc_queues_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_state_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_dynamically_configured(self):
    """
    Getter method for dynamically_configured, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/dynamically_configured (boolean)

    YANG Description: When this leaf is set to true, the peer was configured dynamically
due to an inbound connection request from a specified source prefix
within a dynamic-neighbor-prefix.
    """
    return self.__dynamically_configured
      
  def _set_dynamically_configured(self, v, load=False):
    """
    Setter method for dynamically_configured, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/dynamically_configured (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dynamically_configured is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dynamically_configured() directly.

    YANG Description: When this leaf is set to true, the peer was configured dynamically
due to an inbound connection request from a specified source prefix
within a dynamic-neighbor-prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="dynamically-configured", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dynamically_configured must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="dynamically-configured", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__dynamically_configured = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dynamically_configured(self):
    self.__dynamically_configured = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="dynamically-configured", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_last_prefix_limit_exceeded(self):
    """
    Getter method for last_prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/last_prefix_limit_exceeded (oc-types:timeticks64)

    YANG Description: This timestamp indicates the time that the BGP session last
violated a configured max prefix-limit for any AFI/SAFI combination
on the session.  The value is the timestamp in nanoseconds relative
to the Unix Epoch (Jan 1, 1970 00:00:00 UTC).

If the 'prefix-limit-exceeded' node is set to true for any AFI/SAFI
on the session, then the next restart time for the session can be
calculated as this value plus the configured 'restart-time' under
the neighbor timers.

This value should be retained across established sessions and is only
set/updated when prefix-limit-exceeded transitions from false/unset to
true.
    """
    return self.__last_prefix_limit_exceeded
      
  def _set_last_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for last_prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state/last_prefix_limit_exceeded (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_last_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_last_prefix_limit_exceeded() directly.

    YANG Description: This timestamp indicates the time that the BGP session last
violated a configured max prefix-limit for any AFI/SAFI combination
on the session.  The value is the timestamp in nanoseconds relative
to the Unix Epoch (Jan 1, 1970 00:00:00 UTC).

If the 'prefix-limit-exceeded' node is set to true for any AFI/SAFI
on the session, then the next restart time for the session can be
calculated as this value plus the configured 'restart-time' under
the neighbor timers.

This value should be retained across established sessions and is only
set/updated when prefix-limit-exceeded transitions from false/unset to
true.
    """
    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="last-prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """last_prefix_limit_exceeded must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__last_prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_last_prefix_limit_exceeded(self):
    self.__last_prefix_limit_exceeded = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)

  peer_group = __builtin__.property(_get_peer_group)
  neighbor_address = __builtin__.property(_get_neighbor_address)
  neighbor_port = __builtin__.property(_get_neighbor_port)
  enabled = __builtin__.property(_get_enabled)
  peer_as = __builtin__.property(_get_peer_as)
  local_as = __builtin__.property(_get_local_as)
  peer_type = __builtin__.property(_get_peer_type)
  auth_password = __builtin__.property(_get_auth_password)
  remove_private_as = __builtin__.property(_get_remove_private_as)
  route_flap_damping = __builtin__.property(_get_route_flap_damping)
  send_community = __builtin__.property(_get_send_community)
  description = __builtin__.property(_get_description)
  session_state = __builtin__.property(_get_session_state)
  last_established = __builtin__.property(_get_last_established)
  established_transitions = __builtin__.property(_get_established_transitions)
  supported_capabilities = __builtin__.property(_get_supported_capabilities)
  messages = __builtin__.property(_get_messages)
  queues = __builtin__.property(_get_queues)
  dynamically_configured = __builtin__.property(_get_dynamically_configured)
  last_prefix_limit_exceeded = __builtin__.property(_get_last_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('peer_group', peer_group), ('neighbor_address', neighbor_address), ('neighbor_port', neighbor_port), ('enabled', enabled), ('peer_as', peer_as), ('local_as', local_as), ('peer_type', peer_type), ('auth_password', auth_password), ('remove_private_as', remove_private_as), ('route_flap_damping', route_flap_damping), ('send_community', send_community), ('description', description), ('session_state', session_state), ('last_established', last_established), ('established_transitions', established_transitions), ('supported_capabilities', supported_capabilities), ('messages', messages), ('queues', queues), ('dynamically_configured', dynamically_configured), ('last_prefix_limit_exceeded', last_prefix_limit_exceeded), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_timers_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/timers/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to timers used for the
BGP neighbor
  """
  __slots__ = ('_path_helper', '_extmethods', '__connect_retry','__hold_time','__keepalive_interval','__minimum_advertisement_interval','__restart_time',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__connect_retry = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="connect-retry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__hold_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(90), is_leaf=True, yang_name="hold-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__keepalive_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="keepalive-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__minimum_advertisement_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="minimum-advertisement-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__restart_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'timers', 'config']

  def _get_connect_retry(self):
    """
    Getter method for connect_retry, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/timers/config/connect_retry (uint16)

    YANG Description: Time interval in seconds between attempts to establish a
session with the peer.
    """
    return self.__connect_retry
      
  def _set_connect_retry(self, v, load=False):
    """
    Setter method for connect_retry, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/timers/config/connect_retry (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_connect_retry is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_connect_retry() directly.

    YANG Description: Time interval in seconds between attempts to establish a
session with the peer.
    """
    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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="connect-retry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """connect_retry 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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="connect-retry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__connect_retry = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_connect_retry(self):
    self.__connect_retry = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="connect-retry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_hold_time(self):
    """
    Getter method for hold_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/timers/config/hold_time (uint16)

    YANG Description: Time interval in seconds that a BGP session will be
considered active in the absence of keepalive or other
messages from the peer.  The hold-time is typically
set to 3x the keepalive-interval.
    """
    return self.__hold_time
      
  def _set_hold_time(self, v, load=False):
    """
    Setter method for hold_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/timers/config/hold_time (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hold_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hold_time() directly.

    YANG Description: Time interval in seconds that a BGP session will be
considered active in the absence of keepalive or other
messages from the peer.  The hold-time is typically
set to 3x the keepalive-interval.
    """
    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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(90), is_leaf=True, yang_name="hold-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hold_time 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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(90), is_leaf=True, yang_name="hold-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__hold_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hold_time(self):
    self.__hold_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(90), is_leaf=True, yang_name="hold-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_keepalive_interval(self):
    """
    Getter method for keepalive_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/timers/config/keepalive_interval (uint16)

    YANG Description: Time interval in seconds between transmission of keepalive
messages to the neighbor.  Typically set to 1/3 the
hold-time.
    """
    return self.__keepalive_interval
      
  def _set_keepalive_interval(self, v, load=False):
    """
    Setter method for keepalive_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/timers/config/keepalive_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_keepalive_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_keepalive_interval() directly.

    YANG Description: Time interval in seconds between transmission of keepalive
messages to the neighbor.  Typically set to 1/3 the
hold-time.
    """
    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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="keepalive-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """keepalive_interval 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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="keepalive-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__keepalive_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_keepalive_interval(self):
    self.__keepalive_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="keepalive-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_minimum_advertisement_interval(self):
    """
    Getter method for minimum_advertisement_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/timers/config/minimum_advertisement_interval (uint16)

    YANG Description: Minimum time which must elapse between subsequent UPDATE
messages relating to a common set of NLRI being transmitted
to a peer. This timer is referred to as
MinRouteAdvertisementIntervalTimer by RFC 4721 and serves to
reduce the number of UPDATE messages transmitted when a
particular set of NLRI exhibit instability.
    """
    return self.__minimum_advertisement_interval
      
  def _set_minimum_advertisement_interval(self, v, load=False):
    """
    Setter method for minimum_advertisement_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/timers/config/minimum_advertisement_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_minimum_advertisement_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_minimum_advertisement_interval() directly.

    YANG Description: Minimum time which must elapse between subsequent UPDATE
messages relating to a common set of NLRI being transmitted
to a peer. This timer is referred to as
MinRouteAdvertisementIntervalTimer by RFC 4721 and serves to
reduce the number of UPDATE messages transmitted when a
particular set of NLRI exhibit instability.
    """
    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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="minimum-advertisement-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """minimum_advertisement_interval 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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="minimum-advertisement-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__minimum_advertisement_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_minimum_advertisement_interval(self):
    self.__minimum_advertisement_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="minimum-advertisement-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_restart_time(self):
    """
    Getter method for restart_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/timers/config/restart_time (uint16)

    YANG Description: Time interval in seconds after which the BGP session is
re-established after being torn down due to exceeding any
configured max prefix-limit.
    """
    return self.__restart_time
      
  def _set_restart_time(self, v, load=False):
    """
    Setter method for restart_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/timers/config/restart_time (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_restart_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_restart_time() directly.

    YANG Description: Time interval in seconds after which the BGP session is
re-established after being torn down due to exceeding any
configured max prefix-limit.
    """
    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="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """restart_time 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="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__restart_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_restart_time(self):
    self.__restart_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

  connect_retry = __builtin__.property(_get_connect_retry, _set_connect_retry)
  hold_time = __builtin__.property(_get_hold_time, _set_hold_time)
  keepalive_interval = __builtin__.property(_get_keepalive_interval, _set_keepalive_interval)
  minimum_advertisement_interval = __builtin__.property(_get_minimum_advertisement_interval, _set_minimum_advertisement_interval)
  restart_time = __builtin__.property(_get_restart_time, _set_restart_time)


  _pyangbind_elements = OrderedDict([('connect_retry', connect_retry), ('hold_time', hold_time), ('keepalive_interval', keepalive_interval), ('minimum_advertisement_interval', minimum_advertisement_interval), ('restart_time', restart_time), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_timers_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/timers/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the timers used for the BGP
neighbor
  """
  __slots__ = ('_path_helper', '_extmethods', '__connect_retry','__hold_time','__keepalive_interval','__minimum_advertisement_interval','__restart_time','__negotiated_hold_time',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__connect_retry = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="connect-retry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__hold_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(90), is_leaf=True, yang_name="hold-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__keepalive_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="keepalive-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__minimum_advertisement_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="minimum-advertisement-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__restart_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__negotiated_hold_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="negotiated-hold-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'timers', 'state']

  def _get_connect_retry(self):
    """
    Getter method for connect_retry, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/timers/state/connect_retry (uint16)

    YANG Description: Time interval in seconds between attempts to establish a
session with the peer.
    """
    return self.__connect_retry
      
  def _set_connect_retry(self, v, load=False):
    """
    Setter method for connect_retry, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/timers/state/connect_retry (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_connect_retry is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_connect_retry() directly.

    YANG Description: Time interval in seconds between attempts to establish a
session with the peer.
    """
    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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="connect-retry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """connect_retry 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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="connect-retry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__connect_retry = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_connect_retry(self):
    self.__connect_retry = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="connect-retry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_hold_time(self):
    """
    Getter method for hold_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/timers/state/hold_time (uint16)

    YANG Description: Time interval in seconds that a BGP session will be
considered active in the absence of keepalive or other
messages from the peer.  The hold-time is typically
set to 3x the keepalive-interval.
    """
    return self.__hold_time
      
  def _set_hold_time(self, v, load=False):
    """
    Setter method for hold_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/timers/state/hold_time (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hold_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hold_time() directly.

    YANG Description: Time interval in seconds that a BGP session will be
considered active in the absence of keepalive or other
messages from the peer.  The hold-time is typically
set to 3x the keepalive-interval.
    """
    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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(90), is_leaf=True, yang_name="hold-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hold_time 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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(90), is_leaf=True, yang_name="hold-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__hold_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hold_time(self):
    self.__hold_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(90), is_leaf=True, yang_name="hold-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_keepalive_interval(self):
    """
    Getter method for keepalive_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/timers/state/keepalive_interval (uint16)

    YANG Description: Time interval in seconds between transmission of keepalive
messages to the neighbor.  Typically set to 1/3 the
hold-time.
    """
    return self.__keepalive_interval
      
  def _set_keepalive_interval(self, v, load=False):
    """
    Setter method for keepalive_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/timers/state/keepalive_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_keepalive_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_keepalive_interval() directly.

    YANG Description: Time interval in seconds between transmission of keepalive
messages to the neighbor.  Typically set to 1/3 the
hold-time.
    """
    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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="keepalive-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """keepalive_interval 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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="keepalive-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__keepalive_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_keepalive_interval(self):
    self.__keepalive_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="keepalive-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_minimum_advertisement_interval(self):
    """
    Getter method for minimum_advertisement_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/timers/state/minimum_advertisement_interval (uint16)

    YANG Description: Minimum time which must elapse between subsequent UPDATE
messages relating to a common set of NLRI being transmitted
to a peer. This timer is referred to as
MinRouteAdvertisementIntervalTimer by RFC 4721 and serves to
reduce the number of UPDATE messages transmitted when a
particular set of NLRI exhibit instability.
    """
    return self.__minimum_advertisement_interval
      
  def _set_minimum_advertisement_interval(self, v, load=False):
    """
    Setter method for minimum_advertisement_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/timers/state/minimum_advertisement_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_minimum_advertisement_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_minimum_advertisement_interval() directly.

    YANG Description: Minimum time which must elapse between subsequent UPDATE
messages relating to a common set of NLRI being transmitted
to a peer. This timer is referred to as
MinRouteAdvertisementIntervalTimer by RFC 4721 and serves to
reduce the number of UPDATE messages transmitted when a
particular set of NLRI exhibit instability.
    """
    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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="minimum-advertisement-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """minimum_advertisement_interval 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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="minimum-advertisement-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__minimum_advertisement_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_minimum_advertisement_interval(self):
    self.__minimum_advertisement_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="minimum-advertisement-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_restart_time(self):
    """
    Getter method for restart_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/timers/state/restart_time (uint16)

    YANG Description: Time interval in seconds after which the BGP session is
re-established after being torn down due to exceeding any
configured max prefix-limit.
    """
    return self.__restart_time
      
  def _set_restart_time(self, v, load=False):
    """
    Setter method for restart_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/timers/state/restart_time (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_restart_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_restart_time() directly.

    YANG Description: Time interval in seconds after which the BGP session is
re-established after being torn down due to exceeding any
configured max prefix-limit.
    """
    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="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """restart_time 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="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__restart_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_restart_time(self):
    self.__restart_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_negotiated_hold_time(self):
    """
    Getter method for negotiated_hold_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/timers/state/negotiated_hold_time (uint16)

    YANG Description: The negotiated hold-time for the BGP session
    """
    return self.__negotiated_hold_time
      
  def _set_negotiated_hold_time(self, v, load=False):
    """
    Setter method for negotiated_hold_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/timers/state/negotiated_hold_time (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_negotiated_hold_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_negotiated_hold_time() directly.

    YANG Description: The negotiated hold-time for the BGP session
    """
    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="negotiated-hold-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """negotiated_hold_time 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="negotiated-hold-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__negotiated_hold_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_negotiated_hold_time(self):
    self.__negotiated_hold_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="negotiated-hold-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  connect_retry = __builtin__.property(_get_connect_retry)
  hold_time = __builtin__.property(_get_hold_time)
  keepalive_interval = __builtin__.property(_get_keepalive_interval)
  minimum_advertisement_interval = __builtin__.property(_get_minimum_advertisement_interval)
  restart_time = __builtin__.property(_get_restart_time)
  negotiated_hold_time = __builtin__.property(_get_negotiated_hold_time)


  _pyangbind_elements = OrderedDict([('connect_retry', connect_retry), ('hold_time', hold_time), ('keepalive_interval', keepalive_interval), ('minimum_advertisement_interval', minimum_advertisement_interval), ('restart_time', restart_time), ('negotiated_hold_time', negotiated_hold_time), ])


class yc_timers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_timers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/timers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Timers related to a BGP neighbor
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'timers'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_timers_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_timers_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'timers']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/timers/config (container)

    YANG Description: Configuration parameters relating to timers used for the
BGP neighbor
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/timers/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 timers used for the
BGP neighbor
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_timers_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_timers_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_timers_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/timers/state (container)

    YANG Description: State information relating to the timers used for the BGP
neighbor
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/timers/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 relating to the timers used for the BGP
neighbor
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_timers_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_timers_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_timers_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_transport_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/transport/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 transport
session(s) used for the BGP neighbor
  """
  __slots__ = ('_path_helper', '_extmethods', '__tcp_mss','__mtu_discovery','__passive_mode','__local_address',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__tcp_mss = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="tcp-mss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__mtu_discovery = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="mtu-discovery", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__passive_mode = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="passive-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__local_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}'}),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}|:))'}),six.text_type,], is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'transport', 'config']

  def _get_tcp_mss(self):
    """
    Getter method for tcp_mss, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/transport/config/tcp_mss (uint16)

    YANG Description: Sets the max segment size for BGP TCP sessions.
    """
    return self.__tcp_mss
      
  def _set_tcp_mss(self, v, load=False):
    """
    Setter method for tcp_mss, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/transport/config/tcp_mss (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tcp_mss is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tcp_mss() directly.

    YANG Description: Sets the max segment size for BGP TCP sessions.
    """
    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="tcp-mss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tcp_mss 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="tcp-mss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__tcp_mss = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tcp_mss(self):
    self.__tcp_mss = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="tcp-mss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_mtu_discovery(self):
    """
    Getter method for mtu_discovery, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/transport/config/mtu_discovery (boolean)

    YANG Description: Turns path mtu discovery for BGP TCP sessions on (true)
or off (false)
    """
    return self.__mtu_discovery
      
  def _set_mtu_discovery(self, v, load=False):
    """
    Setter method for mtu_discovery, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/transport/config/mtu_discovery (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mtu_discovery is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mtu_discovery() directly.

    YANG Description: Turns path mtu discovery for BGP TCP sessions on (true)
or off (false)
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="mtu-discovery", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mtu_discovery must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="mtu-discovery", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__mtu_discovery = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mtu_discovery(self):
    self.__mtu_discovery = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="mtu-discovery", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_passive_mode(self):
    """
    Getter method for passive_mode, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/transport/config/passive_mode (boolean)

    YANG Description: Wait for peers to issue requests to open a BGP session,
rather than initiating sessions from the local router.
    """
    return self.__passive_mode
      
  def _set_passive_mode(self, v, load=False):
    """
    Setter method for passive_mode, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/transport/config/passive_mode (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_passive_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_passive_mode() directly.

    YANG Description: Wait for peers to issue requests to open a BGP session,
rather than initiating sessions from the local router.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="passive-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """passive_mode must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="passive-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__passive_mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_passive_mode(self):
    self.__passive_mode = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="passive-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_local_address(self):
    """
    Getter method for local_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/transport/config/local_address (union)

    YANG Description: Set the local IP (either IPv4 or IPv6) address to use
for the session when sending BGP update messages.  This
may be expressed as either an IP address or reference
to the name of an interface.
    """
    return self.__local_address
      
  def _set_local_address(self, v, load=False):
    """
    Setter method for local_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/transport/config/local_address (union)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_address() directly.

    YANG Description: Set the local IP (either IPv4 or IPv6) address to use
for the session when sending BGP update messages.  This
may be expressed as either an IP address or reference
to the name of an interface.
    """
    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}'}),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}|:))'}),six.text_type,], is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_address must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          '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}'}),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}|:))'}),six.text_type,], is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)""",
        })

    self.__local_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_address(self):
    self.__local_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}'}),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}|:))'}),six.text_type,], is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)

  tcp_mss = __builtin__.property(_get_tcp_mss, _set_tcp_mss)
  mtu_discovery = __builtin__.property(_get_mtu_discovery, _set_mtu_discovery)
  passive_mode = __builtin__.property(_get_passive_mode, _set_passive_mode)
  local_address = __builtin__.property(_get_local_address, _set_local_address)


  _pyangbind_elements = OrderedDict([('tcp_mss', tcp_mss), ('mtu_discovery', mtu_discovery), ('passive_mode', passive_mode), ('local_address', local_address), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_transport_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/transport/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the transport session(s)
used for the BGP neighbor
  """
  __slots__ = ('_path_helper', '_extmethods', '__tcp_mss','__mtu_discovery','__passive_mode','__local_address','__local_port','__remote_address','__remote_port',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__tcp_mss = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="tcp-mss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__mtu_discovery = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="mtu-discovery", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__passive_mode = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="passive-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__local_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}'}),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}|:))'}),six.text_type,], is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    self.__local_port = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="local-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:port-number', is_config=False)
    self.__remote_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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__remote_port = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="remote-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:port-number', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'transport', 'state']

  def _get_tcp_mss(self):
    """
    Getter method for tcp_mss, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/transport/state/tcp_mss (uint16)

    YANG Description: Sets the max segment size for BGP TCP sessions.
    """
    return self.__tcp_mss
      
  def _set_tcp_mss(self, v, load=False):
    """
    Setter method for tcp_mss, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/transport/state/tcp_mss (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tcp_mss is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tcp_mss() directly.

    YANG Description: Sets the max segment size for BGP TCP sessions.
    """
    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="tcp-mss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tcp_mss 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="tcp-mss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__tcp_mss = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tcp_mss(self):
    self.__tcp_mss = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="tcp-mss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_mtu_discovery(self):
    """
    Getter method for mtu_discovery, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/transport/state/mtu_discovery (boolean)

    YANG Description: Turns path mtu discovery for BGP TCP sessions on (true)
or off (false)
    """
    return self.__mtu_discovery
      
  def _set_mtu_discovery(self, v, load=False):
    """
    Setter method for mtu_discovery, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/transport/state/mtu_discovery (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mtu_discovery is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mtu_discovery() directly.

    YANG Description: Turns path mtu discovery for BGP TCP sessions on (true)
or off (false)
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="mtu-discovery", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mtu_discovery must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="mtu-discovery", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__mtu_discovery = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mtu_discovery(self):
    self.__mtu_discovery = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="mtu-discovery", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_passive_mode(self):
    """
    Getter method for passive_mode, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/transport/state/passive_mode (boolean)

    YANG Description: Wait for peers to issue requests to open a BGP session,
rather than initiating sessions from the local router.
    """
    return self.__passive_mode
      
  def _set_passive_mode(self, v, load=False):
    """
    Setter method for passive_mode, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/transport/state/passive_mode (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_passive_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_passive_mode() directly.

    YANG Description: Wait for peers to issue requests to open a BGP session,
rather than initiating sessions from the local router.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="passive-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """passive_mode must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="passive-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__passive_mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_passive_mode(self):
    self.__passive_mode = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="passive-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_local_address(self):
    """
    Getter method for local_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/transport/state/local_address (union)

    YANG Description: Set the local IP (either IPv4 or IPv6) address to use
for the session when sending BGP update messages.  This
may be expressed as either an IP address or reference
to the name of an interface.
    """
    return self.__local_address
      
  def _set_local_address(self, v, load=False):
    """
    Setter method for local_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/transport/state/local_address (union)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_address() directly.

    YANG Description: Set the local IP (either IPv4 or IPv6) address to use
for the session when sending BGP update messages.  This
may be expressed as either an IP address or reference
to the name of an interface.
    """
    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}'}),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}|:))'}),six.text_type,], is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_address must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          '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}'}),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}|:))'}),six.text_type,], is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)""",
        })

    self.__local_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_address(self):
    self.__local_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}'}),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}|:))'}),six.text_type,], is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)


  def _get_local_port(self):
    """
    Getter method for local_port, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/transport/state/local_port (oc-inet:port-number)

    YANG Description: Local TCP port being used for the TCP session supporting
the BGP session
    """
    return self.__local_port
      
  def _set_local_port(self, v, load=False):
    """
    Setter method for local_port, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/transport/state/local_port (oc-inet:port-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_port is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_port() directly.

    YANG Description: Local TCP port being used for the TCP session supporting
the BGP session
    """
    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="local-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:port-number', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_port must be of a type compatible with oc-inet:port-number""",
          'defined-type': "oc-inet:port-number",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="local-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:port-number', is_config=False)""",
        })

    self.__local_port = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_port(self):
    self.__local_port = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="local-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:port-number', is_config=False)


  def _get_remote_address(self):
    """
    Getter method for remote_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/transport/state/remote_address (oc-inet:ip-address)

    YANG Description: Remote address to which the BGP session has been
established
    """
    return self.__remote_address
      
  def _set_remote_address(self, v, load=False):
    """
    Setter method for remote_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/transport/state/remote_address (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_remote_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_remote_address() directly.

    YANG Description: Remote address to which the BGP session has been
established
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """remote_address must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__remote_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_remote_address(self):
    self.__remote_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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_remote_port(self):
    """
    Getter method for remote_port, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/transport/state/remote_port (oc-inet:port-number)

    YANG Description: Remote port being used by the peer for the TCP session
supporting the BGP session
    """
    return self.__remote_port
      
  def _set_remote_port(self, v, load=False):
    """
    Setter method for remote_port, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/transport/state/remote_port (oc-inet:port-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_remote_port is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_remote_port() directly.

    YANG Description: Remote port being used by the peer for the TCP session
supporting the BGP session
    """
    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="remote-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:port-number', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """remote_port must be of a type compatible with oc-inet:port-number""",
          'defined-type': "oc-inet:port-number",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="remote-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:port-number', is_config=False)""",
        })

    self.__remote_port = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_remote_port(self):
    self.__remote_port = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="remote-port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:port-number', is_config=False)

  tcp_mss = __builtin__.property(_get_tcp_mss)
  mtu_discovery = __builtin__.property(_get_mtu_discovery)
  passive_mode = __builtin__.property(_get_passive_mode)
  local_address = __builtin__.property(_get_local_address)
  local_port = __builtin__.property(_get_local_port)
  remote_address = __builtin__.property(_get_remote_address)
  remote_port = __builtin__.property(_get_remote_port)


  _pyangbind_elements = OrderedDict([('tcp_mss', tcp_mss), ('mtu_discovery', mtu_discovery), ('passive_mode', passive_mode), ('local_address', local_address), ('local_port', local_port), ('remote_address', remote_address), ('remote_port', remote_port), ])


class yc_transport_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_transport(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/transport. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Transport session parameters for the BGP neighbor
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'transport'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'transport']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/transport/config (container)

    YANG Description: Configuration parameters relating to the transport
session(s) used for the BGP neighbor
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/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 parameters relating to the transport
session(s) used for the BGP neighbor
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/transport/state (container)

    YANG Description: State information relating to the transport session(s)
used for the BGP neighbor
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/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 information relating to the transport session(s)
used for the BGP neighbor
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_error_handling_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/error-handling/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters enabling or modifying the
behavior or enhanced error handling mechanisms for the BGP
neighbor
  """
  __slots__ = ('_path_helper', '_extmethods', '__treat_as_withdraw',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__treat_as_withdraw = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="treat-as-withdraw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'error-handling', 'config']

  def _get_treat_as_withdraw(self):
    """
    Getter method for treat_as_withdraw, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/error_handling/config/treat_as_withdraw (boolean)

    YANG Description: Specify whether erroneous UPDATE messages for which the
NLRI can be extracted are reated as though the NLRI is
withdrawn - avoiding session reset
    """
    return self.__treat_as_withdraw
      
  def _set_treat_as_withdraw(self, v, load=False):
    """
    Setter method for treat_as_withdraw, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/error_handling/config/treat_as_withdraw (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_treat_as_withdraw is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_treat_as_withdraw() directly.

    YANG Description: Specify whether erroneous UPDATE messages for which the
NLRI can be extracted are reated as though the NLRI is
withdrawn - avoiding session reset
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="treat-as-withdraw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """treat_as_withdraw must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="treat-as-withdraw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__treat_as_withdraw = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_treat_as_withdraw(self):
    self.__treat_as_withdraw = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="treat-as-withdraw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  treat_as_withdraw = __builtin__.property(_get_treat_as_withdraw, _set_treat_as_withdraw)


  _pyangbind_elements = OrderedDict([('treat_as_withdraw', treat_as_withdraw), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_error_handling_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/error-handling/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to enhanced error handling
mechanisms for the BGP neighbor
  """
  __slots__ = ('_path_helper', '_extmethods', '__treat_as_withdraw','__erroneous_update_messages',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__treat_as_withdraw = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="treat-as-withdraw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__erroneous_update_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="erroneous-update-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'error-handling', 'state']

  def _get_treat_as_withdraw(self):
    """
    Getter method for treat_as_withdraw, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/error_handling/state/treat_as_withdraw (boolean)

    YANG Description: Specify whether erroneous UPDATE messages for which the
NLRI can be extracted are reated as though the NLRI is
withdrawn - avoiding session reset
    """
    return self.__treat_as_withdraw
      
  def _set_treat_as_withdraw(self, v, load=False):
    """
    Setter method for treat_as_withdraw, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/error_handling/state/treat_as_withdraw (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_treat_as_withdraw is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_treat_as_withdraw() directly.

    YANG Description: Specify whether erroneous UPDATE messages for which the
NLRI can be extracted are reated as though the NLRI is
withdrawn - avoiding session reset
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="treat-as-withdraw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """treat_as_withdraw must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="treat-as-withdraw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__treat_as_withdraw = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_treat_as_withdraw(self):
    self.__treat_as_withdraw = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="treat-as-withdraw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_erroneous_update_messages(self):
    """
    Getter method for erroneous_update_messages, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/error_handling/state/erroneous_update_messages (uint32)

    YANG Description: The number of BGP UPDATE messages for which the
treat-as-withdraw mechanism has been applied based
on erroneous message contents
    """
    return self.__erroneous_update_messages
      
  def _set_erroneous_update_messages(self, v, load=False):
    """
    Setter method for erroneous_update_messages, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/error_handling/state/erroneous_update_messages (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_erroneous_update_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_erroneous_update_messages() directly.

    YANG Description: The number of BGP UPDATE messages for which the
treat-as-withdraw mechanism has been applied based
on erroneous message contents
    """
    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="erroneous-update-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """erroneous_update_messages 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="erroneous-update-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__erroneous_update_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_erroneous_update_messages(self):
    self.__erroneous_update_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="erroneous-update-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  treat_as_withdraw = __builtin__.property(_get_treat_as_withdraw)
  erroneous_update_messages = __builtin__.property(_get_erroneous_update_messages)


  _pyangbind_elements = OrderedDict([('treat_as_withdraw', treat_as_withdraw), ('erroneous_update_messages', erroneous_update_messages), ])


class yc_error_handling_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_error_handling(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/error-handling. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Error handling parameters used for the BGP neighbor or
group
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'error-handling'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_error_handling_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_error_handling_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'error-handling']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/error_handling/config (container)

    YANG Description: Configuration parameters enabling or modifying the
behavior or enhanced error handling mechanisms for the BGP
neighbor
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/error_handling/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 enabling or modifying the
behavior or enhanced error handling mechanisms for the BGP
neighbor
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_error_handling_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_error_handling_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_error_handling_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/error_handling/state (container)

    YANG Description: State information relating to enhanced error handling
mechanisms for the BGP neighbor
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/error_handling/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 relating to enhanced error handling
mechanisms for the BGP neighbor
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_error_handling_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_error_handling_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_error_handling_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_graceful_restart_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/graceful-restart/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to graceful-restart
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__restart_time','__stale_routes_time','__helper_only',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__restart_time = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..4096']}), is_leaf=True, yang_name="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__stale_routes_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="stale-routes-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__helper_only = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'graceful-restart', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/graceful_restart/config/enabled (boolean)

    YANG Description: Enable or disable the graceful-restart capability.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/graceful_restart/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: Enable or disable the graceful-restart capability.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_restart_time(self):
    """
    Getter method for restart_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/graceful_restart/config/restart_time (uint16)

    YANG Description: Estimated time (in seconds) for the local BGP speaker to
restart a session. This value is advertise in the graceful
restart BGP capability.  This is a 12-bit value, referred to
as Restart Time in RFC4724.  Per RFC4724, the suggested
default value is <= the hold-time value.
    """
    return self.__restart_time
      
  def _set_restart_time(self, v, load=False):
    """
    Setter method for restart_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/graceful_restart/config/restart_time (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_restart_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_restart_time() directly.

    YANG Description: Estimated time (in seconds) for the local BGP speaker to
restart a session. This value is advertise in the graceful
restart BGP capability.  This is a 12-bit value, referred to
as Restart Time in RFC4724.  Per RFC4724, the suggested
default value is <= the hold-time value.
    """
    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': ['0..4096']}), is_leaf=True, yang_name="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """restart_time must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..4096']}), is_leaf=True, yang_name="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__restart_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_restart_time(self):
    self.__restart_time = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..4096']}), is_leaf=True, yang_name="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_stale_routes_time(self):
    """
    Getter method for stale_routes_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/graceful_restart/config/stale_routes_time (uint16)

    YANG Description: An upper-bound on the time thate stale routes will be
retained by a router after a session is restarted. If an
End-of-RIB (EOR) marker is received prior to this timer
expiring stale-routes will be flushed upon its receipt - if
no EOR is received, then when this timer expires stale paths
will be purged. This timer is referred to as the
Selection_Deferral_Timer in RFC4724
    """
    return self.__stale_routes_time
      
  def _set_stale_routes_time(self, v, load=False):
    """
    Setter method for stale_routes_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/graceful_restart/config/stale_routes_time (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_stale_routes_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_stale_routes_time() directly.

    YANG Description: An upper-bound on the time thate stale routes will be
retained by a router after a session is restarted. If an
End-of-RIB (EOR) marker is received prior to this timer
expiring stale-routes will be flushed upon its receipt - if
no EOR is received, then when this timer expires stale paths
will be purged. This timer is referred to as the
Selection_Deferral_Timer in RFC4724
    """
    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="stale-routes-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """stale_routes_time 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="stale-routes-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__stale_routes_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_stale_routes_time(self):
    self.__stale_routes_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="stale-routes-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_helper_only(self):
    """
    Getter method for helper_only, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/graceful_restart/config/helper_only (boolean)

    YANG Description: Enable graceful-restart in helper mode only. When this
leaf is set, the local system does not retain forwarding
its own state during a restart, but supports procedures
for the receiving speaker, as defined in RFC4724.
    """
    return self.__helper_only
      
  def _set_helper_only(self, v, load=False):
    """
    Setter method for helper_only, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/graceful_restart/config/helper_only (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_helper_only is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_helper_only() directly.

    YANG Description: Enable graceful-restart in helper mode only. When this
leaf is set, the local system does not retain forwarding
its own state during a restart, but supports procedures
for the receiving speaker, as defined in RFC4724.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="helper-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """helper_only must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__helper_only = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_helper_only(self):
    self.__helper_only = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)
  restart_time = __builtin__.property(_get_restart_time, _set_restart_time)
  stale_routes_time = __builtin__.property(_get_stale_routes_time, _set_stale_routes_time)
  helper_only = __builtin__.property(_get_helper_only, _set_helper_only)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('restart_time', restart_time), ('stale_routes_time', stale_routes_time), ('helper_only', helper_only), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_graceful_restart_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/graceful-restart/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information associated with graceful-restart
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__restart_time','__stale_routes_time','__helper_only','__peer_restart_time','__peer_restarting','__local_restarting','__mode',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__restart_time = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..4096']}), is_leaf=True, yang_name="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__stale_routes_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="stale-routes-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__helper_only = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__peer_restart_time = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..4096']}), is_leaf=True, yang_name="peer-restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__peer_restarting = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="peer-restarting", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__local_restarting = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="local-restarting", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'HELPER_ONLY': {}, 'BILATERAL': {}, 'REMOTE_HELPER': {}},), is_leaf=True, yang_name="mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'graceful-restart', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/graceful_restart/state/enabled (boolean)

    YANG Description: Enable or disable the graceful-restart capability.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/graceful_restart/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: Enable or disable the graceful-restart capability.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_restart_time(self):
    """
    Getter method for restart_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/graceful_restart/state/restart_time (uint16)

    YANG Description: Estimated time (in seconds) for the local BGP speaker to
restart a session. This value is advertise in the graceful
restart BGP capability.  This is a 12-bit value, referred to
as Restart Time in RFC4724.  Per RFC4724, the suggested
default value is <= the hold-time value.
    """
    return self.__restart_time
      
  def _set_restart_time(self, v, load=False):
    """
    Setter method for restart_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/graceful_restart/state/restart_time (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_restart_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_restart_time() directly.

    YANG Description: Estimated time (in seconds) for the local BGP speaker to
restart a session. This value is advertise in the graceful
restart BGP capability.  This is a 12-bit value, referred to
as Restart Time in RFC4724.  Per RFC4724, the suggested
default value is <= the hold-time value.
    """
    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': ['0..4096']}), is_leaf=True, yang_name="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """restart_time must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..4096']}), is_leaf=True, yang_name="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__restart_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_restart_time(self):
    self.__restart_time = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..4096']}), is_leaf=True, yang_name="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_stale_routes_time(self):
    """
    Getter method for stale_routes_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/graceful_restart/state/stale_routes_time (uint16)

    YANG Description: An upper-bound on the time thate stale routes will be
retained by a router after a session is restarted. If an
End-of-RIB (EOR) marker is received prior to this timer
expiring stale-routes will be flushed upon its receipt - if
no EOR is received, then when this timer expires stale paths
will be purged. This timer is referred to as the
Selection_Deferral_Timer in RFC4724
    """
    return self.__stale_routes_time
      
  def _set_stale_routes_time(self, v, load=False):
    """
    Setter method for stale_routes_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/graceful_restart/state/stale_routes_time (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_stale_routes_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_stale_routes_time() directly.

    YANG Description: An upper-bound on the time thate stale routes will be
retained by a router after a session is restarted. If an
End-of-RIB (EOR) marker is received prior to this timer
expiring stale-routes will be flushed upon its receipt - if
no EOR is received, then when this timer expires stale paths
will be purged. This timer is referred to as the
Selection_Deferral_Timer in RFC4724
    """
    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="stale-routes-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """stale_routes_time 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="stale-routes-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__stale_routes_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_stale_routes_time(self):
    self.__stale_routes_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="stale-routes-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_helper_only(self):
    """
    Getter method for helper_only, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/graceful_restart/state/helper_only (boolean)

    YANG Description: Enable graceful-restart in helper mode only. When this
leaf is set, the local system does not retain forwarding
its own state during a restart, but supports procedures
for the receiving speaker, as defined in RFC4724.
    """
    return self.__helper_only
      
  def _set_helper_only(self, v, load=False):
    """
    Setter method for helper_only, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/graceful_restart/state/helper_only (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_helper_only is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_helper_only() directly.

    YANG Description: Enable graceful-restart in helper mode only. When this
leaf is set, the local system does not retain forwarding
its own state during a restart, but supports procedures
for the receiving speaker, as defined in RFC4724.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="helper-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """helper_only must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__helper_only = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_helper_only(self):
    self.__helper_only = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_peer_restart_time(self):
    """
    Getter method for peer_restart_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/graceful_restart/state/peer_restart_time (uint16)

    YANG Description: The period of time (advertised by the peer) that
the peer expects a restart of a BGP session to
take
    """
    return self.__peer_restart_time
      
  def _set_peer_restart_time(self, v, load=False):
    """
    Setter method for peer_restart_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/graceful_restart/state/peer_restart_time (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_restart_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_restart_time() directly.

    YANG Description: The period of time (advertised by the peer) that
the peer expects a restart of a BGP session to
take
    """
    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': ['0..4096']}), is_leaf=True, yang_name="peer-restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_restart_time must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..4096']}), is_leaf=True, yang_name="peer-restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__peer_restart_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_restart_time(self):
    self.__peer_restart_time = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..4096']}), is_leaf=True, yang_name="peer-restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_peer_restarting(self):
    """
    Getter method for peer_restarting, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/graceful_restart/state/peer_restarting (boolean)

    YANG Description: This flag indicates whether the remote neighbor is currently
in the process of restarting, and hence received routes are
currently stale
    """
    return self.__peer_restarting
      
  def _set_peer_restarting(self, v, load=False):
    """
    Setter method for peer_restarting, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/graceful_restart/state/peer_restarting (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_restarting is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_restarting() directly.

    YANG Description: This flag indicates whether the remote neighbor is currently
in the process of restarting, and hence received routes are
currently stale
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="peer-restarting", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_restarting must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="peer-restarting", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__peer_restarting = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_restarting(self):
    self.__peer_restarting = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="peer-restarting", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_local_restarting(self):
    """
    Getter method for local_restarting, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/graceful_restart/state/local_restarting (boolean)

    YANG Description: This flag indicates whether the local neighbor is currently
restarting. The flag is unset after all NLRI have been
advertised to the peer, and the End-of-RIB (EOR) marker has
been unset
    """
    return self.__local_restarting
      
  def _set_local_restarting(self, v, load=False):
    """
    Setter method for local_restarting, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/graceful_restart/state/local_restarting (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_restarting is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_restarting() directly.

    YANG Description: This flag indicates whether the local neighbor is currently
restarting. The flag is unset after all NLRI have been
advertised to the peer, and the End-of-RIB (EOR) marker has
been unset
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="local-restarting", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_restarting must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="local-restarting", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__local_restarting = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_restarting(self):
    self.__local_restarting = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="local-restarting", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_mode(self):
    """
    Getter method for mode, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/graceful_restart/state/mode (enumeration)

    YANG Description: Ths leaf indicates the mode of operation of BGP graceful
restart with the peer
    """
    return self.__mode
      
  def _set_mode(self, v, load=False):
    """
    Setter method for mode, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/graceful_restart/state/mode (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mode() directly.

    YANG Description: Ths leaf indicates the mode of operation of BGP graceful
restart with the peer
    """
    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={'HELPER_ONLY': {}, 'BILATERAL': {}, 'REMOTE_HELPER': {}},), is_leaf=True, yang_name="mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mode must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'HELPER_ONLY': {}, 'BILATERAL': {}, 'REMOTE_HELPER': {}},), is_leaf=True, yang_name="mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mode(self):
    self.__mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'HELPER_ONLY': {}, 'BILATERAL': {}, 'REMOTE_HELPER': {}},), is_leaf=True, yang_name="mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)

  enabled = __builtin__.property(_get_enabled)
  restart_time = __builtin__.property(_get_restart_time)
  stale_routes_time = __builtin__.property(_get_stale_routes_time)
  helper_only = __builtin__.property(_get_helper_only)
  peer_restart_time = __builtin__.property(_get_peer_restart_time)
  peer_restarting = __builtin__.property(_get_peer_restarting)
  local_restarting = __builtin__.property(_get_local_restarting)
  mode = __builtin__.property(_get_mode)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('restart_time', restart_time), ('stale_routes_time', stale_routes_time), ('helper_only', helper_only), ('peer_restart_time', peer_restart_time), ('peer_restarting', peer_restarting), ('local_restarting', local_restarting), ('mode', mode), ])


class yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_graceful_restart(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/graceful-restart. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Parameters relating the graceful restart mechanism for BGP
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'graceful-restart'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'graceful-restart']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/graceful_restart/config (container)

    YANG Description: Configuration parameters relating to graceful-restart
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/graceful_restart/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 graceful-restart
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/graceful_restart/state (container)

    YANG Description: State information associated with graceful-restart
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/graceful_restart/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 associated with graceful-restart
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_logging_options_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/logging-options/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters enabling or modifying logging
for events relating to the BGPgroup
  """
  __slots__ = ('_path_helper', '_extmethods', '__log_neighbor_state_changes',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__log_neighbor_state_changes = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="log-neighbor-state-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'logging-options', 'config']

  def _get_log_neighbor_state_changes(self):
    """
    Getter method for log_neighbor_state_changes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/logging_options/config/log_neighbor_state_changes (boolean)

    YANG Description: Configure logging of peer state changes.  Default is
to enable logging of peer state changes.
    """
    return self.__log_neighbor_state_changes
      
  def _set_log_neighbor_state_changes(self, v, load=False):
    """
    Setter method for log_neighbor_state_changes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/logging_options/config/log_neighbor_state_changes (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_log_neighbor_state_changes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_log_neighbor_state_changes() directly.

    YANG Description: Configure logging of peer state changes.  Default is
to enable logging of peer state changes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="log-neighbor-state-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """log_neighbor_state_changes must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="log-neighbor-state-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__log_neighbor_state_changes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_log_neighbor_state_changes(self):
    self.__log_neighbor_state_changes = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="log-neighbor-state-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  log_neighbor_state_changes = __builtin__.property(_get_log_neighbor_state_changes, _set_log_neighbor_state_changes)


  _pyangbind_elements = OrderedDict([('log_neighbor_state_changes', log_neighbor_state_changes), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_logging_options_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/logging-options/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to logging for the BGP neighbor
or group
  """
  __slots__ = ('_path_helper', '_extmethods', '__log_neighbor_state_changes',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__log_neighbor_state_changes = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="log-neighbor-state-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'logging-options', 'state']

  def _get_log_neighbor_state_changes(self):
    """
    Getter method for log_neighbor_state_changes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/logging_options/state/log_neighbor_state_changes (boolean)

    YANG Description: Configure logging of peer state changes.  Default is
to enable logging of peer state changes.
    """
    return self.__log_neighbor_state_changes
      
  def _set_log_neighbor_state_changes(self, v, load=False):
    """
    Setter method for log_neighbor_state_changes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/logging_options/state/log_neighbor_state_changes (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_log_neighbor_state_changes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_log_neighbor_state_changes() directly.

    YANG Description: Configure logging of peer state changes.  Default is
to enable logging of peer state changes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="log-neighbor-state-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """log_neighbor_state_changes must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="log-neighbor-state-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__log_neighbor_state_changes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_log_neighbor_state_changes(self):
    self.__log_neighbor_state_changes = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="log-neighbor-state-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  log_neighbor_state_changes = __builtin__.property(_get_log_neighbor_state_changes)


  _pyangbind_elements = OrderedDict([('log_neighbor_state_changes', log_neighbor_state_changes), ])


class yc_logging_options_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_logging_options(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/logging-options. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Logging options for events related to the BGP neighbor or
group
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'logging-options'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_logging_options_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_logging_options_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'logging-options']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/logging_options/config (container)

    YANG Description: Configuration parameters enabling or modifying logging
for events relating to the BGPgroup
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/logging_options/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 enabling or modifying logging
for events relating to the BGPgroup
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_logging_options_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_logging_options_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_logging_options_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/logging_options/state (container)

    YANG Description: State information relating to logging for the BGP neighbor
or group
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/logging_options/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 relating to logging for the BGP neighbor
or group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_logging_options_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_logging_options_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_logging_options_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_ebgp_multihop_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/ebgp-multihop/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to eBGP multihop for the
BGP group
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__multihop_ttl',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__multihop_ttl = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="multihop-ttl", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'ebgp-multihop', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/ebgp_multihop/config/enabled (boolean)

    YANG Description: When enabled the referenced group or neighbors are permitted
to be indirectly connected - including cases where the TTL
can be decremented between the BGP peers
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/ebgp_multihop/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When enabled the referenced group or neighbors are permitted
to be indirectly connected - including cases where the TTL
can be decremented between the BGP peers
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_multihop_ttl(self):
    """
    Getter method for multihop_ttl, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/ebgp_multihop/config/multihop_ttl (uint8)

    YANG Description: Time-to-live value to use when packets are sent to the
referenced group or neighbors and ebgp-multihop is enabled
    """
    return self.__multihop_ttl
      
  def _set_multihop_ttl(self, v, load=False):
    """
    Setter method for multihop_ttl, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/ebgp_multihop/config/multihop_ttl (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multihop_ttl is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multihop_ttl() directly.

    YANG Description: Time-to-live value to use when packets are sent to the
referenced group or neighbors and ebgp-multihop is enabled
    """
    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="multihop-ttl", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multihop_ttl 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="multihop-ttl", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
        })

    self.__multihop_ttl = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multihop_ttl(self):
    self.__multihop_ttl = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="multihop-ttl", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)
  multihop_ttl = __builtin__.property(_get_multihop_ttl, _set_multihop_ttl)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('multihop_ttl', multihop_ttl), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_ebgp_multihop_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/ebgp-multihop/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information for eBGP multihop, for the BGP neighbor
or group
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__multihop_ttl',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__multihop_ttl = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="multihop-ttl", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'ebgp-multihop', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/ebgp_multihop/state/enabled (boolean)

    YANG Description: When enabled the referenced group or neighbors are permitted
to be indirectly connected - including cases where the TTL
can be decremented between the BGP peers
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/ebgp_multihop/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When enabled the referenced group or neighbors are permitted
to be indirectly connected - including cases where the TTL
can be decremented between the BGP peers
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_multihop_ttl(self):
    """
    Getter method for multihop_ttl, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/ebgp_multihop/state/multihop_ttl (uint8)

    YANG Description: Time-to-live value to use when packets are sent to the
referenced group or neighbors and ebgp-multihop is enabled
    """
    return self.__multihop_ttl
      
  def _set_multihop_ttl(self, v, load=False):
    """
    Setter method for multihop_ttl, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/ebgp_multihop/state/multihop_ttl (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multihop_ttl is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multihop_ttl() directly.

    YANG Description: Time-to-live value to use when packets are sent to the
referenced group or neighbors and ebgp-multihop is enabled
    """
    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="multihop-ttl", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multihop_ttl 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="multihop-ttl", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__multihop_ttl = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multihop_ttl(self):
    self.__multihop_ttl = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="multihop-ttl", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)

  enabled = __builtin__.property(_get_enabled)
  multihop_ttl = __builtin__.property(_get_multihop_ttl)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('multihop_ttl', multihop_ttl), ])


class yc_ebgp_multihop_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_ebgp_multihop(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/ebgp-multihop. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: eBGP multi-hop parameters for the BGPgroup
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'ebgp-multihop'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_ebgp_multihop_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_ebgp_multihop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'ebgp-multihop']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/ebgp_multihop/config (container)

    YANG Description: Configuration parameters relating to eBGP multihop for the
BGP group
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/ebgp_multihop/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 eBGP multihop for the
BGP group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_ebgp_multihop_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_ebgp_multihop_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_ebgp_multihop_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/ebgp_multihop/state (container)

    YANG Description: State information for eBGP multihop, for the BGP neighbor
or group
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/ebgp_multihop/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 eBGP multihop, for the BGP neighbor
or group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_ebgp_multihop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_ebgp_multihop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_ebgp_multihop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_route_reflector_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/route-reflector/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuraton parameters relating to route reflection
for the BGPgroup
  """
  __slots__ = ('_path_helper', '_extmethods', '__route_reflector_cluster_id','__route_reflector_client',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__route_reflector_cluster_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),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}'}),], is_leaf=True, yang_name="route-reflector-cluster-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:rr-cluster-id-type', is_config=True)
    self.__route_reflector_client = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="route-reflector-client", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'route-reflector', 'config']

  def _get_route_reflector_cluster_id(self):
    """
    Getter method for route_reflector_cluster_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/route_reflector/config/route_reflector_cluster_id (oc-bgp-types:rr-cluster-id-type)

    YANG Description: route-reflector cluster id to use when local router is
configured as a route reflector.  Commonly set at the group
level, but allows a different cluster
id to be set for each neighbor.
    """
    return self.__route_reflector_cluster_id
      
  def _set_route_reflector_cluster_id(self, v, load=False):
    """
    Setter method for route_reflector_cluster_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/route_reflector/config/route_reflector_cluster_id (oc-bgp-types:rr-cluster-id-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route_reflector_cluster_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route_reflector_cluster_id() directly.

    YANG Description: route-reflector cluster id to use when local router is
configured as a route reflector.  Commonly set at the group
level, but allows a different cluster
id to be set for each neighbor.
    """
    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),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}'}),], is_leaf=True, yang_name="route-reflector-cluster-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:rr-cluster-id-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route_reflector_cluster_id must be of a type compatible with oc-bgp-types:rr-cluster-id-type""",
          'defined-type': "oc-bgp-types:rr-cluster-id-type",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),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}'}),], is_leaf=True, yang_name="route-reflector-cluster-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:rr-cluster-id-type', is_config=True)""",
        })

    self.__route_reflector_cluster_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route_reflector_cluster_id(self):
    self.__route_reflector_cluster_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),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}'}),], is_leaf=True, yang_name="route-reflector-cluster-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:rr-cluster-id-type', is_config=True)


  def _get_route_reflector_client(self):
    """
    Getter method for route_reflector_client, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/route_reflector/config/route_reflector_client (boolean)

    YANG Description: Configure the neighbor as a route reflector client.
    """
    return self.__route_reflector_client
      
  def _set_route_reflector_client(self, v, load=False):
    """
    Setter method for route_reflector_client, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/route_reflector/config/route_reflector_client (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route_reflector_client is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route_reflector_client() directly.

    YANG Description: Configure the neighbor as a route reflector client.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="route-reflector-client", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route_reflector_client must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="route-reflector-client", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__route_reflector_client = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route_reflector_client(self):
    self.__route_reflector_client = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="route-reflector-client", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  route_reflector_cluster_id = __builtin__.property(_get_route_reflector_cluster_id, _set_route_reflector_cluster_id)
  route_reflector_client = __builtin__.property(_get_route_reflector_client, _set_route_reflector_client)


  _pyangbind_elements = OrderedDict([('route_reflector_cluster_id', route_reflector_cluster_id), ('route_reflector_client', route_reflector_client), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_route_reflector_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/route-reflector/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to route reflection for the
BGPgroup
  """
  __slots__ = ('_path_helper', '_extmethods', '__route_reflector_cluster_id','__route_reflector_client',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__route_reflector_cluster_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),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}'}),], is_leaf=True, yang_name="route-reflector-cluster-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:rr-cluster-id-type', is_config=False)
    self.__route_reflector_client = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="route-reflector-client", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'route-reflector', 'state']

  def _get_route_reflector_cluster_id(self):
    """
    Getter method for route_reflector_cluster_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/route_reflector/state/route_reflector_cluster_id (oc-bgp-types:rr-cluster-id-type)

    YANG Description: route-reflector cluster id to use when local router is
configured as a route reflector.  Commonly set at the group
level, but allows a different cluster
id to be set for each neighbor.
    """
    return self.__route_reflector_cluster_id
      
  def _set_route_reflector_cluster_id(self, v, load=False):
    """
    Setter method for route_reflector_cluster_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/route_reflector/state/route_reflector_cluster_id (oc-bgp-types:rr-cluster-id-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route_reflector_cluster_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route_reflector_cluster_id() directly.

    YANG Description: route-reflector cluster id to use when local router is
configured as a route reflector.  Commonly set at the group
level, but allows a different cluster
id to be set for each neighbor.
    """
    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),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}'}),], is_leaf=True, yang_name="route-reflector-cluster-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:rr-cluster-id-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route_reflector_cluster_id must be of a type compatible with oc-bgp-types:rr-cluster-id-type""",
          'defined-type': "oc-bgp-types:rr-cluster-id-type",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),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}'}),], is_leaf=True, yang_name="route-reflector-cluster-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:rr-cluster-id-type', is_config=False)""",
        })

    self.__route_reflector_cluster_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route_reflector_cluster_id(self):
    self.__route_reflector_cluster_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),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}'}),], is_leaf=True, yang_name="route-reflector-cluster-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:rr-cluster-id-type', is_config=False)


  def _get_route_reflector_client(self):
    """
    Getter method for route_reflector_client, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/route_reflector/state/route_reflector_client (boolean)

    YANG Description: Configure the neighbor as a route reflector client.
    """
    return self.__route_reflector_client
      
  def _set_route_reflector_client(self, v, load=False):
    """
    Setter method for route_reflector_client, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/route_reflector/state/route_reflector_client (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route_reflector_client is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route_reflector_client() directly.

    YANG Description: Configure the neighbor as a route reflector client.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="route-reflector-client", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route_reflector_client must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="route-reflector-client", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__route_reflector_client = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route_reflector_client(self):
    self.__route_reflector_client = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="route-reflector-client", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  route_reflector_cluster_id = __builtin__.property(_get_route_reflector_cluster_id)
  route_reflector_client = __builtin__.property(_get_route_reflector_client)


  _pyangbind_elements = OrderedDict([('route_reflector_cluster_id', route_reflector_cluster_id), ('route_reflector_client', route_reflector_client), ])


class yc_route_reflector_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_route_reflector(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/route-reflector. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Route reflector parameters for the BGPgroup
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'route-reflector'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_route_reflector_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_route_reflector_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'route-reflector']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/route_reflector/config (container)

    YANG Description: Configuraton parameters relating to route reflection
for the BGPgroup
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/route_reflector/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: Configuraton parameters relating to route reflection
for the BGPgroup
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_route_reflector_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_route_reflector_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_route_reflector_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/route_reflector/state (container)

    YANG Description: State information relating to route reflection for the
BGPgroup
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/route_reflector/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 relating to route reflection for the
BGPgroup
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_route_reflector_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_route_reflector_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_route_reflector_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_as_path_options_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/as-path-options/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to AS_PATH manipulation
for the BGP peer or group
  """
  __slots__ = ('_path_helper', '_extmethods', '__allow_own_as','__replace_peer_as','__disable_peer_as_filter',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__allow_own_as = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="allow-own-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    self.__replace_peer_as = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="replace-peer-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__disable_peer_as_filter = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-peer-as-filter", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'as-path-options', 'config']

  def _get_allow_own_as(self):
    """
    Getter method for allow_own_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/as_path_options/config/allow_own_as (uint8)

    YANG Description: Specify the number of occurrences of the local BGP speaker's
AS that can occur within the AS_PATH before it is rejected.
    """
    return self.__allow_own_as
      
  def _set_allow_own_as(self, v, load=False):
    """
    Setter method for allow_own_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/as_path_options/config/allow_own_as (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_allow_own_as is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_allow_own_as() directly.

    YANG Description: Specify the number of occurrences of the local BGP speaker's
AS that can occur within the AS_PATH before it is rejected.
    """
    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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="allow-own-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """allow_own_as 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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="allow-own-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
        })

    self.__allow_own_as = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_allow_own_as(self):
    self.__allow_own_as = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="allow-own-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)


  def _get_replace_peer_as(self):
    """
    Getter method for replace_peer_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/as_path_options/config/replace_peer_as (boolean)

    YANG Description: Replace occurrences of the peer's AS in the AS_PATH
with the local autonomous system number
    """
    return self.__replace_peer_as
      
  def _set_replace_peer_as(self, v, load=False):
    """
    Setter method for replace_peer_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/as_path_options/config/replace_peer_as (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_replace_peer_as is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_replace_peer_as() directly.

    YANG Description: Replace occurrences of the peer's AS in the AS_PATH
with the local autonomous system number
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="replace-peer-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """replace_peer_as must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="replace-peer-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__replace_peer_as = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_replace_peer_as(self):
    self.__replace_peer_as = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="replace-peer-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_disable_peer_as_filter(self):
    """
    Getter method for disable_peer_as_filter, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/as_path_options/config/disable_peer_as_filter (boolean)

    YANG Description: When set to true, the system advertises routes to a peer
even if the peer's AS was in the AS path.  The default
behavior (false) suppresses advertisements to peers if
their AS number is in the AS path of the route.
    """
    return self.__disable_peer_as_filter
      
  def _set_disable_peer_as_filter(self, v, load=False):
    """
    Setter method for disable_peer_as_filter, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/as_path_options/config/disable_peer_as_filter (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_disable_peer_as_filter is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_disable_peer_as_filter() directly.

    YANG Description: When set to true, the system advertises routes to a peer
even if the peer's AS was in the AS path.  The default
behavior (false) suppresses advertisements to peers if
their AS number is in the AS path of the route.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-peer-as-filter", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """disable_peer_as_filter must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-peer-as-filter", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__disable_peer_as_filter = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_disable_peer_as_filter(self):
    self.__disable_peer_as_filter = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-peer-as-filter", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  allow_own_as = __builtin__.property(_get_allow_own_as, _set_allow_own_as)
  replace_peer_as = __builtin__.property(_get_replace_peer_as, _set_replace_peer_as)
  disable_peer_as_filter = __builtin__.property(_get_disable_peer_as_filter, _set_disable_peer_as_filter)


  _pyangbind_elements = OrderedDict([('allow_own_as', allow_own_as), ('replace_peer_as', replace_peer_as), ('disable_peer_as_filter', disable_peer_as_filter), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_as_path_options_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/as-path-options/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the AS_PATH manipulation
mechanisms for the BGP peer or group
  """
  __slots__ = ('_path_helper', '_extmethods', '__allow_own_as','__replace_peer_as','__disable_peer_as_filter',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__allow_own_as = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="allow-own-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__replace_peer_as = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="replace-peer-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__disable_peer_as_filter = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-peer-as-filter", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'as-path-options', 'state']

  def _get_allow_own_as(self):
    """
    Getter method for allow_own_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/as_path_options/state/allow_own_as (uint8)

    YANG Description: Specify the number of occurrences of the local BGP speaker's
AS that can occur within the AS_PATH before it is rejected.
    """
    return self.__allow_own_as
      
  def _set_allow_own_as(self, v, load=False):
    """
    Setter method for allow_own_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/as_path_options/state/allow_own_as (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_allow_own_as is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_allow_own_as() directly.

    YANG Description: Specify the number of occurrences of the local BGP speaker's
AS that can occur within the AS_PATH before it is rejected.
    """
    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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="allow-own-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """allow_own_as 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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="allow-own-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__allow_own_as = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_allow_own_as(self):
    self.__allow_own_as = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="allow-own-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_replace_peer_as(self):
    """
    Getter method for replace_peer_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/as_path_options/state/replace_peer_as (boolean)

    YANG Description: Replace occurrences of the peer's AS in the AS_PATH
with the local autonomous system number
    """
    return self.__replace_peer_as
      
  def _set_replace_peer_as(self, v, load=False):
    """
    Setter method for replace_peer_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/as_path_options/state/replace_peer_as (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_replace_peer_as is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_replace_peer_as() directly.

    YANG Description: Replace occurrences of the peer's AS in the AS_PATH
with the local autonomous system number
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="replace-peer-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """replace_peer_as must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="replace-peer-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__replace_peer_as = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_replace_peer_as(self):
    self.__replace_peer_as = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="replace-peer-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_disable_peer_as_filter(self):
    """
    Getter method for disable_peer_as_filter, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/as_path_options/state/disable_peer_as_filter (boolean)

    YANG Description: When set to true, the system advertises routes to a peer
even if the peer's AS was in the AS path.  The default
behavior (false) suppresses advertisements to peers if
their AS number is in the AS path of the route.
    """
    return self.__disable_peer_as_filter
      
  def _set_disable_peer_as_filter(self, v, load=False):
    """
    Setter method for disable_peer_as_filter, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/as_path_options/state/disable_peer_as_filter (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_disable_peer_as_filter is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_disable_peer_as_filter() directly.

    YANG Description: When set to true, the system advertises routes to a peer
even if the peer's AS was in the AS path.  The default
behavior (false) suppresses advertisements to peers if
their AS number is in the AS path of the route.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-peer-as-filter", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """disable_peer_as_filter must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-peer-as-filter", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__disable_peer_as_filter = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_disable_peer_as_filter(self):
    self.__disable_peer_as_filter = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-peer-as-filter", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  allow_own_as = __builtin__.property(_get_allow_own_as)
  replace_peer_as = __builtin__.property(_get_replace_peer_as)
  disable_peer_as_filter = __builtin__.property(_get_disable_peer_as_filter)


  _pyangbind_elements = OrderedDict([('allow_own_as', allow_own_as), ('replace_peer_as', replace_peer_as), ('disable_peer_as_filter', disable_peer_as_filter), ])


class yc_as_path_options_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_as_path_options(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/as-path-options. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: AS_PATH manipulation parameters for the BGP neighbor or
group
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'as-path-options'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_as_path_options_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_as_path_options_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'as-path-options']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/as_path_options/config (container)

    YANG Description: Configuration parameters relating to AS_PATH manipulation
for the BGP peer or group
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/as_path_options/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 AS_PATH manipulation
for the BGP peer or group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_as_path_options_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_as_path_options_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_as_path_options_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/as_path_options/state (container)

    YANG Description: State information relating to the AS_PATH manipulation
mechanisms for the BGP peer or group
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/as_path_options/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 relating to the AS_PATH manipulation
mechanisms for the BGP peer or group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_as_path_options_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_as_path_options_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_as_path_options_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_use_multiple_paths_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/use-multiple-paths/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to multipath
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'use-multiple-paths', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/use_multiple_paths/config/enabled (boolean)

    YANG Description: Whether the use of multiple paths for the same NLRI is
enabled for the neighbor. This value is overridden by
any more specific configuration value.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/use_multiple_paths/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: Whether the use of multiple paths for the same NLRI is
enabled for the neighbor. This value is overridden by
any more specific configuration value.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_use_multiple_paths_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/use-multiple-paths/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to multipath
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'use-multiple-paths', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/use_multiple_paths/state/enabled (boolean)

    YANG Description: Whether the use of multiple paths for the same NLRI is
enabled for the neighbor. This value is overridden by
any more specific configuration value.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/use_multiple_paths/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: Whether the use of multiple paths for the same NLRI is
enabled for the neighbor. This value is overridden by
any more specific configuration value.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  enabled = __builtin__.property(_get_enabled)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_use_multiple_paths_ebgp_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/use-multiple-paths/ebgp/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to eBGP multipath
  """
  __slots__ = ('_path_helper', '_extmethods', '__allow_multiple_as',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__allow_multiple_as = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'use-multiple-paths', 'ebgp', 'config']

  def _get_allow_multiple_as(self):
    """
    Getter method for allow_multiple_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/use_multiple_paths/ebgp/config/allow_multiple_as (boolean)

    YANG Description: Allow multipath to use paths from different neighbouring
ASes.  The default is to only consider multiple paths from
the same neighbouring AS.
    """
    return self.__allow_multiple_as
      
  def _set_allow_multiple_as(self, v, load=False):
    """
    Setter method for allow_multiple_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/use_multiple_paths/ebgp/config/allow_multiple_as (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_allow_multiple_as is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_allow_multiple_as() directly.

    YANG Description: Allow multipath to use paths from different neighbouring
ASes.  The default is to only consider multiple paths from
the same neighbouring AS.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """allow_multiple_as must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__allow_multiple_as = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_allow_multiple_as(self):
    self.__allow_multiple_as = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  allow_multiple_as = __builtin__.property(_get_allow_multiple_as, _set_allow_multiple_as)


  _pyangbind_elements = OrderedDict([('allow_multiple_as', allow_multiple_as), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_use_multiple_paths_ebgp_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/use-multiple-paths/ebgp/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to eBGP multipath
  """
  __slots__ = ('_path_helper', '_extmethods', '__allow_multiple_as',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__allow_multiple_as = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'use-multiple-paths', 'ebgp', 'state']

  def _get_allow_multiple_as(self):
    """
    Getter method for allow_multiple_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/use_multiple_paths/ebgp/state/allow_multiple_as (boolean)

    YANG Description: Allow multipath to use paths from different neighbouring
ASes.  The default is to only consider multiple paths from
the same neighbouring AS.
    """
    return self.__allow_multiple_as
      
  def _set_allow_multiple_as(self, v, load=False):
    """
    Setter method for allow_multiple_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/use_multiple_paths/ebgp/state/allow_multiple_as (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_allow_multiple_as is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_allow_multiple_as() directly.

    YANG Description: Allow multipath to use paths from different neighbouring
ASes.  The default is to only consider multiple paths from
the same neighbouring AS.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """allow_multiple_as must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__allow_multiple_as = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_allow_multiple_as(self):
    self.__allow_multiple_as = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  allow_multiple_as = __builtin__.property(_get_allow_multiple_as)


  _pyangbind_elements = OrderedDict([('allow_multiple_as', allow_multiple_as), ])


class yc_ebgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_use_multiple_paths_ebgp(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/use-multiple-paths/ebgp. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Multipath configuration for eBGP
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'ebgp'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_use_multiple_paths_ebgp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_use_multiple_paths_ebgp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'use-multiple-paths', 'ebgp']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/use_multiple_paths/ebgp/config (container)

    YANG Description: Configuration parameters relating to eBGP multipath
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/use_multiple_paths/ebgp/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 eBGP multipath
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_use_multiple_paths_ebgp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_use_multiple_paths_ebgp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_use_multiple_paths_ebgp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/use_multiple_paths/ebgp/state (container)

    YANG Description: State information relating to eBGP multipath
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/use_multiple_paths/ebgp/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 relating to eBGP multipath
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_use_multiple_paths_ebgp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_use_multiple_paths_ebgp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_use_multiple_paths_ebgp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_use_multiple_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_use_multiple_paths(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/use-multiple-paths. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Parameters related to the use of multiple-paths for the same
NLRI when they are received only from this neighbor
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__ebgp',)

  _yang_name = 'use-multiple-paths'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_use_multiple_paths_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_use_multiple_paths_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__ebgp = YANGDynClass(base=yc_ebgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_use_multiple_paths_ebgp, is_container='container', yang_name="ebgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'use-multiple-paths']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/use_multiple_paths/config (container)

    YANG Description: Configuration parameters relating to multipath
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/use_multiple_paths/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 multipath
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_use_multiple_paths_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_use_multiple_paths_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_use_multiple_paths_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/use_multiple_paths/state (container)

    YANG Description: State parameters relating to multipath
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/use_multiple_paths/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 parameters relating to multipath
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_use_multiple_paths_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_use_multiple_paths_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_use_multiple_paths_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_ebgp(self):
    """
    Getter method for ebgp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/use_multiple_paths/ebgp (container)

    YANG Description: Multipath configuration for eBGP
    """
    return self.__ebgp
      
  def _set_ebgp(self, v, load=False):
    """
    Setter method for ebgp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/use_multiple_paths/ebgp (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ebgp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ebgp() directly.

    YANG Description: Multipath configuration for eBGP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ebgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_use_multiple_paths_ebgp, is_container='container', yang_name="ebgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ebgp must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ebgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_use_multiple_paths_ebgp, is_container='container', yang_name="ebgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__ebgp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ebgp(self):
    self.__ebgp = YANGDynClass(base=yc_ebgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_use_multiple_paths_ebgp, is_container='container', yang_name="ebgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  ebgp = __builtin__.property(_get_ebgp, _set_ebgp)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('ebgp', ebgp), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_apply_policy_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/apply-policy/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Policy configuration data.
  """
  __slots__ = ('_path_helper', '_extmethods', '__import_policy','__default_import_policy','__export_policy','__default_export_policy',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)
    self.__export_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__default_export_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'apply-policy', 'config']

  def _get_import_policy(self):
    """
    Getter method for import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/apply_policy/config/import_policy (leafref)

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    return self.__import_policy
      
  def _set_import_policy(self, v, load=False):
    """
    Setter method for import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/apply_policy/config/import_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_import_policy() directly.

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """import_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__import_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_import_policy(self):
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_default_import_policy(self):
    """
    Getter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/apply_policy/config/default_import_policy (default-policy-type)

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    return self.__default_import_policy
      
  def _set_default_import_policy(self, v, load=False):
    """
    Setter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/apply_policy/config/default_import_policy (default-policy-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_default_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_default_import_policy() directly.

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    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={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """default_import_policy must be of a type compatible with default-policy-type""",
          'defined-type': "openconfig-network-instance:default-policy-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)""",
        })

    self.__default_import_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_default_import_policy(self):
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)


  def _get_export_policy(self):
    """
    Getter method for export_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/apply_policy/config/export_policy (leafref)

    YANG Description: list of policy names in sequence to be applied on
sending a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    return self.__export_policy
      
  def _set_export_policy(self, v, load=False):
    """
    Setter method for export_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/apply_policy/config/export_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_export_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_export_policy() directly.

    YANG Description: list of policy names in sequence to be applied on
sending a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """export_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__export_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_export_policy(self):
    self.__export_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_default_export_policy(self):
    """
    Getter method for default_export_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/apply_policy/config/default_export_policy (default-policy-type)

    YANG Description: explicitly set a default policy if no policy definition
in the export policy chain is satisfied.
    """
    return self.__default_export_policy
      
  def _set_default_export_policy(self, v, load=False):
    """
    Setter method for default_export_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/apply_policy/config/default_export_policy (default-policy-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_default_export_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_default_export_policy() directly.

    YANG Description: explicitly set a default policy if no policy definition
in the export policy chain is satisfied.
    """
    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={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """default_export_policy must be of a type compatible with default-policy-type""",
          'defined-type': "openconfig-network-instance:default-policy-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)""",
        })

    self.__default_export_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_default_export_policy(self):
    self.__default_export_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)

  import_policy = __builtin__.property(_get_import_policy, _set_import_policy)
  default_import_policy = __builtin__.property(_get_default_import_policy, _set_default_import_policy)
  export_policy = __builtin__.property(_get_export_policy, _set_export_policy)
  default_export_policy = __builtin__.property(_get_default_export_policy, _set_default_export_policy)


  _pyangbind_elements = OrderedDict([('import_policy', import_policy), ('default_import_policy', default_import_policy), ('export_policy', export_policy), ('default_export_policy', default_export_policy), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_apply_policy_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/apply-policy/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for routing policy
  """
  __slots__ = ('_path_helper', '_extmethods', '__import_policy','__default_import_policy','__export_policy','__default_export_policy',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)
    self.__export_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__default_export_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'apply-policy', 'state']

  def _get_import_policy(self):
    """
    Getter method for import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/apply_policy/state/import_policy (leafref)

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    return self.__import_policy
      
  def _set_import_policy(self, v, load=False):
    """
    Setter method for import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/apply_policy/state/import_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_import_policy() directly.

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """import_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__import_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_import_policy(self):
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_default_import_policy(self):
    """
    Getter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/apply_policy/state/default_import_policy (default-policy-type)

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    return self.__default_import_policy
      
  def _set_default_import_policy(self, v, load=False):
    """
    Setter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/apply_policy/state/default_import_policy (default-policy-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_default_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_default_import_policy() directly.

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    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={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """default_import_policy must be of a type compatible with default-policy-type""",
          'defined-type': "openconfig-network-instance:default-policy-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)""",
        })

    self.__default_import_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_default_import_policy(self):
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)


  def _get_export_policy(self):
    """
    Getter method for export_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/apply_policy/state/export_policy (leafref)

    YANG Description: list of policy names in sequence to be applied on
sending a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    return self.__export_policy
      
  def _set_export_policy(self, v, load=False):
    """
    Setter method for export_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/apply_policy/state/export_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_export_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_export_policy() directly.

    YANG Description: list of policy names in sequence to be applied on
sending a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """export_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__export_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_export_policy(self):
    self.__export_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_default_export_policy(self):
    """
    Getter method for default_export_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/apply_policy/state/default_export_policy (default-policy-type)

    YANG Description: explicitly set a default policy if no policy definition
in the export policy chain is satisfied.
    """
    return self.__default_export_policy
      
  def _set_default_export_policy(self, v, load=False):
    """
    Setter method for default_export_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/apply_policy/state/default_export_policy (default-policy-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_default_export_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_default_export_policy() directly.

    YANG Description: explicitly set a default policy if no policy definition
in the export policy chain is satisfied.
    """
    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={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """default_export_policy must be of a type compatible with default-policy-type""",
          'defined-type': "openconfig-network-instance:default-policy-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)""",
        })

    self.__default_export_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_default_export_policy(self):
    self.__default_export_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)

  import_policy = __builtin__.property(_get_import_policy)
  default_import_policy = __builtin__.property(_get_default_import_policy)
  export_policy = __builtin__.property(_get_export_policy)
  default_export_policy = __builtin__.property(_get_default_export_policy)


  _pyangbind_elements = OrderedDict([('import_policy', import_policy), ('default_import_policy', default_import_policy), ('export_policy', export_policy), ('default_export_policy', default_export_policy), ])


class yc_apply_policy_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_apply_policy(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/apply-policy. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Anchor point for routing policies in the model.
Import and export policies are with respect to the local
routing table, i.e., export (send) and import (receive),
depending on the context.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'apply-policy'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_apply_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_apply_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'apply-policy']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/apply_policy/config (container)

    YANG Description: Policy configuration data.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/apply_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: Policy configuration data.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_apply_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_apply_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_apply_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/apply_policy/state (container)

    YANG Description: Operational state for routing policy
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/apply_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 for routing policy
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_apply_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_apply_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_apply_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi_safi_name','__enabled',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi_safi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'config']

  def _get_afi_safi_name(self):
    """
    Getter method for afi_safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/config/afi_safi_name (identityref)

    YANG Description: AFI,SAFI
    """
    return self.__afi_safi_name
      
  def _set_afi_safi_name(self, v, load=False):
    """
    Setter method for afi_safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/config/afi_safi_name (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_safi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_safi_name() directly.

    YANG Description: AFI,SAFI
    """
    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_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_safi_name must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__afi_safi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_safi_name(self):
    self.__afi_safi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/config/enabled (boolean)

    YANG Description: This leaf indicates whether the AFI-SAFI is
enabled for the neighbor or group
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: This leaf indicates whether the AFI-SAFI is
enabled for the neighbor or group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  afi_safi_name = __builtin__.property(_get_afi_safi_name, _set_afi_safi_name)
  enabled = __builtin__.property(_get_enabled, _set_enabled)


  _pyangbind_elements = OrderedDict([('afi_safi_name', afi_safi_name), ('enabled', enabled), ])


class yc_prefixes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_state_prefixes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/state/prefixes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Prefix counters for the BGP session
  """
  __slots__ = ('_path_helper', '_extmethods', '__received','__received_pre_policy','__sent','__installed',)

  _yang_name = 'prefixes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__received = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__received_pre_policy = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="received-pre-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__sent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__installed = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="installed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'state', 'prefixes']

  def _get_received(self):
    """
    Getter method for received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/state/prefixes/received (uint32)

    YANG Description: The number of prefixes that are received from the
neighbor after applying any policies. This count is the
number of prefixes present in the post-policy Adj-RIB-In
for the neighbor
    """
    return self.__received
      
  def _set_received(self, v, load=False):
    """
    Setter method for received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/state/prefixes/received (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_received() directly.

    YANG Description: The number of prefixes that are received from the
neighbor after applying any policies. This count is the
number of prefixes present in the post-policy Adj-RIB-In
for the neighbor
    """
    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="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """received 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="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_received(self):
    self.__received = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_received_pre_policy(self):
    """
    Getter method for received_pre_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/state/prefixes/received_pre_policy (uint32)

    YANG Description: The number of prefixes that are received from the
neighbor before applying any policies. This count is
the number of prefixes present in the pre-policy
Adj-RIB-In for the neighbor
    """
    return self.__received_pre_policy
      
  def _set_received_pre_policy(self, v, load=False):
    """
    Setter method for received_pre_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/state/prefixes/received_pre_policy (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_received_pre_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_received_pre_policy() directly.

    YANG Description: The number of prefixes that are received from the
neighbor before applying any policies. This count is
the number of prefixes present in the pre-policy
Adj-RIB-In for the neighbor
    """
    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="received-pre-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """received_pre_policy 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="received-pre-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__received_pre_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_received_pre_policy(self):
    self.__received_pre_policy = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="received-pre-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_sent(self):
    """
    Getter method for sent, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/state/prefixes/sent (uint32)

    YANG Description: The number of prefixes that are advertised to the
neighbor after applying any policies. This count is
the number of prefixes present in the post-policy
Adj-RIB-Out for the neighbor
    """
    return self.__sent
      
  def _set_sent(self, v, load=False):
    """
    Setter method for sent, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/state/prefixes/sent (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sent() directly.

    YANG Description: The number of prefixes that are advertised to the
neighbor after applying any policies. This count is
the number of prefixes present in the post-policy
Adj-RIB-Out for the neighbor
    """
    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="sent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sent 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="sent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__sent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sent(self):
    self.__sent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_installed(self):
    """
    Getter method for installed, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/state/prefixes/installed (uint32)

    YANG Description: The number of prefices received from the neighbor that
are installed in the network instance RIB and actively used
for forwarding.

Routes that are actively used for forwarding are
defined to be those that:
- are selected, after the application of policies, to be
  included in the Adj-RIB-In-Post, AND
- are selected by best path selection and hence installed
  in the Loc-RIB (either as the only route, or as part of
  a multipath set, AND
- are selected, after the application of protocol
  preferences (e.g., administrative distance) as the
  route to be used by the system's RIB
    """
    return self.__installed
      
  def _set_installed(self, v, load=False):
    """
    Setter method for installed, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/state/prefixes/installed (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_installed is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_installed() directly.

    YANG Description: The number of prefices received from the neighbor that
are installed in the network instance RIB and actively used
for forwarding.

Routes that are actively used for forwarding are
defined to be those that:
- are selected, after the application of policies, to be
  included in the Adj-RIB-In-Post, AND
- are selected by best path selection and hence installed
  in the Loc-RIB (either as the only route, or as part of
  a multipath set, AND
- are selected, after the application of protocol
  preferences (e.g., administrative distance) as the
  route to be used by the system's RIB
    """
    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="installed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """installed 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="installed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__installed = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_installed(self):
    self.__installed = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="installed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  received = __builtin__.property(_get_received)
  received_pre_policy = __builtin__.property(_get_received_pre_policy)
  sent = __builtin__.property(_get_sent)
  installed = __builtin__.property(_get_installed)


  _pyangbind_elements = OrderedDict([('received', received), ('received_pre_policy', received_pre_policy), ('sent', sent), ('installed', installed), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi_safi_name','__enabled','__active','__prefixes',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi_safi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__active = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="active", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__prefixes = YANGDynClass(base=yc_prefixes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_state_prefixes, is_container='container', yang_name="prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'state']

  def _get_afi_safi_name(self):
    """
    Getter method for afi_safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/state/afi_safi_name (identityref)

    YANG Description: AFI,SAFI
    """
    return self.__afi_safi_name
      
  def _set_afi_safi_name(self, v, load=False):
    """
    Setter method for afi_safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/state/afi_safi_name (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_safi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_safi_name() directly.

    YANG Description: AFI,SAFI
    """
    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_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_safi_name must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__afi_safi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_safi_name(self):
    self.__afi_safi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/state/enabled (boolean)

    YANG Description: This leaf indicates whether the AFI-SAFI is
enabled for the neighbor or group
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: This leaf indicates whether the AFI-SAFI is
enabled for the neighbor or group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_active(self):
    """
    Getter method for active, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/state/active (boolean)

    YANG Description: This value indicates whether a particular AFI-SAFI has
been succesfully negotiated with the peer. An AFI-SAFI
may be enabled in the current running configuration, but a
session restart may be required in order to negotiate the new
capability.
    """
    return self.__active
      
  def _set_active(self, v, load=False):
    """
    Setter method for active, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/state/active (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_active is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_active() directly.

    YANG Description: This value indicates whether a particular AFI-SAFI has
been succesfully negotiated with the peer. An AFI-SAFI
may be enabled in the current running configuration, but a
session restart may be required in order to negotiate the new
capability.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="active", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """active must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="active", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__active = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_active(self):
    self.__active = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="active", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_prefixes(self):
    """
    Getter method for prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/state/prefixes (container)

    YANG Description: Prefix counters for the BGP session
    """
    return self.__prefixes
      
  def _set_prefixes(self, v, load=False):
    """
    Setter method for prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/state/prefixes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefixes() directly.

    YANG Description: Prefix counters for the BGP session
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefixes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_state_prefixes, is_container='container', yang_name="prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefixes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefixes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_state_prefixes, is_container='container', yang_name="prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefixes(self):
    self.__prefixes = YANGDynClass(base=yc_prefixes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_state_prefixes, is_container='container', yang_name="prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  afi_safi_name = __builtin__.property(_get_afi_safi_name)
  enabled = __builtin__.property(_get_enabled)
  active = __builtin__.property(_get_active)
  prefixes = __builtin__.property(_get_prefixes)


  _pyangbind_elements = OrderedDict([('afi_safi_name', afi_safi_name), ('enabled', enabled), ('active', active), ('prefixes', prefixes), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_graceful_restart_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/graceful-restart/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration options for BGP graceful-restart
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'graceful-restart', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/graceful_restart/config/enabled (boolean)

    YANG Description: This leaf indicates whether graceful-restart is enabled for
this AFI-SAFI
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/graceful_restart/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: This leaf indicates whether graceful-restart is enabled for
this AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_graceful_restart_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/graceful-restart/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information for BGP graceful-restart
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__received','__advertised',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__received = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__advertised = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="advertised", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'graceful-restart', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/graceful_restart/state/enabled (boolean)

    YANG Description: This leaf indicates whether graceful-restart is enabled for
this AFI-SAFI
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/graceful_restart/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: This leaf indicates whether graceful-restart is enabled for
this AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_received(self):
    """
    Getter method for received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/graceful_restart/state/received (boolean)

    YANG Description: This leaf indicates whether the neighbor advertised the
ability to support graceful-restart for this AFI-SAFI
    """
    return self.__received
      
  def _set_received(self, v, load=False):
    """
    Setter method for received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/graceful_restart/state/received (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_received() directly.

    YANG Description: This leaf indicates whether the neighbor advertised the
ability to support graceful-restart for this AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """received must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_received(self):
    self.__received = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_advertised(self):
    """
    Getter method for advertised, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/graceful_restart/state/advertised (boolean)

    YANG Description: This leaf indicates whether the ability to support
graceful-restart has been advertised to the peer
    """
    return self.__advertised
      
  def _set_advertised(self, v, load=False):
    """
    Setter method for advertised, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/graceful_restart/state/advertised (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_advertised is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_advertised() directly.

    YANG Description: This leaf indicates whether the ability to support
graceful-restart has been advertised to the peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="advertised", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """advertised must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="advertised", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__advertised = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_advertised(self):
    self.__advertised = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="advertised", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  enabled = __builtin__.property(_get_enabled)
  received = __builtin__.property(_get_received)
  advertised = __builtin__.property(_get_advertised)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('received', received), ('advertised', advertised), ])


class yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_graceful_restart(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/graceful-restart. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Parameters relating to BGP graceful-restart
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'graceful-restart'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'graceful-restart']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/graceful_restart/config (container)

    YANG Description: Configuration options for BGP graceful-restart
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/graceful_restart/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 options for BGP graceful-restart
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/graceful_restart/state (container)

    YANG Description: State information for BGP graceful-restart
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/graceful_restart/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 BGP graceful-restart
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_add_paths_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/add-paths/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to ADD_PATHS
  """
  __slots__ = ('_path_helper', '_extmethods', '__receive','__send','__send_max','__eligible_prefix_policy',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__receive = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="receive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__send = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__send_max = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="send-max", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    self.__eligible_prefix_policy = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="eligible-prefix-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'add-paths', 'config']

  def _get_receive(self):
    """
    Getter method for receive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/add_paths/config/receive (boolean)

    YANG Description: Enable capability negotiation to receive multiple path
advertisements for an NLRI from the neighbor or group
    """
    return self.__receive
      
  def _set_receive(self, v, load=False):
    """
    Setter method for receive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/add_paths/config/receive (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_receive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_receive() directly.

    YANG Description: Enable capability negotiation to receive multiple path
advertisements for an NLRI from the neighbor or group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="receive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """receive must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="receive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__receive = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_receive(self):
    self.__receive = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="receive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_send(self):
    """
    Getter method for send, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/add_paths/config/send (boolean)

    YANG Description: Enable capability negotiation to send multiple path
advertisements for an NLRI from the neighbor or group
    """
    return self.__send
      
  def _set_send(self, v, load=False):
    """
    Setter method for send, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/add_paths/config/send (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_send is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_send() directly.

    YANG Description: Enable capability negotiation to send multiple path
advertisements for an NLRI from the neighbor or group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """send must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__send = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_send(self):
    self.__send = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_send_max(self):
    """
    Getter method for send_max, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/add_paths/config/send_max (uint8)

    YANG Description: The maximum total number of paths to advertise to neighbors
for a single NLRI.  This includes the single best path as
well as additional paths advertised when add-paths is
enabled.
    """
    return self.__send_max
      
  def _set_send_max(self, v, load=False):
    """
    Setter method for send_max, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/add_paths/config/send_max (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_send_max is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_send_max() directly.

    YANG Description: The maximum total number of paths to advertise to neighbors
for a single NLRI.  This includes the single best path as
well as additional paths advertised when add-paths is
enabled.
    """
    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="send-max", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """send_max 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="send-max", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
        })

    self.__send_max = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_send_max(self):
    self.__send_max = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="send-max", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)


  def _get_eligible_prefix_policy(self):
    """
    Getter method for eligible_prefix_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/add_paths/config/eligible_prefix_policy (leafref)

    YANG Description: A reference to a routing policy which can be used to
restrict the prefixes for which add-paths is enabled
    """
    return self.__eligible_prefix_policy
      
  def _set_eligible_prefix_policy(self, v, load=False):
    """
    Setter method for eligible_prefix_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/add_paths/config/eligible_prefix_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_eligible_prefix_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_eligible_prefix_policy() directly.

    YANG Description: A reference to a routing policy which can be used to
restrict the prefixes for which add-paths is enabled
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="eligible-prefix-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """eligible_prefix_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="eligible-prefix-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__eligible_prefix_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_eligible_prefix_policy(self):
    self.__eligible_prefix_policy = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="eligible-prefix-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)

  receive = __builtin__.property(_get_receive, _set_receive)
  send = __builtin__.property(_get_send, _set_send)
  send_max = __builtin__.property(_get_send_max, _set_send_max)
  eligible_prefix_policy = __builtin__.property(_get_eligible_prefix_policy, _set_eligible_prefix_policy)


  _pyangbind_elements = OrderedDict([('receive', receive), ('send', send), ('send_max', send_max), ('eligible_prefix_policy', eligible_prefix_policy), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_add_paths_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/add-paths/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information associated with ADD_PATHS
  """
  __slots__ = ('_path_helper', '_extmethods', '__receive','__send','__send_max','__eligible_prefix_policy',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__receive = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="receive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__send = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__send_max = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="send-max", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__eligible_prefix_policy = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="eligible-prefix-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'add-paths', 'state']

  def _get_receive(self):
    """
    Getter method for receive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/add_paths/state/receive (boolean)

    YANG Description: Enable capability negotiation to receive multiple path
advertisements for an NLRI from the neighbor or group
    """
    return self.__receive
      
  def _set_receive(self, v, load=False):
    """
    Setter method for receive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/add_paths/state/receive (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_receive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_receive() directly.

    YANG Description: Enable capability negotiation to receive multiple path
advertisements for an NLRI from the neighbor or group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="receive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """receive must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="receive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__receive = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_receive(self):
    self.__receive = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="receive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_send(self):
    """
    Getter method for send, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/add_paths/state/send (boolean)

    YANG Description: Enable capability negotiation to send multiple path
advertisements for an NLRI from the neighbor or group
    """
    return self.__send
      
  def _set_send(self, v, load=False):
    """
    Setter method for send, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/add_paths/state/send (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_send is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_send() directly.

    YANG Description: Enable capability negotiation to send multiple path
advertisements for an NLRI from the neighbor or group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """send must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__send = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_send(self):
    self.__send = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_send_max(self):
    """
    Getter method for send_max, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/add_paths/state/send_max (uint8)

    YANG Description: The maximum total number of paths to advertise to neighbors
for a single NLRI.  This includes the single best path as
well as additional paths advertised when add-paths is
enabled.
    """
    return self.__send_max
      
  def _set_send_max(self, v, load=False):
    """
    Setter method for send_max, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/add_paths/state/send_max (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_send_max is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_send_max() directly.

    YANG Description: The maximum total number of paths to advertise to neighbors
for a single NLRI.  This includes the single best path as
well as additional paths advertised when add-paths is
enabled.
    """
    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="send-max", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """send_max 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="send-max", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__send_max = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_send_max(self):
    self.__send_max = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="send-max", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_eligible_prefix_policy(self):
    """
    Getter method for eligible_prefix_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/add_paths/state/eligible_prefix_policy (leafref)

    YANG Description: A reference to a routing policy which can be used to
restrict the prefixes for which add-paths is enabled
    """
    return self.__eligible_prefix_policy
      
  def _set_eligible_prefix_policy(self, v, load=False):
    """
    Setter method for eligible_prefix_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/add_paths/state/eligible_prefix_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_eligible_prefix_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_eligible_prefix_policy() directly.

    YANG Description: A reference to a routing policy which can be used to
restrict the prefixes for which add-paths is enabled
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="eligible-prefix-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """eligible_prefix_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="eligible-prefix-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__eligible_prefix_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_eligible_prefix_policy(self):
    self.__eligible_prefix_policy = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="eligible-prefix-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)

  receive = __builtin__.property(_get_receive)
  send = __builtin__.property(_get_send)
  send_max = __builtin__.property(_get_send_max)
  eligible_prefix_policy = __builtin__.property(_get_eligible_prefix_policy)


  _pyangbind_elements = OrderedDict([('receive', receive), ('send', send), ('send_max', send_max), ('eligible_prefix_policy', eligible_prefix_policy), ])


class yc_add_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_add_paths(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/add-paths. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Parameters relating to the advertisement and receipt of
multiple paths for a single NLRI (add-paths)
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'add-paths'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_add_paths_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_add_paths_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'add-paths']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/add_paths/config (container)

    YANG Description: Configuration parameters relating to ADD_PATHS
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/add_paths/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 ADD_PATHS
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_add_paths_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_add_paths_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_add_paths_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/add_paths/state (container)

    YANG Description: State information associated with ADD_PATHS
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/add_paths/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 associated with ADD_PATHS
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_add_paths_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_add_paths_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_add_paths_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_apply_policy_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/apply-policy/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Policy configuration data.
  """
  __slots__ = ('_path_helper', '_extmethods', '__import_policy','__default_import_policy','__export_policy','__default_export_policy',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)
    self.__export_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__default_export_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'apply-policy', 'config']

  def _get_import_policy(self):
    """
    Getter method for import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/apply_policy/config/import_policy (leafref)

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    return self.__import_policy
      
  def _set_import_policy(self, v, load=False):
    """
    Setter method for import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/apply_policy/config/import_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_import_policy() directly.

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """import_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__import_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_import_policy(self):
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_default_import_policy(self):
    """
    Getter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/apply_policy/config/default_import_policy (default-policy-type)

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    return self.__default_import_policy
      
  def _set_default_import_policy(self, v, load=False):
    """
    Setter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/apply_policy/config/default_import_policy (default-policy-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_default_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_default_import_policy() directly.

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    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={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """default_import_policy must be of a type compatible with default-policy-type""",
          'defined-type': "openconfig-network-instance:default-policy-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)""",
        })

    self.__default_import_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_default_import_policy(self):
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)


  def _get_export_policy(self):
    """
    Getter method for export_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/apply_policy/config/export_policy (leafref)

    YANG Description: list of policy names in sequence to be applied on
sending a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    return self.__export_policy
      
  def _set_export_policy(self, v, load=False):
    """
    Setter method for export_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/apply_policy/config/export_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_export_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_export_policy() directly.

    YANG Description: list of policy names in sequence to be applied on
sending a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """export_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__export_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_export_policy(self):
    self.__export_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_default_export_policy(self):
    """
    Getter method for default_export_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/apply_policy/config/default_export_policy (default-policy-type)

    YANG Description: explicitly set a default policy if no policy definition
in the export policy chain is satisfied.
    """
    return self.__default_export_policy
      
  def _set_default_export_policy(self, v, load=False):
    """
    Setter method for default_export_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/apply_policy/config/default_export_policy (default-policy-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_default_export_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_default_export_policy() directly.

    YANG Description: explicitly set a default policy if no policy definition
in the export policy chain is satisfied.
    """
    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={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """default_export_policy must be of a type compatible with default-policy-type""",
          'defined-type': "openconfig-network-instance:default-policy-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)""",
        })

    self.__default_export_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_default_export_policy(self):
    self.__default_export_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)

  import_policy = __builtin__.property(_get_import_policy, _set_import_policy)
  default_import_policy = __builtin__.property(_get_default_import_policy, _set_default_import_policy)
  export_policy = __builtin__.property(_get_export_policy, _set_export_policy)
  default_export_policy = __builtin__.property(_get_default_export_policy, _set_default_export_policy)


  _pyangbind_elements = OrderedDict([('import_policy', import_policy), ('default_import_policy', default_import_policy), ('export_policy', export_policy), ('default_export_policy', default_export_policy), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_apply_policy_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/apply-policy/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for routing policy
  """
  __slots__ = ('_path_helper', '_extmethods', '__import_policy','__default_import_policy','__export_policy','__default_export_policy',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)
    self.__export_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__default_export_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'apply-policy', 'state']

  def _get_import_policy(self):
    """
    Getter method for import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/apply_policy/state/import_policy (leafref)

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    return self.__import_policy
      
  def _set_import_policy(self, v, load=False):
    """
    Setter method for import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/apply_policy/state/import_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_import_policy() directly.

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """import_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__import_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_import_policy(self):
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_default_import_policy(self):
    """
    Getter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/apply_policy/state/default_import_policy (default-policy-type)

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    return self.__default_import_policy
      
  def _set_default_import_policy(self, v, load=False):
    """
    Setter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/apply_policy/state/default_import_policy (default-policy-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_default_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_default_import_policy() directly.

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    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={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """default_import_policy must be of a type compatible with default-policy-type""",
          'defined-type': "openconfig-network-instance:default-policy-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)""",
        })

    self.__default_import_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_default_import_policy(self):
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)


  def _get_export_policy(self):
    """
    Getter method for export_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/apply_policy/state/export_policy (leafref)

    YANG Description: list of policy names in sequence to be applied on
sending a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    return self.__export_policy
      
  def _set_export_policy(self, v, load=False):
    """
    Setter method for export_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/apply_policy/state/export_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_export_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_export_policy() directly.

    YANG Description: list of policy names in sequence to be applied on
sending a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """export_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__export_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_export_policy(self):
    self.__export_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_default_export_policy(self):
    """
    Getter method for default_export_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/apply_policy/state/default_export_policy (default-policy-type)

    YANG Description: explicitly set a default policy if no policy definition
in the export policy chain is satisfied.
    """
    return self.__default_export_policy
      
  def _set_default_export_policy(self, v, load=False):
    """
    Setter method for default_export_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/apply_policy/state/default_export_policy (default-policy-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_default_export_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_default_export_policy() directly.

    YANG Description: explicitly set a default policy if no policy definition
in the export policy chain is satisfied.
    """
    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={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """default_export_policy must be of a type compatible with default-policy-type""",
          'defined-type': "openconfig-network-instance:default-policy-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)""",
        })

    self.__default_export_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_default_export_policy(self):
    self.__default_export_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)

  import_policy = __builtin__.property(_get_import_policy)
  default_import_policy = __builtin__.property(_get_default_import_policy)
  export_policy = __builtin__.property(_get_export_policy)
  default_export_policy = __builtin__.property(_get_default_export_policy)


  _pyangbind_elements = OrderedDict([('import_policy', import_policy), ('default_import_policy', default_import_policy), ('export_policy', export_policy), ('default_export_policy', default_export_policy), ])


class yc_apply_policy_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_apply_policy(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/apply-policy. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Anchor point for routing policies in the model.
Import and export policies are with respect to the local
routing table, i.e., export (send) and import (receive),
depending on the context.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'apply-policy'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_apply_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_apply_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'apply-policy']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/apply_policy/config (container)

    YANG Description: Policy configuration data.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/apply_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: Policy configuration data.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_apply_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_apply_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_apply_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/apply_policy/state (container)

    YANG Description: Operational state for routing policy
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/apply_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 for routing policy
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_apply_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_apply_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_apply_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'prefix-limit', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/prefix_limit/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/prefix_limit/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/prefix_limit/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/prefix_limit/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'prefix-limit', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/prefix_limit/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/prefix_limit/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/prefix_limit/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/prefix_limit/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/prefix_limit/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/prefix_limit/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'prefix-limit']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/prefix_limit/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/prefix_limit/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/prefix_limit/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/prefix_limit/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit-received/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'prefix-limit-received', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit-received/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'prefix-limit-received', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit-received. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
received from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit-received'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'prefix-limit-received']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for IPv4 unicast AFI-SAFI options
  """
  __slots__ = ('_path_helper', '_extmethods', '__send_default_route','__extended_next_hop_encoding',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__send_default_route = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__extended_next_hop_encoding = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="extended-next-hop-encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'config']

  def _get_send_default_route(self):
    """
    Getter method for send_default_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/config/send_default_route (boolean)

    YANG Description: If set to true, send the default-route to the neighbor(s)
    """
    return self.__send_default_route
      
  def _set_send_default_route(self, v, load=False):
    """
    Setter method for send_default_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/config/send_default_route (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_send_default_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_send_default_route() directly.

    YANG Description: If set to true, send the default-route to the neighbor(s)
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """send_default_route must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__send_default_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_send_default_route(self):
    self.__send_default_route = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_extended_next_hop_encoding(self):
    """
    Getter method for extended_next_hop_encoding, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/config/extended_next_hop_encoding (boolean)

    YANG Description: This leaf indicates whether extended next-hop encoding is enabled for
this AFI-SAFI
    """
    return self.__extended_next_hop_encoding
      
  def _set_extended_next_hop_encoding(self, v, load=False):
    """
    Setter method for extended_next_hop_encoding, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/config/extended_next_hop_encoding (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended_next_hop_encoding is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended_next_hop_encoding() directly.

    YANG Description: This leaf indicates whether extended next-hop encoding is enabled for
this AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="extended-next-hop-encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended_next_hop_encoding must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="extended-next-hop-encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__extended_next_hop_encoding = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended_next_hop_encoding(self):
    self.__extended_next_hop_encoding = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="extended-next-hop-encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  send_default_route = __builtin__.property(_get_send_default_route, _set_send_default_route)
  extended_next_hop_encoding = __builtin__.property(_get_extended_next_hop_encoding, _set_extended_next_hop_encoding)


  _pyangbind_elements = OrderedDict([('send_default_route', send_default_route), ('extended_next_hop_encoding', extended_next_hop_encoding), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information for IPv4 parameters
  """
  __slots__ = ('_path_helper', '_extmethods', '__send_default_route','__extended_next_hop_encoding',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__send_default_route = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__extended_next_hop_encoding = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="extended-next-hop-encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'state']

  def _get_send_default_route(self):
    """
    Getter method for send_default_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/state/send_default_route (boolean)

    YANG Description: If set to true, send the default-route to the neighbor(s)
    """
    return self.__send_default_route
      
  def _set_send_default_route(self, v, load=False):
    """
    Setter method for send_default_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/state/send_default_route (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_send_default_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_send_default_route() directly.

    YANG Description: If set to true, send the default-route to the neighbor(s)
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """send_default_route must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__send_default_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_send_default_route(self):
    self.__send_default_route = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_extended_next_hop_encoding(self):
    """
    Getter method for extended_next_hop_encoding, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/state/extended_next_hop_encoding (boolean)

    YANG Description: This leaf indicates whether extended next-hop encoding is enabled for
this AFI-SAFI
    """
    return self.__extended_next_hop_encoding
      
  def _set_extended_next_hop_encoding(self, v, load=False):
    """
    Setter method for extended_next_hop_encoding, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/state/extended_next_hop_encoding (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended_next_hop_encoding is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended_next_hop_encoding() directly.

    YANG Description: This leaf indicates whether extended next-hop encoding is enabled for
this AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="extended-next-hop-encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended_next_hop_encoding must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="extended-next-hop-encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__extended_next_hop_encoding = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended_next_hop_encoding(self):
    self.__extended_next_hop_encoding = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="extended-next-hop-encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  send_default_route = __builtin__.property(_get_send_default_route)
  extended_next_hop_encoding = __builtin__.property(_get_extended_next_hop_encoding)


  _pyangbind_elements = OrderedDict([('send_default_route', send_default_route), ('extended_next_hop_encoding', extended_next_hop_encoding), ])


class yc_ipv4_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: IPv4 unicast configuration options
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_limit','__prefix_limit_received','__config','__state',)

  _yang_name = 'ipv4-unicast'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'ipv4-unicast']

  def _get_prefix_limit(self):
    """
    Getter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/prefix_limit (container)

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    return self.__prefix_limit
      
  def _set_prefix_limit(self, v, load=False):
    """
    Setter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/prefix_limit (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit() directly.

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit(self):
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_prefix_limit_received(self):
    """
    Getter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received (container)

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    return self.__prefix_limit_received
      
  def _set_prefix_limit_received(self, v, load=False):
    """
    Setter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_received() directly.

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_received must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit_received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_received(self):
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/config (container)

    YANG Description: Configuration parameters for IPv4 unicast AFI-SAFI options
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/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 IPv4 unicast AFI-SAFI options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/state (container)

    YANG Description: State information for IPv4 parameters
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast/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 parameters
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  prefix_limit = __builtin__.property(_get_prefix_limit, _set_prefix_limit)
  prefix_limit_received = __builtin__.property(_get_prefix_limit_received, _set_prefix_limit_received)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('prefix_limit', prefix_limit), ('prefix_limit_received', prefix_limit_received), ('config', config), ('state', state), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'prefix-limit', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/prefix_limit/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/prefix_limit/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/prefix_limit/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/prefix_limit/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'prefix-limit', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/prefix_limit/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/prefix_limit/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/prefix_limit/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/prefix_limit/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/prefix_limit/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/prefix_limit/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'prefix-limit']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/prefix_limit/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/prefix_limit/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/prefix_limit/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/prefix_limit/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit-received/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'prefix-limit-received', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit-received/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'prefix-limit-received', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit-received. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
received from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit-received'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'prefix-limit-received']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for IPv6 unicast AFI-SAFI options
  """
  __slots__ = ('_path_helper', '_extmethods', '__send_default_route',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__send_default_route = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'config']

  def _get_send_default_route(self):
    """
    Getter method for send_default_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/config/send_default_route (boolean)

    YANG Description: If set to true, send the default-route to the neighbor(s)
    """
    return self.__send_default_route
      
  def _set_send_default_route(self, v, load=False):
    """
    Setter method for send_default_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/config/send_default_route (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_send_default_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_send_default_route() directly.

    YANG Description: If set to true, send the default-route to the neighbor(s)
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """send_default_route must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__send_default_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_send_default_route(self):
    self.__send_default_route = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  send_default_route = __builtin__.property(_get_send_default_route, _set_send_default_route)


  _pyangbind_elements = OrderedDict([('send_default_route', send_default_route), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information for IPv6 unicast parameters
  """
  __slots__ = ('_path_helper', '_extmethods', '__send_default_route',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__send_default_route = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'state']

  def _get_send_default_route(self):
    """
    Getter method for send_default_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/state/send_default_route (boolean)

    YANG Description: If set to true, send the default-route to the neighbor(s)
    """
    return self.__send_default_route
      
  def _set_send_default_route(self, v, load=False):
    """
    Setter method for send_default_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/state/send_default_route (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_send_default_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_send_default_route() directly.

    YANG Description: If set to true, send the default-route to the neighbor(s)
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """send_default_route must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__send_default_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_send_default_route(self):
    self.__send_default_route = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  send_default_route = __builtin__.property(_get_send_default_route)


  _pyangbind_elements = OrderedDict([('send_default_route', send_default_route), ])


class yc_ipv6_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: IPv6 unicast configuration options
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_limit','__prefix_limit_received','__config','__state',)

  _yang_name = 'ipv6-unicast'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'ipv6-unicast']

  def _get_prefix_limit(self):
    """
    Getter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/prefix_limit (container)

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    return self.__prefix_limit
      
  def _set_prefix_limit(self, v, load=False):
    """
    Setter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/prefix_limit (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit() directly.

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit(self):
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_prefix_limit_received(self):
    """
    Getter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received (container)

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    return self.__prefix_limit_received
      
  def _set_prefix_limit_received(self, v, load=False):
    """
    Setter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_received() directly.

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_received must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit_received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_received(self):
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/config (container)

    YANG Description: Configuration parameters for IPv6 unicast AFI-SAFI options
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/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 IPv6 unicast AFI-SAFI options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/state (container)

    YANG Description: State information for IPv6 unicast parameters
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast/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 IPv6 unicast parameters
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  prefix_limit = __builtin__.property(_get_prefix_limit, _set_prefix_limit)
  prefix_limit_received = __builtin__.property(_get_prefix_limit_received, _set_prefix_limit_received)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('prefix_limit', prefix_limit), ('prefix_limit_received', prefix_limit_received), ('config', config), ('state', state), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'ipv4-labeled-unicast', 'prefix-limit', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'ipv4-labeled-unicast', 'prefix-limit', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'ipv4-labeled-unicast', 'prefix-limit']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit-received/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'ipv4-labeled-unicast', 'prefix-limit-received', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit-received/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'ipv4-labeled-unicast', 'prefix-limit-received', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit-received. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
received from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit-received'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'ipv4-labeled-unicast', 'prefix-limit-received']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_labeled_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: IPv4 Labeled Unicast configuration options
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_limit','__prefix_limit_received',)

  _yang_name = 'ipv4-labeled-unicast'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'ipv4-labeled-unicast']

  def _get_prefix_limit(self):
    """
    Getter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit (container)

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    return self.__prefix_limit
      
  def _set_prefix_limit(self, v, load=False):
    """
    Setter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit() directly.

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit(self):
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_prefix_limit_received(self):
    """
    Getter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received (container)

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    return self.__prefix_limit_received
      
  def _set_prefix_limit_received(self, v, load=False):
    """
    Setter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_received() directly.

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_received must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit_received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_received(self):
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  prefix_limit = __builtin__.property(_get_prefix_limit, _set_prefix_limit)
  prefix_limit_received = __builtin__.property(_get_prefix_limit_received, _set_prefix_limit_received)


  _pyangbind_elements = OrderedDict([('prefix_limit', prefix_limit), ('prefix_limit_received', prefix_limit_received), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'ipv6-labeled-unicast', 'prefix-limit', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'ipv6-labeled-unicast', 'prefix-limit', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'ipv6-labeled-unicast', 'prefix-limit']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit-received/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'ipv6-labeled-unicast', 'prefix-limit-received', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit-received/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'ipv6-labeled-unicast', 'prefix-limit-received', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit-received. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
received from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit-received'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'ipv6-labeled-unicast', 'prefix-limit-received']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_labeled_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: IPv6 Labeled Unicast configuration options
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_limit','__prefix_limit_received',)

  _yang_name = 'ipv6-labeled-unicast'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'ipv6-labeled-unicast']

  def _get_prefix_limit(self):
    """
    Getter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit (container)

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    return self.__prefix_limit
      
  def _set_prefix_limit(self, v, load=False):
    """
    Setter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit() directly.

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit(self):
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_prefix_limit_received(self):
    """
    Getter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received (container)

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    return self.__prefix_limit_received
      
  def _set_prefix_limit_received(self, v, load=False):
    """
    Setter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_received() directly.

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_received must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit_received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_received(self):
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  prefix_limit = __builtin__.property(_get_prefix_limit, _set_prefix_limit)
  prefix_limit_received = __builtin__.property(_get_prefix_limit_received, _set_prefix_limit_received)


  _pyangbind_elements = OrderedDict([('prefix_limit', prefix_limit), ('prefix_limit_received', prefix_limit_received), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-unicast', 'prefix-limit', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-unicast', 'prefix-limit', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-unicast', 'prefix-limit']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit-received/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-unicast', 'prefix-limit-received', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit-received/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-unicast', 'prefix-limit-received', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit-received. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
received from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit-received'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-unicast', 'prefix-limit-received']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_l3vpn_ipv4_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Unicast IPv4 L3VPN configuration options
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_limit','__prefix_limit_received',)

  _yang_name = 'l3vpn-ipv4-unicast'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-unicast']

  def _get_prefix_limit(self):
    """
    Getter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit (container)

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    return self.__prefix_limit
      
  def _set_prefix_limit(self, v, load=False):
    """
    Setter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit() directly.

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit(self):
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_prefix_limit_received(self):
    """
    Getter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received (container)

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    return self.__prefix_limit_received
      
  def _set_prefix_limit_received(self, v, load=False):
    """
    Setter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_received() directly.

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_received must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit_received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_received(self):
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  prefix_limit = __builtin__.property(_get_prefix_limit, _set_prefix_limit)
  prefix_limit_received = __builtin__.property(_get_prefix_limit_received, _set_prefix_limit_received)


  _pyangbind_elements = OrderedDict([('prefix_limit', prefix_limit), ('prefix_limit_received', prefix_limit_received), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-unicast', 'prefix-limit', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-unicast', 'prefix-limit', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-unicast', 'prefix-limit']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit-received/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-unicast', 'prefix-limit-received', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit-received/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-unicast', 'prefix-limit-received', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit-received. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
received from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit-received'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-unicast', 'prefix-limit-received']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_l3vpn_ipv6_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Unicast IPv6 L3VPN configuration options
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_limit','__prefix_limit_received',)

  _yang_name = 'l3vpn-ipv6-unicast'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-unicast']

  def _get_prefix_limit(self):
    """
    Getter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit (container)

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    return self.__prefix_limit
      
  def _set_prefix_limit(self, v, load=False):
    """
    Setter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit() directly.

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit(self):
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_prefix_limit_received(self):
    """
    Getter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received (container)

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    return self.__prefix_limit_received
      
  def _set_prefix_limit_received(self, v, load=False):
    """
    Setter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_received() directly.

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_received must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit_received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_received(self):
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  prefix_limit = __builtin__.property(_get_prefix_limit, _set_prefix_limit)
  prefix_limit_received = __builtin__.property(_get_prefix_limit_received, _set_prefix_limit_received)


  _pyangbind_elements = OrderedDict([('prefix_limit', prefix_limit), ('prefix_limit_received', prefix_limit_received), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-multicast/prefix-limit/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-multicast', 'prefix-limit', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-multicast/prefix-limit/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-multicast', 'prefix-limit', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-multicast/prefix-limit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-multicast', 'prefix-limit']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-multicast/prefix-limit-received/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-multicast', 'prefix-limit-received', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-multicast/prefix-limit-received/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-multicast', 'prefix-limit-received', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-multicast/prefix-limit-received. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
received from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit-received'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-multicast', 'prefix-limit-received']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_l3vpn_ipv4_multicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_multicast(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-multicast. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Multicast IPv4 L3VPN configuration options
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_limit','__prefix_limit_received',)

  _yang_name = 'l3vpn-ipv4-multicast'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-multicast']

  def _get_prefix_limit(self):
    """
    Getter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit (container)

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    return self.__prefix_limit
      
  def _set_prefix_limit(self, v, load=False):
    """
    Setter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit() directly.

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit(self):
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_prefix_limit_received(self):
    """
    Getter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received (container)

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    return self.__prefix_limit_received
      
  def _set_prefix_limit_received(self, v, load=False):
    """
    Setter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_received() directly.

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_received must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit_received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_received(self):
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  prefix_limit = __builtin__.property(_get_prefix_limit, _set_prefix_limit)
  prefix_limit_received = __builtin__.property(_get_prefix_limit_received, _set_prefix_limit_received)


  _pyangbind_elements = OrderedDict([('prefix_limit', prefix_limit), ('prefix_limit_received', prefix_limit_received), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-multicast/prefix-limit/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-multicast', 'prefix-limit', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-multicast/prefix-limit/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-multicast', 'prefix-limit', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-multicast/prefix-limit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-multicast', 'prefix-limit']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-multicast/prefix-limit-received/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-multicast', 'prefix-limit-received', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-multicast/prefix-limit-received/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-multicast', 'prefix-limit-received', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-multicast/prefix-limit-received. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
received from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit-received'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-multicast', 'prefix-limit-received']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_l3vpn_ipv6_multicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_multicast(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-multicast. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Multicast IPv6 L3VPN configuration options
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_limit','__prefix_limit_received',)

  _yang_name = 'l3vpn-ipv6-multicast'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-multicast']

  def _get_prefix_limit(self):
    """
    Getter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit (container)

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    return self.__prefix_limit
      
  def _set_prefix_limit(self, v, load=False):
    """
    Setter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit() directly.

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit(self):
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_prefix_limit_received(self):
    """
    Getter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received (container)

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    return self.__prefix_limit_received
      
  def _set_prefix_limit_received(self, v, load=False):
    """
    Setter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_received() directly.

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_received must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit_received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_received(self):
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  prefix_limit = __builtin__.property(_get_prefix_limit, _set_prefix_limit)
  prefix_limit_received = __builtin__.property(_get_prefix_limit_received, _set_prefix_limit_received)


  _pyangbind_elements = OrderedDict([('prefix_limit', prefix_limit), ('prefix_limit_received', prefix_limit_received), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-vpls/prefix-limit/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l2vpn-vpls', 'prefix-limit', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-vpls/prefix-limit/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l2vpn-vpls', 'prefix-limit', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_vpls_prefix_limit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-vpls/prefix-limit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l2vpn-vpls', 'prefix-limit']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-vpls/prefix-limit-received/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l2vpn-vpls', 'prefix-limit-received', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-vpls/prefix-limit-received/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l2vpn-vpls', 'prefix-limit-received', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-vpls/prefix-limit-received. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
received from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit-received'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l2vpn-vpls', 'prefix-limit-received']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_l2vpn_vpls_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_vpls(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-vpls. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: BGP-signalled VPLS configuration options
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_limit','__prefix_limit_received',)

  _yang_name = 'l2vpn-vpls'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_vpls_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l2vpn-vpls']

  def _get_prefix_limit(self):
    """
    Getter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls/prefix_limit (container)

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    return self.__prefix_limit
      
  def _set_prefix_limit(self, v, load=False):
    """
    Setter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls/prefix_limit (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit() directly.

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_vpls_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_vpls_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit(self):
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_vpls_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_prefix_limit_received(self):
    """
    Getter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received (container)

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    return self.__prefix_limit_received
      
  def _set_prefix_limit_received(self, v, load=False):
    """
    Setter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_received() directly.

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_received must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit_received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_received(self):
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  prefix_limit = __builtin__.property(_get_prefix_limit, _set_prefix_limit)
  prefix_limit_received = __builtin__.property(_get_prefix_limit_received, _set_prefix_limit_received)


  _pyangbind_elements = OrderedDict([('prefix_limit', prefix_limit), ('prefix_limit_received', prefix_limit_received), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/prefix-limit/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'prefix-limit', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/prefix-limit/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'prefix-limit', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_prefix_limit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/prefix-limit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'prefix-limit']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/prefix-limit-received/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'prefix-limit-received', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/prefix-limit-received/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'prefix-limit-received', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/prefix-limit-received. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
received from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit-received'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'prefix-limit-received']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_l2vpn_evpn_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: BGP EVPN configuration options
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_limit','__prefix_limit_received',)

  _yang_name = 'l2vpn-evpn'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'l2vpn-evpn']

  def _get_prefix_limit(self):
    """
    Getter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn/prefix_limit (container)

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    return self.__prefix_limit
      
  def _set_prefix_limit(self, v, load=False):
    """
    Setter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn/prefix_limit (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit() directly.

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit(self):
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_prefix_limit_received(self):
    """
    Getter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received (container)

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    return self.__prefix_limit_received
      
  def _set_prefix_limit_received(self, v, load=False):
    """
    Setter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_received() directly.

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_received must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit_received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_received(self):
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  prefix_limit = __builtin__.property(_get_prefix_limit, _set_prefix_limit)
  prefix_limit_received = __builtin__.property(_get_prefix_limit_received, _set_prefix_limit_received)


  _pyangbind_elements = OrderedDict([('prefix_limit', prefix_limit), ('prefix_limit_received', prefix_limit_received), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/srte-policy-ipv4/prefix-limit/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'srte-policy-ipv4', 'prefix-limit', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/srte-policy-ipv4/prefix-limit/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'srte-policy-ipv4', 'prefix-limit', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/srte-policy-ipv4/prefix-limit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'srte-policy-ipv4', 'prefix-limit']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/srte-policy-ipv4/prefix-limit-received/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'srte-policy-ipv4', 'prefix-limit-received', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/srte-policy-ipv4/prefix-limit-received/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'srte-policy-ipv4', 'prefix-limit-received', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/srte-policy-ipv4/prefix-limit-received. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
received from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit-received'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'srte-policy-ipv4', 'prefix-limit-received']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_srte_policy_ipv4_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv4(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/srte-policy-ipv4. 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
the SR-TE Policy SAFI for IPv4 Unicast.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_limit','__prefix_limit_received',)

  _yang_name = 'srte-policy-ipv4'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'srte-policy-ipv4']

  def _get_prefix_limit(self):
    """
    Getter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit (container)

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    return self.__prefix_limit
      
  def _set_prefix_limit(self, v, load=False):
    """
    Setter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit() directly.

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit(self):
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_prefix_limit_received(self):
    """
    Getter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received (container)

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    return self.__prefix_limit_received
      
  def _set_prefix_limit_received(self, v, load=False):
    """
    Setter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_received() directly.

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_received must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit_received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_received(self):
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  prefix_limit = __builtin__.property(_get_prefix_limit, _set_prefix_limit)
  prefix_limit_received = __builtin__.property(_get_prefix_limit_received, _set_prefix_limit_received)


  _pyangbind_elements = OrderedDict([('prefix_limit', prefix_limit), ('prefix_limit_received', prefix_limit_received), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/srte-policy-ipv6/prefix-limit/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'srte-policy-ipv6', 'prefix-limit', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/srte-policy-ipv6/prefix-limit/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'srte-policy-ipv6', 'prefix-limit', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/srte-policy-ipv6/prefix-limit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'srte-policy-ipv6', 'prefix-limit']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/srte-policy-ipv6/prefix-limit-received/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'srte-policy-ipv6', 'prefix-limit-received', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/srte-policy-ipv6/prefix-limit-received/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'srte-policy-ipv6', 'prefix-limit-received', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/srte-policy-ipv6/prefix-limit-received. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
received from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit-received'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'srte-policy-ipv6', 'prefix-limit-received']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_srte_policy_ipv6_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv6(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/srte-policy-ipv6. 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
the SR-TE Policy SAFI for IPv6 Unicast.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_limit','__prefix_limit_received',)

  _yang_name = 'srte-policy-ipv6'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'srte-policy-ipv6']

  def _get_prefix_limit(self):
    """
    Getter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit (container)

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    return self.__prefix_limit
      
  def _set_prefix_limit(self, v, load=False):
    """
    Setter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit() directly.

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit(self):
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_prefix_limit_received(self):
    """
    Getter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received (container)

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    return self.__prefix_limit_received
      
  def _set_prefix_limit_received(self, v, load=False):
    """
    Setter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_received() directly.

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_received must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit_received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_received(self):
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  prefix_limit = __builtin__.property(_get_prefix_limit, _set_prefix_limit)
  prefix_limit_received = __builtin__.property(_get_prefix_limit_received, _set_prefix_limit_received)


  _pyangbind_elements = OrderedDict([('prefix_limit', prefix_limit), ('prefix_limit_received', prefix_limit_received), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_use_multiple_paths_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/use-multiple-paths/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to multipath
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'use-multiple-paths', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/use_multiple_paths/config/enabled (boolean)

    YANG Description: Whether the use of multiple paths for the same NLRI is
enabled for the neighbor. This value is overridden by
any more specific configuration value.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/use_multiple_paths/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: Whether the use of multiple paths for the same NLRI is
enabled for the neighbor. This value is overridden by
any more specific configuration value.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_use_multiple_paths_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/use-multiple-paths/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to multipath
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'use-multiple-paths', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/use_multiple_paths/state/enabled (boolean)

    YANG Description: Whether the use of multiple paths for the same NLRI is
enabled for the neighbor. This value is overridden by
any more specific configuration value.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/use_multiple_paths/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: Whether the use of multiple paths for the same NLRI is
enabled for the neighbor. This value is overridden by
any more specific configuration value.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  enabled = __builtin__.property(_get_enabled)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_use_multiple_paths_ebgp_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/use-multiple-paths/ebgp/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to eBGP multipath
  """
  __slots__ = ('_path_helper', '_extmethods', '__allow_multiple_as',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__allow_multiple_as = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'use-multiple-paths', 'ebgp', 'config']

  def _get_allow_multiple_as(self):
    """
    Getter method for allow_multiple_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/use_multiple_paths/ebgp/config/allow_multiple_as (boolean)

    YANG Description: Allow multipath to use paths from different neighbouring
ASes.  The default is to only consider multiple paths from
the same neighbouring AS.
    """
    return self.__allow_multiple_as
      
  def _set_allow_multiple_as(self, v, load=False):
    """
    Setter method for allow_multiple_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/use_multiple_paths/ebgp/config/allow_multiple_as (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_allow_multiple_as is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_allow_multiple_as() directly.

    YANG Description: Allow multipath to use paths from different neighbouring
ASes.  The default is to only consider multiple paths from
the same neighbouring AS.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """allow_multiple_as must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__allow_multiple_as = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_allow_multiple_as(self):
    self.__allow_multiple_as = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  allow_multiple_as = __builtin__.property(_get_allow_multiple_as, _set_allow_multiple_as)


  _pyangbind_elements = OrderedDict([('allow_multiple_as', allow_multiple_as), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_use_multiple_paths_ebgp_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/use-multiple-paths/ebgp/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to eBGP multipath
  """
  __slots__ = ('_path_helper', '_extmethods', '__allow_multiple_as',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__allow_multiple_as = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'use-multiple-paths', 'ebgp', 'state']

  def _get_allow_multiple_as(self):
    """
    Getter method for allow_multiple_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/use_multiple_paths/ebgp/state/allow_multiple_as (boolean)

    YANG Description: Allow multipath to use paths from different neighbouring
ASes.  The default is to only consider multiple paths from
the same neighbouring AS.
    """
    return self.__allow_multiple_as
      
  def _set_allow_multiple_as(self, v, load=False):
    """
    Setter method for allow_multiple_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/use_multiple_paths/ebgp/state/allow_multiple_as (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_allow_multiple_as is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_allow_multiple_as() directly.

    YANG Description: Allow multipath to use paths from different neighbouring
ASes.  The default is to only consider multiple paths from
the same neighbouring AS.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """allow_multiple_as must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__allow_multiple_as = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_allow_multiple_as(self):
    self.__allow_multiple_as = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  allow_multiple_as = __builtin__.property(_get_allow_multiple_as)


  _pyangbind_elements = OrderedDict([('allow_multiple_as', allow_multiple_as), ])


class yc_ebgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_use_multiple_paths_ebgp(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/use-multiple-paths/ebgp. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Multipath configuration for eBGP
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'ebgp'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_use_multiple_paths_ebgp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_use_multiple_paths_ebgp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'use-multiple-paths', 'ebgp']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/use_multiple_paths/ebgp/config (container)

    YANG Description: Configuration parameters relating to eBGP multipath
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/use_multiple_paths/ebgp/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 eBGP multipath
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_use_multiple_paths_ebgp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_use_multiple_paths_ebgp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_use_multiple_paths_ebgp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/use_multiple_paths/ebgp/state (container)

    YANG Description: State information relating to eBGP multipath
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/use_multiple_paths/ebgp/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 relating to eBGP multipath
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_use_multiple_paths_ebgp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_use_multiple_paths_ebgp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_use_multiple_paths_ebgp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_use_multiple_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_use_multiple_paths(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/use-multiple-paths. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Parameters related to the use of multiple-paths for the same
NLRI when they are received only from this neighbor
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__ebgp',)

  _yang_name = 'use-multiple-paths'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_use_multiple_paths_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_use_multiple_paths_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__ebgp = YANGDynClass(base=yc_ebgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_use_multiple_paths_ebgp, is_container='container', yang_name="ebgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi', 'use-multiple-paths']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/use_multiple_paths/config (container)

    YANG Description: Configuration parameters relating to multipath
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/use_multiple_paths/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 multipath
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_use_multiple_paths_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_use_multiple_paths_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_use_multiple_paths_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/use_multiple_paths/state (container)

    YANG Description: State parameters relating to multipath
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/use_multiple_paths/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 parameters relating to multipath
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_use_multiple_paths_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_use_multiple_paths_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_use_multiple_paths_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_ebgp(self):
    """
    Getter method for ebgp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/use_multiple_paths/ebgp (container)

    YANG Description: Multipath configuration for eBGP
    """
    return self.__ebgp
      
  def _set_ebgp(self, v, load=False):
    """
    Setter method for ebgp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/use_multiple_paths/ebgp (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ebgp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ebgp() directly.

    YANG Description: Multipath configuration for eBGP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ebgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_use_multiple_paths_ebgp, is_container='container', yang_name="ebgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ebgp must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ebgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_use_multiple_paths_ebgp, is_container='container', yang_name="ebgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__ebgp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ebgp(self):
    self.__ebgp = YANGDynClass(base=yc_ebgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_use_multiple_paths_ebgp, is_container='container', yang_name="ebgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  ebgp = __builtin__.property(_get_ebgp, _set_ebgp)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('ebgp', ebgp), ])


class yc_afi_safi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: AFI,SAFI configuration available for the
neighbour or group
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi_safi_name','__config','__state','__graceful_restart','__add_paths','__apply_policy','__ipv4_unicast','__ipv6_unicast','__ipv4_labeled_unicast','__ipv6_labeled_unicast','__l3vpn_ipv4_unicast','__l3vpn_ipv6_unicast','__l3vpn_ipv4_multicast','__l3vpn_ipv6_multicast','__l2vpn_vpls','__l2vpn_evpn','__srte_policy_ipv4','__srte_policy_ipv6','__use_multiple_paths',)

  _yang_name = 'afi-safi'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi_safi_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__graceful_restart = YANGDynClass(base=yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__add_paths = YANGDynClass(base=yc_add_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_add_paths, is_container='container', yang_name="add-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__apply_policy = YANGDynClass(base=yc_apply_policy_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_apply_policy, is_container='container', yang_name="apply-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__ipv4_unicast = YANGDynClass(base=yc_ipv4_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast, is_container='container', yang_name="ipv4-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__ipv6_unicast = YANGDynClass(base=yc_ipv6_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast, is_container='container', yang_name="ipv6-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__ipv4_labeled_unicast = YANGDynClass(base=yc_ipv4_labeled_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast, is_container='container', yang_name="ipv4-labeled-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__ipv6_labeled_unicast = YANGDynClass(base=yc_ipv6_labeled_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast, is_container='container', yang_name="ipv6-labeled-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__l3vpn_ipv4_unicast = YANGDynClass(base=yc_l3vpn_ipv4_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast, is_container='container', yang_name="l3vpn-ipv4-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__l3vpn_ipv6_unicast = YANGDynClass(base=yc_l3vpn_ipv6_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast, is_container='container', yang_name="l3vpn-ipv6-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__l3vpn_ipv4_multicast = YANGDynClass(base=yc_l3vpn_ipv4_multicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_multicast, is_container='container', yang_name="l3vpn-ipv4-multicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__l3vpn_ipv6_multicast = YANGDynClass(base=yc_l3vpn_ipv6_multicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_multicast, is_container='container', yang_name="l3vpn-ipv6-multicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__l2vpn_vpls = YANGDynClass(base=yc_l2vpn_vpls_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_vpls, is_container='container', yang_name="l2vpn-vpls", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__l2vpn_evpn = YANGDynClass(base=yc_l2vpn_evpn_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn, is_container='container', yang_name="l2vpn-evpn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__srte_policy_ipv4 = YANGDynClass(base=yc_srte_policy_ipv4_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv4, is_container='container', yang_name="srte-policy-ipv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__srte_policy_ipv6 = YANGDynClass(base=yc_srte_policy_ipv6_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv6, is_container='container', yang_name="srte-policy-ipv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__use_multiple_paths = YANGDynClass(base=yc_use_multiple_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_use_multiple_paths, is_container='container', yang_name="use-multiple-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis', 'afi-safi']

  def _get_afi_safi_name(self):
    """
    Getter method for afi_safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/afi_safi_name (leafref)

    YANG Description: Reference to the AFI-SAFI name used as a key
for the AFI-SAFI list
    """
    return self.__afi_safi_name
      
  def _set_afi_safi_name(self, v, load=False):
    """
    Setter method for afi_safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/afi_safi_name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_safi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_safi_name() directly.

    YANG Description: Reference to the AFI-SAFI name used as a key
for the AFI-SAFI list
    """
    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="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_safi_name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__afi_safi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_safi_name(self):
    self.__afi_safi_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/config (container)

    YANG Description: Configuration parameters for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/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 AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/state (container)

    YANG Description: State information relating to the AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/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 relating to the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_graceful_restart(self):
    """
    Getter method for graceful_restart, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/graceful_restart (container)

    YANG Description: Parameters relating to BGP graceful-restart
    """
    return self.__graceful_restart
      
  def _set_graceful_restart(self, v, load=False):
    """
    Setter method for graceful_restart, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/graceful_restart (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_graceful_restart is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_graceful_restart() directly.

    YANG Description: Parameters relating to BGP graceful-restart
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """graceful_restart must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__graceful_restart = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_graceful_restart(self):
    self.__graceful_restart = YANGDynClass(base=yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_add_paths(self):
    """
    Getter method for add_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/add_paths (container)

    YANG Description: Parameters relating to the advertisement and receipt of
multiple paths for a single NLRI (add-paths)
    """
    return self.__add_paths
      
  def _set_add_paths(self, v, load=False):
    """
    Setter method for add_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/add_paths (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_add_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_add_paths() directly.

    YANG Description: Parameters relating to the advertisement and receipt of
multiple paths for a single NLRI (add-paths)
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_add_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_add_paths, is_container='container', yang_name="add-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """add_paths must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_add_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_add_paths, is_container='container', yang_name="add-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__add_paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_add_paths(self):
    self.__add_paths = YANGDynClass(base=yc_add_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_add_paths, is_container='container', yang_name="add-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_apply_policy(self):
    """
    Getter method for apply_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/apply_policy (container)

    YANG Description: Anchor point for routing policies in the model.
Import and export policies are with respect to the local
routing table, i.e., export (send) and import (receive),
depending on the context.
    """
    return self.__apply_policy
      
  def _set_apply_policy(self, v, load=False):
    """
    Setter method for apply_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/apply_policy (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_apply_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_apply_policy() directly.

    YANG Description: Anchor point for routing policies in the model.
Import and export policies are with respect to the local
routing table, i.e., export (send) and import (receive),
depending on the context.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_apply_policy_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_apply_policy, is_container='container', yang_name="apply-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """apply_policy must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_apply_policy_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_apply_policy, is_container='container', yang_name="apply-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__apply_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_apply_policy(self):
    self.__apply_policy = YANGDynClass(base=yc_apply_policy_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_apply_policy, is_container='container', yang_name="apply-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_ipv4_unicast(self):
    """
    Getter method for ipv4_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast (container)

    YANG Description: IPv4 unicast configuration options
    """
    return self.__ipv4_unicast
      
  def _set_ipv4_unicast(self, v, load=False):
    """
    Setter method for ipv4_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv4_unicast is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv4_unicast() directly.

    YANG Description: IPv4 unicast configuration options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv4_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast, is_container='container', yang_name="ipv4-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv4_unicast must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv4_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast, is_container='container', yang_name="ipv4-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__ipv4_unicast = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv4_unicast(self):
    self.__ipv4_unicast = YANGDynClass(base=yc_ipv4_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast, is_container='container', yang_name="ipv4-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_ipv6_unicast(self):
    """
    Getter method for ipv6_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast (container)

    YANG Description: IPv6 unicast configuration options
    """
    return self.__ipv6_unicast
      
  def _set_ipv6_unicast(self, v, load=False):
    """
    Setter method for ipv6_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6_unicast is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6_unicast() directly.

    YANG Description: IPv6 unicast configuration options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv6_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast, is_container='container', yang_name="ipv6-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6_unicast must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv6_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast, is_container='container', yang_name="ipv6-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__ipv6_unicast = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6_unicast(self):
    self.__ipv6_unicast = YANGDynClass(base=yc_ipv6_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast, is_container='container', yang_name="ipv6-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_ipv4_labeled_unicast(self):
    """
    Getter method for ipv4_labeled_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast (container)

    YANG Description: IPv4 Labeled Unicast configuration options
    """
    return self.__ipv4_labeled_unicast
      
  def _set_ipv4_labeled_unicast(self, v, load=False):
    """
    Setter method for ipv4_labeled_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv4_labeled_unicast is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv4_labeled_unicast() directly.

    YANG Description: IPv4 Labeled Unicast configuration options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv4_labeled_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast, is_container='container', yang_name="ipv4-labeled-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv4_labeled_unicast must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv4_labeled_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast, is_container='container', yang_name="ipv4-labeled-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__ipv4_labeled_unicast = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv4_labeled_unicast(self):
    self.__ipv4_labeled_unicast = YANGDynClass(base=yc_ipv4_labeled_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast, is_container='container', yang_name="ipv4-labeled-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_ipv6_labeled_unicast(self):
    """
    Getter method for ipv6_labeled_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast (container)

    YANG Description: IPv6 Labeled Unicast configuration options
    """
    return self.__ipv6_labeled_unicast
      
  def _set_ipv6_labeled_unicast(self, v, load=False):
    """
    Setter method for ipv6_labeled_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6_labeled_unicast is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6_labeled_unicast() directly.

    YANG Description: IPv6 Labeled Unicast configuration options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv6_labeled_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast, is_container='container', yang_name="ipv6-labeled-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6_labeled_unicast must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv6_labeled_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast, is_container='container', yang_name="ipv6-labeled-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__ipv6_labeled_unicast = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6_labeled_unicast(self):
    self.__ipv6_labeled_unicast = YANGDynClass(base=yc_ipv6_labeled_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast, is_container='container', yang_name="ipv6-labeled-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_l3vpn_ipv4_unicast(self):
    """
    Getter method for l3vpn_ipv4_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast (container)

    YANG Description: Unicast IPv4 L3VPN configuration options
    """
    return self.__l3vpn_ipv4_unicast
      
  def _set_l3vpn_ipv4_unicast(self, v, load=False):
    """
    Setter method for l3vpn_ipv4_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_l3vpn_ipv4_unicast is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_l3vpn_ipv4_unicast() directly.

    YANG Description: Unicast IPv4 L3VPN configuration options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_l3vpn_ipv4_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast, is_container='container', yang_name="l3vpn-ipv4-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """l3vpn_ipv4_unicast must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_l3vpn_ipv4_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast, is_container='container', yang_name="l3vpn-ipv4-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__l3vpn_ipv4_unicast = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_l3vpn_ipv4_unicast(self):
    self.__l3vpn_ipv4_unicast = YANGDynClass(base=yc_l3vpn_ipv4_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast, is_container='container', yang_name="l3vpn-ipv4-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_l3vpn_ipv6_unicast(self):
    """
    Getter method for l3vpn_ipv6_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast (container)

    YANG Description: Unicast IPv6 L3VPN configuration options
    """
    return self.__l3vpn_ipv6_unicast
      
  def _set_l3vpn_ipv6_unicast(self, v, load=False):
    """
    Setter method for l3vpn_ipv6_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_l3vpn_ipv6_unicast is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_l3vpn_ipv6_unicast() directly.

    YANG Description: Unicast IPv6 L3VPN configuration options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_l3vpn_ipv6_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast, is_container='container', yang_name="l3vpn-ipv6-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """l3vpn_ipv6_unicast must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_l3vpn_ipv6_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast, is_container='container', yang_name="l3vpn-ipv6-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__l3vpn_ipv6_unicast = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_l3vpn_ipv6_unicast(self):
    self.__l3vpn_ipv6_unicast = YANGDynClass(base=yc_l3vpn_ipv6_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast, is_container='container', yang_name="l3vpn-ipv6-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_l3vpn_ipv4_multicast(self):
    """
    Getter method for l3vpn_ipv4_multicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast (container)

    YANG Description: Multicast IPv4 L3VPN configuration options
    """
    return self.__l3vpn_ipv4_multicast
      
  def _set_l3vpn_ipv4_multicast(self, v, load=False):
    """
    Setter method for l3vpn_ipv4_multicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_l3vpn_ipv4_multicast is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_l3vpn_ipv4_multicast() directly.

    YANG Description: Multicast IPv4 L3VPN configuration options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_l3vpn_ipv4_multicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_multicast, is_container='container', yang_name="l3vpn-ipv4-multicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """l3vpn_ipv4_multicast must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_l3vpn_ipv4_multicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_multicast, is_container='container', yang_name="l3vpn-ipv4-multicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__l3vpn_ipv4_multicast = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_l3vpn_ipv4_multicast(self):
    self.__l3vpn_ipv4_multicast = YANGDynClass(base=yc_l3vpn_ipv4_multicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_multicast, is_container='container', yang_name="l3vpn-ipv4-multicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_l3vpn_ipv6_multicast(self):
    """
    Getter method for l3vpn_ipv6_multicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast (container)

    YANG Description: Multicast IPv6 L3VPN configuration options
    """
    return self.__l3vpn_ipv6_multicast
      
  def _set_l3vpn_ipv6_multicast(self, v, load=False):
    """
    Setter method for l3vpn_ipv6_multicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_l3vpn_ipv6_multicast is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_l3vpn_ipv6_multicast() directly.

    YANG Description: Multicast IPv6 L3VPN configuration options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_l3vpn_ipv6_multicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_multicast, is_container='container', yang_name="l3vpn-ipv6-multicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """l3vpn_ipv6_multicast must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_l3vpn_ipv6_multicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_multicast, is_container='container', yang_name="l3vpn-ipv6-multicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__l3vpn_ipv6_multicast = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_l3vpn_ipv6_multicast(self):
    self.__l3vpn_ipv6_multicast = YANGDynClass(base=yc_l3vpn_ipv6_multicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_multicast, is_container='container', yang_name="l3vpn-ipv6-multicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_l2vpn_vpls(self):
    """
    Getter method for l2vpn_vpls, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls (container)

    YANG Description: BGP-signalled VPLS configuration options
    """
    return self.__l2vpn_vpls
      
  def _set_l2vpn_vpls(self, v, load=False):
    """
    Setter method for l2vpn_vpls, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_l2vpn_vpls is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_l2vpn_vpls() directly.

    YANG Description: BGP-signalled VPLS configuration options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_l2vpn_vpls_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_vpls, is_container='container', yang_name="l2vpn-vpls", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """l2vpn_vpls must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_l2vpn_vpls_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_vpls, is_container='container', yang_name="l2vpn-vpls", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__l2vpn_vpls = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_l2vpn_vpls(self):
    self.__l2vpn_vpls = YANGDynClass(base=yc_l2vpn_vpls_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_vpls, is_container='container', yang_name="l2vpn-vpls", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_l2vpn_evpn(self):
    """
    Getter method for l2vpn_evpn, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn (container)

    YANG Description: BGP EVPN configuration options
    """
    return self.__l2vpn_evpn
      
  def _set_l2vpn_evpn(self, v, load=False):
    """
    Setter method for l2vpn_evpn, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_l2vpn_evpn is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_l2vpn_evpn() directly.

    YANG Description: BGP EVPN configuration options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_l2vpn_evpn_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn, is_container='container', yang_name="l2vpn-evpn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """l2vpn_evpn must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_l2vpn_evpn_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn, is_container='container', yang_name="l2vpn-evpn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__l2vpn_evpn = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_l2vpn_evpn(self):
    self.__l2vpn_evpn = YANGDynClass(base=yc_l2vpn_evpn_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn, is_container='container', yang_name="l2vpn-evpn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_srte_policy_ipv4(self):
    """
    Getter method for srte_policy_ipv4, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4 (container)

    YANG Description: Configuration and operational state parameters relating to
the SR-TE Policy SAFI for IPv4 Unicast.
    """
    return self.__srte_policy_ipv4
      
  def _set_srte_policy_ipv4(self, v, load=False):
    """
    Setter method for srte_policy_ipv4, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv4 (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_srte_policy_ipv4 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_srte_policy_ipv4() directly.

    YANG Description: Configuration and operational state parameters relating to
the SR-TE Policy SAFI for IPv4 Unicast.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_srte_policy_ipv4_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv4, is_container='container', yang_name="srte-policy-ipv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """srte_policy_ipv4 must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_srte_policy_ipv4_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv4, is_container='container', yang_name="srte-policy-ipv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__srte_policy_ipv4 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_srte_policy_ipv4(self):
    self.__srte_policy_ipv4 = YANGDynClass(base=yc_srte_policy_ipv4_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv4, is_container='container', yang_name="srte-policy-ipv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_srte_policy_ipv6(self):
    """
    Getter method for srte_policy_ipv6, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6 (container)

    YANG Description: Configuration and operational state parameters relating to
the SR-TE Policy SAFI for IPv6 Unicast.
    """
    return self.__srte_policy_ipv6
      
  def _set_srte_policy_ipv6(self, v, load=False):
    """
    Setter method for srte_policy_ipv6, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/srte_policy_ipv6 (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_srte_policy_ipv6 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_srte_policy_ipv6() directly.

    YANG Description: Configuration and operational state parameters relating to
the SR-TE Policy SAFI for IPv6 Unicast.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_srte_policy_ipv6_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv6, is_container='container', yang_name="srte-policy-ipv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """srte_policy_ipv6 must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_srte_policy_ipv6_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv6, is_container='container', yang_name="srte-policy-ipv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__srte_policy_ipv6 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_srte_policy_ipv6(self):
    self.__srte_policy_ipv6 = YANGDynClass(base=yc_srte_policy_ipv6_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_srte_policy_ipv6, is_container='container', yang_name="srte-policy-ipv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_use_multiple_paths(self):
    """
    Getter method for use_multiple_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/use_multiple_paths (container)

    YANG Description: Parameters related to the use of multiple-paths for the same
NLRI when they are received only from this neighbor
    """
    return self.__use_multiple_paths
      
  def _set_use_multiple_paths(self, v, load=False):
    """
    Setter method for use_multiple_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/use_multiple_paths (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_use_multiple_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_use_multiple_paths() directly.

    YANG Description: Parameters related to the use of multiple-paths for the same
NLRI when they are received only from this neighbor
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_use_multiple_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_use_multiple_paths, is_container='container', yang_name="use-multiple-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """use_multiple_paths must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_use_multiple_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_use_multiple_paths, is_container='container', yang_name="use-multiple-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__use_multiple_paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_use_multiple_paths(self):
    self.__use_multiple_paths = YANGDynClass(base=yc_use_multiple_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi_use_multiple_paths, is_container='container', yang_name="use-multiple-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  afi_safi_name = __builtin__.property(_get_afi_safi_name, _set_afi_safi_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  graceful_restart = __builtin__.property(_get_graceful_restart, _set_graceful_restart)
  add_paths = __builtin__.property(_get_add_paths, _set_add_paths)
  apply_policy = __builtin__.property(_get_apply_policy, _set_apply_policy)
  ipv4_unicast = __builtin__.property(_get_ipv4_unicast, _set_ipv4_unicast)
  ipv6_unicast = __builtin__.property(_get_ipv6_unicast, _set_ipv6_unicast)
  ipv4_labeled_unicast = __builtin__.property(_get_ipv4_labeled_unicast, _set_ipv4_labeled_unicast)
  ipv6_labeled_unicast = __builtin__.property(_get_ipv6_labeled_unicast, _set_ipv6_labeled_unicast)
  l3vpn_ipv4_unicast = __builtin__.property(_get_l3vpn_ipv4_unicast, _set_l3vpn_ipv4_unicast)
  l3vpn_ipv6_unicast = __builtin__.property(_get_l3vpn_ipv6_unicast, _set_l3vpn_ipv6_unicast)
  l3vpn_ipv4_multicast = __builtin__.property(_get_l3vpn_ipv4_multicast, _set_l3vpn_ipv4_multicast)
  l3vpn_ipv6_multicast = __builtin__.property(_get_l3vpn_ipv6_multicast, _set_l3vpn_ipv6_multicast)
  l2vpn_vpls = __builtin__.property(_get_l2vpn_vpls, _set_l2vpn_vpls)
  l2vpn_evpn = __builtin__.property(_get_l2vpn_evpn, _set_l2vpn_evpn)
  srte_policy_ipv4 = __builtin__.property(_get_srte_policy_ipv4, _set_srte_policy_ipv4)
  srte_policy_ipv6 = __builtin__.property(_get_srte_policy_ipv6, _set_srte_policy_ipv6)
  use_multiple_paths = __builtin__.property(_get_use_multiple_paths, _set_use_multiple_paths)


  _pyangbind_elements = OrderedDict([('afi_safi_name', afi_safi_name), ('config', config), ('state', state), ('graceful_restart', graceful_restart), ('add_paths', add_paths), ('apply_policy', apply_policy), ('ipv4_unicast', ipv4_unicast), ('ipv6_unicast', ipv6_unicast), ('ipv4_labeled_unicast', ipv4_labeled_unicast), ('ipv6_labeled_unicast', ipv6_labeled_unicast), ('l3vpn_ipv4_unicast', l3vpn_ipv4_unicast), ('l3vpn_ipv6_unicast', l3vpn_ipv6_unicast), ('l3vpn_ipv4_multicast', l3vpn_ipv4_multicast), ('l3vpn_ipv6_multicast', l3vpn_ipv6_multicast), ('l2vpn_vpls', l2vpn_vpls), ('l2vpn_evpn', l2vpn_evpn), ('srte_policy_ipv4', srte_policy_ipv4), ('srte_policy_ipv6', srte_policy_ipv6), ('use_multiple_paths', use_multiple_paths), ])


class yc_afi_safis_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Per-address-family configuration parameters associated with
the neighbor
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi_safi',)

  _yang_name = 'afi-safis'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi_safi = YANGDynClass(base=YANGListType("afi_safi_name",yc_afi_safi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi, yang_name="afi-safi", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-safi-name', extensions=None), is_container='list', yang_name="afi-safi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'afi-safis']

  def _get_afi_safi(self):
    """
    Getter method for afi_safi, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi (list)

    YANG Description: AFI,SAFI configuration available for the
neighbour or group
    """
    return self.__afi_safi
      
  def _set_afi_safi(self, v, load=False):
    """
    Setter method for afi_safi, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_safi is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_safi() directly.

    YANG Description: AFI,SAFI configuration available for the
neighbour or group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("afi_safi_name",yc_afi_safi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi, yang_name="afi-safi", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-safi-name', extensions=None), is_container='list', yang_name="afi-safi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_safi must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("afi_safi_name",yc_afi_safi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi, yang_name="afi-safi", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-safi-name', extensions=None), is_container='list', yang_name="afi-safi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__afi_safi = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_safi(self):
    self.__afi_safi = YANGDynClass(base=YANGListType("afi_safi_name",yc_afi_safi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis_afi_safi, yang_name="afi-safi", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-safi-name', extensions=None), is_container='list', yang_name="afi-safi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  afi_safi = __builtin__.property(_get_afi_safi, _set_afi_safi)


  _pyangbind_elements = OrderedDict([('afi_safi', afi_safi), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_enable_bfd_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/enable-bfd/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to enabling BFD.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'enable-bfd', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/enable_bfd/config/enabled (boolean)

    YANG Description: When this leaf is set to true, BFD is used to detect the
liveliness of the remote peer or next-hop.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/enable_bfd/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When this leaf is set to true, BFD is used to detect the
liveliness of the remote peer or next-hop.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_enable_bfd_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/enable-bfd/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 enabing BFD.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'enable-bfd', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/enable_bfd/state/enabled (boolean)

    YANG Description: When this leaf is set to true, BFD is used to detect the
liveliness of the remote peer or next-hop.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/enable_bfd/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When this leaf is set to true, BFD is used to detect the
liveliness of the remote peer or next-hop.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  enabled = __builtin__.property(_get_enabled)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ])


class yc_enable_bfd_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_enable_bfd(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/enable-bfd. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enable BFD for liveliness detection to the next-hop or
neighbour.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'enable-bfd'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_enable_bfd_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_enable_bfd_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor', 'enable-bfd']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/enable_bfd/config (container)

    YANG Description: Configuration parameters relating to enabling BFD.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/enable_bfd/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 enabling BFD.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_enable_bfd_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_enable_bfd_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_enable_bfd_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/enable_bfd/state (container)

    YANG Description: Operational state parameters relating to enabing BFD.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/enable_bfd/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 enabing BFD.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_enable_bfd_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_enable_bfd_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_enable_bfd_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of BGP neighbors configured on the local system,
uniquely identified by peer IPv[46] address
  """
  __slots__ = ('_path_helper', '_extmethods', '__neighbor_address','__config','__state','__timers','__transport','__error_handling','__graceful_restart','__logging_options','__ebgp_multihop','__route_reflector','__as_path_options','__use_multiple_paths','__apply_policy','__afi_safis','__enable_bfd',)

  _yang_name = 'neighbor'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__neighbor_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__timers = YANGDynClass(base=yc_timers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_timers, is_container='container', yang_name="timers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__transport = YANGDynClass(base=yc_transport_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__error_handling = YANGDynClass(base=yc_error_handling_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_error_handling, is_container='container', yang_name="error-handling", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__graceful_restart = YANGDynClass(base=yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__logging_options = YANGDynClass(base=yc_logging_options_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_logging_options, is_container='container', yang_name="logging-options", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__ebgp_multihop = YANGDynClass(base=yc_ebgp_multihop_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_ebgp_multihop, is_container='container', yang_name="ebgp-multihop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__route_reflector = YANGDynClass(base=yc_route_reflector_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_route_reflector, is_container='container', yang_name="route-reflector", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__as_path_options = YANGDynClass(base=yc_as_path_options_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_as_path_options, is_container='container', yang_name="as-path-options", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__use_multiple_paths = YANGDynClass(base=yc_use_multiple_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_use_multiple_paths, is_container='container', yang_name="use-multiple-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__apply_policy = YANGDynClass(base=yc_apply_policy_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_apply_policy, is_container='container', yang_name="apply-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__afi_safis = YANGDynClass(base=yc_afi_safis_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis, is_container='container', yang_name="afi-safis", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__enable_bfd = YANGDynClass(base=yc_enable_bfd_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_enable_bfd, is_container='container', yang_name="enable-bfd", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors', 'neighbor']

  def _get_neighbor_address(self):
    """
    Getter method for neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/neighbor_address (leafref)

    YANG Description: Reference to the address of the BGP neighbor used as
a key in the neighbor list
    """
    return self.__neighbor_address
      
  def _set_neighbor_address(self, v, load=False):
    """
    Setter method for neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/neighbor_address (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor_address() directly.

    YANG Description: Reference to the address of the BGP neighbor used as
a key in the neighbor list
    """
    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="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor_address must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__neighbor_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor_address(self):
    self.__neighbor_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/config (container)

    YANG Description: Configuration parameters relating to the BGP neighbor or
group
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/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 BGP neighbor or
group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/state (container)

    YANG Description: State information relating to the BGP neighbor
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/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 relating to the BGP neighbor
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_timers(self):
    """
    Getter method for timers, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/timers (container)

    YANG Description: Timers related to a BGP neighbor
    """
    return self.__timers
      
  def _set_timers(self, v, load=False):
    """
    Setter method for timers, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/timers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_timers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_timers() directly.

    YANG Description: Timers related to a BGP neighbor
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_timers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_timers, is_container='container', yang_name="timers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """timers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_timers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_timers, is_container='container', yang_name="timers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__timers = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_timers(self):
    self.__timers = YANGDynClass(base=yc_timers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_timers, is_container='container', yang_name="timers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_transport(self):
    """
    Getter method for transport, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/transport (container)

    YANG Description: Transport session parameters for the BGP neighbor
    """
    return self.__transport
      
  def _set_transport(self, v, load=False):
    """
    Setter method for transport, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/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 session parameters for the BGP neighbor
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_transport_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_error_handling(self):
    """
    Getter method for error_handling, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/error_handling (container)

    YANG Description: Error handling parameters used for the BGP neighbor or
group
    """
    return self.__error_handling
      
  def _set_error_handling(self, v, load=False):
    """
    Setter method for error_handling, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/error_handling (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_error_handling is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_error_handling() directly.

    YANG Description: Error handling parameters used for the BGP neighbor or
group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_error_handling_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_error_handling, is_container='container', yang_name="error-handling", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """error_handling must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_error_handling_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_error_handling, is_container='container', yang_name="error-handling", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__error_handling = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_error_handling(self):
    self.__error_handling = YANGDynClass(base=yc_error_handling_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_error_handling, is_container='container', yang_name="error-handling", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_graceful_restart(self):
    """
    Getter method for graceful_restart, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/graceful_restart (container)

    YANG Description: Parameters relating the graceful restart mechanism for BGP
    """
    return self.__graceful_restart
      
  def _set_graceful_restart(self, v, load=False):
    """
    Setter method for graceful_restart, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/graceful_restart (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_graceful_restart is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_graceful_restart() directly.

    YANG Description: Parameters relating the graceful restart mechanism for BGP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """graceful_restart must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__graceful_restart = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_graceful_restart(self):
    self.__graceful_restart = YANGDynClass(base=yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_logging_options(self):
    """
    Getter method for logging_options, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/logging_options (container)

    YANG Description: Logging options for events related to the BGP neighbor or
group
    """
    return self.__logging_options
      
  def _set_logging_options(self, v, load=False):
    """
    Setter method for logging_options, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/logging_options (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_logging_options is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_logging_options() directly.

    YANG Description: Logging options for events related to the BGP neighbor or
group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_logging_options_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_logging_options, is_container='container', yang_name="logging-options", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """logging_options must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_logging_options_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_logging_options, is_container='container', yang_name="logging-options", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__logging_options = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_logging_options(self):
    self.__logging_options = YANGDynClass(base=yc_logging_options_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_logging_options, is_container='container', yang_name="logging-options", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_ebgp_multihop(self):
    """
    Getter method for ebgp_multihop, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/ebgp_multihop (container)

    YANG Description: eBGP multi-hop parameters for the BGPgroup
    """
    return self.__ebgp_multihop
      
  def _set_ebgp_multihop(self, v, load=False):
    """
    Setter method for ebgp_multihop, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/ebgp_multihop (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ebgp_multihop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ebgp_multihop() directly.

    YANG Description: eBGP multi-hop parameters for the BGPgroup
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ebgp_multihop_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_ebgp_multihop, is_container='container', yang_name="ebgp-multihop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ebgp_multihop must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ebgp_multihop_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_ebgp_multihop, is_container='container', yang_name="ebgp-multihop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__ebgp_multihop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ebgp_multihop(self):
    self.__ebgp_multihop = YANGDynClass(base=yc_ebgp_multihop_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_ebgp_multihop, is_container='container', yang_name="ebgp-multihop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_route_reflector(self):
    """
    Getter method for route_reflector, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/route_reflector (container)

    YANG Description: Route reflector parameters for the BGPgroup
    """
    return self.__route_reflector
      
  def _set_route_reflector(self, v, load=False):
    """
    Setter method for route_reflector, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/route_reflector (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route_reflector is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route_reflector() directly.

    YANG Description: Route reflector parameters for the BGPgroup
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_route_reflector_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_route_reflector, is_container='container', yang_name="route-reflector", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route_reflector must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_route_reflector_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_route_reflector, is_container='container', yang_name="route-reflector", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__route_reflector = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route_reflector(self):
    self.__route_reflector = YANGDynClass(base=yc_route_reflector_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_route_reflector, is_container='container', yang_name="route-reflector", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_as_path_options(self):
    """
    Getter method for as_path_options, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/as_path_options (container)

    YANG Description: AS_PATH manipulation parameters for the BGP neighbor or
group
    """
    return self.__as_path_options
      
  def _set_as_path_options(self, v, load=False):
    """
    Setter method for as_path_options, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/as_path_options (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_as_path_options is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_as_path_options() directly.

    YANG Description: AS_PATH manipulation parameters for the BGP neighbor or
group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_as_path_options_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_as_path_options, is_container='container', yang_name="as-path-options", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """as_path_options must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_as_path_options_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_as_path_options, is_container='container', yang_name="as-path-options", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__as_path_options = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_as_path_options(self):
    self.__as_path_options = YANGDynClass(base=yc_as_path_options_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_as_path_options, is_container='container', yang_name="as-path-options", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_use_multiple_paths(self):
    """
    Getter method for use_multiple_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/use_multiple_paths (container)

    YANG Description: Parameters related to the use of multiple-paths for the same
NLRI when they are received only from this neighbor
    """
    return self.__use_multiple_paths
      
  def _set_use_multiple_paths(self, v, load=False):
    """
    Setter method for use_multiple_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/use_multiple_paths (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_use_multiple_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_use_multiple_paths() directly.

    YANG Description: Parameters related to the use of multiple-paths for the same
NLRI when they are received only from this neighbor
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_use_multiple_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_use_multiple_paths, is_container='container', yang_name="use-multiple-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """use_multiple_paths must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_use_multiple_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_use_multiple_paths, is_container='container', yang_name="use-multiple-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__use_multiple_paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_use_multiple_paths(self):
    self.__use_multiple_paths = YANGDynClass(base=yc_use_multiple_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_use_multiple_paths, is_container='container', yang_name="use-multiple-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_apply_policy(self):
    """
    Getter method for apply_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/apply_policy (container)

    YANG Description: Anchor point for routing policies in the model.
Import and export policies are with respect to the local
routing table, i.e., export (send) and import (receive),
depending on the context.
    """
    return self.__apply_policy
      
  def _set_apply_policy(self, v, load=False):
    """
    Setter method for apply_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/apply_policy (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_apply_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_apply_policy() directly.

    YANG Description: Anchor point for routing policies in the model.
Import and export policies are with respect to the local
routing table, i.e., export (send) and import (receive),
depending on the context.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_apply_policy_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_apply_policy, is_container='container', yang_name="apply-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """apply_policy must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_apply_policy_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_apply_policy, is_container='container', yang_name="apply-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__apply_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_apply_policy(self):
    self.__apply_policy = YANGDynClass(base=yc_apply_policy_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_apply_policy, is_container='container', yang_name="apply-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_afi_safis(self):
    """
    Getter method for afi_safis, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis (container)

    YANG Description: Per-address-family configuration parameters associated with
the neighbor
    """
    return self.__afi_safis
      
  def _set_afi_safis(self, v, load=False):
    """
    Setter method for afi_safis, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_safis is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_safis() directly.

    YANG Description: Per-address-family configuration parameters associated with
the neighbor
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_afi_safis_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis, is_container='container', yang_name="afi-safis", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_safis must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_afi_safis_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis, is_container='container', yang_name="afi-safis", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__afi_safis = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_safis(self):
    self.__afi_safis = YANGDynClass(base=yc_afi_safis_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_afi_safis, is_container='container', yang_name="afi-safis", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_enable_bfd(self):
    """
    Getter method for enable_bfd, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/enable_bfd (container)

    YANG Description: Enable BFD for liveliness detection to the next-hop or
neighbour.
    """
    return self.__enable_bfd
      
  def _set_enable_bfd(self, v, load=False):
    """
    Setter method for enable_bfd, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/enable_bfd (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable_bfd is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable_bfd() directly.

    YANG Description: Enable BFD for liveliness detection to the next-hop or
neighbour.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_enable_bfd_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_enable_bfd, is_container='container', yang_name="enable-bfd", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable_bfd must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_enable_bfd_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_enable_bfd, is_container='container', yang_name="enable-bfd", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__enable_bfd = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable_bfd(self):
    self.__enable_bfd = YANGDynClass(base=yc_enable_bfd_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_enable_bfd, is_container='container', yang_name="enable-bfd", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  neighbor_address = __builtin__.property(_get_neighbor_address, _set_neighbor_address)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  timers = __builtin__.property(_get_timers, _set_timers)
  transport = __builtin__.property(_get_transport, _set_transport)
  error_handling = __builtin__.property(_get_error_handling, _set_error_handling)
  graceful_restart = __builtin__.property(_get_graceful_restart, _set_graceful_restart)
  logging_options = __builtin__.property(_get_logging_options, _set_logging_options)
  ebgp_multihop = __builtin__.property(_get_ebgp_multihop, _set_ebgp_multihop)
  route_reflector = __builtin__.property(_get_route_reflector, _set_route_reflector)
  as_path_options = __builtin__.property(_get_as_path_options, _set_as_path_options)
  use_multiple_paths = __builtin__.property(_get_use_multiple_paths, _set_use_multiple_paths)
  apply_policy = __builtin__.property(_get_apply_policy, _set_apply_policy)
  afi_safis = __builtin__.property(_get_afi_safis, _set_afi_safis)
  enable_bfd = __builtin__.property(_get_enable_bfd, _set_enable_bfd)


  _pyangbind_elements = OrderedDict([('neighbor_address', neighbor_address), ('config', config), ('state', state), ('timers', timers), ('transport', transport), ('error_handling', error_handling), ('graceful_restart', graceful_restart), ('logging_options', logging_options), ('ebgp_multihop', ebgp_multihop), ('route_reflector', route_reflector), ('as_path_options', as_path_options), ('use_multiple_paths', use_multiple_paths), ('apply_policy', apply_policy), ('afi_safis', afi_safis), ('enable_bfd', enable_bfd), ])


class yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration for BGP neighbors
  """
  __slots__ = ('_path_helper', '_extmethods', '__neighbor',)

  _yang_name = 'neighbors'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__neighbor = YANGDynClass(base=YANGListType("neighbor_address",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='neighbor-address', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'neighbors']

  def _get_neighbor(self):
    """
    Getter method for neighbor, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor (list)

    YANG Description: List of BGP neighbors configured on the local system,
uniquely identified by peer IPv[46] address
    """
    return self.__neighbor
      
  def _set_neighbor(self, v, load=False):
    """
    Setter method for neighbor, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor() directly.

    YANG Description: List of BGP neighbors configured on the local system,
uniquely identified by peer IPv[46] address
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("neighbor_address",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='neighbor-address', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("neighbor_address",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='neighbor-address', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__neighbor = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor(self):
    self.__neighbor = YANGDynClass(base=YANGListType("neighbor_address",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='neighbor-address', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  neighbor = __builtin__.property(_get_neighbor, _set_neighbor)


  _pyangbind_elements = OrderedDict([('neighbor', neighbor), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/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 BGP neighbor or
group
  """
  __slots__ = ('_path_helper', '_extmethods', '__peer_group_name','__peer_as','__local_as','__peer_type','__auth_password','__remove_private_as','__route_flap_damping','__send_community','__description',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__peer_group_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-group-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__peer_as = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="peer-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=True)
    self.__local_as = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="local-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=True)
    self.__peer_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}, 'EXTERNAL': {}},), is_leaf=True, yang_name="peer-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:peer-type', is_config=True)
    self.__auth_password = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="auth-password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)
    self.__remove_private_as = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="remove-private-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:remove-private-as-option', is_config=True)
    self.__route_flap_damping = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="route-flap-damping", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__send_community = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STANDARD': {}, 'EXTENDED': {}, 'BOTH': {}, 'NONE': {}},), default=six.text_type("NONE"), is_leaf=True, yang_name="send-community", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:community-type', is_config=True)
    self.__description = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'config']

  def _get_peer_group_name(self):
    """
    Getter method for peer_group_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/config/peer_group_name (string)

    YANG Description: Name of the BGP peer-group
    """
    return self.__peer_group_name
      
  def _set_peer_group_name(self, v, load=False):
    """
    Setter method for peer_group_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/config/peer_group_name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_group_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_group_name() directly.

    YANG Description: Name of the BGP peer-group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="peer-group-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_group_name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-group-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)""",
        })

    self.__peer_group_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_group_name(self):
    self.__peer_group_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-group-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_peer_as(self):
    """
    Getter method for peer_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/config/peer_as (oc-inet:as-number)

    YANG Description: AS number of the peer.
    """
    return self.__peer_as
      
  def _set_peer_as(self, v, load=False):
    """
    Setter method for peer_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/config/peer_as (oc-inet:as-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_as is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_as() directly.

    YANG Description: AS number of the peer.
    """
    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="peer-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_as must be of a type compatible with oc-inet:as-number""",
          'defined-type': "oc-inet:as-number",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="peer-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=True)""",
        })

    self.__peer_as = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_as(self):
    self.__peer_as = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="peer-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=True)


  def _get_local_as(self):
    """
    Getter method for local_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/config/local_as (oc-inet:as-number)

    YANG Description: The local autonomous system number that is to be used
when establishing sessions with the remote peer or peer
group, if this differs from the global BGP router
autonomous system number.
    """
    return self.__local_as
      
  def _set_local_as(self, v, load=False):
    """
    Setter method for local_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/config/local_as (oc-inet:as-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_as is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_as() directly.

    YANG Description: The local autonomous system number that is to be used
when establishing sessions with the remote peer or peer
group, if this differs from the global BGP router
autonomous system number.
    """
    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="local-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_as must be of a type compatible with oc-inet:as-number""",
          'defined-type': "oc-inet:as-number",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="local-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=True)""",
        })

    self.__local_as = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_as(self):
    self.__local_as = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="local-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=True)


  def _get_peer_type(self):
    """
    Getter method for peer_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/config/peer_type (oc-bgp-types:peer-type)

    YANG Description: Explicitly designate the peer or peer group as internal
(iBGP) or external (eBGP).
    """
    return self.__peer_type
      
  def _set_peer_type(self, v, load=False):
    """
    Setter method for peer_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/config/peer_type (oc-bgp-types:peer-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_type() directly.

    YANG Description: Explicitly designate the peer or peer group as internal
(iBGP) or external (eBGP).
    """
    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={'INTERNAL': {}, 'EXTERNAL': {}},), is_leaf=True, yang_name="peer-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:peer-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_type must be of a type compatible with oc-bgp-types:peer-type""",
          'defined-type': "oc-bgp-types:peer-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}, 'EXTERNAL': {}},), is_leaf=True, yang_name="peer-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:peer-type', is_config=True)""",
        })

    self.__peer_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_type(self):
    self.__peer_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}, 'EXTERNAL': {}},), is_leaf=True, yang_name="peer-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:peer-type', is_config=True)


  def _get_auth_password(self):
    """
    Getter method for auth_password, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/config/auth_password (oc-types:routing-password)

    YANG Description: Configures an MD5 authentication password for use with
neighboring devices.
    """
    return self.__auth_password
      
  def _set_auth_password(self, v, load=False):
    """
    Setter method for auth_password, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/config/auth_password (oc-types:routing-password)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_auth_password is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_auth_password() directly.

    YANG Description: Configures an MD5 authentication password for use with
neighboring devices.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="auth-password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """auth_password must be of a type compatible with oc-types:routing-password""",
          'defined-type': "oc-types:routing-password",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="auth-password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)""",
        })

    self.__auth_password = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_auth_password(self):
    self.__auth_password = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="auth-password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)


  def _get_remove_private_as(self):
    """
    Getter method for remove_private_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/config/remove_private_as (oc-bgp-types:remove-private-as-option)

    YANG Description: Remove private AS numbers from updates sent to peers - when
this leaf is not specified, the AS_PATH attribute should be
sent to the peer unchanged
    """
    return self.__remove_private_as
      
  def _set_remove_private_as(self, v, load=False):
    """
    Setter method for remove_private_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/config/remove_private_as (oc-bgp-types:remove-private-as-option)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_remove_private_as is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_remove_private_as() directly.

    YANG Description: Remove private AS numbers from updates sent to peers - when
this leaf is not specified, the AS_PATH attribute should be
sent to the peer unchanged
    """
    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={'PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="remove-private-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:remove-private-as-option', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """remove_private_as must be of a type compatible with oc-bgp-types:remove-private-as-option""",
          'defined-type': "oc-bgp-types:remove-private-as-option",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="remove-private-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:remove-private-as-option', is_config=True)""",
        })

    self.__remove_private_as = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_remove_private_as(self):
    self.__remove_private_as = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="remove-private-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:remove-private-as-option', is_config=True)


  def _get_route_flap_damping(self):
    """
    Getter method for route_flap_damping, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/config/route_flap_damping (boolean)

    YANG Description: Enable route flap damping.
    """
    return self.__route_flap_damping
      
  def _set_route_flap_damping(self, v, load=False):
    """
    Setter method for route_flap_damping, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/config/route_flap_damping (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route_flap_damping is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route_flap_damping() directly.

    YANG Description: Enable route flap damping.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="route-flap-damping", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route_flap_damping must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="route-flap-damping", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__route_flap_damping = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route_flap_damping(self):
    self.__route_flap_damping = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="route-flap-damping", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_send_community(self):
    """
    Getter method for send_community, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/config/send_community (oc-bgp-types:community-type)

    YANG Description: Specify which types of community should be sent to the
neighbor or group. The default is to not send the
community attribute
    """
    return self.__send_community
      
  def _set_send_community(self, v, load=False):
    """
    Setter method for send_community, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/config/send_community (oc-bgp-types:community-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_send_community is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_send_community() directly.

    YANG Description: Specify which types of community should be sent to the
neighbor or group. The default is to not send the
community attribute
    """
    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={'STANDARD': {}, 'EXTENDED': {}, 'BOTH': {}, 'NONE': {}},), default=six.text_type("NONE"), is_leaf=True, yang_name="send-community", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:community-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """send_community must be of a type compatible with oc-bgp-types:community-type""",
          'defined-type': "oc-bgp-types:community-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STANDARD': {}, 'EXTENDED': {}, 'BOTH': {}, 'NONE': {}},), default=six.text_type("NONE"), is_leaf=True, yang_name="send-community", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:community-type', is_config=True)""",
        })

    self.__send_community = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_send_community(self):
    self.__send_community = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STANDARD': {}, 'EXTENDED': {}, 'BOTH': {}, 'NONE': {}},), default=six.text_type("NONE"), is_leaf=True, yang_name="send-community", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:community-type', is_config=True)


  def _get_description(self):
    """
    Getter method for description, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/config/description (string)

    YANG Description: An optional textual description (intended primarily for use
with a peer or group
    """
    return self.__description
      
  def _set_description(self, v, load=False):
    """
    Setter method for description, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/config/description (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_description is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_description() directly.

    YANG Description: An optional textual description (intended primarily for use
with a peer or group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """description must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)""",
        })

    self.__description = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_description(self):
    self.__description = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)

  peer_group_name = __builtin__.property(_get_peer_group_name, _set_peer_group_name)
  peer_as = __builtin__.property(_get_peer_as, _set_peer_as)
  local_as = __builtin__.property(_get_local_as, _set_local_as)
  peer_type = __builtin__.property(_get_peer_type, _set_peer_type)
  auth_password = __builtin__.property(_get_auth_password, _set_auth_password)
  remove_private_as = __builtin__.property(_get_remove_private_as, _set_remove_private_as)
  route_flap_damping = __builtin__.property(_get_route_flap_damping, _set_route_flap_damping)
  send_community = __builtin__.property(_get_send_community, _set_send_community)
  description = __builtin__.property(_get_description, _set_description)


  _pyangbind_elements = OrderedDict([('peer_group_name', peer_group_name), ('peer_as', peer_as), ('local_as', local_as), ('peer_type', peer_type), ('auth_password', auth_password), ('remove_private_as', remove_private_as), ('route_flap_damping', route_flap_damping), ('send_community', send_community), ('description', description), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the BGP peer-group
  """
  __slots__ = ('_path_helper', '_extmethods', '__peer_group_name','__peer_as','__local_as','__peer_type','__auth_password','__remove_private_as','__route_flap_damping','__send_community','__description','__total_paths','__total_prefixes',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__peer_group_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-group-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__peer_as = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="peer-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)
    self.__local_as = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="local-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)
    self.__peer_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}, 'EXTERNAL': {}},), is_leaf=True, yang_name="peer-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:peer-type', is_config=False)
    self.__auth_password = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="auth-password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=False)
    self.__remove_private_as = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="remove-private-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:remove-private-as-option', is_config=False)
    self.__route_flap_damping = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="route-flap-damping", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__send_community = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STANDARD': {}, 'EXTENDED': {}, 'BOTH': {}, 'NONE': {}},), default=six.text_type("NONE"), is_leaf=True, yang_name="send-community", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:community-type', is_config=False)
    self.__description = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__total_paths = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="total-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__total_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="total-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'state']

  def _get_peer_group_name(self):
    """
    Getter method for peer_group_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/state/peer_group_name (string)

    YANG Description: Name of the BGP peer-group
    """
    return self.__peer_group_name
      
  def _set_peer_group_name(self, v, load=False):
    """
    Setter method for peer_group_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/state/peer_group_name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_group_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_group_name() directly.

    YANG Description: Name of the BGP peer-group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="peer-group-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_group_name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-group-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__peer_group_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_group_name(self):
    self.__peer_group_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-group-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_peer_as(self):
    """
    Getter method for peer_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/state/peer_as (oc-inet:as-number)

    YANG Description: AS number of the peer.
    """
    return self.__peer_as
      
  def _set_peer_as(self, v, load=False):
    """
    Setter method for peer_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/state/peer_as (oc-inet:as-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_as is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_as() directly.

    YANG Description: AS number of the peer.
    """
    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="peer-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_as must be of a type compatible with oc-inet:as-number""",
          'defined-type': "oc-inet:as-number",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="peer-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)""",
        })

    self.__peer_as = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_as(self):
    self.__peer_as = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="peer-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)


  def _get_local_as(self):
    """
    Getter method for local_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/state/local_as (oc-inet:as-number)

    YANG Description: The local autonomous system number that is to be used
when establishing sessions with the remote peer or peer
group, if this differs from the global BGP router
autonomous system number.
    """
    return self.__local_as
      
  def _set_local_as(self, v, load=False):
    """
    Setter method for local_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/state/local_as (oc-inet:as-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_as is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_as() directly.

    YANG Description: The local autonomous system number that is to be used
when establishing sessions with the remote peer or peer
group, if this differs from the global BGP router
autonomous system number.
    """
    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="local-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_as must be of a type compatible with oc-inet:as-number""",
          'defined-type': "oc-inet:as-number",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="local-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)""",
        })

    self.__local_as = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_as(self):
    self.__local_as = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="local-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)


  def _get_peer_type(self):
    """
    Getter method for peer_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/state/peer_type (oc-bgp-types:peer-type)

    YANG Description: Explicitly designate the peer or peer group as internal
(iBGP) or external (eBGP).
    """
    return self.__peer_type
      
  def _set_peer_type(self, v, load=False):
    """
    Setter method for peer_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/state/peer_type (oc-bgp-types:peer-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_type() directly.

    YANG Description: Explicitly designate the peer or peer group as internal
(iBGP) or external (eBGP).
    """
    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={'INTERNAL': {}, 'EXTERNAL': {}},), is_leaf=True, yang_name="peer-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:peer-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_type must be of a type compatible with oc-bgp-types:peer-type""",
          'defined-type': "oc-bgp-types:peer-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}, 'EXTERNAL': {}},), is_leaf=True, yang_name="peer-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:peer-type', is_config=False)""",
        })

    self.__peer_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_type(self):
    self.__peer_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}, 'EXTERNAL': {}},), is_leaf=True, yang_name="peer-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:peer-type', is_config=False)


  def _get_auth_password(self):
    """
    Getter method for auth_password, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/state/auth_password (oc-types:routing-password)

    YANG Description: Configures an MD5 authentication password for use with
neighboring devices.
    """
    return self.__auth_password
      
  def _set_auth_password(self, v, load=False):
    """
    Setter method for auth_password, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/state/auth_password (oc-types:routing-password)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_auth_password is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_auth_password() directly.

    YANG Description: Configures an MD5 authentication password for use with
neighboring devices.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="auth-password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """auth_password must be of a type compatible with oc-types:routing-password""",
          'defined-type': "oc-types:routing-password",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="auth-password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=False)""",
        })

    self.__auth_password = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_auth_password(self):
    self.__auth_password = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="auth-password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=False)


  def _get_remove_private_as(self):
    """
    Getter method for remove_private_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/state/remove_private_as (oc-bgp-types:remove-private-as-option)

    YANG Description: Remove private AS numbers from updates sent to peers - when
this leaf is not specified, the AS_PATH attribute should be
sent to the peer unchanged
    """
    return self.__remove_private_as
      
  def _set_remove_private_as(self, v, load=False):
    """
    Setter method for remove_private_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/state/remove_private_as (oc-bgp-types:remove-private-as-option)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_remove_private_as is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_remove_private_as() directly.

    YANG Description: Remove private AS numbers from updates sent to peers - when
this leaf is not specified, the AS_PATH attribute should be
sent to the peer unchanged
    """
    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={'PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="remove-private-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:remove-private-as-option', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """remove_private_as must be of a type compatible with oc-bgp-types:remove-private-as-option""",
          'defined-type': "oc-bgp-types:remove-private-as-option",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="remove-private-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:remove-private-as-option', is_config=False)""",
        })

    self.__remove_private_as = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_remove_private_as(self):
    self.__remove_private_as = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:PRIVATE_AS_REMOVE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:PRIVATE_AS_REPLACE_ALL': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="remove-private-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:remove-private-as-option', is_config=False)


  def _get_route_flap_damping(self):
    """
    Getter method for route_flap_damping, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/state/route_flap_damping (boolean)

    YANG Description: Enable route flap damping.
    """
    return self.__route_flap_damping
      
  def _set_route_flap_damping(self, v, load=False):
    """
    Setter method for route_flap_damping, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/state/route_flap_damping (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route_flap_damping is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route_flap_damping() directly.

    YANG Description: Enable route flap damping.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="route-flap-damping", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route_flap_damping must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="route-flap-damping", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__route_flap_damping = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route_flap_damping(self):
    self.__route_flap_damping = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="route-flap-damping", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_send_community(self):
    """
    Getter method for send_community, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/state/send_community (oc-bgp-types:community-type)

    YANG Description: Specify which types of community should be sent to the
neighbor or group. The default is to not send the
community attribute
    """
    return self.__send_community
      
  def _set_send_community(self, v, load=False):
    """
    Setter method for send_community, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/state/send_community (oc-bgp-types:community-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_send_community is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_send_community() directly.

    YANG Description: Specify which types of community should be sent to the
neighbor or group. The default is to not send the
community attribute
    """
    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={'STANDARD': {}, 'EXTENDED': {}, 'BOTH': {}, 'NONE': {}},), default=six.text_type("NONE"), is_leaf=True, yang_name="send-community", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:community-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """send_community must be of a type compatible with oc-bgp-types:community-type""",
          'defined-type': "oc-bgp-types:community-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STANDARD': {}, 'EXTENDED': {}, 'BOTH': {}, 'NONE': {}},), default=six.text_type("NONE"), is_leaf=True, yang_name="send-community", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:community-type', is_config=False)""",
        })

    self.__send_community = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_send_community(self):
    self.__send_community = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STANDARD': {}, 'EXTENDED': {}, 'BOTH': {}, 'NONE': {}},), default=six.text_type("NONE"), is_leaf=True, yang_name="send-community", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:community-type', is_config=False)


  def _get_description(self):
    """
    Getter method for description, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/state/description (string)

    YANG Description: An optional textual description (intended primarily for use
with a peer or group
    """
    return self.__description
      
  def _set_description(self, v, load=False):
    """
    Setter method for description, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/state/description (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_description is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_description() directly.

    YANG Description: An optional textual description (intended primarily for use
with a peer or group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """description must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__description = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_description(self):
    self.__description = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_total_paths(self):
    """
    Getter method for total_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/state/total_paths (uint32)

    YANG Description: Total number of BGP paths within the context
    """
    return self.__total_paths
      
  def _set_total_paths(self, v, load=False):
    """
    Setter method for total_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/state/total_paths (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_total_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_total_paths() directly.

    YANG Description: Total number of BGP paths within the context
    """
    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="total-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """total_paths 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="total-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__total_paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_total_paths(self):
    self.__total_paths = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="total-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_total_prefixes(self):
    """
    Getter method for total_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/state/total_prefixes (uint32)

    YANG Description: Total number of BGP prefixes received within the context
    """
    return self.__total_prefixes
      
  def _set_total_prefixes(self, v, load=False):
    """
    Setter method for total_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/state/total_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_total_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_total_prefixes() directly.

    YANG Description: Total number of BGP prefixes received within the context
    """
    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="total-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """total_prefixes 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="total-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__total_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_total_prefixes(self):
    self.__total_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="total-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  peer_group_name = __builtin__.property(_get_peer_group_name)
  peer_as = __builtin__.property(_get_peer_as)
  local_as = __builtin__.property(_get_local_as)
  peer_type = __builtin__.property(_get_peer_type)
  auth_password = __builtin__.property(_get_auth_password)
  remove_private_as = __builtin__.property(_get_remove_private_as)
  route_flap_damping = __builtin__.property(_get_route_flap_damping)
  send_community = __builtin__.property(_get_send_community)
  description = __builtin__.property(_get_description)
  total_paths = __builtin__.property(_get_total_paths)
  total_prefixes = __builtin__.property(_get_total_prefixes)


  _pyangbind_elements = OrderedDict([('peer_group_name', peer_group_name), ('peer_as', peer_as), ('local_as', local_as), ('peer_type', peer_type), ('auth_password', auth_password), ('remove_private_as', remove_private_as), ('route_flap_damping', route_flap_damping), ('send_community', send_community), ('description', description), ('total_paths', total_paths), ('total_prefixes', total_prefixes), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_timers_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/timers/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to timers used for the
BGP neighbor or peer group
  """
  __slots__ = ('_path_helper', '_extmethods', '__connect_retry','__hold_time','__keepalive_interval','__minimum_advertisement_interval','__restart_time',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__connect_retry = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="connect-retry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__hold_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(90), is_leaf=True, yang_name="hold-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__keepalive_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="keepalive-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__minimum_advertisement_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="minimum-advertisement-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__restart_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'timers', 'config']

  def _get_connect_retry(self):
    """
    Getter method for connect_retry, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/timers/config/connect_retry (uint16)

    YANG Description: Time interval in seconds between attempts to establish a
session with the peer.
    """
    return self.__connect_retry
      
  def _set_connect_retry(self, v, load=False):
    """
    Setter method for connect_retry, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/timers/config/connect_retry (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_connect_retry is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_connect_retry() directly.

    YANG Description: Time interval in seconds between attempts to establish a
session with the peer.
    """
    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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="connect-retry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """connect_retry 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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="connect-retry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__connect_retry = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_connect_retry(self):
    self.__connect_retry = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="connect-retry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_hold_time(self):
    """
    Getter method for hold_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/timers/config/hold_time (uint16)

    YANG Description: Time interval in seconds that a BGP session will be
considered active in the absence of keepalive or other
messages from the peer.  The hold-time is typically
set to 3x the keepalive-interval.
    """
    return self.__hold_time
      
  def _set_hold_time(self, v, load=False):
    """
    Setter method for hold_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/timers/config/hold_time (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hold_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hold_time() directly.

    YANG Description: Time interval in seconds that a BGP session will be
considered active in the absence of keepalive or other
messages from the peer.  The hold-time is typically
set to 3x the keepalive-interval.
    """
    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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(90), is_leaf=True, yang_name="hold-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hold_time 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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(90), is_leaf=True, yang_name="hold-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__hold_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hold_time(self):
    self.__hold_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(90), is_leaf=True, yang_name="hold-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_keepalive_interval(self):
    """
    Getter method for keepalive_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/timers/config/keepalive_interval (uint16)

    YANG Description: Time interval in seconds between transmission of keepalive
messages to the neighbor.  Typically set to 1/3 the
hold-time.
    """
    return self.__keepalive_interval
      
  def _set_keepalive_interval(self, v, load=False):
    """
    Setter method for keepalive_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/timers/config/keepalive_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_keepalive_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_keepalive_interval() directly.

    YANG Description: Time interval in seconds between transmission of keepalive
messages to the neighbor.  Typically set to 1/3 the
hold-time.
    """
    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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="keepalive-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """keepalive_interval 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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="keepalive-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__keepalive_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_keepalive_interval(self):
    self.__keepalive_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="keepalive-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_minimum_advertisement_interval(self):
    """
    Getter method for minimum_advertisement_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/timers/config/minimum_advertisement_interval (uint16)

    YANG Description: Minimum time which must elapse between subsequent UPDATE
messages relating to a common set of NLRI being transmitted
to a peer. This timer is referred to as
MinRouteAdvertisementIntervalTimer by RFC 4721 and serves to
reduce the number of UPDATE messages transmitted when a
particular set of NLRI exhibit instability.
    """
    return self.__minimum_advertisement_interval
      
  def _set_minimum_advertisement_interval(self, v, load=False):
    """
    Setter method for minimum_advertisement_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/timers/config/minimum_advertisement_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_minimum_advertisement_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_minimum_advertisement_interval() directly.

    YANG Description: Minimum time which must elapse between subsequent UPDATE
messages relating to a common set of NLRI being transmitted
to a peer. This timer is referred to as
MinRouteAdvertisementIntervalTimer by RFC 4721 and serves to
reduce the number of UPDATE messages transmitted when a
particular set of NLRI exhibit instability.
    """
    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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="minimum-advertisement-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """minimum_advertisement_interval 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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="minimum-advertisement-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__minimum_advertisement_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_minimum_advertisement_interval(self):
    self.__minimum_advertisement_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="minimum-advertisement-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_restart_time(self):
    """
    Getter method for restart_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/timers/config/restart_time (uint16)

    YANG Description: Time interval in seconds after which the BGP session is
re-established after being torn down due to exceeding any
configured max prefix-limit.
    """
    return self.__restart_time
      
  def _set_restart_time(self, v, load=False):
    """
    Setter method for restart_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/timers/config/restart_time (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_restart_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_restart_time() directly.

    YANG Description: Time interval in seconds after which the BGP session is
re-established after being torn down due to exceeding any
configured max prefix-limit.
    """
    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="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """restart_time 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="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__restart_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_restart_time(self):
    self.__restart_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

  connect_retry = __builtin__.property(_get_connect_retry, _set_connect_retry)
  hold_time = __builtin__.property(_get_hold_time, _set_hold_time)
  keepalive_interval = __builtin__.property(_get_keepalive_interval, _set_keepalive_interval)
  minimum_advertisement_interval = __builtin__.property(_get_minimum_advertisement_interval, _set_minimum_advertisement_interval)
  restart_time = __builtin__.property(_get_restart_time, _set_restart_time)


  _pyangbind_elements = OrderedDict([('connect_retry', connect_retry), ('hold_time', hold_time), ('keepalive_interval', keepalive_interval), ('minimum_advertisement_interval', minimum_advertisement_interval), ('restart_time', restart_time), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_timers_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/timers/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the timers used for the BGP
group
  """
  __slots__ = ('_path_helper', '_extmethods', '__connect_retry','__hold_time','__keepalive_interval','__minimum_advertisement_interval','__restart_time',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__connect_retry = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="connect-retry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__hold_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(90), is_leaf=True, yang_name="hold-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__keepalive_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="keepalive-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__minimum_advertisement_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="minimum-advertisement-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__restart_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'timers', 'state']

  def _get_connect_retry(self):
    """
    Getter method for connect_retry, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/timers/state/connect_retry (uint16)

    YANG Description: Time interval in seconds between attempts to establish a
session with the peer.
    """
    return self.__connect_retry
      
  def _set_connect_retry(self, v, load=False):
    """
    Setter method for connect_retry, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/timers/state/connect_retry (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_connect_retry is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_connect_retry() directly.

    YANG Description: Time interval in seconds between attempts to establish a
session with the peer.
    """
    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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="connect-retry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """connect_retry 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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="connect-retry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__connect_retry = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_connect_retry(self):
    self.__connect_retry = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="connect-retry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_hold_time(self):
    """
    Getter method for hold_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/timers/state/hold_time (uint16)

    YANG Description: Time interval in seconds that a BGP session will be
considered active in the absence of keepalive or other
messages from the peer.  The hold-time is typically
set to 3x the keepalive-interval.
    """
    return self.__hold_time
      
  def _set_hold_time(self, v, load=False):
    """
    Setter method for hold_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/timers/state/hold_time (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hold_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hold_time() directly.

    YANG Description: Time interval in seconds that a BGP session will be
considered active in the absence of keepalive or other
messages from the peer.  The hold-time is typically
set to 3x the keepalive-interval.
    """
    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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(90), is_leaf=True, yang_name="hold-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hold_time 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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(90), is_leaf=True, yang_name="hold-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__hold_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hold_time(self):
    self.__hold_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(90), is_leaf=True, yang_name="hold-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_keepalive_interval(self):
    """
    Getter method for keepalive_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/timers/state/keepalive_interval (uint16)

    YANG Description: Time interval in seconds between transmission of keepalive
messages to the neighbor.  Typically set to 1/3 the
hold-time.
    """
    return self.__keepalive_interval
      
  def _set_keepalive_interval(self, v, load=False):
    """
    Setter method for keepalive_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/timers/state/keepalive_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_keepalive_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_keepalive_interval() directly.

    YANG Description: Time interval in seconds between transmission of keepalive
messages to the neighbor.  Typically set to 1/3 the
hold-time.
    """
    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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="keepalive-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """keepalive_interval 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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="keepalive-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__keepalive_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_keepalive_interval(self):
    self.__keepalive_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="keepalive-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_minimum_advertisement_interval(self):
    """
    Getter method for minimum_advertisement_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/timers/state/minimum_advertisement_interval (uint16)

    YANG Description: Minimum time which must elapse between subsequent UPDATE
messages relating to a common set of NLRI being transmitted
to a peer. This timer is referred to as
MinRouteAdvertisementIntervalTimer by RFC 4721 and serves to
reduce the number of UPDATE messages transmitted when a
particular set of NLRI exhibit instability.
    """
    return self.__minimum_advertisement_interval
      
  def _set_minimum_advertisement_interval(self, v, load=False):
    """
    Setter method for minimum_advertisement_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/timers/state/minimum_advertisement_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_minimum_advertisement_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_minimum_advertisement_interval() directly.

    YANG Description: Minimum time which must elapse between subsequent UPDATE
messages relating to a common set of NLRI being transmitted
to a peer. This timer is referred to as
MinRouteAdvertisementIntervalTimer by RFC 4721 and serves to
reduce the number of UPDATE messages transmitted when a
particular set of NLRI exhibit instability.
    """
    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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="minimum-advertisement-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """minimum_advertisement_interval 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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="minimum-advertisement-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__minimum_advertisement_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_minimum_advertisement_interval(self):
    self.__minimum_advertisement_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="minimum-advertisement-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_restart_time(self):
    """
    Getter method for restart_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/timers/state/restart_time (uint16)

    YANG Description: Time interval in seconds after which the BGP session is
re-established after being torn down due to exceeding any
configured max prefix-limit.
    """
    return self.__restart_time
      
  def _set_restart_time(self, v, load=False):
    """
    Setter method for restart_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/timers/state/restart_time (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_restart_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_restart_time() directly.

    YANG Description: Time interval in seconds after which the BGP session is
re-established after being torn down due to exceeding any
configured max prefix-limit.
    """
    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="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """restart_time 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="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__restart_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_restart_time(self):
    self.__restart_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  connect_retry = __builtin__.property(_get_connect_retry)
  hold_time = __builtin__.property(_get_hold_time)
  keepalive_interval = __builtin__.property(_get_keepalive_interval)
  minimum_advertisement_interval = __builtin__.property(_get_minimum_advertisement_interval)
  restart_time = __builtin__.property(_get_restart_time)


  _pyangbind_elements = OrderedDict([('connect_retry', connect_retry), ('hold_time', hold_time), ('keepalive_interval', keepalive_interval), ('minimum_advertisement_interval', minimum_advertisement_interval), ('restart_time', restart_time), ])


class yc_timers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_timers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/timers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Timers related to a BGP peer-group
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'timers'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_timers_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_timers_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'timers']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/timers/config (container)

    YANG Description: Configuration parameters relating to timers used for the
BGP neighbor or peer group
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/timers/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 timers used for the
BGP neighbor or peer group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_timers_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_timers_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_timers_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/timers/state (container)

    YANG Description: State information relating to the timers used for the BGP
group
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/timers/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 relating to the timers used for the BGP
group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_timers_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_timers_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_timers_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_transport_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/transport/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 transport
session(s) used for the BGP neighbor or group
  """
  __slots__ = ('_path_helper', '_extmethods', '__tcp_mss','__mtu_discovery','__passive_mode','__local_address',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__tcp_mss = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="tcp-mss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__mtu_discovery = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="mtu-discovery", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__passive_mode = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="passive-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__local_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}'}),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}|:))'}),six.text_type,], is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'transport', 'config']

  def _get_tcp_mss(self):
    """
    Getter method for tcp_mss, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/transport/config/tcp_mss (uint16)

    YANG Description: Sets the max segment size for BGP TCP sessions.
    """
    return self.__tcp_mss
      
  def _set_tcp_mss(self, v, load=False):
    """
    Setter method for tcp_mss, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/transport/config/tcp_mss (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tcp_mss is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tcp_mss() directly.

    YANG Description: Sets the max segment size for BGP TCP sessions.
    """
    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="tcp-mss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tcp_mss 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="tcp-mss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__tcp_mss = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tcp_mss(self):
    self.__tcp_mss = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="tcp-mss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_mtu_discovery(self):
    """
    Getter method for mtu_discovery, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/transport/config/mtu_discovery (boolean)

    YANG Description: Turns path mtu discovery for BGP TCP sessions on (true)
or off (false)
    """
    return self.__mtu_discovery
      
  def _set_mtu_discovery(self, v, load=False):
    """
    Setter method for mtu_discovery, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/transport/config/mtu_discovery (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mtu_discovery is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mtu_discovery() directly.

    YANG Description: Turns path mtu discovery for BGP TCP sessions on (true)
or off (false)
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="mtu-discovery", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mtu_discovery must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="mtu-discovery", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__mtu_discovery = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mtu_discovery(self):
    self.__mtu_discovery = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="mtu-discovery", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_passive_mode(self):
    """
    Getter method for passive_mode, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/transport/config/passive_mode (boolean)

    YANG Description: Wait for peers to issue requests to open a BGP session,
rather than initiating sessions from the local router.
    """
    return self.__passive_mode
      
  def _set_passive_mode(self, v, load=False):
    """
    Setter method for passive_mode, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/transport/config/passive_mode (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_passive_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_passive_mode() directly.

    YANG Description: Wait for peers to issue requests to open a BGP session,
rather than initiating sessions from the local router.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="passive-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """passive_mode must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="passive-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__passive_mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_passive_mode(self):
    self.__passive_mode = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="passive-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_local_address(self):
    """
    Getter method for local_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/transport/config/local_address (union)

    YANG Description: Set the local IP (either IPv4 or IPv6) address to use
for the session when sending BGP update messages.  This
may be expressed as either an IP address or reference
to the name of an interface.
    """
    return self.__local_address
      
  def _set_local_address(self, v, load=False):
    """
    Setter method for local_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/transport/config/local_address (union)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_address() directly.

    YANG Description: Set the local IP (either IPv4 or IPv6) address to use
for the session when sending BGP update messages.  This
may be expressed as either an IP address or reference
to the name of an interface.
    """
    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}'}),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}|:))'}),six.text_type,], is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_address must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          '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}'}),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}|:))'}),six.text_type,], is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)""",
        })

    self.__local_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_address(self):
    self.__local_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}'}),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}|:))'}),six.text_type,], is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)

  tcp_mss = __builtin__.property(_get_tcp_mss, _set_tcp_mss)
  mtu_discovery = __builtin__.property(_get_mtu_discovery, _set_mtu_discovery)
  passive_mode = __builtin__.property(_get_passive_mode, _set_passive_mode)
  local_address = __builtin__.property(_get_local_address, _set_local_address)


  _pyangbind_elements = OrderedDict([('tcp_mss', tcp_mss), ('mtu_discovery', mtu_discovery), ('passive_mode', passive_mode), ('local_address', local_address), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_transport_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/transport/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the transport session(s)
used for the BGP neighbor or group
  """
  __slots__ = ('_path_helper', '_extmethods', '__tcp_mss','__mtu_discovery','__passive_mode','__local_address',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__tcp_mss = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="tcp-mss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__mtu_discovery = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="mtu-discovery", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__passive_mode = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="passive-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__local_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}'}),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}|:))'}),six.text_type,], is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'transport', 'state']

  def _get_tcp_mss(self):
    """
    Getter method for tcp_mss, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/transport/state/tcp_mss (uint16)

    YANG Description: Sets the max segment size for BGP TCP sessions.
    """
    return self.__tcp_mss
      
  def _set_tcp_mss(self, v, load=False):
    """
    Setter method for tcp_mss, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/transport/state/tcp_mss (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tcp_mss is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tcp_mss() directly.

    YANG Description: Sets the max segment size for BGP TCP sessions.
    """
    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="tcp-mss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tcp_mss 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="tcp-mss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__tcp_mss = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tcp_mss(self):
    self.__tcp_mss = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="tcp-mss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_mtu_discovery(self):
    """
    Getter method for mtu_discovery, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/transport/state/mtu_discovery (boolean)

    YANG Description: Turns path mtu discovery for BGP TCP sessions on (true)
or off (false)
    """
    return self.__mtu_discovery
      
  def _set_mtu_discovery(self, v, load=False):
    """
    Setter method for mtu_discovery, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/transport/state/mtu_discovery (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mtu_discovery is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mtu_discovery() directly.

    YANG Description: Turns path mtu discovery for BGP TCP sessions on (true)
or off (false)
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="mtu-discovery", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mtu_discovery must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="mtu-discovery", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__mtu_discovery = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mtu_discovery(self):
    self.__mtu_discovery = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="mtu-discovery", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_passive_mode(self):
    """
    Getter method for passive_mode, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/transport/state/passive_mode (boolean)

    YANG Description: Wait for peers to issue requests to open a BGP session,
rather than initiating sessions from the local router.
    """
    return self.__passive_mode
      
  def _set_passive_mode(self, v, load=False):
    """
    Setter method for passive_mode, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/transport/state/passive_mode (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_passive_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_passive_mode() directly.

    YANG Description: Wait for peers to issue requests to open a BGP session,
rather than initiating sessions from the local router.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="passive-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """passive_mode must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="passive-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__passive_mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_passive_mode(self):
    self.__passive_mode = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="passive-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_local_address(self):
    """
    Getter method for local_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/transport/state/local_address (union)

    YANG Description: Set the local IP (either IPv4 or IPv6) address to use
for the session when sending BGP update messages.  This
may be expressed as either an IP address or reference
to the name of an interface.
    """
    return self.__local_address
      
  def _set_local_address(self, v, load=False):
    """
    Setter method for local_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/transport/state/local_address (union)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_address() directly.

    YANG Description: Set the local IP (either IPv4 or IPv6) address to use
for the session when sending BGP update messages.  This
may be expressed as either an IP address or reference
to the name of an interface.
    """
    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}'}),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}|:))'}),six.text_type,], is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_address must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          '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}'}),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}|:))'}),six.text_type,], is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)""",
        })

    self.__local_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_address(self):
    self.__local_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}'}),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}|:))'}),six.text_type,], is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)

  tcp_mss = __builtin__.property(_get_tcp_mss)
  mtu_discovery = __builtin__.property(_get_mtu_discovery)
  passive_mode = __builtin__.property(_get_passive_mode)
  local_address = __builtin__.property(_get_local_address)


  _pyangbind_elements = OrderedDict([('tcp_mss', tcp_mss), ('mtu_discovery', mtu_discovery), ('passive_mode', passive_mode), ('local_address', local_address), ])


class yc_transport_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_transport(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/transport. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Transport session parameters for the BGP peer-group
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'transport'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'transport']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/transport/config (container)

    YANG Description: Configuration parameters relating to the transport
session(s) used for the BGP neighbor or group
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/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 parameters relating to the transport
session(s) used for the BGP neighbor or group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/transport/state (container)

    YANG Description: State information relating to the transport session(s)
used for the BGP neighbor or group
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/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 information relating to the transport session(s)
used for the BGP neighbor or group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_error_handling_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/error-handling/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters enabling or modifying the
behavior or enhanced error handling mechanisms for the BGP
group
  """
  __slots__ = ('_path_helper', '_extmethods', '__treat_as_withdraw',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__treat_as_withdraw = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="treat-as-withdraw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'error-handling', 'config']

  def _get_treat_as_withdraw(self):
    """
    Getter method for treat_as_withdraw, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/error_handling/config/treat_as_withdraw (boolean)

    YANG Description: Specify whether erroneous UPDATE messages for which the
NLRI can be extracted are reated as though the NLRI is
withdrawn - avoiding session reset
    """
    return self.__treat_as_withdraw
      
  def _set_treat_as_withdraw(self, v, load=False):
    """
    Setter method for treat_as_withdraw, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/error_handling/config/treat_as_withdraw (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_treat_as_withdraw is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_treat_as_withdraw() directly.

    YANG Description: Specify whether erroneous UPDATE messages for which the
NLRI can be extracted are reated as though the NLRI is
withdrawn - avoiding session reset
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="treat-as-withdraw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """treat_as_withdraw must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="treat-as-withdraw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__treat_as_withdraw = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_treat_as_withdraw(self):
    self.__treat_as_withdraw = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="treat-as-withdraw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  treat_as_withdraw = __builtin__.property(_get_treat_as_withdraw, _set_treat_as_withdraw)


  _pyangbind_elements = OrderedDict([('treat_as_withdraw', treat_as_withdraw), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_error_handling_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/error-handling/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to enhanced error handling
mechanisms for the BGP group
  """
  __slots__ = ('_path_helper', '_extmethods', '__treat_as_withdraw',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__treat_as_withdraw = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="treat-as-withdraw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'error-handling', 'state']

  def _get_treat_as_withdraw(self):
    """
    Getter method for treat_as_withdraw, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/error_handling/state/treat_as_withdraw (boolean)

    YANG Description: Specify whether erroneous UPDATE messages for which the
NLRI can be extracted are reated as though the NLRI is
withdrawn - avoiding session reset
    """
    return self.__treat_as_withdraw
      
  def _set_treat_as_withdraw(self, v, load=False):
    """
    Setter method for treat_as_withdraw, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/error_handling/state/treat_as_withdraw (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_treat_as_withdraw is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_treat_as_withdraw() directly.

    YANG Description: Specify whether erroneous UPDATE messages for which the
NLRI can be extracted are reated as though the NLRI is
withdrawn - avoiding session reset
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="treat-as-withdraw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """treat_as_withdraw must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="treat-as-withdraw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__treat_as_withdraw = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_treat_as_withdraw(self):
    self.__treat_as_withdraw = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="treat-as-withdraw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  treat_as_withdraw = __builtin__.property(_get_treat_as_withdraw)


  _pyangbind_elements = OrderedDict([('treat_as_withdraw', treat_as_withdraw), ])


class yc_error_handling_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_error_handling(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/error-handling. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Error handling parameters used for the BGP peer-group
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'error-handling'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_error_handling_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_error_handling_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'error-handling']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/error_handling/config (container)

    YANG Description: Configuration parameters enabling or modifying the
behavior or enhanced error handling mechanisms for the BGP
group
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/error_handling/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 enabling or modifying the
behavior or enhanced error handling mechanisms for the BGP
group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_error_handling_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_error_handling_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_error_handling_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/error_handling/state (container)

    YANG Description: State information relating to enhanced error handling
mechanisms for the BGP group
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/error_handling/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 relating to enhanced error handling
mechanisms for the BGP group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_error_handling_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_error_handling_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_error_handling_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_graceful_restart_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/graceful-restart/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to graceful-restart
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__restart_time','__stale_routes_time','__helper_only',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__restart_time = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..4096']}), is_leaf=True, yang_name="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__stale_routes_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="stale-routes-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__helper_only = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'graceful-restart', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/graceful_restart/config/enabled (boolean)

    YANG Description: Enable or disable the graceful-restart capability.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/graceful_restart/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: Enable or disable the graceful-restart capability.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_restart_time(self):
    """
    Getter method for restart_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/graceful_restart/config/restart_time (uint16)

    YANG Description: Estimated time (in seconds) for the local BGP speaker to
restart a session. This value is advertise in the graceful
restart BGP capability.  This is a 12-bit value, referred to
as Restart Time in RFC4724.  Per RFC4724, the suggested
default value is <= the hold-time value.
    """
    return self.__restart_time
      
  def _set_restart_time(self, v, load=False):
    """
    Setter method for restart_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/graceful_restart/config/restart_time (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_restart_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_restart_time() directly.

    YANG Description: Estimated time (in seconds) for the local BGP speaker to
restart a session. This value is advertise in the graceful
restart BGP capability.  This is a 12-bit value, referred to
as Restart Time in RFC4724.  Per RFC4724, the suggested
default value is <= the hold-time value.
    """
    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': ['0..4096']}), is_leaf=True, yang_name="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """restart_time must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..4096']}), is_leaf=True, yang_name="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__restart_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_restart_time(self):
    self.__restart_time = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..4096']}), is_leaf=True, yang_name="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_stale_routes_time(self):
    """
    Getter method for stale_routes_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/graceful_restart/config/stale_routes_time (uint16)

    YANG Description: An upper-bound on the time thate stale routes will be
retained by a router after a session is restarted. If an
End-of-RIB (EOR) marker is received prior to this timer
expiring stale-routes will be flushed upon its receipt - if
no EOR is received, then when this timer expires stale paths
will be purged. This timer is referred to as the
Selection_Deferral_Timer in RFC4724
    """
    return self.__stale_routes_time
      
  def _set_stale_routes_time(self, v, load=False):
    """
    Setter method for stale_routes_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/graceful_restart/config/stale_routes_time (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_stale_routes_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_stale_routes_time() directly.

    YANG Description: An upper-bound on the time thate stale routes will be
retained by a router after a session is restarted. If an
End-of-RIB (EOR) marker is received prior to this timer
expiring stale-routes will be flushed upon its receipt - if
no EOR is received, then when this timer expires stale paths
will be purged. This timer is referred to as the
Selection_Deferral_Timer in RFC4724
    """
    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="stale-routes-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """stale_routes_time 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="stale-routes-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__stale_routes_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_stale_routes_time(self):
    self.__stale_routes_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="stale-routes-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_helper_only(self):
    """
    Getter method for helper_only, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/graceful_restart/config/helper_only (boolean)

    YANG Description: Enable graceful-restart in helper mode only. When this
leaf is set, the local system does not retain forwarding
its own state during a restart, but supports procedures
for the receiving speaker, as defined in RFC4724.
    """
    return self.__helper_only
      
  def _set_helper_only(self, v, load=False):
    """
    Setter method for helper_only, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/graceful_restart/config/helper_only (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_helper_only is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_helper_only() directly.

    YANG Description: Enable graceful-restart in helper mode only. When this
leaf is set, the local system does not retain forwarding
its own state during a restart, but supports procedures
for the receiving speaker, as defined in RFC4724.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="helper-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """helper_only must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__helper_only = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_helper_only(self):
    self.__helper_only = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)
  restart_time = __builtin__.property(_get_restart_time, _set_restart_time)
  stale_routes_time = __builtin__.property(_get_stale_routes_time, _set_stale_routes_time)
  helper_only = __builtin__.property(_get_helper_only, _set_helper_only)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('restart_time', restart_time), ('stale_routes_time', stale_routes_time), ('helper_only', helper_only), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_graceful_restart_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/graceful-restart/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information associated with graceful-restart
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__restart_time','__stale_routes_time','__helper_only',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__restart_time = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..4096']}), is_leaf=True, yang_name="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__stale_routes_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="stale-routes-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__helper_only = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'graceful-restart', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/graceful_restart/state/enabled (boolean)

    YANG Description: Enable or disable the graceful-restart capability.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/graceful_restart/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: Enable or disable the graceful-restart capability.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_restart_time(self):
    """
    Getter method for restart_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/graceful_restart/state/restart_time (uint16)

    YANG Description: Estimated time (in seconds) for the local BGP speaker to
restart a session. This value is advertise in the graceful
restart BGP capability.  This is a 12-bit value, referred to
as Restart Time in RFC4724.  Per RFC4724, the suggested
default value is <= the hold-time value.
    """
    return self.__restart_time
      
  def _set_restart_time(self, v, load=False):
    """
    Setter method for restart_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/graceful_restart/state/restart_time (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_restart_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_restart_time() directly.

    YANG Description: Estimated time (in seconds) for the local BGP speaker to
restart a session. This value is advertise in the graceful
restart BGP capability.  This is a 12-bit value, referred to
as Restart Time in RFC4724.  Per RFC4724, the suggested
default value is <= the hold-time value.
    """
    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': ['0..4096']}), is_leaf=True, yang_name="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """restart_time must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..4096']}), is_leaf=True, yang_name="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__restart_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_restart_time(self):
    self.__restart_time = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..4096']}), is_leaf=True, yang_name="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_stale_routes_time(self):
    """
    Getter method for stale_routes_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/graceful_restart/state/stale_routes_time (uint16)

    YANG Description: An upper-bound on the time thate stale routes will be
retained by a router after a session is restarted. If an
End-of-RIB (EOR) marker is received prior to this timer
expiring stale-routes will be flushed upon its receipt - if
no EOR is received, then when this timer expires stale paths
will be purged. This timer is referred to as the
Selection_Deferral_Timer in RFC4724
    """
    return self.__stale_routes_time
      
  def _set_stale_routes_time(self, v, load=False):
    """
    Setter method for stale_routes_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/graceful_restart/state/stale_routes_time (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_stale_routes_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_stale_routes_time() directly.

    YANG Description: An upper-bound on the time thate stale routes will be
retained by a router after a session is restarted. If an
End-of-RIB (EOR) marker is received prior to this timer
expiring stale-routes will be flushed upon its receipt - if
no EOR is received, then when this timer expires stale paths
will be purged. This timer is referred to as the
Selection_Deferral_Timer in RFC4724
    """
    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="stale-routes-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """stale_routes_time 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="stale-routes-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__stale_routes_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_stale_routes_time(self):
    self.__stale_routes_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="stale-routes-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_helper_only(self):
    """
    Getter method for helper_only, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/graceful_restart/state/helper_only (boolean)

    YANG Description: Enable graceful-restart in helper mode only. When this
leaf is set, the local system does not retain forwarding
its own state during a restart, but supports procedures
for the receiving speaker, as defined in RFC4724.
    """
    return self.__helper_only
      
  def _set_helper_only(self, v, load=False):
    """
    Setter method for helper_only, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/graceful_restart/state/helper_only (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_helper_only is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_helper_only() directly.

    YANG Description: Enable graceful-restart in helper mode only. When this
leaf is set, the local system does not retain forwarding
its own state during a restart, but supports procedures
for the receiving speaker, as defined in RFC4724.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="helper-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """helper_only must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__helper_only = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_helper_only(self):
    self.__helper_only = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  enabled = __builtin__.property(_get_enabled)
  restart_time = __builtin__.property(_get_restart_time)
  stale_routes_time = __builtin__.property(_get_stale_routes_time)
  helper_only = __builtin__.property(_get_helper_only)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('restart_time', restart_time), ('stale_routes_time', stale_routes_time), ('helper_only', helper_only), ])


class yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_graceful_restart(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/graceful-restart. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Parameters relating the graceful restart mechanism for BGP
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'graceful-restart'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'graceful-restart']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/graceful_restart/config (container)

    YANG Description: Configuration parameters relating to graceful-restart
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/graceful_restart/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 graceful-restart
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/graceful_restart/state (container)

    YANG Description: State information associated with graceful-restart
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/graceful_restart/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 associated with graceful-restart
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_logging_options_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/logging-options/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters enabling or modifying logging
for events relating to the BGPgroup
  """
  __slots__ = ('_path_helper', '_extmethods', '__log_neighbor_state_changes',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__log_neighbor_state_changes = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="log-neighbor-state-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'logging-options', 'config']

  def _get_log_neighbor_state_changes(self):
    """
    Getter method for log_neighbor_state_changes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/logging_options/config/log_neighbor_state_changes (boolean)

    YANG Description: Configure logging of peer state changes.  Default is
to enable logging of peer state changes.
    """
    return self.__log_neighbor_state_changes
      
  def _set_log_neighbor_state_changes(self, v, load=False):
    """
    Setter method for log_neighbor_state_changes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/logging_options/config/log_neighbor_state_changes (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_log_neighbor_state_changes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_log_neighbor_state_changes() directly.

    YANG Description: Configure logging of peer state changes.  Default is
to enable logging of peer state changes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="log-neighbor-state-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """log_neighbor_state_changes must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="log-neighbor-state-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__log_neighbor_state_changes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_log_neighbor_state_changes(self):
    self.__log_neighbor_state_changes = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="log-neighbor-state-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  log_neighbor_state_changes = __builtin__.property(_get_log_neighbor_state_changes, _set_log_neighbor_state_changes)


  _pyangbind_elements = OrderedDict([('log_neighbor_state_changes', log_neighbor_state_changes), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_logging_options_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/logging-options/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to logging for the BGP neighbor
or group
  """
  __slots__ = ('_path_helper', '_extmethods', '__log_neighbor_state_changes',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__log_neighbor_state_changes = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="log-neighbor-state-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'logging-options', 'state']

  def _get_log_neighbor_state_changes(self):
    """
    Getter method for log_neighbor_state_changes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/logging_options/state/log_neighbor_state_changes (boolean)

    YANG Description: Configure logging of peer state changes.  Default is
to enable logging of peer state changes.
    """
    return self.__log_neighbor_state_changes
      
  def _set_log_neighbor_state_changes(self, v, load=False):
    """
    Setter method for log_neighbor_state_changes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/logging_options/state/log_neighbor_state_changes (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_log_neighbor_state_changes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_log_neighbor_state_changes() directly.

    YANG Description: Configure logging of peer state changes.  Default is
to enable logging of peer state changes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="log-neighbor-state-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """log_neighbor_state_changes must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="log-neighbor-state-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__log_neighbor_state_changes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_log_neighbor_state_changes(self):
    self.__log_neighbor_state_changes = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="log-neighbor-state-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  log_neighbor_state_changes = __builtin__.property(_get_log_neighbor_state_changes)


  _pyangbind_elements = OrderedDict([('log_neighbor_state_changes', log_neighbor_state_changes), ])


class yc_logging_options_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_logging_options(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/logging-options. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Logging options for events related to the BGP neighbor or
group
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'logging-options'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_logging_options_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_logging_options_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'logging-options']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/logging_options/config (container)

    YANG Description: Configuration parameters enabling or modifying logging
for events relating to the BGPgroup
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/logging_options/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 enabling or modifying logging
for events relating to the BGPgroup
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_logging_options_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_logging_options_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_logging_options_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/logging_options/state (container)

    YANG Description: State information relating to logging for the BGP neighbor
or group
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/logging_options/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 relating to logging for the BGP neighbor
or group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_logging_options_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_logging_options_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_logging_options_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_ebgp_multihop_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/ebgp-multihop/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to eBGP multihop for the
BGP group
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__multihop_ttl',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__multihop_ttl = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="multihop-ttl", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'ebgp-multihop', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/ebgp_multihop/config/enabled (boolean)

    YANG Description: When enabled the referenced group or neighbors are permitted
to be indirectly connected - including cases where the TTL
can be decremented between the BGP peers
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/ebgp_multihop/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When enabled the referenced group or neighbors are permitted
to be indirectly connected - including cases where the TTL
can be decremented between the BGP peers
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_multihop_ttl(self):
    """
    Getter method for multihop_ttl, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/ebgp_multihop/config/multihop_ttl (uint8)

    YANG Description: Time-to-live value to use when packets are sent to the
referenced group or neighbors and ebgp-multihop is enabled
    """
    return self.__multihop_ttl
      
  def _set_multihop_ttl(self, v, load=False):
    """
    Setter method for multihop_ttl, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/ebgp_multihop/config/multihop_ttl (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multihop_ttl is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multihop_ttl() directly.

    YANG Description: Time-to-live value to use when packets are sent to the
referenced group or neighbors and ebgp-multihop is enabled
    """
    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="multihop-ttl", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multihop_ttl 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="multihop-ttl", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
        })

    self.__multihop_ttl = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multihop_ttl(self):
    self.__multihop_ttl = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="multihop-ttl", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)
  multihop_ttl = __builtin__.property(_get_multihop_ttl, _set_multihop_ttl)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('multihop_ttl', multihop_ttl), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_ebgp_multihop_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/ebgp-multihop/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information for eBGP multihop, for the BGP neighbor
or group
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__multihop_ttl',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__multihop_ttl = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="multihop-ttl", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'ebgp-multihop', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/ebgp_multihop/state/enabled (boolean)

    YANG Description: When enabled the referenced group or neighbors are permitted
to be indirectly connected - including cases where the TTL
can be decremented between the BGP peers
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/ebgp_multihop/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When enabled the referenced group or neighbors are permitted
to be indirectly connected - including cases where the TTL
can be decremented between the BGP peers
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_multihop_ttl(self):
    """
    Getter method for multihop_ttl, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/ebgp_multihop/state/multihop_ttl (uint8)

    YANG Description: Time-to-live value to use when packets are sent to the
referenced group or neighbors and ebgp-multihop is enabled
    """
    return self.__multihop_ttl
      
  def _set_multihop_ttl(self, v, load=False):
    """
    Setter method for multihop_ttl, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/ebgp_multihop/state/multihop_ttl (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multihop_ttl is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multihop_ttl() directly.

    YANG Description: Time-to-live value to use when packets are sent to the
referenced group or neighbors and ebgp-multihop is enabled
    """
    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="multihop-ttl", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multihop_ttl 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="multihop-ttl", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__multihop_ttl = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multihop_ttl(self):
    self.__multihop_ttl = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="multihop-ttl", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)

  enabled = __builtin__.property(_get_enabled)
  multihop_ttl = __builtin__.property(_get_multihop_ttl)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('multihop_ttl', multihop_ttl), ])


class yc_ebgp_multihop_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_ebgp_multihop(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/ebgp-multihop. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: eBGP multi-hop parameters for the BGPgroup
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'ebgp-multihop'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_ebgp_multihop_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_ebgp_multihop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'ebgp-multihop']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/ebgp_multihop/config (container)

    YANG Description: Configuration parameters relating to eBGP multihop for the
BGP group
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/ebgp_multihop/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 eBGP multihop for the
BGP group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_ebgp_multihop_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_ebgp_multihop_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_ebgp_multihop_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/ebgp_multihop/state (container)

    YANG Description: State information for eBGP multihop, for the BGP neighbor
or group
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/ebgp_multihop/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 eBGP multihop, for the BGP neighbor
or group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_ebgp_multihop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_ebgp_multihop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_ebgp_multihop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_route_reflector_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/route-reflector/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuraton parameters relating to route reflection
for the BGPgroup
  """
  __slots__ = ('_path_helper', '_extmethods', '__route_reflector_cluster_id','__route_reflector_client',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__route_reflector_cluster_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),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}'}),], is_leaf=True, yang_name="route-reflector-cluster-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:rr-cluster-id-type', is_config=True)
    self.__route_reflector_client = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="route-reflector-client", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'route-reflector', 'config']

  def _get_route_reflector_cluster_id(self):
    """
    Getter method for route_reflector_cluster_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/route_reflector/config/route_reflector_cluster_id (oc-bgp-types:rr-cluster-id-type)

    YANG Description: route-reflector cluster id to use when local router is
configured as a route reflector.  Commonly set at the group
level, but allows a different cluster
id to be set for each neighbor.
    """
    return self.__route_reflector_cluster_id
      
  def _set_route_reflector_cluster_id(self, v, load=False):
    """
    Setter method for route_reflector_cluster_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/route_reflector/config/route_reflector_cluster_id (oc-bgp-types:rr-cluster-id-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route_reflector_cluster_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route_reflector_cluster_id() directly.

    YANG Description: route-reflector cluster id to use when local router is
configured as a route reflector.  Commonly set at the group
level, but allows a different cluster
id to be set for each neighbor.
    """
    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),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}'}),], is_leaf=True, yang_name="route-reflector-cluster-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:rr-cluster-id-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route_reflector_cluster_id must be of a type compatible with oc-bgp-types:rr-cluster-id-type""",
          'defined-type': "oc-bgp-types:rr-cluster-id-type",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),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}'}),], is_leaf=True, yang_name="route-reflector-cluster-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:rr-cluster-id-type', is_config=True)""",
        })

    self.__route_reflector_cluster_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route_reflector_cluster_id(self):
    self.__route_reflector_cluster_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),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}'}),], is_leaf=True, yang_name="route-reflector-cluster-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:rr-cluster-id-type', is_config=True)


  def _get_route_reflector_client(self):
    """
    Getter method for route_reflector_client, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/route_reflector/config/route_reflector_client (boolean)

    YANG Description: Configure the neighbor as a route reflector client.
    """
    return self.__route_reflector_client
      
  def _set_route_reflector_client(self, v, load=False):
    """
    Setter method for route_reflector_client, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/route_reflector/config/route_reflector_client (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route_reflector_client is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route_reflector_client() directly.

    YANG Description: Configure the neighbor as a route reflector client.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="route-reflector-client", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route_reflector_client must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="route-reflector-client", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__route_reflector_client = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route_reflector_client(self):
    self.__route_reflector_client = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="route-reflector-client", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  route_reflector_cluster_id = __builtin__.property(_get_route_reflector_cluster_id, _set_route_reflector_cluster_id)
  route_reflector_client = __builtin__.property(_get_route_reflector_client, _set_route_reflector_client)


  _pyangbind_elements = OrderedDict([('route_reflector_cluster_id', route_reflector_cluster_id), ('route_reflector_client', route_reflector_client), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_route_reflector_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/route-reflector/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to route reflection for the
BGPgroup
  """
  __slots__ = ('_path_helper', '_extmethods', '__route_reflector_cluster_id','__route_reflector_client',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__route_reflector_cluster_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),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}'}),], is_leaf=True, yang_name="route-reflector-cluster-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:rr-cluster-id-type', is_config=False)
    self.__route_reflector_client = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="route-reflector-client", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'route-reflector', 'state']

  def _get_route_reflector_cluster_id(self):
    """
    Getter method for route_reflector_cluster_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/route_reflector/state/route_reflector_cluster_id (oc-bgp-types:rr-cluster-id-type)

    YANG Description: route-reflector cluster id to use when local router is
configured as a route reflector.  Commonly set at the group
level, but allows a different cluster
id to be set for each neighbor.
    """
    return self.__route_reflector_cluster_id
      
  def _set_route_reflector_cluster_id(self, v, load=False):
    """
    Setter method for route_reflector_cluster_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/route_reflector/state/route_reflector_cluster_id (oc-bgp-types:rr-cluster-id-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route_reflector_cluster_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route_reflector_cluster_id() directly.

    YANG Description: route-reflector cluster id to use when local router is
configured as a route reflector.  Commonly set at the group
level, but allows a different cluster
id to be set for each neighbor.
    """
    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),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}'}),], is_leaf=True, yang_name="route-reflector-cluster-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:rr-cluster-id-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route_reflector_cluster_id must be of a type compatible with oc-bgp-types:rr-cluster-id-type""",
          'defined-type': "oc-bgp-types:rr-cluster-id-type",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),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}'}),], is_leaf=True, yang_name="route-reflector-cluster-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:rr-cluster-id-type', is_config=False)""",
        })

    self.__route_reflector_cluster_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route_reflector_cluster_id(self):
    self.__route_reflector_cluster_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),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}'}),], is_leaf=True, yang_name="route-reflector-cluster-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgp-types:rr-cluster-id-type', is_config=False)


  def _get_route_reflector_client(self):
    """
    Getter method for route_reflector_client, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/route_reflector/state/route_reflector_client (boolean)

    YANG Description: Configure the neighbor as a route reflector client.
    """
    return self.__route_reflector_client
      
  def _set_route_reflector_client(self, v, load=False):
    """
    Setter method for route_reflector_client, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/route_reflector/state/route_reflector_client (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route_reflector_client is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route_reflector_client() directly.

    YANG Description: Configure the neighbor as a route reflector client.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="route-reflector-client", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route_reflector_client must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="route-reflector-client", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__route_reflector_client = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route_reflector_client(self):
    self.__route_reflector_client = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="route-reflector-client", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  route_reflector_cluster_id = __builtin__.property(_get_route_reflector_cluster_id)
  route_reflector_client = __builtin__.property(_get_route_reflector_client)


  _pyangbind_elements = OrderedDict([('route_reflector_cluster_id', route_reflector_cluster_id), ('route_reflector_client', route_reflector_client), ])


class yc_route_reflector_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_route_reflector(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/route-reflector. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Route reflector parameters for the BGPgroup
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'route-reflector'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_route_reflector_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_route_reflector_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'route-reflector']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/route_reflector/config (container)

    YANG Description: Configuraton parameters relating to route reflection
for the BGPgroup
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/route_reflector/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: Configuraton parameters relating to route reflection
for the BGPgroup
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_route_reflector_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_route_reflector_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_route_reflector_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/route_reflector/state (container)

    YANG Description: State information relating to route reflection for the
BGPgroup
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/route_reflector/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 relating to route reflection for the
BGPgroup
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_route_reflector_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_route_reflector_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_route_reflector_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_as_path_options_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/as-path-options/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to AS_PATH manipulation
for the BGP peer or group
  """
  __slots__ = ('_path_helper', '_extmethods', '__allow_own_as','__replace_peer_as','__disable_peer_as_filter',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__allow_own_as = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="allow-own-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    self.__replace_peer_as = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="replace-peer-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__disable_peer_as_filter = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-peer-as-filter", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'as-path-options', 'config']

  def _get_allow_own_as(self):
    """
    Getter method for allow_own_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/as_path_options/config/allow_own_as (uint8)

    YANG Description: Specify the number of occurrences of the local BGP speaker's
AS that can occur within the AS_PATH before it is rejected.
    """
    return self.__allow_own_as
      
  def _set_allow_own_as(self, v, load=False):
    """
    Setter method for allow_own_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/as_path_options/config/allow_own_as (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_allow_own_as is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_allow_own_as() directly.

    YANG Description: Specify the number of occurrences of the local BGP speaker's
AS that can occur within the AS_PATH before it is rejected.
    """
    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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="allow-own-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """allow_own_as 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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="allow-own-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
        })

    self.__allow_own_as = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_allow_own_as(self):
    self.__allow_own_as = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="allow-own-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)


  def _get_replace_peer_as(self):
    """
    Getter method for replace_peer_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/as_path_options/config/replace_peer_as (boolean)

    YANG Description: Replace occurrences of the peer's AS in the AS_PATH
with the local autonomous system number
    """
    return self.__replace_peer_as
      
  def _set_replace_peer_as(self, v, load=False):
    """
    Setter method for replace_peer_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/as_path_options/config/replace_peer_as (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_replace_peer_as is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_replace_peer_as() directly.

    YANG Description: Replace occurrences of the peer's AS in the AS_PATH
with the local autonomous system number
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="replace-peer-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """replace_peer_as must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="replace-peer-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__replace_peer_as = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_replace_peer_as(self):
    self.__replace_peer_as = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="replace-peer-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_disable_peer_as_filter(self):
    """
    Getter method for disable_peer_as_filter, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/as_path_options/config/disable_peer_as_filter (boolean)

    YANG Description: When set to true, the system advertises routes to a peer
even if the peer's AS was in the AS path.  The default
behavior (false) suppresses advertisements to peers if
their AS number is in the AS path of the route.
    """
    return self.__disable_peer_as_filter
      
  def _set_disable_peer_as_filter(self, v, load=False):
    """
    Setter method for disable_peer_as_filter, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/as_path_options/config/disable_peer_as_filter (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_disable_peer_as_filter is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_disable_peer_as_filter() directly.

    YANG Description: When set to true, the system advertises routes to a peer
even if the peer's AS was in the AS path.  The default
behavior (false) suppresses advertisements to peers if
their AS number is in the AS path of the route.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-peer-as-filter", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """disable_peer_as_filter must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-peer-as-filter", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__disable_peer_as_filter = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_disable_peer_as_filter(self):
    self.__disable_peer_as_filter = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-peer-as-filter", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  allow_own_as = __builtin__.property(_get_allow_own_as, _set_allow_own_as)
  replace_peer_as = __builtin__.property(_get_replace_peer_as, _set_replace_peer_as)
  disable_peer_as_filter = __builtin__.property(_get_disable_peer_as_filter, _set_disable_peer_as_filter)


  _pyangbind_elements = OrderedDict([('allow_own_as', allow_own_as), ('replace_peer_as', replace_peer_as), ('disable_peer_as_filter', disable_peer_as_filter), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_as_path_options_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/as-path-options/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the AS_PATH manipulation
mechanisms for the BGP peer or group
  """
  __slots__ = ('_path_helper', '_extmethods', '__allow_own_as','__replace_peer_as','__disable_peer_as_filter',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__allow_own_as = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="allow-own-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__replace_peer_as = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="replace-peer-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__disable_peer_as_filter = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-peer-as-filter", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'as-path-options', 'state']

  def _get_allow_own_as(self):
    """
    Getter method for allow_own_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/as_path_options/state/allow_own_as (uint8)

    YANG Description: Specify the number of occurrences of the local BGP speaker's
AS that can occur within the AS_PATH before it is rejected.
    """
    return self.__allow_own_as
      
  def _set_allow_own_as(self, v, load=False):
    """
    Setter method for allow_own_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/as_path_options/state/allow_own_as (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_allow_own_as is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_allow_own_as() directly.

    YANG Description: Specify the number of occurrences of the local BGP speaker's
AS that can occur within the AS_PATH before it is rejected.
    """
    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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="allow-own-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """allow_own_as 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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="allow-own-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__allow_own_as = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_allow_own_as(self):
    self.__allow_own_as = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="allow-own-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_replace_peer_as(self):
    """
    Getter method for replace_peer_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/as_path_options/state/replace_peer_as (boolean)

    YANG Description: Replace occurrences of the peer's AS in the AS_PATH
with the local autonomous system number
    """
    return self.__replace_peer_as
      
  def _set_replace_peer_as(self, v, load=False):
    """
    Setter method for replace_peer_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/as_path_options/state/replace_peer_as (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_replace_peer_as is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_replace_peer_as() directly.

    YANG Description: Replace occurrences of the peer's AS in the AS_PATH
with the local autonomous system number
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="replace-peer-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """replace_peer_as must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="replace-peer-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__replace_peer_as = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_replace_peer_as(self):
    self.__replace_peer_as = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="replace-peer-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_disable_peer_as_filter(self):
    """
    Getter method for disable_peer_as_filter, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/as_path_options/state/disable_peer_as_filter (boolean)

    YANG Description: When set to true, the system advertises routes to a peer
even if the peer's AS was in the AS path.  The default
behavior (false) suppresses advertisements to peers if
their AS number is in the AS path of the route.
    """
    return self.__disable_peer_as_filter
      
  def _set_disable_peer_as_filter(self, v, load=False):
    """
    Setter method for disable_peer_as_filter, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/as_path_options/state/disable_peer_as_filter (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_disable_peer_as_filter is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_disable_peer_as_filter() directly.

    YANG Description: When set to true, the system advertises routes to a peer
even if the peer's AS was in the AS path.  The default
behavior (false) suppresses advertisements to peers if
their AS number is in the AS path of the route.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-peer-as-filter", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """disable_peer_as_filter must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-peer-as-filter", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__disable_peer_as_filter = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_disable_peer_as_filter(self):
    self.__disable_peer_as_filter = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-peer-as-filter", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  allow_own_as = __builtin__.property(_get_allow_own_as)
  replace_peer_as = __builtin__.property(_get_replace_peer_as)
  disable_peer_as_filter = __builtin__.property(_get_disable_peer_as_filter)


  _pyangbind_elements = OrderedDict([('allow_own_as', allow_own_as), ('replace_peer_as', replace_peer_as), ('disable_peer_as_filter', disable_peer_as_filter), ])


class yc_as_path_options_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_as_path_options(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/as-path-options. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: AS_PATH manipulation parameters for the BGP neighbor or
group
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'as-path-options'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_as_path_options_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_as_path_options_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'as-path-options']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/as_path_options/config (container)

    YANG Description: Configuration parameters relating to AS_PATH manipulation
for the BGP peer or group
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/as_path_options/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 AS_PATH manipulation
for the BGP peer or group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_as_path_options_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_as_path_options_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_as_path_options_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/as_path_options/state (container)

    YANG Description: State information relating to the AS_PATH manipulation
mechanisms for the BGP peer or group
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/as_path_options/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 relating to the AS_PATH manipulation
mechanisms for the BGP peer or group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_as_path_options_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_as_path_options_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_as_path_options_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/use-multiple-paths/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to multipath
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'use-multiple-paths', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/use_multiple_paths/config/enabled (boolean)

    YANG Description: Whether the use of multiple paths for the same NLRI is
enabled for the neighbor. This value is overridden by
any more specific configuration value.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/use_multiple_paths/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: Whether the use of multiple paths for the same NLRI is
enabled for the neighbor. This value is overridden by
any more specific configuration value.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/use-multiple-paths/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to multipath
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'use-multiple-paths', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/use_multiple_paths/state/enabled (boolean)

    YANG Description: Whether the use of multiple paths for the same NLRI is
enabled for the neighbor. This value is overridden by
any more specific configuration value.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/use_multiple_paths/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: Whether the use of multiple paths for the same NLRI is
enabled for the neighbor. This value is overridden by
any more specific configuration value.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  enabled = __builtin__.property(_get_enabled)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths_ebgp_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/use-multiple-paths/ebgp/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to eBGP multipath
  """
  __slots__ = ('_path_helper', '_extmethods', '__allow_multiple_as','__maximum_paths',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__allow_multiple_as = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__maximum_paths = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'use-multiple-paths', 'ebgp', 'config']

  def _get_allow_multiple_as(self):
    """
    Getter method for allow_multiple_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/use_multiple_paths/ebgp/config/allow_multiple_as (boolean)

    YANG Description: Allow multipath to use paths from different neighbouring
ASes.  The default is to only consider multiple paths from
the same neighbouring AS.
    """
    return self.__allow_multiple_as
      
  def _set_allow_multiple_as(self, v, load=False):
    """
    Setter method for allow_multiple_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/use_multiple_paths/ebgp/config/allow_multiple_as (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_allow_multiple_as is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_allow_multiple_as() directly.

    YANG Description: Allow multipath to use paths from different neighbouring
ASes.  The default is to only consider multiple paths from
the same neighbouring AS.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """allow_multiple_as must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__allow_multiple_as = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_allow_multiple_as(self):
    self.__allow_multiple_as = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_maximum_paths(self):
    """
    Getter method for maximum_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/use_multiple_paths/ebgp/config/maximum_paths (uint32)

    YANG Description: Maximum number of parallel paths to consider when using
BGP multipath. The default is use a single path.
    """
    return self.__maximum_paths
      
  def _set_maximum_paths(self, v, load=False):
    """
    Setter method for maximum_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/use_multiple_paths/ebgp/config/maximum_paths (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_maximum_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_maximum_paths() directly.

    YANG Description: Maximum number of parallel paths to consider when using
BGP multipath. The default is use a single path.
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """maximum_paths 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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__maximum_paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_maximum_paths(self):
    self.__maximum_paths = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)

  allow_multiple_as = __builtin__.property(_get_allow_multiple_as, _set_allow_multiple_as)
  maximum_paths = __builtin__.property(_get_maximum_paths, _set_maximum_paths)


  _pyangbind_elements = OrderedDict([('allow_multiple_as', allow_multiple_as), ('maximum_paths', maximum_paths), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths_ebgp_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/use-multiple-paths/ebgp/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to eBGP multipath
  """
  __slots__ = ('_path_helper', '_extmethods', '__allow_multiple_as','__maximum_paths',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__allow_multiple_as = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__maximum_paths = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'use-multiple-paths', 'ebgp', 'state']

  def _get_allow_multiple_as(self):
    """
    Getter method for allow_multiple_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/use_multiple_paths/ebgp/state/allow_multiple_as (boolean)

    YANG Description: Allow multipath to use paths from different neighbouring
ASes.  The default is to only consider multiple paths from
the same neighbouring AS.
    """
    return self.__allow_multiple_as
      
  def _set_allow_multiple_as(self, v, load=False):
    """
    Setter method for allow_multiple_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/use_multiple_paths/ebgp/state/allow_multiple_as (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_allow_multiple_as is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_allow_multiple_as() directly.

    YANG Description: Allow multipath to use paths from different neighbouring
ASes.  The default is to only consider multiple paths from
the same neighbouring AS.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """allow_multiple_as must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__allow_multiple_as = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_allow_multiple_as(self):
    self.__allow_multiple_as = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_maximum_paths(self):
    """
    Getter method for maximum_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/use_multiple_paths/ebgp/state/maximum_paths (uint32)

    YANG Description: Maximum number of parallel paths to consider when using
BGP multipath. The default is use a single path.
    """
    return self.__maximum_paths
      
  def _set_maximum_paths(self, v, load=False):
    """
    Setter method for maximum_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/use_multiple_paths/ebgp/state/maximum_paths (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_maximum_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_maximum_paths() directly.

    YANG Description: Maximum number of parallel paths to consider when using
BGP multipath. The default is use a single path.
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """maximum_paths 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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__maximum_paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_maximum_paths(self):
    self.__maximum_paths = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  allow_multiple_as = __builtin__.property(_get_allow_multiple_as)
  maximum_paths = __builtin__.property(_get_maximum_paths)


  _pyangbind_elements = OrderedDict([('allow_multiple_as', allow_multiple_as), ('maximum_paths', maximum_paths), ])


class yc_ebgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths_ebgp(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/use-multiple-paths/ebgp. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Multipath parameters for eBGP
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'ebgp'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths_ebgp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths_ebgp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'use-multiple-paths', 'ebgp']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/use_multiple_paths/ebgp/config (container)

    YANG Description: Configuration parameters relating to eBGP multipath
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/use_multiple_paths/ebgp/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 eBGP multipath
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths_ebgp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths_ebgp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths_ebgp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/use_multiple_paths/ebgp/state (container)

    YANG Description: State information relating to eBGP multipath
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/use_multiple_paths/ebgp/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 relating to eBGP multipath
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths_ebgp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths_ebgp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths_ebgp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths_ibgp_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/use-multiple-paths/ibgp/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to iBGP multipath
  """
  __slots__ = ('_path_helper', '_extmethods', '__maximum_paths',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__maximum_paths = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'use-multiple-paths', 'ibgp', 'config']

  def _get_maximum_paths(self):
    """
    Getter method for maximum_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/use_multiple_paths/ibgp/config/maximum_paths (uint32)

    YANG Description: Maximum number of parallel paths to consider when using
iBGP multipath. The default is to use a single path
    """
    return self.__maximum_paths
      
  def _set_maximum_paths(self, v, load=False):
    """
    Setter method for maximum_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/use_multiple_paths/ibgp/config/maximum_paths (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_maximum_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_maximum_paths() directly.

    YANG Description: Maximum number of parallel paths to consider when using
iBGP multipath. The default is to use a single path
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """maximum_paths 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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__maximum_paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_maximum_paths(self):
    self.__maximum_paths = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)

  maximum_paths = __builtin__.property(_get_maximum_paths, _set_maximum_paths)


  _pyangbind_elements = OrderedDict([('maximum_paths', maximum_paths), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths_ibgp_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/use-multiple-paths/ibgp/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to iBGP multipath
  """
  __slots__ = ('_path_helper', '_extmethods', '__maximum_paths',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__maximum_paths = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'use-multiple-paths', 'ibgp', 'state']

  def _get_maximum_paths(self):
    """
    Getter method for maximum_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/use_multiple_paths/ibgp/state/maximum_paths (uint32)

    YANG Description: Maximum number of parallel paths to consider when using
iBGP multipath. The default is to use a single path
    """
    return self.__maximum_paths
      
  def _set_maximum_paths(self, v, load=False):
    """
    Setter method for maximum_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/use_multiple_paths/ibgp/state/maximum_paths (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_maximum_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_maximum_paths() directly.

    YANG Description: Maximum number of parallel paths to consider when using
iBGP multipath. The default is to use a single path
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """maximum_paths 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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__maximum_paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_maximum_paths(self):
    self.__maximum_paths = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  maximum_paths = __builtin__.property(_get_maximum_paths)


  _pyangbind_elements = OrderedDict([('maximum_paths', maximum_paths), ])


class yc_ibgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths_ibgp(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/use-multiple-paths/ibgp. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Multipath parameters for iBGP
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'ibgp'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths_ibgp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths_ibgp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'use-multiple-paths', 'ibgp']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/use_multiple_paths/ibgp/config (container)

    YANG Description: Configuration parameters relating to iBGP multipath
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/use_multiple_paths/ibgp/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 iBGP multipath
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths_ibgp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths_ibgp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths_ibgp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/use_multiple_paths/ibgp/state (container)

    YANG Description: State information relating to iBGP multipath
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/use_multiple_paths/ibgp/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 relating to iBGP multipath
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths_ibgp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths_ibgp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths_ibgp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_use_multiple_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/use-multiple-paths. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Parameters related to the use of multiple paths for the
same NLRI
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__ebgp','__ibgp',)

  _yang_name = 'use-multiple-paths'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__ebgp = YANGDynClass(base=yc_ebgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths_ebgp, is_container='container', yang_name="ebgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__ibgp = YANGDynClass(base=yc_ibgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths_ibgp, is_container='container', yang_name="ibgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'use-multiple-paths']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/use_multiple_paths/config (container)

    YANG Description: Configuration parameters relating to multipath
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/use_multiple_paths/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 multipath
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/use_multiple_paths/state (container)

    YANG Description: State parameters relating to multipath
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/use_multiple_paths/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 parameters relating to multipath
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_ebgp(self):
    """
    Getter method for ebgp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/use_multiple_paths/ebgp (container)

    YANG Description: Multipath parameters for eBGP
    """
    return self.__ebgp
      
  def _set_ebgp(self, v, load=False):
    """
    Setter method for ebgp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/use_multiple_paths/ebgp (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ebgp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ebgp() directly.

    YANG Description: Multipath parameters for eBGP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ebgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths_ebgp, is_container='container', yang_name="ebgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ebgp must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ebgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths_ebgp, is_container='container', yang_name="ebgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__ebgp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ebgp(self):
    self.__ebgp = YANGDynClass(base=yc_ebgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths_ebgp, is_container='container', yang_name="ebgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_ibgp(self):
    """
    Getter method for ibgp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/use_multiple_paths/ibgp (container)

    YANG Description: Multipath parameters for iBGP
    """
    return self.__ibgp
      
  def _set_ibgp(self, v, load=False):
    """
    Setter method for ibgp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/use_multiple_paths/ibgp (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ibgp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ibgp() directly.

    YANG Description: Multipath parameters for iBGP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ibgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths_ibgp, is_container='container', yang_name="ibgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ibgp must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ibgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths_ibgp, is_container='container', yang_name="ibgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__ibgp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ibgp(self):
    self.__ibgp = YANGDynClass(base=yc_ibgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths_ibgp, is_container='container', yang_name="ibgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  ebgp = __builtin__.property(_get_ebgp, _set_ebgp)
  ibgp = __builtin__.property(_get_ibgp, _set_ibgp)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('ebgp', ebgp), ('ibgp', ibgp), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_apply_policy_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/apply-policy/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Policy configuration data.
  """
  __slots__ = ('_path_helper', '_extmethods', '__import_policy','__default_import_policy','__export_policy','__default_export_policy',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)
    self.__export_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__default_export_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'apply-policy', 'config']

  def _get_import_policy(self):
    """
    Getter method for import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/apply_policy/config/import_policy (leafref)

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    return self.__import_policy
      
  def _set_import_policy(self, v, load=False):
    """
    Setter method for import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/apply_policy/config/import_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_import_policy() directly.

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """import_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__import_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_import_policy(self):
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_default_import_policy(self):
    """
    Getter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/apply_policy/config/default_import_policy (default-policy-type)

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    return self.__default_import_policy
      
  def _set_default_import_policy(self, v, load=False):
    """
    Setter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/apply_policy/config/default_import_policy (default-policy-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_default_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_default_import_policy() directly.

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    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={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """default_import_policy must be of a type compatible with default-policy-type""",
          'defined-type': "openconfig-network-instance:default-policy-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)""",
        })

    self.__default_import_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_default_import_policy(self):
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)


  def _get_export_policy(self):
    """
    Getter method for export_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/apply_policy/config/export_policy (leafref)

    YANG Description: list of policy names in sequence to be applied on
sending a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    return self.__export_policy
      
  def _set_export_policy(self, v, load=False):
    """
    Setter method for export_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/apply_policy/config/export_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_export_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_export_policy() directly.

    YANG Description: list of policy names in sequence to be applied on
sending a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """export_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__export_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_export_policy(self):
    self.__export_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_default_export_policy(self):
    """
    Getter method for default_export_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/apply_policy/config/default_export_policy (default-policy-type)

    YANG Description: explicitly set a default policy if no policy definition
in the export policy chain is satisfied.
    """
    return self.__default_export_policy
      
  def _set_default_export_policy(self, v, load=False):
    """
    Setter method for default_export_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/apply_policy/config/default_export_policy (default-policy-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_default_export_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_default_export_policy() directly.

    YANG Description: explicitly set a default policy if no policy definition
in the export policy chain is satisfied.
    """
    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={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """default_export_policy must be of a type compatible with default-policy-type""",
          'defined-type': "openconfig-network-instance:default-policy-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)""",
        })

    self.__default_export_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_default_export_policy(self):
    self.__default_export_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)

  import_policy = __builtin__.property(_get_import_policy, _set_import_policy)
  default_import_policy = __builtin__.property(_get_default_import_policy, _set_default_import_policy)
  export_policy = __builtin__.property(_get_export_policy, _set_export_policy)
  default_export_policy = __builtin__.property(_get_default_export_policy, _set_default_export_policy)


  _pyangbind_elements = OrderedDict([('import_policy', import_policy), ('default_import_policy', default_import_policy), ('export_policy', export_policy), ('default_export_policy', default_export_policy), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_apply_policy_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/apply-policy/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for routing policy
  """
  __slots__ = ('_path_helper', '_extmethods', '__import_policy','__default_import_policy','__export_policy','__default_export_policy',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)
    self.__export_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__default_export_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'apply-policy', 'state']

  def _get_import_policy(self):
    """
    Getter method for import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/apply_policy/state/import_policy (leafref)

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    return self.__import_policy
      
  def _set_import_policy(self, v, load=False):
    """
    Setter method for import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/apply_policy/state/import_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_import_policy() directly.

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """import_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__import_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_import_policy(self):
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_default_import_policy(self):
    """
    Getter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/apply_policy/state/default_import_policy (default-policy-type)

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    return self.__default_import_policy
      
  def _set_default_import_policy(self, v, load=False):
    """
    Setter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/apply_policy/state/default_import_policy (default-policy-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_default_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_default_import_policy() directly.

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    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={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """default_import_policy must be of a type compatible with default-policy-type""",
          'defined-type': "openconfig-network-instance:default-policy-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)""",
        })

    self.__default_import_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_default_import_policy(self):
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)


  def _get_export_policy(self):
    """
    Getter method for export_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/apply_policy/state/export_policy (leafref)

    YANG Description: list of policy names in sequence to be applied on
sending a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    return self.__export_policy
      
  def _set_export_policy(self, v, load=False):
    """
    Setter method for export_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/apply_policy/state/export_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_export_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_export_policy() directly.

    YANG Description: list of policy names in sequence to be applied on
sending a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """export_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__export_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_export_policy(self):
    self.__export_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_default_export_policy(self):
    """
    Getter method for default_export_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/apply_policy/state/default_export_policy (default-policy-type)

    YANG Description: explicitly set a default policy if no policy definition
in the export policy chain is satisfied.
    """
    return self.__default_export_policy
      
  def _set_default_export_policy(self, v, load=False):
    """
    Setter method for default_export_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/apply_policy/state/default_export_policy (default-policy-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_default_export_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_default_export_policy() directly.

    YANG Description: explicitly set a default policy if no policy definition
in the export policy chain is satisfied.
    """
    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={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """default_export_policy must be of a type compatible with default-policy-type""",
          'defined-type': "openconfig-network-instance:default-policy-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)""",
        })

    self.__default_export_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_default_export_policy(self):
    self.__default_export_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)

  import_policy = __builtin__.property(_get_import_policy)
  default_import_policy = __builtin__.property(_get_default_import_policy)
  export_policy = __builtin__.property(_get_export_policy)
  default_export_policy = __builtin__.property(_get_default_export_policy)


  _pyangbind_elements = OrderedDict([('import_policy', import_policy), ('default_import_policy', default_import_policy), ('export_policy', export_policy), ('default_export_policy', default_export_policy), ])


class yc_apply_policy_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_apply_policy(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/apply-policy. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Anchor point for routing policies in the model.
Import and export policies are with respect to the local
routing table, i.e., export (send) and import (receive),
depending on the context.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'apply-policy'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_apply_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_apply_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'apply-policy']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/apply_policy/config (container)

    YANG Description: Policy configuration data.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/apply_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: Policy configuration data.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_apply_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_apply_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_apply_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/apply_policy/state (container)

    YANG Description: Operational state for routing policy
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/apply_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 for routing policy
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_apply_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_apply_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_apply_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi_safi_name','__enabled',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi_safi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'config']

  def _get_afi_safi_name(self):
    """
    Getter method for afi_safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/config/afi_safi_name (identityref)

    YANG Description: AFI,SAFI
    """
    return self.__afi_safi_name
      
  def _set_afi_safi_name(self, v, load=False):
    """
    Setter method for afi_safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/config/afi_safi_name (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_safi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_safi_name() directly.

    YANG Description: AFI,SAFI
    """
    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_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_safi_name must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__afi_safi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_safi_name(self):
    self.__afi_safi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/config/enabled (boolean)

    YANG Description: This leaf indicates whether the AFI-SAFI is
enabled for the neighbor or group
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: This leaf indicates whether the AFI-SAFI is
enabled for the neighbor or group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  afi_safi_name = __builtin__.property(_get_afi_safi_name, _set_afi_safi_name)
  enabled = __builtin__.property(_get_enabled, _set_enabled)


  _pyangbind_elements = OrderedDict([('afi_safi_name', afi_safi_name), ('enabled', enabled), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi_safi_name','__enabled',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi_safi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'state']

  def _get_afi_safi_name(self):
    """
    Getter method for afi_safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/state/afi_safi_name (identityref)

    YANG Description: AFI,SAFI
    """
    return self.__afi_safi_name
      
  def _set_afi_safi_name(self, v, load=False):
    """
    Setter method for afi_safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/state/afi_safi_name (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_safi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_safi_name() directly.

    YANG Description: AFI,SAFI
    """
    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_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_safi_name must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__afi_safi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_safi_name(self):
    self.__afi_safi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/state/enabled (boolean)

    YANG Description: This leaf indicates whether the AFI-SAFI is
enabled for the neighbor or group
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: This leaf indicates whether the AFI-SAFI is
enabled for the neighbor or group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  afi_safi_name = __builtin__.property(_get_afi_safi_name)
  enabled = __builtin__.property(_get_enabled)


  _pyangbind_elements = OrderedDict([('afi_safi_name', afi_safi_name), ('enabled', enabled), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_graceful_restart_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/graceful-restart/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration options for BGP graceful-restart
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'graceful-restart', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/graceful_restart/config/enabled (boolean)

    YANG Description: This leaf indicates whether graceful-restart is enabled for
this AFI-SAFI
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/graceful_restart/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: This leaf indicates whether graceful-restart is enabled for
this AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_graceful_restart_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/graceful-restart/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information for BGP graceful-restart
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'graceful-restart', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/graceful_restart/state/enabled (boolean)

    YANG Description: This leaf indicates whether graceful-restart is enabled for
this AFI-SAFI
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/graceful_restart/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: This leaf indicates whether graceful-restart is enabled for
this AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  enabled = __builtin__.property(_get_enabled)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ])


class yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_graceful_restart(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/graceful-restart. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Parameters relating to BGP graceful-restart
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'graceful-restart'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'graceful-restart']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/graceful_restart/config (container)

    YANG Description: Configuration options for BGP graceful-restart
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/graceful_restart/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 options for BGP graceful-restart
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/graceful_restart/state (container)

    YANG Description: State information for BGP graceful-restart
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/graceful_restart/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 BGP graceful-restart
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_add_paths_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/add-paths/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to ADD_PATHS
  """
  __slots__ = ('_path_helper', '_extmethods', '__receive','__send','__send_max','__eligible_prefix_policy',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__receive = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="receive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__send = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__send_max = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="send-max", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    self.__eligible_prefix_policy = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="eligible-prefix-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'add-paths', 'config']

  def _get_receive(self):
    """
    Getter method for receive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/add_paths/config/receive (boolean)

    YANG Description: Enable capability negotiation to receive multiple path
advertisements for an NLRI from the neighbor or group
    """
    return self.__receive
      
  def _set_receive(self, v, load=False):
    """
    Setter method for receive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/add_paths/config/receive (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_receive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_receive() directly.

    YANG Description: Enable capability negotiation to receive multiple path
advertisements for an NLRI from the neighbor or group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="receive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """receive must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="receive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__receive = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_receive(self):
    self.__receive = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="receive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_send(self):
    """
    Getter method for send, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/add_paths/config/send (boolean)

    YANG Description: Enable capability negotiation to send multiple path
advertisements for an NLRI from the neighbor or group
    """
    return self.__send
      
  def _set_send(self, v, load=False):
    """
    Setter method for send, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/add_paths/config/send (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_send is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_send() directly.

    YANG Description: Enable capability negotiation to send multiple path
advertisements for an NLRI from the neighbor or group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """send must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__send = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_send(self):
    self.__send = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_send_max(self):
    """
    Getter method for send_max, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/add_paths/config/send_max (uint8)

    YANG Description: The maximum total number of paths to advertise to neighbors
for a single NLRI.  This includes the single best path as
well as additional paths advertised when add-paths is
enabled.
    """
    return self.__send_max
      
  def _set_send_max(self, v, load=False):
    """
    Setter method for send_max, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/add_paths/config/send_max (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_send_max is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_send_max() directly.

    YANG Description: The maximum total number of paths to advertise to neighbors
for a single NLRI.  This includes the single best path as
well as additional paths advertised when add-paths is
enabled.
    """
    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="send-max", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """send_max 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="send-max", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
        })

    self.__send_max = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_send_max(self):
    self.__send_max = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="send-max", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)


  def _get_eligible_prefix_policy(self):
    """
    Getter method for eligible_prefix_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/add_paths/config/eligible_prefix_policy (leafref)

    YANG Description: A reference to a routing policy which can be used to
restrict the prefixes for which add-paths is enabled
    """
    return self.__eligible_prefix_policy
      
  def _set_eligible_prefix_policy(self, v, load=False):
    """
    Setter method for eligible_prefix_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/add_paths/config/eligible_prefix_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_eligible_prefix_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_eligible_prefix_policy() directly.

    YANG Description: A reference to a routing policy which can be used to
restrict the prefixes for which add-paths is enabled
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="eligible-prefix-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """eligible_prefix_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="eligible-prefix-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__eligible_prefix_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_eligible_prefix_policy(self):
    self.__eligible_prefix_policy = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="eligible-prefix-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)

  receive = __builtin__.property(_get_receive, _set_receive)
  send = __builtin__.property(_get_send, _set_send)
  send_max = __builtin__.property(_get_send_max, _set_send_max)
  eligible_prefix_policy = __builtin__.property(_get_eligible_prefix_policy, _set_eligible_prefix_policy)


  _pyangbind_elements = OrderedDict([('receive', receive), ('send', send), ('send_max', send_max), ('eligible_prefix_policy', eligible_prefix_policy), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_add_paths_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/add-paths/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information associated with ADD_PATHS
  """
  __slots__ = ('_path_helper', '_extmethods', '__receive','__send','__send_max','__eligible_prefix_policy',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__receive = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="receive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__send = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__send_max = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="send-max", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__eligible_prefix_policy = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="eligible-prefix-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'add-paths', 'state']

  def _get_receive(self):
    """
    Getter method for receive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/add_paths/state/receive (boolean)

    YANG Description: Enable capability negotiation to receive multiple path
advertisements for an NLRI from the neighbor or group
    """
    return self.__receive
      
  def _set_receive(self, v, load=False):
    """
    Setter method for receive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/add_paths/state/receive (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_receive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_receive() directly.

    YANG Description: Enable capability negotiation to receive multiple path
advertisements for an NLRI from the neighbor or group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="receive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """receive must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="receive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__receive = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_receive(self):
    self.__receive = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="receive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_send(self):
    """
    Getter method for send, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/add_paths/state/send (boolean)

    YANG Description: Enable capability negotiation to send multiple path
advertisements for an NLRI from the neighbor or group
    """
    return self.__send
      
  def _set_send(self, v, load=False):
    """
    Setter method for send, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/add_paths/state/send (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_send is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_send() directly.

    YANG Description: Enable capability negotiation to send multiple path
advertisements for an NLRI from the neighbor or group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """send must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__send = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_send(self):
    self.__send = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_send_max(self):
    """
    Getter method for send_max, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/add_paths/state/send_max (uint8)

    YANG Description: The maximum total number of paths to advertise to neighbors
for a single NLRI.  This includes the single best path as
well as additional paths advertised when add-paths is
enabled.
    """
    return self.__send_max
      
  def _set_send_max(self, v, load=False):
    """
    Setter method for send_max, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/add_paths/state/send_max (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_send_max is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_send_max() directly.

    YANG Description: The maximum total number of paths to advertise to neighbors
for a single NLRI.  This includes the single best path as
well as additional paths advertised when add-paths is
enabled.
    """
    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="send-max", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """send_max 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="send-max", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__send_max = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_send_max(self):
    self.__send_max = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="send-max", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_eligible_prefix_policy(self):
    """
    Getter method for eligible_prefix_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/add_paths/state/eligible_prefix_policy (leafref)

    YANG Description: A reference to a routing policy which can be used to
restrict the prefixes for which add-paths is enabled
    """
    return self.__eligible_prefix_policy
      
  def _set_eligible_prefix_policy(self, v, load=False):
    """
    Setter method for eligible_prefix_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/add_paths/state/eligible_prefix_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_eligible_prefix_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_eligible_prefix_policy() directly.

    YANG Description: A reference to a routing policy which can be used to
restrict the prefixes for which add-paths is enabled
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="eligible-prefix-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """eligible_prefix_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="eligible-prefix-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__eligible_prefix_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_eligible_prefix_policy(self):
    self.__eligible_prefix_policy = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="eligible-prefix-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)

  receive = __builtin__.property(_get_receive)
  send = __builtin__.property(_get_send)
  send_max = __builtin__.property(_get_send_max)
  eligible_prefix_policy = __builtin__.property(_get_eligible_prefix_policy)


  _pyangbind_elements = OrderedDict([('receive', receive), ('send', send), ('send_max', send_max), ('eligible_prefix_policy', eligible_prefix_policy), ])


class yc_add_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_add_paths(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/add-paths. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Parameters relating to the advertisement and receipt of
multiple paths for a single NLRI (add-paths)
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'add-paths'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_add_paths_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_add_paths_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'add-paths']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/add_paths/config (container)

    YANG Description: Configuration parameters relating to ADD_PATHS
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/add_paths/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 ADD_PATHS
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_add_paths_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_add_paths_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_add_paths_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/add_paths/state (container)

    YANG Description: State information associated with ADD_PATHS
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/add_paths/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 associated with ADD_PATHS
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_add_paths_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_add_paths_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_add_paths_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/use-multiple-paths/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to multipath
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'use-multiple-paths', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/use_multiple_paths/config/enabled (boolean)

    YANG Description: Whether the use of multiple paths for the same NLRI is
enabled for the neighbor. This value is overridden by
any more specific configuration value.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/use_multiple_paths/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: Whether the use of multiple paths for the same NLRI is
enabled for the neighbor. This value is overridden by
any more specific configuration value.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/use-multiple-paths/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to multipath
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'use-multiple-paths', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/use_multiple_paths/state/enabled (boolean)

    YANG Description: Whether the use of multiple paths for the same NLRI is
enabled for the neighbor. This value is overridden by
any more specific configuration value.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/use_multiple_paths/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: Whether the use of multiple paths for the same NLRI is
enabled for the neighbor. This value is overridden by
any more specific configuration value.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  enabled = __builtin__.property(_get_enabled)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths_ebgp_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/use-multiple-paths/ebgp/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to eBGP multipath
  """
  __slots__ = ('_path_helper', '_extmethods', '__allow_multiple_as','__maximum_paths',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__allow_multiple_as = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__maximum_paths = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'use-multiple-paths', 'ebgp', 'config']

  def _get_allow_multiple_as(self):
    """
    Getter method for allow_multiple_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/use_multiple_paths/ebgp/config/allow_multiple_as (boolean)

    YANG Description: Allow multipath to use paths from different neighbouring
ASes.  The default is to only consider multiple paths from
the same neighbouring AS.
    """
    return self.__allow_multiple_as
      
  def _set_allow_multiple_as(self, v, load=False):
    """
    Setter method for allow_multiple_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/use_multiple_paths/ebgp/config/allow_multiple_as (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_allow_multiple_as is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_allow_multiple_as() directly.

    YANG Description: Allow multipath to use paths from different neighbouring
ASes.  The default is to only consider multiple paths from
the same neighbouring AS.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """allow_multiple_as must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__allow_multiple_as = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_allow_multiple_as(self):
    self.__allow_multiple_as = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_maximum_paths(self):
    """
    Getter method for maximum_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/use_multiple_paths/ebgp/config/maximum_paths (uint32)

    YANG Description: Maximum number of parallel paths to consider when using
BGP multipath. The default is use a single path.
    """
    return self.__maximum_paths
      
  def _set_maximum_paths(self, v, load=False):
    """
    Setter method for maximum_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/use_multiple_paths/ebgp/config/maximum_paths (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_maximum_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_maximum_paths() directly.

    YANG Description: Maximum number of parallel paths to consider when using
BGP multipath. The default is use a single path.
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """maximum_paths 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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__maximum_paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_maximum_paths(self):
    self.__maximum_paths = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)

  allow_multiple_as = __builtin__.property(_get_allow_multiple_as, _set_allow_multiple_as)
  maximum_paths = __builtin__.property(_get_maximum_paths, _set_maximum_paths)


  _pyangbind_elements = OrderedDict([('allow_multiple_as', allow_multiple_as), ('maximum_paths', maximum_paths), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths_ebgp_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/use-multiple-paths/ebgp/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to eBGP multipath
  """
  __slots__ = ('_path_helper', '_extmethods', '__allow_multiple_as','__maximum_paths',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__allow_multiple_as = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__maximum_paths = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'use-multiple-paths', 'ebgp', 'state']

  def _get_allow_multiple_as(self):
    """
    Getter method for allow_multiple_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/use_multiple_paths/ebgp/state/allow_multiple_as (boolean)

    YANG Description: Allow multipath to use paths from different neighbouring
ASes.  The default is to only consider multiple paths from
the same neighbouring AS.
    """
    return self.__allow_multiple_as
      
  def _set_allow_multiple_as(self, v, load=False):
    """
    Setter method for allow_multiple_as, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/use_multiple_paths/ebgp/state/allow_multiple_as (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_allow_multiple_as is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_allow_multiple_as() directly.

    YANG Description: Allow multipath to use paths from different neighbouring
ASes.  The default is to only consider multiple paths from
the same neighbouring AS.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """allow_multiple_as must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__allow_multiple_as = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_allow_multiple_as(self):
    self.__allow_multiple_as = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="allow-multiple-as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_maximum_paths(self):
    """
    Getter method for maximum_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/use_multiple_paths/ebgp/state/maximum_paths (uint32)

    YANG Description: Maximum number of parallel paths to consider when using
BGP multipath. The default is use a single path.
    """
    return self.__maximum_paths
      
  def _set_maximum_paths(self, v, load=False):
    """
    Setter method for maximum_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/use_multiple_paths/ebgp/state/maximum_paths (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_maximum_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_maximum_paths() directly.

    YANG Description: Maximum number of parallel paths to consider when using
BGP multipath. The default is use a single path.
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """maximum_paths 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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__maximum_paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_maximum_paths(self):
    self.__maximum_paths = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  allow_multiple_as = __builtin__.property(_get_allow_multiple_as)
  maximum_paths = __builtin__.property(_get_maximum_paths)


  _pyangbind_elements = OrderedDict([('allow_multiple_as', allow_multiple_as), ('maximum_paths', maximum_paths), ])


class yc_ebgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths_ebgp(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/use-multiple-paths/ebgp. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Multipath parameters for eBGP
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'ebgp'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths_ebgp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths_ebgp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'use-multiple-paths', 'ebgp']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/use_multiple_paths/ebgp/config (container)

    YANG Description: Configuration parameters relating to eBGP multipath
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/use_multiple_paths/ebgp/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 eBGP multipath
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths_ebgp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths_ebgp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths_ebgp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/use_multiple_paths/ebgp/state (container)

    YANG Description: State information relating to eBGP multipath
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/use_multiple_paths/ebgp/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 relating to eBGP multipath
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths_ebgp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths_ebgp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths_ebgp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths_ibgp_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/use-multiple-paths/ibgp/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to iBGP multipath
  """
  __slots__ = ('_path_helper', '_extmethods', '__maximum_paths',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__maximum_paths = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'use-multiple-paths', 'ibgp', 'config']

  def _get_maximum_paths(self):
    """
    Getter method for maximum_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/use_multiple_paths/ibgp/config/maximum_paths (uint32)

    YANG Description: Maximum number of parallel paths to consider when using
iBGP multipath. The default is to use a single path
    """
    return self.__maximum_paths
      
  def _set_maximum_paths(self, v, load=False):
    """
    Setter method for maximum_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/use_multiple_paths/ibgp/config/maximum_paths (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_maximum_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_maximum_paths() directly.

    YANG Description: Maximum number of parallel paths to consider when using
iBGP multipath. The default is to use a single path
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """maximum_paths 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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__maximum_paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_maximum_paths(self):
    self.__maximum_paths = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)

  maximum_paths = __builtin__.property(_get_maximum_paths, _set_maximum_paths)


  _pyangbind_elements = OrderedDict([('maximum_paths', maximum_paths), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths_ibgp_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/use-multiple-paths/ibgp/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to iBGP multipath
  """
  __slots__ = ('_path_helper', '_extmethods', '__maximum_paths',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__maximum_paths = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'use-multiple-paths', 'ibgp', 'state']

  def _get_maximum_paths(self):
    """
    Getter method for maximum_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/use_multiple_paths/ibgp/state/maximum_paths (uint32)

    YANG Description: Maximum number of parallel paths to consider when using
iBGP multipath. The default is to use a single path
    """
    return self.__maximum_paths
      
  def _set_maximum_paths(self, v, load=False):
    """
    Setter method for maximum_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/use_multiple_paths/ibgp/state/maximum_paths (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_maximum_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_maximum_paths() directly.

    YANG Description: Maximum number of parallel paths to consider when using
iBGP multipath. The default is to use a single path
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """maximum_paths 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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__maximum_paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_maximum_paths(self):
    self.__maximum_paths = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(1), is_leaf=True, yang_name="maximum-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  maximum_paths = __builtin__.property(_get_maximum_paths)


  _pyangbind_elements = OrderedDict([('maximum_paths', maximum_paths), ])


class yc_ibgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths_ibgp(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/use-multiple-paths/ibgp. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Multipath parameters for iBGP
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'ibgp'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths_ibgp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths_ibgp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'use-multiple-paths', 'ibgp']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/use_multiple_paths/ibgp/config (container)

    YANG Description: Configuration parameters relating to iBGP multipath
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/use_multiple_paths/ibgp/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 iBGP multipath
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths_ibgp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths_ibgp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths_ibgp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/use_multiple_paths/ibgp/state (container)

    YANG Description: State information relating to iBGP multipath
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/use_multiple_paths/ibgp/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 relating to iBGP multipath
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths_ibgp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths_ibgp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths_ibgp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_use_multiple_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/use-multiple-paths. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Parameters related to the use of multiple paths for the
same NLRI
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__ebgp','__ibgp',)

  _yang_name = 'use-multiple-paths'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__ebgp = YANGDynClass(base=yc_ebgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths_ebgp, is_container='container', yang_name="ebgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__ibgp = YANGDynClass(base=yc_ibgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths_ibgp, is_container='container', yang_name="ibgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'use-multiple-paths']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/use_multiple_paths/config (container)

    YANG Description: Configuration parameters relating to multipath
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/use_multiple_paths/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 multipath
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/use_multiple_paths/state (container)

    YANG Description: State parameters relating to multipath
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/use_multiple_paths/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 parameters relating to multipath
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_ebgp(self):
    """
    Getter method for ebgp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/use_multiple_paths/ebgp (container)

    YANG Description: Multipath parameters for eBGP
    """
    return self.__ebgp
      
  def _set_ebgp(self, v, load=False):
    """
    Setter method for ebgp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/use_multiple_paths/ebgp (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ebgp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ebgp() directly.

    YANG Description: Multipath parameters for eBGP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ebgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths_ebgp, is_container='container', yang_name="ebgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ebgp must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ebgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths_ebgp, is_container='container', yang_name="ebgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__ebgp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ebgp(self):
    self.__ebgp = YANGDynClass(base=yc_ebgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths_ebgp, is_container='container', yang_name="ebgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_ibgp(self):
    """
    Getter method for ibgp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/use_multiple_paths/ibgp (container)

    YANG Description: Multipath parameters for iBGP
    """
    return self.__ibgp
      
  def _set_ibgp(self, v, load=False):
    """
    Setter method for ibgp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/use_multiple_paths/ibgp (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ibgp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ibgp() directly.

    YANG Description: Multipath parameters for iBGP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ibgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths_ibgp, is_container='container', yang_name="ibgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ibgp must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ibgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths_ibgp, is_container='container', yang_name="ibgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__ibgp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ibgp(self):
    self.__ibgp = YANGDynClass(base=yc_ibgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths_ibgp, is_container='container', yang_name="ibgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  ebgp = __builtin__.property(_get_ebgp, _set_ebgp)
  ibgp = __builtin__.property(_get_ibgp, _set_ibgp)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('ebgp', ebgp), ('ibgp', ibgp), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_apply_policy_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/apply-policy/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Policy configuration data.
  """
  __slots__ = ('_path_helper', '_extmethods', '__import_policy','__default_import_policy','__export_policy','__default_export_policy',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)
    self.__export_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__default_export_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'apply-policy', 'config']

  def _get_import_policy(self):
    """
    Getter method for import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/apply_policy/config/import_policy (leafref)

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    return self.__import_policy
      
  def _set_import_policy(self, v, load=False):
    """
    Setter method for import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/apply_policy/config/import_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_import_policy() directly.

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """import_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__import_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_import_policy(self):
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_default_import_policy(self):
    """
    Getter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/apply_policy/config/default_import_policy (default-policy-type)

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    return self.__default_import_policy
      
  def _set_default_import_policy(self, v, load=False):
    """
    Setter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/apply_policy/config/default_import_policy (default-policy-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_default_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_default_import_policy() directly.

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    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={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """default_import_policy must be of a type compatible with default-policy-type""",
          'defined-type': "openconfig-network-instance:default-policy-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)""",
        })

    self.__default_import_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_default_import_policy(self):
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)


  def _get_export_policy(self):
    """
    Getter method for export_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/apply_policy/config/export_policy (leafref)

    YANG Description: list of policy names in sequence to be applied on
sending a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    return self.__export_policy
      
  def _set_export_policy(self, v, load=False):
    """
    Setter method for export_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/apply_policy/config/export_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_export_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_export_policy() directly.

    YANG Description: list of policy names in sequence to be applied on
sending a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """export_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__export_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_export_policy(self):
    self.__export_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_default_export_policy(self):
    """
    Getter method for default_export_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/apply_policy/config/default_export_policy (default-policy-type)

    YANG Description: explicitly set a default policy if no policy definition
in the export policy chain is satisfied.
    """
    return self.__default_export_policy
      
  def _set_default_export_policy(self, v, load=False):
    """
    Setter method for default_export_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/apply_policy/config/default_export_policy (default-policy-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_default_export_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_default_export_policy() directly.

    YANG Description: explicitly set a default policy if no policy definition
in the export policy chain is satisfied.
    """
    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={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """default_export_policy must be of a type compatible with default-policy-type""",
          'defined-type': "openconfig-network-instance:default-policy-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)""",
        })

    self.__default_export_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_default_export_policy(self):
    self.__default_export_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)

  import_policy = __builtin__.property(_get_import_policy, _set_import_policy)
  default_import_policy = __builtin__.property(_get_default_import_policy, _set_default_import_policy)
  export_policy = __builtin__.property(_get_export_policy, _set_export_policy)
  default_export_policy = __builtin__.property(_get_default_export_policy, _set_default_export_policy)


  _pyangbind_elements = OrderedDict([('import_policy', import_policy), ('default_import_policy', default_import_policy), ('export_policy', export_policy), ('default_export_policy', default_export_policy), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_apply_policy_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/apply-policy/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for routing policy
  """
  __slots__ = ('_path_helper', '_extmethods', '__import_policy','__default_import_policy','__export_policy','__default_export_policy',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)
    self.__export_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__default_export_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'apply-policy', 'state']

  def _get_import_policy(self):
    """
    Getter method for import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/apply_policy/state/import_policy (leafref)

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    return self.__import_policy
      
  def _set_import_policy(self, v, load=False):
    """
    Setter method for import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/apply_policy/state/import_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_import_policy() directly.

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """import_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__import_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_import_policy(self):
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_default_import_policy(self):
    """
    Getter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/apply_policy/state/default_import_policy (default-policy-type)

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    return self.__default_import_policy
      
  def _set_default_import_policy(self, v, load=False):
    """
    Setter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/apply_policy/state/default_import_policy (default-policy-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_default_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_default_import_policy() directly.

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    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={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """default_import_policy must be of a type compatible with default-policy-type""",
          'defined-type': "openconfig-network-instance:default-policy-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)""",
        })

    self.__default_import_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_default_import_policy(self):
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)


  def _get_export_policy(self):
    """
    Getter method for export_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/apply_policy/state/export_policy (leafref)

    YANG Description: list of policy names in sequence to be applied on
sending a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    return self.__export_policy
      
  def _set_export_policy(self, v, load=False):
    """
    Setter method for export_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/apply_policy/state/export_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_export_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_export_policy() directly.

    YANG Description: list of policy names in sequence to be applied on
sending a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """export_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__export_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_export_policy(self):
    self.__export_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_default_export_policy(self):
    """
    Getter method for default_export_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/apply_policy/state/default_export_policy (default-policy-type)

    YANG Description: explicitly set a default policy if no policy definition
in the export policy chain is satisfied.
    """
    return self.__default_export_policy
      
  def _set_default_export_policy(self, v, load=False):
    """
    Setter method for default_export_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/apply_policy/state/default_export_policy (default-policy-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_default_export_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_default_export_policy() directly.

    YANG Description: explicitly set a default policy if no policy definition
in the export policy chain is satisfied.
    """
    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={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """default_export_policy must be of a type compatible with default-policy-type""",
          'defined-type': "openconfig-network-instance:default-policy-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)""",
        })

    self.__default_export_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_default_export_policy(self):
    self.__default_export_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)

  import_policy = __builtin__.property(_get_import_policy)
  default_import_policy = __builtin__.property(_get_default_import_policy)
  export_policy = __builtin__.property(_get_export_policy)
  default_export_policy = __builtin__.property(_get_default_export_policy)


  _pyangbind_elements = OrderedDict([('import_policy', import_policy), ('default_import_policy', default_import_policy), ('export_policy', export_policy), ('default_export_policy', default_export_policy), ])


class yc_apply_policy_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_apply_policy(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/apply-policy. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Anchor point for routing policies in the model.
Import and export policies are with respect to the local
routing table, i.e., export (send) and import (receive),
depending on the context.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'apply-policy'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_apply_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_apply_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'apply-policy']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/apply_policy/config (container)

    YANG Description: Policy configuration data.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/apply_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: Policy configuration data.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_apply_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_apply_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_apply_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/apply_policy/state (container)

    YANG Description: Operational state for routing policy
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/apply_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 for routing policy
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_apply_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_apply_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_apply_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'prefix-limit', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/prefix_limit/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/prefix_limit/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/prefix_limit/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/prefix_limit/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'prefix-limit', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/prefix_limit/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/prefix_limit/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/prefix_limit/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/prefix_limit/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/prefix_limit/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/prefix_limit/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'prefix-limit']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/prefix_limit/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/prefix_limit/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/prefix_limit/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/prefix_limit/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit-received/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'prefix-limit-received', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit-received/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'prefix-limit-received', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit-received. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
received from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit-received'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'prefix-limit-received']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for IPv4 unicast AFI-SAFI options
  """
  __slots__ = ('_path_helper', '_extmethods', '__send_default_route','__extended_next_hop_encoding',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__send_default_route = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__extended_next_hop_encoding = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="extended-next-hop-encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'config']

  def _get_send_default_route(self):
    """
    Getter method for send_default_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/config/send_default_route (boolean)

    YANG Description: If set to true, send the default-route to the neighbor(s)
    """
    return self.__send_default_route
      
  def _set_send_default_route(self, v, load=False):
    """
    Setter method for send_default_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/config/send_default_route (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_send_default_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_send_default_route() directly.

    YANG Description: If set to true, send the default-route to the neighbor(s)
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """send_default_route must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__send_default_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_send_default_route(self):
    self.__send_default_route = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_extended_next_hop_encoding(self):
    """
    Getter method for extended_next_hop_encoding, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/config/extended_next_hop_encoding (boolean)

    YANG Description: This leaf indicates whether extended next-hop encoding is enabled for
this AFI-SAFI
    """
    return self.__extended_next_hop_encoding
      
  def _set_extended_next_hop_encoding(self, v, load=False):
    """
    Setter method for extended_next_hop_encoding, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/config/extended_next_hop_encoding (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended_next_hop_encoding is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended_next_hop_encoding() directly.

    YANG Description: This leaf indicates whether extended next-hop encoding is enabled for
this AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="extended-next-hop-encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended_next_hop_encoding must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="extended-next-hop-encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__extended_next_hop_encoding = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended_next_hop_encoding(self):
    self.__extended_next_hop_encoding = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="extended-next-hop-encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  send_default_route = __builtin__.property(_get_send_default_route, _set_send_default_route)
  extended_next_hop_encoding = __builtin__.property(_get_extended_next_hop_encoding, _set_extended_next_hop_encoding)


  _pyangbind_elements = OrderedDict([('send_default_route', send_default_route), ('extended_next_hop_encoding', extended_next_hop_encoding), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information for IPv4 parameters
  """
  __slots__ = ('_path_helper', '_extmethods', '__send_default_route','__extended_next_hop_encoding',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__send_default_route = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__extended_next_hop_encoding = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="extended-next-hop-encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'state']

  def _get_send_default_route(self):
    """
    Getter method for send_default_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/state/send_default_route (boolean)

    YANG Description: If set to true, send the default-route to the neighbor(s)
    """
    return self.__send_default_route
      
  def _set_send_default_route(self, v, load=False):
    """
    Setter method for send_default_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/state/send_default_route (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_send_default_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_send_default_route() directly.

    YANG Description: If set to true, send the default-route to the neighbor(s)
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """send_default_route must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__send_default_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_send_default_route(self):
    self.__send_default_route = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_extended_next_hop_encoding(self):
    """
    Getter method for extended_next_hop_encoding, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/state/extended_next_hop_encoding (boolean)

    YANG Description: This leaf indicates whether extended next-hop encoding is enabled for
this AFI-SAFI
    """
    return self.__extended_next_hop_encoding
      
  def _set_extended_next_hop_encoding(self, v, load=False):
    """
    Setter method for extended_next_hop_encoding, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/state/extended_next_hop_encoding (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended_next_hop_encoding is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended_next_hop_encoding() directly.

    YANG Description: This leaf indicates whether extended next-hop encoding is enabled for
this AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="extended-next-hop-encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended_next_hop_encoding must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="extended-next-hop-encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__extended_next_hop_encoding = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended_next_hop_encoding(self):
    self.__extended_next_hop_encoding = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="extended-next-hop-encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  send_default_route = __builtin__.property(_get_send_default_route)
  extended_next_hop_encoding = __builtin__.property(_get_extended_next_hop_encoding)


  _pyangbind_elements = OrderedDict([('send_default_route', send_default_route), ('extended_next_hop_encoding', extended_next_hop_encoding), ])


class yc_ipv4_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: IPv4 unicast configuration options
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_limit','__prefix_limit_received','__config','__state',)

  _yang_name = 'ipv4-unicast'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'ipv4-unicast']

  def _get_prefix_limit(self):
    """
    Getter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/prefix_limit (container)

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    return self.__prefix_limit
      
  def _set_prefix_limit(self, v, load=False):
    """
    Setter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/prefix_limit (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit() directly.

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit(self):
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_prefix_limit_received(self):
    """
    Getter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received (container)

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    return self.__prefix_limit_received
      
  def _set_prefix_limit_received(self, v, load=False):
    """
    Setter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/prefix_limit_received (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_received() directly.

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_received must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit_received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_received(self):
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/config (container)

    YANG Description: Configuration parameters for IPv4 unicast AFI-SAFI options
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/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 IPv4 unicast AFI-SAFI options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/state (container)

    YANG Description: State information for IPv4 parameters
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast/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 parameters
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  prefix_limit = __builtin__.property(_get_prefix_limit, _set_prefix_limit)
  prefix_limit_received = __builtin__.property(_get_prefix_limit_received, _set_prefix_limit_received)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('prefix_limit', prefix_limit), ('prefix_limit_received', prefix_limit_received), ('config', config), ('state', state), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'prefix-limit', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/prefix_limit/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/prefix_limit/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/prefix_limit/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/prefix_limit/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'prefix-limit', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/prefix_limit/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/prefix_limit/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/prefix_limit/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/prefix_limit/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/prefix_limit/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/prefix_limit/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'prefix-limit']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/prefix_limit/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/prefix_limit/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/prefix_limit/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/prefix_limit/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit-received/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'prefix-limit-received', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit-received/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'prefix-limit-received', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit-received. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
received from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit-received'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'prefix-limit-received']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for IPv6 unicast AFI-SAFI options
  """
  __slots__ = ('_path_helper', '_extmethods', '__send_default_route',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__send_default_route = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'config']

  def _get_send_default_route(self):
    """
    Getter method for send_default_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/config/send_default_route (boolean)

    YANG Description: If set to true, send the default-route to the neighbor(s)
    """
    return self.__send_default_route
      
  def _set_send_default_route(self, v, load=False):
    """
    Setter method for send_default_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/config/send_default_route (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_send_default_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_send_default_route() directly.

    YANG Description: If set to true, send the default-route to the neighbor(s)
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """send_default_route must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__send_default_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_send_default_route(self):
    self.__send_default_route = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  send_default_route = __builtin__.property(_get_send_default_route, _set_send_default_route)


  _pyangbind_elements = OrderedDict([('send_default_route', send_default_route), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information for IPv6 unicast parameters
  """
  __slots__ = ('_path_helper', '_extmethods', '__send_default_route',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__send_default_route = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'state']

  def _get_send_default_route(self):
    """
    Getter method for send_default_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/state/send_default_route (boolean)

    YANG Description: If set to true, send the default-route to the neighbor(s)
    """
    return self.__send_default_route
      
  def _set_send_default_route(self, v, load=False):
    """
    Setter method for send_default_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/state/send_default_route (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_send_default_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_send_default_route() directly.

    YANG Description: If set to true, send the default-route to the neighbor(s)
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """send_default_route must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__send_default_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_send_default_route(self):
    self.__send_default_route = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="send-default-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  send_default_route = __builtin__.property(_get_send_default_route)


  _pyangbind_elements = OrderedDict([('send_default_route', send_default_route), ])


class yc_ipv6_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: IPv6 unicast configuration options
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_limit','__prefix_limit_received','__config','__state',)

  _yang_name = 'ipv6-unicast'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'ipv6-unicast']

  def _get_prefix_limit(self):
    """
    Getter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/prefix_limit (container)

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    return self.__prefix_limit
      
  def _set_prefix_limit(self, v, load=False):
    """
    Setter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/prefix_limit (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit() directly.

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit(self):
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_prefix_limit_received(self):
    """
    Getter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received (container)

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    return self.__prefix_limit_received
      
  def _set_prefix_limit_received(self, v, load=False):
    """
    Setter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/prefix_limit_received (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_received() directly.

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_received must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit_received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_received(self):
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/config (container)

    YANG Description: Configuration parameters for IPv6 unicast AFI-SAFI options
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/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 IPv6 unicast AFI-SAFI options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/state (container)

    YANG Description: State information for IPv6 unicast parameters
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast/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 IPv6 unicast parameters
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  prefix_limit = __builtin__.property(_get_prefix_limit, _set_prefix_limit)
  prefix_limit_received = __builtin__.property(_get_prefix_limit_received, _set_prefix_limit_received)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('prefix_limit', prefix_limit), ('prefix_limit_received', prefix_limit_received), ('config', config), ('state', state), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'ipv4-labeled-unicast', 'prefix-limit', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'ipv4-labeled-unicast', 'prefix-limit', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'ipv4-labeled-unicast', 'prefix-limit']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit-received/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'ipv4-labeled-unicast', 'prefix-limit-received', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit-received/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'ipv4-labeled-unicast', 'prefix-limit-received', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit-received. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
received from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit-received'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'ipv4-labeled-unicast', 'prefix-limit-received']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_labeled_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: IPv4 Labeled Unicast configuration options
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_limit','__prefix_limit_received',)

  _yang_name = 'ipv4-labeled-unicast'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'ipv4-labeled-unicast']

  def _get_prefix_limit(self):
    """
    Getter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit (container)

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    return self.__prefix_limit
      
  def _set_prefix_limit(self, v, load=False):
    """
    Setter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit() directly.

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit(self):
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_prefix_limit_received(self):
    """
    Getter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received (container)

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    return self.__prefix_limit_received
      
  def _set_prefix_limit_received(self, v, load=False):
    """
    Setter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast/prefix_limit_received (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_received() directly.

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_received must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit_received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_received(self):
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  prefix_limit = __builtin__.property(_get_prefix_limit, _set_prefix_limit)
  prefix_limit_received = __builtin__.property(_get_prefix_limit_received, _set_prefix_limit_received)


  _pyangbind_elements = OrderedDict([('prefix_limit', prefix_limit), ('prefix_limit_received', prefix_limit_received), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'ipv6-labeled-unicast', 'prefix-limit', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'ipv6-labeled-unicast', 'prefix-limit', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'ipv6-labeled-unicast', 'prefix-limit']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit-received/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'ipv6-labeled-unicast', 'prefix-limit-received', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit-received/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'ipv6-labeled-unicast', 'prefix-limit-received', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit-received. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
received from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit-received'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'ipv6-labeled-unicast', 'prefix-limit-received']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_labeled_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: IPv6 Labeled Unicast configuration options
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_limit','__prefix_limit_received',)

  _yang_name = 'ipv6-labeled-unicast'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'ipv6-labeled-unicast']

  def _get_prefix_limit(self):
    """
    Getter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit (container)

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    return self.__prefix_limit
      
  def _set_prefix_limit(self, v, load=False):
    """
    Setter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit() directly.

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit(self):
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_prefix_limit_received(self):
    """
    Getter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received (container)

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    return self.__prefix_limit_received
      
  def _set_prefix_limit_received(self, v, load=False):
    """
    Setter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast/prefix_limit_received (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_received() directly.

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_received must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit_received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_received(self):
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  prefix_limit = __builtin__.property(_get_prefix_limit, _set_prefix_limit)
  prefix_limit_received = __builtin__.property(_get_prefix_limit_received, _set_prefix_limit_received)


  _pyangbind_elements = OrderedDict([('prefix_limit', prefix_limit), ('prefix_limit_received', prefix_limit_received), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-unicast', 'prefix-limit', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-unicast', 'prefix-limit', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-unicast', 'prefix-limit']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit-received/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-unicast', 'prefix-limit-received', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit-received/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-unicast', 'prefix-limit-received', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit-received. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
received from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit-received'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-unicast', 'prefix-limit-received']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_l3vpn_ipv4_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Unicast IPv4 L3VPN configuration options
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_limit','__prefix_limit_received',)

  _yang_name = 'l3vpn-ipv4-unicast'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-unicast']

  def _get_prefix_limit(self):
    """
    Getter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit (container)

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    return self.__prefix_limit
      
  def _set_prefix_limit(self, v, load=False):
    """
    Setter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit() directly.

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit(self):
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_prefix_limit_received(self):
    """
    Getter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received (container)

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    return self.__prefix_limit_received
      
  def _set_prefix_limit_received(self, v, load=False):
    """
    Setter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast/prefix_limit_received (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_received() directly.

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_received must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit_received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_received(self):
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  prefix_limit = __builtin__.property(_get_prefix_limit, _set_prefix_limit)
  prefix_limit_received = __builtin__.property(_get_prefix_limit_received, _set_prefix_limit_received)


  _pyangbind_elements = OrderedDict([('prefix_limit', prefix_limit), ('prefix_limit_received', prefix_limit_received), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-unicast', 'prefix-limit', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-unicast', 'prefix-limit', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-unicast', 'prefix-limit']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit-received/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-unicast', 'prefix-limit-received', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit-received/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-unicast', 'prefix-limit-received', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit-received. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
received from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit-received'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-unicast', 'prefix-limit-received']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_l3vpn_ipv6_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Unicast IPv6 L3VPN configuration options
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_limit','__prefix_limit_received',)

  _yang_name = 'l3vpn-ipv6-unicast'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-unicast']

  def _get_prefix_limit(self):
    """
    Getter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit (container)

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    return self.__prefix_limit
      
  def _set_prefix_limit(self, v, load=False):
    """
    Setter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit() directly.

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit(self):
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_prefix_limit_received(self):
    """
    Getter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received (container)

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    return self.__prefix_limit_received
      
  def _set_prefix_limit_received(self, v, load=False):
    """
    Setter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast/prefix_limit_received (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_received() directly.

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_received must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit_received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_received(self):
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  prefix_limit = __builtin__.property(_get_prefix_limit, _set_prefix_limit)
  prefix_limit_received = __builtin__.property(_get_prefix_limit_received, _set_prefix_limit_received)


  _pyangbind_elements = OrderedDict([('prefix_limit', prefix_limit), ('prefix_limit_received', prefix_limit_received), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-multicast/prefix-limit/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-multicast', 'prefix-limit', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-multicast/prefix-limit/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-multicast', 'prefix-limit', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-multicast/prefix-limit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-multicast', 'prefix-limit']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-multicast/prefix-limit-received/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-multicast', 'prefix-limit-received', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-multicast/prefix-limit-received/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-multicast', 'prefix-limit-received', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-multicast/prefix-limit-received. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
received from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit-received'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-multicast', 'prefix-limit-received']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_l3vpn_ipv4_multicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_multicast(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-multicast. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Multicast IPv4 L3VPN configuration options
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_limit','__prefix_limit_received',)

  _yang_name = 'l3vpn-ipv4-multicast'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l3vpn-ipv4-multicast']

  def _get_prefix_limit(self):
    """
    Getter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit (container)

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    return self.__prefix_limit
      
  def _set_prefix_limit(self, v, load=False):
    """
    Setter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit() directly.

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit(self):
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_prefix_limit_received(self):
    """
    Getter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received (container)

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    return self.__prefix_limit_received
      
  def _set_prefix_limit_received(self, v, load=False):
    """
    Setter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast/prefix_limit_received (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_received() directly.

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_received must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit_received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_received(self):
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_multicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  prefix_limit = __builtin__.property(_get_prefix_limit, _set_prefix_limit)
  prefix_limit_received = __builtin__.property(_get_prefix_limit_received, _set_prefix_limit_received)


  _pyangbind_elements = OrderedDict([('prefix_limit', prefix_limit), ('prefix_limit_received', prefix_limit_received), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-multicast/prefix-limit/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-multicast', 'prefix-limit', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-multicast/prefix-limit/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-multicast', 'prefix-limit', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-multicast/prefix-limit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-multicast', 'prefix-limit']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-multicast/prefix-limit-received/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-multicast', 'prefix-limit-received', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-multicast/prefix-limit-received/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-multicast', 'prefix-limit-received', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-multicast/prefix-limit-received. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
received from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit-received'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-multicast', 'prefix-limit-received']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_l3vpn_ipv6_multicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_multicast(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-multicast. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Multicast IPv6 L3VPN configuration options
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_limit','__prefix_limit_received',)

  _yang_name = 'l3vpn-ipv6-multicast'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l3vpn-ipv6-multicast']

  def _get_prefix_limit(self):
    """
    Getter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit (container)

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    return self.__prefix_limit
      
  def _set_prefix_limit(self, v, load=False):
    """
    Setter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit() directly.

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit(self):
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_prefix_limit_received(self):
    """
    Getter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received (container)

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    return self.__prefix_limit_received
      
  def _set_prefix_limit_received(self, v, load=False):
    """
    Setter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast/prefix_limit_received (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_received() directly.

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_received must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit_received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_received(self):
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_multicast_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  prefix_limit = __builtin__.property(_get_prefix_limit, _set_prefix_limit)
  prefix_limit_received = __builtin__.property(_get_prefix_limit_received, _set_prefix_limit_received)


  _pyangbind_elements = OrderedDict([('prefix_limit', prefix_limit), ('prefix_limit_received', prefix_limit_received), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-vpls/prefix-limit/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l2vpn-vpls', 'prefix-limit', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-vpls/prefix-limit/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l2vpn-vpls', 'prefix-limit', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_vpls_prefix_limit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-vpls/prefix-limit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l2vpn-vpls', 'prefix-limit']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls/prefix_limit/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-vpls/prefix-limit-received/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l2vpn-vpls', 'prefix-limit-received', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-vpls/prefix-limit-received/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l2vpn-vpls', 'prefix-limit-received', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-vpls/prefix-limit-received. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
received from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit-received'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l2vpn-vpls', 'prefix-limit-received']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_l2vpn_vpls_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_vpls(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-vpls. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: BGP-signalled VPLS configuration options
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_limit','__prefix_limit_received',)

  _yang_name = 'l2vpn-vpls'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_vpls_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l2vpn-vpls']

  def _get_prefix_limit(self):
    """
    Getter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls/prefix_limit (container)

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    return self.__prefix_limit
      
  def _set_prefix_limit(self, v, load=False):
    """
    Setter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls/prefix_limit (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit() directly.

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_vpls_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_vpls_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit(self):
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_vpls_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_prefix_limit_received(self):
    """
    Getter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received (container)

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    return self.__prefix_limit_received
      
  def _set_prefix_limit_received(self, v, load=False):
    """
    Setter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls/prefix_limit_received (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_received() directly.

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_received must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit_received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_received(self):
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_vpls_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  prefix_limit = __builtin__.property(_get_prefix_limit, _set_prefix_limit)
  prefix_limit_received = __builtin__.property(_get_prefix_limit_received, _set_prefix_limit_received)


  _pyangbind_elements = OrderedDict([('prefix_limit', prefix_limit), ('prefix_limit_received', prefix_limit_received), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/prefix-limit/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'prefix-limit', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/prefix-limit/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'prefix-limit', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_prefix_limit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/prefix-limit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'prefix-limit']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn/prefix_limit/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/prefix-limit-received/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'prefix-limit-received', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/prefix-limit-received/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'prefix-limit-received', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/prefix-limit-received. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
received from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit-received'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'prefix-limit-received']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_l2vpn_evpn_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: BGP EVPN configuration options
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_limit','__prefix_limit_received',)

  _yang_name = 'l2vpn-evpn'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'l2vpn-evpn']

  def _get_prefix_limit(self):
    """
    Getter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn/prefix_limit (container)

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    return self.__prefix_limit
      
  def _set_prefix_limit(self, v, load=False):
    """
    Setter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn/prefix_limit (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit() directly.

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit(self):
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_prefix_limit_received(self):
    """
    Getter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received (container)

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    return self.__prefix_limit_received
      
  def _set_prefix_limit_received(self, v, load=False):
    """
    Setter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn/prefix_limit_received (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_received() directly.

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_received must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit_received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_received(self):
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  prefix_limit = __builtin__.property(_get_prefix_limit, _set_prefix_limit)
  prefix_limit_received = __builtin__.property(_get_prefix_limit_received, _set_prefix_limit_received)


  _pyangbind_elements = OrderedDict([('prefix_limit', prefix_limit), ('prefix_limit_received', prefix_limit_received), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/srte-policy-ipv4/prefix-limit/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'srte-policy-ipv4', 'prefix-limit', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/srte-policy-ipv4/prefix-limit/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'srte-policy-ipv4', 'prefix-limit', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/srte-policy-ipv4/prefix-limit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'srte-policy-ipv4', 'prefix-limit']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/srte-policy-ipv4/prefix-limit-received/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'srte-policy-ipv4', 'prefix-limit-received', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/srte-policy-ipv4/prefix-limit-received/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'srte-policy-ipv4', 'prefix-limit-received', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/srte-policy-ipv4/prefix-limit-received. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
received from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit-received'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'srte-policy-ipv4', 'prefix-limit-received']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_srte_policy_ipv4_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv4(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/srte-policy-ipv4. 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
the SR-TE Policy SAFI for IPv4 Unicast.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_limit','__prefix_limit_received',)

  _yang_name = 'srte-policy-ipv4'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'srte-policy-ipv4']

  def _get_prefix_limit(self):
    """
    Getter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit (container)

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    return self.__prefix_limit
      
  def _set_prefix_limit(self, v, load=False):
    """
    Setter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit() directly.

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit(self):
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_prefix_limit_received(self):
    """
    Getter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received (container)

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    return self.__prefix_limit_received
      
  def _set_prefix_limit_received(self, v, load=False):
    """
    Setter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4/prefix_limit_received (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_received() directly.

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_received must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit_received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_received(self):
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv4_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  prefix_limit = __builtin__.property(_get_prefix_limit, _set_prefix_limit)
  prefix_limit_received = __builtin__.property(_get_prefix_limit_received, _set_prefix_limit_received)


  _pyangbind_elements = OrderedDict([('prefix_limit', prefix_limit), ('prefix_limit_received', prefix_limit_received), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/srte-policy-ipv6/prefix-limit/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'srte-policy-ipv6', 'prefix-limit', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/srte-policy-ipv6/prefix-limit/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'srte-policy-ipv6', 'prefix-limit', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/srte-policy-ipv6/prefix-limit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'srte-policy-ipv6', 'prefix-limit']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/srte-policy-ipv6/prefix-limit-received/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 prefix
limit for the AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'srte-policy-ipv6', 'prefix-limit-received', 'config']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/config/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/config/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/config/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/config/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/config/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  max_prefixes = __builtin__.property(_get_max_prefixes, _set_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown, _set_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct, _set_warning_threshold_pct)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/srte-policy-ipv6/prefix-limit-received/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_prefixes','__prevent_teardown','__warning_threshold_pct','__prefix_limit_exceeded',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'srte-policy-ipv6', 'prefix-limit-received', 'state']

  def _get_max_prefixes(self):
    """
    Getter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/state/max_prefixes (uint32)

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    return self.__max_prefixes
      
  def _set_max_prefixes(self, v, load=False):
    """
    Setter method for max_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/state/max_prefixes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_prefixes() directly.

    YANG Description: Maximum number of prefixes that will be accepted
from the neighbor
    """
    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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_prefixes 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-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_prefixes(self):
    self.__max_prefixes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_prevent_teardown(self):
    """
    Getter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/state/prevent_teardown (boolean)

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    return self.__prevent_teardown
      
  def _set_prevent_teardown(self, v, load=False):
    """
    Setter method for prevent_teardown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/state/prevent_teardown (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prevent_teardown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prevent_teardown() directly.

    YANG Description: Do not tear down the BGP session when the maximum
prefix limit is exceeded, but rather only log a
warning. The default of this leaf is false, such
that when it is not specified, the session is torn
down.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prevent_teardown must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prevent_teardown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prevent_teardown(self):
    self.__prevent_teardown = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="prevent-teardown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_warning_threshold_pct(self):
    """
    Getter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    return self.__warning_threshold_pct
      
  def _set_warning_threshold_pct(self, v, load=False):
    """
    Setter method for warning_threshold_pct, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/state/warning_threshold_pct (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_threshold_pct is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_threshold_pct() directly.

    YANG Description: Threshold on number of prefixes that can be received
from a neighbor before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes
    """
    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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__warning_threshold_pct = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_threshold_pct(self):
    self.__warning_threshold_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="warning-threshold-pct", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_prefix_limit_exceeded(self):
    """
    Getter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/state/prefix_limit_exceeded (boolean)

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    return self.__prefix_limit_exceeded
      
  def _set_prefix_limit_exceeded(self, v, load=False):
    """
    Setter method for prefix_limit_exceeded, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/state/prefix_limit_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_exceeded() directly.

    YANG Description: If set to true, the prefix-limit has been exceeded.  When the
prefix-limit has been exceeded, the value of true must be retained
until the restart-time has expired.  Prior to session re-establishment,
the value must be reset to false
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__prefix_limit_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_exceeded(self):
    self.__prefix_limit_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="prefix-limit-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  max_prefixes = __builtin__.property(_get_max_prefixes)
  prevent_teardown = __builtin__.property(_get_prevent_teardown)
  warning_threshold_pct = __builtin__.property(_get_warning_threshold_pct)
  prefix_limit_exceeded = __builtin__.property(_get_prefix_limit_exceeded)


  _pyangbind_elements = OrderedDict([('max_prefixes', max_prefixes), ('prevent_teardown', prevent_teardown), ('warning_threshold_pct', warning_threshold_pct), ('prefix_limit_exceeded', prefix_limit_exceeded), ])


class yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/srte-policy-ipv6/prefix-limit-received. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configure the maximum number of prefixes that will be
received from a peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'prefix-limit-received'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'srte-policy-ipv6', 'prefix-limit-received']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/config (container)

    YANG Description: Configuration parameters relating to the prefix
limit for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/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 prefix
limit for the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/state (container)

    YANG Description: State information relating to the prefix-limit for the
AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received/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 relating to the prefix-limit for the
AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_srte_policy_ipv6_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv6(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/srte-policy-ipv6. 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
the SR-TE Policy SAFI for IPv6 Unicast.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_limit','__prefix_limit_received',)

  _yang_name = 'srte-policy-ipv6'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi', 'srte-policy-ipv6']

  def _get_prefix_limit(self):
    """
    Getter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit (container)

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    return self.__prefix_limit
      
  def _set_prefix_limit(self, v, load=False):
    """
    Setter method for prefix_limit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit() directly.

    YANG Description: Configure the maximum number of prefixes that will be
accepted from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit(self):
    self.__prefix_limit = YANGDynClass(base=yc_prefix_limit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit, is_container='container', yang_name="prefix-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_prefix_limit_received(self):
    """
    Getter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received (container)

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    return self.__prefix_limit_received
      
  def _set_prefix_limit_received(self, v, load=False):
    """
    Setter method for prefix_limit_received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6/prefix_limit_received (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_limit_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_limit_received() directly.

    YANG Description: Configure the maximum number of prefixes that will be
received from a peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_limit_received must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_limit_received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_limit_received(self):
    self.__prefix_limit_received = YANGDynClass(base=yc_prefix_limit_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv6_prefix_limit_received, is_container='container', yang_name="prefix-limit-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  prefix_limit = __builtin__.property(_get_prefix_limit, _set_prefix_limit)
  prefix_limit_received = __builtin__.property(_get_prefix_limit_received, _set_prefix_limit_received)


  _pyangbind_elements = OrderedDict([('prefix_limit', prefix_limit), ('prefix_limit_received', prefix_limit_received), ])


class yc_afi_safi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: AFI,SAFI configuration available for the
neighbour or group
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi_safi_name','__config','__state','__graceful_restart','__add_paths','__use_multiple_paths','__apply_policy','__ipv4_unicast','__ipv6_unicast','__ipv4_labeled_unicast','__ipv6_labeled_unicast','__l3vpn_ipv4_unicast','__l3vpn_ipv6_unicast','__l3vpn_ipv4_multicast','__l3vpn_ipv6_multicast','__l2vpn_vpls','__l2vpn_evpn','__srte_policy_ipv4','__srte_policy_ipv6',)

  _yang_name = 'afi-safi'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi_safi_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__graceful_restart = YANGDynClass(base=yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__add_paths = YANGDynClass(base=yc_add_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_add_paths, is_container='container', yang_name="add-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__use_multiple_paths = YANGDynClass(base=yc_use_multiple_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths, is_container='container', yang_name="use-multiple-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__apply_policy = YANGDynClass(base=yc_apply_policy_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_apply_policy, is_container='container', yang_name="apply-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__ipv4_unicast = YANGDynClass(base=yc_ipv4_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast, is_container='container', yang_name="ipv4-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__ipv6_unicast = YANGDynClass(base=yc_ipv6_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast, is_container='container', yang_name="ipv6-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__ipv4_labeled_unicast = YANGDynClass(base=yc_ipv4_labeled_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast, is_container='container', yang_name="ipv4-labeled-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__ipv6_labeled_unicast = YANGDynClass(base=yc_ipv6_labeled_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast, is_container='container', yang_name="ipv6-labeled-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__l3vpn_ipv4_unicast = YANGDynClass(base=yc_l3vpn_ipv4_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast, is_container='container', yang_name="l3vpn-ipv4-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__l3vpn_ipv6_unicast = YANGDynClass(base=yc_l3vpn_ipv6_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast, is_container='container', yang_name="l3vpn-ipv6-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__l3vpn_ipv4_multicast = YANGDynClass(base=yc_l3vpn_ipv4_multicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_multicast, is_container='container', yang_name="l3vpn-ipv4-multicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__l3vpn_ipv6_multicast = YANGDynClass(base=yc_l3vpn_ipv6_multicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_multicast, is_container='container', yang_name="l3vpn-ipv6-multicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__l2vpn_vpls = YANGDynClass(base=yc_l2vpn_vpls_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_vpls, is_container='container', yang_name="l2vpn-vpls", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__l2vpn_evpn = YANGDynClass(base=yc_l2vpn_evpn_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn, is_container='container', yang_name="l2vpn-evpn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__srte_policy_ipv4 = YANGDynClass(base=yc_srte_policy_ipv4_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv4, is_container='container', yang_name="srte-policy-ipv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__srte_policy_ipv6 = YANGDynClass(base=yc_srte_policy_ipv6_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv6, is_container='container', yang_name="srte-policy-ipv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis', 'afi-safi']

  def _get_afi_safi_name(self):
    """
    Getter method for afi_safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/afi_safi_name (leafref)

    YANG Description: Reference to the AFI-SAFI name used as a key
for the AFI-SAFI list
    """
    return self.__afi_safi_name
      
  def _set_afi_safi_name(self, v, load=False):
    """
    Setter method for afi_safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/afi_safi_name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_safi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_safi_name() directly.

    YANG Description: Reference to the AFI-SAFI name used as a key
for the AFI-SAFI list
    """
    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="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_safi_name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__afi_safi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_safi_name(self):
    self.__afi_safi_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/config (container)

    YANG Description: Configuration parameters for the AFI-SAFI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/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 AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/state (container)

    YANG Description: State information relating to the AFI-SAFI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/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 relating to the AFI-SAFI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_graceful_restart(self):
    """
    Getter method for graceful_restart, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/graceful_restart (container)

    YANG Description: Parameters relating to BGP graceful-restart
    """
    return self.__graceful_restart
      
  def _set_graceful_restart(self, v, load=False):
    """
    Setter method for graceful_restart, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/graceful_restart (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_graceful_restart is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_graceful_restart() directly.

    YANG Description: Parameters relating to BGP graceful-restart
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """graceful_restart must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__graceful_restart = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_graceful_restart(self):
    self.__graceful_restart = YANGDynClass(base=yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_add_paths(self):
    """
    Getter method for add_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/add_paths (container)

    YANG Description: Parameters relating to the advertisement and receipt of
multiple paths for a single NLRI (add-paths)
    """
    return self.__add_paths
      
  def _set_add_paths(self, v, load=False):
    """
    Setter method for add_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/add_paths (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_add_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_add_paths() directly.

    YANG Description: Parameters relating to the advertisement and receipt of
multiple paths for a single NLRI (add-paths)
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_add_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_add_paths, is_container='container', yang_name="add-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """add_paths must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_add_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_add_paths, is_container='container', yang_name="add-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__add_paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_add_paths(self):
    self.__add_paths = YANGDynClass(base=yc_add_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_add_paths, is_container='container', yang_name="add-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_use_multiple_paths(self):
    """
    Getter method for use_multiple_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/use_multiple_paths (container)

    YANG Description: Parameters related to the use of multiple paths for the
same NLRI
    """
    return self.__use_multiple_paths
      
  def _set_use_multiple_paths(self, v, load=False):
    """
    Setter method for use_multiple_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/use_multiple_paths (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_use_multiple_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_use_multiple_paths() directly.

    YANG Description: Parameters related to the use of multiple paths for the
same NLRI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_use_multiple_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths, is_container='container', yang_name="use-multiple-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """use_multiple_paths must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_use_multiple_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths, is_container='container', yang_name="use-multiple-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__use_multiple_paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_use_multiple_paths(self):
    self.__use_multiple_paths = YANGDynClass(base=yc_use_multiple_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_use_multiple_paths, is_container='container', yang_name="use-multiple-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_apply_policy(self):
    """
    Getter method for apply_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/apply_policy (container)

    YANG Description: Anchor point for routing policies in the model.
Import and export policies are with respect to the local
routing table, i.e., export (send) and import (receive),
depending on the context.
    """
    return self.__apply_policy
      
  def _set_apply_policy(self, v, load=False):
    """
    Setter method for apply_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/apply_policy (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_apply_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_apply_policy() directly.

    YANG Description: Anchor point for routing policies in the model.
Import and export policies are with respect to the local
routing table, i.e., export (send) and import (receive),
depending on the context.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_apply_policy_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_apply_policy, is_container='container', yang_name="apply-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """apply_policy must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_apply_policy_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_apply_policy, is_container='container', yang_name="apply-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__apply_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_apply_policy(self):
    self.__apply_policy = YANGDynClass(base=yc_apply_policy_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_apply_policy, is_container='container', yang_name="apply-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_ipv4_unicast(self):
    """
    Getter method for ipv4_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast (container)

    YANG Description: IPv4 unicast configuration options
    """
    return self.__ipv4_unicast
      
  def _set_ipv4_unicast(self, v, load=False):
    """
    Setter method for ipv4_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_unicast (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv4_unicast is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv4_unicast() directly.

    YANG Description: IPv4 unicast configuration options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv4_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast, is_container='container', yang_name="ipv4-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv4_unicast must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv4_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast, is_container='container', yang_name="ipv4-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__ipv4_unicast = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv4_unicast(self):
    self.__ipv4_unicast = YANGDynClass(base=yc_ipv4_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast, is_container='container', yang_name="ipv4-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_ipv6_unicast(self):
    """
    Getter method for ipv6_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast (container)

    YANG Description: IPv6 unicast configuration options
    """
    return self.__ipv6_unicast
      
  def _set_ipv6_unicast(self, v, load=False):
    """
    Setter method for ipv6_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_unicast (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6_unicast is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6_unicast() directly.

    YANG Description: IPv6 unicast configuration options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv6_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast, is_container='container', yang_name="ipv6-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6_unicast must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv6_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast, is_container='container', yang_name="ipv6-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__ipv6_unicast = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6_unicast(self):
    self.__ipv6_unicast = YANGDynClass(base=yc_ipv6_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast, is_container='container', yang_name="ipv6-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_ipv4_labeled_unicast(self):
    """
    Getter method for ipv4_labeled_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast (container)

    YANG Description: IPv4 Labeled Unicast configuration options
    """
    return self.__ipv4_labeled_unicast
      
  def _set_ipv4_labeled_unicast(self, v, load=False):
    """
    Setter method for ipv4_labeled_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv4_labeled_unicast (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv4_labeled_unicast is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv4_labeled_unicast() directly.

    YANG Description: IPv4 Labeled Unicast configuration options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv4_labeled_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast, is_container='container', yang_name="ipv4-labeled-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv4_labeled_unicast must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv4_labeled_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast, is_container='container', yang_name="ipv4-labeled-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__ipv4_labeled_unicast = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv4_labeled_unicast(self):
    self.__ipv4_labeled_unicast = YANGDynClass(base=yc_ipv4_labeled_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast, is_container='container', yang_name="ipv4-labeled-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_ipv6_labeled_unicast(self):
    """
    Getter method for ipv6_labeled_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast (container)

    YANG Description: IPv6 Labeled Unicast configuration options
    """
    return self.__ipv6_labeled_unicast
      
  def _set_ipv6_labeled_unicast(self, v, load=False):
    """
    Setter method for ipv6_labeled_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/ipv6_labeled_unicast (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6_labeled_unicast is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6_labeled_unicast() directly.

    YANG Description: IPv6 Labeled Unicast configuration options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv6_labeled_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast, is_container='container', yang_name="ipv6-labeled-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6_labeled_unicast must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv6_labeled_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast, is_container='container', yang_name="ipv6-labeled-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__ipv6_labeled_unicast = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6_labeled_unicast(self):
    self.__ipv6_labeled_unicast = YANGDynClass(base=yc_ipv6_labeled_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast, is_container='container', yang_name="ipv6-labeled-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_l3vpn_ipv4_unicast(self):
    """
    Getter method for l3vpn_ipv4_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast (container)

    YANG Description: Unicast IPv4 L3VPN configuration options
    """
    return self.__l3vpn_ipv4_unicast
      
  def _set_l3vpn_ipv4_unicast(self, v, load=False):
    """
    Setter method for l3vpn_ipv4_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_unicast (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_l3vpn_ipv4_unicast is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_l3vpn_ipv4_unicast() directly.

    YANG Description: Unicast IPv4 L3VPN configuration options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_l3vpn_ipv4_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast, is_container='container', yang_name="l3vpn-ipv4-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """l3vpn_ipv4_unicast must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_l3vpn_ipv4_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast, is_container='container', yang_name="l3vpn-ipv4-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__l3vpn_ipv4_unicast = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_l3vpn_ipv4_unicast(self):
    self.__l3vpn_ipv4_unicast = YANGDynClass(base=yc_l3vpn_ipv4_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast, is_container='container', yang_name="l3vpn-ipv4-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_l3vpn_ipv6_unicast(self):
    """
    Getter method for l3vpn_ipv6_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast (container)

    YANG Description: Unicast IPv6 L3VPN configuration options
    """
    return self.__l3vpn_ipv6_unicast
      
  def _set_l3vpn_ipv6_unicast(self, v, load=False):
    """
    Setter method for l3vpn_ipv6_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_unicast (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_l3vpn_ipv6_unicast is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_l3vpn_ipv6_unicast() directly.

    YANG Description: Unicast IPv6 L3VPN configuration options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_l3vpn_ipv6_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast, is_container='container', yang_name="l3vpn-ipv6-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """l3vpn_ipv6_unicast must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_l3vpn_ipv6_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast, is_container='container', yang_name="l3vpn-ipv6-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__l3vpn_ipv6_unicast = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_l3vpn_ipv6_unicast(self):
    self.__l3vpn_ipv6_unicast = YANGDynClass(base=yc_l3vpn_ipv6_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast, is_container='container', yang_name="l3vpn-ipv6-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_l3vpn_ipv4_multicast(self):
    """
    Getter method for l3vpn_ipv4_multicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast (container)

    YANG Description: Multicast IPv4 L3VPN configuration options
    """
    return self.__l3vpn_ipv4_multicast
      
  def _set_l3vpn_ipv4_multicast(self, v, load=False):
    """
    Setter method for l3vpn_ipv4_multicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv4_multicast (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_l3vpn_ipv4_multicast is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_l3vpn_ipv4_multicast() directly.

    YANG Description: Multicast IPv4 L3VPN configuration options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_l3vpn_ipv4_multicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_multicast, is_container='container', yang_name="l3vpn-ipv4-multicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """l3vpn_ipv4_multicast must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_l3vpn_ipv4_multicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_multicast, is_container='container', yang_name="l3vpn-ipv4-multicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__l3vpn_ipv4_multicast = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_l3vpn_ipv4_multicast(self):
    self.__l3vpn_ipv4_multicast = YANGDynClass(base=yc_l3vpn_ipv4_multicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_multicast, is_container='container', yang_name="l3vpn-ipv4-multicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_l3vpn_ipv6_multicast(self):
    """
    Getter method for l3vpn_ipv6_multicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast (container)

    YANG Description: Multicast IPv6 L3VPN configuration options
    """
    return self.__l3vpn_ipv6_multicast
      
  def _set_l3vpn_ipv6_multicast(self, v, load=False):
    """
    Setter method for l3vpn_ipv6_multicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l3vpn_ipv6_multicast (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_l3vpn_ipv6_multicast is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_l3vpn_ipv6_multicast() directly.

    YANG Description: Multicast IPv6 L3VPN configuration options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_l3vpn_ipv6_multicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_multicast, is_container='container', yang_name="l3vpn-ipv6-multicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """l3vpn_ipv6_multicast must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_l3vpn_ipv6_multicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_multicast, is_container='container', yang_name="l3vpn-ipv6-multicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__l3vpn_ipv6_multicast = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_l3vpn_ipv6_multicast(self):
    self.__l3vpn_ipv6_multicast = YANGDynClass(base=yc_l3vpn_ipv6_multicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_multicast, is_container='container', yang_name="l3vpn-ipv6-multicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_l2vpn_vpls(self):
    """
    Getter method for l2vpn_vpls, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls (container)

    YANG Description: BGP-signalled VPLS configuration options
    """
    return self.__l2vpn_vpls
      
  def _set_l2vpn_vpls(self, v, load=False):
    """
    Setter method for l2vpn_vpls, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_vpls (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_l2vpn_vpls is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_l2vpn_vpls() directly.

    YANG Description: BGP-signalled VPLS configuration options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_l2vpn_vpls_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_vpls, is_container='container', yang_name="l2vpn-vpls", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """l2vpn_vpls must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_l2vpn_vpls_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_vpls, is_container='container', yang_name="l2vpn-vpls", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__l2vpn_vpls = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_l2vpn_vpls(self):
    self.__l2vpn_vpls = YANGDynClass(base=yc_l2vpn_vpls_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_vpls, is_container='container', yang_name="l2vpn-vpls", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_l2vpn_evpn(self):
    """
    Getter method for l2vpn_evpn, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn (container)

    YANG Description: BGP EVPN configuration options
    """
    return self.__l2vpn_evpn
      
  def _set_l2vpn_evpn(self, v, load=False):
    """
    Setter method for l2vpn_evpn, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/l2vpn_evpn (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_l2vpn_evpn is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_l2vpn_evpn() directly.

    YANG Description: BGP EVPN configuration options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_l2vpn_evpn_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn, is_container='container', yang_name="l2vpn-evpn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """l2vpn_evpn must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_l2vpn_evpn_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn, is_container='container', yang_name="l2vpn-evpn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__l2vpn_evpn = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_l2vpn_evpn(self):
    self.__l2vpn_evpn = YANGDynClass(base=yc_l2vpn_evpn_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn, is_container='container', yang_name="l2vpn-evpn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_srte_policy_ipv4(self):
    """
    Getter method for srte_policy_ipv4, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4 (container)

    YANG Description: Configuration and operational state parameters relating to
the SR-TE Policy SAFI for IPv4 Unicast.
    """
    return self.__srte_policy_ipv4
      
  def _set_srte_policy_ipv4(self, v, load=False):
    """
    Setter method for srte_policy_ipv4, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv4 (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_srte_policy_ipv4 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_srte_policy_ipv4() directly.

    YANG Description: Configuration and operational state parameters relating to
the SR-TE Policy SAFI for IPv4 Unicast.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_srte_policy_ipv4_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv4, is_container='container', yang_name="srte-policy-ipv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """srte_policy_ipv4 must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_srte_policy_ipv4_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv4, is_container='container', yang_name="srte-policy-ipv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__srte_policy_ipv4 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_srte_policy_ipv4(self):
    self.__srte_policy_ipv4 = YANGDynClass(base=yc_srte_policy_ipv4_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv4, is_container='container', yang_name="srte-policy-ipv4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_srte_policy_ipv6(self):
    """
    Getter method for srte_policy_ipv6, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6 (container)

    YANG Description: Configuration and operational state parameters relating to
the SR-TE Policy SAFI for IPv6 Unicast.
    """
    return self.__srte_policy_ipv6
      
  def _set_srte_policy_ipv6(self, v, load=False):
    """
    Setter method for srte_policy_ipv6, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi/srte_policy_ipv6 (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_srte_policy_ipv6 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_srte_policy_ipv6() directly.

    YANG Description: Configuration and operational state parameters relating to
the SR-TE Policy SAFI for IPv6 Unicast.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_srte_policy_ipv6_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv6, is_container='container', yang_name="srte-policy-ipv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """srte_policy_ipv6 must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_srte_policy_ipv6_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv6, is_container='container', yang_name="srte-policy-ipv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__srte_policy_ipv6 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_srte_policy_ipv6(self):
    self.__srte_policy_ipv6 = YANGDynClass(base=yc_srte_policy_ipv6_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_srte_policy_ipv6, is_container='container', yang_name="srte-policy-ipv6", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  afi_safi_name = __builtin__.property(_get_afi_safi_name, _set_afi_safi_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  graceful_restart = __builtin__.property(_get_graceful_restart, _set_graceful_restart)
  add_paths = __builtin__.property(_get_add_paths, _set_add_paths)
  use_multiple_paths = __builtin__.property(_get_use_multiple_paths, _set_use_multiple_paths)
  apply_policy = __builtin__.property(_get_apply_policy, _set_apply_policy)
  ipv4_unicast = __builtin__.property(_get_ipv4_unicast, _set_ipv4_unicast)
  ipv6_unicast = __builtin__.property(_get_ipv6_unicast, _set_ipv6_unicast)
  ipv4_labeled_unicast = __builtin__.property(_get_ipv4_labeled_unicast, _set_ipv4_labeled_unicast)
  ipv6_labeled_unicast = __builtin__.property(_get_ipv6_labeled_unicast, _set_ipv6_labeled_unicast)
  l3vpn_ipv4_unicast = __builtin__.property(_get_l3vpn_ipv4_unicast, _set_l3vpn_ipv4_unicast)
  l3vpn_ipv6_unicast = __builtin__.property(_get_l3vpn_ipv6_unicast, _set_l3vpn_ipv6_unicast)
  l3vpn_ipv4_multicast = __builtin__.property(_get_l3vpn_ipv4_multicast, _set_l3vpn_ipv4_multicast)
  l3vpn_ipv6_multicast = __builtin__.property(_get_l3vpn_ipv6_multicast, _set_l3vpn_ipv6_multicast)
  l2vpn_vpls = __builtin__.property(_get_l2vpn_vpls, _set_l2vpn_vpls)
  l2vpn_evpn = __builtin__.property(_get_l2vpn_evpn, _set_l2vpn_evpn)
  srte_policy_ipv4 = __builtin__.property(_get_srte_policy_ipv4, _set_srte_policy_ipv4)
  srte_policy_ipv6 = __builtin__.property(_get_srte_policy_ipv6, _set_srte_policy_ipv6)


  _pyangbind_elements = OrderedDict([('afi_safi_name', afi_safi_name), ('config', config), ('state', state), ('graceful_restart', graceful_restart), ('add_paths', add_paths), ('use_multiple_paths', use_multiple_paths), ('apply_policy', apply_policy), ('ipv4_unicast', ipv4_unicast), ('ipv6_unicast', ipv6_unicast), ('ipv4_labeled_unicast', ipv4_labeled_unicast), ('ipv6_labeled_unicast', ipv6_labeled_unicast), ('l3vpn_ipv4_unicast', l3vpn_ipv4_unicast), ('l3vpn_ipv6_unicast', l3vpn_ipv6_unicast), ('l3vpn_ipv4_multicast', l3vpn_ipv4_multicast), ('l3vpn_ipv6_multicast', l3vpn_ipv6_multicast), ('l2vpn_vpls', l2vpn_vpls), ('l2vpn_evpn', l2vpn_evpn), ('srte_policy_ipv4', srte_policy_ipv4), ('srte_policy_ipv6', srte_policy_ipv6), ])


class yc_afi_safis_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Per-address-family configuration parameters associated with
thegroup
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi_safi',)

  _yang_name = 'afi-safis'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi_safi = YANGDynClass(base=YANGListType("afi_safi_name",yc_afi_safi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi, yang_name="afi-safi", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-safi-name', extensions=None), is_container='list', yang_name="afi-safi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'afi-safis']

  def _get_afi_safi(self):
    """
    Getter method for afi_safi, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi (list)

    YANG Description: AFI,SAFI configuration available for the
neighbour or group
    """
    return self.__afi_safi
      
  def _set_afi_safi(self, v, load=False):
    """
    Setter method for afi_safi, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis/afi_safi (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_safi is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_safi() directly.

    YANG Description: AFI,SAFI configuration available for the
neighbour or group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("afi_safi_name",yc_afi_safi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi, yang_name="afi-safi", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-safi-name', extensions=None), is_container='list', yang_name="afi-safi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_safi must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("afi_safi_name",yc_afi_safi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi, yang_name="afi-safi", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-safi-name', extensions=None), is_container='list', yang_name="afi-safi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__afi_safi = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_safi(self):
    self.__afi_safi = YANGDynClass(base=YANGListType("afi_safi_name",yc_afi_safi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi, yang_name="afi-safi", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-safi-name', extensions=None), is_container='list', yang_name="afi-safi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  afi_safi = __builtin__.property(_get_afi_safi, _set_afi_safi)


  _pyangbind_elements = OrderedDict([('afi_safi', afi_safi), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_enable_bfd_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/enable-bfd/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to enabling BFD.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'enable-bfd', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/enable_bfd/config/enabled (boolean)

    YANG Description: When this leaf is set to true, BFD is used to detect the
liveliness of the remote peer or next-hop.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/enable_bfd/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When this leaf is set to true, BFD is used to detect the
liveliness of the remote peer or next-hop.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_enable_bfd_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/enable-bfd/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 enabing BFD.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'enable-bfd', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/enable_bfd/state/enabled (boolean)

    YANG Description: When this leaf is set to true, BFD is used to detect the
liveliness of the remote peer or next-hop.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/enable_bfd/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When this leaf is set to true, BFD is used to detect the
liveliness of the remote peer or next-hop.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  enabled = __builtin__.property(_get_enabled)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ])


class yc_enable_bfd_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_enable_bfd(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/enable-bfd. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enable BFD for liveliness detection to the next-hop or
neighbour.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'enable-bfd'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_enable_bfd_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_enable_bfd_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group', 'enable-bfd']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/enable_bfd/config (container)

    YANG Description: Configuration parameters relating to enabling BFD.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/enable_bfd/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 enabling BFD.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_enable_bfd_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_enable_bfd_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_enable_bfd_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/enable_bfd/state (container)

    YANG Description: Operational state parameters relating to enabing BFD.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/enable_bfd/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 enabing BFD.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_enable_bfd_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_enable_bfd_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_enable_bfd_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_peer_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of BGP peer-groups configured on the local system -
uniquely identified by peer-group name
  """
  __slots__ = ('_path_helper', '_extmethods', '__peer_group_name','__config','__state','__timers','__transport','__error_handling','__graceful_restart','__logging_options','__ebgp_multihop','__route_reflector','__as_path_options','__use_multiple_paths','__apply_policy','__afi_safis','__enable_bfd',)

  _yang_name = 'peer-group'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__peer_group_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-group-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__timers = YANGDynClass(base=yc_timers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_timers, is_container='container', yang_name="timers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__transport = YANGDynClass(base=yc_transport_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__error_handling = YANGDynClass(base=yc_error_handling_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_error_handling, is_container='container', yang_name="error-handling", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__graceful_restart = YANGDynClass(base=yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__logging_options = YANGDynClass(base=yc_logging_options_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_logging_options, is_container='container', yang_name="logging-options", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__ebgp_multihop = YANGDynClass(base=yc_ebgp_multihop_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_ebgp_multihop, is_container='container', yang_name="ebgp-multihop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__route_reflector = YANGDynClass(base=yc_route_reflector_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_route_reflector, is_container='container', yang_name="route-reflector", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__as_path_options = YANGDynClass(base=yc_as_path_options_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_as_path_options, is_container='container', yang_name="as-path-options", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__use_multiple_paths = YANGDynClass(base=yc_use_multiple_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths, is_container='container', yang_name="use-multiple-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__apply_policy = YANGDynClass(base=yc_apply_policy_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_apply_policy, is_container='container', yang_name="apply-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__afi_safis = YANGDynClass(base=yc_afi_safis_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis, is_container='container', yang_name="afi-safis", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__enable_bfd = YANGDynClass(base=yc_enable_bfd_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_enable_bfd, is_container='container', yang_name="enable-bfd", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups', 'peer-group']

  def _get_peer_group_name(self):
    """
    Getter method for peer_group_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/peer_group_name (leafref)

    YANG Description: Reference to the name of the BGP peer-group used as a
key in the peer-group list
    """
    return self.__peer_group_name
      
  def _set_peer_group_name(self, v, load=False):
    """
    Setter method for peer_group_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/peer_group_name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_group_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_group_name() directly.

    YANG Description: Reference to the name of the BGP peer-group used as a
key in the peer-group list
    """
    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="peer-group-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_group_name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-group-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__peer_group_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_group_name(self):
    self.__peer_group_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-group-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/config (container)

    YANG Description: Configuration parameters relating to the BGP neighbor or
group
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_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 parameters relating to the BGP neighbor or
group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/state (container)

    YANG Description: State information relating to the BGP peer-group
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_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: State information relating to the BGP peer-group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_timers(self):
    """
    Getter method for timers, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/timers (container)

    YANG Description: Timers related to a BGP peer-group
    """
    return self.__timers
      
  def _set_timers(self, v, load=False):
    """
    Setter method for timers, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/timers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_timers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_timers() directly.

    YANG Description: Timers related to a BGP peer-group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_timers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_timers, is_container='container', yang_name="timers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """timers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_timers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_timers, is_container='container', yang_name="timers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__timers = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_timers(self):
    self.__timers = YANGDynClass(base=yc_timers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_timers, is_container='container', yang_name="timers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_transport(self):
    """
    Getter method for transport, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/transport (container)

    YANG Description: Transport session parameters for the BGP peer-group
    """
    return self.__transport
      
  def _set_transport(self, v, load=False):
    """
    Setter method for transport, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/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 session parameters for the BGP peer-group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_transport_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_error_handling(self):
    """
    Getter method for error_handling, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/error_handling (container)

    YANG Description: Error handling parameters used for the BGP peer-group
    """
    return self.__error_handling
      
  def _set_error_handling(self, v, load=False):
    """
    Setter method for error_handling, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/error_handling (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_error_handling is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_error_handling() directly.

    YANG Description: Error handling parameters used for the BGP peer-group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_error_handling_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_error_handling, is_container='container', yang_name="error-handling", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """error_handling must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_error_handling_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_error_handling, is_container='container', yang_name="error-handling", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__error_handling = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_error_handling(self):
    self.__error_handling = YANGDynClass(base=yc_error_handling_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_error_handling, is_container='container', yang_name="error-handling", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_graceful_restart(self):
    """
    Getter method for graceful_restart, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/graceful_restart (container)

    YANG Description: Parameters relating the graceful restart mechanism for BGP
    """
    return self.__graceful_restart
      
  def _set_graceful_restart(self, v, load=False):
    """
    Setter method for graceful_restart, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/graceful_restart (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_graceful_restart is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_graceful_restart() directly.

    YANG Description: Parameters relating the graceful restart mechanism for BGP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """graceful_restart must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__graceful_restart = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_graceful_restart(self):
    self.__graceful_restart = YANGDynClass(base=yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_logging_options(self):
    """
    Getter method for logging_options, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/logging_options (container)

    YANG Description: Logging options for events related to the BGP neighbor or
group
    """
    return self.__logging_options
      
  def _set_logging_options(self, v, load=False):
    """
    Setter method for logging_options, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/logging_options (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_logging_options is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_logging_options() directly.

    YANG Description: Logging options for events related to the BGP neighbor or
group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_logging_options_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_logging_options, is_container='container', yang_name="logging-options", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """logging_options must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_logging_options_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_logging_options, is_container='container', yang_name="logging-options", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__logging_options = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_logging_options(self):
    self.__logging_options = YANGDynClass(base=yc_logging_options_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_logging_options, is_container='container', yang_name="logging-options", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_ebgp_multihop(self):
    """
    Getter method for ebgp_multihop, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/ebgp_multihop (container)

    YANG Description: eBGP multi-hop parameters for the BGPgroup
    """
    return self.__ebgp_multihop
      
  def _set_ebgp_multihop(self, v, load=False):
    """
    Setter method for ebgp_multihop, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/ebgp_multihop (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ebgp_multihop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ebgp_multihop() directly.

    YANG Description: eBGP multi-hop parameters for the BGPgroup
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ebgp_multihop_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_ebgp_multihop, is_container='container', yang_name="ebgp-multihop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ebgp_multihop must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ebgp_multihop_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_ebgp_multihop, is_container='container', yang_name="ebgp-multihop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__ebgp_multihop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ebgp_multihop(self):
    self.__ebgp_multihop = YANGDynClass(base=yc_ebgp_multihop_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_ebgp_multihop, is_container='container', yang_name="ebgp-multihop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_route_reflector(self):
    """
    Getter method for route_reflector, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/route_reflector (container)

    YANG Description: Route reflector parameters for the BGPgroup
    """
    return self.__route_reflector
      
  def _set_route_reflector(self, v, load=False):
    """
    Setter method for route_reflector, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/route_reflector (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route_reflector is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route_reflector() directly.

    YANG Description: Route reflector parameters for the BGPgroup
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_route_reflector_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_route_reflector, is_container='container', yang_name="route-reflector", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route_reflector must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_route_reflector_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_route_reflector, is_container='container', yang_name="route-reflector", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__route_reflector = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route_reflector(self):
    self.__route_reflector = YANGDynClass(base=yc_route_reflector_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_route_reflector, is_container='container', yang_name="route-reflector", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_as_path_options(self):
    """
    Getter method for as_path_options, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/as_path_options (container)

    YANG Description: AS_PATH manipulation parameters for the BGP neighbor or
group
    """
    return self.__as_path_options
      
  def _set_as_path_options(self, v, load=False):
    """
    Setter method for as_path_options, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/as_path_options (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_as_path_options is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_as_path_options() directly.

    YANG Description: AS_PATH manipulation parameters for the BGP neighbor or
group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_as_path_options_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_as_path_options, is_container='container', yang_name="as-path-options", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """as_path_options must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_as_path_options_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_as_path_options, is_container='container', yang_name="as-path-options", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__as_path_options = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_as_path_options(self):
    self.__as_path_options = YANGDynClass(base=yc_as_path_options_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_as_path_options, is_container='container', yang_name="as-path-options", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_use_multiple_paths(self):
    """
    Getter method for use_multiple_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/use_multiple_paths (container)

    YANG Description: Parameters related to the use of multiple paths for the
same NLRI
    """
    return self.__use_multiple_paths
      
  def _set_use_multiple_paths(self, v, load=False):
    """
    Setter method for use_multiple_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/use_multiple_paths (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_use_multiple_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_use_multiple_paths() directly.

    YANG Description: Parameters related to the use of multiple paths for the
same NLRI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_use_multiple_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths, is_container='container', yang_name="use-multiple-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """use_multiple_paths must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_use_multiple_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths, is_container='container', yang_name="use-multiple-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__use_multiple_paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_use_multiple_paths(self):
    self.__use_multiple_paths = YANGDynClass(base=yc_use_multiple_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_use_multiple_paths, is_container='container', yang_name="use-multiple-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_apply_policy(self):
    """
    Getter method for apply_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/apply_policy (container)

    YANG Description: Anchor point for routing policies in the model.
Import and export policies are with respect to the local
routing table, i.e., export (send) and import (receive),
depending on the context.
    """
    return self.__apply_policy
      
  def _set_apply_policy(self, v, load=False):
    """
    Setter method for apply_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/apply_policy (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_apply_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_apply_policy() directly.

    YANG Description: Anchor point for routing policies in the model.
Import and export policies are with respect to the local
routing table, i.e., export (send) and import (receive),
depending on the context.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_apply_policy_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_apply_policy, is_container='container', yang_name="apply-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """apply_policy must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_apply_policy_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_apply_policy, is_container='container', yang_name="apply-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__apply_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_apply_policy(self):
    self.__apply_policy = YANGDynClass(base=yc_apply_policy_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_apply_policy, is_container='container', yang_name="apply-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_afi_safis(self):
    """
    Getter method for afi_safis, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis (container)

    YANG Description: Per-address-family configuration parameters associated with
thegroup
    """
    return self.__afi_safis
      
  def _set_afi_safis(self, v, load=False):
    """
    Setter method for afi_safis, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/afi_safis (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_safis is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_safis() directly.

    YANG Description: Per-address-family configuration parameters associated with
thegroup
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_afi_safis_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis, is_container='container', yang_name="afi-safis", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_safis must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_afi_safis_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis, is_container='container', yang_name="afi-safis", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__afi_safis = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_safis(self):
    self.__afi_safis = YANGDynClass(base=yc_afi_safis_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_afi_safis, is_container='container', yang_name="afi-safis", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_enable_bfd(self):
    """
    Getter method for enable_bfd, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/enable_bfd (container)

    YANG Description: Enable BFD for liveliness detection to the next-hop or
neighbour.
    """
    return self.__enable_bfd
      
  def _set_enable_bfd(self, v, load=False):
    """
    Setter method for enable_bfd, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/enable_bfd (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable_bfd is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable_bfd() directly.

    YANG Description: Enable BFD for liveliness detection to the next-hop or
neighbour.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_enable_bfd_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_enable_bfd, is_container='container', yang_name="enable-bfd", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable_bfd must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_enable_bfd_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_enable_bfd, is_container='container', yang_name="enable-bfd", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__enable_bfd = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable_bfd(self):
    self.__enable_bfd = YANGDynClass(base=yc_enable_bfd_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group_enable_bfd, is_container='container', yang_name="enable-bfd", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  peer_group_name = __builtin__.property(_get_peer_group_name, _set_peer_group_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  timers = __builtin__.property(_get_timers, _set_timers)
  transport = __builtin__.property(_get_transport, _set_transport)
  error_handling = __builtin__.property(_get_error_handling, _set_error_handling)
  graceful_restart = __builtin__.property(_get_graceful_restart, _set_graceful_restart)
  logging_options = __builtin__.property(_get_logging_options, _set_logging_options)
  ebgp_multihop = __builtin__.property(_get_ebgp_multihop, _set_ebgp_multihop)
  route_reflector = __builtin__.property(_get_route_reflector, _set_route_reflector)
  as_path_options = __builtin__.property(_get_as_path_options, _set_as_path_options)
  use_multiple_paths = __builtin__.property(_get_use_multiple_paths, _set_use_multiple_paths)
  apply_policy = __builtin__.property(_get_apply_policy, _set_apply_policy)
  afi_safis = __builtin__.property(_get_afi_safis, _set_afi_safis)
  enable_bfd = __builtin__.property(_get_enable_bfd, _set_enable_bfd)


  _pyangbind_elements = OrderedDict([('peer_group_name', peer_group_name), ('config', config), ('state', state), ('timers', timers), ('transport', transport), ('error_handling', error_handling), ('graceful_restart', graceful_restart), ('logging_options', logging_options), ('ebgp_multihop', ebgp_multihop), ('route_reflector', route_reflector), ('as_path_options', as_path_options), ('use_multiple_paths', use_multiple_paths), ('apply_policy', apply_policy), ('afi_safis', afi_safis), ('enable_bfd', enable_bfd), ])


class yc_peer_groups_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/peer-groups. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration for BGP peer-groups
  """
  __slots__ = ('_path_helper', '_extmethods', '__peer_group',)

  _yang_name = 'peer-groups'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__peer_group = YANGDynClass(base=YANGListType("peer_group_name",yc_peer_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group, yang_name="peer-group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='peer-group-name', extensions=None), is_container='list', yang_name="peer-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'peer-groups']

  def _get_peer_group(self):
    """
    Getter method for peer_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group (list)

    YANG Description: List of BGP peer-groups configured on the local system -
uniquely identified by peer-group name
    """
    return self.__peer_group
      
  def _set_peer_group(self, v, load=False):
    """
    Setter method for peer_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_group() directly.

    YANG Description: List of BGP peer-groups configured on the local system -
uniquely identified by peer-group name
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("peer_group_name",yc_peer_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group, yang_name="peer-group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='peer-group-name', extensions=None), is_container='list', yang_name="peer-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_group must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("peer_group_name",yc_peer_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group, yang_name="peer-group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='peer-group-name', extensions=None), is_container='list', yang_name="peer-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__peer_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_group(self):
    self.__peer_group = YANGDynClass(base=YANGListType("peer_group_name",yc_peer_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups_peer_group, yang_name="peer-group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='peer-group-name', extensions=None), is_container='list', yang_name="peer-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  peer_group = __builtin__.property(_get_peer_group, _set_peer_group)


  _pyangbind_elements = OrderedDict([('peer_group', peer_group), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/attr-sets/attr-set/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for common path attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__origin','__atomic_aggregate','__next_hop','__med','__local_pref','__originator_id','__cluster_list','__aigp',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__origin = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IGP': {}, 'EGP': {}, 'INCOMPLETE': {}},), is_leaf=True, yang_name="origin", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgpt:bgp-origin-attr-type', is_config=False)
    self.__atomic_aggregate = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="atomic-aggregate", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__next_hop = 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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__med = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="med", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__local_pref = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="local-pref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__originator_id = 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}'}), is_leaf=True, yang_name="originator-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-address', is_config=False)
    self.__cluster_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}'})), is_leaf=False, yang_name="cluster-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-address', is_config=False)
    self.__aigp = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="aigp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'attr-sets', 'attr-set', 'state']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/state/index (uint64)

    YANG Description: System generated index for each attribute set.  The
index is used to reference an attribute set from a
specific path.  Multiple paths may reference the same
attribute set.
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/state/index (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: System generated index for each attribute set.  The
index is used to reference an attribute set from a
specific path.  Multiple paths may reference the same
attribute set.
    """
    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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_index(self):
    self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_origin(self):
    """
    Getter method for origin, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/state/origin (oc-bgpt:bgp-origin-attr-type)

    YANG Description: BGP attribute defining the origin of the path information.
    """
    return self.__origin
      
  def _set_origin(self, v, load=False):
    """
    Setter method for origin, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/state/origin (oc-bgpt:bgp-origin-attr-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_origin is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_origin() directly.

    YANG Description: BGP attribute defining the origin of the path information.
    """
    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={'IGP': {}, 'EGP': {}, 'INCOMPLETE': {}},), is_leaf=True, yang_name="origin", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgpt:bgp-origin-attr-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """origin must be of a type compatible with oc-bgpt:bgp-origin-attr-type""",
          'defined-type': "oc-bgpt:bgp-origin-attr-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IGP': {}, 'EGP': {}, 'INCOMPLETE': {}},), is_leaf=True, yang_name="origin", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgpt:bgp-origin-attr-type', is_config=False)""",
        })

    self.__origin = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_origin(self):
    self.__origin = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IGP': {}, 'EGP': {}, 'INCOMPLETE': {}},), is_leaf=True, yang_name="origin", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgpt:bgp-origin-attr-type', is_config=False)


  def _get_atomic_aggregate(self):
    """
    Getter method for atomic_aggregate, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/state/atomic_aggregate (boolean)

    YANG Description: BGP attribute indicating that the prefix is an atomic
aggregate, i.e., the peer selected a less specific
route without selecting a more specific route that is
included in it.
    """
    return self.__atomic_aggregate
      
  def _set_atomic_aggregate(self, v, load=False):
    """
    Setter method for atomic_aggregate, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/state/atomic_aggregate (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_atomic_aggregate is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_atomic_aggregate() directly.

    YANG Description: BGP attribute indicating that the prefix is an atomic
aggregate, i.e., the peer selected a less specific
route without selecting a more specific route that is
included in it.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="atomic-aggregate", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """atomic_aggregate must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="atomic-aggregate", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__atomic_aggregate = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_atomic_aggregate(self):
    self.__atomic_aggregate = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="atomic-aggregate", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_next_hop(self):
    """
    Getter method for next_hop, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/state/next_hop (oc-inet:ip-address)

    YANG Description: BGP next hop attribute defining the IP address of the router
that should be used as the next hop to the destination
    """
    return self.__next_hop
      
  def _set_next_hop(self, v, load=False):
    """
    Setter method for next_hop, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/state/next_hop (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hop() directly.

    YANG Description: BGP next hop attribute defining the IP address of the router
that should be used as the next hop to the destination
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hop must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__next_hop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_next_hop(self):
    self.__next_hop = 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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_med(self):
    """
    Getter method for med, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/state/med (uint32)

    YANG Description: BGP multi-exit discriminator attribute used in BGP route
selection process
    """
    return self.__med
      
  def _set_med(self, v, load=False):
    """
    Setter method for med, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/state/med (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_med is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_med() directly.

    YANG Description: BGP multi-exit discriminator attribute used in BGP route
selection process
    """
    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="med", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """med 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="med", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__med = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_med(self):
    self.__med = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="med", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_local_pref(self):
    """
    Getter method for local_pref, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/state/local_pref (uint32)

    YANG Description: BGP local preference attribute sent to internal peers to
indicate the degree of preference for externally learned
routes.  The route with the highest local preference value
is preferred.
    """
    return self.__local_pref
      
  def _set_local_pref(self, v, load=False):
    """
    Setter method for local_pref, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/state/local_pref (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_pref is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_pref() directly.

    YANG Description: BGP local preference attribute sent to internal peers to
indicate the degree of preference for externally learned
routes.  The route with the highest local preference value
is preferred.
    """
    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="local-pref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_pref 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="local-pref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__local_pref = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_pref(self):
    self.__local_pref = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="local-pref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_originator_id(self):
    """
    Getter method for originator_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/state/originator_id (oc-inet:ipv4-address)

    YANG Description: BGP attribute that provides the id as an IPv4 address
of the originator of the announcement.
    """
    return self.__originator_id
      
  def _set_originator_id(self, v, load=False):
    """
    Setter method for originator_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/state/originator_id (oc-inet:ipv4-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_originator_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_originator_id() directly.

    YANG Description: BGP attribute that provides the id as an IPv4 address
of the originator of the announcement.
    """
    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}'}), is_leaf=True, yang_name="originator-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """originator_id must be of a type compatible with oc-inet:ipv4-address""",
          'defined-type': "oc-inet:ipv4-address",
          '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}'}), is_leaf=True, yang_name="originator-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-address', is_config=False)""",
        })

    self.__originator_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_originator_id(self):
    self.__originator_id = 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}'}), is_leaf=True, yang_name="originator-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-address', is_config=False)


  def _get_cluster_list(self):
    """
    Getter method for cluster_list, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/state/cluster_list (oc-inet:ipv4-address)

    YANG Description: Represents the reflection path that the route has passed.
    """
    return self.__cluster_list
      
  def _set_cluster_list(self, v, load=False):
    """
    Setter method for cluster_list, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/state/cluster_list (oc-inet:ipv4-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cluster_list is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cluster_list() directly.

    YANG Description: Represents the reflection path that the route has passed.
    """
    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_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}'})), is_leaf=False, yang_name="cluster-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cluster_list must be of a type compatible with oc-inet:ipv4-address""",
          'defined-type': "oc-inet:ipv4-address",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=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}'})), is_leaf=False, yang_name="cluster-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-address', is_config=False)""",
        })

    self.__cluster_list = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cluster_list(self):
    self.__cluster_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}'})), is_leaf=False, yang_name="cluster-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-address', is_config=False)


  def _get_aigp(self):
    """
    Getter method for aigp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/state/aigp (uint64)

    YANG Description: BGP path attribute representing the accumulated IGP metric
for the path
    """
    return self.__aigp
      
  def _set_aigp(self, v, load=False):
    """
    Setter method for aigp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/state/aigp (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_aigp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_aigp() directly.

    YANG Description: BGP path attribute representing the accumulated IGP metric
for the path
    """
    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="aigp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """aigp 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="aigp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__aigp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_aigp(self):
    self.__aigp = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="aigp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)

  index = __builtin__.property(_get_index)
  origin = __builtin__.property(_get_origin)
  atomic_aggregate = __builtin__.property(_get_atomic_aggregate)
  next_hop = __builtin__.property(_get_next_hop)
  med = __builtin__.property(_get_med)
  local_pref = __builtin__.property(_get_local_pref)
  originator_id = __builtin__.property(_get_originator_id)
  cluster_list = __builtin__.property(_get_cluster_list)
  aigp = __builtin__.property(_get_aigp)


  _pyangbind_elements = OrderedDict([('index', index), ('origin', origin), ('atomic_aggregate', atomic_aggregate), ('next_hop', next_hop), ('med', med), ('local_pref', local_pref), ('originator_id', originator_id), ('cluster_list', cluster_list), ('aigp', aigp), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_aggregator_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/attr-sets/attr-set/aggregator/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for BGP aggregator attribute
  """
  __slots__ = ('_path_helper', '_extmethods', '__as_','__as4','__address',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__as_ = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)
    self.__as4 = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)
    self.__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}'}), is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-address', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'attr-sets', 'attr-set', 'aggregator', 'state']

  def _get_as_(self):
    """
    Getter method for as_, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/aggregator/state/as (oc-inet:as-number)

    YANG Description: AS number of the autnonomous system that performed the
aggregation.
    """
    return self.__as_
      
  def _set_as_(self, v, load=False):
    """
    Setter method for as_, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/aggregator/state/as (oc-inet:as-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_as_ is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_as_() directly.

    YANG Description: AS number of the autnonomous system that performed the
aggregation.
    """
    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="as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """as_ must be of a type compatible with oc-inet:as-number""",
          'defined-type': "oc-inet:as-number",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)""",
        })

    self.__as_ = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_as_(self):
    self.__as_ = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)


  def _get_as4(self):
    """
    Getter method for as4, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/aggregator/state/as4 (oc-inet:as-number)

    YANG Description: AS number of the autnonomous system that performed the
aggregation (4-octet representation).  This value is
populated if an upstream router is not 4-octet capable.
Its semantics are similar to the AS4_PATH optional
transitive attribute
    """
    return self.__as4
      
  def _set_as4(self, v, load=False):
    """
    Setter method for as4, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/aggregator/state/as4 (oc-inet:as-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_as4 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_as4() directly.

    YANG Description: AS number of the autnonomous system that performed the
aggregation (4-octet representation).  This value is
populated if an upstream router is not 4-octet capable.
Its semantics are similar to the AS4_PATH optional
transitive attribute
    """
    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="as4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """as4 must be of a type compatible with oc-inet:as-number""",
          'defined-type': "oc-inet:as-number",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)""",
        })

    self.__as4 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_as4(self):
    self.__as4 = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as4", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)


  def _get_address(self):
    """
    Getter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/aggregator/state/address (oc-inet:ipv4-address)

    YANG Description: IP address of the router that performed the
aggregation.
    """
    return self.__address
      
  def _set_address(self, v, load=False):
    """
    Setter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/aggregator/state/address (oc-inet:ipv4-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address() directly.

    YANG Description: IP address of the router that performed the
aggregation.
    """
    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}'}), is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address must be of a type compatible with oc-inet:ipv4-address""",
          'defined-type': "oc-inet:ipv4-address",
          '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}'}), is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-address', is_config=False)""",
        })

    self.__address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address(self):
    self.__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}'}), is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-address', is_config=False)

  as_ = __builtin__.property(_get_as_)
  as4 = __builtin__.property(_get_as4)
  address = __builtin__.property(_get_address)


  _pyangbind_elements = OrderedDict([('as_', as_), ('as4', as4), ('address', address), ])


class yc_aggregator_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_aggregator(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/attr-sets/attr-set/aggregator. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: BGP attribute indicating the prefix has been aggregated by
the specified AS and router.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'aggregator'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_aggregator_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'attr-sets', 'attr-set', 'aggregator']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/aggregator/state (container)

    YANG Description: Operational state data for BGP aggregator attribute
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/aggregator/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 BGP aggregator attribute
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_aggregator_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_aggregator_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_aggregator_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_as_path_as_segment_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/attr-sets/attr-set/as-path/as-segment/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Opstate data for AS-PATH segments
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__member',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'AS_SEQ': {}, 'AS_SET': {}, 'AS_CONFED_SEQUENCE': {}, 'AS_CONFED_SET': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgpt:as-path-segment-type', is_config=False)
    self.__member = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="member", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'attr-sets', 'attr-set', 'as-path', 'as-segment', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/as_path/as_segment/state/type (oc-bgpt:as-path-segment-type)

    YANG Description: The type of AS-PATH segment
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/as_path/as_segment/state/type (oc-bgpt:as-path-segment-type)
    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: The type of AS-PATH segment
    """
    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={'AS_SEQ': {}, 'AS_SET': {}, 'AS_CONFED_SEQUENCE': {}, 'AS_CONFED_SET': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgpt:as-path-segment-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with oc-bgpt:as-path-segment-type""",
          'defined-type': "oc-bgpt:as-path-segment-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AS_SEQ': {}, 'AS_SET': {}, 'AS_CONFED_SEQUENCE': {}, 'AS_CONFED_SET': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgpt:as-path-segment-type', 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={'AS_SEQ': {}, 'AS_SET': {}, 'AS_CONFED_SEQUENCE': {}, 'AS_CONFED_SET': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgpt:as-path-segment-type', is_config=False)


  def _get_member(self):
    """
    Getter method for member, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/as_path/as_segment/state/member (oc-inet:as-number)

    YANG Description: List of the AS numbers in the AS-PATH segment
    """
    return self.__member
      
  def _set_member(self, v, load=False):
    """
    Setter method for member, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/as_path/as_segment/state/member (oc-inet:as-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_member is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_member() directly.

    YANG Description: List of the AS numbers in the AS-PATH segment
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="member", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """member must be of a type compatible with oc-inet:as-number""",
          'defined-type': "oc-inet:as-number",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="member", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)""",
        })

    self.__member = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_member(self):
    self.__member = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="member", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)

  type = __builtin__.property(_get_type)
  member = __builtin__.property(_get_member)


  _pyangbind_elements = OrderedDict([('type', type), ('member', member), ])


class yc_as_segment_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_as_path_as_segment(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/attr-sets/attr-set/as-path/as-segment. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Unkeyed list of AS PATH segments
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'as-segment'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_as_path_as_segment_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'attr-sets', 'attr-set', 'as-path', 'as-segment']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/as_path/as_segment/state (container)

    YANG Description: Opstate data for AS-PATH segments
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/as_path/as_segment/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: Opstate data for AS-PATH segments
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_as_path_as_segment_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_as_path_as_segment_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_as_path_as_segment_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_as_path_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_as_path(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/attr-sets/attr-set/as-path. 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 AS path segments.

In the Adj-RIB-In or Adj-RIB-Out, this list should show
the received or sent AS_PATH, respectively.  For
example, if the local router is not 4-byte capable, this
value should consist of 2-octet ASNs or the AS_TRANS
(AS 23456) values received or sent in route updates.

In the Loc-RIB, this list should reflect the effective
AS path for the route, e.g., a 4-octet value if the
local router is 4-octet capable.
  """
  __slots__ = ('_path_helper', '_extmethods', '__as_segment',)

  _yang_name = 'as-path'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__as_segment = YANGDynClass(base=YANGListType(False,yc_as_segment_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_as_path_as_segment, yang_name="as-segment", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="as-segment", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'attr-sets', 'attr-set', 'as-path']

  def _get_as_segment(self):
    """
    Getter method for as_segment, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/as_path/as_segment (list)

    YANG Description: Unkeyed list of AS PATH segments
    """
    return self.__as_segment
      
  def _set_as_segment(self, v, load=False):
    """
    Setter method for as_segment, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/as_path/as_segment (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_as_segment is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_as_segment() directly.

    YANG Description: Unkeyed list of AS PATH segments
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType(False,yc_as_segment_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_as_path_as_segment, yang_name="as-segment", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="as-segment", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """as_segment must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType(False,yc_as_segment_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_as_path_as_segment, yang_name="as-segment", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="as-segment", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__as_segment = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_as_segment(self):
    self.__as_segment = YANGDynClass(base=YANGListType(False,yc_as_segment_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_as_path_as_segment, yang_name="as-segment", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="as-segment", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  as_segment = __builtin__.property(_get_as_segment)


  _pyangbind_elements = OrderedDict([('as_segment', as_segment), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_as4_path_as4_segment_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/attr-sets/attr-set/as4-path/as4-segment/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Opstate data for AS-PATH segments
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__member',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'AS_SEQ': {}, 'AS_SET': {}, 'AS_CONFED_SEQUENCE': {}, 'AS_CONFED_SET': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgpt:as-path-segment-type', is_config=False)
    self.__member = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="member", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'attr-sets', 'attr-set', 'as4-path', 'as4-segment', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/as4_path/as4_segment/state/type (oc-bgpt:as-path-segment-type)

    YANG Description: The type of AS-PATH segment
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/as4_path/as4_segment/state/type (oc-bgpt:as-path-segment-type)
    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: The type of AS-PATH segment
    """
    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={'AS_SEQ': {}, 'AS_SET': {}, 'AS_CONFED_SEQUENCE': {}, 'AS_CONFED_SET': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgpt:as-path-segment-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with oc-bgpt:as-path-segment-type""",
          'defined-type': "oc-bgpt:as-path-segment-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AS_SEQ': {}, 'AS_SET': {}, 'AS_CONFED_SEQUENCE': {}, 'AS_CONFED_SET': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgpt:as-path-segment-type', 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={'AS_SEQ': {}, 'AS_SET': {}, 'AS_CONFED_SEQUENCE': {}, 'AS_CONFED_SET': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgpt:as-path-segment-type', is_config=False)


  def _get_member(self):
    """
    Getter method for member, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/as4_path/as4_segment/state/member (oc-inet:as-number)

    YANG Description: List of the AS numbers in the AS-PATH segment
    """
    return self.__member
      
  def _set_member(self, v, load=False):
    """
    Setter method for member, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/as4_path/as4_segment/state/member (oc-inet:as-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_member is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_member() directly.

    YANG Description: List of the AS numbers in the AS-PATH segment
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="member", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """member must be of a type compatible with oc-inet:as-number""",
          'defined-type': "oc-inet:as-number",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="member", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)""",
        })

    self.__member = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_member(self):
    self.__member = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="member", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)

  type = __builtin__.property(_get_type)
  member = __builtin__.property(_get_member)


  _pyangbind_elements = OrderedDict([('type', type), ('member', member), ])


class yc_as4_segment_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_as4_path_as4_segment(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/attr-sets/attr-set/as4-path/as4-segment. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Unkeyed list of AS PATH segments
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'as4-segment'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_as4_path_as4_segment_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'attr-sets', 'attr-set', 'as4-path', 'as4-segment']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/as4_path/as4_segment/state (container)

    YANG Description: Opstate data for AS-PATH segments
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/as4_path/as4_segment/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: Opstate data for AS-PATH segments
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_as4_path_as4_segment_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_as4_path_as4_segment_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_as4_path_as4_segment_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_as4_path_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_as4_path(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/attr-sets/attr-set/as4-path. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This is the path encoded with 4-octet
AS numbers in the optional transitive AS4_PATH attribute.
This value is populated with the received or sent attribute
in Adj-RIB-In or Adj-RIB-Out, respectively.  It should not
be populated in Loc-RIB since the Loc-RIB is expected to
store the effective AS-Path in the as-path leaf regardless
of being 4-octet or 2-octet.
  """
  __slots__ = ('_path_helper', '_extmethods', '__as4_segment',)

  _yang_name = 'as4-path'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__as4_segment = YANGDynClass(base=YANGListType(False,yc_as4_segment_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_as4_path_as4_segment, yang_name="as4-segment", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="as4-segment", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'attr-sets', 'attr-set', 'as4-path']

  def _get_as4_segment(self):
    """
    Getter method for as4_segment, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/as4_path/as4_segment (list)

    YANG Description: Unkeyed list of AS PATH segments
    """
    return self.__as4_segment
      
  def _set_as4_segment(self, v, load=False):
    """
    Setter method for as4_segment, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/as4_path/as4_segment (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_as4_segment is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_as4_segment() directly.

    YANG Description: Unkeyed list of AS PATH segments
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType(False,yc_as4_segment_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_as4_path_as4_segment, yang_name="as4-segment", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="as4-segment", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """as4_segment must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType(False,yc_as4_segment_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_as4_path_as4_segment, yang_name="as4-segment", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="as4-segment", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__as4_segment = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_as4_segment(self):
    self.__as4_segment = YANGDynClass(base=YANGListType(False,yc_as4_segment_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_as4_path_as4_segment, yang_name="as4-segment", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="as4-segment", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  as4_segment = __builtin__.property(_get_as4_segment)


  _pyangbind_elements = OrderedDict([('as4_segment', as4_segment), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/attr-sets/attr-set/tunnel-encapsulation/tunnels/tunnel/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of the tunnel attribute
  """
  __slots__ = ('_path_helper', '_extmethods', '__type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'SRTE_POLICY_TUNNEL': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:SRTE_POLICY_TUNNEL': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:SRTE_POLICY_TUNNEL': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:SRTE_POLICY_TUNNEL': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'attr-sets', 'attr-set', 'tunnel-encapsulation', 'tunnels', 'tunnel', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/state/type (identityref)

    YANG Description: Type of the tunnel described within the tunnel encapsulation
attribute.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/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: Type of the tunnel described within the tunnel encapsulation
attribute.
    """
    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={'SRTE_POLICY_TUNNEL': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:SRTE_POLICY_TUNNEL': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:SRTE_POLICY_TUNNEL': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:SRTE_POLICY_TUNNEL': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'SRTE_POLICY_TUNNEL': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:SRTE_POLICY_TUNNEL': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:SRTE_POLICY_TUNNEL': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:SRTE_POLICY_TUNNEL': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-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/network-instance', defining_module='openconfig-network-instance', 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={'SRTE_POLICY_TUNNEL': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:SRTE_POLICY_TUNNEL': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:SRTE_POLICY_TUNNEL': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:SRTE_POLICY_TUNNEL': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  type = __builtin__.property(_get_type)


  _pyangbind_elements = OrderedDict([('type', type), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/attr-sets/attr-set/tunnel-encapsulation/tunnels/tunnel/subtlvs/subtlv/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of the subTLV of the tunnel attribute
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__colors','__preference','__binding_sid',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'TUNNEL_REMOTE_ENDPOINT': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:TUNNEL_REMOTE_ENDPOINT': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:TUNNEL_REMOTE_ENDPOINT': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:TUNNEL_REMOTE_ENDPOINT': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'TUNNEL_COLOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:TUNNEL_COLOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:TUNNEL_COLOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:TUNNEL_COLOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'SRTE_PREFERENCE': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:SRTE_PREFERENCE': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:SRTE_PREFERENCE': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:SRTE_PREFERENCE': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'SRTE_BINDING_SID': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:SRTE_BINDING_SID': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:SRTE_BINDING_SID': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:SRTE_BINDING_SID': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'SRTE_SEGMENT_LIST': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:SRTE_SEGMENT_LIST': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:SRTE_SEGMENT_LIST': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:SRTE_SEGMENT_LIST': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__colors = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="colors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(100), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__binding_sid = 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': {}},),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}|:))'}),], is_leaf=True, yang_name="binding-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-sid-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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'attr-sets', 'attr-set', 'tunnel-encapsulation', 'tunnels', 'tunnel', 'subtlvs', 'subtlv', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/state/type (identityref)

    YANG Description: Type of the sub-TLV within the tunnel encapsulation attribute
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/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: Type of the sub-TLV within the tunnel encapsulation attribute
    """
    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={'TUNNEL_REMOTE_ENDPOINT': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:TUNNEL_REMOTE_ENDPOINT': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:TUNNEL_REMOTE_ENDPOINT': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:TUNNEL_REMOTE_ENDPOINT': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'TUNNEL_COLOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:TUNNEL_COLOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:TUNNEL_COLOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:TUNNEL_COLOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'SRTE_PREFERENCE': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:SRTE_PREFERENCE': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:SRTE_PREFERENCE': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:SRTE_PREFERENCE': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'SRTE_BINDING_SID': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:SRTE_BINDING_SID': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:SRTE_BINDING_SID': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:SRTE_BINDING_SID': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'SRTE_SEGMENT_LIST': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:SRTE_SEGMENT_LIST': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:SRTE_SEGMENT_LIST': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:SRTE_SEGMENT_LIST': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TUNNEL_REMOTE_ENDPOINT': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:TUNNEL_REMOTE_ENDPOINT': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:TUNNEL_REMOTE_ENDPOINT': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:TUNNEL_REMOTE_ENDPOINT': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'TUNNEL_COLOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:TUNNEL_COLOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:TUNNEL_COLOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:TUNNEL_COLOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'SRTE_PREFERENCE': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:SRTE_PREFERENCE': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:SRTE_PREFERENCE': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:SRTE_PREFERENCE': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'SRTE_BINDING_SID': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:SRTE_BINDING_SID': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:SRTE_BINDING_SID': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:SRTE_BINDING_SID': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'SRTE_SEGMENT_LIST': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:SRTE_SEGMENT_LIST': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:SRTE_SEGMENT_LIST': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:SRTE_SEGMENT_LIST': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-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/network-instance', defining_module='openconfig-network-instance', 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={'TUNNEL_REMOTE_ENDPOINT': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:TUNNEL_REMOTE_ENDPOINT': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:TUNNEL_REMOTE_ENDPOINT': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:TUNNEL_REMOTE_ENDPOINT': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'TUNNEL_COLOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:TUNNEL_COLOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:TUNNEL_COLOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:TUNNEL_COLOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'SRTE_PREFERENCE': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:SRTE_PREFERENCE': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:SRTE_PREFERENCE': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:SRTE_PREFERENCE': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'SRTE_BINDING_SID': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:SRTE_BINDING_SID': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:SRTE_BINDING_SID': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:SRTE_BINDING_SID': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'SRTE_SEGMENT_LIST': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:SRTE_SEGMENT_LIST': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:SRTE_SEGMENT_LIST': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:SRTE_SEGMENT_LIST': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_colors(self):
    """
    Getter method for colors, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/state/colors (uint32)

    YANG Description: The colours associated with the tunnel encapsulation attribute,
as described by RFC5512.
    """
    return self.__colors
      
  def _set_colors(self, v, load=False):
    """
    Setter method for colors, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/state/colors (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_colors is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_colors() directly.

    YANG Description: The colours associated with the tunnel encapsulation attribute,
as described by RFC5512.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="colors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """colors must be of a type compatible with uint32""",
          'defined-type': "uint32",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="colors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__colors = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_colors(self):
    self.__colors = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="colors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_preference(self):
    """
    Getter method for preference, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/state/preference (uint32)

    YANG Description: The preference of the SR-TE policy described by the tunnel
encapsulation attribute. If unspecified, the preference
defaults to 100.
    """
    return self.__preference
      
  def _set_preference(self, v, load=False):
    """
    Setter method for preference, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/state/preference (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_preference is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_preference() directly.

    YANG Description: The preference of the SR-TE policy described by the tunnel
encapsulation attribute. If unspecified, the preference
defaults to 100.
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(100), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """preference 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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(100), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__preference = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_preference(self):
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(100), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_binding_sid(self):
    """
    Getter method for binding_sid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/state/binding_sid (oc-srt:sr-sid-type)

    YANG Description: Binding SID associated with the SR-TE policy
    """
    return self.__binding_sid
      
  def _set_binding_sid(self, v, load=False):
    """
    Setter method for binding_sid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/state/binding_sid (oc-srt:sr-sid-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_binding_sid is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_binding_sid() directly.

    YANG Description: Binding SID associated with the SR-TE policy
    """
    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': {}},),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}|:))'}),], is_leaf=True, yang_name="binding-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-sid-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """binding_sid must be of a type compatible with oc-srt:sr-sid-type""",
          'defined-type': "oc-srt:sr-sid-type",
          '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': {}},),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}|:))'}),], is_leaf=True, yang_name="binding-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-sid-type', is_config=False)""",
        })

    self.__binding_sid = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_binding_sid(self):
    self.__binding_sid = 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': {}},),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}|:))'}),], is_leaf=True, yang_name="binding-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-sid-type', is_config=False)

  type = __builtin__.property(_get_type)
  colors = __builtin__.property(_get_colors)
  preference = __builtin__.property(_get_preference)
  binding_sid = __builtin__.property(_get_binding_sid)


  _pyangbind_elements = OrderedDict([('type', type), ('colors', colors), ('preference', preference), ('binding_sid', binding_sid), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_remote_endpoints_remote_endpoint_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/attr-sets/attr-set/tunnel-encapsulation/tunnels/tunnel/subtlvs/subtlv/remote-endpoints/remote-endpoint/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of the remote endpoints described
by the attribute.
  """
  __slots__ = ('_path_helper', '_extmethods', '__as_','__endpoint',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__as_ = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)
    self.__endpoint = 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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'attr-sets', 'attr-set', 'tunnel-encapsulation', 'tunnels', 'tunnel', 'subtlvs', 'subtlv', 'remote-endpoints', 'remote-endpoint', 'state']

  def _get_as_(self):
    """
    Getter method for as_, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/remote_endpoints/remote_endpoint/state/as (oc-inet:as-number)

    YANG Description: The remote AS to which the IP address of the remote endpoint
belongs.
    """
    return self.__as_
      
  def _set_as_(self, v, load=False):
    """
    Setter method for as_, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/remote_endpoints/remote_endpoint/state/as (oc-inet:as-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_as_ is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_as_() directly.

    YANG Description: The remote AS to which the IP address of the remote endpoint
belongs.
    """
    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="as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """as_ must be of a type compatible with oc-inet:as-number""",
          'defined-type': "oc-inet:as-number",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)""",
        })

    self.__as_ = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_as_(self):
    self.__as_ = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:as-number', is_config=False)


  def _get_endpoint(self):
    """
    Getter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/remote_endpoints/remote_endpoint/state/endpoint (oc-inet:ip-address)

    YANG Description: IP address of the remote endpoint.
    """
    return self.__endpoint
      
  def _set_endpoint(self, v, load=False):
    """
    Setter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/remote_endpoints/remote_endpoint/state/endpoint (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint() directly.

    YANG Description: IP address of the remote endpoint.
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """endpoint must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__endpoint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_endpoint(self):
    self.__endpoint = 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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)

  as_ = __builtin__.property(_get_as_)
  endpoint = __builtin__.property(_get_endpoint)


  _pyangbind_elements = OrderedDict([('as_', as_), ('endpoint', endpoint), ])


class yc_remote_endpoint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_remote_endpoints_remote_endpoint(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/attr-sets/attr-set/tunnel-encapsulation/tunnels/tunnel/subtlvs/subtlv/remote-endpoints/remote-endpoint. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of the remote endpoints described within the TLV.
  """
  __slots__ = ('_path_helper', '_extmethods', '__endpoint','__state',)

  _yang_name = 'remote-endpoint'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__endpoint = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_remote_endpoints_remote_endpoint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'attr-sets', 'attr-set', 'tunnel-encapsulation', 'tunnels', 'tunnel', 'subtlvs', 'subtlv', 'remote-endpoints', 'remote-endpoint']

  def _get_endpoint(self):
    """
    Getter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/remote_endpoints/remote_endpoint/endpoint (leafref)

    YANG Description: Reference to the IP address of the endpoint.
    """
    return self.__endpoint
      
  def _set_endpoint(self, v, load=False):
    """
    Setter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/remote_endpoints/remote_endpoint/endpoint (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint() directly.

    YANG Description: Reference to the IP address of the endpoint.
    """
    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="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """endpoint must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__endpoint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_endpoint(self):
    self.__endpoint = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/remote_endpoints/remote_endpoint/state (container)

    YANG Description: State parameters of the remote endpoints described
by the attribute.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/remote_endpoints/remote_endpoint/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 parameters of the remote endpoints described
by the attribute.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_remote_endpoints_remote_endpoint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_remote_endpoints_remote_endpoint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_remote_endpoints_remote_endpoint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  endpoint = __builtin__.property(_get_endpoint)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('endpoint', endpoint), ('state', state), ])


class yc_remote_endpoints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_remote_endpoints(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/attr-sets/attr-set/tunnel-encapsulation/tunnels/tunnel/subtlvs/subtlv/remote-endpoints. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The remote endpoints associated with the tunnel
described by the attribute.
  """
  __slots__ = ('_path_helper', '_extmethods', '__remote_endpoint',)

  _yang_name = 'remote-endpoints'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__remote_endpoint = YANGDynClass(base=YANGListType("endpoint",yc_remote_endpoint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_remote_endpoints_remote_endpoint, yang_name="remote-endpoint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='endpoint', extensions=None), is_container='list', yang_name="remote-endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'attr-sets', 'attr-set', 'tunnel-encapsulation', 'tunnels', 'tunnel', 'subtlvs', 'subtlv', 'remote-endpoints']

  def _get_remote_endpoint(self):
    """
    Getter method for remote_endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/remote_endpoints/remote_endpoint (list)

    YANG Description: List of the remote endpoints described within the TLV.
    """
    return self.__remote_endpoint
      
  def _set_remote_endpoint(self, v, load=False):
    """
    Setter method for remote_endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/remote_endpoints/remote_endpoint (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_remote_endpoint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_remote_endpoint() directly.

    YANG Description: List of the remote endpoints described within the TLV.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("endpoint",yc_remote_endpoint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_remote_endpoints_remote_endpoint, yang_name="remote-endpoint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='endpoint', extensions=None), is_container='list', yang_name="remote-endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """remote_endpoint must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("endpoint",yc_remote_endpoint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_remote_endpoints_remote_endpoint, yang_name="remote-endpoint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='endpoint', extensions=None), is_container='list', yang_name="remote-endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__remote_endpoint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_remote_endpoint(self):
    self.__remote_endpoint = YANGDynClass(base=YANGListType("endpoint",yc_remote_endpoint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_remote_endpoints_remote_endpoint, yang_name="remote-endpoint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='endpoint', extensions=None), is_container='list', yang_name="remote-endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  remote_endpoint = __builtin__.property(_get_remote_endpoint)


  _pyangbind_elements = OrderedDict([('remote_endpoint', remote_endpoint), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_segment_lists_segment_list_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/attr-sets/attr-set/tunnel-encapsulation/tunnels/tunnel/subtlvs/subtlv/segment-lists/segment-list/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to the Segment List within the
Tunnel Encapsulation attribute.
  """
  __slots__ = ('_path_helper', '_extmethods', '__instance_id','__weight',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__instance_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="instance-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'attr-sets', 'attr-set', 'tunnel-encapsulation', 'tunnels', 'tunnel', 'subtlvs', 'subtlv', 'segment-lists', 'segment-list', 'state']

  def _get_instance_id(self):
    """
    Getter method for instance_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists/segment_list/state/instance_id (uint64)

    YANG Description: Instance of the segment list within the sub-TLV
    """
    return self.__instance_id
      
  def _set_instance_id(self, v, load=False):
    """
    Setter method for instance_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists/segment_list/state/instance_id (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_instance_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_instance_id() directly.

    YANG Description: Instance of the segment list within the sub-TLV
    """
    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="instance-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """instance_id 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="instance-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__instance_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_instance_id(self):
    self.__instance_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="instance-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_weight(self):
    """
    Getter method for weight, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists/segment_list/state/weight (uint32)

    YANG Description: The weight given to the path within the set of segment
lists that are included in the tunnel attribute sub-TLV.
    """
    return self.__weight
      
  def _set_weight(self, v, load=False):
    """
    Setter method for weight, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists/segment_list/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 weight given to the path within the set of segment
lists that are included in the tunnel attribute sub-TLV.
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  instance_id = __builtin__.property(_get_instance_id)
  weight = __builtin__.property(_get_weight)


  _pyangbind_elements = OrderedDict([('instance_id', instance_id), ('weight', weight), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_segment_lists_segment_list_segments_segment_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/attr-sets/attr-set/tunnel-encapsulation/tunnels/tunnel/subtlvs/subtlv/segment-lists/segment-list/segments/segment/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to the segment within
the segment list.
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__type','__sid','__mpls_tc','__mpls_bos','__mpls_ttl','__remote_ipv4_address','__local_ipv4_address','__remote_ipv6_address','__local_ipv6_address','__local_interface_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'MPLS_SID': {'value': 1}, 'IPV6_SID': {'value': 2}, 'IPV4_NODE_ADDRESS': {'value': 3}, 'IPV6_NODE_ADDRESS': {'value': 4}, 'IPV4_LOCAL_INTF_ID': {'value': 5}, 'IPV4_LOCAL_REMOTE_ADDR': {'value': 6}, 'IPV6_LOCAL_INTF_ID': {'value': 7}, 'IPV6_LOCAL_REMOTE_ADDR': {'value': 8}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__sid = 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': {}},),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}|:))'}),], is_leaf=True, yang_name="sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-sid-type', is_config=False)
    self.__mpls_tc = 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="mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__mpls_bos = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="mpls-bos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__mpls_ttl = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="mpls-ttl", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__remote_ipv4_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}'}), is_leaf=True, yang_name="remote-ipv4-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-address', is_config=False)
    self.__local_ipv4_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}'}), is_leaf=True, yang_name="local-ipv4-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-address', is_config=False)
    self.__remote_ipv6_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}|:))'}), is_leaf=True, yang_name="remote-ipv6-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-address', is_config=False)
    self.__local_ipv6_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}|:))'}), is_leaf=True, yang_name="local-ipv6-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-address', is_config=False)
    self.__local_interface_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="local-interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'attr-sets', 'attr-set', 'tunnel-encapsulation', 'tunnels', 'tunnel', 'subtlvs', 'subtlv', 'segment-lists', 'segment-list', 'segments', 'segment', 'state']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists/segment_list/segments/segment/state/index (uint64)

    YANG Description: Index of the segment within the segment list. The segments are
ordered in ascending order, beginning at 0.
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists/segment_list/segments/segment/state/index (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: Index of the segment within the segment list. The segments are
ordered in ascending order, beginning at 0.
    """
    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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_index(self):
    self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists/segment_list/segments/segment/state/type (enumeration)

    YANG Description: The type of segment specified within the segment entry.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists/segment_list/segments/segment/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: The type of segment specified within the segment entry.
    """
    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={'MPLS_SID': {'value': 1}, 'IPV6_SID': {'value': 2}, 'IPV4_NODE_ADDRESS': {'value': 3}, 'IPV6_NODE_ADDRESS': {'value': 4}, 'IPV4_LOCAL_INTF_ID': {'value': 5}, 'IPV4_LOCAL_REMOTE_ADDR': {'value': 6}, 'IPV6_LOCAL_INTF_ID': {'value': 7}, 'IPV6_LOCAL_REMOTE_ADDR': {'value': 8}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'MPLS_SID': {'value': 1}, 'IPV6_SID': {'value': 2}, 'IPV4_NODE_ADDRESS': {'value': 3}, 'IPV6_NODE_ADDRESS': {'value': 4}, 'IPV4_LOCAL_INTF_ID': {'value': 5}, 'IPV4_LOCAL_REMOTE_ADDR': {'value': 6}, 'IPV6_LOCAL_INTF_ID': {'value': 7}, 'IPV6_LOCAL_REMOTE_ADDR': {'value': 8}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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={'MPLS_SID': {'value': 1}, 'IPV6_SID': {'value': 2}, 'IPV4_NODE_ADDRESS': {'value': 3}, 'IPV6_NODE_ADDRESS': {'value': 4}, 'IPV4_LOCAL_INTF_ID': {'value': 5}, 'IPV4_LOCAL_REMOTE_ADDR': {'value': 6}, 'IPV6_LOCAL_INTF_ID': {'value': 7}, 'IPV6_LOCAL_REMOTE_ADDR': {'value': 8}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_sid(self):
    """
    Getter method for sid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists/segment_list/segments/segment/state/sid (oc-srt:sr-sid-type)

    YANG Description: SID value for the segment entry, specified as an MPLS label
or IPv6 address.
    """
    return self.__sid
      
  def _set_sid(self, v, load=False):
    """
    Setter method for sid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists/segment_list/segments/segment/state/sid (oc-srt:sr-sid-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sid is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sid() directly.

    YANG Description: SID value for the segment entry, specified as an MPLS label
or IPv6 address.
    """
    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': {}},),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}|:))'}),], is_leaf=True, yang_name="sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-sid-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sid must be of a type compatible with oc-srt:sr-sid-type""",
          'defined-type': "oc-srt:sr-sid-type",
          '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': {}},),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}|:))'}),], is_leaf=True, yang_name="sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-sid-type', is_config=False)""",
        })

    self.__sid = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sid(self):
    self.__sid = 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': {}},),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}|:))'}),], is_leaf=True, yang_name="sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-sid-type', is_config=False)


  def _get_mpls_tc(self):
    """
    Getter method for mpls_tc, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists/segment_list/segments/segment/state/mpls_tc (uint8)

    YANG Description: The MPLS TC bits used when the SID is specified as an MPLS
label. If set to zero, the receiving system specifies the
value of the TC bits.
    """
    return self.__mpls_tc
      
  def _set_mpls_tc(self, v, load=False):
    """
    Setter method for mpls_tc, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists/segment_list/segments/segment/state/mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mpls_tc() directly.

    YANG Description: The MPLS TC bits used when the SID is specified as an MPLS
label. If set to zero, the receiving system specifies the
value of the TC 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="mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mpls_tc 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..7']}), is_leaf=True, yang_name="mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__mpls_tc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mpls_tc(self):
    self.__mpls_tc = 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="mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_mpls_bos(self):
    """
    Getter method for mpls_bos, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists/segment_list/segments/segment/state/mpls_bos (boolean)

    YANG Description: When this leaf is set to true the MPLS bottom-of-stack
(BoS) bit is set in the MPLS segment. The BoS bit should
always be set to zero by the sender.
    """
    return self.__mpls_bos
      
  def _set_mpls_bos(self, v, load=False):
    """
    Setter method for mpls_bos, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists/segment_list/segments/segment/state/mpls_bos (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mpls_bos is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mpls_bos() directly.

    YANG Description: When this leaf is set to true the MPLS bottom-of-stack
(BoS) bit is set in the MPLS segment. The BoS bit should
always be set to zero by the sender.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="mpls-bos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mpls_bos must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="mpls-bos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__mpls_bos = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mpls_bos(self):
    self.__mpls_bos = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="mpls-bos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_mpls_ttl(self):
    """
    Getter method for mpls_ttl, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists/segment_list/segments/segment/state/mpls_ttl (uint8)

    YANG Description: The MPLS time to live (TTL) to be set for the MPLS
segment. If set to 255, the receiver specifies the
TTL value that is used for packets sent with this
segment in the stack.
    """
    return self.__mpls_ttl
      
  def _set_mpls_ttl(self, v, load=False):
    """
    Setter method for mpls_ttl, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists/segment_list/segments/segment/state/mpls_ttl (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mpls_ttl is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mpls_ttl() directly.

    YANG Description: The MPLS time to live (TTL) to be set for the MPLS
segment. If set to 255, the receiver specifies the
TTL value that is used for packets sent with this
segment in the stack.
    """
    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="mpls-ttl", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mpls_ttl 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="mpls-ttl", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__mpls_ttl = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mpls_ttl(self):
    self.__mpls_ttl = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="mpls-ttl", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_remote_ipv4_address(self):
    """
    Getter method for remote_ipv4_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists/segment_list/segments/segment/state/remote_ipv4_address (oc-inet:ipv4-address)

    YANG Description: An IPv4 address specified as the remote node address. When the type
of the segment specifies only the remote address, no other addresses
are specified. When the type of the segment requires a local address,
this leaf specifies the remote IPv4 address.
    """
    return self.__remote_ipv4_address
      
  def _set_remote_ipv4_address(self, v, load=False):
    """
    Setter method for remote_ipv4_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists/segment_list/segments/segment/state/remote_ipv4_address (oc-inet:ipv4-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_remote_ipv4_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_remote_ipv4_address() directly.

    YANG Description: An IPv4 address specified as the remote node address. When the type
of the segment specifies only the remote address, no other addresses
are specified. When the type of the segment requires a local address,
this leaf specifies the remote IPv4 address.
    """
    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}'}), is_leaf=True, yang_name="remote-ipv4-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """remote_ipv4_address must be of a type compatible with oc-inet:ipv4-address""",
          'defined-type': "oc-inet:ipv4-address",
          '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}'}), is_leaf=True, yang_name="remote-ipv4-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-address', is_config=False)""",
        })

    self.__remote_ipv4_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_remote_ipv4_address(self):
    self.__remote_ipv4_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}'}), is_leaf=True, yang_name="remote-ipv4-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-address', is_config=False)


  def _get_local_ipv4_address(self):
    """
    Getter method for local_ipv4_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists/segment_list/segments/segment/state/local_ipv4_address (oc-inet:ipv4-address)

    YANG Description: An IPv4 address of a local adjacency that is used to identify
the segment.
    """
    return self.__local_ipv4_address
      
  def _set_local_ipv4_address(self, v, load=False):
    """
    Setter method for local_ipv4_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists/segment_list/segments/segment/state/local_ipv4_address (oc-inet:ipv4-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_ipv4_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_ipv4_address() directly.

    YANG Description: An IPv4 address of a local adjacency that is used to identify
the segment.
    """
    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}'}), is_leaf=True, yang_name="local-ipv4-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_ipv4_address must be of a type compatible with oc-inet:ipv4-address""",
          'defined-type': "oc-inet:ipv4-address",
          '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}'}), is_leaf=True, yang_name="local-ipv4-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-address', is_config=False)""",
        })

    self.__local_ipv4_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_ipv4_address(self):
    self.__local_ipv4_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}'}), is_leaf=True, yang_name="local-ipv4-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-address', is_config=False)


  def _get_remote_ipv6_address(self):
    """
    Getter method for remote_ipv6_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists/segment_list/segments/segment/state/remote_ipv6_address (oc-inet:ipv6-address)

    YANG Description: An IPv6 address specified as the remote node address. When the type
of the segment specifies only the remote address, no other addresses
are specified. When the type of the segment requires a local address,
this leaf specifies the remote IPv6 address.
    """
    return self.__remote_ipv6_address
      
  def _set_remote_ipv6_address(self, v, load=False):
    """
    Setter method for remote_ipv6_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists/segment_list/segments/segment/state/remote_ipv6_address (oc-inet:ipv6-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_remote_ipv6_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_remote_ipv6_address() directly.

    YANG Description: An IPv6 address specified as the remote node address. When the type
of the segment specifies only the remote address, no other addresses
are specified. When the type of the segment requires a local address,
this leaf specifies the remote IPv6 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]{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}|:))'}), is_leaf=True, yang_name="remote-ipv6-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """remote_ipv6_address must be of a type compatible with oc-inet:ipv6-address""",
          'defined-type': "oc-inet:ipv6-address",
          '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}|:))'}), is_leaf=True, yang_name="remote-ipv6-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-address', is_config=False)""",
        })

    self.__remote_ipv6_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_remote_ipv6_address(self):
    self.__remote_ipv6_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}|:))'}), is_leaf=True, yang_name="remote-ipv6-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-address', is_config=False)


  def _get_local_ipv6_address(self):
    """
    Getter method for local_ipv6_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists/segment_list/segments/segment/state/local_ipv6_address (oc-inet:ipv6-address)

    YANG Description: An IPv6 address of a local adjacency that is used to identify the
segment.
    """
    return self.__local_ipv6_address
      
  def _set_local_ipv6_address(self, v, load=False):
    """
    Setter method for local_ipv6_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists/segment_list/segments/segment/state/local_ipv6_address (oc-inet:ipv6-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_ipv6_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_ipv6_address() directly.

    YANG Description: An IPv6 address of a local adjacency that is used to identify the
segment.
    """
    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}|:))'}), is_leaf=True, yang_name="local-ipv6-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_ipv6_address must be of a type compatible with oc-inet:ipv6-address""",
          'defined-type': "oc-inet:ipv6-address",
          '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}|:))'}), is_leaf=True, yang_name="local-ipv6-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-address', is_config=False)""",
        })

    self.__local_ipv6_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_ipv6_address(self):
    self.__local_ipv6_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}|:))'}), is_leaf=True, yang_name="local-ipv6-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-address', is_config=False)


  def _get_local_interface_id(self):
    """
    Getter method for local_interface_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists/segment_list/segments/segment/state/local_interface_id (uint32)

    YANG Description: The local interface identifier to be utilised for the segment.
    """
    return self.__local_interface_id
      
  def _set_local_interface_id(self, v, load=False):
    """
    Setter method for local_interface_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists/segment_list/segments/segment/state/local_interface_id (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_interface_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_interface_id() directly.

    YANG Description: The local interface identifier to be utilised for the segment.
    """
    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="local-interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_interface_id 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="local-interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__local_interface_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_interface_id(self):
    self.__local_interface_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="local-interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  index = __builtin__.property(_get_index)
  type = __builtin__.property(_get_type)
  sid = __builtin__.property(_get_sid)
  mpls_tc = __builtin__.property(_get_mpls_tc)
  mpls_bos = __builtin__.property(_get_mpls_bos)
  mpls_ttl = __builtin__.property(_get_mpls_ttl)
  remote_ipv4_address = __builtin__.property(_get_remote_ipv4_address)
  local_ipv4_address = __builtin__.property(_get_local_ipv4_address)
  remote_ipv6_address = __builtin__.property(_get_remote_ipv6_address)
  local_ipv6_address = __builtin__.property(_get_local_ipv6_address)
  local_interface_id = __builtin__.property(_get_local_interface_id)


  _pyangbind_elements = OrderedDict([('index', index), ('type', type), ('sid', sid), ('mpls_tc', mpls_tc), ('mpls_bos', mpls_bos), ('mpls_ttl', mpls_ttl), ('remote_ipv4_address', remote_ipv4_address), ('local_ipv4_address', local_ipv4_address), ('remote_ipv6_address', remote_ipv6_address), ('local_ipv6_address', local_ipv6_address), ('local_interface_id', local_interface_id), ])


class yc_segment_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_segment_lists_segment_list_segments_segment(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/attr-sets/attr-set/tunnel-encapsulation/tunnels/tunnel/subtlvs/subtlv/segment-lists/segment-list/segments/segment. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of segments within the SR-TE segment list.
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__state',)

  _yang_name = 'segment'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_segment_lists_segment_list_segments_segment_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'attr-sets', 'attr-set', 'tunnel-encapsulation', 'tunnels', 'tunnel', 'subtlvs', 'subtlv', 'segment-lists', 'segment-list', 'segments', 'segment']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists/segment_list/segments/segment/index (leafref)

    YANG Description: Reference to the index of the segment within the
segment list.
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists/segment_list/segments/segment/index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: Reference to the index of the segment within the
segment list.
    """
    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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_index(self):
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists/segment_list/segments/segment/state (container)

    YANG Description: State parameters relating to the segment within
the segment list.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists/segment_list/segments/segment/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 parameters relating to the segment within
the segment list.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_segment_lists_segment_list_segments_segment_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_segment_lists_segment_list_segments_segment_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_segment_lists_segment_list_segments_segment_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  index = __builtin__.property(_get_index)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('index', index), ('state', state), ])


class yc_segments_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_segment_lists_segment_list_segments(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/attr-sets/attr-set/tunnel-encapsulation/tunnels/tunnel/subtlvs/subtlv/segment-lists/segment-list/segments. 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 segments within the
SR-TE segment list.
  """
  __slots__ = ('_path_helper', '_extmethods', '__segment',)

  _yang_name = 'segments'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__segment = YANGDynClass(base=YANGListType("index",yc_segment_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_segment_lists_segment_list_segments_segment, yang_name="segment", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="segment", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'attr-sets', 'attr-set', 'tunnel-encapsulation', 'tunnels', 'tunnel', 'subtlvs', 'subtlv', 'segment-lists', 'segment-list', 'segments']

  def _get_segment(self):
    """
    Getter method for segment, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists/segment_list/segments/segment (list)

    YANG Description: List of segments within the SR-TE segment list.
    """
    return self.__segment
      
  def _set_segment(self, v, load=False):
    """
    Setter method for segment, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists/segment_list/segments/segment (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_segment is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_segment() directly.

    YANG Description: List of segments within the SR-TE segment list.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("index",yc_segment_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_segment_lists_segment_list_segments_segment, yang_name="segment", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="segment", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """segment must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("index",yc_segment_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_segment_lists_segment_list_segments_segment, yang_name="segment", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="segment", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__segment = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_segment(self):
    self.__segment = YANGDynClass(base=YANGListType("index",yc_segment_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_segment_lists_segment_list_segments_segment, yang_name="segment", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="segment", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  segment = __builtin__.property(_get_segment)


  _pyangbind_elements = OrderedDict([('segment', segment), ])


class yc_segment_list_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_segment_lists_segment_list(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/attr-sets/attr-set/tunnel-encapsulation/tunnels/tunnel/subtlvs/subtlv/segment-lists/segment-list. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of segment lists that are specified within the
tunnel encapsulation attribute.
  """
  __slots__ = ('_path_helper', '_extmethods', '__instance_id','__state','__segments',)

  _yang_name = 'segment-list'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__instance_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="instance-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_segment_lists_segment_list_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__segments = YANGDynClass(base=yc_segments_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_segment_lists_segment_list_segments, is_container='container', yang_name="segments", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'attr-sets', 'attr-set', 'tunnel-encapsulation', 'tunnels', 'tunnel', 'subtlvs', 'subtlv', 'segment-lists', 'segment-list']

  def _get_instance_id(self):
    """
    Getter method for instance_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists/segment_list/instance_id (leafref)

    YANG Description: Reference to the instance identifier of the Segment List
that is included within the tunnel encapsulation
attribute.
    """
    return self.__instance_id
      
  def _set_instance_id(self, v, load=False):
    """
    Setter method for instance_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists/segment_list/instance_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_instance_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_instance_id() directly.

    YANG Description: Reference to the instance identifier of the Segment List
that is included within the tunnel encapsulation
attribute.
    """
    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="instance-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """instance_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="instance-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__instance_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_instance_id(self):
    self.__instance_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="instance-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists/segment_list/state (container)

    YANG Description: State parameters relating to the Segment List within the
Tunnel Encapsulation attribute.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists/segment_list/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 parameters relating to the Segment List within the
Tunnel Encapsulation attribute.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_segment_lists_segment_list_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_segment_lists_segment_list_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_segment_lists_segment_list_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_segments(self):
    """
    Getter method for segments, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists/segment_list/segments (container)

    YANG Description: Surrounding container for the list of segments within the
SR-TE segment list.
    """
    return self.__segments
      
  def _set_segments(self, v, load=False):
    """
    Setter method for segments, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists/segment_list/segments (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_segments is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_segments() directly.

    YANG Description: Surrounding container for the list of segments within the
SR-TE segment list.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_segments_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_segment_lists_segment_list_segments, is_container='container', yang_name="segments", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """segments must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_segments_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_segment_lists_segment_list_segments, is_container='container', yang_name="segments", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__segments = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_segments(self):
    self.__segments = YANGDynClass(base=yc_segments_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_segment_lists_segment_list_segments, is_container='container', yang_name="segments", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  instance_id = __builtin__.property(_get_instance_id)
  state = __builtin__.property(_get_state)
  segments = __builtin__.property(_get_segments)


  _pyangbind_elements = OrderedDict([('instance_id', instance_id), ('state', state), ('segments', segments), ])


class yc_segment_lists_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_segment_lists(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/attr-sets/attr-set/tunnel-encapsulation/tunnels/tunnel/subtlvs/subtlv/segment-lists. 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 segment lists that are
associated with a SR-TE Policy tunnel.
  """
  __slots__ = ('_path_helper', '_extmethods', '__segment_list',)

  _yang_name = 'segment-lists'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__segment_list = YANGDynClass(base=YANGListType("instance_id",yc_segment_list_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_segment_lists_segment_list, yang_name="segment-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='instance-id', extensions=None), is_container='list', yang_name="segment-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'attr-sets', 'attr-set', 'tunnel-encapsulation', 'tunnels', 'tunnel', 'subtlvs', 'subtlv', 'segment-lists']

  def _get_segment_list(self):
    """
    Getter method for segment_list, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists/segment_list (list)

    YANG Description: List of segment lists that are specified within the
tunnel encapsulation attribute.
    """
    return self.__segment_list
      
  def _set_segment_list(self, v, load=False):
    """
    Setter method for segment_list, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists/segment_list (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_segment_list is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_segment_list() directly.

    YANG Description: List of segment lists that are specified within the
tunnel encapsulation attribute.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("instance_id",yc_segment_list_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_segment_lists_segment_list, yang_name="segment-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='instance-id', extensions=None), is_container='list', yang_name="segment-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """segment_list must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("instance_id",yc_segment_list_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_segment_lists_segment_list, yang_name="segment-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='instance-id', extensions=None), is_container='list', yang_name="segment-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__segment_list = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_segment_list(self):
    self.__segment_list = YANGDynClass(base=YANGListType("instance_id",yc_segment_list_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_segment_lists_segment_list, yang_name="segment-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='instance-id', extensions=None), is_container='list', yang_name="segment-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  segment_list = __builtin__.property(_get_segment_list)


  _pyangbind_elements = OrderedDict([('segment_list', segment_list), ])


class yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/attr-sets/attr-set/tunnel-encapsulation/tunnels/tunnel/subtlvs/subtlv. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of the subTLVs that are specified within the
TLV instance inside the tunnel encapsulation attribute.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__state','__remote_endpoints','__segment_lists',)

  _yang_name = 'subtlv'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__remote_endpoints = YANGDynClass(base=yc_remote_endpoints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_remote_endpoints, is_container='container', yang_name="remote-endpoints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__segment_lists = YANGDynClass(base=yc_segment_lists_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_segment_lists, is_container='container', yang_name="segment-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'attr-sets', 'attr-set', 'tunnel-encapsulation', 'tunnels', 'tunnel', 'subtlvs', 'subtlv']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/type (leafref)

    YANG Description: Reference to the sub-TLV type that is included within
the subTLV.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/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 sub-TLV type that is included within
the subTLV.
    """
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/state (container)

    YANG Description: State parameters of the subTLV of the tunnel attribute
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/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 parameters of the subTLV of the tunnel attribute
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_remote_endpoints(self):
    """
    Getter method for remote_endpoints, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/remote_endpoints (container)

    YANG Description: The remote endpoints associated with the tunnel
described by the attribute.
    """
    return self.__remote_endpoints
      
  def _set_remote_endpoints(self, v, load=False):
    """
    Setter method for remote_endpoints, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/remote_endpoints (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_remote_endpoints is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_remote_endpoints() directly.

    YANG Description: The remote endpoints associated with the tunnel
described by the attribute.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_remote_endpoints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_remote_endpoints, is_container='container', yang_name="remote-endpoints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """remote_endpoints must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_remote_endpoints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_remote_endpoints, is_container='container', yang_name="remote-endpoints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__remote_endpoints = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_remote_endpoints(self):
    self.__remote_endpoints = YANGDynClass(base=yc_remote_endpoints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_remote_endpoints, is_container='container', yang_name="remote-endpoints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_segment_lists(self):
    """
    Getter method for segment_lists, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists (container)

    YANG Description: Surrounding container for the list of segment lists that are
associated with a SR-TE Policy tunnel.
    """
    return self.__segment_lists
      
  def _set_segment_lists(self, v, load=False):
    """
    Setter method for segment_lists, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv/segment_lists (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_segment_lists is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_segment_lists() directly.

    YANG Description: Surrounding container for the list of segment lists that are
associated with a SR-TE Policy tunnel.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_segment_lists_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_segment_lists, is_container='container', yang_name="segment-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """segment_lists must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_segment_lists_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_segment_lists, is_container='container', yang_name="segment-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__segment_lists = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_segment_lists(self):
    self.__segment_lists = YANGDynClass(base=yc_segment_lists_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv_segment_lists, is_container='container', yang_name="segment-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  type = __builtin__.property(_get_type)
  state = __builtin__.property(_get_state)
  remote_endpoints = __builtin__.property(_get_remote_endpoints)
  segment_lists = __builtin__.property(_get_segment_lists)


  _pyangbind_elements = OrderedDict([('type', type), ('state', state), ('remote_endpoints', remote_endpoints), ('segment_lists', segment_lists), ])


class yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/attr-sets/attr-set/tunnel-encapsulation/tunnels/tunnel/subtlvs. 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 sub-TLVs within
the tunnel encapsulation attribute.
  """
  __slots__ = ('_path_helper', '_extmethods', '__subtlv',)

  _yang_name = 'subtlvs'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__subtlv = YANGDynClass(base=YANGListType("type",yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv, yang_name="subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'attr-sets', 'attr-set', 'tunnel-encapsulation', 'tunnels', 'tunnel', 'subtlvs']

  def _get_subtlv(self):
    """
    Getter method for subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv (list)

    YANG Description: List of the subTLVs that are specified within the
TLV instance inside the tunnel encapsulation attribute.
    """
    return self.__subtlv
      
  def _set_subtlv(self, v, load=False):
    """
    Setter method for subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs/subtlv (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_subtlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_subtlv() directly.

    YANG Description: List of the subTLVs that are specified within the
TLV instance inside the tunnel encapsulation attribute.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("type",yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv, yang_name="subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """subtlv must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("type",yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv, yang_name="subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__subtlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_subtlv(self):
    self.__subtlv = YANGDynClass(base=YANGListType("type",yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs_subtlv, yang_name="subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  subtlv = __builtin__.property(_get_subtlv)


  _pyangbind_elements = OrderedDict([('subtlv', subtlv), ])


class yc_tunnel_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/attr-sets/attr-set/tunnel-encapsulation/tunnels/tunnel. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of the tunnels that are specified within the
attribute. Keyed on the type of tunnel that the
TLV describes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__state','__subtlvs',)

  _yang_name = 'tunnel'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__subtlvs = YANGDynClass(base=yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs, is_container='container', yang_name="subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'attr-sets', 'attr-set', 'tunnel-encapsulation', 'tunnels', 'tunnel']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/type (leafref)

    YANG Description: Reference to the tunnel type specified within the
TLV's type field.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/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 tunnel type specified within the
TLV's type field.
    """
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/state (container)

    YANG Description: State parameters of the tunnel attribute
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/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 parameters of the tunnel attribute
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_subtlvs(self):
    """
    Getter method for subtlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs (container)

    YANG Description: Surrounding container for the list of sub-TLVs within
the tunnel encapsulation attribute.
    """
    return self.__subtlvs
      
  def _set_subtlvs(self, v, load=False):
    """
    Setter method for subtlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel/subtlvs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_subtlvs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_subtlvs() directly.

    YANG Description: Surrounding container for the list of sub-TLVs within
the tunnel encapsulation attribute.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs, is_container='container', yang_name="subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """subtlvs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs, is_container='container', yang_name="subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__subtlvs = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_subtlvs(self):
    self.__subtlvs = YANGDynClass(base=yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel_subtlvs, is_container='container', yang_name="subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  type = __builtin__.property(_get_type)
  state = __builtin__.property(_get_state)
  subtlvs = __builtin__.property(_get_subtlvs)


  _pyangbind_elements = OrderedDict([('type', type), ('state', state), ('subtlvs', subtlvs), ])


class yc_tunnels_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/attr-sets/attr-set/tunnel-encapsulation/tunnels. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Surrounding container for the set of tunnels included
within the tunnel encapsulation attribute.
  """
  __slots__ = ('_path_helper', '_extmethods', '__tunnel',)

  _yang_name = 'tunnels'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__tunnel = YANGDynClass(base=YANGListType("type",yc_tunnel_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'attr-sets', 'attr-set', 'tunnel-encapsulation', 'tunnels']

  def _get_tunnel(self):
    """
    Getter method for tunnel, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel (list)

    YANG Description: List of the tunnels that are specified within the
attribute. Keyed on the type of tunnel that the
TLV describes.
    """
    return self.__tunnel
      
  def _set_tunnel(self, v, load=False):
    """
    Setter method for tunnel, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels/tunnel (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tunnel is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tunnel() directly.

    YANG Description: List of the tunnels that are specified within the
attribute. Keyed on the type of tunnel that the
TLV describes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("type",yc_tunnel_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tunnel must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("type",yc_tunnel_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__tunnel = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tunnel(self):
    self.__tunnel = YANGDynClass(base=YANGListType("type",yc_tunnel_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels_tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  tunnel = __builtin__.property(_get_tunnel)


  _pyangbind_elements = OrderedDict([('tunnel', tunnel), ])


class yc_tunnel_encapsulation_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/attr-sets/attr-set/tunnel-encapsulation. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The Tunnel Encapsulation attribute specifies a set of
tunnels to a remote destination. The attribute is TLV
based and allows description of a tunnel type, and the
relevant information to create the tunnel to the remote
destination.
  """
  __slots__ = ('_path_helper', '_extmethods', '__tunnels',)

  _yang_name = 'tunnel-encapsulation'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__tunnels = YANGDynClass(base=yc_tunnels_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'attr-sets', 'attr-set', 'tunnel-encapsulation']

  def _get_tunnels(self):
    """
    Getter method for tunnels, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels (container)

    YANG Description: Surrounding container for the set of tunnels included
within the tunnel encapsulation attribute.
    """
    return self.__tunnels
      
  def _set_tunnels(self, v, load=False):
    """
    Setter method for tunnels, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation/tunnels (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tunnels is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tunnels() directly.

    YANG Description: Surrounding container for the set of tunnels included
within the tunnel encapsulation attribute.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_tunnels_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tunnels must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_tunnels_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__tunnels = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tunnels(self):
    self.__tunnels = YANGDynClass(base=yc_tunnels_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation_tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  tunnels = __builtin__.property(_get_tunnels)


  _pyangbind_elements = OrderedDict([('tunnels', tunnels), ])


class yc_attr_set_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/attr-sets/attr-set. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of path attributes that may be in use by multiple
routes in the table
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__state','__aggregator','__as_path','__as4_path','__tunnel_encapsulation',)

  _yang_name = 'attr-set'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__aggregator = YANGDynClass(base=yc_aggregator_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_aggregator, is_container='container', yang_name="aggregator", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__as_path = YANGDynClass(base=yc_as_path_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_as_path, is_container='container', yang_name="as-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__as4_path = YANGDynClass(base=yc_as4_path_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_as4_path, is_container='container', yang_name="as4-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__tunnel_encapsulation = YANGDynClass(base=yc_tunnel_encapsulation_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation, is_container='container', yang_name="tunnel-encapsulation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'attr-sets', 'attr-set']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/index (leafref)

    YANG Description: Reference to list key
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_index(self):
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/state (container)

    YANG Description: Operational state for common path attributes
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/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 common path attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_aggregator(self):
    """
    Getter method for aggregator, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/aggregator (container)

    YANG Description: BGP attribute indicating the prefix has been aggregated by
the specified AS and router.
    """
    return self.__aggregator
      
  def _set_aggregator(self, v, load=False):
    """
    Setter method for aggregator, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/aggregator (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_aggregator is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_aggregator() directly.

    YANG Description: BGP attribute indicating the prefix has been aggregated by
the specified AS and router.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_aggregator_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_aggregator, is_container='container', yang_name="aggregator", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """aggregator must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_aggregator_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_aggregator, is_container='container', yang_name="aggregator", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__aggregator = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_aggregator(self):
    self.__aggregator = YANGDynClass(base=yc_aggregator_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_aggregator, is_container='container', yang_name="aggregator", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_as_path(self):
    """
    Getter method for as_path, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/as_path (container)

    YANG Description: Enclosing container for the list of AS path segments.

In the Adj-RIB-In or Adj-RIB-Out, this list should show
the received or sent AS_PATH, respectively.  For
example, if the local router is not 4-byte capable, this
value should consist of 2-octet ASNs or the AS_TRANS
(AS 23456) values received or sent in route updates.

In the Loc-RIB, this list should reflect the effective
AS path for the route, e.g., a 4-octet value if the
local router is 4-octet capable.
    """
    return self.__as_path
      
  def _set_as_path(self, v, load=False):
    """
    Setter method for as_path, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/as_path (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_as_path is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_as_path() directly.

    YANG Description: Enclosing container for the list of AS path segments.

In the Adj-RIB-In or Adj-RIB-Out, this list should show
the received or sent AS_PATH, respectively.  For
example, if the local router is not 4-byte capable, this
value should consist of 2-octet ASNs or the AS_TRANS
(AS 23456) values received or sent in route updates.

In the Loc-RIB, this list should reflect the effective
AS path for the route, e.g., a 4-octet value if the
local router is 4-octet capable.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_as_path_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_as_path, is_container='container', yang_name="as-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """as_path must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_as_path_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_as_path, is_container='container', yang_name="as-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__as_path = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_as_path(self):
    self.__as_path = YANGDynClass(base=yc_as_path_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_as_path, is_container='container', yang_name="as-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_as4_path(self):
    """
    Getter method for as4_path, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/as4_path (container)

    YANG Description: This is the path encoded with 4-octet
AS numbers in the optional transitive AS4_PATH attribute.
This value is populated with the received or sent attribute
in Adj-RIB-In or Adj-RIB-Out, respectively.  It should not
be populated in Loc-RIB since the Loc-RIB is expected to
store the effective AS-Path in the as-path leaf regardless
of being 4-octet or 2-octet.
    """
    return self.__as4_path
      
  def _set_as4_path(self, v, load=False):
    """
    Setter method for as4_path, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/as4_path (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_as4_path is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_as4_path() directly.

    YANG Description: This is the path encoded with 4-octet
AS numbers in the optional transitive AS4_PATH attribute.
This value is populated with the received or sent attribute
in Adj-RIB-In or Adj-RIB-Out, respectively.  It should not
be populated in Loc-RIB since the Loc-RIB is expected to
store the effective AS-Path in the as-path leaf regardless
of being 4-octet or 2-octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_as4_path_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_as4_path, is_container='container', yang_name="as4-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """as4_path must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_as4_path_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_as4_path, is_container='container', yang_name="as4-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__as4_path = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_as4_path(self):
    self.__as4_path = YANGDynClass(base=yc_as4_path_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_as4_path, is_container='container', yang_name="as4-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_tunnel_encapsulation(self):
    """
    Getter method for tunnel_encapsulation, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation (container)

    YANG Description: The Tunnel Encapsulation attribute specifies a set of
tunnels to a remote destination. The attribute is TLV
based and allows description of a tunnel type, and the
relevant information to create the tunnel to the remote
destination.
    """
    return self.__tunnel_encapsulation
      
  def _set_tunnel_encapsulation(self, v, load=False):
    """
    Setter method for tunnel_encapsulation, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set/tunnel_encapsulation (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tunnel_encapsulation is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tunnel_encapsulation() directly.

    YANG Description: The Tunnel Encapsulation attribute specifies a set of
tunnels to a remote destination. The attribute is TLV
based and allows description of a tunnel type, and the
relevant information to create the tunnel to the remote
destination.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_tunnel_encapsulation_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation, is_container='container', yang_name="tunnel-encapsulation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tunnel_encapsulation must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_tunnel_encapsulation_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation, is_container='container', yang_name="tunnel-encapsulation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__tunnel_encapsulation = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tunnel_encapsulation(self):
    self.__tunnel_encapsulation = YANGDynClass(base=yc_tunnel_encapsulation_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set_tunnel_encapsulation, is_container='container', yang_name="tunnel-encapsulation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  index = __builtin__.property(_get_index)
  state = __builtin__.property(_get_state)
  aggregator = __builtin__.property(_get_aggregator)
  as_path = __builtin__.property(_get_as_path)
  as4_path = __builtin__.property(_get_as4_path)
  tunnel_encapsulation = __builtin__.property(_get_tunnel_encapsulation)


  _pyangbind_elements = OrderedDict([('index', index), ('state', state), ('aggregator', aggregator), ('as_path', as_path), ('as4_path', as4_path), ('tunnel_encapsulation', tunnel_encapsulation), ])


class yc_attr_sets_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/attr-sets. 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 path attribute sets
  """
  __slots__ = ('_path_helper', '_extmethods', '__attr_set',)

  _yang_name = 'attr-sets'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__attr_set = YANGDynClass(base=YANGListType("index",yc_attr_set_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set, yang_name="attr-set", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="attr-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'attr-sets']

  def _get_attr_set(self):
    """
    Getter method for attr_set, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set (list)

    YANG Description: List of path attributes that may be in use by multiple
routes in the table
    """
    return self.__attr_set
      
  def _set_attr_set(self, v, load=False):
    """
    Setter method for attr_set, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets/attr_set (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_set is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_set() directly.

    YANG Description: List of path attributes that may be in use by multiple
routes in the table
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("index",yc_attr_set_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set, yang_name="attr-set", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="attr-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_set must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("index",yc_attr_set_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set, yang_name="attr-set", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="attr-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__attr_set = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_set(self):
    self.__attr_set = YANGDynClass(base=YANGListType("index",yc_attr_set_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets_attr_set, yang_name="attr-set", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="attr-set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  attr_set = __builtin__.property(_get_attr_set)


  _pyangbind_elements = OrderedDict([('attr_set', attr_set), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_communities_community_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/communities/community/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for shared BGP community attribute
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__community',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__community = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'NO_EXPORT': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:NO_EXPORT': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:NO_EXPORT': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'NO_ADVERTISE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:NO_ADVERTISE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:NO_ADVERTISE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'NO_EXPORT_SUBCONFED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:NO_EXPORT_SUBCONFED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:NO_EXPORT_SUBCONFED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'NOPEER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:NOPEER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:NOPEER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},),RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),]), is_leaf=False, yang_name="community", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'communities', 'community', 'state']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/communities/community/state/index (uint64)

    YANG Description: System generated index for each attribute set.  The
index is used to reference an attribute set from a
specific path.  Multiple paths may reference the same
attribute set.
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/communities/community/state/index (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: System generated index for each attribute set.  The
index is used to reference an attribute set from a
specific path.  Multiple paths may reference the same
attribute set.
    """
    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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_index(self):
    self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_community(self):
    """
    Getter method for community, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/communities/community/state/community (union)

    YANG Description: List of standard or well-known BGP community
attributes.
    """
    return self.__community
      
  def _set_community(self, v, load=False):
    """
    Setter method for community, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/communities/community/state/community (union)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_community is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_community() directly.

    YANG Description: List of standard or well-known BGP community
attributes.
    """
    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={'NO_EXPORT': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:NO_EXPORT': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:NO_EXPORT': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'NO_ADVERTISE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:NO_ADVERTISE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:NO_ADVERTISE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'NO_EXPORT_SUBCONFED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:NO_EXPORT_SUBCONFED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:NO_EXPORT_SUBCONFED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'NOPEER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:NOPEER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:NOPEER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},),RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),]), is_leaf=False, yang_name="community", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """community must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'NO_EXPORT': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:NO_EXPORT': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:NO_EXPORT': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'NO_ADVERTISE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:NO_ADVERTISE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:NO_ADVERTISE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'NO_EXPORT_SUBCONFED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:NO_EXPORT_SUBCONFED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:NO_EXPORT_SUBCONFED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'NOPEER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:NOPEER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:NOPEER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},),RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),]), is_leaf=False, yang_name="community", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)""",
        })

    self.__community = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_community(self):
    self.__community = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'NO_EXPORT': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:NO_EXPORT': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:NO_EXPORT': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'NO_ADVERTISE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:NO_ADVERTISE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:NO_ADVERTISE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'NO_EXPORT_SUBCONFED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:NO_EXPORT_SUBCONFED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:NO_EXPORT_SUBCONFED': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'NOPEER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:NOPEER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:NOPEER': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},),RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),]), is_leaf=False, yang_name="community", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)

  index = __builtin__.property(_get_index)
  community = __builtin__.property(_get_community)


  _pyangbind_elements = OrderedDict([('index', index), ('community', community), ])


class yc_community_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_communities_community(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/communities/community. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of path attributes that may be in use by multiple
routes in the table
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__state',)

  _yang_name = 'community'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_communities_community_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'communities', 'community']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/communities/community/index (leafref)

    YANG Description: Reference to the list key
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/communities/community/index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_index(self):
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/communities/community/state (container)

    YANG Description: Operational state for shared BGP community attribute
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/communities/community/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 shared BGP community attribute
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_communities_community_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_communities_community_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_communities_community_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  index = __builtin__.property(_get_index)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('index', index), ('state', state), ])


class yc_communities_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_communities(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/communities. 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 community attribute
sets
  """
  __slots__ = ('_path_helper', '_extmethods', '__community',)

  _yang_name = 'communities'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__community = YANGDynClass(base=YANGListType("index",yc_community_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_communities_community, yang_name="community", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="community", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'communities']

  def _get_community(self):
    """
    Getter method for community, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/communities/community (list)

    YANG Description: List of path attributes that may be in use by multiple
routes in the table
    """
    return self.__community
      
  def _set_community(self, v, load=False):
    """
    Setter method for community, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/communities/community (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_community is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_community() directly.

    YANG Description: List of path attributes that may be in use by multiple
routes in the table
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("index",yc_community_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_communities_community, yang_name="community", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="community", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """community must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("index",yc_community_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_communities_community, yang_name="community", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="community", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__community = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_community(self):
    self.__community = YANGDynClass(base=YANGListType("index",yc_community_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_communities_community, yang_name="community", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="community", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  community = __builtin__.property(_get_community)


  _pyangbind_elements = OrderedDict([('community', community), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_ext_communities_ext_community_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/ext-communities/ext-community/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for shared BGP extended community
attribute
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__ext_community',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__ext_community = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['8']}),]), is_leaf=False, yang_name="ext-community", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgpt:bgp-ext-community-recv-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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'ext-communities', 'ext-community', 'state']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/ext_communities/ext_community/state/index (uint64)

    YANG Description: System generated index for each attribute set.  The
index is used to reference an attribute set from a
specific path.  Multiple paths may reference the same
attribute set.
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/ext_communities/ext_community/state/index (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: System generated index for each attribute set.  The
index is used to reference an attribute set from a
specific path.  Multiple paths may reference the same
attribute set.
    """
    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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_index(self):
    self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_ext_community(self):
    """
    Getter method for ext_community, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/ext_communities/ext_community/state/ext_community (oc-bgpt:bgp-ext-community-recv-type)

    YANG Description: List of BGP extended community attributes.  The received
extended community may be an explicitly modeled
type or unknown, represented by an 8-octet value
formatted according to RFC 4360.
    """
    return self.__ext_community
      
  def _set_ext_community(self, v, load=False):
    """
    Setter method for ext_community, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/ext_communities/ext_community/state/ext_community (oc-bgpt:bgp-ext-community-recv-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ext_community is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ext_community() directly.

    YANG Description: List of BGP extended community attributes.  The received
extended community may be an explicitly modeled
type or unknown, represented by an 8-octet value
formatted according to RFC 4360.
    """
    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_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['8']}),]), is_leaf=False, yang_name="ext-community", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgpt:bgp-ext-community-recv-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ext_community must be of a type compatible with oc-bgpt:bgp-ext-community-recv-type""",
          'defined-type': "oc-bgpt:bgp-ext-community-recv-type",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['8']}),]), is_leaf=False, yang_name="ext-community", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgpt:bgp-ext-community-recv-type', is_config=False)""",
        })

    self.__ext_community = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ext_community(self):
    self.__ext_community = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['8']}),]), is_leaf=False, yang_name="ext-community", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-bgpt:bgp-ext-community-recv-type', is_config=False)

  index = __builtin__.property(_get_index)
  ext_community = __builtin__.property(_get_ext_community)


  _pyangbind_elements = OrderedDict([('index', index), ('ext_community', ext_community), ])


class yc_ext_community_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_ext_communities_ext_community(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/ext-communities/ext-community. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of path attributes that may be in use by multiple
routes in the table
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__state',)

  _yang_name = 'ext-community'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_ext_communities_ext_community_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'ext-communities', 'ext-community']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/ext_communities/ext_community/index (leafref)

    YANG Description: Reference to the list key
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/ext_communities/ext_community/index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_index(self):
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/ext_communities/ext_community/state (container)

    YANG Description: Operational state for shared BGP extended community
attribute
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/ext_communities/ext_community/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 shared BGP extended community
attribute
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_ext_communities_ext_community_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_ext_communities_ext_community_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_ext_communities_ext_community_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  index = __builtin__.property(_get_index)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('index', index), ('state', state), ])


class yc_ext_communities_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_ext_communities(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/ext-communities. 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 extended community
attribute sets
  """
  __slots__ = ('_path_helper', '_extmethods', '__ext_community',)

  _yang_name = 'ext-communities'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__ext_community = YANGDynClass(base=YANGListType("index",yc_ext_community_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_ext_communities_ext_community, yang_name="ext-community", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="ext-community", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'ext-communities']

  def _get_ext_community(self):
    """
    Getter method for ext_community, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/ext_communities/ext_community (list)

    YANG Description: List of path attributes that may be in use by multiple
routes in the table
    """
    return self.__ext_community
      
  def _set_ext_community(self, v, load=False):
    """
    Setter method for ext_community, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/ext_communities/ext_community (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ext_community is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ext_community() directly.

    YANG Description: List of path attributes that may be in use by multiple
routes in the table
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("index",yc_ext_community_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_ext_communities_ext_community, yang_name="ext-community", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="ext-community", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ext_community must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("index",yc_ext_community_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_ext_communities_ext_community, yang_name="ext-community", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="ext-community", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__ext_community = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ext_community(self):
    self.__ext_community = YANGDynClass(base=YANGListType("index",yc_ext_community_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_ext_communities_ext_community, yang_name="ext-community", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="ext-community", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  ext_community = __builtin__.property(_get_ext_community)


  _pyangbind_elements = OrderedDict([('ext_community', ext_community), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/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 BGP list
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi_safi_name',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi_safi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'state']

  def _get_afi_safi_name(self):
    """
    Getter method for afi_safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/state/afi_safi_name (identityref)

    YANG Description: AFI,SAFI
    """
    return self.__afi_safi_name
      
  def _set_afi_safi_name(self, v, load=False):
    """
    Setter method for afi_safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/state/afi_safi_name (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_safi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_safi_name() directly.

    YANG Description: AFI,SAFI
    """
    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_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_safi_name must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__afi_safi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_safi_name(self):
    self.__afi_safi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  afi_safi_name = __builtin__.property(_get_afi_safi_name)


  _pyangbind_elements = OrderedDict([('afi_safi_name', afi_safi_name), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_loc_rib_routes_route_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/loc-rib/routes/route/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for route entries in the
BGP LOC-RIB
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix','__origin','__path_id','__attr_index','__community_index','__ext_community_index','__last_modified','__valid_route','__invalid_reason',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-prefix', is_config=False)
    self.__origin = 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}'}),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}|:))'}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}},),], is_leaf=True, yang_name="origin", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    self.__path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'loc-rib', 'routes', 'route', 'state']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/state/prefix (oc-inet:ipv4-prefix)

    YANG Description: The IPv4 prefix corresponding to the route
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/state/prefix (oc-inet:ipv4-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: The IPv4 prefix corresponding to the route
    """
    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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-prefix', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-prefix', is_config=False)


  def _get_origin(self):
    """
    Getter method for origin, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/state/origin (union)

    YANG Description: Indicates the origin of the route.  If the route is learned
from a neighbor, this value is the neighbor address.  If
the route was injected or redistributed from another
protocol, the origin indicates the source protocol for the
route.
    """
    return self.__origin
      
  def _set_origin(self, v, load=False):
    """
    Setter method for origin, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/state/origin (union)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_origin is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_origin() directly.

    YANG Description: Indicates the origin of the route.  If the route is learned
from a neighbor, this value is the neighbor address.  If
the route was injected or redistributed from another
protocol, the origin indicates the source protocol for the
route.
    """
    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}'}),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}|:))'}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}},),], is_leaf=True, yang_name="origin", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """origin must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          '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}'}),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}|:))'}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}},),], is_leaf=True, yang_name="origin", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)""",
        })

    self.__origin = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_origin(self):
    self.__origin = 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}'}),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}|:))'}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}},),], is_leaf=True, yang_name="origin", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)


  def _get_path_id(self):
    """
    Getter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/state/path_id (uint32)

    YANG Description: If the route is learned from a neighbor, the path-id
corresponds to the path-id for the route in the
corresponding adj-rib-in-post table.  If the route is
injected from another protocol, or the neighbor does not
support BGP add-paths, the path-id should be set
to zero, also the default value.
    """
    return self.__path_id
      
  def _set_path_id(self, v, load=False):
    """
    Setter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/state/path_id (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_id() directly.

    YANG Description: If the route is learned from a neighbor, the path-id
corresponds to the path-id for the route in the
corresponding adj-rib-in-post table.  If the route is
injected from another protocol, or the neighbor does not
support BGP add-paths, the path-id should be set
to zero, also the default value.
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_id 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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_id(self):
    self.__path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_attr_index(self):
    """
    Getter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/state/attr_index (leafref)

    YANG Description: Reference to the common attribute group for the
route
    """
    return self.__attr_index
      
  def _set_attr_index(self, v, load=False):
    """
    Setter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/state/attr_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_index() directly.

    YANG Description: Reference to the common attribute group for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_index(self):
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_community_index(self):
    """
    Getter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/state/community_index (leafref)

    YANG Description: Reference to the community attribute for the route
    """
    return self.__community_index
      
  def _set_community_index(self, v, load=False):
    """
    Setter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/state/community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_community_index() directly.

    YANG Description: Reference to the community attribute for the route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_community_index(self):
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_ext_community_index(self):
    """
    Getter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/state/ext_community_index (leafref)

    YANG Description: Reference to the extended community attribute for the
route
    """
    return self.__ext_community_index
      
  def _set_ext_community_index(self, v, load=False):
    """
    Setter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/state/ext_community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ext_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ext_community_index() directly.

    YANG Description: Reference to the extended community attribute for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ext_community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__ext_community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ext_community_index(self):
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_last_modified(self):
    """
    Getter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/state/last_modified (oc-types:timeticks64)

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    return self.__last_modified
      
  def _set_last_modified(self, v, load=False):
    """
    Setter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/state/last_modified (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_last_modified is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_last_modified() directly.

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    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="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """last_modified must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__last_modified = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_last_modified(self):
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_valid_route(self):
    """
    Getter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/state/valid_route (boolean)

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    return self.__valid_route
      
  def _set_valid_route(self, v, load=False):
    """
    Setter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/state/valid_route (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_valid_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_valid_route() directly.

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """valid_route must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__valid_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_valid_route(self):
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_invalid_reason(self):
    """
    Getter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/state/invalid_reason (identityref)

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    return self.__invalid_reason
      
  def _set_invalid_reason(self, v, load=False):
    """
    Setter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/state/invalid_reason (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_invalid_reason is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_invalid_reason() directly.

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    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={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """invalid_reason must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__invalid_reason = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_invalid_reason(self):
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  prefix = __builtin__.property(_get_prefix)
  origin = __builtin__.property(_get_origin)
  path_id = __builtin__.property(_get_path_id)
  attr_index = __builtin__.property(_get_attr_index)
  community_index = __builtin__.property(_get_community_index)
  ext_community_index = __builtin__.property(_get_ext_community_index)
  last_modified = __builtin__.property(_get_last_modified)
  valid_route = __builtin__.property(_get_valid_route)
  invalid_reason = __builtin__.property(_get_invalid_reason)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ('origin', origin), ('path_id', path_id), ('attr_index', attr_index), ('community_index', community_index), ('ext_community_index', ext_community_index), ('last_modified', last_modified), ('valid_route', valid_route), ('invalid_reason', invalid_reason), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_loc_rib_routes_route_unknown_attributes_unknown_attribute_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/loc-rib/routes/route/unknown-attributes/unknown-attribute/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for unknown route attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__optional','__transitive','__partial','__extended','__attr_type','__attr_len','__attr_value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'loc-rib', 'routes', 'route', 'unknown-attributes', 'unknown-attribute', 'state']

  def _get_optional(self):
    """
    Getter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/optional (boolean)

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    return self.__optional
      
  def _set_optional(self, v, load=False):
    """
    Setter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/optional (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_optional is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_optional() directly.

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """optional must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__optional = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_optional(self):
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_transitive(self):
    """
    Getter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/transitive (boolean)

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    return self.__transitive
      
  def _set_transitive(self, v, load=False):
    """
    Setter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/transitive (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transitive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transitive() directly.

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transitive must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__transitive = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transitive(self):
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_partial(self):
    """
    Getter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/partial (boolean)

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    return self.__partial
      
  def _set_partial(self, v, load=False):
    """
    Setter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/partial (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_partial is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_partial() directly.

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """partial must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__partial = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_partial(self):
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_extended(self):
    """
    Getter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/extended (boolean)

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    return self.__extended
      
  def _set_extended(self, v, load=False):
    """
    Setter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/extended (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended() directly.

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__extended = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended(self):
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/attr_type (uint8)

    YANG Description: 1-octet value encoding the attribute type code
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/attr_type (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() directly.

    YANG Description: 1-octet value encoding the attribute type code
    """
    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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_attr_len(self):
    """
    Getter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/attr_len (uint16)

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    return self.__attr_len
      
  def _set_attr_len(self, v, load=False):
    """
    Setter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/attr_len (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_len() directly.

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_len 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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__attr_len = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_len(self):
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_attr_value(self):
    """
    Getter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/attr_value (binary)

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    return self.__attr_value
      
  def _set_attr_value(self, v, load=False):
    """
    Setter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/attr_value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_value() directly.

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__attr_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_value(self):
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  optional = __builtin__.property(_get_optional)
  transitive = __builtin__.property(_get_transitive)
  partial = __builtin__.property(_get_partial)
  extended = __builtin__.property(_get_extended)
  attr_type = __builtin__.property(_get_attr_type)
  attr_len = __builtin__.property(_get_attr_len)
  attr_value = __builtin__.property(_get_attr_value)


  _pyangbind_elements = OrderedDict([('optional', optional), ('transitive', transitive), ('partial', partial), ('extended', extended), ('attr_type', attr_type), ('attr_len', attr_len), ('attr_value', attr_value), ])


class yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_loc_rib_routes_route_unknown_attributes_unknown_attribute(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/loc-rib/routes/route/unknown-attributes/unknown-attribute. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
  """
  __slots__ = ('_path_helper', '_extmethods', '__attr_type','__state',)

  _yang_name = 'unknown-attribute'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_loc_rib_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'loc-rib', 'routes', 'route', 'unknown-attributes', 'unknown-attribute']

  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/unknown_attributes/unknown_attribute/attr_type (leafref)

    YANG Description: Reference to the list key
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/unknown_attributes/unknown_attribute/attr_type (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/unknown_attributes/unknown_attribute/state (container)

    YANG Description: Operational state for unknown route attributes
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/unknown_attributes/unknown_attribute/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 unknown route attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_loc_rib_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_loc_rib_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_loc_rib_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  attr_type = __builtin__.property(_get_attr_type)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('attr_type', attr_type), ('state', state), ])


class yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_loc_rib_routes_route_unknown_attributes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/loc-rib/routes/route/unknown-attributes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
  """
  __slots__ = ('_path_helper', '_extmethods', '__unknown_attribute',)

  _yang_name = 'unknown-attributes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_loc_rib_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'loc-rib', 'routes', 'route', 'unknown-attributes']

  def _get_unknown_attribute(self):
    """
    Getter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/unknown_attributes/unknown_attribute (list)

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    return self.__unknown_attribute
      
  def _set_unknown_attribute(self, v, load=False):
    """
    Setter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/unknown_attributes/unknown_attribute (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attribute is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attribute() directly.

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_loc_rib_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attribute must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_loc_rib_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__unknown_attribute = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attribute(self):
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_loc_rib_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  unknown_attribute = __builtin__.property(_get_unknown_attribute)


  _pyangbind_elements = OrderedDict([('unknown_attribute', unknown_attribute), ])


class yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_loc_rib_routes_route(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/loc-rib/routes/route. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of routes in the table, keyed by the route
prefix, the route origin, and path-id.  The route
origin can be either the neighbor address from which
the route was learned, or the source protocol that
injected the route.  The path-id distinguishes routes
for the same prefix received from a neighbor (e.g.,
if add-paths is eanbled).
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix','__origin','__path_id','__state','__unknown_attributes',)

  _yang_name = 'route'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__origin = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="origin", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_loc_rib_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_loc_rib_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'loc-rib', 'routes', 'route']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/prefix (leafref)

    YANG Description: Reference to the prefix list key
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/prefix (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: Reference to the prefix 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_origin(self):
    """
    Getter method for origin, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/origin (leafref)

    YANG Description: Reference to the origin list key
    """
    return self.__origin
      
  def _set_origin(self, v, load=False):
    """
    Setter method for origin, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/origin (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_origin is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_origin() directly.

    YANG Description: Reference to the origin 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="origin", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """origin must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="origin", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__origin = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_origin(self):
    self.__origin = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="origin", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_path_id(self):
    """
    Getter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/path_id (leafref)

    YANG Description: Reference to the path-id list key
    """
    return self.__path_id
      
  def _set_path_id(self, v, load=False):
    """
    Setter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/path_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_id() directly.

    YANG Description: Reference to the path-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="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_id(self):
    self.__path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/state (container)

    YANG Description: Operational state data for route entries in the
BGP LOC-RIB
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/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 route entries in the
BGP LOC-RIB
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_loc_rib_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_loc_rib_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_loc_rib_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unknown_attributes(self):
    """
    Getter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/unknown_attributes (container)

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    return self.__unknown_attributes
      
  def _set_unknown_attributes(self, v, load=False):
    """
    Setter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route/unknown_attributes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attributes() directly.

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_loc_rib_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attributes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_loc_rib_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unknown_attributes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attributes(self):
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_loc_rib_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  prefix = __builtin__.property(_get_prefix)
  origin = __builtin__.property(_get_origin)
  path_id = __builtin__.property(_get_path_id)
  state = __builtin__.property(_get_state)
  unknown_attributes = __builtin__.property(_get_unknown_attributes)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ('origin', origin), ('path_id', path_id), ('state', state), ('unknown_attributes', unknown_attributes), ])


class yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_loc_rib_routes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/loc-rib/routes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for list of routes in the routing
table.
  """
  __slots__ = ('_path_helper', '_extmethods', '__route',)

  _yang_name = 'routes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__route = YANGDynClass(base=YANGListType("prefix origin path_id",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_loc_rib_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix origin path-id', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'loc-rib', 'routes']

  def _get_route(self):
    """
    Getter method for route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route (list)

    YANG Description: List of routes in the table, keyed by the route
prefix, the route origin, and path-id.  The route
origin can be either the neighbor address from which
the route was learned, or the source protocol that
injected the route.  The path-id distinguishes routes
for the same prefix received from a neighbor (e.g.,
if add-paths is eanbled).
    """
    return self.__route
      
  def _set_route(self, v, load=False):
    """
    Setter method for route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes/route (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route() directly.

    YANG Description: List of routes in the table, keyed by the route
prefix, the route origin, and path-id.  The route
origin can be either the neighbor address from which
the route was learned, or the source protocol that
injected the route.  The path-id distinguishes routes
for the same prefix received from a neighbor (e.g.,
if add-paths is eanbled).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("prefix origin path_id",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_loc_rib_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix origin path-id', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("prefix origin path_id",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_loc_rib_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix origin path-id', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route(self):
    self.__route = YANGDynClass(base=YANGListType("prefix origin path_id",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_loc_rib_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix origin path-id', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  route = __builtin__.property(_get_route)


  _pyangbind_elements = OrderedDict([('route', route), ])


class yc_loc_rib_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_loc_rib(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/loc-rib. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Container for the IPv4 BGP LOC-RIB data
  """
  __slots__ = ('_path_helper', '_extmethods', '__routes',)

  _yang_name = 'loc-rib'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_loc_rib_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'loc-rib']

  def _get_routes(self):
    """
    Getter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes (container)

    YANG Description: Enclosing container for list of routes in the routing
table.
    """
    return self.__routes
      
  def _set_routes(self, v, load=False):
    """
    Setter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib/routes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_routes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_routes() directly.

    YANG Description: Enclosing container for list of routes in the routing
table.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_loc_rib_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """routes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_loc_rib_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__routes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_routes(self):
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_loc_rib_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  routes = __builtin__.property(_get_routes)


  _pyangbind_elements = OrderedDict([('routes', routes), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/neighbors/neighbor/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for each neighbor BGP Adj-RIB
  """
  __slots__ = ('_path_helper', '_extmethods', '__neighbor_address',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__neighbor_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}'}),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}|:))'}),], is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'neighbors', 'neighbor', 'state']

  def _get_neighbor_address(self):
    """
    Getter method for neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/state/neighbor_address (oc-inet:ip-address)

    YANG Description: IP address of the BGP neighbor or peer
    """
    return self.__neighbor_address
      
  def _set_neighbor_address(self, v, load=False):
    """
    Setter method for neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/state/neighbor_address (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor_address() directly.

    YANG Description: IP address of the BGP neighbor or peer
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor_address must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__neighbor_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor_address(self):
    self.__neighbor_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}'}),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}|:))'}),], is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)

  neighbor_address = __builtin__.property(_get_neighbor_address)


  _pyangbind_elements = OrderedDict([('neighbor_address', neighbor_address), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/neighbors/neighbor/adj-rib-in-pre/routes/route/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for BGP Adj-RIB entries
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix','__path_id','__attr_index','__community_index','__ext_community_index','__last_modified','__valid_route','__invalid_reason',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-prefix', is_config=False)
    self.__path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'neighbors', 'neighbor', 'adj-rib-in-pre', 'routes', 'route', 'state']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/state/prefix (oc-inet:ipv4-prefix)

    YANG Description: Prefix for the route
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/state/prefix (oc-inet:ipv4-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: Prefix for the route
    """
    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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-prefix', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-prefix', is_config=False)


  def _get_path_id(self):
    """
    Getter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/state/path_id (uint32)

    YANG Description: When the BGP speaker supports advertisement of multiple
paths for a prefix, the path identifier is used to
uniquely identify a route based on the combination of the
prefix and path id.  In the Adj-RIB-In, the path-id value is
the value received in the update message.   In the Loc-RIB,
if used, it should represent a locally generated path-id
value for the corresponding route.  In Adj-RIB-Out, it
should be the value sent to a neighbor when add-paths is
used, i.e., the capability has been negotiated.
    """
    return self.__path_id
      
  def _set_path_id(self, v, load=False):
    """
    Setter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/state/path_id (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_id() directly.

    YANG Description: When the BGP speaker supports advertisement of multiple
paths for a prefix, the path identifier is used to
uniquely identify a route based on the combination of the
prefix and path id.  In the Adj-RIB-In, the path-id value is
the value received in the update message.   In the Loc-RIB,
if used, it should represent a locally generated path-id
value for the corresponding route.  In Adj-RIB-Out, it
should be the value sent to a neighbor when add-paths is
used, i.e., the capability has been negotiated.
    """
    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="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_id 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="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_id(self):
    self.__path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_attr_index(self):
    """
    Getter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/state/attr_index (leafref)

    YANG Description: Reference to the common attribute group for the
route
    """
    return self.__attr_index
      
  def _set_attr_index(self, v, load=False):
    """
    Setter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/state/attr_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_index() directly.

    YANG Description: Reference to the common attribute group for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_index(self):
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_community_index(self):
    """
    Getter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/state/community_index (leafref)

    YANG Description: Reference to the community attribute for the route
    """
    return self.__community_index
      
  def _set_community_index(self, v, load=False):
    """
    Setter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/state/community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_community_index() directly.

    YANG Description: Reference to the community attribute for the route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_community_index(self):
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_ext_community_index(self):
    """
    Getter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/state/ext_community_index (leafref)

    YANG Description: Reference to the extended community attribute for the
route
    """
    return self.__ext_community_index
      
  def _set_ext_community_index(self, v, load=False):
    """
    Setter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/state/ext_community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ext_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ext_community_index() directly.

    YANG Description: Reference to the extended community attribute for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ext_community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__ext_community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ext_community_index(self):
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_last_modified(self):
    """
    Getter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/state/last_modified (oc-types:timeticks64)

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    return self.__last_modified
      
  def _set_last_modified(self, v, load=False):
    """
    Setter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/state/last_modified (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_last_modified is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_last_modified() directly.

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    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="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """last_modified must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__last_modified = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_last_modified(self):
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_valid_route(self):
    """
    Getter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/state/valid_route (boolean)

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    return self.__valid_route
      
  def _set_valid_route(self, v, load=False):
    """
    Setter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/state/valid_route (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_valid_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_valid_route() directly.

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """valid_route must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__valid_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_valid_route(self):
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_invalid_reason(self):
    """
    Getter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/state/invalid_reason (identityref)

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    return self.__invalid_reason
      
  def _set_invalid_reason(self, v, load=False):
    """
    Setter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/state/invalid_reason (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_invalid_reason is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_invalid_reason() directly.

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    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={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """invalid_reason must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__invalid_reason = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_invalid_reason(self):
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  prefix = __builtin__.property(_get_prefix)
  path_id = __builtin__.property(_get_path_id)
  attr_index = __builtin__.property(_get_attr_index)
  community_index = __builtin__.property(_get_community_index)
  ext_community_index = __builtin__.property(_get_ext_community_index)
  last_modified = __builtin__.property(_get_last_modified)
  valid_route = __builtin__.property(_get_valid_route)
  invalid_reason = __builtin__.property(_get_invalid_reason)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ('path_id', path_id), ('attr_index', attr_index), ('community_index', community_index), ('ext_community_index', ext_community_index), ('last_modified', last_modified), ('valid_route', valid_route), ('invalid_reason', invalid_reason), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes_unknown_attribute_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/neighbors/neighbor/adj-rib-in-pre/routes/route/unknown-attributes/unknown-attribute/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for unknown route attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__optional','__transitive','__partial','__extended','__attr_type','__attr_len','__attr_value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'neighbors', 'neighbor', 'adj-rib-in-pre', 'routes', 'route', 'unknown-attributes', 'unknown-attribute', 'state']

  def _get_optional(self):
    """
    Getter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/optional (boolean)

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    return self.__optional
      
  def _set_optional(self, v, load=False):
    """
    Setter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/optional (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_optional is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_optional() directly.

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """optional must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__optional = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_optional(self):
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_transitive(self):
    """
    Getter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/transitive (boolean)

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    return self.__transitive
      
  def _set_transitive(self, v, load=False):
    """
    Setter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/transitive (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transitive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transitive() directly.

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transitive must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__transitive = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transitive(self):
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_partial(self):
    """
    Getter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/partial (boolean)

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    return self.__partial
      
  def _set_partial(self, v, load=False):
    """
    Setter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/partial (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_partial is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_partial() directly.

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """partial must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__partial = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_partial(self):
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_extended(self):
    """
    Getter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/extended (boolean)

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    return self.__extended
      
  def _set_extended(self, v, load=False):
    """
    Setter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/extended (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended() directly.

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__extended = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended(self):
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_type (uint8)

    YANG Description: 1-octet value encoding the attribute type code
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_type (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() directly.

    YANG Description: 1-octet value encoding the attribute type code
    """
    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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_attr_len(self):
    """
    Getter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_len (uint16)

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    return self.__attr_len
      
  def _set_attr_len(self, v, load=False):
    """
    Setter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_len (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_len() directly.

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_len 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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__attr_len = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_len(self):
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_attr_value(self):
    """
    Getter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_value (binary)

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    return self.__attr_value
      
  def _set_attr_value(self, v, load=False):
    """
    Setter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_value() directly.

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__attr_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_value(self):
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  optional = __builtin__.property(_get_optional)
  transitive = __builtin__.property(_get_transitive)
  partial = __builtin__.property(_get_partial)
  extended = __builtin__.property(_get_extended)
  attr_type = __builtin__.property(_get_attr_type)
  attr_len = __builtin__.property(_get_attr_len)
  attr_value = __builtin__.property(_get_attr_value)


  _pyangbind_elements = OrderedDict([('optional', optional), ('transitive', transitive), ('partial', partial), ('extended', extended), ('attr_type', attr_type), ('attr_len', attr_len), ('attr_value', attr_value), ])


class yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes_unknown_attribute(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/neighbors/neighbor/adj-rib-in-pre/routes/route/unknown-attributes/unknown-attribute. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
  """
  __slots__ = ('_path_helper', '_extmethods', '__attr_type','__state',)

  _yang_name = 'unknown-attribute'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'neighbors', 'neighbor', 'adj-rib-in-pre', 'routes', 'route', 'unknown-attributes', 'unknown-attribute']

  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/attr_type (leafref)

    YANG Description: Reference to the list key
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/attr_type (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state (container)

    YANG Description: Operational state for unknown route attributes
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/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 unknown route attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  attr_type = __builtin__.property(_get_attr_type)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('attr_type', attr_type), ('state', state), ])


class yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/neighbors/neighbor/adj-rib-in-pre/routes/route/unknown-attributes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
  """
  __slots__ = ('_path_helper', '_extmethods', '__unknown_attribute',)

  _yang_name = 'unknown-attributes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'neighbors', 'neighbor', 'adj-rib-in-pre', 'routes', 'route', 'unknown-attributes']

  def _get_unknown_attribute(self):
    """
    Getter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute (list)

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    return self.__unknown_attribute
      
  def _set_unknown_attribute(self, v, load=False):
    """
    Setter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attribute is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attribute() directly.

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attribute must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__unknown_attribute = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attribute(self):
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  unknown_attribute = __builtin__.property(_get_unknown_attribute)


  _pyangbind_elements = OrderedDict([('unknown_attribute', unknown_attribute), ])


class yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/neighbors/neighbor/adj-rib-in-pre/routes/route. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of routes in the table, keyed by a combination of
the route prefix and path-id to distinguish multiple
routes received from a neighbor for the same prefix,
e.g., when BGP add-paths is enabled.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix','__path_id','__state','__unknown_attributes',)

  _yang_name = 'route'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'neighbors', 'neighbor', 'adj-rib-in-pre', 'routes', 'route']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/prefix (leafref)

    YANG Description: Reference to the prefix list key
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/prefix (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: Reference to the prefix 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_path_id(self):
    """
    Getter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/path_id (leafref)

    YANG Description: Reference to the path-id list key
    """
    return self.__path_id
      
  def _set_path_id(self, v, load=False):
    """
    Setter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/path_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_id() directly.

    YANG Description: Reference to the path-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="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_id(self):
    self.__path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/state (container)

    YANG Description: Operational state data for BGP Adj-RIB entries
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/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 BGP Adj-RIB entries
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unknown_attributes(self):
    """
    Getter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes (container)

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    return self.__unknown_attributes
      
  def _set_unknown_attributes(self, v, load=False):
    """
    Setter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attributes() directly.

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attributes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unknown_attributes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attributes(self):
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  prefix = __builtin__.property(_get_prefix)
  path_id = __builtin__.property(_get_path_id)
  state = __builtin__.property(_get_state)
  unknown_attributes = __builtin__.property(_get_unknown_attributes)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ('path_id', path_id), ('state', state), ('unknown_attributes', unknown_attributes), ])


class yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_pre_routes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/neighbors/neighbor/adj-rib-in-pre/routes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for list of routes in the routing
table.
  """
  __slots__ = ('_path_helper', '_extmethods', '__route',)

  _yang_name = 'routes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__route = YANGDynClass(base=YANGListType("prefix path_id",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix path-id', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'neighbors', 'neighbor', 'adj-rib-in-pre', 'routes']

  def _get_route(self):
    """
    Getter method for route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route (list)

    YANG Description: List of routes in the table, keyed by a combination of
the route prefix and path-id to distinguish multiple
routes received from a neighbor for the same prefix,
e.g., when BGP add-paths is enabled.
    """
    return self.__route
      
  def _set_route(self, v, load=False):
    """
    Setter method for route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route() directly.

    YANG Description: List of routes in the table, keyed by a combination of
the route prefix and path-id to distinguish multiple
routes received from a neighbor for the same prefix,
e.g., when BGP add-paths is enabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("prefix path_id",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix path-id', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("prefix path_id",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix path-id', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route(self):
    self.__route = YANGDynClass(base=YANGListType("prefix path_id",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix path-id', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  route = __builtin__.property(_get_route)


  _pyangbind_elements = OrderedDict([('route', route), ])


class yc_adj_rib_in_pre_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_pre(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/neighbors/neighbor/adj-rib-in-pre. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Per-neighbor table containing the NLRI updates
received from the neighbor before any local input
policy rules or filters have been applied.  This can
be considered the 'raw' updates from the neighbor.
  """
  __slots__ = ('_path_helper', '_extmethods', '__routes',)

  _yang_name = 'adj-rib-in-pre'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_pre_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'neighbors', 'neighbor', 'adj-rib-in-pre']

  def _get_routes(self):
    """
    Getter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes (container)

    YANG Description: Enclosing container for list of routes in the routing
table.
    """
    return self.__routes
      
  def _set_routes(self, v, load=False):
    """
    Setter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre/routes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_routes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_routes() directly.

    YANG Description: Enclosing container for list of routes in the routing
table.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_pre_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """routes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_pre_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__routes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_routes(self):
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_pre_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  routes = __builtin__.property(_get_routes)


  _pyangbind_elements = OrderedDict([('routes', routes), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_post_routes_route_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/neighbors/neighbor/adj-rib-in-post/routes/route/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for BGP Adj-RIB entries
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix','__path_id','__attr_index','__community_index','__ext_community_index','__last_modified','__valid_route','__invalid_reason','__best_path',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-prefix', is_config=False)
    self.__path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__best_path = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="best-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'neighbors', 'neighbor', 'adj-rib-in-post', 'routes', 'route', 'state']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/state/prefix (oc-inet:ipv4-prefix)

    YANG Description: Prefix for the route
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/state/prefix (oc-inet:ipv4-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: Prefix for the route
    """
    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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-prefix', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-prefix', is_config=False)


  def _get_path_id(self):
    """
    Getter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/state/path_id (uint32)

    YANG Description: When the BGP speaker supports advertisement of multiple
paths for a prefix, the path identifier is used to
uniquely identify a route based on the combination of the
prefix and path id.  In the Adj-RIB-In, the path-id value is
the value received in the update message.   In the Loc-RIB,
if used, it should represent a locally generated path-id
value for the corresponding route.  In Adj-RIB-Out, it
should be the value sent to a neighbor when add-paths is
used, i.e., the capability has been negotiated.
    """
    return self.__path_id
      
  def _set_path_id(self, v, load=False):
    """
    Setter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/state/path_id (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_id() directly.

    YANG Description: When the BGP speaker supports advertisement of multiple
paths for a prefix, the path identifier is used to
uniquely identify a route based on the combination of the
prefix and path id.  In the Adj-RIB-In, the path-id value is
the value received in the update message.   In the Loc-RIB,
if used, it should represent a locally generated path-id
value for the corresponding route.  In Adj-RIB-Out, it
should be the value sent to a neighbor when add-paths is
used, i.e., the capability has been negotiated.
    """
    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="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_id 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="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_id(self):
    self.__path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_attr_index(self):
    """
    Getter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/state/attr_index (leafref)

    YANG Description: Reference to the common attribute group for the
route
    """
    return self.__attr_index
      
  def _set_attr_index(self, v, load=False):
    """
    Setter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/state/attr_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_index() directly.

    YANG Description: Reference to the common attribute group for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_index(self):
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_community_index(self):
    """
    Getter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/state/community_index (leafref)

    YANG Description: Reference to the community attribute for the route
    """
    return self.__community_index
      
  def _set_community_index(self, v, load=False):
    """
    Setter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/state/community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_community_index() directly.

    YANG Description: Reference to the community attribute for the route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_community_index(self):
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_ext_community_index(self):
    """
    Getter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/state/ext_community_index (leafref)

    YANG Description: Reference to the extended community attribute for the
route
    """
    return self.__ext_community_index
      
  def _set_ext_community_index(self, v, load=False):
    """
    Setter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/state/ext_community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ext_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ext_community_index() directly.

    YANG Description: Reference to the extended community attribute for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ext_community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__ext_community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ext_community_index(self):
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_last_modified(self):
    """
    Getter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/state/last_modified (oc-types:timeticks64)

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    return self.__last_modified
      
  def _set_last_modified(self, v, load=False):
    """
    Setter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/state/last_modified (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_last_modified is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_last_modified() directly.

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    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="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """last_modified must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__last_modified = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_last_modified(self):
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_valid_route(self):
    """
    Getter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/state/valid_route (boolean)

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    return self.__valid_route
      
  def _set_valid_route(self, v, load=False):
    """
    Setter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/state/valid_route (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_valid_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_valid_route() directly.

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """valid_route must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__valid_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_valid_route(self):
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_invalid_reason(self):
    """
    Getter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/state/invalid_reason (identityref)

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    return self.__invalid_reason
      
  def _set_invalid_reason(self, v, load=False):
    """
    Setter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/state/invalid_reason (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_invalid_reason is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_invalid_reason() directly.

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    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={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """invalid_reason must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__invalid_reason = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_invalid_reason(self):
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_best_path(self):
    """
    Getter method for best_path, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/state/best_path (boolean)

    YANG Description: Current path was selected as the best path.
    """
    return self.__best_path
      
  def _set_best_path(self, v, load=False):
    """
    Setter method for best_path, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/state/best_path (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_best_path is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_best_path() directly.

    YANG Description: Current path was selected as the best path.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="best-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """best_path must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="best-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__best_path = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_best_path(self):
    self.__best_path = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="best-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  prefix = __builtin__.property(_get_prefix)
  path_id = __builtin__.property(_get_path_id)
  attr_index = __builtin__.property(_get_attr_index)
  community_index = __builtin__.property(_get_community_index)
  ext_community_index = __builtin__.property(_get_ext_community_index)
  last_modified = __builtin__.property(_get_last_modified)
  valid_route = __builtin__.property(_get_valid_route)
  invalid_reason = __builtin__.property(_get_invalid_reason)
  best_path = __builtin__.property(_get_best_path)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ('path_id', path_id), ('attr_index', attr_index), ('community_index', community_index), ('ext_community_index', ext_community_index), ('last_modified', last_modified), ('valid_route', valid_route), ('invalid_reason', invalid_reason), ('best_path', best_path), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes_unknown_attribute_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/neighbors/neighbor/adj-rib-in-post/routes/route/unknown-attributes/unknown-attribute/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for unknown route attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__optional','__transitive','__partial','__extended','__attr_type','__attr_len','__attr_value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'neighbors', 'neighbor', 'adj-rib-in-post', 'routes', 'route', 'unknown-attributes', 'unknown-attribute', 'state']

  def _get_optional(self):
    """
    Getter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/optional (boolean)

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    return self.__optional
      
  def _set_optional(self, v, load=False):
    """
    Setter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/optional (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_optional is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_optional() directly.

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """optional must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__optional = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_optional(self):
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_transitive(self):
    """
    Getter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/transitive (boolean)

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    return self.__transitive
      
  def _set_transitive(self, v, load=False):
    """
    Setter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/transitive (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transitive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transitive() directly.

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transitive must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__transitive = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transitive(self):
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_partial(self):
    """
    Getter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/partial (boolean)

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    return self.__partial
      
  def _set_partial(self, v, load=False):
    """
    Setter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/partial (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_partial is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_partial() directly.

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """partial must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__partial = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_partial(self):
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_extended(self):
    """
    Getter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/extended (boolean)

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    return self.__extended
      
  def _set_extended(self, v, load=False):
    """
    Setter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/extended (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended() directly.

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__extended = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended(self):
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/attr_type (uint8)

    YANG Description: 1-octet value encoding the attribute type code
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/attr_type (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() directly.

    YANG Description: 1-octet value encoding the attribute type code
    """
    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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_attr_len(self):
    """
    Getter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/attr_len (uint16)

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    return self.__attr_len
      
  def _set_attr_len(self, v, load=False):
    """
    Setter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/attr_len (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_len() directly.

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_len 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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__attr_len = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_len(self):
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_attr_value(self):
    """
    Getter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/attr_value (binary)

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    return self.__attr_value
      
  def _set_attr_value(self, v, load=False):
    """
    Setter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/attr_value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_value() directly.

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__attr_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_value(self):
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  optional = __builtin__.property(_get_optional)
  transitive = __builtin__.property(_get_transitive)
  partial = __builtin__.property(_get_partial)
  extended = __builtin__.property(_get_extended)
  attr_type = __builtin__.property(_get_attr_type)
  attr_len = __builtin__.property(_get_attr_len)
  attr_value = __builtin__.property(_get_attr_value)


  _pyangbind_elements = OrderedDict([('optional', optional), ('transitive', transitive), ('partial', partial), ('extended', extended), ('attr_type', attr_type), ('attr_len', attr_len), ('attr_value', attr_value), ])


class yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes_unknown_attribute(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/neighbors/neighbor/adj-rib-in-post/routes/route/unknown-attributes/unknown-attribute. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
  """
  __slots__ = ('_path_helper', '_extmethods', '__attr_type','__state',)

  _yang_name = 'unknown-attribute'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'neighbors', 'neighbor', 'adj-rib-in-post', 'routes', 'route', 'unknown-attributes', 'unknown-attribute']

  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/attr_type (leafref)

    YANG Description: Reference to the list key
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/attr_type (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state (container)

    YANG Description: Operational state for unknown route attributes
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/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 unknown route attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  attr_type = __builtin__.property(_get_attr_type)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('attr_type', attr_type), ('state', state), ])


class yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/neighbors/neighbor/adj-rib-in-post/routes/route/unknown-attributes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
  """
  __slots__ = ('_path_helper', '_extmethods', '__unknown_attribute',)

  _yang_name = 'unknown-attributes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'neighbors', 'neighbor', 'adj-rib-in-post', 'routes', 'route', 'unknown-attributes']

  def _get_unknown_attribute(self):
    """
    Getter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute (list)

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    return self.__unknown_attribute
      
  def _set_unknown_attribute(self, v, load=False):
    """
    Setter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attribute is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attribute() directly.

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attribute must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__unknown_attribute = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attribute(self):
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  unknown_attribute = __builtin__.property(_get_unknown_attribute)


  _pyangbind_elements = OrderedDict([('unknown_attribute', unknown_attribute), ])


class yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_post_routes_route(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/neighbors/neighbor/adj-rib-in-post/routes/route. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of routes in the table, keyed by a combination of
the route prefix and path-id to distinguish multiple
routes received from a neighbor for the same prefix,
e.g., when BGP add-paths is enabled.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix','__path_id','__state','__unknown_attributes',)

  _yang_name = 'route'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_post_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'neighbors', 'neighbor', 'adj-rib-in-post', 'routes', 'route']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/prefix (leafref)

    YANG Description: Reference to the prefix list key
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/prefix (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: Reference to the prefix 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_path_id(self):
    """
    Getter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/path_id (leafref)

    YANG Description: Reference to the path-id list key
    """
    return self.__path_id
      
  def _set_path_id(self, v, load=False):
    """
    Setter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/path_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_id() directly.

    YANG Description: Reference to the path-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="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_id(self):
    self.__path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/state (container)

    YANG Description: Operational state data for BGP Adj-RIB entries
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/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 BGP Adj-RIB entries
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_post_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_post_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_post_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unknown_attributes(self):
    """
    Getter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes (container)

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    return self.__unknown_attributes
      
  def _set_unknown_attributes(self, v, load=False):
    """
    Setter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attributes() directly.

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attributes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unknown_attributes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attributes(self):
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  prefix = __builtin__.property(_get_prefix)
  path_id = __builtin__.property(_get_path_id)
  state = __builtin__.property(_get_state)
  unknown_attributes = __builtin__.property(_get_unknown_attributes)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ('path_id', path_id), ('state', state), ('unknown_attributes', unknown_attributes), ])


class yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_post_routes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/neighbors/neighbor/adj-rib-in-post/routes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for list of routes in the routing
table.
  """
  __slots__ = ('_path_helper', '_extmethods', '__route',)

  _yang_name = 'routes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__route = YANGDynClass(base=YANGListType("prefix path_id",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_post_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix path-id', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'neighbors', 'neighbor', 'adj-rib-in-post', 'routes']

  def _get_route(self):
    """
    Getter method for route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route (list)

    YANG Description: List of routes in the table, keyed by a combination of
the route prefix and path-id to distinguish multiple
routes received from a neighbor for the same prefix,
e.g., when BGP add-paths is enabled.
    """
    return self.__route
      
  def _set_route(self, v, load=False):
    """
    Setter method for route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes/route (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route() directly.

    YANG Description: List of routes in the table, keyed by a combination of
the route prefix and path-id to distinguish multiple
routes received from a neighbor for the same prefix,
e.g., when BGP add-paths is enabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("prefix path_id",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_post_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix path-id', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("prefix path_id",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_post_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix path-id', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route(self):
    self.__route = YANGDynClass(base=YANGListType("prefix path_id",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_post_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix path-id', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  route = __builtin__.property(_get_route)


  _pyangbind_elements = OrderedDict([('route', route), ])


class yc_adj_rib_in_post_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_post(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/neighbors/neighbor/adj-rib-in-post. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Per-neighbor table containing the paths received from
the neighbor that are eligible for best-path selection
after local input policy rules have been applied.
  """
  __slots__ = ('_path_helper', '_extmethods', '__routes',)

  _yang_name = 'adj-rib-in-post'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_post_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'neighbors', 'neighbor', 'adj-rib-in-post']

  def _get_routes(self):
    """
    Getter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes (container)

    YANG Description: Enclosing container for list of routes in the routing
table.
    """
    return self.__routes
      
  def _set_routes(self, v, load=False):
    """
    Setter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post/routes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_routes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_routes() directly.

    YANG Description: Enclosing container for list of routes in the routing
table.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_post_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """routes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_post_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__routes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_routes(self):
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_post_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  routes = __builtin__.property(_get_routes)


  _pyangbind_elements = OrderedDict([('routes', routes), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/neighbors/neighbor/adj-rib-out-pre/routes/route/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for BGP Adj-RIB entries
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix','__path_id','__attr_index','__community_index','__ext_community_index','__last_modified','__valid_route','__invalid_reason',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-prefix', is_config=False)
    self.__path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'neighbors', 'neighbor', 'adj-rib-out-pre', 'routes', 'route', 'state']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/state/prefix (oc-inet:ipv4-prefix)

    YANG Description: Prefix for the route
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/state/prefix (oc-inet:ipv4-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: Prefix for the route
    """
    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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-prefix', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-prefix', is_config=False)


  def _get_path_id(self):
    """
    Getter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/state/path_id (uint32)

    YANG Description: When the BGP speaker supports advertisement of multiple
paths for a prefix, the path identifier is used to
uniquely identify a route based on the combination of the
prefix and path id.  In the Adj-RIB-In, the path-id value is
the value received in the update message.   In the Loc-RIB,
if used, it should represent a locally generated path-id
value for the corresponding route.  In Adj-RIB-Out, it
should be the value sent to a neighbor when add-paths is
used, i.e., the capability has been negotiated.
    """
    return self.__path_id
      
  def _set_path_id(self, v, load=False):
    """
    Setter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/state/path_id (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_id() directly.

    YANG Description: When the BGP speaker supports advertisement of multiple
paths for a prefix, the path identifier is used to
uniquely identify a route based on the combination of the
prefix and path id.  In the Adj-RIB-In, the path-id value is
the value received in the update message.   In the Loc-RIB,
if used, it should represent a locally generated path-id
value for the corresponding route.  In Adj-RIB-Out, it
should be the value sent to a neighbor when add-paths is
used, i.e., the capability has been negotiated.
    """
    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="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_id 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="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_id(self):
    self.__path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_attr_index(self):
    """
    Getter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/state/attr_index (leafref)

    YANG Description: Reference to the common attribute group for the
route
    """
    return self.__attr_index
      
  def _set_attr_index(self, v, load=False):
    """
    Setter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/state/attr_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_index() directly.

    YANG Description: Reference to the common attribute group for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_index(self):
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_community_index(self):
    """
    Getter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/state/community_index (leafref)

    YANG Description: Reference to the community attribute for the route
    """
    return self.__community_index
      
  def _set_community_index(self, v, load=False):
    """
    Setter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/state/community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_community_index() directly.

    YANG Description: Reference to the community attribute for the route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_community_index(self):
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_ext_community_index(self):
    """
    Getter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/state/ext_community_index (leafref)

    YANG Description: Reference to the extended community attribute for the
route
    """
    return self.__ext_community_index
      
  def _set_ext_community_index(self, v, load=False):
    """
    Setter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/state/ext_community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ext_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ext_community_index() directly.

    YANG Description: Reference to the extended community attribute for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ext_community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__ext_community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ext_community_index(self):
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_last_modified(self):
    """
    Getter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/state/last_modified (oc-types:timeticks64)

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    return self.__last_modified
      
  def _set_last_modified(self, v, load=False):
    """
    Setter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/state/last_modified (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_last_modified is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_last_modified() directly.

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    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="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """last_modified must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__last_modified = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_last_modified(self):
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_valid_route(self):
    """
    Getter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/state/valid_route (boolean)

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    return self.__valid_route
      
  def _set_valid_route(self, v, load=False):
    """
    Setter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/state/valid_route (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_valid_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_valid_route() directly.

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """valid_route must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__valid_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_valid_route(self):
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_invalid_reason(self):
    """
    Getter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/state/invalid_reason (identityref)

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    return self.__invalid_reason
      
  def _set_invalid_reason(self, v, load=False):
    """
    Setter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/state/invalid_reason (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_invalid_reason is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_invalid_reason() directly.

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    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={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """invalid_reason must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__invalid_reason = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_invalid_reason(self):
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  prefix = __builtin__.property(_get_prefix)
  path_id = __builtin__.property(_get_path_id)
  attr_index = __builtin__.property(_get_attr_index)
  community_index = __builtin__.property(_get_community_index)
  ext_community_index = __builtin__.property(_get_ext_community_index)
  last_modified = __builtin__.property(_get_last_modified)
  valid_route = __builtin__.property(_get_valid_route)
  invalid_reason = __builtin__.property(_get_invalid_reason)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ('path_id', path_id), ('attr_index', attr_index), ('community_index', community_index), ('ext_community_index', ext_community_index), ('last_modified', last_modified), ('valid_route', valid_route), ('invalid_reason', invalid_reason), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes_unknown_attribute_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/neighbors/neighbor/adj-rib-out-pre/routes/route/unknown-attributes/unknown-attribute/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for unknown route attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__optional','__transitive','__partial','__extended','__attr_type','__attr_len','__attr_value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'neighbors', 'neighbor', 'adj-rib-out-pre', 'routes', 'route', 'unknown-attributes', 'unknown-attribute', 'state']

  def _get_optional(self):
    """
    Getter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/optional (boolean)

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    return self.__optional
      
  def _set_optional(self, v, load=False):
    """
    Setter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/optional (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_optional is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_optional() directly.

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """optional must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__optional = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_optional(self):
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_transitive(self):
    """
    Getter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/transitive (boolean)

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    return self.__transitive
      
  def _set_transitive(self, v, load=False):
    """
    Setter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/transitive (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transitive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transitive() directly.

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transitive must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__transitive = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transitive(self):
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_partial(self):
    """
    Getter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/partial (boolean)

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    return self.__partial
      
  def _set_partial(self, v, load=False):
    """
    Setter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/partial (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_partial is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_partial() directly.

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """partial must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__partial = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_partial(self):
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_extended(self):
    """
    Getter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/extended (boolean)

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    return self.__extended
      
  def _set_extended(self, v, load=False):
    """
    Setter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/extended (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended() directly.

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__extended = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended(self):
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_type (uint8)

    YANG Description: 1-octet value encoding the attribute type code
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_type (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() directly.

    YANG Description: 1-octet value encoding the attribute type code
    """
    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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_attr_len(self):
    """
    Getter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_len (uint16)

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    return self.__attr_len
      
  def _set_attr_len(self, v, load=False):
    """
    Setter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_len (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_len() directly.

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_len 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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__attr_len = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_len(self):
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_attr_value(self):
    """
    Getter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_value (binary)

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    return self.__attr_value
      
  def _set_attr_value(self, v, load=False):
    """
    Setter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_value() directly.

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__attr_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_value(self):
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  optional = __builtin__.property(_get_optional)
  transitive = __builtin__.property(_get_transitive)
  partial = __builtin__.property(_get_partial)
  extended = __builtin__.property(_get_extended)
  attr_type = __builtin__.property(_get_attr_type)
  attr_len = __builtin__.property(_get_attr_len)
  attr_value = __builtin__.property(_get_attr_value)


  _pyangbind_elements = OrderedDict([('optional', optional), ('transitive', transitive), ('partial', partial), ('extended', extended), ('attr_type', attr_type), ('attr_len', attr_len), ('attr_value', attr_value), ])


class yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes_unknown_attribute(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/neighbors/neighbor/adj-rib-out-pre/routes/route/unknown-attributes/unknown-attribute. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
  """
  __slots__ = ('_path_helper', '_extmethods', '__attr_type','__state',)

  _yang_name = 'unknown-attribute'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'neighbors', 'neighbor', 'adj-rib-out-pre', 'routes', 'route', 'unknown-attributes', 'unknown-attribute']

  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/attr_type (leafref)

    YANG Description: Reference to the list key
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/attr_type (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state (container)

    YANG Description: Operational state for unknown route attributes
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/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 unknown route attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  attr_type = __builtin__.property(_get_attr_type)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('attr_type', attr_type), ('state', state), ])


class yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/neighbors/neighbor/adj-rib-out-pre/routes/route/unknown-attributes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
  """
  __slots__ = ('_path_helper', '_extmethods', '__unknown_attribute',)

  _yang_name = 'unknown-attributes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'neighbors', 'neighbor', 'adj-rib-out-pre', 'routes', 'route', 'unknown-attributes']

  def _get_unknown_attribute(self):
    """
    Getter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute (list)

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    return self.__unknown_attribute
      
  def _set_unknown_attribute(self, v, load=False):
    """
    Setter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attribute is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attribute() directly.

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attribute must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__unknown_attribute = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attribute(self):
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  unknown_attribute = __builtin__.property(_get_unknown_attribute)


  _pyangbind_elements = OrderedDict([('unknown_attribute', unknown_attribute), ])


class yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/neighbors/neighbor/adj-rib-out-pre/routes/route. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of routes in the table, keyed by a combination of
the route prefix and path-id to distinguish multiple
routes received from a neighbor for the same prefix,
e.g., when BGP add-paths is enabled.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix','__path_id','__state','__unknown_attributes',)

  _yang_name = 'route'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'neighbors', 'neighbor', 'adj-rib-out-pre', 'routes', 'route']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/prefix (leafref)

    YANG Description: Reference to the prefix list key
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/prefix (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: Reference to the prefix 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_path_id(self):
    """
    Getter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/path_id (leafref)

    YANG Description: Reference to the path-id list key
    """
    return self.__path_id
      
  def _set_path_id(self, v, load=False):
    """
    Setter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/path_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_id() directly.

    YANG Description: Reference to the path-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="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_id(self):
    self.__path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/state (container)

    YANG Description: Operational state data for BGP Adj-RIB entries
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/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 BGP Adj-RIB entries
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unknown_attributes(self):
    """
    Getter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes (container)

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    return self.__unknown_attributes
      
  def _set_unknown_attributes(self, v, load=False):
    """
    Setter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attributes() directly.

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attributes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unknown_attributes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attributes(self):
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  prefix = __builtin__.property(_get_prefix)
  path_id = __builtin__.property(_get_path_id)
  state = __builtin__.property(_get_state)
  unknown_attributes = __builtin__.property(_get_unknown_attributes)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ('path_id', path_id), ('state', state), ('unknown_attributes', unknown_attributes), ])


class yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_pre_routes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/neighbors/neighbor/adj-rib-out-pre/routes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for list of routes in the routing
table.
  """
  __slots__ = ('_path_helper', '_extmethods', '__route',)

  _yang_name = 'routes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__route = YANGDynClass(base=YANGListType("prefix path_id",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix path-id', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'neighbors', 'neighbor', 'adj-rib-out-pre', 'routes']

  def _get_route(self):
    """
    Getter method for route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route (list)

    YANG Description: List of routes in the table, keyed by a combination of
the route prefix and path-id to distinguish multiple
routes received from a neighbor for the same prefix,
e.g., when BGP add-paths is enabled.
    """
    return self.__route
      
  def _set_route(self, v, load=False):
    """
    Setter method for route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route() directly.

    YANG Description: List of routes in the table, keyed by a combination of
the route prefix and path-id to distinguish multiple
routes received from a neighbor for the same prefix,
e.g., when BGP add-paths is enabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("prefix path_id",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix path-id', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("prefix path_id",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix path-id', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route(self):
    self.__route = YANGDynClass(base=YANGListType("prefix path_id",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix path-id', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  route = __builtin__.property(_get_route)


  _pyangbind_elements = OrderedDict([('route', route), ])


class yc_adj_rib_out_pre_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_pre(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/neighbors/neighbor/adj-rib-out-pre. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Per-neighbor table containing paths eligble for
sending (advertising) to the neighbor before output
policy rules have been applied
  """
  __slots__ = ('_path_helper', '_extmethods', '__routes',)

  _yang_name = 'adj-rib-out-pre'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_pre_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'neighbors', 'neighbor', 'adj-rib-out-pre']

  def _get_routes(self):
    """
    Getter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes (container)

    YANG Description: Enclosing container for list of routes in the routing
table.
    """
    return self.__routes
      
  def _set_routes(self, v, load=False):
    """
    Setter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre/routes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_routes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_routes() directly.

    YANG Description: Enclosing container for list of routes in the routing
table.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_pre_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """routes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_pre_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__routes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_routes(self):
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_pre_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  routes = __builtin__.property(_get_routes)


  _pyangbind_elements = OrderedDict([('routes', routes), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_post_routes_route_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/neighbors/neighbor/adj-rib-out-post/routes/route/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for BGP Adj-RIB entries
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix','__path_id','__attr_index','__community_index','__ext_community_index','__last_modified','__valid_route','__invalid_reason',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-prefix', is_config=False)
    self.__path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'neighbors', 'neighbor', 'adj-rib-out-post', 'routes', 'route', 'state']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/state/prefix (oc-inet:ipv4-prefix)

    YANG Description: Prefix for the route
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/state/prefix (oc-inet:ipv4-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: Prefix for the route
    """
    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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-prefix', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-prefix', is_config=False)


  def _get_path_id(self):
    """
    Getter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/state/path_id (uint32)

    YANG Description: When the BGP speaker supports advertisement of multiple
paths for a prefix, the path identifier is used to
uniquely identify a route based on the combination of the
prefix and path id.  In the Adj-RIB-In, the path-id value is
the value received in the update message.   In the Loc-RIB,
if used, it should represent a locally generated path-id
value for the corresponding route.  In Adj-RIB-Out, it
should be the value sent to a neighbor when add-paths is
used, i.e., the capability has been negotiated.
    """
    return self.__path_id
      
  def _set_path_id(self, v, load=False):
    """
    Setter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/state/path_id (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_id() directly.

    YANG Description: When the BGP speaker supports advertisement of multiple
paths for a prefix, the path identifier is used to
uniquely identify a route based on the combination of the
prefix and path id.  In the Adj-RIB-In, the path-id value is
the value received in the update message.   In the Loc-RIB,
if used, it should represent a locally generated path-id
value for the corresponding route.  In Adj-RIB-Out, it
should be the value sent to a neighbor when add-paths is
used, i.e., the capability has been negotiated.
    """
    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="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_id 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="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_id(self):
    self.__path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_attr_index(self):
    """
    Getter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/state/attr_index (leafref)

    YANG Description: Reference to the common attribute group for the
route
    """
    return self.__attr_index
      
  def _set_attr_index(self, v, load=False):
    """
    Setter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/state/attr_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_index() directly.

    YANG Description: Reference to the common attribute group for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_index(self):
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_community_index(self):
    """
    Getter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/state/community_index (leafref)

    YANG Description: Reference to the community attribute for the route
    """
    return self.__community_index
      
  def _set_community_index(self, v, load=False):
    """
    Setter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/state/community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_community_index() directly.

    YANG Description: Reference to the community attribute for the route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_community_index(self):
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_ext_community_index(self):
    """
    Getter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/state/ext_community_index (leafref)

    YANG Description: Reference to the extended community attribute for the
route
    """
    return self.__ext_community_index
      
  def _set_ext_community_index(self, v, load=False):
    """
    Setter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/state/ext_community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ext_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ext_community_index() directly.

    YANG Description: Reference to the extended community attribute for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ext_community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__ext_community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ext_community_index(self):
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_last_modified(self):
    """
    Getter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/state/last_modified (oc-types:timeticks64)

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    return self.__last_modified
      
  def _set_last_modified(self, v, load=False):
    """
    Setter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/state/last_modified (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_last_modified is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_last_modified() directly.

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    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="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """last_modified must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__last_modified = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_last_modified(self):
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_valid_route(self):
    """
    Getter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/state/valid_route (boolean)

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    return self.__valid_route
      
  def _set_valid_route(self, v, load=False):
    """
    Setter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/state/valid_route (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_valid_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_valid_route() directly.

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """valid_route must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__valid_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_valid_route(self):
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_invalid_reason(self):
    """
    Getter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/state/invalid_reason (identityref)

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    return self.__invalid_reason
      
  def _set_invalid_reason(self, v, load=False):
    """
    Setter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/state/invalid_reason (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_invalid_reason is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_invalid_reason() directly.

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    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={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """invalid_reason must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__invalid_reason = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_invalid_reason(self):
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  prefix = __builtin__.property(_get_prefix)
  path_id = __builtin__.property(_get_path_id)
  attr_index = __builtin__.property(_get_attr_index)
  community_index = __builtin__.property(_get_community_index)
  ext_community_index = __builtin__.property(_get_ext_community_index)
  last_modified = __builtin__.property(_get_last_modified)
  valid_route = __builtin__.property(_get_valid_route)
  invalid_reason = __builtin__.property(_get_invalid_reason)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ('path_id', path_id), ('attr_index', attr_index), ('community_index', community_index), ('ext_community_index', ext_community_index), ('last_modified', last_modified), ('valid_route', valid_route), ('invalid_reason', invalid_reason), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes_unknown_attribute_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/neighbors/neighbor/adj-rib-out-post/routes/route/unknown-attributes/unknown-attribute/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for unknown route attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__optional','__transitive','__partial','__extended','__attr_type','__attr_len','__attr_value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'neighbors', 'neighbor', 'adj-rib-out-post', 'routes', 'route', 'unknown-attributes', 'unknown-attribute', 'state']

  def _get_optional(self):
    """
    Getter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/optional (boolean)

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    return self.__optional
      
  def _set_optional(self, v, load=False):
    """
    Setter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/optional (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_optional is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_optional() directly.

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """optional must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__optional = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_optional(self):
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_transitive(self):
    """
    Getter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/transitive (boolean)

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    return self.__transitive
      
  def _set_transitive(self, v, load=False):
    """
    Setter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/transitive (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transitive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transitive() directly.

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transitive must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__transitive = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transitive(self):
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_partial(self):
    """
    Getter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/partial (boolean)

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    return self.__partial
      
  def _set_partial(self, v, load=False):
    """
    Setter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/partial (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_partial is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_partial() directly.

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """partial must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__partial = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_partial(self):
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_extended(self):
    """
    Getter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/extended (boolean)

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    return self.__extended
      
  def _set_extended(self, v, load=False):
    """
    Setter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/extended (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended() directly.

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__extended = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended(self):
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/attr_type (uint8)

    YANG Description: 1-octet value encoding the attribute type code
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/attr_type (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() directly.

    YANG Description: 1-octet value encoding the attribute type code
    """
    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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_attr_len(self):
    """
    Getter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/attr_len (uint16)

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    return self.__attr_len
      
  def _set_attr_len(self, v, load=False):
    """
    Setter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/attr_len (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_len() directly.

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_len 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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__attr_len = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_len(self):
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_attr_value(self):
    """
    Getter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/attr_value (binary)

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    return self.__attr_value
      
  def _set_attr_value(self, v, load=False):
    """
    Setter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/attr_value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_value() directly.

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__attr_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_value(self):
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  optional = __builtin__.property(_get_optional)
  transitive = __builtin__.property(_get_transitive)
  partial = __builtin__.property(_get_partial)
  extended = __builtin__.property(_get_extended)
  attr_type = __builtin__.property(_get_attr_type)
  attr_len = __builtin__.property(_get_attr_len)
  attr_value = __builtin__.property(_get_attr_value)


  _pyangbind_elements = OrderedDict([('optional', optional), ('transitive', transitive), ('partial', partial), ('extended', extended), ('attr_type', attr_type), ('attr_len', attr_len), ('attr_value', attr_value), ])


class yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes_unknown_attribute(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/neighbors/neighbor/adj-rib-out-post/routes/route/unknown-attributes/unknown-attribute. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
  """
  __slots__ = ('_path_helper', '_extmethods', '__attr_type','__state',)

  _yang_name = 'unknown-attribute'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'neighbors', 'neighbor', 'adj-rib-out-post', 'routes', 'route', 'unknown-attributes', 'unknown-attribute']

  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/attr_type (leafref)

    YANG Description: Reference to the list key
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/attr_type (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state (container)

    YANG Description: Operational state for unknown route attributes
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/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 unknown route attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  attr_type = __builtin__.property(_get_attr_type)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('attr_type', attr_type), ('state', state), ])


class yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/neighbors/neighbor/adj-rib-out-post/routes/route/unknown-attributes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
  """
  __slots__ = ('_path_helper', '_extmethods', '__unknown_attribute',)

  _yang_name = 'unknown-attributes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'neighbors', 'neighbor', 'adj-rib-out-post', 'routes', 'route', 'unknown-attributes']

  def _get_unknown_attribute(self):
    """
    Getter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute (list)

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    return self.__unknown_attribute
      
  def _set_unknown_attribute(self, v, load=False):
    """
    Setter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attribute is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attribute() directly.

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attribute must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__unknown_attribute = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attribute(self):
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  unknown_attribute = __builtin__.property(_get_unknown_attribute)


  _pyangbind_elements = OrderedDict([('unknown_attribute', unknown_attribute), ])


class yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_post_routes_route(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/neighbors/neighbor/adj-rib-out-post/routes/route. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of routes in the table, keyed by a combination of
the route prefix and path-id to distinguish multiple
routes received from a neighbor for the same prefix,
e.g., when BGP add-paths is enabled.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix','__path_id','__state','__unknown_attributes',)

  _yang_name = 'route'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_post_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'neighbors', 'neighbor', 'adj-rib-out-post', 'routes', 'route']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/prefix (leafref)

    YANG Description: Reference to the prefix list key
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/prefix (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: Reference to the prefix 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_path_id(self):
    """
    Getter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/path_id (leafref)

    YANG Description: Reference to the path-id list key
    """
    return self.__path_id
      
  def _set_path_id(self, v, load=False):
    """
    Setter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/path_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_id() directly.

    YANG Description: Reference to the path-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="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_id(self):
    self.__path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/state (container)

    YANG Description: Operational state data for BGP Adj-RIB entries
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/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 BGP Adj-RIB entries
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_post_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_post_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_post_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unknown_attributes(self):
    """
    Getter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes (container)

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    return self.__unknown_attributes
      
  def _set_unknown_attributes(self, v, load=False):
    """
    Setter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attributes() directly.

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attributes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unknown_attributes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attributes(self):
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  prefix = __builtin__.property(_get_prefix)
  path_id = __builtin__.property(_get_path_id)
  state = __builtin__.property(_get_state)
  unknown_attributes = __builtin__.property(_get_unknown_attributes)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ('path_id', path_id), ('state', state), ('unknown_attributes', unknown_attributes), ])


class yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_post_routes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/neighbors/neighbor/adj-rib-out-post/routes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for list of routes in the routing
table.
  """
  __slots__ = ('_path_helper', '_extmethods', '__route',)

  _yang_name = 'routes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__route = YANGDynClass(base=YANGListType("prefix path_id",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_post_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix path-id', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'neighbors', 'neighbor', 'adj-rib-out-post', 'routes']

  def _get_route(self):
    """
    Getter method for route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route (list)

    YANG Description: List of routes in the table, keyed by a combination of
the route prefix and path-id to distinguish multiple
routes received from a neighbor for the same prefix,
e.g., when BGP add-paths is enabled.
    """
    return self.__route
      
  def _set_route(self, v, load=False):
    """
    Setter method for route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes/route (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route() directly.

    YANG Description: List of routes in the table, keyed by a combination of
the route prefix and path-id to distinguish multiple
routes received from a neighbor for the same prefix,
e.g., when BGP add-paths is enabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("prefix path_id",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_post_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix path-id', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("prefix path_id",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_post_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix path-id', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route(self):
    self.__route = YANGDynClass(base=YANGListType("prefix path_id",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_post_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix path-id', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  route = __builtin__.property(_get_route)


  _pyangbind_elements = OrderedDict([('route', route), ])


class yc_adj_rib_out_post_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_post(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/neighbors/neighbor/adj-rib-out-post. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Per-neighbor table containing paths eligble for
sending (advertising) to the neighbor after output
policy rules have been applied
  """
  __slots__ = ('_path_helper', '_extmethods', '__routes',)

  _yang_name = 'adj-rib-out-post'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_post_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'neighbors', 'neighbor', 'adj-rib-out-post']

  def _get_routes(self):
    """
    Getter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes (container)

    YANG Description: Enclosing container for list of routes in the routing
table.
    """
    return self.__routes
      
  def _set_routes(self, v, load=False):
    """
    Setter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post/routes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_routes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_routes() directly.

    YANG Description: Enclosing container for list of routes in the routing
table.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_post_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """routes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_post_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__routes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_routes(self):
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_post_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  routes = __builtin__.property(_get_routes)


  _pyangbind_elements = OrderedDict([('routes', routes), ])


class yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/neighbors/neighbor. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of neighbors (peers) of the local BGP speaker
  """
  __slots__ = ('_path_helper', '_extmethods', '__neighbor_address','__state','__adj_rib_in_pre','__adj_rib_in_post','__adj_rib_out_pre','__adj_rib_out_post',)

  _yang_name = 'neighbor'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__neighbor_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__adj_rib_in_pre = YANGDynClass(base=yc_adj_rib_in_pre_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_pre, is_container='container', yang_name="adj-rib-in-pre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__adj_rib_in_post = YANGDynClass(base=yc_adj_rib_in_post_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_post, is_container='container', yang_name="adj-rib-in-post", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__adj_rib_out_pre = YANGDynClass(base=yc_adj_rib_out_pre_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_pre, is_container='container', yang_name="adj-rib-out-pre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__adj_rib_out_post = YANGDynClass(base=yc_adj_rib_out_post_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_post, is_container='container', yang_name="adj-rib-out-post", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'neighbors', 'neighbor']

  def _get_neighbor_address(self):
    """
    Getter method for neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/neighbor_address (leafref)

    YANG Description: Reference to the list key
    """
    return self.__neighbor_address
      
  def _set_neighbor_address(self, v, load=False):
    """
    Setter method for neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/neighbor_address (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor_address() 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="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor_address must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__neighbor_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor_address(self):
    self.__neighbor_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/state (container)

    YANG Description: Operational state for each neighbor BGP Adj-RIB
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/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 each neighbor BGP Adj-RIB
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_adj_rib_in_pre(self):
    """
    Getter method for adj_rib_in_pre, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre (container)

    YANG Description: Per-neighbor table containing the NLRI updates
received from the neighbor before any local input
policy rules or filters have been applied.  This can
be considered the 'raw' updates from the neighbor.
    """
    return self.__adj_rib_in_pre
      
  def _set_adj_rib_in_pre(self, v, load=False):
    """
    Setter method for adj_rib_in_pre, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_pre (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adj_rib_in_pre is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adj_rib_in_pre() directly.

    YANG Description: Per-neighbor table containing the NLRI updates
received from the neighbor before any local input
policy rules or filters have been applied.  This can
be considered the 'raw' updates from the neighbor.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_adj_rib_in_pre_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_pre, is_container='container', yang_name="adj-rib-in-pre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adj_rib_in_pre must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_adj_rib_in_pre_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_pre, is_container='container', yang_name="adj-rib-in-pre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__adj_rib_in_pre = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adj_rib_in_pre(self):
    self.__adj_rib_in_pre = YANGDynClass(base=yc_adj_rib_in_pre_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_pre, is_container='container', yang_name="adj-rib-in-pre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_adj_rib_in_post(self):
    """
    Getter method for adj_rib_in_post, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post (container)

    YANG Description: Per-neighbor table containing the paths received from
the neighbor that are eligible for best-path selection
after local input policy rules have been applied.
    """
    return self.__adj_rib_in_post
      
  def _set_adj_rib_in_post(self, v, load=False):
    """
    Setter method for adj_rib_in_post, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_in_post (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adj_rib_in_post is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adj_rib_in_post() directly.

    YANG Description: Per-neighbor table containing the paths received from
the neighbor that are eligible for best-path selection
after local input policy rules have been applied.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_adj_rib_in_post_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_post, is_container='container', yang_name="adj-rib-in-post", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adj_rib_in_post must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_adj_rib_in_post_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_post, is_container='container', yang_name="adj-rib-in-post", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__adj_rib_in_post = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adj_rib_in_post(self):
    self.__adj_rib_in_post = YANGDynClass(base=yc_adj_rib_in_post_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_in_post, is_container='container', yang_name="adj-rib-in-post", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_adj_rib_out_pre(self):
    """
    Getter method for adj_rib_out_pre, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre (container)

    YANG Description: Per-neighbor table containing paths eligble for
sending (advertising) to the neighbor before output
policy rules have been applied
    """
    return self.__adj_rib_out_pre
      
  def _set_adj_rib_out_pre(self, v, load=False):
    """
    Setter method for adj_rib_out_pre, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_pre (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adj_rib_out_pre is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adj_rib_out_pre() directly.

    YANG Description: Per-neighbor table containing paths eligble for
sending (advertising) to the neighbor before output
policy rules have been applied
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_adj_rib_out_pre_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_pre, is_container='container', yang_name="adj-rib-out-pre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adj_rib_out_pre must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_adj_rib_out_pre_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_pre, is_container='container', yang_name="adj-rib-out-pre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__adj_rib_out_pre = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adj_rib_out_pre(self):
    self.__adj_rib_out_pre = YANGDynClass(base=yc_adj_rib_out_pre_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_pre, is_container='container', yang_name="adj-rib-out-pre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_adj_rib_out_post(self):
    """
    Getter method for adj_rib_out_post, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post (container)

    YANG Description: Per-neighbor table containing paths eligble for
sending (advertising) to the neighbor after output
policy rules have been applied
    """
    return self.__adj_rib_out_post
      
  def _set_adj_rib_out_post(self, v, load=False):
    """
    Setter method for adj_rib_out_post, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor/adj_rib_out_post (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adj_rib_out_post is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adj_rib_out_post() directly.

    YANG Description: Per-neighbor table containing paths eligble for
sending (advertising) to the neighbor after output
policy rules have been applied
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_adj_rib_out_post_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_post, is_container='container', yang_name="adj-rib-out-post", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adj_rib_out_post must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_adj_rib_out_post_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_post, is_container='container', yang_name="adj-rib-out-post", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__adj_rib_out_post = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adj_rib_out_post(self):
    self.__adj_rib_out_post = YANGDynClass(base=yc_adj_rib_out_post_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor_adj_rib_out_post, is_container='container', yang_name="adj-rib-out-post", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  neighbor_address = __builtin__.property(_get_neighbor_address)
  state = __builtin__.property(_get_state)
  adj_rib_in_pre = __builtin__.property(_get_adj_rib_in_pre)
  adj_rib_in_post = __builtin__.property(_get_adj_rib_in_post)
  adj_rib_out_pre = __builtin__.property(_get_adj_rib_out_pre)
  adj_rib_out_post = __builtin__.property(_get_adj_rib_out_post)


  _pyangbind_elements = OrderedDict([('neighbor_address', neighbor_address), ('state', state), ('adj_rib_in_pre', adj_rib_in_pre), ('adj_rib_in_post', adj_rib_in_post), ('adj_rib_out_pre', adj_rib_out_pre), ('adj_rib_out_post', adj_rib_out_post), ])


class yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/neighbors. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for neighbor list
  """
  __slots__ = ('_path_helper', '_extmethods', '__neighbor',)

  _yang_name = 'neighbors'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__neighbor = YANGDynClass(base=YANGListType("neighbor_address",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='neighbor-address', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-unicast', 'neighbors']

  def _get_neighbor(self):
    """
    Getter method for neighbor, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor (list)

    YANG Description: List of neighbors (peers) of the local BGP speaker
    """
    return self.__neighbor
      
  def _set_neighbor(self, v, load=False):
    """
    Setter method for neighbor, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors/neighbor (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor() directly.

    YANG Description: List of neighbors (peers) of the local BGP speaker
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("neighbor_address",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='neighbor-address', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("neighbor_address",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='neighbor-address', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__neighbor = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor(self):
    self.__neighbor = YANGDynClass(base=YANGListType("neighbor_address",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='neighbor-address', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  neighbor = __builtin__.property(_get_neighbor)


  _pyangbind_elements = OrderedDict([('neighbor', neighbor), ])


class yc_ipv4_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Routing tables for IPv4 unicast -- active when the
afi-safi name is ipv4-unicast
  """
  __slots__ = ('_path_helper', '_extmethods', '__loc_rib','__neighbors',)

  _yang_name = 'ipv4-unicast'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__loc_rib = YANGDynClass(base=yc_loc_rib_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_loc_rib, is_container='container', yang_name="loc-rib", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__neighbors = YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-unicast']

  def _get_loc_rib(self):
    """
    Getter method for loc_rib, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib (container)

    YANG Description: Container for the IPv4 BGP LOC-RIB data
    """
    return self.__loc_rib
      
  def _set_loc_rib(self, v, load=False):
    """
    Setter method for loc_rib, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/loc_rib (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_loc_rib is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_loc_rib() directly.

    YANG Description: Container for the IPv4 BGP LOC-RIB data
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_loc_rib_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_loc_rib, is_container='container', yang_name="loc-rib", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """loc_rib must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_loc_rib_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_loc_rib, is_container='container', yang_name="loc-rib", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__loc_rib = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_loc_rib(self):
    self.__loc_rib = YANGDynClass(base=yc_loc_rib_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_loc_rib, is_container='container', yang_name="loc-rib", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_neighbors(self):
    """
    Getter method for neighbors, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors (container)

    YANG Description: Enclosing container for neighbor list
    """
    return self.__neighbors
      
  def _set_neighbors(self, v, load=False):
    """
    Setter method for neighbors, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast/neighbors (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbors is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbors() directly.

    YANG Description: Enclosing container for neighbor list
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbors must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__neighbors = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbors(self):
    self.__neighbors = YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  loc_rib = __builtin__.property(_get_loc_rib)
  neighbors = __builtin__.property(_get_neighbors)


  _pyangbind_elements = OrderedDict([('loc_rib', loc_rib), ('neighbors', neighbors), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_loc_rib_routes_route_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/loc-rib/routes/route/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for route entries in the
BGP LOC-RIB
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix','__origin','__path_id','__attr_index','__community_index','__ext_community_index','__last_modified','__valid_route','__invalid_reason',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-prefix', is_config=False)
    self.__origin = 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}'}),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}|:))'}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}},),], is_leaf=True, yang_name="origin", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    self.__path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'loc-rib', 'routes', 'route', 'state']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/state/prefix (oc-inet:ipv6-prefix)

    YANG Description: The IPv6 prefix corresponding to the route
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/state/prefix (oc-inet:ipv6-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: The IPv6 prefix corresponding to the route
    """
    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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-prefix', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-prefix', is_config=False)


  def _get_origin(self):
    """
    Getter method for origin, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/state/origin (union)

    YANG Description: Indicates the origin of the route.  If the route is learned
from a neighbor, this value is the neighbor address.  If
the route was injected or redistributed from another
protocol, the origin indicates the source protocol for the
route.
    """
    return self.__origin
      
  def _set_origin(self, v, load=False):
    """
    Setter method for origin, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/state/origin (union)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_origin is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_origin() directly.

    YANG Description: Indicates the origin of the route.  If the route is learned
from a neighbor, this value is the neighbor address.  If
the route was injected or redistributed from another
protocol, the origin indicates the source protocol for the
route.
    """
    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}'}),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}|:))'}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}},),], is_leaf=True, yang_name="origin", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """origin must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          '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}'}),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}|:))'}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}},),], is_leaf=True, yang_name="origin", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)""",
        })

    self.__origin = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_origin(self):
    self.__origin = 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}'}),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}|:))'}),RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}},),], is_leaf=True, yang_name="origin", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)


  def _get_path_id(self):
    """
    Getter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/state/path_id (uint32)

    YANG Description: If the route is learned from a neighbor, the path-id
corresponds to the path-id for the route in the
corresponding adj-rib-in-post table.  If the route is
injected from another protocol, or the neighbor does not
support BGP add-paths, the path-id should be set
to zero, also the default value.
    """
    return self.__path_id
      
  def _set_path_id(self, v, load=False):
    """
    Setter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/state/path_id (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_id() directly.

    YANG Description: If the route is learned from a neighbor, the path-id
corresponds to the path-id for the route in the
corresponding adj-rib-in-post table.  If the route is
injected from another protocol, or the neighbor does not
support BGP add-paths, the path-id should be set
to zero, also the default value.
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_id 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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_id(self):
    self.__path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_attr_index(self):
    """
    Getter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/state/attr_index (leafref)

    YANG Description: Reference to the common attribute group for the
route
    """
    return self.__attr_index
      
  def _set_attr_index(self, v, load=False):
    """
    Setter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/state/attr_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_index() directly.

    YANG Description: Reference to the common attribute group for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_index(self):
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_community_index(self):
    """
    Getter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/state/community_index (leafref)

    YANG Description: Reference to the community attribute for the route
    """
    return self.__community_index
      
  def _set_community_index(self, v, load=False):
    """
    Setter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/state/community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_community_index() directly.

    YANG Description: Reference to the community attribute for the route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_community_index(self):
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_ext_community_index(self):
    """
    Getter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/state/ext_community_index (leafref)

    YANG Description: Reference to the extended community attribute for the
route
    """
    return self.__ext_community_index
      
  def _set_ext_community_index(self, v, load=False):
    """
    Setter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/state/ext_community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ext_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ext_community_index() directly.

    YANG Description: Reference to the extended community attribute for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ext_community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__ext_community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ext_community_index(self):
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_last_modified(self):
    """
    Getter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/state/last_modified (oc-types:timeticks64)

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    return self.__last_modified
      
  def _set_last_modified(self, v, load=False):
    """
    Setter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/state/last_modified (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_last_modified is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_last_modified() directly.

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    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="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """last_modified must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__last_modified = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_last_modified(self):
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_valid_route(self):
    """
    Getter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/state/valid_route (boolean)

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    return self.__valid_route
      
  def _set_valid_route(self, v, load=False):
    """
    Setter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/state/valid_route (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_valid_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_valid_route() directly.

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """valid_route must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__valid_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_valid_route(self):
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_invalid_reason(self):
    """
    Getter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/state/invalid_reason (identityref)

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    return self.__invalid_reason
      
  def _set_invalid_reason(self, v, load=False):
    """
    Setter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/state/invalid_reason (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_invalid_reason is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_invalid_reason() directly.

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    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={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """invalid_reason must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__invalid_reason = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_invalid_reason(self):
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  prefix = __builtin__.property(_get_prefix)
  origin = __builtin__.property(_get_origin)
  path_id = __builtin__.property(_get_path_id)
  attr_index = __builtin__.property(_get_attr_index)
  community_index = __builtin__.property(_get_community_index)
  ext_community_index = __builtin__.property(_get_ext_community_index)
  last_modified = __builtin__.property(_get_last_modified)
  valid_route = __builtin__.property(_get_valid_route)
  invalid_reason = __builtin__.property(_get_invalid_reason)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ('origin', origin), ('path_id', path_id), ('attr_index', attr_index), ('community_index', community_index), ('ext_community_index', ext_community_index), ('last_modified', last_modified), ('valid_route', valid_route), ('invalid_reason', invalid_reason), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_loc_rib_routes_route_unknown_attributes_unknown_attribute_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/loc-rib/routes/route/unknown-attributes/unknown-attribute/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for unknown route attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__optional','__transitive','__partial','__extended','__attr_type','__attr_len','__attr_value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'loc-rib', 'routes', 'route', 'unknown-attributes', 'unknown-attribute', 'state']

  def _get_optional(self):
    """
    Getter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/optional (boolean)

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    return self.__optional
      
  def _set_optional(self, v, load=False):
    """
    Setter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/optional (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_optional is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_optional() directly.

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """optional must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__optional = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_optional(self):
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_transitive(self):
    """
    Getter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/transitive (boolean)

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    return self.__transitive
      
  def _set_transitive(self, v, load=False):
    """
    Setter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/transitive (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transitive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transitive() directly.

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transitive must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__transitive = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transitive(self):
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_partial(self):
    """
    Getter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/partial (boolean)

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    return self.__partial
      
  def _set_partial(self, v, load=False):
    """
    Setter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/partial (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_partial is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_partial() directly.

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """partial must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__partial = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_partial(self):
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_extended(self):
    """
    Getter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/extended (boolean)

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    return self.__extended
      
  def _set_extended(self, v, load=False):
    """
    Setter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/extended (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended() directly.

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__extended = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended(self):
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/attr_type (uint8)

    YANG Description: 1-octet value encoding the attribute type code
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/attr_type (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() directly.

    YANG Description: 1-octet value encoding the attribute type code
    """
    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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_attr_len(self):
    """
    Getter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/attr_len (uint16)

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    return self.__attr_len
      
  def _set_attr_len(self, v, load=False):
    """
    Setter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/attr_len (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_len() directly.

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_len 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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__attr_len = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_len(self):
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_attr_value(self):
    """
    Getter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/attr_value (binary)

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    return self.__attr_value
      
  def _set_attr_value(self, v, load=False):
    """
    Setter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/attr_value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_value() directly.

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__attr_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_value(self):
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  optional = __builtin__.property(_get_optional)
  transitive = __builtin__.property(_get_transitive)
  partial = __builtin__.property(_get_partial)
  extended = __builtin__.property(_get_extended)
  attr_type = __builtin__.property(_get_attr_type)
  attr_len = __builtin__.property(_get_attr_len)
  attr_value = __builtin__.property(_get_attr_value)


  _pyangbind_elements = OrderedDict([('optional', optional), ('transitive', transitive), ('partial', partial), ('extended', extended), ('attr_type', attr_type), ('attr_len', attr_len), ('attr_value', attr_value), ])


class yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_loc_rib_routes_route_unknown_attributes_unknown_attribute(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/loc-rib/routes/route/unknown-attributes/unknown-attribute. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
  """
  __slots__ = ('_path_helper', '_extmethods', '__attr_type','__state',)

  _yang_name = 'unknown-attribute'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_loc_rib_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'loc-rib', 'routes', 'route', 'unknown-attributes', 'unknown-attribute']

  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/unknown_attributes/unknown_attribute/attr_type (leafref)

    YANG Description: Reference to the list key
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/unknown_attributes/unknown_attribute/attr_type (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/unknown_attributes/unknown_attribute/state (container)

    YANG Description: Operational state for unknown route attributes
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/unknown_attributes/unknown_attribute/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 unknown route attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_loc_rib_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_loc_rib_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_loc_rib_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  attr_type = __builtin__.property(_get_attr_type)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('attr_type', attr_type), ('state', state), ])


class yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_loc_rib_routes_route_unknown_attributes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/loc-rib/routes/route/unknown-attributes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
  """
  __slots__ = ('_path_helper', '_extmethods', '__unknown_attribute',)

  _yang_name = 'unknown-attributes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_loc_rib_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'loc-rib', 'routes', 'route', 'unknown-attributes']

  def _get_unknown_attribute(self):
    """
    Getter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/unknown_attributes/unknown_attribute (list)

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    return self.__unknown_attribute
      
  def _set_unknown_attribute(self, v, load=False):
    """
    Setter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/unknown_attributes/unknown_attribute (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attribute is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attribute() directly.

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_loc_rib_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attribute must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_loc_rib_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__unknown_attribute = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attribute(self):
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_loc_rib_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  unknown_attribute = __builtin__.property(_get_unknown_attribute)


  _pyangbind_elements = OrderedDict([('unknown_attribute', unknown_attribute), ])


class yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_loc_rib_routes_route(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/loc-rib/routes/route. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of routes in the table, keyed by the route
prefix, the route origin, and path-id.  The route
origin can be either the neighbor address from which
the route was learned, or the source protocol that
injected the route.  The path-id distinguishes routes
for the same prefix received from a neighbor (e.g.,
if add-paths is eanbled).
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix','__origin','__path_id','__state','__unknown_attributes',)

  _yang_name = 'route'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__origin = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="origin", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_loc_rib_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_loc_rib_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'loc-rib', 'routes', 'route']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/prefix (leafref)

    YANG Description: Reference to the prefix list key
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/prefix (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: Reference to the prefix 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_origin(self):
    """
    Getter method for origin, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/origin (leafref)

    YANG Description: Reference to the origin list key
    """
    return self.__origin
      
  def _set_origin(self, v, load=False):
    """
    Setter method for origin, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/origin (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_origin is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_origin() directly.

    YANG Description: Reference to the origin 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="origin", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """origin must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="origin", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__origin = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_origin(self):
    self.__origin = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="origin", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_path_id(self):
    """
    Getter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/path_id (leafref)

    YANG Description: Reference to the path-id list key
    """
    return self.__path_id
      
  def _set_path_id(self, v, load=False):
    """
    Setter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/path_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_id() directly.

    YANG Description: Reference to the path-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="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_id(self):
    self.__path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/state (container)

    YANG Description: Operational state data for route entries in the
BGP LOC-RIB
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/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 route entries in the
BGP LOC-RIB
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_loc_rib_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_loc_rib_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_loc_rib_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unknown_attributes(self):
    """
    Getter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/unknown_attributes (container)

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    return self.__unknown_attributes
      
  def _set_unknown_attributes(self, v, load=False):
    """
    Setter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route/unknown_attributes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attributes() directly.

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_loc_rib_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attributes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_loc_rib_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unknown_attributes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attributes(self):
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_loc_rib_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  prefix = __builtin__.property(_get_prefix)
  origin = __builtin__.property(_get_origin)
  path_id = __builtin__.property(_get_path_id)
  state = __builtin__.property(_get_state)
  unknown_attributes = __builtin__.property(_get_unknown_attributes)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ('origin', origin), ('path_id', path_id), ('state', state), ('unknown_attributes', unknown_attributes), ])


class yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_loc_rib_routes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/loc-rib/routes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for list of routes in the routing
table.
  """
  __slots__ = ('_path_helper', '_extmethods', '__route',)

  _yang_name = 'routes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__route = YANGDynClass(base=YANGListType("prefix origin path_id",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_loc_rib_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix origin path-id', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'loc-rib', 'routes']

  def _get_route(self):
    """
    Getter method for route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route (list)

    YANG Description: List of routes in the table, keyed by the route
prefix, the route origin, and path-id.  The route
origin can be either the neighbor address from which
the route was learned, or the source protocol that
injected the route.  The path-id distinguishes routes
for the same prefix received from a neighbor (e.g.,
if add-paths is eanbled).
    """
    return self.__route
      
  def _set_route(self, v, load=False):
    """
    Setter method for route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes/route (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route() directly.

    YANG Description: List of routes in the table, keyed by the route
prefix, the route origin, and path-id.  The route
origin can be either the neighbor address from which
the route was learned, or the source protocol that
injected the route.  The path-id distinguishes routes
for the same prefix received from a neighbor (e.g.,
if add-paths is eanbled).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("prefix origin path_id",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_loc_rib_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix origin path-id', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("prefix origin path_id",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_loc_rib_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix origin path-id', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route(self):
    self.__route = YANGDynClass(base=YANGListType("prefix origin path_id",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_loc_rib_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix origin path-id', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  route = __builtin__.property(_get_route)


  _pyangbind_elements = OrderedDict([('route', route), ])


class yc_loc_rib_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_loc_rib(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/loc-rib. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Container for the IPv6 BGP LOC-RIB data
  """
  __slots__ = ('_path_helper', '_extmethods', '__routes',)

  _yang_name = 'loc-rib'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_loc_rib_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'loc-rib']

  def _get_routes(self):
    """
    Getter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes (container)

    YANG Description: Enclosing container for list of routes in the routing
table.
    """
    return self.__routes
      
  def _set_routes(self, v, load=False):
    """
    Setter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib/routes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_routes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_routes() directly.

    YANG Description: Enclosing container for list of routes in the routing
table.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_loc_rib_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """routes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_loc_rib_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__routes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_routes(self):
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_loc_rib_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  routes = __builtin__.property(_get_routes)


  _pyangbind_elements = OrderedDict([('routes', routes), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/neighbors/neighbor/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for each neighbor BGP Adj-RIB
  """
  __slots__ = ('_path_helper', '_extmethods', '__neighbor_address',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__neighbor_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}'}),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}|:))'}),], is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'neighbors', 'neighbor', 'state']

  def _get_neighbor_address(self):
    """
    Getter method for neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/state/neighbor_address (oc-inet:ip-address)

    YANG Description: IP address of the BGP neighbor or peer
    """
    return self.__neighbor_address
      
  def _set_neighbor_address(self, v, load=False):
    """
    Setter method for neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/state/neighbor_address (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor_address() directly.

    YANG Description: IP address of the BGP neighbor or peer
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor_address must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__neighbor_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor_address(self):
    self.__neighbor_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}'}),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}|:))'}),], is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)

  neighbor_address = __builtin__.property(_get_neighbor_address)


  _pyangbind_elements = OrderedDict([('neighbor_address', neighbor_address), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/neighbors/neighbor/adj-rib-in-pre/routes/route/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for BGP Adj-RIB entries
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix','__path_id','__attr_index','__community_index','__ext_community_index','__last_modified','__valid_route','__invalid_reason',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-prefix', is_config=False)
    self.__path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'neighbors', 'neighbor', 'adj-rib-in-pre', 'routes', 'route', 'state']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/state/prefix (oc-inet:ipv6-prefix)

    YANG Description: Prefix for the route
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/state/prefix (oc-inet:ipv6-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: Prefix for the route
    """
    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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-prefix', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-prefix', is_config=False)


  def _get_path_id(self):
    """
    Getter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/state/path_id (uint32)

    YANG Description: When the BGP speaker supports advertisement of multiple
paths for a prefix, the path identifier is used to
uniquely identify a route based on the combination of the
prefix and path id.  In the Adj-RIB-In, the path-id value is
the value received in the update message.   In the Loc-RIB,
if used, it should represent a locally generated path-id
value for the corresponding route.  In Adj-RIB-Out, it
should be the value sent to a neighbor when add-paths is
used, i.e., the capability has been negotiated.
    """
    return self.__path_id
      
  def _set_path_id(self, v, load=False):
    """
    Setter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/state/path_id (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_id() directly.

    YANG Description: When the BGP speaker supports advertisement of multiple
paths for a prefix, the path identifier is used to
uniquely identify a route based on the combination of the
prefix and path id.  In the Adj-RIB-In, the path-id value is
the value received in the update message.   In the Loc-RIB,
if used, it should represent a locally generated path-id
value for the corresponding route.  In Adj-RIB-Out, it
should be the value sent to a neighbor when add-paths is
used, i.e., the capability has been negotiated.
    """
    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="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_id 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="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_id(self):
    self.__path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_attr_index(self):
    """
    Getter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/state/attr_index (leafref)

    YANG Description: Reference to the common attribute group for the
route
    """
    return self.__attr_index
      
  def _set_attr_index(self, v, load=False):
    """
    Setter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/state/attr_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_index() directly.

    YANG Description: Reference to the common attribute group for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_index(self):
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_community_index(self):
    """
    Getter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/state/community_index (leafref)

    YANG Description: Reference to the community attribute for the route
    """
    return self.__community_index
      
  def _set_community_index(self, v, load=False):
    """
    Setter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/state/community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_community_index() directly.

    YANG Description: Reference to the community attribute for the route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_community_index(self):
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_ext_community_index(self):
    """
    Getter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/state/ext_community_index (leafref)

    YANG Description: Reference to the extended community attribute for the
route
    """
    return self.__ext_community_index
      
  def _set_ext_community_index(self, v, load=False):
    """
    Setter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/state/ext_community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ext_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ext_community_index() directly.

    YANG Description: Reference to the extended community attribute for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ext_community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__ext_community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ext_community_index(self):
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_last_modified(self):
    """
    Getter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/state/last_modified (oc-types:timeticks64)

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    return self.__last_modified
      
  def _set_last_modified(self, v, load=False):
    """
    Setter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/state/last_modified (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_last_modified is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_last_modified() directly.

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    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="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """last_modified must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__last_modified = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_last_modified(self):
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_valid_route(self):
    """
    Getter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/state/valid_route (boolean)

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    return self.__valid_route
      
  def _set_valid_route(self, v, load=False):
    """
    Setter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/state/valid_route (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_valid_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_valid_route() directly.

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """valid_route must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__valid_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_valid_route(self):
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_invalid_reason(self):
    """
    Getter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/state/invalid_reason (identityref)

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    return self.__invalid_reason
      
  def _set_invalid_reason(self, v, load=False):
    """
    Setter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/state/invalid_reason (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_invalid_reason is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_invalid_reason() directly.

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    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={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """invalid_reason must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__invalid_reason = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_invalid_reason(self):
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  prefix = __builtin__.property(_get_prefix)
  path_id = __builtin__.property(_get_path_id)
  attr_index = __builtin__.property(_get_attr_index)
  community_index = __builtin__.property(_get_community_index)
  ext_community_index = __builtin__.property(_get_ext_community_index)
  last_modified = __builtin__.property(_get_last_modified)
  valid_route = __builtin__.property(_get_valid_route)
  invalid_reason = __builtin__.property(_get_invalid_reason)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ('path_id', path_id), ('attr_index', attr_index), ('community_index', community_index), ('ext_community_index', ext_community_index), ('last_modified', last_modified), ('valid_route', valid_route), ('invalid_reason', invalid_reason), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes_unknown_attribute_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/neighbors/neighbor/adj-rib-in-pre/routes/route/unknown-attributes/unknown-attribute/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for unknown route attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__optional','__transitive','__partial','__extended','__attr_type','__attr_len','__attr_value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'neighbors', 'neighbor', 'adj-rib-in-pre', 'routes', 'route', 'unknown-attributes', 'unknown-attribute', 'state']

  def _get_optional(self):
    """
    Getter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/optional (boolean)

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    return self.__optional
      
  def _set_optional(self, v, load=False):
    """
    Setter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/optional (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_optional is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_optional() directly.

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """optional must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__optional = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_optional(self):
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_transitive(self):
    """
    Getter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/transitive (boolean)

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    return self.__transitive
      
  def _set_transitive(self, v, load=False):
    """
    Setter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/transitive (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transitive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transitive() directly.

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transitive must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__transitive = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transitive(self):
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_partial(self):
    """
    Getter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/partial (boolean)

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    return self.__partial
      
  def _set_partial(self, v, load=False):
    """
    Setter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/partial (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_partial is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_partial() directly.

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """partial must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__partial = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_partial(self):
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_extended(self):
    """
    Getter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/extended (boolean)

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    return self.__extended
      
  def _set_extended(self, v, load=False):
    """
    Setter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/extended (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended() directly.

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__extended = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended(self):
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_type (uint8)

    YANG Description: 1-octet value encoding the attribute type code
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_type (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() directly.

    YANG Description: 1-octet value encoding the attribute type code
    """
    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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_attr_len(self):
    """
    Getter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_len (uint16)

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    return self.__attr_len
      
  def _set_attr_len(self, v, load=False):
    """
    Setter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_len (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_len() directly.

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_len 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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__attr_len = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_len(self):
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_attr_value(self):
    """
    Getter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_value (binary)

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    return self.__attr_value
      
  def _set_attr_value(self, v, load=False):
    """
    Setter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_value() directly.

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__attr_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_value(self):
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  optional = __builtin__.property(_get_optional)
  transitive = __builtin__.property(_get_transitive)
  partial = __builtin__.property(_get_partial)
  extended = __builtin__.property(_get_extended)
  attr_type = __builtin__.property(_get_attr_type)
  attr_len = __builtin__.property(_get_attr_len)
  attr_value = __builtin__.property(_get_attr_value)


  _pyangbind_elements = OrderedDict([('optional', optional), ('transitive', transitive), ('partial', partial), ('extended', extended), ('attr_type', attr_type), ('attr_len', attr_len), ('attr_value', attr_value), ])


class yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes_unknown_attribute(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/neighbors/neighbor/adj-rib-in-pre/routes/route/unknown-attributes/unknown-attribute. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
  """
  __slots__ = ('_path_helper', '_extmethods', '__attr_type','__state',)

  _yang_name = 'unknown-attribute'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'neighbors', 'neighbor', 'adj-rib-in-pre', 'routes', 'route', 'unknown-attributes', 'unknown-attribute']

  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/attr_type (leafref)

    YANG Description: Reference to the list key
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/attr_type (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state (container)

    YANG Description: Operational state for unknown route attributes
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/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 unknown route attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  attr_type = __builtin__.property(_get_attr_type)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('attr_type', attr_type), ('state', state), ])


class yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/neighbors/neighbor/adj-rib-in-pre/routes/route/unknown-attributes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
  """
  __slots__ = ('_path_helper', '_extmethods', '__unknown_attribute',)

  _yang_name = 'unknown-attributes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'neighbors', 'neighbor', 'adj-rib-in-pre', 'routes', 'route', 'unknown-attributes']

  def _get_unknown_attribute(self):
    """
    Getter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute (list)

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    return self.__unknown_attribute
      
  def _set_unknown_attribute(self, v, load=False):
    """
    Setter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attribute is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attribute() directly.

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attribute must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__unknown_attribute = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attribute(self):
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  unknown_attribute = __builtin__.property(_get_unknown_attribute)


  _pyangbind_elements = OrderedDict([('unknown_attribute', unknown_attribute), ])


class yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/neighbors/neighbor/adj-rib-in-pre/routes/route. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of routes in the table
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix','__path_id','__state','__unknown_attributes',)

  _yang_name = 'route'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'neighbors', 'neighbor', 'adj-rib-in-pre', 'routes', 'route']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/prefix (leafref)

    YANG Description: Reference to the prefix list key
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/prefix (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: Reference to the prefix 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_path_id(self):
    """
    Getter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/path_id (leafref)

    YANG Description: Reference to the path-id list key
    """
    return self.__path_id
      
  def _set_path_id(self, v, load=False):
    """
    Setter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/path_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_id() directly.

    YANG Description: Reference to the path-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="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_id(self):
    self.__path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/state (container)

    YANG Description: Operational state data for BGP Adj-RIB entries
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/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 BGP Adj-RIB entries
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unknown_attributes(self):
    """
    Getter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes (container)

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    return self.__unknown_attributes
      
  def _set_unknown_attributes(self, v, load=False):
    """
    Setter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attributes() directly.

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attributes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unknown_attributes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attributes(self):
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  prefix = __builtin__.property(_get_prefix)
  path_id = __builtin__.property(_get_path_id)
  state = __builtin__.property(_get_state)
  unknown_attributes = __builtin__.property(_get_unknown_attributes)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ('path_id', path_id), ('state', state), ('unknown_attributes', unknown_attributes), ])


class yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_pre_routes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/neighbors/neighbor/adj-rib-in-pre/routes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for list of routes in the routing
table.
  """
  __slots__ = ('_path_helper', '_extmethods', '__route',)

  _yang_name = 'routes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__route = YANGDynClass(base=YANGListType("prefix path_id",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix path-id', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'neighbors', 'neighbor', 'adj-rib-in-pre', 'routes']

  def _get_route(self):
    """
    Getter method for route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route (list)

    YANG Description: List of routes in the table
    """
    return self.__route
      
  def _set_route(self, v, load=False):
    """
    Setter method for route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes/route (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route() directly.

    YANG Description: List of routes in the table
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("prefix path_id",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix path-id', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("prefix path_id",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix path-id', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route(self):
    self.__route = YANGDynClass(base=YANGListType("prefix path_id",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_pre_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix path-id', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  route = __builtin__.property(_get_route)


  _pyangbind_elements = OrderedDict([('route', route), ])


class yc_adj_rib_in_pre_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_pre(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/neighbors/neighbor/adj-rib-in-pre. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Per-neighbor table containing the NLRI updates
received from the neighbor before any local input
policy rules or filters have been applied.  This can
be considered the 'raw' updates from the neighbor.
  """
  __slots__ = ('_path_helper', '_extmethods', '__routes',)

  _yang_name = 'adj-rib-in-pre'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_pre_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'neighbors', 'neighbor', 'adj-rib-in-pre']

  def _get_routes(self):
    """
    Getter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes (container)

    YANG Description: Enclosing container for list of routes in the routing
table.
    """
    return self.__routes
      
  def _set_routes(self, v, load=False):
    """
    Setter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre/routes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_routes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_routes() directly.

    YANG Description: Enclosing container for list of routes in the routing
table.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_pre_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """routes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_pre_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__routes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_routes(self):
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_pre_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  routes = __builtin__.property(_get_routes)


  _pyangbind_elements = OrderedDict([('routes', routes), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_post_routes_route_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/neighbors/neighbor/adj-rib-in-post/routes/route/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for BGP Adj-RIB entries
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix','__path_id','__attr_index','__community_index','__ext_community_index','__last_modified','__valid_route','__invalid_reason','__best_path',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-prefix', is_config=False)
    self.__path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__best_path = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="best-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'neighbors', 'neighbor', 'adj-rib-in-post', 'routes', 'route', 'state']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/state/prefix (oc-inet:ipv6-prefix)

    YANG Description: Prefix for the route
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/state/prefix (oc-inet:ipv6-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: Prefix for the route
    """
    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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-prefix', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-prefix', is_config=False)


  def _get_path_id(self):
    """
    Getter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/state/path_id (uint32)

    YANG Description: When the BGP speaker supports advertisement of multiple
paths for a prefix, the path identifier is used to
uniquely identify a route based on the combination of the
prefix and path id.  In the Adj-RIB-In, the path-id value is
the value received in the update message.   In the Loc-RIB,
if used, it should represent a locally generated path-id
value for the corresponding route.  In Adj-RIB-Out, it
should be the value sent to a neighbor when add-paths is
used, i.e., the capability has been negotiated.
    """
    return self.__path_id
      
  def _set_path_id(self, v, load=False):
    """
    Setter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/state/path_id (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_id() directly.

    YANG Description: When the BGP speaker supports advertisement of multiple
paths for a prefix, the path identifier is used to
uniquely identify a route based on the combination of the
prefix and path id.  In the Adj-RIB-In, the path-id value is
the value received in the update message.   In the Loc-RIB,
if used, it should represent a locally generated path-id
value for the corresponding route.  In Adj-RIB-Out, it
should be the value sent to a neighbor when add-paths is
used, i.e., the capability has been negotiated.
    """
    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="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_id 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="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_id(self):
    self.__path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_attr_index(self):
    """
    Getter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/state/attr_index (leafref)

    YANG Description: Reference to the common attribute group for the
route
    """
    return self.__attr_index
      
  def _set_attr_index(self, v, load=False):
    """
    Setter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/state/attr_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_index() directly.

    YANG Description: Reference to the common attribute group for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_index(self):
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_community_index(self):
    """
    Getter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/state/community_index (leafref)

    YANG Description: Reference to the community attribute for the route
    """
    return self.__community_index
      
  def _set_community_index(self, v, load=False):
    """
    Setter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/state/community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_community_index() directly.

    YANG Description: Reference to the community attribute for the route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_community_index(self):
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_ext_community_index(self):
    """
    Getter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/state/ext_community_index (leafref)

    YANG Description: Reference to the extended community attribute for the
route
    """
    return self.__ext_community_index
      
  def _set_ext_community_index(self, v, load=False):
    """
    Setter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/state/ext_community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ext_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ext_community_index() directly.

    YANG Description: Reference to the extended community attribute for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ext_community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__ext_community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ext_community_index(self):
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_last_modified(self):
    """
    Getter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/state/last_modified (oc-types:timeticks64)

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    return self.__last_modified
      
  def _set_last_modified(self, v, load=False):
    """
    Setter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/state/last_modified (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_last_modified is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_last_modified() directly.

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    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="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """last_modified must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__last_modified = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_last_modified(self):
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_valid_route(self):
    """
    Getter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/state/valid_route (boolean)

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    return self.__valid_route
      
  def _set_valid_route(self, v, load=False):
    """
    Setter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/state/valid_route (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_valid_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_valid_route() directly.

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """valid_route must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__valid_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_valid_route(self):
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_invalid_reason(self):
    """
    Getter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/state/invalid_reason (identityref)

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    return self.__invalid_reason
      
  def _set_invalid_reason(self, v, load=False):
    """
    Setter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/state/invalid_reason (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_invalid_reason is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_invalid_reason() directly.

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    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={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """invalid_reason must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__invalid_reason = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_invalid_reason(self):
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_best_path(self):
    """
    Getter method for best_path, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/state/best_path (boolean)

    YANG Description: Current path was selected as the best path.
    """
    return self.__best_path
      
  def _set_best_path(self, v, load=False):
    """
    Setter method for best_path, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/state/best_path (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_best_path is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_best_path() directly.

    YANG Description: Current path was selected as the best path.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="best-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """best_path must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="best-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__best_path = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_best_path(self):
    self.__best_path = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="best-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  prefix = __builtin__.property(_get_prefix)
  path_id = __builtin__.property(_get_path_id)
  attr_index = __builtin__.property(_get_attr_index)
  community_index = __builtin__.property(_get_community_index)
  ext_community_index = __builtin__.property(_get_ext_community_index)
  last_modified = __builtin__.property(_get_last_modified)
  valid_route = __builtin__.property(_get_valid_route)
  invalid_reason = __builtin__.property(_get_invalid_reason)
  best_path = __builtin__.property(_get_best_path)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ('path_id', path_id), ('attr_index', attr_index), ('community_index', community_index), ('ext_community_index', ext_community_index), ('last_modified', last_modified), ('valid_route', valid_route), ('invalid_reason', invalid_reason), ('best_path', best_path), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes_unknown_attribute_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/neighbors/neighbor/adj-rib-in-post/routes/route/unknown-attributes/unknown-attribute/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for unknown route attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__optional','__transitive','__partial','__extended','__attr_type','__attr_len','__attr_value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'neighbors', 'neighbor', 'adj-rib-in-post', 'routes', 'route', 'unknown-attributes', 'unknown-attribute', 'state']

  def _get_optional(self):
    """
    Getter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/optional (boolean)

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    return self.__optional
      
  def _set_optional(self, v, load=False):
    """
    Setter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/optional (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_optional is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_optional() directly.

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """optional must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__optional = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_optional(self):
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_transitive(self):
    """
    Getter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/transitive (boolean)

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    return self.__transitive
      
  def _set_transitive(self, v, load=False):
    """
    Setter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/transitive (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transitive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transitive() directly.

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transitive must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__transitive = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transitive(self):
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_partial(self):
    """
    Getter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/partial (boolean)

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    return self.__partial
      
  def _set_partial(self, v, load=False):
    """
    Setter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/partial (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_partial is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_partial() directly.

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """partial must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__partial = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_partial(self):
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_extended(self):
    """
    Getter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/extended (boolean)

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    return self.__extended
      
  def _set_extended(self, v, load=False):
    """
    Setter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/extended (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended() directly.

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__extended = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended(self):
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/attr_type (uint8)

    YANG Description: 1-octet value encoding the attribute type code
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/attr_type (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() directly.

    YANG Description: 1-octet value encoding the attribute type code
    """
    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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_attr_len(self):
    """
    Getter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/attr_len (uint16)

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    return self.__attr_len
      
  def _set_attr_len(self, v, load=False):
    """
    Setter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/attr_len (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_len() directly.

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_len 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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__attr_len = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_len(self):
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_attr_value(self):
    """
    Getter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/attr_value (binary)

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    return self.__attr_value
      
  def _set_attr_value(self, v, load=False):
    """
    Setter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/attr_value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_value() directly.

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__attr_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_value(self):
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  optional = __builtin__.property(_get_optional)
  transitive = __builtin__.property(_get_transitive)
  partial = __builtin__.property(_get_partial)
  extended = __builtin__.property(_get_extended)
  attr_type = __builtin__.property(_get_attr_type)
  attr_len = __builtin__.property(_get_attr_len)
  attr_value = __builtin__.property(_get_attr_value)


  _pyangbind_elements = OrderedDict([('optional', optional), ('transitive', transitive), ('partial', partial), ('extended', extended), ('attr_type', attr_type), ('attr_len', attr_len), ('attr_value', attr_value), ])


class yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes_unknown_attribute(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/neighbors/neighbor/adj-rib-in-post/routes/route/unknown-attributes/unknown-attribute. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
  """
  __slots__ = ('_path_helper', '_extmethods', '__attr_type','__state',)

  _yang_name = 'unknown-attribute'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'neighbors', 'neighbor', 'adj-rib-in-post', 'routes', 'route', 'unknown-attributes', 'unknown-attribute']

  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/attr_type (leafref)

    YANG Description: Reference to the list key
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/attr_type (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state (container)

    YANG Description: Operational state for unknown route attributes
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/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 unknown route attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  attr_type = __builtin__.property(_get_attr_type)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('attr_type', attr_type), ('state', state), ])


class yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/neighbors/neighbor/adj-rib-in-post/routes/route/unknown-attributes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
  """
  __slots__ = ('_path_helper', '_extmethods', '__unknown_attribute',)

  _yang_name = 'unknown-attributes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'neighbors', 'neighbor', 'adj-rib-in-post', 'routes', 'route', 'unknown-attributes']

  def _get_unknown_attribute(self):
    """
    Getter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute (list)

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    return self.__unknown_attribute
      
  def _set_unknown_attribute(self, v, load=False):
    """
    Setter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attribute is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attribute() directly.

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attribute must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__unknown_attribute = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attribute(self):
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  unknown_attribute = __builtin__.property(_get_unknown_attribute)


  _pyangbind_elements = OrderedDict([('unknown_attribute', unknown_attribute), ])


class yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_post_routes_route(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/neighbors/neighbor/adj-rib-in-post/routes/route. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of routes in the table
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix','__path_id','__state','__unknown_attributes',)

  _yang_name = 'route'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_post_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'neighbors', 'neighbor', 'adj-rib-in-post', 'routes', 'route']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/prefix (leafref)

    YANG Description: Reference to the prefix list key
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/prefix (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: Reference to the prefix 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_path_id(self):
    """
    Getter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/path_id (leafref)

    YANG Description: Reference to the path-id list key
    """
    return self.__path_id
      
  def _set_path_id(self, v, load=False):
    """
    Setter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/path_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_id() directly.

    YANG Description: Reference to the path-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="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_id(self):
    self.__path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/state (container)

    YANG Description: Operational state data for BGP Adj-RIB entries
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/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 BGP Adj-RIB entries
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_post_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_post_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_post_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unknown_attributes(self):
    """
    Getter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes (container)

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    return self.__unknown_attributes
      
  def _set_unknown_attributes(self, v, load=False):
    """
    Setter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attributes() directly.

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attributes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unknown_attributes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attributes(self):
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  prefix = __builtin__.property(_get_prefix)
  path_id = __builtin__.property(_get_path_id)
  state = __builtin__.property(_get_state)
  unknown_attributes = __builtin__.property(_get_unknown_attributes)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ('path_id', path_id), ('state', state), ('unknown_attributes', unknown_attributes), ])


class yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_post_routes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/neighbors/neighbor/adj-rib-in-post/routes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for list of routes in the routing
table.
  """
  __slots__ = ('_path_helper', '_extmethods', '__route',)

  _yang_name = 'routes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__route = YANGDynClass(base=YANGListType("prefix path_id",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_post_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix path-id', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'neighbors', 'neighbor', 'adj-rib-in-post', 'routes']

  def _get_route(self):
    """
    Getter method for route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route (list)

    YANG Description: List of routes in the table
    """
    return self.__route
      
  def _set_route(self, v, load=False):
    """
    Setter method for route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes/route (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route() directly.

    YANG Description: List of routes in the table
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("prefix path_id",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_post_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix path-id', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("prefix path_id",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_post_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix path-id', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route(self):
    self.__route = YANGDynClass(base=YANGListType("prefix path_id",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_post_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix path-id', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  route = __builtin__.property(_get_route)


  _pyangbind_elements = OrderedDict([('route', route), ])


class yc_adj_rib_in_post_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_post(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/neighbors/neighbor/adj-rib-in-post. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Per-neighbor table containing the paths received from
the neighbor that are eligible for best-path selection
after local input policy rules have been applied.
  """
  __slots__ = ('_path_helper', '_extmethods', '__routes',)

  _yang_name = 'adj-rib-in-post'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_post_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'neighbors', 'neighbor', 'adj-rib-in-post']

  def _get_routes(self):
    """
    Getter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes (container)

    YANG Description: Enclosing container for list of routes in the routing
table.
    """
    return self.__routes
      
  def _set_routes(self, v, load=False):
    """
    Setter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post/routes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_routes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_routes() directly.

    YANG Description: Enclosing container for list of routes in the routing
table.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_post_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """routes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_post_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__routes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_routes(self):
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_post_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  routes = __builtin__.property(_get_routes)


  _pyangbind_elements = OrderedDict([('routes', routes), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/neighbors/neighbor/adj-rib-out-pre/routes/route/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for BGP Adj-RIB entries
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix','__path_id','__attr_index','__community_index','__ext_community_index','__last_modified','__valid_route','__invalid_reason',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-prefix', is_config=False)
    self.__path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'neighbors', 'neighbor', 'adj-rib-out-pre', 'routes', 'route', 'state']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/state/prefix (oc-inet:ipv6-prefix)

    YANG Description: Prefix for the route
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/state/prefix (oc-inet:ipv6-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: Prefix for the route
    """
    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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-prefix', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-prefix', is_config=False)


  def _get_path_id(self):
    """
    Getter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/state/path_id (uint32)

    YANG Description: When the BGP speaker supports advertisement of multiple
paths for a prefix, the path identifier is used to
uniquely identify a route based on the combination of the
prefix and path id.  In the Adj-RIB-In, the path-id value is
the value received in the update message.   In the Loc-RIB,
if used, it should represent a locally generated path-id
value for the corresponding route.  In Adj-RIB-Out, it
should be the value sent to a neighbor when add-paths is
used, i.e., the capability has been negotiated.
    """
    return self.__path_id
      
  def _set_path_id(self, v, load=False):
    """
    Setter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/state/path_id (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_id() directly.

    YANG Description: When the BGP speaker supports advertisement of multiple
paths for a prefix, the path identifier is used to
uniquely identify a route based on the combination of the
prefix and path id.  In the Adj-RIB-In, the path-id value is
the value received in the update message.   In the Loc-RIB,
if used, it should represent a locally generated path-id
value for the corresponding route.  In Adj-RIB-Out, it
should be the value sent to a neighbor when add-paths is
used, i.e., the capability has been negotiated.
    """
    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="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_id 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="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_id(self):
    self.__path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_attr_index(self):
    """
    Getter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/state/attr_index (leafref)

    YANG Description: Reference to the common attribute group for the
route
    """
    return self.__attr_index
      
  def _set_attr_index(self, v, load=False):
    """
    Setter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/state/attr_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_index() directly.

    YANG Description: Reference to the common attribute group for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_index(self):
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_community_index(self):
    """
    Getter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/state/community_index (leafref)

    YANG Description: Reference to the community attribute for the route
    """
    return self.__community_index
      
  def _set_community_index(self, v, load=False):
    """
    Setter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/state/community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_community_index() directly.

    YANG Description: Reference to the community attribute for the route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_community_index(self):
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_ext_community_index(self):
    """
    Getter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/state/ext_community_index (leafref)

    YANG Description: Reference to the extended community attribute for the
route
    """
    return self.__ext_community_index
      
  def _set_ext_community_index(self, v, load=False):
    """
    Setter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/state/ext_community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ext_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ext_community_index() directly.

    YANG Description: Reference to the extended community attribute for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ext_community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__ext_community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ext_community_index(self):
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_last_modified(self):
    """
    Getter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/state/last_modified (oc-types:timeticks64)

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    return self.__last_modified
      
  def _set_last_modified(self, v, load=False):
    """
    Setter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/state/last_modified (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_last_modified is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_last_modified() directly.

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    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="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """last_modified must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__last_modified = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_last_modified(self):
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_valid_route(self):
    """
    Getter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/state/valid_route (boolean)

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    return self.__valid_route
      
  def _set_valid_route(self, v, load=False):
    """
    Setter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/state/valid_route (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_valid_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_valid_route() directly.

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """valid_route must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__valid_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_valid_route(self):
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_invalid_reason(self):
    """
    Getter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/state/invalid_reason (identityref)

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    return self.__invalid_reason
      
  def _set_invalid_reason(self, v, load=False):
    """
    Setter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/state/invalid_reason (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_invalid_reason is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_invalid_reason() directly.

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    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={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """invalid_reason must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__invalid_reason = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_invalid_reason(self):
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  prefix = __builtin__.property(_get_prefix)
  path_id = __builtin__.property(_get_path_id)
  attr_index = __builtin__.property(_get_attr_index)
  community_index = __builtin__.property(_get_community_index)
  ext_community_index = __builtin__.property(_get_ext_community_index)
  last_modified = __builtin__.property(_get_last_modified)
  valid_route = __builtin__.property(_get_valid_route)
  invalid_reason = __builtin__.property(_get_invalid_reason)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ('path_id', path_id), ('attr_index', attr_index), ('community_index', community_index), ('ext_community_index', ext_community_index), ('last_modified', last_modified), ('valid_route', valid_route), ('invalid_reason', invalid_reason), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes_unknown_attribute_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/neighbors/neighbor/adj-rib-out-pre/routes/route/unknown-attributes/unknown-attribute/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for unknown route attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__optional','__transitive','__partial','__extended','__attr_type','__attr_len','__attr_value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'neighbors', 'neighbor', 'adj-rib-out-pre', 'routes', 'route', 'unknown-attributes', 'unknown-attribute', 'state']

  def _get_optional(self):
    """
    Getter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/optional (boolean)

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    return self.__optional
      
  def _set_optional(self, v, load=False):
    """
    Setter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/optional (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_optional is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_optional() directly.

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """optional must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__optional = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_optional(self):
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_transitive(self):
    """
    Getter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/transitive (boolean)

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    return self.__transitive
      
  def _set_transitive(self, v, load=False):
    """
    Setter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/transitive (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transitive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transitive() directly.

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transitive must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__transitive = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transitive(self):
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_partial(self):
    """
    Getter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/partial (boolean)

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    return self.__partial
      
  def _set_partial(self, v, load=False):
    """
    Setter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/partial (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_partial is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_partial() directly.

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """partial must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__partial = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_partial(self):
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_extended(self):
    """
    Getter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/extended (boolean)

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    return self.__extended
      
  def _set_extended(self, v, load=False):
    """
    Setter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/extended (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended() directly.

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__extended = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended(self):
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_type (uint8)

    YANG Description: 1-octet value encoding the attribute type code
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_type (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() directly.

    YANG Description: 1-octet value encoding the attribute type code
    """
    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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_attr_len(self):
    """
    Getter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_len (uint16)

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    return self.__attr_len
      
  def _set_attr_len(self, v, load=False):
    """
    Setter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_len (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_len() directly.

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_len 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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__attr_len = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_len(self):
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_attr_value(self):
    """
    Getter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_value (binary)

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    return self.__attr_value
      
  def _set_attr_value(self, v, load=False):
    """
    Setter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_value() directly.

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__attr_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_value(self):
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  optional = __builtin__.property(_get_optional)
  transitive = __builtin__.property(_get_transitive)
  partial = __builtin__.property(_get_partial)
  extended = __builtin__.property(_get_extended)
  attr_type = __builtin__.property(_get_attr_type)
  attr_len = __builtin__.property(_get_attr_len)
  attr_value = __builtin__.property(_get_attr_value)


  _pyangbind_elements = OrderedDict([('optional', optional), ('transitive', transitive), ('partial', partial), ('extended', extended), ('attr_type', attr_type), ('attr_len', attr_len), ('attr_value', attr_value), ])


class yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes_unknown_attribute(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/neighbors/neighbor/adj-rib-out-pre/routes/route/unknown-attributes/unknown-attribute. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
  """
  __slots__ = ('_path_helper', '_extmethods', '__attr_type','__state',)

  _yang_name = 'unknown-attribute'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'neighbors', 'neighbor', 'adj-rib-out-pre', 'routes', 'route', 'unknown-attributes', 'unknown-attribute']

  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/attr_type (leafref)

    YANG Description: Reference to the list key
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/attr_type (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state (container)

    YANG Description: Operational state for unknown route attributes
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/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 unknown route attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  attr_type = __builtin__.property(_get_attr_type)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('attr_type', attr_type), ('state', state), ])


class yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/neighbors/neighbor/adj-rib-out-pre/routes/route/unknown-attributes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
  """
  __slots__ = ('_path_helper', '_extmethods', '__unknown_attribute',)

  _yang_name = 'unknown-attributes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'neighbors', 'neighbor', 'adj-rib-out-pre', 'routes', 'route', 'unknown-attributes']

  def _get_unknown_attribute(self):
    """
    Getter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute (list)

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    return self.__unknown_attribute
      
  def _set_unknown_attribute(self, v, load=False):
    """
    Setter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attribute is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attribute() directly.

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attribute must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__unknown_attribute = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attribute(self):
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  unknown_attribute = __builtin__.property(_get_unknown_attribute)


  _pyangbind_elements = OrderedDict([('unknown_attribute', unknown_attribute), ])


class yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/neighbors/neighbor/adj-rib-out-pre/routes/route. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of routes in the table
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix','__path_id','__state','__unknown_attributes',)

  _yang_name = 'route'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'neighbors', 'neighbor', 'adj-rib-out-pre', 'routes', 'route']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/prefix (leafref)

    YANG Description: Reference to the prefix list key
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/prefix (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: Reference to the prefix 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_path_id(self):
    """
    Getter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/path_id (leafref)

    YANG Description: Reference to the path-id list key
    """
    return self.__path_id
      
  def _set_path_id(self, v, load=False):
    """
    Setter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/path_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_id() directly.

    YANG Description: Reference to the path-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="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_id(self):
    self.__path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/state (container)

    YANG Description: Operational state data for BGP Adj-RIB entries
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/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 BGP Adj-RIB entries
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unknown_attributes(self):
    """
    Getter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes (container)

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    return self.__unknown_attributes
      
  def _set_unknown_attributes(self, v, load=False):
    """
    Setter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attributes() directly.

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attributes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unknown_attributes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attributes(self):
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  prefix = __builtin__.property(_get_prefix)
  path_id = __builtin__.property(_get_path_id)
  state = __builtin__.property(_get_state)
  unknown_attributes = __builtin__.property(_get_unknown_attributes)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ('path_id', path_id), ('state', state), ('unknown_attributes', unknown_attributes), ])


class yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_pre_routes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/neighbors/neighbor/adj-rib-out-pre/routes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for list of routes in the routing
table.
  """
  __slots__ = ('_path_helper', '_extmethods', '__route',)

  _yang_name = 'routes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__route = YANGDynClass(base=YANGListType("prefix path_id",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix path-id', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'neighbors', 'neighbor', 'adj-rib-out-pre', 'routes']

  def _get_route(self):
    """
    Getter method for route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route (list)

    YANG Description: List of routes in the table
    """
    return self.__route
      
  def _set_route(self, v, load=False):
    """
    Setter method for route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes/route (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route() directly.

    YANG Description: List of routes in the table
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("prefix path_id",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix path-id', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("prefix path_id",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix path-id', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route(self):
    self.__route = YANGDynClass(base=YANGListType("prefix path_id",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_pre_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix path-id', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  route = __builtin__.property(_get_route)


  _pyangbind_elements = OrderedDict([('route', route), ])


class yc_adj_rib_out_pre_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_pre(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/neighbors/neighbor/adj-rib-out-pre. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Per-neighbor table containing paths eligble for
sending (advertising) to the neighbor before output
policy rules have been applied
  """
  __slots__ = ('_path_helper', '_extmethods', '__routes',)

  _yang_name = 'adj-rib-out-pre'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_pre_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'neighbors', 'neighbor', 'adj-rib-out-pre']

  def _get_routes(self):
    """
    Getter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes (container)

    YANG Description: Enclosing container for list of routes in the routing
table.
    """
    return self.__routes
      
  def _set_routes(self, v, load=False):
    """
    Setter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre/routes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_routes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_routes() directly.

    YANG Description: Enclosing container for list of routes in the routing
table.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_pre_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """routes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_pre_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__routes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_routes(self):
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_pre_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  routes = __builtin__.property(_get_routes)


  _pyangbind_elements = OrderedDict([('routes', routes), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_post_routes_route_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/neighbors/neighbor/adj-rib-out-post/routes/route/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for BGP Adj-RIB entries
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix','__path_id','__attr_index','__community_index','__ext_community_index','__last_modified','__valid_route','__invalid_reason',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-prefix', is_config=False)
    self.__path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'neighbors', 'neighbor', 'adj-rib-out-post', 'routes', 'route', 'state']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/state/prefix (oc-inet:ipv6-prefix)

    YANG Description: Prefix for the route
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/state/prefix (oc-inet:ipv6-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: Prefix for the route
    """
    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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-prefix', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-prefix', is_config=False)


  def _get_path_id(self):
    """
    Getter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/state/path_id (uint32)

    YANG Description: When the BGP speaker supports advertisement of multiple
paths for a prefix, the path identifier is used to
uniquely identify a route based on the combination of the
prefix and path id.  In the Adj-RIB-In, the path-id value is
the value received in the update message.   In the Loc-RIB,
if used, it should represent a locally generated path-id
value for the corresponding route.  In Adj-RIB-Out, it
should be the value sent to a neighbor when add-paths is
used, i.e., the capability has been negotiated.
    """
    return self.__path_id
      
  def _set_path_id(self, v, load=False):
    """
    Setter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/state/path_id (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_id() directly.

    YANG Description: When the BGP speaker supports advertisement of multiple
paths for a prefix, the path identifier is used to
uniquely identify a route based on the combination of the
prefix and path id.  In the Adj-RIB-In, the path-id value is
the value received in the update message.   In the Loc-RIB,
if used, it should represent a locally generated path-id
value for the corresponding route.  In Adj-RIB-Out, it
should be the value sent to a neighbor when add-paths is
used, i.e., the capability has been negotiated.
    """
    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="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_id 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="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_id(self):
    self.__path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_attr_index(self):
    """
    Getter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/state/attr_index (leafref)

    YANG Description: Reference to the common attribute group for the
route
    """
    return self.__attr_index
      
  def _set_attr_index(self, v, load=False):
    """
    Setter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/state/attr_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_index() directly.

    YANG Description: Reference to the common attribute group for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_index(self):
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_community_index(self):
    """
    Getter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/state/community_index (leafref)

    YANG Description: Reference to the community attribute for the route
    """
    return self.__community_index
      
  def _set_community_index(self, v, load=False):
    """
    Setter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/state/community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_community_index() directly.

    YANG Description: Reference to the community attribute for the route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_community_index(self):
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_ext_community_index(self):
    """
    Getter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/state/ext_community_index (leafref)

    YANG Description: Reference to the extended community attribute for the
route
    """
    return self.__ext_community_index
      
  def _set_ext_community_index(self, v, load=False):
    """
    Setter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/state/ext_community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ext_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ext_community_index() directly.

    YANG Description: Reference to the extended community attribute for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ext_community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__ext_community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ext_community_index(self):
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_last_modified(self):
    """
    Getter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/state/last_modified (oc-types:timeticks64)

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    return self.__last_modified
      
  def _set_last_modified(self, v, load=False):
    """
    Setter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/state/last_modified (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_last_modified is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_last_modified() directly.

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    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="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """last_modified must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__last_modified = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_last_modified(self):
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_valid_route(self):
    """
    Getter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/state/valid_route (boolean)

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    return self.__valid_route
      
  def _set_valid_route(self, v, load=False):
    """
    Setter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/state/valid_route (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_valid_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_valid_route() directly.

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """valid_route must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__valid_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_valid_route(self):
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_invalid_reason(self):
    """
    Getter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/state/invalid_reason (identityref)

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    return self.__invalid_reason
      
  def _set_invalid_reason(self, v, load=False):
    """
    Setter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/state/invalid_reason (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_invalid_reason is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_invalid_reason() directly.

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    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={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """invalid_reason must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__invalid_reason = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_invalid_reason(self):
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  prefix = __builtin__.property(_get_prefix)
  path_id = __builtin__.property(_get_path_id)
  attr_index = __builtin__.property(_get_attr_index)
  community_index = __builtin__.property(_get_community_index)
  ext_community_index = __builtin__.property(_get_ext_community_index)
  last_modified = __builtin__.property(_get_last_modified)
  valid_route = __builtin__.property(_get_valid_route)
  invalid_reason = __builtin__.property(_get_invalid_reason)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ('path_id', path_id), ('attr_index', attr_index), ('community_index', community_index), ('ext_community_index', ext_community_index), ('last_modified', last_modified), ('valid_route', valid_route), ('invalid_reason', invalid_reason), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes_unknown_attribute_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/neighbors/neighbor/adj-rib-out-post/routes/route/unknown-attributes/unknown-attribute/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for unknown route attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__optional','__transitive','__partial','__extended','__attr_type','__attr_len','__attr_value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'neighbors', 'neighbor', 'adj-rib-out-post', 'routes', 'route', 'unknown-attributes', 'unknown-attribute', 'state']

  def _get_optional(self):
    """
    Getter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/optional (boolean)

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    return self.__optional
      
  def _set_optional(self, v, load=False):
    """
    Setter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/optional (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_optional is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_optional() directly.

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """optional must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__optional = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_optional(self):
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_transitive(self):
    """
    Getter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/transitive (boolean)

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    return self.__transitive
      
  def _set_transitive(self, v, load=False):
    """
    Setter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/transitive (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transitive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transitive() directly.

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transitive must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__transitive = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transitive(self):
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_partial(self):
    """
    Getter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/partial (boolean)

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    return self.__partial
      
  def _set_partial(self, v, load=False):
    """
    Setter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/partial (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_partial is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_partial() directly.

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """partial must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__partial = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_partial(self):
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_extended(self):
    """
    Getter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/extended (boolean)

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    return self.__extended
      
  def _set_extended(self, v, load=False):
    """
    Setter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/extended (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended() directly.

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__extended = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended(self):
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/attr_type (uint8)

    YANG Description: 1-octet value encoding the attribute type code
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/attr_type (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() directly.

    YANG Description: 1-octet value encoding the attribute type code
    """
    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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_attr_len(self):
    """
    Getter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/attr_len (uint16)

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    return self.__attr_len
      
  def _set_attr_len(self, v, load=False):
    """
    Setter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/attr_len (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_len() directly.

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_len 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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__attr_len = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_len(self):
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_attr_value(self):
    """
    Getter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/attr_value (binary)

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    return self.__attr_value
      
  def _set_attr_value(self, v, load=False):
    """
    Setter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/attr_value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_value() directly.

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__attr_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_value(self):
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  optional = __builtin__.property(_get_optional)
  transitive = __builtin__.property(_get_transitive)
  partial = __builtin__.property(_get_partial)
  extended = __builtin__.property(_get_extended)
  attr_type = __builtin__.property(_get_attr_type)
  attr_len = __builtin__.property(_get_attr_len)
  attr_value = __builtin__.property(_get_attr_value)


  _pyangbind_elements = OrderedDict([('optional', optional), ('transitive', transitive), ('partial', partial), ('extended', extended), ('attr_type', attr_type), ('attr_len', attr_len), ('attr_value', attr_value), ])


class yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes_unknown_attribute(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/neighbors/neighbor/adj-rib-out-post/routes/route/unknown-attributes/unknown-attribute. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
  """
  __slots__ = ('_path_helper', '_extmethods', '__attr_type','__state',)

  _yang_name = 'unknown-attribute'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'neighbors', 'neighbor', 'adj-rib-out-post', 'routes', 'route', 'unknown-attributes', 'unknown-attribute']

  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/attr_type (leafref)

    YANG Description: Reference to the list key
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/attr_type (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state (container)

    YANG Description: Operational state for unknown route attributes
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/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 unknown route attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  attr_type = __builtin__.property(_get_attr_type)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('attr_type', attr_type), ('state', state), ])


class yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/neighbors/neighbor/adj-rib-out-post/routes/route/unknown-attributes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
  """
  __slots__ = ('_path_helper', '_extmethods', '__unknown_attribute',)

  _yang_name = 'unknown-attributes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'neighbors', 'neighbor', 'adj-rib-out-post', 'routes', 'route', 'unknown-attributes']

  def _get_unknown_attribute(self):
    """
    Getter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute (list)

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    return self.__unknown_attribute
      
  def _set_unknown_attribute(self, v, load=False):
    """
    Setter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attribute is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attribute() directly.

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attribute must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__unknown_attribute = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attribute(self):
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  unknown_attribute = __builtin__.property(_get_unknown_attribute)


  _pyangbind_elements = OrderedDict([('unknown_attribute', unknown_attribute), ])


class yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_post_routes_route(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/neighbors/neighbor/adj-rib-out-post/routes/route. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of routes in the table
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix','__path_id','__state','__unknown_attributes',)

  _yang_name = 'route'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_post_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'neighbors', 'neighbor', 'adj-rib-out-post', 'routes', 'route']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/prefix (leafref)

    YANG Description: Reference to the prefix list key
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/prefix (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: Reference to the prefix 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_path_id(self):
    """
    Getter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/path_id (leafref)

    YANG Description: Reference to the path-id list key
    """
    return self.__path_id
      
  def _set_path_id(self, v, load=False):
    """
    Setter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/path_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_id() directly.

    YANG Description: Reference to the path-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="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_id(self):
    self.__path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/state (container)

    YANG Description: Operational state data for BGP Adj-RIB entries
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/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 BGP Adj-RIB entries
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_post_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_post_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_post_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unknown_attributes(self):
    """
    Getter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes (container)

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    return self.__unknown_attributes
      
  def _set_unknown_attributes(self, v, load=False):
    """
    Setter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attributes() directly.

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attributes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unknown_attributes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attributes(self):
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  prefix = __builtin__.property(_get_prefix)
  path_id = __builtin__.property(_get_path_id)
  state = __builtin__.property(_get_state)
  unknown_attributes = __builtin__.property(_get_unknown_attributes)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ('path_id', path_id), ('state', state), ('unknown_attributes', unknown_attributes), ])


class yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_post_routes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/neighbors/neighbor/adj-rib-out-post/routes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for list of routes in the routing
table.
  """
  __slots__ = ('_path_helper', '_extmethods', '__route',)

  _yang_name = 'routes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__route = YANGDynClass(base=YANGListType("prefix path_id",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_post_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix path-id', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'neighbors', 'neighbor', 'adj-rib-out-post', 'routes']

  def _get_route(self):
    """
    Getter method for route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route (list)

    YANG Description: List of routes in the table
    """
    return self.__route
      
  def _set_route(self, v, load=False):
    """
    Setter method for route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes/route (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route() directly.

    YANG Description: List of routes in the table
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("prefix path_id",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_post_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix path-id', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("prefix path_id",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_post_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix path-id', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route(self):
    self.__route = YANGDynClass(base=YANGListType("prefix path_id",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_post_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix path-id', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  route = __builtin__.property(_get_route)


  _pyangbind_elements = OrderedDict([('route', route), ])


class yc_adj_rib_out_post_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_post(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/neighbors/neighbor/adj-rib-out-post. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Per-neighbor table containing paths eligble for
sending (advertising) to the neighbor after output
policy rules have been applied
  """
  __slots__ = ('_path_helper', '_extmethods', '__routes',)

  _yang_name = 'adj-rib-out-post'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_post_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'neighbors', 'neighbor', 'adj-rib-out-post']

  def _get_routes(self):
    """
    Getter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes (container)

    YANG Description: Enclosing container for list of routes in the routing
table.
    """
    return self.__routes
      
  def _set_routes(self, v, load=False):
    """
    Setter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post/routes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_routes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_routes() directly.

    YANG Description: Enclosing container for list of routes in the routing
table.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_post_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """routes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_post_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__routes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_routes(self):
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_post_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  routes = __builtin__.property(_get_routes)


  _pyangbind_elements = OrderedDict([('routes', routes), ])


class yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/neighbors/neighbor. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of neighbors (peers) of the local BGP speaker
  """
  __slots__ = ('_path_helper', '_extmethods', '__neighbor_address','__state','__adj_rib_in_pre','__adj_rib_in_post','__adj_rib_out_pre','__adj_rib_out_post',)

  _yang_name = 'neighbor'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__neighbor_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__adj_rib_in_pre = YANGDynClass(base=yc_adj_rib_in_pre_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_pre, is_container='container', yang_name="adj-rib-in-pre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__adj_rib_in_post = YANGDynClass(base=yc_adj_rib_in_post_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_post, is_container='container', yang_name="adj-rib-in-post", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__adj_rib_out_pre = YANGDynClass(base=yc_adj_rib_out_pre_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_pre, is_container='container', yang_name="adj-rib-out-pre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__adj_rib_out_post = YANGDynClass(base=yc_adj_rib_out_post_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_post, is_container='container', yang_name="adj-rib-out-post", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'neighbors', 'neighbor']

  def _get_neighbor_address(self):
    """
    Getter method for neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/neighbor_address (leafref)

    YANG Description: Reference to the list key
    """
    return self.__neighbor_address
      
  def _set_neighbor_address(self, v, load=False):
    """
    Setter method for neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/neighbor_address (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor_address() 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="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor_address must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__neighbor_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor_address(self):
    self.__neighbor_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/state (container)

    YANG Description: Operational state for each neighbor BGP Adj-RIB
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/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 each neighbor BGP Adj-RIB
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_adj_rib_in_pre(self):
    """
    Getter method for adj_rib_in_pre, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre (container)

    YANG Description: Per-neighbor table containing the NLRI updates
received from the neighbor before any local input
policy rules or filters have been applied.  This can
be considered the 'raw' updates from the neighbor.
    """
    return self.__adj_rib_in_pre
      
  def _set_adj_rib_in_pre(self, v, load=False):
    """
    Setter method for adj_rib_in_pre, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_pre (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adj_rib_in_pre is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adj_rib_in_pre() directly.

    YANG Description: Per-neighbor table containing the NLRI updates
received from the neighbor before any local input
policy rules or filters have been applied.  This can
be considered the 'raw' updates from the neighbor.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_adj_rib_in_pre_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_pre, is_container='container', yang_name="adj-rib-in-pre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adj_rib_in_pre must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_adj_rib_in_pre_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_pre, is_container='container', yang_name="adj-rib-in-pre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__adj_rib_in_pre = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adj_rib_in_pre(self):
    self.__adj_rib_in_pre = YANGDynClass(base=yc_adj_rib_in_pre_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_pre, is_container='container', yang_name="adj-rib-in-pre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_adj_rib_in_post(self):
    """
    Getter method for adj_rib_in_post, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post (container)

    YANG Description: Per-neighbor table containing the paths received from
the neighbor that are eligible for best-path selection
after local input policy rules have been applied.
    """
    return self.__adj_rib_in_post
      
  def _set_adj_rib_in_post(self, v, load=False):
    """
    Setter method for adj_rib_in_post, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_in_post (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adj_rib_in_post is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adj_rib_in_post() directly.

    YANG Description: Per-neighbor table containing the paths received from
the neighbor that are eligible for best-path selection
after local input policy rules have been applied.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_adj_rib_in_post_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_post, is_container='container', yang_name="adj-rib-in-post", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adj_rib_in_post must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_adj_rib_in_post_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_post, is_container='container', yang_name="adj-rib-in-post", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__adj_rib_in_post = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adj_rib_in_post(self):
    self.__adj_rib_in_post = YANGDynClass(base=yc_adj_rib_in_post_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_in_post, is_container='container', yang_name="adj-rib-in-post", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_adj_rib_out_pre(self):
    """
    Getter method for adj_rib_out_pre, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre (container)

    YANG Description: Per-neighbor table containing paths eligble for
sending (advertising) to the neighbor before output
policy rules have been applied
    """
    return self.__adj_rib_out_pre
      
  def _set_adj_rib_out_pre(self, v, load=False):
    """
    Setter method for adj_rib_out_pre, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_pre (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adj_rib_out_pre is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adj_rib_out_pre() directly.

    YANG Description: Per-neighbor table containing paths eligble for
sending (advertising) to the neighbor before output
policy rules have been applied
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_adj_rib_out_pre_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_pre, is_container='container', yang_name="adj-rib-out-pre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adj_rib_out_pre must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_adj_rib_out_pre_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_pre, is_container='container', yang_name="adj-rib-out-pre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__adj_rib_out_pre = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adj_rib_out_pre(self):
    self.__adj_rib_out_pre = YANGDynClass(base=yc_adj_rib_out_pre_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_pre, is_container='container', yang_name="adj-rib-out-pre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_adj_rib_out_post(self):
    """
    Getter method for adj_rib_out_post, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post (container)

    YANG Description: Per-neighbor table containing paths eligble for
sending (advertising) to the neighbor after output
policy rules have been applied
    """
    return self.__adj_rib_out_post
      
  def _set_adj_rib_out_post(self, v, load=False):
    """
    Setter method for adj_rib_out_post, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor/adj_rib_out_post (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adj_rib_out_post is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adj_rib_out_post() directly.

    YANG Description: Per-neighbor table containing paths eligble for
sending (advertising) to the neighbor after output
policy rules have been applied
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_adj_rib_out_post_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_post, is_container='container', yang_name="adj-rib-out-post", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adj_rib_out_post must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_adj_rib_out_post_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_post, is_container='container', yang_name="adj-rib-out-post", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__adj_rib_out_post = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adj_rib_out_post(self):
    self.__adj_rib_out_post = YANGDynClass(base=yc_adj_rib_out_post_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor_adj_rib_out_post, is_container='container', yang_name="adj-rib-out-post", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  neighbor_address = __builtin__.property(_get_neighbor_address)
  state = __builtin__.property(_get_state)
  adj_rib_in_pre = __builtin__.property(_get_adj_rib_in_pre)
  adj_rib_in_post = __builtin__.property(_get_adj_rib_in_post)
  adj_rib_out_pre = __builtin__.property(_get_adj_rib_out_pre)
  adj_rib_out_post = __builtin__.property(_get_adj_rib_out_post)


  _pyangbind_elements = OrderedDict([('neighbor_address', neighbor_address), ('state', state), ('adj_rib_in_pre', adj_rib_in_pre), ('adj_rib_in_post', adj_rib_in_post), ('adj_rib_out_pre', adj_rib_out_pre), ('adj_rib_out_post', adj_rib_out_post), ])


class yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/neighbors. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for neighbor list
  """
  __slots__ = ('_path_helper', '_extmethods', '__neighbor',)

  _yang_name = 'neighbors'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__neighbor = YANGDynClass(base=YANGListType("neighbor_address",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='neighbor-address', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-unicast', 'neighbors']

  def _get_neighbor(self):
    """
    Getter method for neighbor, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor (list)

    YANG Description: List of neighbors (peers) of the local BGP speaker
    """
    return self.__neighbor
      
  def _set_neighbor(self, v, load=False):
    """
    Setter method for neighbor, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors/neighbor (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor() directly.

    YANG Description: List of neighbors (peers) of the local BGP speaker
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("neighbor_address",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='neighbor-address', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("neighbor_address",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='neighbor-address', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__neighbor = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor(self):
    self.__neighbor = YANGDynClass(base=YANGListType("neighbor_address",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='neighbor-address', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  neighbor = __builtin__.property(_get_neighbor)


  _pyangbind_elements = OrderedDict([('neighbor', neighbor), ])


class yc_ipv6_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Routing tables for IPv6 unicast -- active when the
afi-safi name is ipv6-unicast
  """
  __slots__ = ('_path_helper', '_extmethods', '__loc_rib','__neighbors',)

  _yang_name = 'ipv6-unicast'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__loc_rib = YANGDynClass(base=yc_loc_rib_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_loc_rib, is_container='container', yang_name="loc-rib", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__neighbors = YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-unicast']

  def _get_loc_rib(self):
    """
    Getter method for loc_rib, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib (container)

    YANG Description: Container for the IPv6 BGP LOC-RIB data
    """
    return self.__loc_rib
      
  def _set_loc_rib(self, v, load=False):
    """
    Setter method for loc_rib, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/loc_rib (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_loc_rib is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_loc_rib() directly.

    YANG Description: Container for the IPv6 BGP LOC-RIB data
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_loc_rib_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_loc_rib, is_container='container', yang_name="loc-rib", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """loc_rib must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_loc_rib_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_loc_rib, is_container='container', yang_name="loc-rib", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__loc_rib = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_loc_rib(self):
    self.__loc_rib = YANGDynClass(base=yc_loc_rib_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_loc_rib, is_container='container', yang_name="loc-rib", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_neighbors(self):
    """
    Getter method for neighbors, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors (container)

    YANG Description: Enclosing container for neighbor list
    """
    return self.__neighbors
      
  def _set_neighbors(self, v, load=False):
    """
    Setter method for neighbors, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast/neighbors (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbors is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbors() directly.

    YANG Description: Enclosing container for neighbor list
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbors must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__neighbors = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbors(self):
    self.__neighbors = YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  loc_rib = __builtin__.property(_get_loc_rib)
  neighbors = __builtin__.property(_get_neighbors)


  _pyangbind_elements = OrderedDict([('loc_rib', loc_rib), ('neighbors', neighbors), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_loc_rib_routes_route_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-srte-policy/loc-rib/routes/route/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state attributes for each route within the
IPv4 or IPv6 Unicast SR-TE Policy SAFI.
  """
  __slots__ = ('_path_helper', '_extmethods', '__path_id','__endpoint','__color','__attr_index','__community_index','__ext_community_index','__last_modified','__valid_route','__invalid_reason',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__endpoint = 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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__color = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-srte-policy', 'loc-rib', 'routes', 'route', 'state']

  def _get_path_id(self):
    """
    Getter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/state/path_id (uint32)

    YANG Description: Identifier for the path when using BGP ADD-PATHS for the SR-TE
policy SAFI.
    """
    return self.__path_id
      
  def _set_path_id(self, v, load=False):
    """
    Setter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/state/path_id (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_id() directly.

    YANG Description: Identifier for the path when using BGP ADD-PATHS for the SR-TE
policy SAFI.
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_id 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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_id(self):
    self.__path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_endpoint(self):
    """
    Getter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/state/endpoint (oc-inet:ip-address)

    YANG Description: A unique identifier for the remote set of nodes. When the address
family is IPv4, the value is a 4-octet IPv4 address. When the
address family is IPv6, the value is a 16-octet IPv6 address.
    """
    return self.__endpoint
      
  def _set_endpoint(self, v, load=False):
    """
    Setter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/state/endpoint (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint() directly.

    YANG Description: A unique identifier for the remote set of nodes. When the address
family is IPv4, the value is a 4-octet IPv4 address. When the
address family is IPv6, the value is a 16-octet IPv6 address.
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """endpoint must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__endpoint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_endpoint(self):
    self.__endpoint = 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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_color(self):
    """
    Getter method for color, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/state/color (uint32)

    YANG Description: A 4-octet value identifying the policy. Combined with the endpoint
the endpoint and colour represent the unique policy.
    """
    return self.__color
      
  def _set_color(self, v, load=False):
    """
    Setter method for color, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/state/color (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_color is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_color() directly.

    YANG Description: A 4-octet value identifying the policy. Combined with the endpoint
the endpoint and colour represent the unique policy.
    """
    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="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """color 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="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__color = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_color(self):
    self.__color = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_attr_index(self):
    """
    Getter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/state/attr_index (leafref)

    YANG Description: Reference to the common attribute group for the
route
    """
    return self.__attr_index
      
  def _set_attr_index(self, v, load=False):
    """
    Setter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/state/attr_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_index() directly.

    YANG Description: Reference to the common attribute group for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_index(self):
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_community_index(self):
    """
    Getter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/state/community_index (leafref)

    YANG Description: Reference to the community attribute for the route
    """
    return self.__community_index
      
  def _set_community_index(self, v, load=False):
    """
    Setter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/state/community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_community_index() directly.

    YANG Description: Reference to the community attribute for the route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_community_index(self):
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_ext_community_index(self):
    """
    Getter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/state/ext_community_index (leafref)

    YANG Description: Reference to the extended community attribute for the
route
    """
    return self.__ext_community_index
      
  def _set_ext_community_index(self, v, load=False):
    """
    Setter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/state/ext_community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ext_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ext_community_index() directly.

    YANG Description: Reference to the extended community attribute for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ext_community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__ext_community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ext_community_index(self):
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_last_modified(self):
    """
    Getter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/state/last_modified (oc-types:timeticks64)

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    return self.__last_modified
      
  def _set_last_modified(self, v, load=False):
    """
    Setter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/state/last_modified (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_last_modified is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_last_modified() directly.

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    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="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """last_modified must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__last_modified = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_last_modified(self):
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_valid_route(self):
    """
    Getter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/state/valid_route (boolean)

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    return self.__valid_route
      
  def _set_valid_route(self, v, load=False):
    """
    Setter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/state/valid_route (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_valid_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_valid_route() directly.

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """valid_route must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__valid_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_valid_route(self):
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_invalid_reason(self):
    """
    Getter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/state/invalid_reason (identityref)

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    return self.__invalid_reason
      
  def _set_invalid_reason(self, v, load=False):
    """
    Setter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/state/invalid_reason (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_invalid_reason is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_invalid_reason() directly.

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    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={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """invalid_reason must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__invalid_reason = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_invalid_reason(self):
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  path_id = __builtin__.property(_get_path_id)
  endpoint = __builtin__.property(_get_endpoint)
  color = __builtin__.property(_get_color)
  attr_index = __builtin__.property(_get_attr_index)
  community_index = __builtin__.property(_get_community_index)
  ext_community_index = __builtin__.property(_get_ext_community_index)
  last_modified = __builtin__.property(_get_last_modified)
  valid_route = __builtin__.property(_get_valid_route)
  invalid_reason = __builtin__.property(_get_invalid_reason)


  _pyangbind_elements = OrderedDict([('path_id', path_id), ('endpoint', endpoint), ('color', color), ('attr_index', attr_index), ('community_index', community_index), ('ext_community_index', ext_community_index), ('last_modified', last_modified), ('valid_route', valid_route), ('invalid_reason', invalid_reason), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_loc_rib_routes_route_unknown_attributes_unknown_attribute_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-srte-policy/loc-rib/routes/route/unknown-attributes/unknown-attribute/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for unknown route attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__optional','__transitive','__partial','__extended','__attr_type','__attr_len','__attr_value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-srte-policy', 'loc-rib', 'routes', 'route', 'unknown-attributes', 'unknown-attribute', 'state']

  def _get_optional(self):
    """
    Getter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/optional (boolean)

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    return self.__optional
      
  def _set_optional(self, v, load=False):
    """
    Setter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/optional (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_optional is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_optional() directly.

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """optional must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__optional = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_optional(self):
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_transitive(self):
    """
    Getter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/transitive (boolean)

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    return self.__transitive
      
  def _set_transitive(self, v, load=False):
    """
    Setter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/transitive (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transitive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transitive() directly.

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transitive must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__transitive = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transitive(self):
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_partial(self):
    """
    Getter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/partial (boolean)

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    return self.__partial
      
  def _set_partial(self, v, load=False):
    """
    Setter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/partial (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_partial is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_partial() directly.

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """partial must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__partial = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_partial(self):
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_extended(self):
    """
    Getter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/extended (boolean)

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    return self.__extended
      
  def _set_extended(self, v, load=False):
    """
    Setter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/extended (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended() directly.

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__extended = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended(self):
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/attr_type (uint8)

    YANG Description: 1-octet value encoding the attribute type code
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/attr_type (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() directly.

    YANG Description: 1-octet value encoding the attribute type code
    """
    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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_attr_len(self):
    """
    Getter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/attr_len (uint16)

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    return self.__attr_len
      
  def _set_attr_len(self, v, load=False):
    """
    Setter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/attr_len (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_len() directly.

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_len 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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__attr_len = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_len(self):
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_attr_value(self):
    """
    Getter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/attr_value (binary)

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    return self.__attr_value
      
  def _set_attr_value(self, v, load=False):
    """
    Setter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/attr_value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_value() directly.

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__attr_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_value(self):
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  optional = __builtin__.property(_get_optional)
  transitive = __builtin__.property(_get_transitive)
  partial = __builtin__.property(_get_partial)
  extended = __builtin__.property(_get_extended)
  attr_type = __builtin__.property(_get_attr_type)
  attr_len = __builtin__.property(_get_attr_len)
  attr_value = __builtin__.property(_get_attr_value)


  _pyangbind_elements = OrderedDict([('optional', optional), ('transitive', transitive), ('partial', partial), ('extended', extended), ('attr_type', attr_type), ('attr_len', attr_len), ('attr_value', attr_value), ])


class yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_loc_rib_routes_route_unknown_attributes_unknown_attribute(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-srte-policy/loc-rib/routes/route/unknown-attributes/unknown-attribute. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
  """
  __slots__ = ('_path_helper', '_extmethods', '__attr_type','__state',)

  _yang_name = 'unknown-attribute'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_loc_rib_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-srte-policy', 'loc-rib', 'routes', 'route', 'unknown-attributes', 'unknown-attribute']

  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/unknown_attributes/unknown_attribute/attr_type (leafref)

    YANG Description: Reference to the list key
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/unknown_attributes/unknown_attribute/attr_type (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/unknown_attributes/unknown_attribute/state (container)

    YANG Description: Operational state for unknown route attributes
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/unknown_attributes/unknown_attribute/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 unknown route attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_loc_rib_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_loc_rib_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_loc_rib_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  attr_type = __builtin__.property(_get_attr_type)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('attr_type', attr_type), ('state', state), ])


class yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_loc_rib_routes_route_unknown_attributes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-srte-policy/loc-rib/routes/route/unknown-attributes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
  """
  __slots__ = ('_path_helper', '_extmethods', '__unknown_attribute',)

  _yang_name = 'unknown-attributes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_loc_rib_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-srte-policy', 'loc-rib', 'routes', 'route', 'unknown-attributes']

  def _get_unknown_attribute(self):
    """
    Getter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/unknown_attributes/unknown_attribute (list)

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    return self.__unknown_attribute
      
  def _set_unknown_attribute(self, v, load=False):
    """
    Setter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/unknown_attributes/unknown_attribute (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attribute is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attribute() directly.

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_loc_rib_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attribute must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_loc_rib_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__unknown_attribute = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attribute(self):
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_loc_rib_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  unknown_attribute = __builtin__.property(_get_unknown_attribute)


  _pyangbind_elements = OrderedDict([('unknown_attribute', unknown_attribute), ])


class yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_loc_rib_routes_route(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-srte-policy/loc-rib/routes/route. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Route within the specified address family for the SR-TE
Policy SAFI.
  """
  __slots__ = ('_path_helper', '_extmethods', '__path_id','__endpoint','__color','__state','__unknown_attributes',)

  _yang_name = 'route'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__endpoint = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__color = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_loc_rib_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_loc_rib_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-srte-policy', 'loc-rib', 'routes', 'route']

  def _get_path_id(self):
    """
    Getter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/path_id (leafref)

    YANG Description: Reference to the path identifier for the SR-TE Policy SAFI
route. The value is only non-zero if ADD-PATHS is not being
used.
    """
    return self.__path_id
      
  def _set_path_id(self, v, load=False):
    """
    Setter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/path_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_id() directly.

    YANG Description: Reference to the path identifier for the SR-TE Policy SAFI
route. The value is only non-zero if ADD-PATHS is not being
used.
    """
    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="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_id(self):
    self.__path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_endpoint(self):
    """
    Getter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/endpoint (leafref)

    YANG Description: Reference to the endpoint used for the SR-TE Policy SAFI
route within the NLRI.
    """
    return self.__endpoint
      
  def _set_endpoint(self, v, load=False):
    """
    Setter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/endpoint (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint() directly.

    YANG Description: Reference to the endpoint used for the SR-TE Policy SAFI
route within the NLRI.
    """
    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="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """endpoint must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__endpoint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_endpoint(self):
    self.__endpoint = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_color(self):
    """
    Getter method for color, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/color (leafref)

    YANG Description: Reference to the colour used for the SR-TE policy SAFI
route within the NLRI.
    """
    return self.__color
      
  def _set_color(self, v, load=False):
    """
    Setter method for color, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/color (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_color is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_color() directly.

    YANG Description: Reference to the colour used for the SR-TE policy SAFI
route within the NLRI.
    """
    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="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """color must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__color = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_color(self):
    self.__color = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/state (container)

    YANG Description: Operational state attributes for each route within the
IPv4 or IPv6 Unicast SR-TE Policy SAFI.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/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 attributes for each route within the
IPv4 or IPv6 Unicast SR-TE Policy SAFI.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_loc_rib_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_loc_rib_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_loc_rib_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unknown_attributes(self):
    """
    Getter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/unknown_attributes (container)

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    return self.__unknown_attributes
      
  def _set_unknown_attributes(self, v, load=False):
    """
    Setter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route/unknown_attributes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attributes() directly.

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_loc_rib_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attributes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_loc_rib_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unknown_attributes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attributes(self):
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_loc_rib_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  path_id = __builtin__.property(_get_path_id)
  endpoint = __builtin__.property(_get_endpoint)
  color = __builtin__.property(_get_color)
  state = __builtin__.property(_get_state)
  unknown_attributes = __builtin__.property(_get_unknown_attributes)


  _pyangbind_elements = OrderedDict([('path_id', path_id), ('endpoint', endpoint), ('color', color), ('state', state), ('unknown_attributes', unknown_attributes), ])


class yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_loc_rib_routes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-srte-policy/loc-rib/routes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of routes within the SR-TE Policy SAFI, for the IPv4 or
IPv6 AFI.
  """
  __slots__ = ('_path_helper', '_extmethods', '__route',)

  _yang_name = 'routes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__route = YANGDynClass(base=YANGListType("path_id endpoint color",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_loc_rib_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-id endpoint color', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-srte-policy', 'loc-rib', 'routes']

  def _get_route(self):
    """
    Getter method for route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route (list)

    YANG Description: Route within the specified address family for the SR-TE
Policy SAFI.
    """
    return self.__route
      
  def _set_route(self, v, load=False):
    """
    Setter method for route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes/route (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route() directly.

    YANG Description: Route within the specified address family for the SR-TE
Policy SAFI.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("path_id endpoint color",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_loc_rib_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-id endpoint color', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("path_id endpoint color",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_loc_rib_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-id endpoint color', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route(self):
    self.__route = YANGDynClass(base=YANGListType("path_id endpoint color",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_loc_rib_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-id endpoint color', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  route = __builtin__.property(_get_route)


  _pyangbind_elements = OrderedDict([('route', route), ])


class yc_loc_rib_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_loc_rib(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-srte-policy/loc-rib. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The Loc-RIB for the SR-TE Policy SAFI for IPv4 or IPv6 Unicast
AFIs.
  """
  __slots__ = ('_path_helper', '_extmethods', '__routes',)

  _yang_name = 'loc-rib'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_loc_rib_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-srte-policy', 'loc-rib']

  def _get_routes(self):
    """
    Getter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes (container)

    YANG Description: List of routes within the SR-TE Policy SAFI, for the IPv4 or
IPv6 AFI.
    """
    return self.__routes
      
  def _set_routes(self, v, load=False):
    """
    Setter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib/routes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_routes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_routes() directly.

    YANG Description: List of routes within the SR-TE Policy SAFI, for the IPv4 or
IPv6 AFI.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_loc_rib_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """routes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_loc_rib_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__routes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_routes(self):
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_loc_rib_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  routes = __builtin__.property(_get_routes)


  _pyangbind_elements = OrderedDict([('routes', routes), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-srte-policy/neighbors/neighbor/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters of the BGP neighbour for
which the SR-TE Policy SAFI is enabled.
  """
  __slots__ = ('_path_helper', '_extmethods', '__neighbor_address',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__neighbor_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}'}),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}|:))'}),], is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-srte-policy', 'neighbors', 'neighbor', 'state']

  def _get_neighbor_address(self):
    """
    Getter method for neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/state/neighbor_address (oc-inet:ip-address)

    YANG Description: The address of the neighbour for which the SR-TE policy
SAFI has been negotiated.
    """
    return self.__neighbor_address
      
  def _set_neighbor_address(self, v, load=False):
    """
    Setter method for neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/state/neighbor_address (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor_address() directly.

    YANG Description: The address of the neighbour for which the SR-TE policy
SAFI has been negotiated.
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor_address must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__neighbor_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor_address(self):
    self.__neighbor_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}'}),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}|:))'}),], is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)

  neighbor_address = __builtin__.property(_get_neighbor_address)


  _pyangbind_elements = OrderedDict([('neighbor_address', neighbor_address), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-srte-policy/neighbors/neighbor/adj-rib-in-pre/routes/route/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters for entries within the Adj-RIB used
to store SR-TE Policy SAFI routes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__path_id','__endpoint','__color','__attr_index','__community_index','__ext_community_index','__last_modified','__valid_route','__invalid_reason',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__endpoint = 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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__color = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-srte-policy', 'neighbors', 'neighbor', 'adj-rib-in-pre', 'routes', 'route', 'state']

  def _get_path_id(self):
    """
    Getter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/state/path_id (uint32)

    YANG Description: Identifier for the path when using BGP ADD-PATHS for the SR-TE
policy SAFI.
    """
    return self.__path_id
      
  def _set_path_id(self, v, load=False):
    """
    Setter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/state/path_id (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_id() directly.

    YANG Description: Identifier for the path when using BGP ADD-PATHS for the SR-TE
policy SAFI.
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_id 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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_id(self):
    self.__path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_endpoint(self):
    """
    Getter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/state/endpoint (oc-inet:ip-address)

    YANG Description: A unique identifier for the remote set of nodes. When the address
family is IPv4, the value is a 4-octet IPv4 address. When the
address family is IPv6, the value is a 16-octet IPv6 address.
    """
    return self.__endpoint
      
  def _set_endpoint(self, v, load=False):
    """
    Setter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/state/endpoint (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint() directly.

    YANG Description: A unique identifier for the remote set of nodes. When the address
family is IPv4, the value is a 4-octet IPv4 address. When the
address family is IPv6, the value is a 16-octet IPv6 address.
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """endpoint must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__endpoint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_endpoint(self):
    self.__endpoint = 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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_color(self):
    """
    Getter method for color, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/state/color (uint32)

    YANG Description: A 4-octet value identifying the policy. Combined with the endpoint
the endpoint and colour represent the unique policy.
    """
    return self.__color
      
  def _set_color(self, v, load=False):
    """
    Setter method for color, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/state/color (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_color is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_color() directly.

    YANG Description: A 4-octet value identifying the policy. Combined with the endpoint
the endpoint and colour represent the unique policy.
    """
    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="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """color 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="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__color = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_color(self):
    self.__color = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_attr_index(self):
    """
    Getter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/state/attr_index (leafref)

    YANG Description: Reference to the common attribute group for the
route
    """
    return self.__attr_index
      
  def _set_attr_index(self, v, load=False):
    """
    Setter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/state/attr_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_index() directly.

    YANG Description: Reference to the common attribute group for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_index(self):
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_community_index(self):
    """
    Getter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/state/community_index (leafref)

    YANG Description: Reference to the community attribute for the route
    """
    return self.__community_index
      
  def _set_community_index(self, v, load=False):
    """
    Setter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/state/community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_community_index() directly.

    YANG Description: Reference to the community attribute for the route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_community_index(self):
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_ext_community_index(self):
    """
    Getter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/state/ext_community_index (leafref)

    YANG Description: Reference to the extended community attribute for the
route
    """
    return self.__ext_community_index
      
  def _set_ext_community_index(self, v, load=False):
    """
    Setter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/state/ext_community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ext_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ext_community_index() directly.

    YANG Description: Reference to the extended community attribute for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ext_community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__ext_community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ext_community_index(self):
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_last_modified(self):
    """
    Getter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/state/last_modified (oc-types:timeticks64)

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    return self.__last_modified
      
  def _set_last_modified(self, v, load=False):
    """
    Setter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/state/last_modified (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_last_modified is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_last_modified() directly.

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    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="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """last_modified must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__last_modified = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_last_modified(self):
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_valid_route(self):
    """
    Getter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/state/valid_route (boolean)

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    return self.__valid_route
      
  def _set_valid_route(self, v, load=False):
    """
    Setter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/state/valid_route (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_valid_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_valid_route() directly.

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """valid_route must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__valid_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_valid_route(self):
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_invalid_reason(self):
    """
    Getter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/state/invalid_reason (identityref)

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    return self.__invalid_reason
      
  def _set_invalid_reason(self, v, load=False):
    """
    Setter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/state/invalid_reason (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_invalid_reason is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_invalid_reason() directly.

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    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={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """invalid_reason must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__invalid_reason = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_invalid_reason(self):
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  path_id = __builtin__.property(_get_path_id)
  endpoint = __builtin__.property(_get_endpoint)
  color = __builtin__.property(_get_color)
  attr_index = __builtin__.property(_get_attr_index)
  community_index = __builtin__.property(_get_community_index)
  ext_community_index = __builtin__.property(_get_ext_community_index)
  last_modified = __builtin__.property(_get_last_modified)
  valid_route = __builtin__.property(_get_valid_route)
  invalid_reason = __builtin__.property(_get_invalid_reason)


  _pyangbind_elements = OrderedDict([('path_id', path_id), ('endpoint', endpoint), ('color', color), ('attr_index', attr_index), ('community_index', community_index), ('ext_community_index', ext_community_index), ('last_modified', last_modified), ('valid_route', valid_route), ('invalid_reason', invalid_reason), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes_unknown_attribute_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-srte-policy/neighbors/neighbor/adj-rib-in-pre/routes/route/unknown-attributes/unknown-attribute/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for unknown route attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__optional','__transitive','__partial','__extended','__attr_type','__attr_len','__attr_value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-srte-policy', 'neighbors', 'neighbor', 'adj-rib-in-pre', 'routes', 'route', 'unknown-attributes', 'unknown-attribute', 'state']

  def _get_optional(self):
    """
    Getter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/optional (boolean)

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    return self.__optional
      
  def _set_optional(self, v, load=False):
    """
    Setter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/optional (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_optional is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_optional() directly.

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """optional must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__optional = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_optional(self):
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_transitive(self):
    """
    Getter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/transitive (boolean)

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    return self.__transitive
      
  def _set_transitive(self, v, load=False):
    """
    Setter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/transitive (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transitive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transitive() directly.

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transitive must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__transitive = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transitive(self):
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_partial(self):
    """
    Getter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/partial (boolean)

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    return self.__partial
      
  def _set_partial(self, v, load=False):
    """
    Setter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/partial (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_partial is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_partial() directly.

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """partial must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__partial = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_partial(self):
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_extended(self):
    """
    Getter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/extended (boolean)

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    return self.__extended
      
  def _set_extended(self, v, load=False):
    """
    Setter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/extended (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended() directly.

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__extended = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended(self):
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_type (uint8)

    YANG Description: 1-octet value encoding the attribute type code
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_type (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() directly.

    YANG Description: 1-octet value encoding the attribute type code
    """
    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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_attr_len(self):
    """
    Getter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_len (uint16)

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    return self.__attr_len
      
  def _set_attr_len(self, v, load=False):
    """
    Setter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_len (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_len() directly.

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_len 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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__attr_len = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_len(self):
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_attr_value(self):
    """
    Getter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_value (binary)

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    return self.__attr_value
      
  def _set_attr_value(self, v, load=False):
    """
    Setter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_value() directly.

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__attr_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_value(self):
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  optional = __builtin__.property(_get_optional)
  transitive = __builtin__.property(_get_transitive)
  partial = __builtin__.property(_get_partial)
  extended = __builtin__.property(_get_extended)
  attr_type = __builtin__.property(_get_attr_type)
  attr_len = __builtin__.property(_get_attr_len)
  attr_value = __builtin__.property(_get_attr_value)


  _pyangbind_elements = OrderedDict([('optional', optional), ('transitive', transitive), ('partial', partial), ('extended', extended), ('attr_type', attr_type), ('attr_len', attr_len), ('attr_value', attr_value), ])


class yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes_unknown_attribute(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-srte-policy/neighbors/neighbor/adj-rib-in-pre/routes/route/unknown-attributes/unknown-attribute. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
  """
  __slots__ = ('_path_helper', '_extmethods', '__attr_type','__state',)

  _yang_name = 'unknown-attribute'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-srte-policy', 'neighbors', 'neighbor', 'adj-rib-in-pre', 'routes', 'route', 'unknown-attributes', 'unknown-attribute']

  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/attr_type (leafref)

    YANG Description: Reference to the list key
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/attr_type (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state (container)

    YANG Description: Operational state for unknown route attributes
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/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 unknown route attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  attr_type = __builtin__.property(_get_attr_type)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('attr_type', attr_type), ('state', state), ])


class yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-srte-policy/neighbors/neighbor/adj-rib-in-pre/routes/route/unknown-attributes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
  """
  __slots__ = ('_path_helper', '_extmethods', '__unknown_attribute',)

  _yang_name = 'unknown-attributes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-srte-policy', 'neighbors', 'neighbor', 'adj-rib-in-pre', 'routes', 'route', 'unknown-attributes']

  def _get_unknown_attribute(self):
    """
    Getter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute (list)

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    return self.__unknown_attribute
      
  def _set_unknown_attribute(self, v, load=False):
    """
    Setter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attribute is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attribute() directly.

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attribute must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__unknown_attribute = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attribute(self):
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  unknown_attribute = __builtin__.property(_get_unknown_attribute)


  _pyangbind_elements = OrderedDict([('unknown_attribute', unknown_attribute), ])


class yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-srte-policy/neighbors/neighbor/adj-rib-in-pre/routes/route. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The routes within the SR-TE Policy SAFI Adj-RIB. The
routes are keyed on the path-id - set to a non-zero
value only if ADD-PATHS is being used; the color; and
the endpoint. The colour and endpoint are extracted from
the NLRI.
  """
  __slots__ = ('_path_helper', '_extmethods', '__path_id','__endpoint','__color','__state','__unknown_attributes',)

  _yang_name = 'route'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__endpoint = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__color = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-srte-policy', 'neighbors', 'neighbor', 'adj-rib-in-pre', 'routes', 'route']

  def _get_path_id(self):
    """
    Getter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/path_id (leafref)

    YANG Description: Reference to the path identifier for the SR-TE Policy SAFI
route. The value is only non-zero if ADD-PATHS is not being
used.
    """
    return self.__path_id
      
  def _set_path_id(self, v, load=False):
    """
    Setter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/path_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_id() directly.

    YANG Description: Reference to the path identifier for the SR-TE Policy SAFI
route. The value is only non-zero if ADD-PATHS is not being
used.
    """
    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="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_id(self):
    self.__path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_endpoint(self):
    """
    Getter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/endpoint (leafref)

    YANG Description: Reference to the endpoint used for the SR-TE Policy SAFI
route within the NLRI.
    """
    return self.__endpoint
      
  def _set_endpoint(self, v, load=False):
    """
    Setter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/endpoint (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint() directly.

    YANG Description: Reference to the endpoint used for the SR-TE Policy SAFI
route within the NLRI.
    """
    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="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """endpoint must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__endpoint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_endpoint(self):
    self.__endpoint = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_color(self):
    """
    Getter method for color, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/color (leafref)

    YANG Description: Reference to the colour used for the SR-TE policy SAFI
route within the NLRI.
    """
    return self.__color
      
  def _set_color(self, v, load=False):
    """
    Setter method for color, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/color (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_color is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_color() directly.

    YANG Description: Reference to the colour used for the SR-TE policy SAFI
route within the NLRI.
    """
    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="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """color must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__color = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_color(self):
    self.__color = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/state (container)

    YANG Description: State parameters for entries within the Adj-RIB used
to store SR-TE Policy SAFI routes.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/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 parameters for entries within the Adj-RIB used
to store SR-TE Policy SAFI routes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unknown_attributes(self):
    """
    Getter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes (container)

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    return self.__unknown_attributes
      
  def _set_unknown_attributes(self, v, load=False):
    """
    Setter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attributes() directly.

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attributes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unknown_attributes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attributes(self):
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  path_id = __builtin__.property(_get_path_id)
  endpoint = __builtin__.property(_get_endpoint)
  color = __builtin__.property(_get_color)
  state = __builtin__.property(_get_state)
  unknown_attributes = __builtin__.property(_get_unknown_attributes)


  _pyangbind_elements = OrderedDict([('path_id', path_id), ('endpoint', endpoint), ('color', color), ('state', state), ('unknown_attributes', unknown_attributes), ])


class yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-srte-policy/neighbors/neighbor/adj-rib-in-pre/routes. 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 routes within the
SR-TE Policy SAFI.
  """
  __slots__ = ('_path_helper', '_extmethods', '__route',)

  _yang_name = 'routes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__route = YANGDynClass(base=YANGListType("path_id endpoint color",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-id endpoint color', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-srte-policy', 'neighbors', 'neighbor', 'adj-rib-in-pre', 'routes']

  def _get_route(self):
    """
    Getter method for route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route (list)

    YANG Description: The routes within the SR-TE Policy SAFI Adj-RIB. The
routes are keyed on the path-id - set to a non-zero
value only if ADD-PATHS is being used; the color; and
the endpoint. The colour and endpoint are extracted from
the NLRI.
    """
    return self.__route
      
  def _set_route(self, v, load=False):
    """
    Setter method for route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route() directly.

    YANG Description: The routes within the SR-TE Policy SAFI Adj-RIB. The
routes are keyed on the path-id - set to a non-zero
value only if ADD-PATHS is being used; the color; and
the endpoint. The colour and endpoint are extracted from
the NLRI.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("path_id endpoint color",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-id endpoint color', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("path_id endpoint color",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-id endpoint color', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route(self):
    self.__route = YANGDynClass(base=YANGListType("path_id endpoint color",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-id endpoint color', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  route = __builtin__.property(_get_route)


  _pyangbind_elements = OrderedDict([('route', route), ])


class yc_adj_rib_in_pre_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_pre(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-srte-policy/neighbors/neighbor/adj-rib-in-pre. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The Adj-RIB-In for the SR-TE Policy SAFI for the neighbour,
prior to any inbound policy constraints or modifications
having been applied.
  """
  __slots__ = ('_path_helper', '_extmethods', '__routes',)

  _yang_name = 'adj-rib-in-pre'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-srte-policy', 'neighbors', 'neighbor', 'adj-rib-in-pre']

  def _get_routes(self):
    """
    Getter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes (container)

    YANG Description: Surrounding container for the list of routes within the
SR-TE Policy SAFI.
    """
    return self.__routes
      
  def _set_routes(self, v, load=False):
    """
    Setter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_routes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_routes() directly.

    YANG Description: Surrounding container for the list of routes within the
SR-TE Policy SAFI.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """routes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__routes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_routes(self):
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  routes = __builtin__.property(_get_routes)


  _pyangbind_elements = OrderedDict([('routes', routes), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-srte-policy/neighbors/neighbor/adj-rib-in-post/routes/route/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state attributes related to the route within
the SR-TE Policy SAFI Adj-RIB-In-Post for the specified
neighbour.
  """
  __slots__ = ('_path_helper', '_extmethods', '__path_id','__endpoint','__color','__attr_index','__community_index','__ext_community_index','__last_modified','__valid_route','__invalid_reason','__best_path',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__endpoint = 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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__color = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__best_path = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="best-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-srte-policy', 'neighbors', 'neighbor', 'adj-rib-in-post', 'routes', 'route', 'state']

  def _get_path_id(self):
    """
    Getter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state/path_id (uint32)

    YANG Description: Identifier for the path when using BGP ADD-PATHS for the SR-TE
policy SAFI.
    """
    return self.__path_id
      
  def _set_path_id(self, v, load=False):
    """
    Setter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state/path_id (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_id() directly.

    YANG Description: Identifier for the path when using BGP ADD-PATHS for the SR-TE
policy SAFI.
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_id 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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_id(self):
    self.__path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_endpoint(self):
    """
    Getter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state/endpoint (oc-inet:ip-address)

    YANG Description: A unique identifier for the remote set of nodes. When the address
family is IPv4, the value is a 4-octet IPv4 address. When the
address family is IPv6, the value is a 16-octet IPv6 address.
    """
    return self.__endpoint
      
  def _set_endpoint(self, v, load=False):
    """
    Setter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state/endpoint (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint() directly.

    YANG Description: A unique identifier for the remote set of nodes. When the address
family is IPv4, the value is a 4-octet IPv4 address. When the
address family is IPv6, the value is a 16-octet IPv6 address.
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """endpoint must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__endpoint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_endpoint(self):
    self.__endpoint = 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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_color(self):
    """
    Getter method for color, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state/color (uint32)

    YANG Description: A 4-octet value identifying the policy. Combined with the endpoint
the endpoint and colour represent the unique policy.
    """
    return self.__color
      
  def _set_color(self, v, load=False):
    """
    Setter method for color, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state/color (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_color is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_color() directly.

    YANG Description: A 4-octet value identifying the policy. Combined with the endpoint
the endpoint and colour represent the unique policy.
    """
    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="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """color 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="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__color = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_color(self):
    self.__color = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_attr_index(self):
    """
    Getter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state/attr_index (leafref)

    YANG Description: Reference to the common attribute group for the
route
    """
    return self.__attr_index
      
  def _set_attr_index(self, v, load=False):
    """
    Setter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state/attr_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_index() directly.

    YANG Description: Reference to the common attribute group for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_index(self):
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_community_index(self):
    """
    Getter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state/community_index (leafref)

    YANG Description: Reference to the community attribute for the route
    """
    return self.__community_index
      
  def _set_community_index(self, v, load=False):
    """
    Setter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state/community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_community_index() directly.

    YANG Description: Reference to the community attribute for the route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_community_index(self):
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_ext_community_index(self):
    """
    Getter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state/ext_community_index (leafref)

    YANG Description: Reference to the extended community attribute for the
route
    """
    return self.__ext_community_index
      
  def _set_ext_community_index(self, v, load=False):
    """
    Setter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state/ext_community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ext_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ext_community_index() directly.

    YANG Description: Reference to the extended community attribute for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ext_community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__ext_community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ext_community_index(self):
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_last_modified(self):
    """
    Getter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state/last_modified (oc-types:timeticks64)

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    return self.__last_modified
      
  def _set_last_modified(self, v, load=False):
    """
    Setter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state/last_modified (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_last_modified is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_last_modified() directly.

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    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="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """last_modified must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__last_modified = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_last_modified(self):
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_valid_route(self):
    """
    Getter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state/valid_route (boolean)

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    return self.__valid_route
      
  def _set_valid_route(self, v, load=False):
    """
    Setter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state/valid_route (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_valid_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_valid_route() directly.

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """valid_route must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__valid_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_valid_route(self):
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_invalid_reason(self):
    """
    Getter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state/invalid_reason (identityref)

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    return self.__invalid_reason
      
  def _set_invalid_reason(self, v, load=False):
    """
    Setter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state/invalid_reason (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_invalid_reason is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_invalid_reason() directly.

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    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={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """invalid_reason must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__invalid_reason = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_invalid_reason(self):
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_best_path(self):
    """
    Getter method for best_path, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state/best_path (boolean)

    YANG Description: Current path was selected as the best path.
    """
    return self.__best_path
      
  def _set_best_path(self, v, load=False):
    """
    Setter method for best_path, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state/best_path (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_best_path is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_best_path() directly.

    YANG Description: Current path was selected as the best path.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="best-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """best_path must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="best-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__best_path = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_best_path(self):
    self.__best_path = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="best-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  path_id = __builtin__.property(_get_path_id)
  endpoint = __builtin__.property(_get_endpoint)
  color = __builtin__.property(_get_color)
  attr_index = __builtin__.property(_get_attr_index)
  community_index = __builtin__.property(_get_community_index)
  ext_community_index = __builtin__.property(_get_ext_community_index)
  last_modified = __builtin__.property(_get_last_modified)
  valid_route = __builtin__.property(_get_valid_route)
  invalid_reason = __builtin__.property(_get_invalid_reason)
  best_path = __builtin__.property(_get_best_path)


  _pyangbind_elements = OrderedDict([('path_id', path_id), ('endpoint', endpoint), ('color', color), ('attr_index', attr_index), ('community_index', community_index), ('ext_community_index', ext_community_index), ('last_modified', last_modified), ('valid_route', valid_route), ('invalid_reason', invalid_reason), ('best_path', best_path), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes_unknown_attribute_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-srte-policy/neighbors/neighbor/adj-rib-in-post/routes/route/unknown-attributes/unknown-attribute/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for unknown route attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__optional','__transitive','__partial','__extended','__attr_type','__attr_len','__attr_value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-srte-policy', 'neighbors', 'neighbor', 'adj-rib-in-post', 'routes', 'route', 'unknown-attributes', 'unknown-attribute', 'state']

  def _get_optional(self):
    """
    Getter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/optional (boolean)

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    return self.__optional
      
  def _set_optional(self, v, load=False):
    """
    Setter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/optional (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_optional is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_optional() directly.

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """optional must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__optional = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_optional(self):
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_transitive(self):
    """
    Getter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/transitive (boolean)

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    return self.__transitive
      
  def _set_transitive(self, v, load=False):
    """
    Setter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/transitive (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transitive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transitive() directly.

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transitive must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__transitive = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transitive(self):
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_partial(self):
    """
    Getter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/partial (boolean)

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    return self.__partial
      
  def _set_partial(self, v, load=False):
    """
    Setter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/partial (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_partial is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_partial() directly.

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """partial must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__partial = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_partial(self):
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_extended(self):
    """
    Getter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/extended (boolean)

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    return self.__extended
      
  def _set_extended(self, v, load=False):
    """
    Setter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/extended (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended() directly.

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__extended = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended(self):
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/attr_type (uint8)

    YANG Description: 1-octet value encoding the attribute type code
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/attr_type (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() directly.

    YANG Description: 1-octet value encoding the attribute type code
    """
    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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_attr_len(self):
    """
    Getter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/attr_len (uint16)

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    return self.__attr_len
      
  def _set_attr_len(self, v, load=False):
    """
    Setter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/attr_len (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_len() directly.

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_len 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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__attr_len = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_len(self):
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_attr_value(self):
    """
    Getter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/attr_value (binary)

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    return self.__attr_value
      
  def _set_attr_value(self, v, load=False):
    """
    Setter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/attr_value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_value() directly.

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__attr_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_value(self):
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  optional = __builtin__.property(_get_optional)
  transitive = __builtin__.property(_get_transitive)
  partial = __builtin__.property(_get_partial)
  extended = __builtin__.property(_get_extended)
  attr_type = __builtin__.property(_get_attr_type)
  attr_len = __builtin__.property(_get_attr_len)
  attr_value = __builtin__.property(_get_attr_value)


  _pyangbind_elements = OrderedDict([('optional', optional), ('transitive', transitive), ('partial', partial), ('extended', extended), ('attr_type', attr_type), ('attr_len', attr_len), ('attr_value', attr_value), ])


class yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes_unknown_attribute(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-srte-policy/neighbors/neighbor/adj-rib-in-post/routes/route/unknown-attributes/unknown-attribute. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
  """
  __slots__ = ('_path_helper', '_extmethods', '__attr_type','__state',)

  _yang_name = 'unknown-attribute'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-srte-policy', 'neighbors', 'neighbor', 'adj-rib-in-post', 'routes', 'route', 'unknown-attributes', 'unknown-attribute']

  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/attr_type (leafref)

    YANG Description: Reference to the list key
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/attr_type (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state (container)

    YANG Description: Operational state for unknown route attributes
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/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 unknown route attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  attr_type = __builtin__.property(_get_attr_type)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('attr_type', attr_type), ('state', state), ])


class yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-srte-policy/neighbors/neighbor/adj-rib-in-post/routes/route/unknown-attributes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
  """
  __slots__ = ('_path_helper', '_extmethods', '__unknown_attribute',)

  _yang_name = 'unknown-attributes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-srte-policy', 'neighbors', 'neighbor', 'adj-rib-in-post', 'routes', 'route', 'unknown-attributes']

  def _get_unknown_attribute(self):
    """
    Getter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute (list)

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    return self.__unknown_attribute
      
  def _set_unknown_attribute(self, v, load=False):
    """
    Setter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attribute is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attribute() directly.

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attribute must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__unknown_attribute = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attribute(self):
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  unknown_attribute = __builtin__.property(_get_unknown_attribute)


  _pyangbind_elements = OrderedDict([('unknown_attribute', unknown_attribute), ])


class yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-srte-policy/neighbors/neighbor/adj-rib-in-post/routes/route. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The routes that are in the Adj-RIB-In-Post for the specified
BGP neighbour within the SR-TE Policy SAFI for the specified
address family.
  """
  __slots__ = ('_path_helper', '_extmethods', '__path_id','__endpoint','__color','__state','__unknown_attributes',)

  _yang_name = 'route'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__endpoint = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__color = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-srte-policy', 'neighbors', 'neighbor', 'adj-rib-in-post', 'routes', 'route']

  def _get_path_id(self):
    """
    Getter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/path_id (leafref)

    YANG Description: Reference to the path identifier for the SR-TE Policy SAFI
route. The value is only non-zero if ADD-PATHS is not being
used.
    """
    return self.__path_id
      
  def _set_path_id(self, v, load=False):
    """
    Setter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/path_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_id() directly.

    YANG Description: Reference to the path identifier for the SR-TE Policy SAFI
route. The value is only non-zero if ADD-PATHS is not being
used.
    """
    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="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_id(self):
    self.__path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_endpoint(self):
    """
    Getter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/endpoint (leafref)

    YANG Description: Reference to the endpoint used for the SR-TE Policy SAFI
route within the NLRI.
    """
    return self.__endpoint
      
  def _set_endpoint(self, v, load=False):
    """
    Setter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/endpoint (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint() directly.

    YANG Description: Reference to the endpoint used for the SR-TE Policy SAFI
route within the NLRI.
    """
    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="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """endpoint must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__endpoint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_endpoint(self):
    self.__endpoint = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_color(self):
    """
    Getter method for color, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/color (leafref)

    YANG Description: Reference to the colour used for the SR-TE policy SAFI
route within the NLRI.
    """
    return self.__color
      
  def _set_color(self, v, load=False):
    """
    Setter method for color, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/color (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_color is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_color() directly.

    YANG Description: Reference to the colour used for the SR-TE policy SAFI
route within the NLRI.
    """
    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="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """color must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__color = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_color(self):
    self.__color = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state (container)

    YANG Description: Operational state attributes related to the route within
the SR-TE Policy SAFI Adj-RIB-In-Post for the specified
neighbour.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/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 attributes related to the route within
the SR-TE Policy SAFI Adj-RIB-In-Post for the specified
neighbour.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unknown_attributes(self):
    """
    Getter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes (container)

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    return self.__unknown_attributes
      
  def _set_unknown_attributes(self, v, load=False):
    """
    Setter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attributes() directly.

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attributes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unknown_attributes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attributes(self):
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  path_id = __builtin__.property(_get_path_id)
  endpoint = __builtin__.property(_get_endpoint)
  color = __builtin__.property(_get_color)
  state = __builtin__.property(_get_state)
  unknown_attributes = __builtin__.property(_get_unknown_attributes)


  _pyangbind_elements = OrderedDict([('path_id', path_id), ('endpoint', endpoint), ('color', color), ('state', state), ('unknown_attributes', unknown_attributes), ])


class yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_post_routes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-srte-policy/neighbors/neighbor/adj-rib-in-post/routes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The set of routes that are within the Adj-RIB-Out for the
neighbour.
  """
  __slots__ = ('_path_helper', '_extmethods', '__route',)

  _yang_name = 'routes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__route = YANGDynClass(base=YANGListType("path_id endpoint color",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-id endpoint color', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-srte-policy', 'neighbors', 'neighbor', 'adj-rib-in-post', 'routes']

  def _get_route(self):
    """
    Getter method for route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route (list)

    YANG Description: The routes that are in the Adj-RIB-In-Post for the specified
BGP neighbour within the SR-TE Policy SAFI for the specified
address family.
    """
    return self.__route
      
  def _set_route(self, v, load=False):
    """
    Setter method for route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route() directly.

    YANG Description: The routes that are in the Adj-RIB-In-Post for the specified
BGP neighbour within the SR-TE Policy SAFI for the specified
address family.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("path_id endpoint color",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-id endpoint color', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("path_id endpoint color",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-id endpoint color', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route(self):
    self.__route = YANGDynClass(base=YANGListType("path_id endpoint color",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-id endpoint color', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  route = __builtin__.property(_get_route)


  _pyangbind_elements = OrderedDict([('route', route), ])


class yc_adj_rib_in_post_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_post(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-srte-policy/neighbors/neighbor/adj-rib-in-post. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The Adj-RIB-In for the SR-TE Policy SAFI for the neighbour,
following any inbound policy constraints or modifications
being made.
  """
  __slots__ = ('_path_helper', '_extmethods', '__routes',)

  _yang_name = 'adj-rib-in-post'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_post_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-srte-policy', 'neighbors', 'neighbor', 'adj-rib-in-post']

  def _get_routes(self):
    """
    Getter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes (container)

    YANG Description: The set of routes that are within the Adj-RIB-Out for the
neighbour.
    """
    return self.__routes
      
  def _set_routes(self, v, load=False):
    """
    Setter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post/routes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_routes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_routes() directly.

    YANG Description: The set of routes that are within the Adj-RIB-Out for the
neighbour.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_post_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """routes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_post_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__routes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_routes(self):
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_post_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  routes = __builtin__.property(_get_routes)


  _pyangbind_elements = OrderedDict([('routes', routes), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-srte-policy/neighbors/neighbor/adj-rib-out-pre/routes/route/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters for entries within the Adj-RIB used
to store SR-TE Policy SAFI routes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__path_id','__endpoint','__color','__attr_index','__community_index','__ext_community_index','__last_modified','__valid_route','__invalid_reason',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__endpoint = 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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__color = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-srte-policy', 'neighbors', 'neighbor', 'adj-rib-out-pre', 'routes', 'route', 'state']

  def _get_path_id(self):
    """
    Getter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/state/path_id (uint32)

    YANG Description: Identifier for the path when using BGP ADD-PATHS for the SR-TE
policy SAFI.
    """
    return self.__path_id
      
  def _set_path_id(self, v, load=False):
    """
    Setter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/state/path_id (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_id() directly.

    YANG Description: Identifier for the path when using BGP ADD-PATHS for the SR-TE
policy SAFI.
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_id 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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_id(self):
    self.__path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_endpoint(self):
    """
    Getter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/state/endpoint (oc-inet:ip-address)

    YANG Description: A unique identifier for the remote set of nodes. When the address
family is IPv4, the value is a 4-octet IPv4 address. When the
address family is IPv6, the value is a 16-octet IPv6 address.
    """
    return self.__endpoint
      
  def _set_endpoint(self, v, load=False):
    """
    Setter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/state/endpoint (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint() directly.

    YANG Description: A unique identifier for the remote set of nodes. When the address
family is IPv4, the value is a 4-octet IPv4 address. When the
address family is IPv6, the value is a 16-octet IPv6 address.
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """endpoint must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__endpoint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_endpoint(self):
    self.__endpoint = 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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_color(self):
    """
    Getter method for color, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/state/color (uint32)

    YANG Description: A 4-octet value identifying the policy. Combined with the endpoint
the endpoint and colour represent the unique policy.
    """
    return self.__color
      
  def _set_color(self, v, load=False):
    """
    Setter method for color, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/state/color (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_color is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_color() directly.

    YANG Description: A 4-octet value identifying the policy. Combined with the endpoint
the endpoint and colour represent the unique policy.
    """
    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="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """color 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="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__color = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_color(self):
    self.__color = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_attr_index(self):
    """
    Getter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/state/attr_index (leafref)

    YANG Description: Reference to the common attribute group for the
route
    """
    return self.__attr_index
      
  def _set_attr_index(self, v, load=False):
    """
    Setter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/state/attr_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_index() directly.

    YANG Description: Reference to the common attribute group for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_index(self):
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_community_index(self):
    """
    Getter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/state/community_index (leafref)

    YANG Description: Reference to the community attribute for the route
    """
    return self.__community_index
      
  def _set_community_index(self, v, load=False):
    """
    Setter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/state/community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_community_index() directly.

    YANG Description: Reference to the community attribute for the route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_community_index(self):
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_ext_community_index(self):
    """
    Getter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/state/ext_community_index (leafref)

    YANG Description: Reference to the extended community attribute for the
route
    """
    return self.__ext_community_index
      
  def _set_ext_community_index(self, v, load=False):
    """
    Setter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/state/ext_community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ext_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ext_community_index() directly.

    YANG Description: Reference to the extended community attribute for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ext_community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__ext_community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ext_community_index(self):
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_last_modified(self):
    """
    Getter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/state/last_modified (oc-types:timeticks64)

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    return self.__last_modified
      
  def _set_last_modified(self, v, load=False):
    """
    Setter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/state/last_modified (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_last_modified is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_last_modified() directly.

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    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="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """last_modified must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__last_modified = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_last_modified(self):
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_valid_route(self):
    """
    Getter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/state/valid_route (boolean)

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    return self.__valid_route
      
  def _set_valid_route(self, v, load=False):
    """
    Setter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/state/valid_route (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_valid_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_valid_route() directly.

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """valid_route must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__valid_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_valid_route(self):
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_invalid_reason(self):
    """
    Getter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/state/invalid_reason (identityref)

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    return self.__invalid_reason
      
  def _set_invalid_reason(self, v, load=False):
    """
    Setter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/state/invalid_reason (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_invalid_reason is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_invalid_reason() directly.

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    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={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """invalid_reason must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__invalid_reason = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_invalid_reason(self):
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  path_id = __builtin__.property(_get_path_id)
  endpoint = __builtin__.property(_get_endpoint)
  color = __builtin__.property(_get_color)
  attr_index = __builtin__.property(_get_attr_index)
  community_index = __builtin__.property(_get_community_index)
  ext_community_index = __builtin__.property(_get_ext_community_index)
  last_modified = __builtin__.property(_get_last_modified)
  valid_route = __builtin__.property(_get_valid_route)
  invalid_reason = __builtin__.property(_get_invalid_reason)


  _pyangbind_elements = OrderedDict([('path_id', path_id), ('endpoint', endpoint), ('color', color), ('attr_index', attr_index), ('community_index', community_index), ('ext_community_index', ext_community_index), ('last_modified', last_modified), ('valid_route', valid_route), ('invalid_reason', invalid_reason), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes_unknown_attribute_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-srte-policy/neighbors/neighbor/adj-rib-out-pre/routes/route/unknown-attributes/unknown-attribute/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for unknown route attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__optional','__transitive','__partial','__extended','__attr_type','__attr_len','__attr_value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-srte-policy', 'neighbors', 'neighbor', 'adj-rib-out-pre', 'routes', 'route', 'unknown-attributes', 'unknown-attribute', 'state']

  def _get_optional(self):
    """
    Getter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/optional (boolean)

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    return self.__optional
      
  def _set_optional(self, v, load=False):
    """
    Setter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/optional (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_optional is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_optional() directly.

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """optional must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__optional = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_optional(self):
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_transitive(self):
    """
    Getter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/transitive (boolean)

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    return self.__transitive
      
  def _set_transitive(self, v, load=False):
    """
    Setter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/transitive (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transitive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transitive() directly.

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transitive must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__transitive = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transitive(self):
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_partial(self):
    """
    Getter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/partial (boolean)

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    return self.__partial
      
  def _set_partial(self, v, load=False):
    """
    Setter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/partial (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_partial is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_partial() directly.

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """partial must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__partial = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_partial(self):
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_extended(self):
    """
    Getter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/extended (boolean)

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    return self.__extended
      
  def _set_extended(self, v, load=False):
    """
    Setter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/extended (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended() directly.

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__extended = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended(self):
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_type (uint8)

    YANG Description: 1-octet value encoding the attribute type code
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_type (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() directly.

    YANG Description: 1-octet value encoding the attribute type code
    """
    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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_attr_len(self):
    """
    Getter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_len (uint16)

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    return self.__attr_len
      
  def _set_attr_len(self, v, load=False):
    """
    Setter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_len (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_len() directly.

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_len 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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__attr_len = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_len(self):
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_attr_value(self):
    """
    Getter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_value (binary)

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    return self.__attr_value
      
  def _set_attr_value(self, v, load=False):
    """
    Setter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_value() directly.

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__attr_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_value(self):
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  optional = __builtin__.property(_get_optional)
  transitive = __builtin__.property(_get_transitive)
  partial = __builtin__.property(_get_partial)
  extended = __builtin__.property(_get_extended)
  attr_type = __builtin__.property(_get_attr_type)
  attr_len = __builtin__.property(_get_attr_len)
  attr_value = __builtin__.property(_get_attr_value)


  _pyangbind_elements = OrderedDict([('optional', optional), ('transitive', transitive), ('partial', partial), ('extended', extended), ('attr_type', attr_type), ('attr_len', attr_len), ('attr_value', attr_value), ])


class yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes_unknown_attribute(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-srte-policy/neighbors/neighbor/adj-rib-out-pre/routes/route/unknown-attributes/unknown-attribute. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
  """
  __slots__ = ('_path_helper', '_extmethods', '__attr_type','__state',)

  _yang_name = 'unknown-attribute'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-srte-policy', 'neighbors', 'neighbor', 'adj-rib-out-pre', 'routes', 'route', 'unknown-attributes', 'unknown-attribute']

  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/attr_type (leafref)

    YANG Description: Reference to the list key
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/attr_type (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state (container)

    YANG Description: Operational state for unknown route attributes
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/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 unknown route attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  attr_type = __builtin__.property(_get_attr_type)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('attr_type', attr_type), ('state', state), ])


class yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-srte-policy/neighbors/neighbor/adj-rib-out-pre/routes/route/unknown-attributes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
  """
  __slots__ = ('_path_helper', '_extmethods', '__unknown_attribute',)

  _yang_name = 'unknown-attributes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-srte-policy', 'neighbors', 'neighbor', 'adj-rib-out-pre', 'routes', 'route', 'unknown-attributes']

  def _get_unknown_attribute(self):
    """
    Getter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute (list)

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    return self.__unknown_attribute
      
  def _set_unknown_attribute(self, v, load=False):
    """
    Setter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attribute is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attribute() directly.

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attribute must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__unknown_attribute = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attribute(self):
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  unknown_attribute = __builtin__.property(_get_unknown_attribute)


  _pyangbind_elements = OrderedDict([('unknown_attribute', unknown_attribute), ])


class yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-srte-policy/neighbors/neighbor/adj-rib-out-pre/routes/route. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The routes within the SR-TE Policy SAFI Adj-RIB. The
routes are keyed on the path-id - set to a non-zero
value only if ADD-PATHS is being used; the color; and
the endpoint. The colour and endpoint are extracted from
the NLRI.
  """
  __slots__ = ('_path_helper', '_extmethods', '__path_id','__endpoint','__color','__state','__unknown_attributes',)

  _yang_name = 'route'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__endpoint = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__color = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-srte-policy', 'neighbors', 'neighbor', 'adj-rib-out-pre', 'routes', 'route']

  def _get_path_id(self):
    """
    Getter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/path_id (leafref)

    YANG Description: Reference to the path identifier for the SR-TE Policy SAFI
route. The value is only non-zero if ADD-PATHS is not being
used.
    """
    return self.__path_id
      
  def _set_path_id(self, v, load=False):
    """
    Setter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/path_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_id() directly.

    YANG Description: Reference to the path identifier for the SR-TE Policy SAFI
route. The value is only non-zero if ADD-PATHS is not being
used.
    """
    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="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_id(self):
    self.__path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_endpoint(self):
    """
    Getter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/endpoint (leafref)

    YANG Description: Reference to the endpoint used for the SR-TE Policy SAFI
route within the NLRI.
    """
    return self.__endpoint
      
  def _set_endpoint(self, v, load=False):
    """
    Setter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/endpoint (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint() directly.

    YANG Description: Reference to the endpoint used for the SR-TE Policy SAFI
route within the NLRI.
    """
    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="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """endpoint must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__endpoint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_endpoint(self):
    self.__endpoint = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_color(self):
    """
    Getter method for color, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/color (leafref)

    YANG Description: Reference to the colour used for the SR-TE policy SAFI
route within the NLRI.
    """
    return self.__color
      
  def _set_color(self, v, load=False):
    """
    Setter method for color, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/color (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_color is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_color() directly.

    YANG Description: Reference to the colour used for the SR-TE policy SAFI
route within the NLRI.
    """
    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="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """color must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__color = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_color(self):
    self.__color = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/state (container)

    YANG Description: State parameters for entries within the Adj-RIB used
to store SR-TE Policy SAFI routes.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/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 parameters for entries within the Adj-RIB used
to store SR-TE Policy SAFI routes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unknown_attributes(self):
    """
    Getter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes (container)

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    return self.__unknown_attributes
      
  def _set_unknown_attributes(self, v, load=False):
    """
    Setter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attributes() directly.

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attributes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unknown_attributes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attributes(self):
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  path_id = __builtin__.property(_get_path_id)
  endpoint = __builtin__.property(_get_endpoint)
  color = __builtin__.property(_get_color)
  state = __builtin__.property(_get_state)
  unknown_attributes = __builtin__.property(_get_unknown_attributes)


  _pyangbind_elements = OrderedDict([('path_id', path_id), ('endpoint', endpoint), ('color', color), ('state', state), ('unknown_attributes', unknown_attributes), ])


class yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-srte-policy/neighbors/neighbor/adj-rib-out-pre/routes. 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 routes within the
SR-TE Policy SAFI.
  """
  __slots__ = ('_path_helper', '_extmethods', '__route',)

  _yang_name = 'routes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__route = YANGDynClass(base=YANGListType("path_id endpoint color",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-id endpoint color', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-srte-policy', 'neighbors', 'neighbor', 'adj-rib-out-pre', 'routes']

  def _get_route(self):
    """
    Getter method for route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route (list)

    YANG Description: The routes within the SR-TE Policy SAFI Adj-RIB. The
routes are keyed on the path-id - set to a non-zero
value only if ADD-PATHS is being used; the color; and
the endpoint. The colour and endpoint are extracted from
the NLRI.
    """
    return self.__route
      
  def _set_route(self, v, load=False):
    """
    Setter method for route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route() directly.

    YANG Description: The routes within the SR-TE Policy SAFI Adj-RIB. The
routes are keyed on the path-id - set to a non-zero
value only if ADD-PATHS is being used; the color; and
the endpoint. The colour and endpoint are extracted from
the NLRI.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("path_id endpoint color",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-id endpoint color', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("path_id endpoint color",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-id endpoint color', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route(self):
    self.__route = YANGDynClass(base=YANGListType("path_id endpoint color",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-id endpoint color', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  route = __builtin__.property(_get_route)


  _pyangbind_elements = OrderedDict([('route', route), ])


class yc_adj_rib_out_pre_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_pre(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-srte-policy/neighbors/neighbor/adj-rib-out-pre. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The Adj-RIB-Out for the SR-TE Policy SAFI for the neighbour,
prior to any outgoing policy modifications or constraints
having been applied.
  """
  __slots__ = ('_path_helper', '_extmethods', '__routes',)

  _yang_name = 'adj-rib-out-pre'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-srte-policy', 'neighbors', 'neighbor', 'adj-rib-out-pre']

  def _get_routes(self):
    """
    Getter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes (container)

    YANG Description: Surrounding container for the list of routes within the
SR-TE Policy SAFI.
    """
    return self.__routes
      
  def _set_routes(self, v, load=False):
    """
    Setter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_routes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_routes() directly.

    YANG Description: Surrounding container for the list of routes within the
SR-TE Policy SAFI.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """routes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__routes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_routes(self):
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  routes = __builtin__.property(_get_routes)


  _pyangbind_elements = OrderedDict([('routes', routes), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-srte-policy/neighbors/neighbor/adj-rib-out-post/routes/route/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters for entries within the Adj-RIB used
to store SR-TE Policy SAFI routes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__path_id','__endpoint','__color','__attr_index','__community_index','__ext_community_index','__last_modified','__valid_route','__invalid_reason',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__endpoint = 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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__color = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-srte-policy', 'neighbors', 'neighbor', 'adj-rib-out-post', 'routes', 'route', 'state']

  def _get_path_id(self):
    """
    Getter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/state/path_id (uint32)

    YANG Description: Identifier for the path when using BGP ADD-PATHS for the SR-TE
policy SAFI.
    """
    return self.__path_id
      
  def _set_path_id(self, v, load=False):
    """
    Setter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/state/path_id (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_id() directly.

    YANG Description: Identifier for the path when using BGP ADD-PATHS for the SR-TE
policy SAFI.
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_id 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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_id(self):
    self.__path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_endpoint(self):
    """
    Getter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/state/endpoint (oc-inet:ip-address)

    YANG Description: A unique identifier for the remote set of nodes. When the address
family is IPv4, the value is a 4-octet IPv4 address. When the
address family is IPv6, the value is a 16-octet IPv6 address.
    """
    return self.__endpoint
      
  def _set_endpoint(self, v, load=False):
    """
    Setter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/state/endpoint (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint() directly.

    YANG Description: A unique identifier for the remote set of nodes. When the address
family is IPv4, the value is a 4-octet IPv4 address. When the
address family is IPv6, the value is a 16-octet IPv6 address.
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """endpoint must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__endpoint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_endpoint(self):
    self.__endpoint = 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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_color(self):
    """
    Getter method for color, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/state/color (uint32)

    YANG Description: A 4-octet value identifying the policy. Combined with the endpoint
the endpoint and colour represent the unique policy.
    """
    return self.__color
      
  def _set_color(self, v, load=False):
    """
    Setter method for color, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/state/color (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_color is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_color() directly.

    YANG Description: A 4-octet value identifying the policy. Combined with the endpoint
the endpoint and colour represent the unique policy.
    """
    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="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """color 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="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__color = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_color(self):
    self.__color = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_attr_index(self):
    """
    Getter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/state/attr_index (leafref)

    YANG Description: Reference to the common attribute group for the
route
    """
    return self.__attr_index
      
  def _set_attr_index(self, v, load=False):
    """
    Setter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/state/attr_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_index() directly.

    YANG Description: Reference to the common attribute group for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_index(self):
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_community_index(self):
    """
    Getter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/state/community_index (leafref)

    YANG Description: Reference to the community attribute for the route
    """
    return self.__community_index
      
  def _set_community_index(self, v, load=False):
    """
    Setter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/state/community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_community_index() directly.

    YANG Description: Reference to the community attribute for the route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_community_index(self):
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_ext_community_index(self):
    """
    Getter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/state/ext_community_index (leafref)

    YANG Description: Reference to the extended community attribute for the
route
    """
    return self.__ext_community_index
      
  def _set_ext_community_index(self, v, load=False):
    """
    Setter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/state/ext_community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ext_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ext_community_index() directly.

    YANG Description: Reference to the extended community attribute for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ext_community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__ext_community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ext_community_index(self):
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_last_modified(self):
    """
    Getter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/state/last_modified (oc-types:timeticks64)

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    return self.__last_modified
      
  def _set_last_modified(self, v, load=False):
    """
    Setter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/state/last_modified (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_last_modified is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_last_modified() directly.

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    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="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """last_modified must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__last_modified = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_last_modified(self):
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_valid_route(self):
    """
    Getter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/state/valid_route (boolean)

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    return self.__valid_route
      
  def _set_valid_route(self, v, load=False):
    """
    Setter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/state/valid_route (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_valid_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_valid_route() directly.

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """valid_route must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__valid_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_valid_route(self):
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_invalid_reason(self):
    """
    Getter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/state/invalid_reason (identityref)

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    return self.__invalid_reason
      
  def _set_invalid_reason(self, v, load=False):
    """
    Setter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/state/invalid_reason (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_invalid_reason is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_invalid_reason() directly.

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    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={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """invalid_reason must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__invalid_reason = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_invalid_reason(self):
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  path_id = __builtin__.property(_get_path_id)
  endpoint = __builtin__.property(_get_endpoint)
  color = __builtin__.property(_get_color)
  attr_index = __builtin__.property(_get_attr_index)
  community_index = __builtin__.property(_get_community_index)
  ext_community_index = __builtin__.property(_get_ext_community_index)
  last_modified = __builtin__.property(_get_last_modified)
  valid_route = __builtin__.property(_get_valid_route)
  invalid_reason = __builtin__.property(_get_invalid_reason)


  _pyangbind_elements = OrderedDict([('path_id', path_id), ('endpoint', endpoint), ('color', color), ('attr_index', attr_index), ('community_index', community_index), ('ext_community_index', ext_community_index), ('last_modified', last_modified), ('valid_route', valid_route), ('invalid_reason', invalid_reason), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes_unknown_attribute_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-srte-policy/neighbors/neighbor/adj-rib-out-post/routes/route/unknown-attributes/unknown-attribute/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for unknown route attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__optional','__transitive','__partial','__extended','__attr_type','__attr_len','__attr_value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-srte-policy', 'neighbors', 'neighbor', 'adj-rib-out-post', 'routes', 'route', 'unknown-attributes', 'unknown-attribute', 'state']

  def _get_optional(self):
    """
    Getter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/optional (boolean)

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    return self.__optional
      
  def _set_optional(self, v, load=False):
    """
    Setter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/optional (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_optional is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_optional() directly.

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """optional must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__optional = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_optional(self):
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_transitive(self):
    """
    Getter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/transitive (boolean)

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    return self.__transitive
      
  def _set_transitive(self, v, load=False):
    """
    Setter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/transitive (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transitive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transitive() directly.

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transitive must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__transitive = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transitive(self):
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_partial(self):
    """
    Getter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/partial (boolean)

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    return self.__partial
      
  def _set_partial(self, v, load=False):
    """
    Setter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/partial (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_partial is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_partial() directly.

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """partial must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__partial = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_partial(self):
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_extended(self):
    """
    Getter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/extended (boolean)

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    return self.__extended
      
  def _set_extended(self, v, load=False):
    """
    Setter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/extended (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended() directly.

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__extended = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended(self):
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/attr_type (uint8)

    YANG Description: 1-octet value encoding the attribute type code
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/attr_type (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() directly.

    YANG Description: 1-octet value encoding the attribute type code
    """
    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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_attr_len(self):
    """
    Getter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/attr_len (uint16)

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    return self.__attr_len
      
  def _set_attr_len(self, v, load=False):
    """
    Setter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/attr_len (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_len() directly.

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_len 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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__attr_len = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_len(self):
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_attr_value(self):
    """
    Getter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/attr_value (binary)

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    return self.__attr_value
      
  def _set_attr_value(self, v, load=False):
    """
    Setter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/attr_value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_value() directly.

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__attr_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_value(self):
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  optional = __builtin__.property(_get_optional)
  transitive = __builtin__.property(_get_transitive)
  partial = __builtin__.property(_get_partial)
  extended = __builtin__.property(_get_extended)
  attr_type = __builtin__.property(_get_attr_type)
  attr_len = __builtin__.property(_get_attr_len)
  attr_value = __builtin__.property(_get_attr_value)


  _pyangbind_elements = OrderedDict([('optional', optional), ('transitive', transitive), ('partial', partial), ('extended', extended), ('attr_type', attr_type), ('attr_len', attr_len), ('attr_value', attr_value), ])


class yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes_unknown_attribute(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-srte-policy/neighbors/neighbor/adj-rib-out-post/routes/route/unknown-attributes/unknown-attribute. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
  """
  __slots__ = ('_path_helper', '_extmethods', '__attr_type','__state',)

  _yang_name = 'unknown-attribute'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-srte-policy', 'neighbors', 'neighbor', 'adj-rib-out-post', 'routes', 'route', 'unknown-attributes', 'unknown-attribute']

  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/attr_type (leafref)

    YANG Description: Reference to the list key
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/attr_type (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state (container)

    YANG Description: Operational state for unknown route attributes
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/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 unknown route attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  attr_type = __builtin__.property(_get_attr_type)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('attr_type', attr_type), ('state', state), ])


class yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-srte-policy/neighbors/neighbor/adj-rib-out-post/routes/route/unknown-attributes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
  """
  __slots__ = ('_path_helper', '_extmethods', '__unknown_attribute',)

  _yang_name = 'unknown-attributes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-srte-policy', 'neighbors', 'neighbor', 'adj-rib-out-post', 'routes', 'route', 'unknown-attributes']

  def _get_unknown_attribute(self):
    """
    Getter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute (list)

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    return self.__unknown_attribute
      
  def _set_unknown_attribute(self, v, load=False):
    """
    Setter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attribute is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attribute() directly.

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attribute must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__unknown_attribute = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attribute(self):
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  unknown_attribute = __builtin__.property(_get_unknown_attribute)


  _pyangbind_elements = OrderedDict([('unknown_attribute', unknown_attribute), ])


class yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-srte-policy/neighbors/neighbor/adj-rib-out-post/routes/route. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The routes within the SR-TE Policy SAFI Adj-RIB. The
routes are keyed on the path-id - set to a non-zero
value only if ADD-PATHS is being used; the color; and
the endpoint. The colour and endpoint are extracted from
the NLRI.
  """
  __slots__ = ('_path_helper', '_extmethods', '__path_id','__endpoint','__color','__state','__unknown_attributes',)

  _yang_name = 'route'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__endpoint = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__color = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-srte-policy', 'neighbors', 'neighbor', 'adj-rib-out-post', 'routes', 'route']

  def _get_path_id(self):
    """
    Getter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/path_id (leafref)

    YANG Description: Reference to the path identifier for the SR-TE Policy SAFI
route. The value is only non-zero if ADD-PATHS is not being
used.
    """
    return self.__path_id
      
  def _set_path_id(self, v, load=False):
    """
    Setter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/path_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_id() directly.

    YANG Description: Reference to the path identifier for the SR-TE Policy SAFI
route. The value is only non-zero if ADD-PATHS is not being
used.
    """
    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="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_id(self):
    self.__path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_endpoint(self):
    """
    Getter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/endpoint (leafref)

    YANG Description: Reference to the endpoint used for the SR-TE Policy SAFI
route within the NLRI.
    """
    return self.__endpoint
      
  def _set_endpoint(self, v, load=False):
    """
    Setter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/endpoint (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint() directly.

    YANG Description: Reference to the endpoint used for the SR-TE Policy SAFI
route within the NLRI.
    """
    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="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """endpoint must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__endpoint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_endpoint(self):
    self.__endpoint = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_color(self):
    """
    Getter method for color, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/color (leafref)

    YANG Description: Reference to the colour used for the SR-TE policy SAFI
route within the NLRI.
    """
    return self.__color
      
  def _set_color(self, v, load=False):
    """
    Setter method for color, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/color (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_color is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_color() directly.

    YANG Description: Reference to the colour used for the SR-TE policy SAFI
route within the NLRI.
    """
    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="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """color must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__color = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_color(self):
    self.__color = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/state (container)

    YANG Description: State parameters for entries within the Adj-RIB used
to store SR-TE Policy SAFI routes.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/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 parameters for entries within the Adj-RIB used
to store SR-TE Policy SAFI routes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unknown_attributes(self):
    """
    Getter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes (container)

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    return self.__unknown_attributes
      
  def _set_unknown_attributes(self, v, load=False):
    """
    Setter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attributes() directly.

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attributes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unknown_attributes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attributes(self):
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  path_id = __builtin__.property(_get_path_id)
  endpoint = __builtin__.property(_get_endpoint)
  color = __builtin__.property(_get_color)
  state = __builtin__.property(_get_state)
  unknown_attributes = __builtin__.property(_get_unknown_attributes)


  _pyangbind_elements = OrderedDict([('path_id', path_id), ('endpoint', endpoint), ('color', color), ('state', state), ('unknown_attributes', unknown_attributes), ])


class yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_post_routes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-srte-policy/neighbors/neighbor/adj-rib-out-post/routes. 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 routes within the
SR-TE Policy SAFI.
  """
  __slots__ = ('_path_helper', '_extmethods', '__route',)

  _yang_name = 'routes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__route = YANGDynClass(base=YANGListType("path_id endpoint color",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-id endpoint color', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-srte-policy', 'neighbors', 'neighbor', 'adj-rib-out-post', 'routes']

  def _get_route(self):
    """
    Getter method for route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route (list)

    YANG Description: The routes within the SR-TE Policy SAFI Adj-RIB. The
routes are keyed on the path-id - set to a non-zero
value only if ADD-PATHS is being used; the color; and
the endpoint. The colour and endpoint are extracted from
the NLRI.
    """
    return self.__route
      
  def _set_route(self, v, load=False):
    """
    Setter method for route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route() directly.

    YANG Description: The routes within the SR-TE Policy SAFI Adj-RIB. The
routes are keyed on the path-id - set to a non-zero
value only if ADD-PATHS is being used; the color; and
the endpoint. The colour and endpoint are extracted from
the NLRI.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("path_id endpoint color",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-id endpoint color', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("path_id endpoint color",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-id endpoint color', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route(self):
    self.__route = YANGDynClass(base=YANGListType("path_id endpoint color",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-id endpoint color', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  route = __builtin__.property(_get_route)


  _pyangbind_elements = OrderedDict([('route', route), ])


class yc_adj_rib_out_post_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_post(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-srte-policy/neighbors/neighbor/adj-rib-out-post. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The Adj-RIB-Out for the SR-TE Policy SAFI for the neighbour,
follow any outbound policy constraints or modifications being
made.
  """
  __slots__ = ('_path_helper', '_extmethods', '__routes',)

  _yang_name = 'adj-rib-out-post'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_post_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-srte-policy', 'neighbors', 'neighbor', 'adj-rib-out-post']

  def _get_routes(self):
    """
    Getter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes (container)

    YANG Description: Surrounding container for the list of routes within the
SR-TE Policy SAFI.
    """
    return self.__routes
      
  def _set_routes(self, v, load=False):
    """
    Setter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post/routes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_routes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_routes() directly.

    YANG Description: Surrounding container for the list of routes within the
SR-TE Policy SAFI.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_post_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """routes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_post_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__routes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_routes(self):
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_post_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  routes = __builtin__.property(_get_routes)


  _pyangbind_elements = OrderedDict([('routes', routes), ])


class yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-srte-policy/neighbors/neighbor. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: An individual neighbour that is enabled for the SR-TE
Policy SAFI.
  """
  __slots__ = ('_path_helper', '_extmethods', '__neighbor_address','__state','__adj_rib_in_pre','__adj_rib_in_post','__adj_rib_out_pre','__adj_rib_out_post',)

  _yang_name = 'neighbor'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__neighbor_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__adj_rib_in_pre = YANGDynClass(base=yc_adj_rib_in_pre_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_pre, is_container='container', yang_name="adj-rib-in-pre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__adj_rib_in_post = YANGDynClass(base=yc_adj_rib_in_post_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_post, is_container='container', yang_name="adj-rib-in-post", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__adj_rib_out_pre = YANGDynClass(base=yc_adj_rib_out_pre_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_pre, is_container='container', yang_name="adj-rib-out-pre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__adj_rib_out_post = YANGDynClass(base=yc_adj_rib_out_post_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_post, is_container='container', yang_name="adj-rib-out-post", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-srte-policy', 'neighbors', 'neighbor']

  def _get_neighbor_address(self):
    """
    Getter method for neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/neighbor_address (leafref)

    YANG Description: Reference to the address of the neighbour for which the
Adj-RIBs specified are maintained.
    """
    return self.__neighbor_address
      
  def _set_neighbor_address(self, v, load=False):
    """
    Setter method for neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/neighbor_address (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor_address() directly.

    YANG Description: Reference to the address of the neighbour for which the
Adj-RIBs specified are maintained.
    """
    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="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor_address must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__neighbor_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor_address(self):
    self.__neighbor_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/state (container)

    YANG Description: Operational state parameters of the BGP neighbour for
which the SR-TE Policy SAFI is enabled.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/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 of the BGP neighbour for
which the SR-TE Policy SAFI is enabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_adj_rib_in_pre(self):
    """
    Getter method for adj_rib_in_pre, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre (container)

    YANG Description: The Adj-RIB-In for the SR-TE Policy SAFI for the neighbour,
prior to any inbound policy constraints or modifications
having been applied.
    """
    return self.__adj_rib_in_pre
      
  def _set_adj_rib_in_pre(self, v, load=False):
    """
    Setter method for adj_rib_in_pre, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_pre (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adj_rib_in_pre is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adj_rib_in_pre() directly.

    YANG Description: The Adj-RIB-In for the SR-TE Policy SAFI for the neighbour,
prior to any inbound policy constraints or modifications
having been applied.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_adj_rib_in_pre_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_pre, is_container='container', yang_name="adj-rib-in-pre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adj_rib_in_pre must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_adj_rib_in_pre_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_pre, is_container='container', yang_name="adj-rib-in-pre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__adj_rib_in_pre = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adj_rib_in_pre(self):
    self.__adj_rib_in_pre = YANGDynClass(base=yc_adj_rib_in_pre_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_pre, is_container='container', yang_name="adj-rib-in-pre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_adj_rib_in_post(self):
    """
    Getter method for adj_rib_in_post, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post (container)

    YANG Description: The Adj-RIB-In for the SR-TE Policy SAFI for the neighbour,
following any inbound policy constraints or modifications
being made.
    """
    return self.__adj_rib_in_post
      
  def _set_adj_rib_in_post(self, v, load=False):
    """
    Setter method for adj_rib_in_post, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_in_post (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adj_rib_in_post is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adj_rib_in_post() directly.

    YANG Description: The Adj-RIB-In for the SR-TE Policy SAFI for the neighbour,
following any inbound policy constraints or modifications
being made.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_adj_rib_in_post_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_post, is_container='container', yang_name="adj-rib-in-post", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adj_rib_in_post must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_adj_rib_in_post_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_post, is_container='container', yang_name="adj-rib-in-post", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__adj_rib_in_post = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adj_rib_in_post(self):
    self.__adj_rib_in_post = YANGDynClass(base=yc_adj_rib_in_post_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_in_post, is_container='container', yang_name="adj-rib-in-post", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_adj_rib_out_pre(self):
    """
    Getter method for adj_rib_out_pre, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre (container)

    YANG Description: The Adj-RIB-Out for the SR-TE Policy SAFI for the neighbour,
prior to any outgoing policy modifications or constraints
having been applied.
    """
    return self.__adj_rib_out_pre
      
  def _set_adj_rib_out_pre(self, v, load=False):
    """
    Setter method for adj_rib_out_pre, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_pre (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adj_rib_out_pre is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adj_rib_out_pre() directly.

    YANG Description: The Adj-RIB-Out for the SR-TE Policy SAFI for the neighbour,
prior to any outgoing policy modifications or constraints
having been applied.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_adj_rib_out_pre_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_pre, is_container='container', yang_name="adj-rib-out-pre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adj_rib_out_pre must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_adj_rib_out_pre_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_pre, is_container='container', yang_name="adj-rib-out-pre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__adj_rib_out_pre = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adj_rib_out_pre(self):
    self.__adj_rib_out_pre = YANGDynClass(base=yc_adj_rib_out_pre_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_pre, is_container='container', yang_name="adj-rib-out-pre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_adj_rib_out_post(self):
    """
    Getter method for adj_rib_out_post, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post (container)

    YANG Description: The Adj-RIB-Out for the SR-TE Policy SAFI for the neighbour,
follow any outbound policy constraints or modifications being
made.
    """
    return self.__adj_rib_out_post
      
  def _set_adj_rib_out_post(self, v, load=False):
    """
    Setter method for adj_rib_out_post, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor/adj_rib_out_post (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adj_rib_out_post is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adj_rib_out_post() directly.

    YANG Description: The Adj-RIB-Out for the SR-TE Policy SAFI for the neighbour,
follow any outbound policy constraints or modifications being
made.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_adj_rib_out_post_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_post, is_container='container', yang_name="adj-rib-out-post", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adj_rib_out_post must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_adj_rib_out_post_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_post, is_container='container', yang_name="adj-rib-out-post", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__adj_rib_out_post = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adj_rib_out_post(self):
    self.__adj_rib_out_post = YANGDynClass(base=yc_adj_rib_out_post_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor_adj_rib_out_post, is_container='container', yang_name="adj-rib-out-post", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  neighbor_address = __builtin__.property(_get_neighbor_address)
  state = __builtin__.property(_get_state)
  adj_rib_in_pre = __builtin__.property(_get_adj_rib_in_pre)
  adj_rib_in_post = __builtin__.property(_get_adj_rib_in_post)
  adj_rib_out_pre = __builtin__.property(_get_adj_rib_out_pre)
  adj_rib_out_post = __builtin__.property(_get_adj_rib_out_post)


  _pyangbind_elements = OrderedDict([('neighbor_address', neighbor_address), ('state', state), ('adj_rib_in_pre', adj_rib_in_pre), ('adj_rib_in_post', adj_rib_in_post), ('adj_rib_out_pre', adj_rib_out_pre), ('adj_rib_out_post', adj_rib_out_post), ])


class yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-srte-policy/neighbors. 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 neighbours that are
enabled for the IPv4 and IPv6 AFI, SR-TE Policy SAFI address
family.
  """
  __slots__ = ('_path_helper', '_extmethods', '__neighbor',)

  _yang_name = 'neighbors'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__neighbor = YANGDynClass(base=YANGListType("neighbor_address",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='neighbor-address', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-srte-policy', 'neighbors']

  def _get_neighbor(self):
    """
    Getter method for neighbor, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor (list)

    YANG Description: An individual neighbour that is enabled for the SR-TE
Policy SAFI.
    """
    return self.__neighbor
      
  def _set_neighbor(self, v, load=False):
    """
    Setter method for neighbor, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors/neighbor (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor() directly.

    YANG Description: An individual neighbour that is enabled for the SR-TE
Policy SAFI.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("neighbor_address",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='neighbor-address', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("neighbor_address",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='neighbor-address', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__neighbor = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor(self):
    self.__neighbor = YANGDynClass(base=YANGListType("neighbor_address",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='neighbor-address', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  neighbor = __builtin__.property(_get_neighbor)


  _pyangbind_elements = OrderedDict([('neighbor', neighbor), ])


class yc_ipv4_srte_policy_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-srte-policy. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Routing tables for the IPv4 Unicast, SR-TE Policy SAFI.
  """
  __slots__ = ('_path_helper', '_extmethods', '__loc_rib','__neighbors',)

  _yang_name = 'ipv4-srte-policy'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__loc_rib = YANGDynClass(base=yc_loc_rib_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_loc_rib, is_container='container', yang_name="loc-rib", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__neighbors = YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv4-srte-policy']

  def _get_loc_rib(self):
    """
    Getter method for loc_rib, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib (container)

    YANG Description: The Loc-RIB for the SR-TE Policy SAFI for IPv4 or IPv6 Unicast
AFIs.
    """
    return self.__loc_rib
      
  def _set_loc_rib(self, v, load=False):
    """
    Setter method for loc_rib, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/loc_rib (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_loc_rib is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_loc_rib() directly.

    YANG Description: The Loc-RIB for the SR-TE Policy SAFI for IPv4 or IPv6 Unicast
AFIs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_loc_rib_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_loc_rib, is_container='container', yang_name="loc-rib", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """loc_rib must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_loc_rib_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_loc_rib, is_container='container', yang_name="loc-rib", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__loc_rib = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_loc_rib(self):
    self.__loc_rib = YANGDynClass(base=yc_loc_rib_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_loc_rib, is_container='container', yang_name="loc-rib", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_neighbors(self):
    """
    Getter method for neighbors, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors (container)

    YANG Description: Surrounding container for the list of neighbours that are
enabled for the IPv4 and IPv6 AFI, SR-TE Policy SAFI address
family.
    """
    return self.__neighbors
      
  def _set_neighbors(self, v, load=False):
    """
    Setter method for neighbors, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy/neighbors (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbors is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbors() directly.

    YANG Description: Surrounding container for the list of neighbours that are
enabled for the IPv4 and IPv6 AFI, SR-TE Policy SAFI address
family.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbors must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__neighbors = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbors(self):
    self.__neighbors = YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  loc_rib = __builtin__.property(_get_loc_rib)
  neighbors = __builtin__.property(_get_neighbors)


  _pyangbind_elements = OrderedDict([('loc_rib', loc_rib), ('neighbors', neighbors), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_loc_rib_routes_route_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-srte-policy/loc-rib/routes/route/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state attributes for each route within the
IPv4 or IPv6 Unicast SR-TE Policy SAFI.
  """
  __slots__ = ('_path_helper', '_extmethods', '__path_id','__endpoint','__color','__attr_index','__community_index','__ext_community_index','__last_modified','__valid_route','__invalid_reason',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__endpoint = 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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__color = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-srte-policy', 'loc-rib', 'routes', 'route', 'state']

  def _get_path_id(self):
    """
    Getter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/state/path_id (uint32)

    YANG Description: Identifier for the path when using BGP ADD-PATHS for the SR-TE
policy SAFI.
    """
    return self.__path_id
      
  def _set_path_id(self, v, load=False):
    """
    Setter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/state/path_id (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_id() directly.

    YANG Description: Identifier for the path when using BGP ADD-PATHS for the SR-TE
policy SAFI.
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_id 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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_id(self):
    self.__path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_endpoint(self):
    """
    Getter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/state/endpoint (oc-inet:ip-address)

    YANG Description: A unique identifier for the remote set of nodes. When the address
family is IPv4, the value is a 4-octet IPv4 address. When the
address family is IPv6, the value is a 16-octet IPv6 address.
    """
    return self.__endpoint
      
  def _set_endpoint(self, v, load=False):
    """
    Setter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/state/endpoint (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint() directly.

    YANG Description: A unique identifier for the remote set of nodes. When the address
family is IPv4, the value is a 4-octet IPv4 address. When the
address family is IPv6, the value is a 16-octet IPv6 address.
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """endpoint must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__endpoint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_endpoint(self):
    self.__endpoint = 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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_color(self):
    """
    Getter method for color, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/state/color (uint32)

    YANG Description: A 4-octet value identifying the policy. Combined with the endpoint
the endpoint and colour represent the unique policy.
    """
    return self.__color
      
  def _set_color(self, v, load=False):
    """
    Setter method for color, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/state/color (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_color is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_color() directly.

    YANG Description: A 4-octet value identifying the policy. Combined with the endpoint
the endpoint and colour represent the unique policy.
    """
    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="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """color 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="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__color = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_color(self):
    self.__color = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_attr_index(self):
    """
    Getter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/state/attr_index (leafref)

    YANG Description: Reference to the common attribute group for the
route
    """
    return self.__attr_index
      
  def _set_attr_index(self, v, load=False):
    """
    Setter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/state/attr_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_index() directly.

    YANG Description: Reference to the common attribute group for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_index(self):
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_community_index(self):
    """
    Getter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/state/community_index (leafref)

    YANG Description: Reference to the community attribute for the route
    """
    return self.__community_index
      
  def _set_community_index(self, v, load=False):
    """
    Setter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/state/community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_community_index() directly.

    YANG Description: Reference to the community attribute for the route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_community_index(self):
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_ext_community_index(self):
    """
    Getter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/state/ext_community_index (leafref)

    YANG Description: Reference to the extended community attribute for the
route
    """
    return self.__ext_community_index
      
  def _set_ext_community_index(self, v, load=False):
    """
    Setter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/state/ext_community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ext_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ext_community_index() directly.

    YANG Description: Reference to the extended community attribute for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ext_community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__ext_community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ext_community_index(self):
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_last_modified(self):
    """
    Getter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/state/last_modified (oc-types:timeticks64)

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    return self.__last_modified
      
  def _set_last_modified(self, v, load=False):
    """
    Setter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/state/last_modified (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_last_modified is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_last_modified() directly.

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    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="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """last_modified must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__last_modified = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_last_modified(self):
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_valid_route(self):
    """
    Getter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/state/valid_route (boolean)

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    return self.__valid_route
      
  def _set_valid_route(self, v, load=False):
    """
    Setter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/state/valid_route (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_valid_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_valid_route() directly.

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """valid_route must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__valid_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_valid_route(self):
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_invalid_reason(self):
    """
    Getter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/state/invalid_reason (identityref)

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    return self.__invalid_reason
      
  def _set_invalid_reason(self, v, load=False):
    """
    Setter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/state/invalid_reason (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_invalid_reason is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_invalid_reason() directly.

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    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={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """invalid_reason must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__invalid_reason = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_invalid_reason(self):
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  path_id = __builtin__.property(_get_path_id)
  endpoint = __builtin__.property(_get_endpoint)
  color = __builtin__.property(_get_color)
  attr_index = __builtin__.property(_get_attr_index)
  community_index = __builtin__.property(_get_community_index)
  ext_community_index = __builtin__.property(_get_ext_community_index)
  last_modified = __builtin__.property(_get_last_modified)
  valid_route = __builtin__.property(_get_valid_route)
  invalid_reason = __builtin__.property(_get_invalid_reason)


  _pyangbind_elements = OrderedDict([('path_id', path_id), ('endpoint', endpoint), ('color', color), ('attr_index', attr_index), ('community_index', community_index), ('ext_community_index', ext_community_index), ('last_modified', last_modified), ('valid_route', valid_route), ('invalid_reason', invalid_reason), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_loc_rib_routes_route_unknown_attributes_unknown_attribute_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-srte-policy/loc-rib/routes/route/unknown-attributes/unknown-attribute/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for unknown route attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__optional','__transitive','__partial','__extended','__attr_type','__attr_len','__attr_value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-srte-policy', 'loc-rib', 'routes', 'route', 'unknown-attributes', 'unknown-attribute', 'state']

  def _get_optional(self):
    """
    Getter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/optional (boolean)

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    return self.__optional
      
  def _set_optional(self, v, load=False):
    """
    Setter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/optional (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_optional is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_optional() directly.

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """optional must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__optional = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_optional(self):
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_transitive(self):
    """
    Getter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/transitive (boolean)

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    return self.__transitive
      
  def _set_transitive(self, v, load=False):
    """
    Setter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/transitive (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transitive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transitive() directly.

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transitive must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__transitive = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transitive(self):
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_partial(self):
    """
    Getter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/partial (boolean)

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    return self.__partial
      
  def _set_partial(self, v, load=False):
    """
    Setter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/partial (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_partial is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_partial() directly.

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """partial must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__partial = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_partial(self):
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_extended(self):
    """
    Getter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/extended (boolean)

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    return self.__extended
      
  def _set_extended(self, v, load=False):
    """
    Setter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/extended (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended() directly.

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__extended = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended(self):
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/attr_type (uint8)

    YANG Description: 1-octet value encoding the attribute type code
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/attr_type (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() directly.

    YANG Description: 1-octet value encoding the attribute type code
    """
    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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_attr_len(self):
    """
    Getter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/attr_len (uint16)

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    return self.__attr_len
      
  def _set_attr_len(self, v, load=False):
    """
    Setter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/attr_len (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_len() directly.

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_len 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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__attr_len = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_len(self):
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_attr_value(self):
    """
    Getter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/attr_value (binary)

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    return self.__attr_value
      
  def _set_attr_value(self, v, load=False):
    """
    Setter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/unknown_attributes/unknown_attribute/state/attr_value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_value() directly.

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__attr_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_value(self):
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  optional = __builtin__.property(_get_optional)
  transitive = __builtin__.property(_get_transitive)
  partial = __builtin__.property(_get_partial)
  extended = __builtin__.property(_get_extended)
  attr_type = __builtin__.property(_get_attr_type)
  attr_len = __builtin__.property(_get_attr_len)
  attr_value = __builtin__.property(_get_attr_value)


  _pyangbind_elements = OrderedDict([('optional', optional), ('transitive', transitive), ('partial', partial), ('extended', extended), ('attr_type', attr_type), ('attr_len', attr_len), ('attr_value', attr_value), ])


class yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_loc_rib_routes_route_unknown_attributes_unknown_attribute(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-srte-policy/loc-rib/routes/route/unknown-attributes/unknown-attribute. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
  """
  __slots__ = ('_path_helper', '_extmethods', '__attr_type','__state',)

  _yang_name = 'unknown-attribute'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_loc_rib_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-srte-policy', 'loc-rib', 'routes', 'route', 'unknown-attributes', 'unknown-attribute']

  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/unknown_attributes/unknown_attribute/attr_type (leafref)

    YANG Description: Reference to the list key
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/unknown_attributes/unknown_attribute/attr_type (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/unknown_attributes/unknown_attribute/state (container)

    YANG Description: Operational state for unknown route attributes
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/unknown_attributes/unknown_attribute/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 unknown route attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_loc_rib_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_loc_rib_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_loc_rib_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  attr_type = __builtin__.property(_get_attr_type)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('attr_type', attr_type), ('state', state), ])


class yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_loc_rib_routes_route_unknown_attributes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-srte-policy/loc-rib/routes/route/unknown-attributes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
  """
  __slots__ = ('_path_helper', '_extmethods', '__unknown_attribute',)

  _yang_name = 'unknown-attributes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_loc_rib_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-srte-policy', 'loc-rib', 'routes', 'route', 'unknown-attributes']

  def _get_unknown_attribute(self):
    """
    Getter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/unknown_attributes/unknown_attribute (list)

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    return self.__unknown_attribute
      
  def _set_unknown_attribute(self, v, load=False):
    """
    Setter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/unknown_attributes/unknown_attribute (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attribute is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attribute() directly.

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_loc_rib_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attribute must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_loc_rib_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__unknown_attribute = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attribute(self):
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_loc_rib_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  unknown_attribute = __builtin__.property(_get_unknown_attribute)


  _pyangbind_elements = OrderedDict([('unknown_attribute', unknown_attribute), ])


class yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_loc_rib_routes_route(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-srte-policy/loc-rib/routes/route. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Route within the specified address family for the SR-TE
Policy SAFI.
  """
  __slots__ = ('_path_helper', '_extmethods', '__path_id','__endpoint','__color','__state','__unknown_attributes',)

  _yang_name = 'route'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__endpoint = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__color = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_loc_rib_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_loc_rib_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-srte-policy', 'loc-rib', 'routes', 'route']

  def _get_path_id(self):
    """
    Getter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/path_id (leafref)

    YANG Description: Reference to the path identifier for the SR-TE Policy SAFI
route. The value is only non-zero if ADD-PATHS is not being
used.
    """
    return self.__path_id
      
  def _set_path_id(self, v, load=False):
    """
    Setter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/path_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_id() directly.

    YANG Description: Reference to the path identifier for the SR-TE Policy SAFI
route. The value is only non-zero if ADD-PATHS is not being
used.
    """
    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="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_id(self):
    self.__path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_endpoint(self):
    """
    Getter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/endpoint (leafref)

    YANG Description: Reference to the endpoint used for the SR-TE Policy SAFI
route within the NLRI.
    """
    return self.__endpoint
      
  def _set_endpoint(self, v, load=False):
    """
    Setter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/endpoint (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint() directly.

    YANG Description: Reference to the endpoint used for the SR-TE Policy SAFI
route within the NLRI.
    """
    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="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """endpoint must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__endpoint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_endpoint(self):
    self.__endpoint = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_color(self):
    """
    Getter method for color, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/color (leafref)

    YANG Description: Reference to the colour used for the SR-TE policy SAFI
route within the NLRI.
    """
    return self.__color
      
  def _set_color(self, v, load=False):
    """
    Setter method for color, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/color (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_color is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_color() directly.

    YANG Description: Reference to the colour used for the SR-TE policy SAFI
route within the NLRI.
    """
    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="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """color must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__color = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_color(self):
    self.__color = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/state (container)

    YANG Description: Operational state attributes for each route within the
IPv4 or IPv6 Unicast SR-TE Policy SAFI.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/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 attributes for each route within the
IPv4 or IPv6 Unicast SR-TE Policy SAFI.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_loc_rib_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_loc_rib_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_loc_rib_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unknown_attributes(self):
    """
    Getter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/unknown_attributes (container)

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    return self.__unknown_attributes
      
  def _set_unknown_attributes(self, v, load=False):
    """
    Setter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route/unknown_attributes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attributes() directly.

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_loc_rib_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attributes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_loc_rib_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unknown_attributes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attributes(self):
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_loc_rib_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  path_id = __builtin__.property(_get_path_id)
  endpoint = __builtin__.property(_get_endpoint)
  color = __builtin__.property(_get_color)
  state = __builtin__.property(_get_state)
  unknown_attributes = __builtin__.property(_get_unknown_attributes)


  _pyangbind_elements = OrderedDict([('path_id', path_id), ('endpoint', endpoint), ('color', color), ('state', state), ('unknown_attributes', unknown_attributes), ])


class yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_loc_rib_routes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-srte-policy/loc-rib/routes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of routes within the SR-TE Policy SAFI, for the IPv4 or
IPv6 AFI.
  """
  __slots__ = ('_path_helper', '_extmethods', '__route',)

  _yang_name = 'routes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__route = YANGDynClass(base=YANGListType("path_id endpoint color",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_loc_rib_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-id endpoint color', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-srte-policy', 'loc-rib', 'routes']

  def _get_route(self):
    """
    Getter method for route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route (list)

    YANG Description: Route within the specified address family for the SR-TE
Policy SAFI.
    """
    return self.__route
      
  def _set_route(self, v, load=False):
    """
    Setter method for route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes/route (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route() directly.

    YANG Description: Route within the specified address family for the SR-TE
Policy SAFI.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("path_id endpoint color",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_loc_rib_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-id endpoint color', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("path_id endpoint color",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_loc_rib_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-id endpoint color', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route(self):
    self.__route = YANGDynClass(base=YANGListType("path_id endpoint color",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_loc_rib_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-id endpoint color', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  route = __builtin__.property(_get_route)


  _pyangbind_elements = OrderedDict([('route', route), ])


class yc_loc_rib_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_loc_rib(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-srte-policy/loc-rib. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The Loc-RIB for the SR-TE Policy SAFI for IPv4 or IPv6 Unicast
AFIs.
  """
  __slots__ = ('_path_helper', '_extmethods', '__routes',)

  _yang_name = 'loc-rib'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_loc_rib_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-srte-policy', 'loc-rib']

  def _get_routes(self):
    """
    Getter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes (container)

    YANG Description: List of routes within the SR-TE Policy SAFI, for the IPv4 or
IPv6 AFI.
    """
    return self.__routes
      
  def _set_routes(self, v, load=False):
    """
    Setter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib/routes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_routes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_routes() directly.

    YANG Description: List of routes within the SR-TE Policy SAFI, for the IPv4 or
IPv6 AFI.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_loc_rib_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """routes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_loc_rib_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__routes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_routes(self):
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_loc_rib_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  routes = __builtin__.property(_get_routes)


  _pyangbind_elements = OrderedDict([('routes', routes), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-srte-policy/neighbors/neighbor/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters of the BGP neighbour for
which the SR-TE Policy SAFI is enabled.
  """
  __slots__ = ('_path_helper', '_extmethods', '__neighbor_address',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__neighbor_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}'}),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}|:))'}),], is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-srte-policy', 'neighbors', 'neighbor', 'state']

  def _get_neighbor_address(self):
    """
    Getter method for neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/state/neighbor_address (oc-inet:ip-address)

    YANG Description: The address of the neighbour for which the SR-TE policy
SAFI has been negotiated.
    """
    return self.__neighbor_address
      
  def _set_neighbor_address(self, v, load=False):
    """
    Setter method for neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/state/neighbor_address (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor_address() directly.

    YANG Description: The address of the neighbour for which the SR-TE policy
SAFI has been negotiated.
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor_address must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__neighbor_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor_address(self):
    self.__neighbor_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}'}),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}|:))'}),], is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)

  neighbor_address = __builtin__.property(_get_neighbor_address)


  _pyangbind_elements = OrderedDict([('neighbor_address', neighbor_address), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-srte-policy/neighbors/neighbor/adj-rib-in-pre/routes/route/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters for entries within the Adj-RIB used
to store SR-TE Policy SAFI routes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__path_id','__endpoint','__color','__attr_index','__community_index','__ext_community_index','__last_modified','__valid_route','__invalid_reason',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__endpoint = 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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__color = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-srte-policy', 'neighbors', 'neighbor', 'adj-rib-in-pre', 'routes', 'route', 'state']

  def _get_path_id(self):
    """
    Getter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/state/path_id (uint32)

    YANG Description: Identifier for the path when using BGP ADD-PATHS for the SR-TE
policy SAFI.
    """
    return self.__path_id
      
  def _set_path_id(self, v, load=False):
    """
    Setter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/state/path_id (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_id() directly.

    YANG Description: Identifier for the path when using BGP ADD-PATHS for the SR-TE
policy SAFI.
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_id 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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_id(self):
    self.__path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_endpoint(self):
    """
    Getter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/state/endpoint (oc-inet:ip-address)

    YANG Description: A unique identifier for the remote set of nodes. When the address
family is IPv4, the value is a 4-octet IPv4 address. When the
address family is IPv6, the value is a 16-octet IPv6 address.
    """
    return self.__endpoint
      
  def _set_endpoint(self, v, load=False):
    """
    Setter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/state/endpoint (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint() directly.

    YANG Description: A unique identifier for the remote set of nodes. When the address
family is IPv4, the value is a 4-octet IPv4 address. When the
address family is IPv6, the value is a 16-octet IPv6 address.
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """endpoint must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__endpoint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_endpoint(self):
    self.__endpoint = 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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_color(self):
    """
    Getter method for color, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/state/color (uint32)

    YANG Description: A 4-octet value identifying the policy. Combined with the endpoint
the endpoint and colour represent the unique policy.
    """
    return self.__color
      
  def _set_color(self, v, load=False):
    """
    Setter method for color, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/state/color (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_color is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_color() directly.

    YANG Description: A 4-octet value identifying the policy. Combined with the endpoint
the endpoint and colour represent the unique policy.
    """
    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="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """color 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="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__color = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_color(self):
    self.__color = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_attr_index(self):
    """
    Getter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/state/attr_index (leafref)

    YANG Description: Reference to the common attribute group for the
route
    """
    return self.__attr_index
      
  def _set_attr_index(self, v, load=False):
    """
    Setter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/state/attr_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_index() directly.

    YANG Description: Reference to the common attribute group for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_index(self):
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_community_index(self):
    """
    Getter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/state/community_index (leafref)

    YANG Description: Reference to the community attribute for the route
    """
    return self.__community_index
      
  def _set_community_index(self, v, load=False):
    """
    Setter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/state/community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_community_index() directly.

    YANG Description: Reference to the community attribute for the route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_community_index(self):
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_ext_community_index(self):
    """
    Getter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/state/ext_community_index (leafref)

    YANG Description: Reference to the extended community attribute for the
route
    """
    return self.__ext_community_index
      
  def _set_ext_community_index(self, v, load=False):
    """
    Setter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/state/ext_community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ext_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ext_community_index() directly.

    YANG Description: Reference to the extended community attribute for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ext_community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__ext_community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ext_community_index(self):
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_last_modified(self):
    """
    Getter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/state/last_modified (oc-types:timeticks64)

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    return self.__last_modified
      
  def _set_last_modified(self, v, load=False):
    """
    Setter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/state/last_modified (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_last_modified is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_last_modified() directly.

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    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="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """last_modified must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__last_modified = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_last_modified(self):
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_valid_route(self):
    """
    Getter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/state/valid_route (boolean)

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    return self.__valid_route
      
  def _set_valid_route(self, v, load=False):
    """
    Setter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/state/valid_route (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_valid_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_valid_route() directly.

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """valid_route must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__valid_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_valid_route(self):
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_invalid_reason(self):
    """
    Getter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/state/invalid_reason (identityref)

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    return self.__invalid_reason
      
  def _set_invalid_reason(self, v, load=False):
    """
    Setter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/state/invalid_reason (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_invalid_reason is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_invalid_reason() directly.

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    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={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """invalid_reason must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__invalid_reason = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_invalid_reason(self):
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  path_id = __builtin__.property(_get_path_id)
  endpoint = __builtin__.property(_get_endpoint)
  color = __builtin__.property(_get_color)
  attr_index = __builtin__.property(_get_attr_index)
  community_index = __builtin__.property(_get_community_index)
  ext_community_index = __builtin__.property(_get_ext_community_index)
  last_modified = __builtin__.property(_get_last_modified)
  valid_route = __builtin__.property(_get_valid_route)
  invalid_reason = __builtin__.property(_get_invalid_reason)


  _pyangbind_elements = OrderedDict([('path_id', path_id), ('endpoint', endpoint), ('color', color), ('attr_index', attr_index), ('community_index', community_index), ('ext_community_index', ext_community_index), ('last_modified', last_modified), ('valid_route', valid_route), ('invalid_reason', invalid_reason), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes_unknown_attribute_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-srte-policy/neighbors/neighbor/adj-rib-in-pre/routes/route/unknown-attributes/unknown-attribute/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for unknown route attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__optional','__transitive','__partial','__extended','__attr_type','__attr_len','__attr_value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-srte-policy', 'neighbors', 'neighbor', 'adj-rib-in-pre', 'routes', 'route', 'unknown-attributes', 'unknown-attribute', 'state']

  def _get_optional(self):
    """
    Getter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/optional (boolean)

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    return self.__optional
      
  def _set_optional(self, v, load=False):
    """
    Setter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/optional (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_optional is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_optional() directly.

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """optional must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__optional = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_optional(self):
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_transitive(self):
    """
    Getter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/transitive (boolean)

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    return self.__transitive
      
  def _set_transitive(self, v, load=False):
    """
    Setter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/transitive (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transitive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transitive() directly.

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transitive must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__transitive = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transitive(self):
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_partial(self):
    """
    Getter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/partial (boolean)

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    return self.__partial
      
  def _set_partial(self, v, load=False):
    """
    Setter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/partial (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_partial is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_partial() directly.

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """partial must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__partial = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_partial(self):
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_extended(self):
    """
    Getter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/extended (boolean)

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    return self.__extended
      
  def _set_extended(self, v, load=False):
    """
    Setter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/extended (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended() directly.

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__extended = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended(self):
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_type (uint8)

    YANG Description: 1-octet value encoding the attribute type code
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_type (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() directly.

    YANG Description: 1-octet value encoding the attribute type code
    """
    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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_attr_len(self):
    """
    Getter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_len (uint16)

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    return self.__attr_len
      
  def _set_attr_len(self, v, load=False):
    """
    Setter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_len (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_len() directly.

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_len 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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__attr_len = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_len(self):
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_attr_value(self):
    """
    Getter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_value (binary)

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    return self.__attr_value
      
  def _set_attr_value(self, v, load=False):
    """
    Setter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_value() directly.

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__attr_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_value(self):
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  optional = __builtin__.property(_get_optional)
  transitive = __builtin__.property(_get_transitive)
  partial = __builtin__.property(_get_partial)
  extended = __builtin__.property(_get_extended)
  attr_type = __builtin__.property(_get_attr_type)
  attr_len = __builtin__.property(_get_attr_len)
  attr_value = __builtin__.property(_get_attr_value)


  _pyangbind_elements = OrderedDict([('optional', optional), ('transitive', transitive), ('partial', partial), ('extended', extended), ('attr_type', attr_type), ('attr_len', attr_len), ('attr_value', attr_value), ])


class yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes_unknown_attribute(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-srte-policy/neighbors/neighbor/adj-rib-in-pre/routes/route/unknown-attributes/unknown-attribute. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
  """
  __slots__ = ('_path_helper', '_extmethods', '__attr_type','__state',)

  _yang_name = 'unknown-attribute'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-srte-policy', 'neighbors', 'neighbor', 'adj-rib-in-pre', 'routes', 'route', 'unknown-attributes', 'unknown-attribute']

  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/attr_type (leafref)

    YANG Description: Reference to the list key
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/attr_type (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/state (container)

    YANG Description: Operational state for unknown route attributes
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute/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 unknown route attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  attr_type = __builtin__.property(_get_attr_type)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('attr_type', attr_type), ('state', state), ])


class yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-srte-policy/neighbors/neighbor/adj-rib-in-pre/routes/route/unknown-attributes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
  """
  __slots__ = ('_path_helper', '_extmethods', '__unknown_attribute',)

  _yang_name = 'unknown-attributes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-srte-policy', 'neighbors', 'neighbor', 'adj-rib-in-pre', 'routes', 'route', 'unknown-attributes']

  def _get_unknown_attribute(self):
    """
    Getter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute (list)

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    return self.__unknown_attribute
      
  def _set_unknown_attribute(self, v, load=False):
    """
    Setter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes/unknown_attribute (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attribute is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attribute() directly.

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attribute must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__unknown_attribute = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attribute(self):
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  unknown_attribute = __builtin__.property(_get_unknown_attribute)


  _pyangbind_elements = OrderedDict([('unknown_attribute', unknown_attribute), ])


class yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-srte-policy/neighbors/neighbor/adj-rib-in-pre/routes/route. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The routes within the SR-TE Policy SAFI Adj-RIB. The
routes are keyed on the path-id - set to a non-zero
value only if ADD-PATHS is being used; the color; and
the endpoint. The colour and endpoint are extracted from
the NLRI.
  """
  __slots__ = ('_path_helper', '_extmethods', '__path_id','__endpoint','__color','__state','__unknown_attributes',)

  _yang_name = 'route'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__endpoint = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__color = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-srte-policy', 'neighbors', 'neighbor', 'adj-rib-in-pre', 'routes', 'route']

  def _get_path_id(self):
    """
    Getter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/path_id (leafref)

    YANG Description: Reference to the path identifier for the SR-TE Policy SAFI
route. The value is only non-zero if ADD-PATHS is not being
used.
    """
    return self.__path_id
      
  def _set_path_id(self, v, load=False):
    """
    Setter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/path_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_id() directly.

    YANG Description: Reference to the path identifier for the SR-TE Policy SAFI
route. The value is only non-zero if ADD-PATHS is not being
used.
    """
    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="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_id(self):
    self.__path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_endpoint(self):
    """
    Getter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/endpoint (leafref)

    YANG Description: Reference to the endpoint used for the SR-TE Policy SAFI
route within the NLRI.
    """
    return self.__endpoint
      
  def _set_endpoint(self, v, load=False):
    """
    Setter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/endpoint (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint() directly.

    YANG Description: Reference to the endpoint used for the SR-TE Policy SAFI
route within the NLRI.
    """
    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="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """endpoint must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__endpoint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_endpoint(self):
    self.__endpoint = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_color(self):
    """
    Getter method for color, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/color (leafref)

    YANG Description: Reference to the colour used for the SR-TE policy SAFI
route within the NLRI.
    """
    return self.__color
      
  def _set_color(self, v, load=False):
    """
    Setter method for color, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/color (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_color is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_color() directly.

    YANG Description: Reference to the colour used for the SR-TE policy SAFI
route within the NLRI.
    """
    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="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """color must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__color = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_color(self):
    self.__color = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/state (container)

    YANG Description: State parameters for entries within the Adj-RIB used
to store SR-TE Policy SAFI routes.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/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 parameters for entries within the Adj-RIB used
to store SR-TE Policy SAFI routes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unknown_attributes(self):
    """
    Getter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes (container)

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    return self.__unknown_attributes
      
  def _set_unknown_attributes(self, v, load=False):
    """
    Setter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route/unknown_attributes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attributes() directly.

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attributes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unknown_attributes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attributes(self):
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  path_id = __builtin__.property(_get_path_id)
  endpoint = __builtin__.property(_get_endpoint)
  color = __builtin__.property(_get_color)
  state = __builtin__.property(_get_state)
  unknown_attributes = __builtin__.property(_get_unknown_attributes)


  _pyangbind_elements = OrderedDict([('path_id', path_id), ('endpoint', endpoint), ('color', color), ('state', state), ('unknown_attributes', unknown_attributes), ])


class yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-srte-policy/neighbors/neighbor/adj-rib-in-pre/routes. 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 routes within the
SR-TE Policy SAFI.
  """
  __slots__ = ('_path_helper', '_extmethods', '__route',)

  _yang_name = 'routes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__route = YANGDynClass(base=YANGListType("path_id endpoint color",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-id endpoint color', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-srte-policy', 'neighbors', 'neighbor', 'adj-rib-in-pre', 'routes']

  def _get_route(self):
    """
    Getter method for route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route (list)

    YANG Description: The routes within the SR-TE Policy SAFI Adj-RIB. The
routes are keyed on the path-id - set to a non-zero
value only if ADD-PATHS is being used; the color; and
the endpoint. The colour and endpoint are extracted from
the NLRI.
    """
    return self.__route
      
  def _set_route(self, v, load=False):
    """
    Setter method for route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes/route (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route() directly.

    YANG Description: The routes within the SR-TE Policy SAFI Adj-RIB. The
routes are keyed on the path-id - set to a non-zero
value only if ADD-PATHS is being used; the color; and
the endpoint. The colour and endpoint are extracted from
the NLRI.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("path_id endpoint color",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-id endpoint color', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("path_id endpoint color",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-id endpoint color', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route(self):
    self.__route = YANGDynClass(base=YANGListType("path_id endpoint color",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-id endpoint color', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  route = __builtin__.property(_get_route)


  _pyangbind_elements = OrderedDict([('route', route), ])


class yc_adj_rib_in_pre_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_pre(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-srte-policy/neighbors/neighbor/adj-rib-in-pre. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The Adj-RIB-In for the SR-TE Policy SAFI for the neighbour,
prior to any inbound policy constraints or modifications
having been applied.
  """
  __slots__ = ('_path_helper', '_extmethods', '__routes',)

  _yang_name = 'adj-rib-in-pre'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-srte-policy', 'neighbors', 'neighbor', 'adj-rib-in-pre']

  def _get_routes(self):
    """
    Getter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes (container)

    YANG Description: Surrounding container for the list of routes within the
SR-TE Policy SAFI.
    """
    return self.__routes
      
  def _set_routes(self, v, load=False):
    """
    Setter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre/routes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_routes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_routes() directly.

    YANG Description: Surrounding container for the list of routes within the
SR-TE Policy SAFI.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """routes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__routes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_routes(self):
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_pre_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  routes = __builtin__.property(_get_routes)


  _pyangbind_elements = OrderedDict([('routes', routes), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-srte-policy/neighbors/neighbor/adj-rib-in-post/routes/route/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state attributes related to the route within
the SR-TE Policy SAFI Adj-RIB-In-Post for the specified
neighbour.
  """
  __slots__ = ('_path_helper', '_extmethods', '__path_id','__endpoint','__color','__attr_index','__community_index','__ext_community_index','__last_modified','__valid_route','__invalid_reason','__best_path',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__endpoint = 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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__color = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__best_path = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="best-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-srte-policy', 'neighbors', 'neighbor', 'adj-rib-in-post', 'routes', 'route', 'state']

  def _get_path_id(self):
    """
    Getter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state/path_id (uint32)

    YANG Description: Identifier for the path when using BGP ADD-PATHS for the SR-TE
policy SAFI.
    """
    return self.__path_id
      
  def _set_path_id(self, v, load=False):
    """
    Setter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state/path_id (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_id() directly.

    YANG Description: Identifier for the path when using BGP ADD-PATHS for the SR-TE
policy SAFI.
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_id 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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_id(self):
    self.__path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_endpoint(self):
    """
    Getter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state/endpoint (oc-inet:ip-address)

    YANG Description: A unique identifier for the remote set of nodes. When the address
family is IPv4, the value is a 4-octet IPv4 address. When the
address family is IPv6, the value is a 16-octet IPv6 address.
    """
    return self.__endpoint
      
  def _set_endpoint(self, v, load=False):
    """
    Setter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state/endpoint (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint() directly.

    YANG Description: A unique identifier for the remote set of nodes. When the address
family is IPv4, the value is a 4-octet IPv4 address. When the
address family is IPv6, the value is a 16-octet IPv6 address.
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """endpoint must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__endpoint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_endpoint(self):
    self.__endpoint = 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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_color(self):
    """
    Getter method for color, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state/color (uint32)

    YANG Description: A 4-octet value identifying the policy. Combined with the endpoint
the endpoint and colour represent the unique policy.
    """
    return self.__color
      
  def _set_color(self, v, load=False):
    """
    Setter method for color, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state/color (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_color is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_color() directly.

    YANG Description: A 4-octet value identifying the policy. Combined with the endpoint
the endpoint and colour represent the unique policy.
    """
    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="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """color 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="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__color = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_color(self):
    self.__color = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_attr_index(self):
    """
    Getter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state/attr_index (leafref)

    YANG Description: Reference to the common attribute group for the
route
    """
    return self.__attr_index
      
  def _set_attr_index(self, v, load=False):
    """
    Setter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state/attr_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_index() directly.

    YANG Description: Reference to the common attribute group for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_index(self):
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_community_index(self):
    """
    Getter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state/community_index (leafref)

    YANG Description: Reference to the community attribute for the route
    """
    return self.__community_index
      
  def _set_community_index(self, v, load=False):
    """
    Setter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state/community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_community_index() directly.

    YANG Description: Reference to the community attribute for the route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_community_index(self):
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_ext_community_index(self):
    """
    Getter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state/ext_community_index (leafref)

    YANG Description: Reference to the extended community attribute for the
route
    """
    return self.__ext_community_index
      
  def _set_ext_community_index(self, v, load=False):
    """
    Setter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state/ext_community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ext_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ext_community_index() directly.

    YANG Description: Reference to the extended community attribute for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ext_community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__ext_community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ext_community_index(self):
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_last_modified(self):
    """
    Getter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state/last_modified (oc-types:timeticks64)

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    return self.__last_modified
      
  def _set_last_modified(self, v, load=False):
    """
    Setter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state/last_modified (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_last_modified is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_last_modified() directly.

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    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="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """last_modified must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__last_modified = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_last_modified(self):
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_valid_route(self):
    """
    Getter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state/valid_route (boolean)

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    return self.__valid_route
      
  def _set_valid_route(self, v, load=False):
    """
    Setter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state/valid_route (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_valid_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_valid_route() directly.

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """valid_route must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__valid_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_valid_route(self):
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_invalid_reason(self):
    """
    Getter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state/invalid_reason (identityref)

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    return self.__invalid_reason
      
  def _set_invalid_reason(self, v, load=False):
    """
    Setter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state/invalid_reason (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_invalid_reason is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_invalid_reason() directly.

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    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={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """invalid_reason must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__invalid_reason = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_invalid_reason(self):
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_best_path(self):
    """
    Getter method for best_path, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state/best_path (boolean)

    YANG Description: Current path was selected as the best path.
    """
    return self.__best_path
      
  def _set_best_path(self, v, load=False):
    """
    Setter method for best_path, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state/best_path (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_best_path is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_best_path() directly.

    YANG Description: Current path was selected as the best path.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="best-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """best_path must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="best-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__best_path = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_best_path(self):
    self.__best_path = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="best-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  path_id = __builtin__.property(_get_path_id)
  endpoint = __builtin__.property(_get_endpoint)
  color = __builtin__.property(_get_color)
  attr_index = __builtin__.property(_get_attr_index)
  community_index = __builtin__.property(_get_community_index)
  ext_community_index = __builtin__.property(_get_ext_community_index)
  last_modified = __builtin__.property(_get_last_modified)
  valid_route = __builtin__.property(_get_valid_route)
  invalid_reason = __builtin__.property(_get_invalid_reason)
  best_path = __builtin__.property(_get_best_path)


  _pyangbind_elements = OrderedDict([('path_id', path_id), ('endpoint', endpoint), ('color', color), ('attr_index', attr_index), ('community_index', community_index), ('ext_community_index', ext_community_index), ('last_modified', last_modified), ('valid_route', valid_route), ('invalid_reason', invalid_reason), ('best_path', best_path), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes_unknown_attribute_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-srte-policy/neighbors/neighbor/adj-rib-in-post/routes/route/unknown-attributes/unknown-attribute/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for unknown route attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__optional','__transitive','__partial','__extended','__attr_type','__attr_len','__attr_value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-srte-policy', 'neighbors', 'neighbor', 'adj-rib-in-post', 'routes', 'route', 'unknown-attributes', 'unknown-attribute', 'state']

  def _get_optional(self):
    """
    Getter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/optional (boolean)

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    return self.__optional
      
  def _set_optional(self, v, load=False):
    """
    Setter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/optional (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_optional is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_optional() directly.

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """optional must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__optional = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_optional(self):
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_transitive(self):
    """
    Getter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/transitive (boolean)

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    return self.__transitive
      
  def _set_transitive(self, v, load=False):
    """
    Setter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/transitive (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transitive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transitive() directly.

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transitive must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__transitive = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transitive(self):
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_partial(self):
    """
    Getter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/partial (boolean)

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    return self.__partial
      
  def _set_partial(self, v, load=False):
    """
    Setter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/partial (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_partial is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_partial() directly.

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """partial must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__partial = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_partial(self):
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_extended(self):
    """
    Getter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/extended (boolean)

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    return self.__extended
      
  def _set_extended(self, v, load=False):
    """
    Setter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/extended (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended() directly.

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__extended = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended(self):
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/attr_type (uint8)

    YANG Description: 1-octet value encoding the attribute type code
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/attr_type (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() directly.

    YANG Description: 1-octet value encoding the attribute type code
    """
    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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_attr_len(self):
    """
    Getter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/attr_len (uint16)

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    return self.__attr_len
      
  def _set_attr_len(self, v, load=False):
    """
    Setter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/attr_len (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_len() directly.

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_len 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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__attr_len = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_len(self):
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_attr_value(self):
    """
    Getter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/attr_value (binary)

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    return self.__attr_value
      
  def _set_attr_value(self, v, load=False):
    """
    Setter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state/attr_value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_value() directly.

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__attr_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_value(self):
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  optional = __builtin__.property(_get_optional)
  transitive = __builtin__.property(_get_transitive)
  partial = __builtin__.property(_get_partial)
  extended = __builtin__.property(_get_extended)
  attr_type = __builtin__.property(_get_attr_type)
  attr_len = __builtin__.property(_get_attr_len)
  attr_value = __builtin__.property(_get_attr_value)


  _pyangbind_elements = OrderedDict([('optional', optional), ('transitive', transitive), ('partial', partial), ('extended', extended), ('attr_type', attr_type), ('attr_len', attr_len), ('attr_value', attr_value), ])


class yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes_unknown_attribute(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-srte-policy/neighbors/neighbor/adj-rib-in-post/routes/route/unknown-attributes/unknown-attribute. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
  """
  __slots__ = ('_path_helper', '_extmethods', '__attr_type','__state',)

  _yang_name = 'unknown-attribute'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-srte-policy', 'neighbors', 'neighbor', 'adj-rib-in-post', 'routes', 'route', 'unknown-attributes', 'unknown-attribute']

  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/attr_type (leafref)

    YANG Description: Reference to the list key
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/attr_type (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/state (container)

    YANG Description: Operational state for unknown route attributes
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute/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 unknown route attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  attr_type = __builtin__.property(_get_attr_type)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('attr_type', attr_type), ('state', state), ])


class yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-srte-policy/neighbors/neighbor/adj-rib-in-post/routes/route/unknown-attributes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
  """
  __slots__ = ('_path_helper', '_extmethods', '__unknown_attribute',)

  _yang_name = 'unknown-attributes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-srte-policy', 'neighbors', 'neighbor', 'adj-rib-in-post', 'routes', 'route', 'unknown-attributes']

  def _get_unknown_attribute(self):
    """
    Getter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute (list)

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    return self.__unknown_attribute
      
  def _set_unknown_attribute(self, v, load=False):
    """
    Setter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes/unknown_attribute (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attribute is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attribute() directly.

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attribute must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__unknown_attribute = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attribute(self):
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  unknown_attribute = __builtin__.property(_get_unknown_attribute)


  _pyangbind_elements = OrderedDict([('unknown_attribute', unknown_attribute), ])


class yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-srte-policy/neighbors/neighbor/adj-rib-in-post/routes/route. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The routes that are in the Adj-RIB-In-Post for the specified
BGP neighbour within the SR-TE Policy SAFI for the specified
address family.
  """
  __slots__ = ('_path_helper', '_extmethods', '__path_id','__endpoint','__color','__state','__unknown_attributes',)

  _yang_name = 'route'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__endpoint = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__color = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-srte-policy', 'neighbors', 'neighbor', 'adj-rib-in-post', 'routes', 'route']

  def _get_path_id(self):
    """
    Getter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/path_id (leafref)

    YANG Description: Reference to the path identifier for the SR-TE Policy SAFI
route. The value is only non-zero if ADD-PATHS is not being
used.
    """
    return self.__path_id
      
  def _set_path_id(self, v, load=False):
    """
    Setter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/path_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_id() directly.

    YANG Description: Reference to the path identifier for the SR-TE Policy SAFI
route. The value is only non-zero if ADD-PATHS is not being
used.
    """
    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="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_id(self):
    self.__path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_endpoint(self):
    """
    Getter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/endpoint (leafref)

    YANG Description: Reference to the endpoint used for the SR-TE Policy SAFI
route within the NLRI.
    """
    return self.__endpoint
      
  def _set_endpoint(self, v, load=False):
    """
    Setter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/endpoint (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint() directly.

    YANG Description: Reference to the endpoint used for the SR-TE Policy SAFI
route within the NLRI.
    """
    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="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """endpoint must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__endpoint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_endpoint(self):
    self.__endpoint = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_color(self):
    """
    Getter method for color, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/color (leafref)

    YANG Description: Reference to the colour used for the SR-TE policy SAFI
route within the NLRI.
    """
    return self.__color
      
  def _set_color(self, v, load=False):
    """
    Setter method for color, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/color (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_color is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_color() directly.

    YANG Description: Reference to the colour used for the SR-TE policy SAFI
route within the NLRI.
    """
    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="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """color must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__color = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_color(self):
    self.__color = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/state (container)

    YANG Description: Operational state attributes related to the route within
the SR-TE Policy SAFI Adj-RIB-In-Post for the specified
neighbour.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/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 attributes related to the route within
the SR-TE Policy SAFI Adj-RIB-In-Post for the specified
neighbour.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unknown_attributes(self):
    """
    Getter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes (container)

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    return self.__unknown_attributes
      
  def _set_unknown_attributes(self, v, load=False):
    """
    Setter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route/unknown_attributes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attributes() directly.

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attributes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unknown_attributes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attributes(self):
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  path_id = __builtin__.property(_get_path_id)
  endpoint = __builtin__.property(_get_endpoint)
  color = __builtin__.property(_get_color)
  state = __builtin__.property(_get_state)
  unknown_attributes = __builtin__.property(_get_unknown_attributes)


  _pyangbind_elements = OrderedDict([('path_id', path_id), ('endpoint', endpoint), ('color', color), ('state', state), ('unknown_attributes', unknown_attributes), ])


class yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_post_routes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-srte-policy/neighbors/neighbor/adj-rib-in-post/routes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The set of routes that are within the Adj-RIB-Out for the
neighbour.
  """
  __slots__ = ('_path_helper', '_extmethods', '__route',)

  _yang_name = 'routes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__route = YANGDynClass(base=YANGListType("path_id endpoint color",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-id endpoint color', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-srte-policy', 'neighbors', 'neighbor', 'adj-rib-in-post', 'routes']

  def _get_route(self):
    """
    Getter method for route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route (list)

    YANG Description: The routes that are in the Adj-RIB-In-Post for the specified
BGP neighbour within the SR-TE Policy SAFI for the specified
address family.
    """
    return self.__route
      
  def _set_route(self, v, load=False):
    """
    Setter method for route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes/route (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route() directly.

    YANG Description: The routes that are in the Adj-RIB-In-Post for the specified
BGP neighbour within the SR-TE Policy SAFI for the specified
address family.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("path_id endpoint color",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-id endpoint color', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("path_id endpoint color",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-id endpoint color', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route(self):
    self.__route = YANGDynClass(base=YANGListType("path_id endpoint color",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_post_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-id endpoint color', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  route = __builtin__.property(_get_route)


  _pyangbind_elements = OrderedDict([('route', route), ])


class yc_adj_rib_in_post_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_post(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-srte-policy/neighbors/neighbor/adj-rib-in-post. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The Adj-RIB-In for the SR-TE Policy SAFI for the neighbour,
following any inbound policy constraints or modifications
being made.
  """
  __slots__ = ('_path_helper', '_extmethods', '__routes',)

  _yang_name = 'adj-rib-in-post'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_post_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-srte-policy', 'neighbors', 'neighbor', 'adj-rib-in-post']

  def _get_routes(self):
    """
    Getter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes (container)

    YANG Description: The set of routes that are within the Adj-RIB-Out for the
neighbour.
    """
    return self.__routes
      
  def _set_routes(self, v, load=False):
    """
    Setter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post/routes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_routes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_routes() directly.

    YANG Description: The set of routes that are within the Adj-RIB-Out for the
neighbour.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_post_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """routes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_post_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__routes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_routes(self):
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_post_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  routes = __builtin__.property(_get_routes)


  _pyangbind_elements = OrderedDict([('routes', routes), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-srte-policy/neighbors/neighbor/adj-rib-out-pre/routes/route/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters for entries within the Adj-RIB used
to store SR-TE Policy SAFI routes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__path_id','__endpoint','__color','__attr_index','__community_index','__ext_community_index','__last_modified','__valid_route','__invalid_reason',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__endpoint = 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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__color = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-srte-policy', 'neighbors', 'neighbor', 'adj-rib-out-pre', 'routes', 'route', 'state']

  def _get_path_id(self):
    """
    Getter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/state/path_id (uint32)

    YANG Description: Identifier for the path when using BGP ADD-PATHS for the SR-TE
policy SAFI.
    """
    return self.__path_id
      
  def _set_path_id(self, v, load=False):
    """
    Setter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/state/path_id (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_id() directly.

    YANG Description: Identifier for the path when using BGP ADD-PATHS for the SR-TE
policy SAFI.
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_id 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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_id(self):
    self.__path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_endpoint(self):
    """
    Getter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/state/endpoint (oc-inet:ip-address)

    YANG Description: A unique identifier for the remote set of nodes. When the address
family is IPv4, the value is a 4-octet IPv4 address. When the
address family is IPv6, the value is a 16-octet IPv6 address.
    """
    return self.__endpoint
      
  def _set_endpoint(self, v, load=False):
    """
    Setter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/state/endpoint (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint() directly.

    YANG Description: A unique identifier for the remote set of nodes. When the address
family is IPv4, the value is a 4-octet IPv4 address. When the
address family is IPv6, the value is a 16-octet IPv6 address.
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """endpoint must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__endpoint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_endpoint(self):
    self.__endpoint = 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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_color(self):
    """
    Getter method for color, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/state/color (uint32)

    YANG Description: A 4-octet value identifying the policy. Combined with the endpoint
the endpoint and colour represent the unique policy.
    """
    return self.__color
      
  def _set_color(self, v, load=False):
    """
    Setter method for color, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/state/color (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_color is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_color() directly.

    YANG Description: A 4-octet value identifying the policy. Combined with the endpoint
the endpoint and colour represent the unique policy.
    """
    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="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """color 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="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__color = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_color(self):
    self.__color = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_attr_index(self):
    """
    Getter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/state/attr_index (leafref)

    YANG Description: Reference to the common attribute group for the
route
    """
    return self.__attr_index
      
  def _set_attr_index(self, v, load=False):
    """
    Setter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/state/attr_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_index() directly.

    YANG Description: Reference to the common attribute group for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_index(self):
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_community_index(self):
    """
    Getter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/state/community_index (leafref)

    YANG Description: Reference to the community attribute for the route
    """
    return self.__community_index
      
  def _set_community_index(self, v, load=False):
    """
    Setter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/state/community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_community_index() directly.

    YANG Description: Reference to the community attribute for the route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_community_index(self):
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_ext_community_index(self):
    """
    Getter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/state/ext_community_index (leafref)

    YANG Description: Reference to the extended community attribute for the
route
    """
    return self.__ext_community_index
      
  def _set_ext_community_index(self, v, load=False):
    """
    Setter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/state/ext_community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ext_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ext_community_index() directly.

    YANG Description: Reference to the extended community attribute for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ext_community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__ext_community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ext_community_index(self):
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_last_modified(self):
    """
    Getter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/state/last_modified (oc-types:timeticks64)

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    return self.__last_modified
      
  def _set_last_modified(self, v, load=False):
    """
    Setter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/state/last_modified (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_last_modified is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_last_modified() directly.

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    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="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """last_modified must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__last_modified = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_last_modified(self):
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_valid_route(self):
    """
    Getter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/state/valid_route (boolean)

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    return self.__valid_route
      
  def _set_valid_route(self, v, load=False):
    """
    Setter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/state/valid_route (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_valid_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_valid_route() directly.

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """valid_route must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__valid_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_valid_route(self):
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_invalid_reason(self):
    """
    Getter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/state/invalid_reason (identityref)

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    return self.__invalid_reason
      
  def _set_invalid_reason(self, v, load=False):
    """
    Setter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/state/invalid_reason (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_invalid_reason is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_invalid_reason() directly.

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    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={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """invalid_reason must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__invalid_reason = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_invalid_reason(self):
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  path_id = __builtin__.property(_get_path_id)
  endpoint = __builtin__.property(_get_endpoint)
  color = __builtin__.property(_get_color)
  attr_index = __builtin__.property(_get_attr_index)
  community_index = __builtin__.property(_get_community_index)
  ext_community_index = __builtin__.property(_get_ext_community_index)
  last_modified = __builtin__.property(_get_last_modified)
  valid_route = __builtin__.property(_get_valid_route)
  invalid_reason = __builtin__.property(_get_invalid_reason)


  _pyangbind_elements = OrderedDict([('path_id', path_id), ('endpoint', endpoint), ('color', color), ('attr_index', attr_index), ('community_index', community_index), ('ext_community_index', ext_community_index), ('last_modified', last_modified), ('valid_route', valid_route), ('invalid_reason', invalid_reason), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes_unknown_attribute_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-srte-policy/neighbors/neighbor/adj-rib-out-pre/routes/route/unknown-attributes/unknown-attribute/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for unknown route attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__optional','__transitive','__partial','__extended','__attr_type','__attr_len','__attr_value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-srte-policy', 'neighbors', 'neighbor', 'adj-rib-out-pre', 'routes', 'route', 'unknown-attributes', 'unknown-attribute', 'state']

  def _get_optional(self):
    """
    Getter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/optional (boolean)

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    return self.__optional
      
  def _set_optional(self, v, load=False):
    """
    Setter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/optional (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_optional is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_optional() directly.

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """optional must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__optional = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_optional(self):
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_transitive(self):
    """
    Getter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/transitive (boolean)

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    return self.__transitive
      
  def _set_transitive(self, v, load=False):
    """
    Setter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/transitive (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transitive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transitive() directly.

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transitive must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__transitive = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transitive(self):
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_partial(self):
    """
    Getter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/partial (boolean)

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    return self.__partial
      
  def _set_partial(self, v, load=False):
    """
    Setter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/partial (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_partial is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_partial() directly.

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """partial must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__partial = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_partial(self):
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_extended(self):
    """
    Getter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/extended (boolean)

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    return self.__extended
      
  def _set_extended(self, v, load=False):
    """
    Setter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/extended (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended() directly.

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__extended = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended(self):
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_type (uint8)

    YANG Description: 1-octet value encoding the attribute type code
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_type (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() directly.

    YANG Description: 1-octet value encoding the attribute type code
    """
    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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_attr_len(self):
    """
    Getter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_len (uint16)

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    return self.__attr_len
      
  def _set_attr_len(self, v, load=False):
    """
    Setter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_len (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_len() directly.

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_len 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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__attr_len = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_len(self):
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_attr_value(self):
    """
    Getter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_value (binary)

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    return self.__attr_value
      
  def _set_attr_value(self, v, load=False):
    """
    Setter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state/attr_value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_value() directly.

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__attr_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_value(self):
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  optional = __builtin__.property(_get_optional)
  transitive = __builtin__.property(_get_transitive)
  partial = __builtin__.property(_get_partial)
  extended = __builtin__.property(_get_extended)
  attr_type = __builtin__.property(_get_attr_type)
  attr_len = __builtin__.property(_get_attr_len)
  attr_value = __builtin__.property(_get_attr_value)


  _pyangbind_elements = OrderedDict([('optional', optional), ('transitive', transitive), ('partial', partial), ('extended', extended), ('attr_type', attr_type), ('attr_len', attr_len), ('attr_value', attr_value), ])


class yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes_unknown_attribute(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-srte-policy/neighbors/neighbor/adj-rib-out-pre/routes/route/unknown-attributes/unknown-attribute. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
  """
  __slots__ = ('_path_helper', '_extmethods', '__attr_type','__state',)

  _yang_name = 'unknown-attribute'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-srte-policy', 'neighbors', 'neighbor', 'adj-rib-out-pre', 'routes', 'route', 'unknown-attributes', 'unknown-attribute']

  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/attr_type (leafref)

    YANG Description: Reference to the list key
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/attr_type (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/state (container)

    YANG Description: Operational state for unknown route attributes
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute/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 unknown route attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  attr_type = __builtin__.property(_get_attr_type)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('attr_type', attr_type), ('state', state), ])


class yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-srte-policy/neighbors/neighbor/adj-rib-out-pre/routes/route/unknown-attributes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
  """
  __slots__ = ('_path_helper', '_extmethods', '__unknown_attribute',)

  _yang_name = 'unknown-attributes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-srte-policy', 'neighbors', 'neighbor', 'adj-rib-out-pre', 'routes', 'route', 'unknown-attributes']

  def _get_unknown_attribute(self):
    """
    Getter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute (list)

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    return self.__unknown_attribute
      
  def _set_unknown_attribute(self, v, load=False):
    """
    Setter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes/unknown_attribute (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attribute is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attribute() directly.

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attribute must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__unknown_attribute = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attribute(self):
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  unknown_attribute = __builtin__.property(_get_unknown_attribute)


  _pyangbind_elements = OrderedDict([('unknown_attribute', unknown_attribute), ])


class yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-srte-policy/neighbors/neighbor/adj-rib-out-pre/routes/route. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The routes within the SR-TE Policy SAFI Adj-RIB. The
routes are keyed on the path-id - set to a non-zero
value only if ADD-PATHS is being used; the color; and
the endpoint. The colour and endpoint are extracted from
the NLRI.
  """
  __slots__ = ('_path_helper', '_extmethods', '__path_id','__endpoint','__color','__state','__unknown_attributes',)

  _yang_name = 'route'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__endpoint = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__color = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-srte-policy', 'neighbors', 'neighbor', 'adj-rib-out-pre', 'routes', 'route']

  def _get_path_id(self):
    """
    Getter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/path_id (leafref)

    YANG Description: Reference to the path identifier for the SR-TE Policy SAFI
route. The value is only non-zero if ADD-PATHS is not being
used.
    """
    return self.__path_id
      
  def _set_path_id(self, v, load=False):
    """
    Setter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/path_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_id() directly.

    YANG Description: Reference to the path identifier for the SR-TE Policy SAFI
route. The value is only non-zero if ADD-PATHS is not being
used.
    """
    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="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_id(self):
    self.__path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_endpoint(self):
    """
    Getter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/endpoint (leafref)

    YANG Description: Reference to the endpoint used for the SR-TE Policy SAFI
route within the NLRI.
    """
    return self.__endpoint
      
  def _set_endpoint(self, v, load=False):
    """
    Setter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/endpoint (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint() directly.

    YANG Description: Reference to the endpoint used for the SR-TE Policy SAFI
route within the NLRI.
    """
    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="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """endpoint must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__endpoint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_endpoint(self):
    self.__endpoint = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_color(self):
    """
    Getter method for color, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/color (leafref)

    YANG Description: Reference to the colour used for the SR-TE policy SAFI
route within the NLRI.
    """
    return self.__color
      
  def _set_color(self, v, load=False):
    """
    Setter method for color, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/color (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_color is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_color() directly.

    YANG Description: Reference to the colour used for the SR-TE policy SAFI
route within the NLRI.
    """
    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="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """color must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__color = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_color(self):
    self.__color = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/state (container)

    YANG Description: State parameters for entries within the Adj-RIB used
to store SR-TE Policy SAFI routes.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/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 parameters for entries within the Adj-RIB used
to store SR-TE Policy SAFI routes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unknown_attributes(self):
    """
    Getter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes (container)

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    return self.__unknown_attributes
      
  def _set_unknown_attributes(self, v, load=False):
    """
    Setter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route/unknown_attributes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attributes() directly.

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attributes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unknown_attributes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attributes(self):
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  path_id = __builtin__.property(_get_path_id)
  endpoint = __builtin__.property(_get_endpoint)
  color = __builtin__.property(_get_color)
  state = __builtin__.property(_get_state)
  unknown_attributes = __builtin__.property(_get_unknown_attributes)


  _pyangbind_elements = OrderedDict([('path_id', path_id), ('endpoint', endpoint), ('color', color), ('state', state), ('unknown_attributes', unknown_attributes), ])


class yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-srte-policy/neighbors/neighbor/adj-rib-out-pre/routes. 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 routes within the
SR-TE Policy SAFI.
  """
  __slots__ = ('_path_helper', '_extmethods', '__route',)

  _yang_name = 'routes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__route = YANGDynClass(base=YANGListType("path_id endpoint color",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-id endpoint color', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-srte-policy', 'neighbors', 'neighbor', 'adj-rib-out-pre', 'routes']

  def _get_route(self):
    """
    Getter method for route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route (list)

    YANG Description: The routes within the SR-TE Policy SAFI Adj-RIB. The
routes are keyed on the path-id - set to a non-zero
value only if ADD-PATHS is being used; the color; and
the endpoint. The colour and endpoint are extracted from
the NLRI.
    """
    return self.__route
      
  def _set_route(self, v, load=False):
    """
    Setter method for route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes/route (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route() directly.

    YANG Description: The routes within the SR-TE Policy SAFI Adj-RIB. The
routes are keyed on the path-id - set to a non-zero
value only if ADD-PATHS is being used; the color; and
the endpoint. The colour and endpoint are extracted from
the NLRI.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("path_id endpoint color",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-id endpoint color', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("path_id endpoint color",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-id endpoint color', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route(self):
    self.__route = YANGDynClass(base=YANGListType("path_id endpoint color",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-id endpoint color', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  route = __builtin__.property(_get_route)


  _pyangbind_elements = OrderedDict([('route', route), ])


class yc_adj_rib_out_pre_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_pre(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-srte-policy/neighbors/neighbor/adj-rib-out-pre. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The Adj-RIB-Out for the SR-TE Policy SAFI for the neighbour,
prior to any outgoing policy modifications or constraints
having been applied.
  """
  __slots__ = ('_path_helper', '_extmethods', '__routes',)

  _yang_name = 'adj-rib-out-pre'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-srte-policy', 'neighbors', 'neighbor', 'adj-rib-out-pre']

  def _get_routes(self):
    """
    Getter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes (container)

    YANG Description: Surrounding container for the list of routes within the
SR-TE Policy SAFI.
    """
    return self.__routes
      
  def _set_routes(self, v, load=False):
    """
    Setter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre/routes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_routes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_routes() directly.

    YANG Description: Surrounding container for the list of routes within the
SR-TE Policy SAFI.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """routes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__routes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_routes(self):
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_pre_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  routes = __builtin__.property(_get_routes)


  _pyangbind_elements = OrderedDict([('routes', routes), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-srte-policy/neighbors/neighbor/adj-rib-out-post/routes/route/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters for entries within the Adj-RIB used
to store SR-TE Policy SAFI routes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__path_id','__endpoint','__color','__attr_index','__community_index','__ext_community_index','__last_modified','__valid_route','__invalid_reason',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__endpoint = 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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__color = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-srte-policy', 'neighbors', 'neighbor', 'adj-rib-out-post', 'routes', 'route', 'state']

  def _get_path_id(self):
    """
    Getter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/state/path_id (uint32)

    YANG Description: Identifier for the path when using BGP ADD-PATHS for the SR-TE
policy SAFI.
    """
    return self.__path_id
      
  def _set_path_id(self, v, load=False):
    """
    Setter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/state/path_id (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_id() directly.

    YANG Description: Identifier for the path when using BGP ADD-PATHS for the SR-TE
policy SAFI.
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_id 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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_id(self):
    self.__path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_endpoint(self):
    """
    Getter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/state/endpoint (oc-inet:ip-address)

    YANG Description: A unique identifier for the remote set of nodes. When the address
family is IPv4, the value is a 4-octet IPv4 address. When the
address family is IPv6, the value is a 16-octet IPv6 address.
    """
    return self.__endpoint
      
  def _set_endpoint(self, v, load=False):
    """
    Setter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/state/endpoint (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint() directly.

    YANG Description: A unique identifier for the remote set of nodes. When the address
family is IPv4, the value is a 4-octet IPv4 address. When the
address family is IPv6, the value is a 16-octet IPv6 address.
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """endpoint must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__endpoint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_endpoint(self):
    self.__endpoint = 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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_color(self):
    """
    Getter method for color, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/state/color (uint32)

    YANG Description: A 4-octet value identifying the policy. Combined with the endpoint
the endpoint and colour represent the unique policy.
    """
    return self.__color
      
  def _set_color(self, v, load=False):
    """
    Setter method for color, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/state/color (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_color is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_color() directly.

    YANG Description: A 4-octet value identifying the policy. Combined with the endpoint
the endpoint and colour represent the unique policy.
    """
    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="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """color 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="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__color = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_color(self):
    self.__color = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_attr_index(self):
    """
    Getter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/state/attr_index (leafref)

    YANG Description: Reference to the common attribute group for the
route
    """
    return self.__attr_index
      
  def _set_attr_index(self, v, load=False):
    """
    Setter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/state/attr_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_index() directly.

    YANG Description: Reference to the common attribute group for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_index(self):
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_community_index(self):
    """
    Getter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/state/community_index (leafref)

    YANG Description: Reference to the community attribute for the route
    """
    return self.__community_index
      
  def _set_community_index(self, v, load=False):
    """
    Setter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/state/community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_community_index() directly.

    YANG Description: Reference to the community attribute for the route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_community_index(self):
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_ext_community_index(self):
    """
    Getter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/state/ext_community_index (leafref)

    YANG Description: Reference to the extended community attribute for the
route
    """
    return self.__ext_community_index
      
  def _set_ext_community_index(self, v, load=False):
    """
    Setter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/state/ext_community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ext_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ext_community_index() directly.

    YANG Description: Reference to the extended community attribute for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ext_community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__ext_community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ext_community_index(self):
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_last_modified(self):
    """
    Getter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/state/last_modified (oc-types:timeticks64)

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    return self.__last_modified
      
  def _set_last_modified(self, v, load=False):
    """
    Setter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/state/last_modified (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_last_modified is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_last_modified() directly.

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    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="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """last_modified must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__last_modified = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_last_modified(self):
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_valid_route(self):
    """
    Getter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/state/valid_route (boolean)

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    return self.__valid_route
      
  def _set_valid_route(self, v, load=False):
    """
    Setter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/state/valid_route (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_valid_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_valid_route() directly.

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """valid_route must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__valid_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_valid_route(self):
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_invalid_reason(self):
    """
    Getter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/state/invalid_reason (identityref)

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    return self.__invalid_reason
      
  def _set_invalid_reason(self, v, load=False):
    """
    Setter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/state/invalid_reason (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_invalid_reason is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_invalid_reason() directly.

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    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={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """invalid_reason must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__invalid_reason = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_invalid_reason(self):
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  path_id = __builtin__.property(_get_path_id)
  endpoint = __builtin__.property(_get_endpoint)
  color = __builtin__.property(_get_color)
  attr_index = __builtin__.property(_get_attr_index)
  community_index = __builtin__.property(_get_community_index)
  ext_community_index = __builtin__.property(_get_ext_community_index)
  last_modified = __builtin__.property(_get_last_modified)
  valid_route = __builtin__.property(_get_valid_route)
  invalid_reason = __builtin__.property(_get_invalid_reason)


  _pyangbind_elements = OrderedDict([('path_id', path_id), ('endpoint', endpoint), ('color', color), ('attr_index', attr_index), ('community_index', community_index), ('ext_community_index', ext_community_index), ('last_modified', last_modified), ('valid_route', valid_route), ('invalid_reason', invalid_reason), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes_unknown_attribute_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-srte-policy/neighbors/neighbor/adj-rib-out-post/routes/route/unknown-attributes/unknown-attribute/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for unknown route attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__optional','__transitive','__partial','__extended','__attr_type','__attr_len','__attr_value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-srte-policy', 'neighbors', 'neighbor', 'adj-rib-out-post', 'routes', 'route', 'unknown-attributes', 'unknown-attribute', 'state']

  def _get_optional(self):
    """
    Getter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/optional (boolean)

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    return self.__optional
      
  def _set_optional(self, v, load=False):
    """
    Setter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/optional (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_optional is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_optional() directly.

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """optional must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__optional = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_optional(self):
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_transitive(self):
    """
    Getter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/transitive (boolean)

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    return self.__transitive
      
  def _set_transitive(self, v, load=False):
    """
    Setter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/transitive (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transitive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transitive() directly.

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transitive must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__transitive = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transitive(self):
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_partial(self):
    """
    Getter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/partial (boolean)

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    return self.__partial
      
  def _set_partial(self, v, load=False):
    """
    Setter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/partial (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_partial is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_partial() directly.

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """partial must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__partial = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_partial(self):
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_extended(self):
    """
    Getter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/extended (boolean)

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    return self.__extended
      
  def _set_extended(self, v, load=False):
    """
    Setter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/extended (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended() directly.

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__extended = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended(self):
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/attr_type (uint8)

    YANG Description: 1-octet value encoding the attribute type code
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/attr_type (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() directly.

    YANG Description: 1-octet value encoding the attribute type code
    """
    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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_attr_len(self):
    """
    Getter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/attr_len (uint16)

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    return self.__attr_len
      
  def _set_attr_len(self, v, load=False):
    """
    Setter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/attr_len (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_len() directly.

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_len 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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__attr_len = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_len(self):
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_attr_value(self):
    """
    Getter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/attr_value (binary)

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    return self.__attr_value
      
  def _set_attr_value(self, v, load=False):
    """
    Setter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state/attr_value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_value() directly.

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__attr_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_value(self):
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  optional = __builtin__.property(_get_optional)
  transitive = __builtin__.property(_get_transitive)
  partial = __builtin__.property(_get_partial)
  extended = __builtin__.property(_get_extended)
  attr_type = __builtin__.property(_get_attr_type)
  attr_len = __builtin__.property(_get_attr_len)
  attr_value = __builtin__.property(_get_attr_value)


  _pyangbind_elements = OrderedDict([('optional', optional), ('transitive', transitive), ('partial', partial), ('extended', extended), ('attr_type', attr_type), ('attr_len', attr_len), ('attr_value', attr_value), ])


class yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes_unknown_attribute(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-srte-policy/neighbors/neighbor/adj-rib-out-post/routes/route/unknown-attributes/unknown-attribute. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
  """
  __slots__ = ('_path_helper', '_extmethods', '__attr_type','__state',)

  _yang_name = 'unknown-attribute'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-srte-policy', 'neighbors', 'neighbor', 'adj-rib-out-post', 'routes', 'route', 'unknown-attributes', 'unknown-attribute']

  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/attr_type (leafref)

    YANG Description: Reference to the list key
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/attr_type (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/state (container)

    YANG Description: Operational state for unknown route attributes
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute/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 unknown route attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  attr_type = __builtin__.property(_get_attr_type)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('attr_type', attr_type), ('state', state), ])


class yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-srte-policy/neighbors/neighbor/adj-rib-out-post/routes/route/unknown-attributes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
  """
  __slots__ = ('_path_helper', '_extmethods', '__unknown_attribute',)

  _yang_name = 'unknown-attributes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-srte-policy', 'neighbors', 'neighbor', 'adj-rib-out-post', 'routes', 'route', 'unknown-attributes']

  def _get_unknown_attribute(self):
    """
    Getter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute (list)

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    return self.__unknown_attribute
      
  def _set_unknown_attribute(self, v, load=False):
    """
    Setter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes/unknown_attribute (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attribute is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attribute() directly.

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attribute must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__unknown_attribute = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attribute(self):
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  unknown_attribute = __builtin__.property(_get_unknown_attribute)


  _pyangbind_elements = OrderedDict([('unknown_attribute', unknown_attribute), ])


class yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-srte-policy/neighbors/neighbor/adj-rib-out-post/routes/route. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The routes within the SR-TE Policy SAFI Adj-RIB. The
routes are keyed on the path-id - set to a non-zero
value only if ADD-PATHS is being used; the color; and
the endpoint. The colour and endpoint are extracted from
the NLRI.
  """
  __slots__ = ('_path_helper', '_extmethods', '__path_id','__endpoint','__color','__state','__unknown_attributes',)

  _yang_name = 'route'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__endpoint = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__color = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-srte-policy', 'neighbors', 'neighbor', 'adj-rib-out-post', 'routes', 'route']

  def _get_path_id(self):
    """
    Getter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/path_id (leafref)

    YANG Description: Reference to the path identifier for the SR-TE Policy SAFI
route. The value is only non-zero if ADD-PATHS is not being
used.
    """
    return self.__path_id
      
  def _set_path_id(self, v, load=False):
    """
    Setter method for path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/path_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_id() directly.

    YANG Description: Reference to the path identifier for the SR-TE Policy SAFI
route. The value is only non-zero if ADD-PATHS is not being
used.
    """
    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="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_id(self):
    self.__path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_endpoint(self):
    """
    Getter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/endpoint (leafref)

    YANG Description: Reference to the endpoint used for the SR-TE Policy SAFI
route within the NLRI.
    """
    return self.__endpoint
      
  def _set_endpoint(self, v, load=False):
    """
    Setter method for endpoint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/endpoint (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint() directly.

    YANG Description: Reference to the endpoint used for the SR-TE Policy SAFI
route within the NLRI.
    """
    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="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """endpoint must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__endpoint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_endpoint(self):
    self.__endpoint = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_color(self):
    """
    Getter method for color, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/color (leafref)

    YANG Description: Reference to the colour used for the SR-TE policy SAFI
route within the NLRI.
    """
    return self.__color
      
  def _set_color(self, v, load=False):
    """
    Setter method for color, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/color (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_color is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_color() directly.

    YANG Description: Reference to the colour used for the SR-TE policy SAFI
route within the NLRI.
    """
    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="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """color must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__color = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_color(self):
    self.__color = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/state (container)

    YANG Description: State parameters for entries within the Adj-RIB used
to store SR-TE Policy SAFI routes.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/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 parameters for entries within the Adj-RIB used
to store SR-TE Policy SAFI routes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unknown_attributes(self):
    """
    Getter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes (container)

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    return self.__unknown_attributes
      
  def _set_unknown_attributes(self, v, load=False):
    """
    Setter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route/unknown_attributes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attributes() directly.

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attributes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unknown_attributes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attributes(self):
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  path_id = __builtin__.property(_get_path_id)
  endpoint = __builtin__.property(_get_endpoint)
  color = __builtin__.property(_get_color)
  state = __builtin__.property(_get_state)
  unknown_attributes = __builtin__.property(_get_unknown_attributes)


  _pyangbind_elements = OrderedDict([('path_id', path_id), ('endpoint', endpoint), ('color', color), ('state', state), ('unknown_attributes', unknown_attributes), ])


class yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_post_routes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-srte-policy/neighbors/neighbor/adj-rib-out-post/routes. 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 routes within the
SR-TE Policy SAFI.
  """
  __slots__ = ('_path_helper', '_extmethods', '__route',)

  _yang_name = 'routes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__route = YANGDynClass(base=YANGListType("path_id endpoint color",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-id endpoint color', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-srte-policy', 'neighbors', 'neighbor', 'adj-rib-out-post', 'routes']

  def _get_route(self):
    """
    Getter method for route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route (list)

    YANG Description: The routes within the SR-TE Policy SAFI Adj-RIB. The
routes are keyed on the path-id - set to a non-zero
value only if ADD-PATHS is being used; the color; and
the endpoint. The colour and endpoint are extracted from
the NLRI.
    """
    return self.__route
      
  def _set_route(self, v, load=False):
    """
    Setter method for route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes/route (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route() directly.

    YANG Description: The routes within the SR-TE Policy SAFI Adj-RIB. The
routes are keyed on the path-id - set to a non-zero
value only if ADD-PATHS is being used; the color; and
the endpoint. The colour and endpoint are extracted from
the NLRI.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("path_id endpoint color",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-id endpoint color', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("path_id endpoint color",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-id endpoint color', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route(self):
    self.__route = YANGDynClass(base=YANGListType("path_id endpoint color",yc_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_post_routes_route, yang_name="route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-id endpoint color', extensions=None), is_container='list', yang_name="route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  route = __builtin__.property(_get_route)


  _pyangbind_elements = OrderedDict([('route', route), ])


class yc_adj_rib_out_post_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_post(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-srte-policy/neighbors/neighbor/adj-rib-out-post. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The Adj-RIB-Out for the SR-TE Policy SAFI for the neighbour,
follow any outbound policy constraints or modifications being
made.
  """
  __slots__ = ('_path_helper', '_extmethods', '__routes',)

  _yang_name = 'adj-rib-out-post'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_post_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-srte-policy', 'neighbors', 'neighbor', 'adj-rib-out-post']

  def _get_routes(self):
    """
    Getter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes (container)

    YANG Description: Surrounding container for the list of routes within the
SR-TE Policy SAFI.
    """
    return self.__routes
      
  def _set_routes(self, v, load=False):
    """
    Setter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post/routes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_routes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_routes() directly.

    YANG Description: Surrounding container for the list of routes within the
SR-TE Policy SAFI.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_post_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """routes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_post_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__routes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_routes(self):
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_post_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  routes = __builtin__.property(_get_routes)


  _pyangbind_elements = OrderedDict([('routes', routes), ])


class yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-srte-policy/neighbors/neighbor. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: An individual neighbour that is enabled for the SR-TE
Policy SAFI.
  """
  __slots__ = ('_path_helper', '_extmethods', '__neighbor_address','__state','__adj_rib_in_pre','__adj_rib_in_post','__adj_rib_out_pre','__adj_rib_out_post',)

  _yang_name = 'neighbor'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__neighbor_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__adj_rib_in_pre = YANGDynClass(base=yc_adj_rib_in_pre_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_pre, is_container='container', yang_name="adj-rib-in-pre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__adj_rib_in_post = YANGDynClass(base=yc_adj_rib_in_post_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_post, is_container='container', yang_name="adj-rib-in-post", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__adj_rib_out_pre = YANGDynClass(base=yc_adj_rib_out_pre_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_pre, is_container='container', yang_name="adj-rib-out-pre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__adj_rib_out_post = YANGDynClass(base=yc_adj_rib_out_post_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_post, is_container='container', yang_name="adj-rib-out-post", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-srte-policy', 'neighbors', 'neighbor']

  def _get_neighbor_address(self):
    """
    Getter method for neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/neighbor_address (leafref)

    YANG Description: Reference to the address of the neighbour for which the
Adj-RIBs specified are maintained.
    """
    return self.__neighbor_address
      
  def _set_neighbor_address(self, v, load=False):
    """
    Setter method for neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/neighbor_address (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor_address() directly.

    YANG Description: Reference to the address of the neighbour for which the
Adj-RIBs specified are maintained.
    """
    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="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor_address must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__neighbor_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor_address(self):
    self.__neighbor_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/state (container)

    YANG Description: Operational state parameters of the BGP neighbour for
which the SR-TE Policy SAFI is enabled.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/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 of the BGP neighbour for
which the SR-TE Policy SAFI is enabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_adj_rib_in_pre(self):
    """
    Getter method for adj_rib_in_pre, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre (container)

    YANG Description: The Adj-RIB-In for the SR-TE Policy SAFI for the neighbour,
prior to any inbound policy constraints or modifications
having been applied.
    """
    return self.__adj_rib_in_pre
      
  def _set_adj_rib_in_pre(self, v, load=False):
    """
    Setter method for adj_rib_in_pre, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_pre (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adj_rib_in_pre is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adj_rib_in_pre() directly.

    YANG Description: The Adj-RIB-In for the SR-TE Policy SAFI for the neighbour,
prior to any inbound policy constraints or modifications
having been applied.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_adj_rib_in_pre_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_pre, is_container='container', yang_name="adj-rib-in-pre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adj_rib_in_pre must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_adj_rib_in_pre_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_pre, is_container='container', yang_name="adj-rib-in-pre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__adj_rib_in_pre = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adj_rib_in_pre(self):
    self.__adj_rib_in_pre = YANGDynClass(base=yc_adj_rib_in_pre_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_pre, is_container='container', yang_name="adj-rib-in-pre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_adj_rib_in_post(self):
    """
    Getter method for adj_rib_in_post, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post (container)

    YANG Description: The Adj-RIB-In for the SR-TE Policy SAFI for the neighbour,
following any inbound policy constraints or modifications
being made.
    """
    return self.__adj_rib_in_post
      
  def _set_adj_rib_in_post(self, v, load=False):
    """
    Setter method for adj_rib_in_post, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_in_post (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adj_rib_in_post is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adj_rib_in_post() directly.

    YANG Description: The Adj-RIB-In for the SR-TE Policy SAFI for the neighbour,
following any inbound policy constraints or modifications
being made.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_adj_rib_in_post_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_post, is_container='container', yang_name="adj-rib-in-post", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adj_rib_in_post must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_adj_rib_in_post_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_post, is_container='container', yang_name="adj-rib-in-post", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__adj_rib_in_post = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adj_rib_in_post(self):
    self.__adj_rib_in_post = YANGDynClass(base=yc_adj_rib_in_post_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_in_post, is_container='container', yang_name="adj-rib-in-post", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_adj_rib_out_pre(self):
    """
    Getter method for adj_rib_out_pre, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre (container)

    YANG Description: The Adj-RIB-Out for the SR-TE Policy SAFI for the neighbour,
prior to any outgoing policy modifications or constraints
having been applied.
    """
    return self.__adj_rib_out_pre
      
  def _set_adj_rib_out_pre(self, v, load=False):
    """
    Setter method for adj_rib_out_pre, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_pre (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adj_rib_out_pre is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adj_rib_out_pre() directly.

    YANG Description: The Adj-RIB-Out for the SR-TE Policy SAFI for the neighbour,
prior to any outgoing policy modifications or constraints
having been applied.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_adj_rib_out_pre_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_pre, is_container='container', yang_name="adj-rib-out-pre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adj_rib_out_pre must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_adj_rib_out_pre_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_pre, is_container='container', yang_name="adj-rib-out-pre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__adj_rib_out_pre = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adj_rib_out_pre(self):
    self.__adj_rib_out_pre = YANGDynClass(base=yc_adj_rib_out_pre_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_pre, is_container='container', yang_name="adj-rib-out-pre", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_adj_rib_out_post(self):
    """
    Getter method for adj_rib_out_post, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post (container)

    YANG Description: The Adj-RIB-Out for the SR-TE Policy SAFI for the neighbour,
follow any outbound policy constraints or modifications being
made.
    """
    return self.__adj_rib_out_post
      
  def _set_adj_rib_out_post(self, v, load=False):
    """
    Setter method for adj_rib_out_post, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor/adj_rib_out_post (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adj_rib_out_post is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adj_rib_out_post() directly.

    YANG Description: The Adj-RIB-Out for the SR-TE Policy SAFI for the neighbour,
follow any outbound policy constraints or modifications being
made.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_adj_rib_out_post_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_post, is_container='container', yang_name="adj-rib-out-post", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adj_rib_out_post must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_adj_rib_out_post_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_post, is_container='container', yang_name="adj-rib-out-post", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__adj_rib_out_post = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adj_rib_out_post(self):
    self.__adj_rib_out_post = YANGDynClass(base=yc_adj_rib_out_post_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor_adj_rib_out_post, is_container='container', yang_name="adj-rib-out-post", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  neighbor_address = __builtin__.property(_get_neighbor_address)
  state = __builtin__.property(_get_state)
  adj_rib_in_pre = __builtin__.property(_get_adj_rib_in_pre)
  adj_rib_in_post = __builtin__.property(_get_adj_rib_in_post)
  adj_rib_out_pre = __builtin__.property(_get_adj_rib_out_pre)
  adj_rib_out_post = __builtin__.property(_get_adj_rib_out_post)


  _pyangbind_elements = OrderedDict([('neighbor_address', neighbor_address), ('state', state), ('adj_rib_in_pre', adj_rib_in_pre), ('adj_rib_in_post', adj_rib_in_post), ('adj_rib_out_pre', adj_rib_out_pre), ('adj_rib_out_post', adj_rib_out_post), ])


class yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-srte-policy/neighbors. 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 neighbours that are
enabled for the IPv4 and IPv6 AFI, SR-TE Policy SAFI address
family.
  """
  __slots__ = ('_path_helper', '_extmethods', '__neighbor',)

  _yang_name = 'neighbors'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__neighbor = YANGDynClass(base=YANGListType("neighbor_address",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='neighbor-address', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-srte-policy', 'neighbors']

  def _get_neighbor(self):
    """
    Getter method for neighbor, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor (list)

    YANG Description: An individual neighbour that is enabled for the SR-TE
Policy SAFI.
    """
    return self.__neighbor
      
  def _set_neighbor(self, v, load=False):
    """
    Setter method for neighbor, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors/neighbor (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor() directly.

    YANG Description: An individual neighbour that is enabled for the SR-TE
Policy SAFI.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("neighbor_address",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='neighbor-address', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("neighbor_address",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='neighbor-address', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__neighbor = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor(self):
    self.__neighbor = YANGDynClass(base=YANGListType("neighbor_address",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='neighbor-address', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  neighbor = __builtin__.property(_get_neighbor)


  _pyangbind_elements = OrderedDict([('neighbor', neighbor), ])


class yc_ipv6_srte_policy_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-srte-policy. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Routing tables for the IPv6 Unicast, SR-TE Policy SAFI.
  """
  __slots__ = ('_path_helper', '_extmethods', '__loc_rib','__neighbors',)

  _yang_name = 'ipv6-srte-policy'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__loc_rib = YANGDynClass(base=yc_loc_rib_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_loc_rib, is_container='container', yang_name="loc-rib", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__neighbors = YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'ipv6-srte-policy']

  def _get_loc_rib(self):
    """
    Getter method for loc_rib, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib (container)

    YANG Description: The Loc-RIB for the SR-TE Policy SAFI for IPv4 or IPv6 Unicast
AFIs.
    """
    return self.__loc_rib
      
  def _set_loc_rib(self, v, load=False):
    """
    Setter method for loc_rib, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/loc_rib (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_loc_rib is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_loc_rib() directly.

    YANG Description: The Loc-RIB for the SR-TE Policy SAFI for IPv4 or IPv6 Unicast
AFIs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_loc_rib_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_loc_rib, is_container='container', yang_name="loc-rib", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """loc_rib must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_loc_rib_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_loc_rib, is_container='container', yang_name="loc-rib", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__loc_rib = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_loc_rib(self):
    self.__loc_rib = YANGDynClass(base=yc_loc_rib_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_loc_rib, is_container='container', yang_name="loc-rib", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_neighbors(self):
    """
    Getter method for neighbors, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors (container)

    YANG Description: Surrounding container for the list of neighbours that are
enabled for the IPv4 and IPv6 AFI, SR-TE Policy SAFI address
family.
    """
    return self.__neighbors
      
  def _set_neighbors(self, v, load=False):
    """
    Setter method for neighbors, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy/neighbors (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbors is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbors() directly.

    YANG Description: Surrounding container for the list of neighbours that are
enabled for the IPv4 and IPv6 AFI, SR-TE Policy SAFI address
family.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbors must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__neighbors = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbors(self):
    self.__neighbors = YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  loc_rib = __builtin__.property(_get_loc_rib)
  neighbors = __builtin__.property(_get_neighbors)


  _pyangbind_elements = OrderedDict([('loc_rib', loc_rib), ('neighbors', neighbors), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top level container for L2VPN EVPN RDs
  """
  __slots__ = ('_path_helper', '_extmethods', '__route_distinguisher',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__route_distinguisher = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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])'}),], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'state']

  def _get_route_distinguisher(self):
    """
    Getter method for route_distinguisher, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/state/route_distinguisher (oc-ni-types:route-distinguisher)

    YANG Description: Route Distinguisher for all supported EVPN route types
    """
    return self.__route_distinguisher
      
  def _set_route_distinguisher(self, v, load=False):
    """
    Setter method for route_distinguisher, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/state/route_distinguisher (oc-ni-types:route-distinguisher)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route_distinguisher is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route_distinguisher() directly.

    YANG Description: Route Distinguisher for all supported EVPN route types
    """
    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,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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])'}),], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route_distinguisher must be of a type compatible with oc-ni-types:route-distinguisher""",
          'defined-type': "oc-ni-types:route-distinguisher",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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])'}),], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', is_config=False)""",
        })

    self.__route_distinguisher = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route_distinguisher(self):
    self.__route_distinguisher = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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])'}),], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', is_config=False)

  route_distinguisher = __builtin__.property(_get_route_distinguisher)


  _pyangbind_elements = OrderedDict([('route_distinguisher', route_distinguisher), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery_type_one_route_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-one-ethernet-auto-discovery/type-one-route/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for BGP EVPN Ethernet Auto-discovery route
entries in the BGP LOC-RIB
  """
  __slots__ = ('_path_helper', '_extmethods', '__esi','__ethernet_tag',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__esi = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}), is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi', is_config=False)
    self.__ethernet_tag = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="ethernet-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:ethernet-tag', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-one-ethernet-auto-discovery', 'type-one-route', 'state']

  def _get_esi(self):
    """
    Getter method for esi, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/state/esi (oc-evpn-types:esi)

    YANG Description: The Ethernet Segment Identifier (ESI) identifying the ethernet
segment for this route
    """
    return self.__esi
      
  def _set_esi(self, v, load=False):
    """
    Setter method for esi, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/state/esi (oc-evpn-types:esi)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_esi is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_esi() directly.

    YANG Description: The Ethernet Segment Identifier (ESI) identifying the ethernet
segment for this route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}), is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """esi must be of a type compatible with oc-evpn-types:esi""",
          'defined-type': "oc-evpn-types:esi",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}), is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi', is_config=False)""",
        })

    self.__esi = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_esi(self):
    self.__esi = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}), is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi', is_config=False)


  def _get_ethernet_tag(self):
    """
    Getter method for ethernet_tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/state/ethernet_tag (oc-evpn-types:ethernet-tag)

    YANG Description: The Ethernet tag identifying the broadcast domain for this
route
    """
    return self.__ethernet_tag
      
  def _set_ethernet_tag(self, v, load=False):
    """
    Setter method for ethernet_tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/state/ethernet_tag (oc-evpn-types:ethernet-tag)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ethernet_tag is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ethernet_tag() directly.

    YANG Description: The Ethernet tag identifying the broadcast domain for this
route
    """
    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="ethernet-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:ethernet-tag', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ethernet_tag must be of a type compatible with oc-evpn-types:ethernet-tag""",
          'defined-type': "oc-evpn-types:ethernet-tag",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="ethernet-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:ethernet-tag', is_config=False)""",
        })

    self.__ethernet_tag = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ethernet_tag(self):
    self.__ethernet_tag = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="ethernet-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:ethernet-tag', is_config=False)

  esi = __builtin__.property(_get_esi)
  ethernet_tag = __builtin__.property(_get_ethernet_tag)


  _pyangbind_elements = OrderedDict([('esi', esi), ('ethernet_tag', ethernet_tag), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery_type_one_route_paths_path_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-one-ethernet-auto-discovery/type-one-route/paths/path/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: BGP path attributes for this route
  """
  __slots__ = ('_path_helper', '_extmethods', '__peer_ip','__peer_path_id','__source_route_distinguisher','__source_address_family','__advertised_to_peer','__label','__label2','__bestpath','__multipath','__backup','__last_modified','__valid_route','__invalid_reason','__attr_index','__community_index','__ext_community_index',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__peer_ip = 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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__peer_path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="peer-path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__source_route_distinguisher = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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])'}),], is_leaf=True, yang_name="source-route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', is_config=False)
    self.__source_address_family = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="source-address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__advertised_to_peer = YANGDynClass(unique=True, base=TypedListType(allowed_type=[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}'}),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}|:))'}),]), is_leaf=False, yang_name="advertised-to-peer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__label = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__label2 = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="label2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__bestpath = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="bestpath", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__multipath = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="multipath", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__backup = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="backup", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-one-ethernet-auto-discovery', 'type-one-route', 'paths', 'path', 'state']

  def _get_peer_ip(self):
    """
    Getter method for peer_ip, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/state/peer_ip (oc-inet:ip-address)

    YANG Description: The source peer ip address of the imported route
    """
    return self.__peer_ip
      
  def _set_peer_ip(self, v, load=False):
    """
    Setter method for peer_ip, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/state/peer_ip (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_ip is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_ip() directly.

    YANG Description: The source peer ip address of the imported route
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_ip must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__peer_ip = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_ip(self):
    self.__peer_ip = 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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_peer_path_id(self):
    """
    Getter method for peer_path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/state/peer_path_id (uint32)

    YANG Description: The source peer path id of the imported route
    """
    return self.__peer_path_id
      
  def _set_peer_path_id(self, v, load=False):
    """
    Setter method for peer_path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/state/peer_path_id (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_path_id() directly.

    YANG Description: The source peer path id of the imported route
    """
    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="peer-path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_path_id 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="peer-path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__peer_path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_path_id(self):
    self.__peer_path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="peer-path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_source_route_distinguisher(self):
    """
    Getter method for source_route_distinguisher, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/state/source_route_distinguisher (oc-ni-types:route-distinguisher)

    YANG Description: The source route distinguisher is the remote RD source of the
imported route
    """
    return self.__source_route_distinguisher
      
  def _set_source_route_distinguisher(self, v, load=False):
    """
    Setter method for source_route_distinguisher, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/state/source_route_distinguisher (oc-ni-types:route-distinguisher)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_route_distinguisher is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_route_distinguisher() directly.

    YANG Description: The source route distinguisher is the remote RD source of the
imported route
    """
    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,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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])'}),], is_leaf=True, yang_name="source-route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_route_distinguisher must be of a type compatible with oc-ni-types:route-distinguisher""",
          'defined-type': "oc-ni-types:route-distinguisher",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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])'}),], is_leaf=True, yang_name="source-route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', is_config=False)""",
        })

    self.__source_route_distinguisher = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_route_distinguisher(self):
    self.__source_route_distinguisher = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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])'}),], is_leaf=True, yang_name="source-route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', is_config=False)


  def _get_source_address_family(self):
    """
    Getter method for source_address_family, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/state/source_address_family (identityref)

    YANG Description: The source address-family of the imported route
    """
    return self.__source_address_family
      
  def _set_source_address_family(self, v, load=False):
    """
    Setter method for source_address_family, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/state/source_address_family (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address_family is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address_family() directly.

    YANG Description: The source address-family of the imported route
    """
    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_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="source-address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address_family must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="source-address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__source_address_family = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_address_family(self):
    self.__source_address_family = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="source-address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_advertised_to_peer(self):
    """
    Getter method for advertised_to_peer, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/state/advertised_to_peer (oc-inet:ip-address)

    YANG Description: List of peers to which this path is advertised
    """
    return self.__advertised_to_peer
      
  def _set_advertised_to_peer(self, v, load=False):
    """
    Setter method for advertised_to_peer, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/state/advertised_to_peer (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_advertised_to_peer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_advertised_to_peer() directly.

    YANG Description: List of peers to which this path is advertised
    """
    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_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}'}),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}|:))'}),]), is_leaf=False, yang_name="advertised-to-peer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """advertised_to_peer must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=[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}'}),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}|:))'}),]), is_leaf=False, yang_name="advertised-to-peer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__advertised_to_peer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_advertised_to_peer(self):
    self.__advertised_to_peer = YANGDynClass(unique=True, base=TypedListType(allowed_type=[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}'}),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}|:))'}),]), is_leaf=False, yang_name="advertised-to-peer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_label(self):
    """
    Getter method for label, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/state/label (string)

    YANG Description: MPLS Label field used for route attributes
    """
    return self.__label
      
  def _set_label(self, v, load=False):
    """
    Setter method for label, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/state/label (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_label() directly.

    YANG Description: MPLS Label field used for route attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """label must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_label(self):
    self.__label = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_label2(self):
    """
    Getter method for label2, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/state/label2 (string)

    YANG Description: MPLS Label2 field used for route attributes
    """
    return self.__label2
      
  def _set_label2(self, v, load=False):
    """
    Setter method for label2, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/state/label2 (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_label2 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_label2() directly.

    YANG Description: MPLS Label2 field used for route attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="label2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """label2 must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="label2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__label2 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_label2(self):
    self.__label2 = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="label2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_bestpath(self):
    """
    Getter method for bestpath, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/state/bestpath (boolean)

    YANG Description: BGP can receive multiple paths to the same destination. This
parameter indicates that this path is the bestpath to install
in the IP routing table and use for traffic forwarding
    """
    return self.__bestpath
      
  def _set_bestpath(self, v, load=False):
    """
    Setter method for bestpath, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/state/bestpath (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bestpath is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bestpath() directly.

    YANG Description: BGP can receive multiple paths to the same destination. This
parameter indicates that this path is the bestpath to install
in the IP routing table and use for traffic forwarding
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="bestpath", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bestpath must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="bestpath", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__bestpath = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bestpath(self):
    self.__bestpath = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="bestpath", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_multipath(self):
    """
    Getter method for multipath, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/state/multipath (boolean)

    YANG Description: BGP can use multiple paths to reach a destination allowing
BGP to load-balance traffic. This parameter indicates that this
path is marked as multipath
    """
    return self.__multipath
      
  def _set_multipath(self, v, load=False):
    """
    Setter method for multipath, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/state/multipath (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multipath is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multipath() directly.

    YANG Description: BGP can use multiple paths to reach a destination allowing
BGP to load-balance traffic. This parameter indicates that this
path is marked as multipath
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="multipath", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multipath must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="multipath", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__multipath = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multipath(self):
    self.__multipath = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="multipath", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_backup(self):
    """
    Getter method for backup, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/state/backup (boolean)

    YANG Description: BGP path marked as a backup path
    """
    return self.__backup
      
  def _set_backup(self, v, load=False):
    """
    Setter method for backup, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/state/backup (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_backup is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_backup() directly.

    YANG Description: BGP path marked as a backup path
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="backup", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """backup must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="backup", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__backup = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_backup(self):
    self.__backup = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="backup", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_last_modified(self):
    """
    Getter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/state/last_modified (oc-types:timeticks64)

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    return self.__last_modified
      
  def _set_last_modified(self, v, load=False):
    """
    Setter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/state/last_modified (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_last_modified is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_last_modified() directly.

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    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="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """last_modified must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__last_modified = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_last_modified(self):
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_valid_route(self):
    """
    Getter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/state/valid_route (boolean)

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    return self.__valid_route
      
  def _set_valid_route(self, v, load=False):
    """
    Setter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/state/valid_route (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_valid_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_valid_route() directly.

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """valid_route must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__valid_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_valid_route(self):
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_invalid_reason(self):
    """
    Getter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/state/invalid_reason (identityref)

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    return self.__invalid_reason
      
  def _set_invalid_reason(self, v, load=False):
    """
    Setter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/state/invalid_reason (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_invalid_reason is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_invalid_reason() directly.

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    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={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """invalid_reason must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__invalid_reason = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_invalid_reason(self):
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_attr_index(self):
    """
    Getter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/state/attr_index (leafref)

    YANG Description: Reference to the common attribute group for the
route
    """
    return self.__attr_index
      
  def _set_attr_index(self, v, load=False):
    """
    Setter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/state/attr_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_index() directly.

    YANG Description: Reference to the common attribute group for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_index(self):
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_community_index(self):
    """
    Getter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/state/community_index (leafref)

    YANG Description: Reference to the community attribute for the route
    """
    return self.__community_index
      
  def _set_community_index(self, v, load=False):
    """
    Setter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/state/community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_community_index() directly.

    YANG Description: Reference to the community attribute for the route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_community_index(self):
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_ext_community_index(self):
    """
    Getter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/state/ext_community_index (leafref)

    YANG Description: Reference to the extended community attribute for the
route
    """
    return self.__ext_community_index
      
  def _set_ext_community_index(self, v, load=False):
    """
    Setter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/state/ext_community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ext_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ext_community_index() directly.

    YANG Description: Reference to the extended community attribute for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ext_community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__ext_community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ext_community_index(self):
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)

  peer_ip = __builtin__.property(_get_peer_ip)
  peer_path_id = __builtin__.property(_get_peer_path_id)
  source_route_distinguisher = __builtin__.property(_get_source_route_distinguisher)
  source_address_family = __builtin__.property(_get_source_address_family)
  advertised_to_peer = __builtin__.property(_get_advertised_to_peer)
  label = __builtin__.property(_get_label)
  label2 = __builtin__.property(_get_label2)
  bestpath = __builtin__.property(_get_bestpath)
  multipath = __builtin__.property(_get_multipath)
  backup = __builtin__.property(_get_backup)
  last_modified = __builtin__.property(_get_last_modified)
  valid_route = __builtin__.property(_get_valid_route)
  invalid_reason = __builtin__.property(_get_invalid_reason)
  attr_index = __builtin__.property(_get_attr_index)
  community_index = __builtin__.property(_get_community_index)
  ext_community_index = __builtin__.property(_get_ext_community_index)


  _pyangbind_elements = OrderedDict([('peer_ip', peer_ip), ('peer_path_id', peer_path_id), ('source_route_distinguisher', source_route_distinguisher), ('source_address_family', source_address_family), ('advertised_to_peer', advertised_to_peer), ('label', label), ('label2', label2), ('bestpath', bestpath), ('multipath', multipath), ('backup', backup), ('last_modified', last_modified), ('valid_route', valid_route), ('invalid_reason', invalid_reason), ('attr_index', attr_index), ('community_index', community_index), ('ext_community_index', ext_community_index), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery_type_one_route_paths_path_unknown_attributes_unknown_attribute_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-one-ethernet-auto-discovery/type-one-route/paths/path/unknown-attributes/unknown-attribute/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for unknown route attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__optional','__transitive','__partial','__extended','__attr_type','__attr_len','__attr_value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-one-ethernet-auto-discovery', 'type-one-route', 'paths', 'path', 'unknown-attributes', 'unknown-attribute', 'state']

  def _get_optional(self):
    """
    Getter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/unknown_attributes/unknown_attribute/state/optional (boolean)

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    return self.__optional
      
  def _set_optional(self, v, load=False):
    """
    Setter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/unknown_attributes/unknown_attribute/state/optional (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_optional is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_optional() directly.

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """optional must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__optional = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_optional(self):
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_transitive(self):
    """
    Getter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/unknown_attributes/unknown_attribute/state/transitive (boolean)

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    return self.__transitive
      
  def _set_transitive(self, v, load=False):
    """
    Setter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/unknown_attributes/unknown_attribute/state/transitive (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transitive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transitive() directly.

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transitive must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__transitive = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transitive(self):
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_partial(self):
    """
    Getter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/unknown_attributes/unknown_attribute/state/partial (boolean)

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    return self.__partial
      
  def _set_partial(self, v, load=False):
    """
    Setter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/unknown_attributes/unknown_attribute/state/partial (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_partial is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_partial() directly.

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """partial must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__partial = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_partial(self):
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_extended(self):
    """
    Getter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/unknown_attributes/unknown_attribute/state/extended (boolean)

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    return self.__extended
      
  def _set_extended(self, v, load=False):
    """
    Setter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/unknown_attributes/unknown_attribute/state/extended (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended() directly.

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__extended = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended(self):
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/unknown_attributes/unknown_attribute/state/attr_type (uint8)

    YANG Description: 1-octet value encoding the attribute type code
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/unknown_attributes/unknown_attribute/state/attr_type (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() directly.

    YANG Description: 1-octet value encoding the attribute type code
    """
    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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_attr_len(self):
    """
    Getter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/unknown_attributes/unknown_attribute/state/attr_len (uint16)

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    return self.__attr_len
      
  def _set_attr_len(self, v, load=False):
    """
    Setter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/unknown_attributes/unknown_attribute/state/attr_len (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_len() directly.

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_len 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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__attr_len = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_len(self):
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_attr_value(self):
    """
    Getter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/unknown_attributes/unknown_attribute/state/attr_value (binary)

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    return self.__attr_value
      
  def _set_attr_value(self, v, load=False):
    """
    Setter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/unknown_attributes/unknown_attribute/state/attr_value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_value() directly.

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__attr_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_value(self):
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  optional = __builtin__.property(_get_optional)
  transitive = __builtin__.property(_get_transitive)
  partial = __builtin__.property(_get_partial)
  extended = __builtin__.property(_get_extended)
  attr_type = __builtin__.property(_get_attr_type)
  attr_len = __builtin__.property(_get_attr_len)
  attr_value = __builtin__.property(_get_attr_value)


  _pyangbind_elements = OrderedDict([('optional', optional), ('transitive', transitive), ('partial', partial), ('extended', extended), ('attr_type', attr_type), ('attr_len', attr_len), ('attr_value', attr_value), ])


class yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery_type_one_route_paths_path_unknown_attributes_unknown_attribute(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-one-ethernet-auto-discovery/type-one-route/paths/path/unknown-attributes/unknown-attribute. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
  """
  __slots__ = ('_path_helper', '_extmethods', '__attr_type','__state',)

  _yang_name = 'unknown-attribute'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery_type_one_route_paths_path_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-one-ethernet-auto-discovery', 'type-one-route', 'paths', 'path', 'unknown-attributes', 'unknown-attribute']

  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/unknown_attributes/unknown_attribute/attr_type (leafref)

    YANG Description: Reference to the list key
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/unknown_attributes/unknown_attribute/attr_type (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/unknown_attributes/unknown_attribute/state (container)

    YANG Description: Operational state for unknown route attributes
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/unknown_attributes/unknown_attribute/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 unknown route attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery_type_one_route_paths_path_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery_type_one_route_paths_path_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery_type_one_route_paths_path_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  attr_type = __builtin__.property(_get_attr_type)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('attr_type', attr_type), ('state', state), ])


class yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery_type_one_route_paths_path_unknown_attributes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-one-ethernet-auto-discovery/type-one-route/paths/path/unknown-attributes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
  """
  __slots__ = ('_path_helper', '_extmethods', '__unknown_attribute',)

  _yang_name = 'unknown-attributes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery_type_one_route_paths_path_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-one-ethernet-auto-discovery', 'type-one-route', 'paths', 'path', 'unknown-attributes']

  def _get_unknown_attribute(self):
    """
    Getter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/unknown_attributes/unknown_attribute (list)

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    return self.__unknown_attribute
      
  def _set_unknown_attribute(self, v, load=False):
    """
    Setter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/unknown_attributes/unknown_attribute (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attribute is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attribute() directly.

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery_type_one_route_paths_path_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attribute must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery_type_one_route_paths_path_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__unknown_attribute = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attribute(self):
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery_type_one_route_paths_path_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  unknown_attribute = __builtin__.property(_get_unknown_attribute)


  _pyangbind_elements = OrderedDict([('unknown_attribute', unknown_attribute), ])


class yc_path_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery_type_one_route_paths_path(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-one-ethernet-auto-discovery/type-one-route/paths/path. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of paths
  """
  __slots__ = ('_path_helper', '_extmethods', '__peer_ip','__peer_path_id','__source_route_distinguisher','__source_address_family','__state','__unknown_attributes',)

  _yang_name = 'path'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__peer_ip = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__peer_path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__source_route_distinguisher = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__source_address_family = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery_type_one_route_paths_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery_type_one_route_paths_path_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-one-ethernet-auto-discovery', 'type-one-route', 'paths', 'path']

  def _get_peer_ip(self):
    """
    Getter method for peer_ip, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/peer_ip (leafref)

    YANG Description: The source peer ip address of the imported route
    """
    return self.__peer_ip
      
  def _set_peer_ip(self, v, load=False):
    """
    Setter method for peer_ip, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/peer_ip (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_ip is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_ip() directly.

    YANG Description: The source peer ip address of the imported route
    """
    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="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_ip must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__peer_ip = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_ip(self):
    self.__peer_ip = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_peer_path_id(self):
    """
    Getter method for peer_path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/peer_path_id (leafref)

    YANG Description: The source peer path id of the imported route
    """
    return self.__peer_path_id
      
  def _set_peer_path_id(self, v, load=False):
    """
    Setter method for peer_path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/peer_path_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_path_id() directly.

    YANG Description: The source peer path id of the imported route
    """
    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="peer-path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_path_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__peer_path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_path_id(self):
    self.__peer_path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_source_route_distinguisher(self):
    """
    Getter method for source_route_distinguisher, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/source_route_distinguisher (leafref)

    YANG Description: The source route distinguisher is the remote RD source of the
imported route
    """
    return self.__source_route_distinguisher
      
  def _set_source_route_distinguisher(self, v, load=False):
    """
    Setter method for source_route_distinguisher, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/source_route_distinguisher (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_route_distinguisher is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_route_distinguisher() directly.

    YANG Description: The source route distinguisher is the remote RD source of the
imported route
    """
    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="source-route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_route_distinguisher must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__source_route_distinguisher = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_route_distinguisher(self):
    self.__source_route_distinguisher = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_source_address_family(self):
    """
    Getter method for source_address_family, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/source_address_family (leafref)

    YANG Description: The source address-family of the imported route
    """
    return self.__source_address_family
      
  def _set_source_address_family(self, v, load=False):
    """
    Setter method for source_address_family, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/source_address_family (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address_family is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address_family() directly.

    YANG Description: The source address-family of the imported route
    """
    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="source-address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address_family 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-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__source_address_family = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_address_family(self):
    self.__source_address_family = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/state (container)

    YANG Description: BGP path attributes for this route
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/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: BGP path attributes for this route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery_type_one_route_paths_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery_type_one_route_paths_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery_type_one_route_paths_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unknown_attributes(self):
    """
    Getter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/unknown_attributes (container)

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    return self.__unknown_attributes
      
  def _set_unknown_attributes(self, v, load=False):
    """
    Setter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path/unknown_attributes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attributes() directly.

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery_type_one_route_paths_path_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attributes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery_type_one_route_paths_path_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unknown_attributes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attributes(self):
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery_type_one_route_paths_path_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  peer_ip = __builtin__.property(_get_peer_ip)
  peer_path_id = __builtin__.property(_get_peer_path_id)
  source_route_distinguisher = __builtin__.property(_get_source_route_distinguisher)
  source_address_family = __builtin__.property(_get_source_address_family)
  state = __builtin__.property(_get_state)
  unknown_attributes = __builtin__.property(_get_unknown_attributes)


  _pyangbind_elements = OrderedDict([('peer_ip', peer_ip), ('peer_path_id', peer_path_id), ('source_route_distinguisher', source_route_distinguisher), ('source_address_family', source_address_family), ('state', state), ('unknown_attributes', unknown_attributes), ])


class yc_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery_type_one_route_paths(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-one-ethernet-auto-discovery/type-one-route/paths. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of BGP path attributes for this route
  """
  __slots__ = ('_path_helper', '_extmethods', '__path',)

  _yang_name = 'paths'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__path = YANGDynClass(base=YANGListType("peer_ip peer_path_id source_route_distinguisher source_address_family",yc_path_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery_type_one_route_paths_path, yang_name="path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='peer-ip peer-path-id source-route-distinguisher source-address-family', extensions=None), is_container='list', yang_name="path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-one-ethernet-auto-discovery', 'type-one-route', 'paths']

  def _get_path(self):
    """
    Getter method for path, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path (list)

    YANG Description: List of paths
    """
    return self.__path
      
  def _set_path(self, v, load=False):
    """
    Setter method for path, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths/path (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path() directly.

    YANG Description: List of paths
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("peer_ip peer_path_id source_route_distinguisher source_address_family",yc_path_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery_type_one_route_paths_path, yang_name="path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='peer-ip peer-path-id source-route-distinguisher source-address-family', extensions=None), is_container='list', yang_name="path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("peer_ip peer_path_id source_route_distinguisher source_address_family",yc_path_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery_type_one_route_paths_path, yang_name="path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='peer-ip peer-path-id source-route-distinguisher source-address-family', extensions=None), is_container='list', yang_name="path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__path = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path(self):
    self.__path = YANGDynClass(base=YANGListType("peer_ip peer_path_id source_route_distinguisher source_address_family",yc_path_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery_type_one_route_paths_path, yang_name="path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='peer-ip peer-path-id source-route-distinguisher source-address-family', extensions=None), is_container='list', yang_name="path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  path = __builtin__.property(_get_path)


  _pyangbind_elements = OrderedDict([('path', path), ])


class yc_type_one_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery_type_one_route(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-one-ethernet-auto-discovery/type-one-route. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of BGP EVPN Ethernet Auto-discovery routes

For the purpose of BGP route key processing, only the Ethernet Segment
Identifier and Ethernet Tag ID are considered to be part of the prefix in
the NLRI
  """
  __slots__ = ('_path_helper', '_extmethods', '__esi','__ethernet_tag','__state','__paths',)

  _yang_name = 'type-one-route'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__esi = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__ethernet_tag = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ethernet-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery_type_one_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__paths = YANGDynClass(base=yc_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery_type_one_route_paths, is_container='container', yang_name="paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-one-ethernet-auto-discovery', 'type-one-route']

  def _get_esi(self):
    """
    Getter method for esi, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/esi (leafref)

    YANG Description: The Ethernet Segment Identifier (ESI) is a unique non-zero
identifier that identifies an Ethernet segment
    """
    return self.__esi
      
  def _set_esi(self, v, load=False):
    """
    Setter method for esi, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/esi (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_esi is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_esi() directly.

    YANG Description: The Ethernet Segment Identifier (ESI) is a unique non-zero
identifier that identifies an Ethernet segment
    """
    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="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """esi must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__esi = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_esi(self):
    self.__esi = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_ethernet_tag(self):
    """
    Getter method for ethernet_tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/ethernet_tag (leafref)

    YANG Description: The Ethernet tag identifies a particular broadcast domain.  An EVPN
instance consists of one or more broadcast domains
    """
    return self.__ethernet_tag
      
  def _set_ethernet_tag(self, v, load=False):
    """
    Setter method for ethernet_tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/ethernet_tag (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ethernet_tag is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ethernet_tag() directly.

    YANG Description: The Ethernet tag identifies a particular broadcast domain.  An EVPN
instance consists of one or more broadcast domains
    """
    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="ethernet-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ethernet_tag must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ethernet-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__ethernet_tag = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ethernet_tag(self):
    self.__ethernet_tag = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ethernet-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/state (container)

    YANG Description: Operational state data for BGP EVPN Ethernet Auto-discovery route
entries in the BGP LOC-RIB
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/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 BGP EVPN Ethernet Auto-discovery route
entries in the BGP LOC-RIB
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery_type_one_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery_type_one_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery_type_one_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_paths(self):
    """
    Getter method for paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths (container)

    YANG Description: List of BGP path attributes for this route
    """
    return self.__paths
      
  def _set_paths(self, v, load=False):
    """
    Setter method for paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route/paths (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_paths() directly.

    YANG Description: List of BGP path attributes for this route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery_type_one_route_paths, is_container='container', yang_name="paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """paths must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery_type_one_route_paths, is_container='container', yang_name="paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_paths(self):
    self.__paths = YANGDynClass(base=yc_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery_type_one_route_paths, is_container='container', yang_name="paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  esi = __builtin__.property(_get_esi)
  ethernet_tag = __builtin__.property(_get_ethernet_tag)
  state = __builtin__.property(_get_state)
  paths = __builtin__.property(_get_paths)


  _pyangbind_elements = OrderedDict([('esi', esi), ('ethernet_tag', ethernet_tag), ('state', state), ('paths', paths), ])


class yc_type_one_ethernet_auto_discovery_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-one-ethernet-auto-discovery. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top level container BGP EVPN Ethernet Auto-discovery routes
  """
  __slots__ = ('_path_helper', '_extmethods', '__type_one_route',)

  _yang_name = 'type-one-ethernet-auto-discovery'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type_one_route = YANGDynClass(base=YANGListType("esi ethernet_tag",yc_type_one_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery_type_one_route, yang_name="type-one-route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='esi ethernet-tag', extensions=None), is_container='list', yang_name="type-one-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-one-ethernet-auto-discovery']

  def _get_type_one_route(self):
    """
    Getter method for type_one_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route (list)

    YANG Description: List of BGP EVPN Ethernet Auto-discovery routes

For the purpose of BGP route key processing, only the Ethernet Segment
Identifier and Ethernet Tag ID are considered to be part of the prefix in
the NLRI
    """
    return self.__type_one_route
      
  def _set_type_one_route(self, v, load=False):
    """
    Setter method for type_one_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery/type_one_route (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type_one_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type_one_route() directly.

    YANG Description: List of BGP EVPN Ethernet Auto-discovery routes

For the purpose of BGP route key processing, only the Ethernet Segment
Identifier and Ethernet Tag ID are considered to be part of the prefix in
the NLRI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("esi ethernet_tag",yc_type_one_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery_type_one_route, yang_name="type-one-route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='esi ethernet-tag', extensions=None), is_container='list', yang_name="type-one-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type_one_route must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("esi ethernet_tag",yc_type_one_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery_type_one_route, yang_name="type-one-route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='esi ethernet-tag', extensions=None), is_container='list', yang_name="type-one-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__type_one_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type_one_route(self):
    self.__type_one_route = YANGDynClass(base=YANGListType("esi ethernet_tag",yc_type_one_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery_type_one_route, yang_name="type-one-route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='esi ethernet-tag', extensions=None), is_container='list', yang_name="type-one-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  type_one_route = __builtin__.property(_get_type_one_route)


  _pyangbind_elements = OrderedDict([('type_one_route', type_one_route), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement_type_two_route_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-two-mac-ip-advertisement/type-two-route/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data MAC_IP Advertisement L2VPN EVPN route
entries in the BGP LOC-RIB
  """
  __slots__ = ('_path_helper', '_extmethods', '__ethernet_tag','__mac_address','__mac_length','__ip_prefix','__ip_length',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__ethernet_tag = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="ethernet-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:ethernet-tag', is_config=False)
    self.__mac_address = 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)
    self.__mac_length = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="mac-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__ip_prefix = 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])'}),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="ip-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=False)
    self.__ip_length = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="ip-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-two-mac-ip-advertisement', 'type-two-route', 'state']

  def _get_ethernet_tag(self):
    """
    Getter method for ethernet_tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/state/ethernet_tag (oc-evpn-types:ethernet-tag)

    YANG Description: The Ethernet tag identifying the broadcast domain for this
route
    """
    return self.__ethernet_tag
      
  def _set_ethernet_tag(self, v, load=False):
    """
    Setter method for ethernet_tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/state/ethernet_tag (oc-evpn-types:ethernet-tag)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ethernet_tag is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ethernet_tag() directly.

    YANG Description: The Ethernet tag identifying the broadcast domain for this
route
    """
    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="ethernet-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:ethernet-tag', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ethernet_tag must be of a type compatible with oc-evpn-types:ethernet-tag""",
          'defined-type': "oc-evpn-types:ethernet-tag",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="ethernet-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:ethernet-tag', is_config=False)""",
        })

    self.__ethernet_tag = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ethernet_tag(self):
    self.__ethernet_tag = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="ethernet-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:ethernet-tag', is_config=False)


  def _get_mac_address(self):
    """
    Getter method for mac_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/state/mac_address (oc-yang:mac-address)

    YANG Description: The MAC address that is learned on a PE from a CE that is
connected to it or learned from other PEs
    """
    return self.__mac_address
      
  def _set_mac_address(self, v, load=False):
    """
    Setter method for mac_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/state/mac_address (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_address() directly.

    YANG Description: The MAC address that is learned on a PE from a CE that is
connected to it or learned from other PEs
    """
    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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_address 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)""",
        })

    self.__mac_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mac_address(self):
    self.__mac_address = 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)


  def _get_mac_length(self):
    """
    Getter method for mac_length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/state/mac_length (uint32)

    YANG Description: The MAC address length for the mac-address
    """
    return self.__mac_length
      
  def _set_mac_length(self, v, load=False):
    """
    Setter method for mac_length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/state/mac_length (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_length is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_length() directly.

    YANG Description: The MAC address length for the mac-address
    """
    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="mac-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_length 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="mac-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__mac_length = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mac_length(self):
    self.__mac_length = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="mac-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_ip_prefix(self):
    """
    Getter method for ip_prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/state/ip_prefix (oc-inet:ip-prefix)

    YANG Description: The IP address for end-host reachability information
    """
    return self.__ip_prefix
      
  def _set_ip_prefix(self, v, load=False):
    """
    Setter method for ip_prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/state/ip_prefix (oc-inet:ip-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ip_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ip_prefix() directly.

    YANG Description: The IP address for end-host reachability information
    """
    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])'}),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="ip-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ip_prefix must be of a type compatible with oc-inet:ip-prefix""",
          'defined-type': "oc-inet:ip-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])'}),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="ip-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=False)""",
        })

    self.__ip_prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ip_prefix(self):
    self.__ip_prefix = 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])'}),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="ip-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=False)


  def _get_ip_length(self):
    """
    Getter method for ip_length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/state/ip_length (uint32)

    YANG Description: The ip-prefix length for the IP address specified by ip-prefix
    """
    return self.__ip_length
      
  def _set_ip_length(self, v, load=False):
    """
    Setter method for ip_length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/state/ip_length (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ip_length is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ip_length() directly.

    YANG Description: The ip-prefix length for the IP address specified by ip-prefix
    """
    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="ip-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ip_length 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="ip-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__ip_length = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ip_length(self):
    self.__ip_length = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="ip-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  ethernet_tag = __builtin__.property(_get_ethernet_tag)
  mac_address = __builtin__.property(_get_mac_address)
  mac_length = __builtin__.property(_get_mac_length)
  ip_prefix = __builtin__.property(_get_ip_prefix)
  ip_length = __builtin__.property(_get_ip_length)


  _pyangbind_elements = OrderedDict([('ethernet_tag', ethernet_tag), ('mac_address', mac_address), ('mac_length', mac_length), ('ip_prefix', ip_prefix), ('ip_length', ip_length), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement_type_two_route_paths_path_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-two-mac-ip-advertisement/type-two-route/paths/path/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: BGP path attributes for this route
  """
  __slots__ = ('_path_helper', '_extmethods', '__peer_ip','__peer_path_id','__source_route_distinguisher','__source_address_family','__esi','__advertised_to_peer','__label','__label2','__bestpath','__multipath','__backup','__last_modified','__valid_route','__invalid_reason','__attr_index','__community_index','__ext_community_index',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__peer_ip = 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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__peer_path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="peer-path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__source_route_distinguisher = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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])'}),], is_leaf=True, yang_name="source-route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', is_config=False)
    self.__source_address_family = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="source-address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__esi = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}), is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi', is_config=False)
    self.__advertised_to_peer = YANGDynClass(unique=True, base=TypedListType(allowed_type=[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}'}),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}|:))'}),]), is_leaf=False, yang_name="advertised-to-peer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__label = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__label2 = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="label2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__bestpath = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="bestpath", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__multipath = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="multipath", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__backup = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="backup", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-two-mac-ip-advertisement', 'type-two-route', 'paths', 'path', 'state']

  def _get_peer_ip(self):
    """
    Getter method for peer_ip, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/state/peer_ip (oc-inet:ip-address)

    YANG Description: The source peer ip address of the imported route
    """
    return self.__peer_ip
      
  def _set_peer_ip(self, v, load=False):
    """
    Setter method for peer_ip, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/state/peer_ip (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_ip is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_ip() directly.

    YANG Description: The source peer ip address of the imported route
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_ip must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__peer_ip = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_ip(self):
    self.__peer_ip = 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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_peer_path_id(self):
    """
    Getter method for peer_path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/state/peer_path_id (uint32)

    YANG Description: The source peer path id of the imported route
    """
    return self.__peer_path_id
      
  def _set_peer_path_id(self, v, load=False):
    """
    Setter method for peer_path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/state/peer_path_id (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_path_id() directly.

    YANG Description: The source peer path id of the imported route
    """
    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="peer-path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_path_id 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="peer-path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__peer_path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_path_id(self):
    self.__peer_path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="peer-path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_source_route_distinguisher(self):
    """
    Getter method for source_route_distinguisher, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/state/source_route_distinguisher (oc-ni-types:route-distinguisher)

    YANG Description: The source route distinguisher is the remote RD source of the
imported route
    """
    return self.__source_route_distinguisher
      
  def _set_source_route_distinguisher(self, v, load=False):
    """
    Setter method for source_route_distinguisher, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/state/source_route_distinguisher (oc-ni-types:route-distinguisher)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_route_distinguisher is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_route_distinguisher() directly.

    YANG Description: The source route distinguisher is the remote RD source of the
imported route
    """
    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,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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])'}),], is_leaf=True, yang_name="source-route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_route_distinguisher must be of a type compatible with oc-ni-types:route-distinguisher""",
          'defined-type': "oc-ni-types:route-distinguisher",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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])'}),], is_leaf=True, yang_name="source-route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', is_config=False)""",
        })

    self.__source_route_distinguisher = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_route_distinguisher(self):
    self.__source_route_distinguisher = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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])'}),], is_leaf=True, yang_name="source-route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', is_config=False)


  def _get_source_address_family(self):
    """
    Getter method for source_address_family, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/state/source_address_family (identityref)

    YANG Description: The source address-family of the imported route
    """
    return self.__source_address_family
      
  def _set_source_address_family(self, v, load=False):
    """
    Setter method for source_address_family, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/state/source_address_family (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address_family is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address_family() directly.

    YANG Description: The source address-family of the imported route
    """
    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_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="source-address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address_family must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="source-address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__source_address_family = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_address_family(self):
    self.__source_address_family = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="source-address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_esi(self):
    """
    Getter method for esi, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/state/esi (oc-evpn-types:esi)

    YANG Description: The Ethernet Segment Identifier (ESI) identifying the ethernet
segment for this route
    """
    return self.__esi
      
  def _set_esi(self, v, load=False):
    """
    Setter method for esi, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/state/esi (oc-evpn-types:esi)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_esi is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_esi() directly.

    YANG Description: The Ethernet Segment Identifier (ESI) identifying the ethernet
segment for this route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}), is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """esi must be of a type compatible with oc-evpn-types:esi""",
          'defined-type': "oc-evpn-types:esi",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}), is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi', is_config=False)""",
        })

    self.__esi = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_esi(self):
    self.__esi = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}), is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi', is_config=False)


  def _get_advertised_to_peer(self):
    """
    Getter method for advertised_to_peer, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/state/advertised_to_peer (oc-inet:ip-address)

    YANG Description: List of peers to which this path is advertised
    """
    return self.__advertised_to_peer
      
  def _set_advertised_to_peer(self, v, load=False):
    """
    Setter method for advertised_to_peer, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/state/advertised_to_peer (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_advertised_to_peer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_advertised_to_peer() directly.

    YANG Description: List of peers to which this path is advertised
    """
    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_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}'}),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}|:))'}),]), is_leaf=False, yang_name="advertised-to-peer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """advertised_to_peer must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=[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}'}),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}|:))'}),]), is_leaf=False, yang_name="advertised-to-peer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__advertised_to_peer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_advertised_to_peer(self):
    self.__advertised_to_peer = YANGDynClass(unique=True, base=TypedListType(allowed_type=[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}'}),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}|:))'}),]), is_leaf=False, yang_name="advertised-to-peer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_label(self):
    """
    Getter method for label, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/state/label (string)

    YANG Description: MPLS Label field used for route attributes
    """
    return self.__label
      
  def _set_label(self, v, load=False):
    """
    Setter method for label, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/state/label (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_label() directly.

    YANG Description: MPLS Label field used for route attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """label must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_label(self):
    self.__label = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_label2(self):
    """
    Getter method for label2, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/state/label2 (string)

    YANG Description: MPLS Label2 field used for route attributes
    """
    return self.__label2
      
  def _set_label2(self, v, load=False):
    """
    Setter method for label2, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/state/label2 (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_label2 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_label2() directly.

    YANG Description: MPLS Label2 field used for route attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="label2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """label2 must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="label2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__label2 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_label2(self):
    self.__label2 = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="label2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_bestpath(self):
    """
    Getter method for bestpath, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/state/bestpath (boolean)

    YANG Description: BGP can receive multiple paths to the same destination. This
parameter indicates that this path is the bestpath to install
in the IP routing table and use for traffic forwarding
    """
    return self.__bestpath
      
  def _set_bestpath(self, v, load=False):
    """
    Setter method for bestpath, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/state/bestpath (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bestpath is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bestpath() directly.

    YANG Description: BGP can receive multiple paths to the same destination. This
parameter indicates that this path is the bestpath to install
in the IP routing table and use for traffic forwarding
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="bestpath", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bestpath must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="bestpath", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__bestpath = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bestpath(self):
    self.__bestpath = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="bestpath", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_multipath(self):
    """
    Getter method for multipath, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/state/multipath (boolean)

    YANG Description: BGP can use multiple paths to reach a destination allowing
BGP to load-balance traffic. This parameter indicates that this
path is marked as multipath
    """
    return self.__multipath
      
  def _set_multipath(self, v, load=False):
    """
    Setter method for multipath, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/state/multipath (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multipath is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multipath() directly.

    YANG Description: BGP can use multiple paths to reach a destination allowing
BGP to load-balance traffic. This parameter indicates that this
path is marked as multipath
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="multipath", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multipath must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="multipath", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__multipath = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multipath(self):
    self.__multipath = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="multipath", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_backup(self):
    """
    Getter method for backup, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/state/backup (boolean)

    YANG Description: BGP path marked as a backup path
    """
    return self.__backup
      
  def _set_backup(self, v, load=False):
    """
    Setter method for backup, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/state/backup (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_backup is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_backup() directly.

    YANG Description: BGP path marked as a backup path
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="backup", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """backup must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="backup", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__backup = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_backup(self):
    self.__backup = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="backup", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_last_modified(self):
    """
    Getter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/state/last_modified (oc-types:timeticks64)

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    return self.__last_modified
      
  def _set_last_modified(self, v, load=False):
    """
    Setter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/state/last_modified (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_last_modified is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_last_modified() directly.

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    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="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """last_modified must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__last_modified = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_last_modified(self):
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_valid_route(self):
    """
    Getter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/state/valid_route (boolean)

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    return self.__valid_route
      
  def _set_valid_route(self, v, load=False):
    """
    Setter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/state/valid_route (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_valid_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_valid_route() directly.

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """valid_route must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__valid_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_valid_route(self):
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_invalid_reason(self):
    """
    Getter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/state/invalid_reason (identityref)

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    return self.__invalid_reason
      
  def _set_invalid_reason(self, v, load=False):
    """
    Setter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/state/invalid_reason (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_invalid_reason is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_invalid_reason() directly.

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    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={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """invalid_reason must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__invalid_reason = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_invalid_reason(self):
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_attr_index(self):
    """
    Getter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/state/attr_index (leafref)

    YANG Description: Reference to the common attribute group for the
route
    """
    return self.__attr_index
      
  def _set_attr_index(self, v, load=False):
    """
    Setter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/state/attr_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_index() directly.

    YANG Description: Reference to the common attribute group for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_index(self):
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_community_index(self):
    """
    Getter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/state/community_index (leafref)

    YANG Description: Reference to the community attribute for the route
    """
    return self.__community_index
      
  def _set_community_index(self, v, load=False):
    """
    Setter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/state/community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_community_index() directly.

    YANG Description: Reference to the community attribute for the route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_community_index(self):
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_ext_community_index(self):
    """
    Getter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/state/ext_community_index (leafref)

    YANG Description: Reference to the extended community attribute for the
route
    """
    return self.__ext_community_index
      
  def _set_ext_community_index(self, v, load=False):
    """
    Setter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/state/ext_community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ext_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ext_community_index() directly.

    YANG Description: Reference to the extended community attribute for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ext_community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__ext_community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ext_community_index(self):
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)

  peer_ip = __builtin__.property(_get_peer_ip)
  peer_path_id = __builtin__.property(_get_peer_path_id)
  source_route_distinguisher = __builtin__.property(_get_source_route_distinguisher)
  source_address_family = __builtin__.property(_get_source_address_family)
  esi = __builtin__.property(_get_esi)
  advertised_to_peer = __builtin__.property(_get_advertised_to_peer)
  label = __builtin__.property(_get_label)
  label2 = __builtin__.property(_get_label2)
  bestpath = __builtin__.property(_get_bestpath)
  multipath = __builtin__.property(_get_multipath)
  backup = __builtin__.property(_get_backup)
  last_modified = __builtin__.property(_get_last_modified)
  valid_route = __builtin__.property(_get_valid_route)
  invalid_reason = __builtin__.property(_get_invalid_reason)
  attr_index = __builtin__.property(_get_attr_index)
  community_index = __builtin__.property(_get_community_index)
  ext_community_index = __builtin__.property(_get_ext_community_index)


  _pyangbind_elements = OrderedDict([('peer_ip', peer_ip), ('peer_path_id', peer_path_id), ('source_route_distinguisher', source_route_distinguisher), ('source_address_family', source_address_family), ('esi', esi), ('advertised_to_peer', advertised_to_peer), ('label', label), ('label2', label2), ('bestpath', bestpath), ('multipath', multipath), ('backup', backup), ('last_modified', last_modified), ('valid_route', valid_route), ('invalid_reason', invalid_reason), ('attr_index', attr_index), ('community_index', community_index), ('ext_community_index', ext_community_index), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement_type_two_route_paths_path_unknown_attributes_unknown_attribute_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-two-mac-ip-advertisement/type-two-route/paths/path/unknown-attributes/unknown-attribute/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for unknown route attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__optional','__transitive','__partial','__extended','__attr_type','__attr_len','__attr_value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-two-mac-ip-advertisement', 'type-two-route', 'paths', 'path', 'unknown-attributes', 'unknown-attribute', 'state']

  def _get_optional(self):
    """
    Getter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/unknown_attributes/unknown_attribute/state/optional (boolean)

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    return self.__optional
      
  def _set_optional(self, v, load=False):
    """
    Setter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/unknown_attributes/unknown_attribute/state/optional (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_optional is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_optional() directly.

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """optional must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__optional = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_optional(self):
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_transitive(self):
    """
    Getter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/unknown_attributes/unknown_attribute/state/transitive (boolean)

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    return self.__transitive
      
  def _set_transitive(self, v, load=False):
    """
    Setter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/unknown_attributes/unknown_attribute/state/transitive (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transitive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transitive() directly.

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transitive must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__transitive = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transitive(self):
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_partial(self):
    """
    Getter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/unknown_attributes/unknown_attribute/state/partial (boolean)

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    return self.__partial
      
  def _set_partial(self, v, load=False):
    """
    Setter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/unknown_attributes/unknown_attribute/state/partial (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_partial is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_partial() directly.

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """partial must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__partial = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_partial(self):
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_extended(self):
    """
    Getter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/unknown_attributes/unknown_attribute/state/extended (boolean)

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    return self.__extended
      
  def _set_extended(self, v, load=False):
    """
    Setter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/unknown_attributes/unknown_attribute/state/extended (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended() directly.

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__extended = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended(self):
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/unknown_attributes/unknown_attribute/state/attr_type (uint8)

    YANG Description: 1-octet value encoding the attribute type code
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/unknown_attributes/unknown_attribute/state/attr_type (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() directly.

    YANG Description: 1-octet value encoding the attribute type code
    """
    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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_attr_len(self):
    """
    Getter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/unknown_attributes/unknown_attribute/state/attr_len (uint16)

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    return self.__attr_len
      
  def _set_attr_len(self, v, load=False):
    """
    Setter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/unknown_attributes/unknown_attribute/state/attr_len (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_len() directly.

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_len 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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__attr_len = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_len(self):
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_attr_value(self):
    """
    Getter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/unknown_attributes/unknown_attribute/state/attr_value (binary)

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    return self.__attr_value
      
  def _set_attr_value(self, v, load=False):
    """
    Setter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/unknown_attributes/unknown_attribute/state/attr_value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_value() directly.

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__attr_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_value(self):
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  optional = __builtin__.property(_get_optional)
  transitive = __builtin__.property(_get_transitive)
  partial = __builtin__.property(_get_partial)
  extended = __builtin__.property(_get_extended)
  attr_type = __builtin__.property(_get_attr_type)
  attr_len = __builtin__.property(_get_attr_len)
  attr_value = __builtin__.property(_get_attr_value)


  _pyangbind_elements = OrderedDict([('optional', optional), ('transitive', transitive), ('partial', partial), ('extended', extended), ('attr_type', attr_type), ('attr_len', attr_len), ('attr_value', attr_value), ])


class yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement_type_two_route_paths_path_unknown_attributes_unknown_attribute(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-two-mac-ip-advertisement/type-two-route/paths/path/unknown-attributes/unknown-attribute. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
  """
  __slots__ = ('_path_helper', '_extmethods', '__attr_type','__state',)

  _yang_name = 'unknown-attribute'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement_type_two_route_paths_path_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-two-mac-ip-advertisement', 'type-two-route', 'paths', 'path', 'unknown-attributes', 'unknown-attribute']

  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/unknown_attributes/unknown_attribute/attr_type (leafref)

    YANG Description: Reference to the list key
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/unknown_attributes/unknown_attribute/attr_type (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/unknown_attributes/unknown_attribute/state (container)

    YANG Description: Operational state for unknown route attributes
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/unknown_attributes/unknown_attribute/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 unknown route attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement_type_two_route_paths_path_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement_type_two_route_paths_path_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement_type_two_route_paths_path_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  attr_type = __builtin__.property(_get_attr_type)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('attr_type', attr_type), ('state', state), ])


class yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement_type_two_route_paths_path_unknown_attributes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-two-mac-ip-advertisement/type-two-route/paths/path/unknown-attributes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
  """
  __slots__ = ('_path_helper', '_extmethods', '__unknown_attribute',)

  _yang_name = 'unknown-attributes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement_type_two_route_paths_path_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-two-mac-ip-advertisement', 'type-two-route', 'paths', 'path', 'unknown-attributes']

  def _get_unknown_attribute(self):
    """
    Getter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/unknown_attributes/unknown_attribute (list)

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    return self.__unknown_attribute
      
  def _set_unknown_attribute(self, v, load=False):
    """
    Setter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/unknown_attributes/unknown_attribute (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attribute is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attribute() directly.

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement_type_two_route_paths_path_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attribute must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement_type_two_route_paths_path_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__unknown_attribute = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attribute(self):
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement_type_two_route_paths_path_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  unknown_attribute = __builtin__.property(_get_unknown_attribute)


  _pyangbind_elements = OrderedDict([('unknown_attribute', unknown_attribute), ])


class yc_path_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement_type_two_route_paths_path(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-two-mac-ip-advertisement/type-two-route/paths/path. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of paths
  """
  __slots__ = ('_path_helper', '_extmethods', '__peer_ip','__peer_path_id','__source_route_distinguisher','__source_address_family','__state','__unknown_attributes',)

  _yang_name = 'path'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__peer_ip = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__peer_path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__source_route_distinguisher = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__source_address_family = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement_type_two_route_paths_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement_type_two_route_paths_path_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-two-mac-ip-advertisement', 'type-two-route', 'paths', 'path']

  def _get_peer_ip(self):
    """
    Getter method for peer_ip, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/peer_ip (leafref)

    YANG Description: The source peer ip address of the imported route
    """
    return self.__peer_ip
      
  def _set_peer_ip(self, v, load=False):
    """
    Setter method for peer_ip, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/peer_ip (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_ip is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_ip() directly.

    YANG Description: The source peer ip address of the imported route
    """
    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="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_ip must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__peer_ip = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_ip(self):
    self.__peer_ip = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_peer_path_id(self):
    """
    Getter method for peer_path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/peer_path_id (leafref)

    YANG Description: The source peer path id of the imported route
    """
    return self.__peer_path_id
      
  def _set_peer_path_id(self, v, load=False):
    """
    Setter method for peer_path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/peer_path_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_path_id() directly.

    YANG Description: The source peer path id of the imported route
    """
    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="peer-path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_path_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__peer_path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_path_id(self):
    self.__peer_path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_source_route_distinguisher(self):
    """
    Getter method for source_route_distinguisher, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/source_route_distinguisher (leafref)

    YANG Description: The source route distinguisher is the remote RD source of the
imported route
    """
    return self.__source_route_distinguisher
      
  def _set_source_route_distinguisher(self, v, load=False):
    """
    Setter method for source_route_distinguisher, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/source_route_distinguisher (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_route_distinguisher is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_route_distinguisher() directly.

    YANG Description: The source route distinguisher is the remote RD source of the
imported route
    """
    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="source-route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_route_distinguisher must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__source_route_distinguisher = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_route_distinguisher(self):
    self.__source_route_distinguisher = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_source_address_family(self):
    """
    Getter method for source_address_family, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/source_address_family (leafref)

    YANG Description: The source address-family of the imported route
    """
    return self.__source_address_family
      
  def _set_source_address_family(self, v, load=False):
    """
    Setter method for source_address_family, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/source_address_family (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address_family is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address_family() directly.

    YANG Description: The source address-family of the imported route
    """
    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="source-address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address_family 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-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__source_address_family = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_address_family(self):
    self.__source_address_family = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/state (container)

    YANG Description: BGP path attributes for this route
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/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: BGP path attributes for this route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement_type_two_route_paths_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement_type_two_route_paths_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement_type_two_route_paths_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unknown_attributes(self):
    """
    Getter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/unknown_attributes (container)

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    return self.__unknown_attributes
      
  def _set_unknown_attributes(self, v, load=False):
    """
    Setter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path/unknown_attributes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attributes() directly.

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement_type_two_route_paths_path_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attributes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement_type_two_route_paths_path_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unknown_attributes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attributes(self):
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement_type_two_route_paths_path_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  peer_ip = __builtin__.property(_get_peer_ip)
  peer_path_id = __builtin__.property(_get_peer_path_id)
  source_route_distinguisher = __builtin__.property(_get_source_route_distinguisher)
  source_address_family = __builtin__.property(_get_source_address_family)
  state = __builtin__.property(_get_state)
  unknown_attributes = __builtin__.property(_get_unknown_attributes)


  _pyangbind_elements = OrderedDict([('peer_ip', peer_ip), ('peer_path_id', peer_path_id), ('source_route_distinguisher', source_route_distinguisher), ('source_address_family', source_address_family), ('state', state), ('unknown_attributes', unknown_attributes), ])


class yc_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement_type_two_route_paths(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-two-mac-ip-advertisement/type-two-route/paths. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of BGP path attributes for this route
  """
  __slots__ = ('_path_helper', '_extmethods', '__path',)

  _yang_name = 'paths'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__path = YANGDynClass(base=YANGListType("peer_ip peer_path_id source_route_distinguisher source_address_family",yc_path_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement_type_two_route_paths_path, yang_name="path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='peer-ip peer-path-id source-route-distinguisher source-address-family', extensions=None), is_container='list', yang_name="path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-two-mac-ip-advertisement', 'type-two-route', 'paths']

  def _get_path(self):
    """
    Getter method for path, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path (list)

    YANG Description: List of paths
    """
    return self.__path
      
  def _set_path(self, v, load=False):
    """
    Setter method for path, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths/path (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path() directly.

    YANG Description: List of paths
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("peer_ip peer_path_id source_route_distinguisher source_address_family",yc_path_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement_type_two_route_paths_path, yang_name="path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='peer-ip peer-path-id source-route-distinguisher source-address-family', extensions=None), is_container='list', yang_name="path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("peer_ip peer_path_id source_route_distinguisher source_address_family",yc_path_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement_type_two_route_paths_path, yang_name="path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='peer-ip peer-path-id source-route-distinguisher source-address-family', extensions=None), is_container='list', yang_name="path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__path = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path(self):
    self.__path = YANGDynClass(base=YANGListType("peer_ip peer_path_id source_route_distinguisher source_address_family",yc_path_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement_type_two_route_paths_path, yang_name="path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='peer-ip peer-path-id source-route-distinguisher source-address-family', extensions=None), is_container='list', yang_name="path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  path = __builtin__.property(_get_path)


  _pyangbind_elements = OrderedDict([('path', path), ])


class yc_type_two_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement_type_two_route(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-two-mac-ip-advertisement/type-two-route. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of MAC_IP Advertisement L2VPN EVPN routes

For the purpose of BGP route key processing, only the Ethernet Tag ID,
MAC Address Length, MAC Address, IP Address Length, and IP Address fields
are considered to be part of the prefix in the NLRI
  """
  __slots__ = ('_path_helper', '_extmethods', '__ethernet_tag','__mac_address','__mac_length','__ip_prefix','__ip_length','__state','__paths',)

  _yang_name = 'type-two-route'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__ethernet_tag = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ethernet-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__mac_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__mac_length = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mac-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__ip_prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ip-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__ip_length = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ip-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement_type_two_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__paths = YANGDynClass(base=yc_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement_type_two_route_paths, is_container='container', yang_name="paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-two-mac-ip-advertisement', 'type-two-route']

  def _get_ethernet_tag(self):
    """
    Getter method for ethernet_tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/ethernet_tag (leafref)

    YANG Description: The Ethernet tag identifies a particular broadcast domain.  An EVPN
instance consists of one or more broadcast domains
    """
    return self.__ethernet_tag
      
  def _set_ethernet_tag(self, v, load=False):
    """
    Setter method for ethernet_tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/ethernet_tag (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ethernet_tag is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ethernet_tag() directly.

    YANG Description: The Ethernet tag identifies a particular broadcast domain.  An EVPN
instance consists of one or more broadcast domains
    """
    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="ethernet-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ethernet_tag must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ethernet-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__ethernet_tag = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ethernet_tag(self):
    self.__ethernet_tag = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ethernet-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_mac_address(self):
    """
    Getter method for mac_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/mac_address (leafref)

    YANG Description: The PEs forward packets that they receive based on the destination
MAC address
    """
    return self.__mac_address
      
  def _set_mac_address(self, v, load=False):
    """
    Setter method for mac_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/mac_address (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_address() directly.

    YANG Description: The PEs forward packets that they receive based on the destination
MAC address
    """
    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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_address must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__mac_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mac_address(self):
    self.__mac_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_mac_length(self):
    """
    Getter method for mac_length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/mac_length (leafref)

    YANG Description: The MAC Address Length for the MAC address defined in mac-address
    """
    return self.__mac_length
      
  def _set_mac_length(self, v, load=False):
    """
    Setter method for mac_length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/mac_length (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_length is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_length() directly.

    YANG Description: The MAC Address Length for the MAC address defined in mac-address
    """
    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="mac-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_length must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mac-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__mac_length = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mac_length(self):
    self.__mac_length = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mac-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_ip_prefix(self):
    """
    Getter method for ip_prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/ip_prefix (leafref)

    YANG Description: The IPv4 or IPv6 address carried in a MAC_IP Advertisement route
    """
    return self.__ip_prefix
      
  def _set_ip_prefix(self, v, load=False):
    """
    Setter method for ip_prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/ip_prefix (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ip_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ip_prefix() directly.

    YANG Description: The IPv4 or IPv6 address carried in a MAC_IP Advertisement route
    """
    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="ip-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ip_prefix must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ip-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__ip_prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ip_prefix(self):
    self.__ip_prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ip-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_ip_length(self):
    """
    Getter method for ip_length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/ip_length (leafref)

    YANG Description: The IPv4 or IPv6 address prefix length for the address defined in
ip-prefix
    """
    return self.__ip_length
      
  def _set_ip_length(self, v, load=False):
    """
    Setter method for ip_length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/ip_length (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ip_length is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ip_length() directly.

    YANG Description: The IPv4 or IPv6 address prefix length for the address defined in
ip-prefix
    """
    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="ip-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ip_length must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ip-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__ip_length = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ip_length(self):
    self.__ip_length = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ip-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/state (container)

    YANG Description: Operational state data MAC_IP Advertisement L2VPN EVPN route
entries in the BGP LOC-RIB
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/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 MAC_IP Advertisement L2VPN EVPN route
entries in the BGP LOC-RIB
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement_type_two_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement_type_two_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement_type_two_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_paths(self):
    """
    Getter method for paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths (container)

    YANG Description: List of BGP path attributes for this route
    """
    return self.__paths
      
  def _set_paths(self, v, load=False):
    """
    Setter method for paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route/paths (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_paths() directly.

    YANG Description: List of BGP path attributes for this route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement_type_two_route_paths, is_container='container', yang_name="paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """paths must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement_type_two_route_paths, is_container='container', yang_name="paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_paths(self):
    self.__paths = YANGDynClass(base=yc_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement_type_two_route_paths, is_container='container', yang_name="paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  ethernet_tag = __builtin__.property(_get_ethernet_tag)
  mac_address = __builtin__.property(_get_mac_address)
  mac_length = __builtin__.property(_get_mac_length)
  ip_prefix = __builtin__.property(_get_ip_prefix)
  ip_length = __builtin__.property(_get_ip_length)
  state = __builtin__.property(_get_state)
  paths = __builtin__.property(_get_paths)


  _pyangbind_elements = OrderedDict([('ethernet_tag', ethernet_tag), ('mac_address', mac_address), ('mac_length', mac_length), ('ip_prefix', ip_prefix), ('ip_length', ip_length), ('state', state), ('paths', paths), ])


class yc_type_two_mac_ip_advertisement_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-two-mac-ip-advertisement. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top level container for MAC_IP Advertisement L2VPN EVPN routes
  """
  __slots__ = ('_path_helper', '_extmethods', '__type_two_route',)

  _yang_name = 'type-two-mac-ip-advertisement'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type_two_route = YANGDynClass(base=YANGListType("ethernet_tag mac_address mac_length ip_prefix ip_length",yc_type_two_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement_type_two_route, yang_name="type-two-route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='ethernet-tag mac-address mac-length ip-prefix ip-length', extensions=None), is_container='list', yang_name="type-two-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-two-mac-ip-advertisement']

  def _get_type_two_route(self):
    """
    Getter method for type_two_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route (list)

    YANG Description: List of MAC_IP Advertisement L2VPN EVPN routes

For the purpose of BGP route key processing, only the Ethernet Tag ID,
MAC Address Length, MAC Address, IP Address Length, and IP Address fields
are considered to be part of the prefix in the NLRI
    """
    return self.__type_two_route
      
  def _set_type_two_route(self, v, load=False):
    """
    Setter method for type_two_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement/type_two_route (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type_two_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type_two_route() directly.

    YANG Description: List of MAC_IP Advertisement L2VPN EVPN routes

For the purpose of BGP route key processing, only the Ethernet Tag ID,
MAC Address Length, MAC Address, IP Address Length, and IP Address fields
are considered to be part of the prefix in the NLRI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("ethernet_tag mac_address mac_length ip_prefix ip_length",yc_type_two_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement_type_two_route, yang_name="type-two-route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='ethernet-tag mac-address mac-length ip-prefix ip-length', extensions=None), is_container='list', yang_name="type-two-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type_two_route must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("ethernet_tag mac_address mac_length ip_prefix ip_length",yc_type_two_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement_type_two_route, yang_name="type-two-route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='ethernet-tag mac-address mac-length ip-prefix ip-length', extensions=None), is_container='list', yang_name="type-two-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__type_two_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type_two_route(self):
    self.__type_two_route = YANGDynClass(base=YANGListType("ethernet_tag mac_address mac_length ip_prefix ip_length",yc_type_two_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement_type_two_route, yang_name="type-two-route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='ethernet-tag mac-address mac-length ip-prefix ip-length', extensions=None), is_container='list', yang_name="type-two-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  type_two_route = __builtin__.property(_get_type_two_route)


  _pyangbind_elements = OrderedDict([('type_two_route', type_two_route), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag_type_three_route_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-three-inclusive-multicast-ethernet-tag/type-three-route/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for Inclusive Multicast Ethernet Tag L2VPN
EVPN entries in the BGP LOC-RIB
  """
  __slots__ = ('_path_helper', '_extmethods', '__ethernet_tag','__originating_router_ip','__originator_ip_length',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__ethernet_tag = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="ethernet-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:ethernet-tag', is_config=False)
    self.__originating_router_ip = 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])'}),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="originating-router-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=False)
    self.__originator_ip_length = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="originator-ip-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-three-inclusive-multicast-ethernet-tag', 'type-three-route', 'state']

  def _get_ethernet_tag(self):
    """
    Getter method for ethernet_tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/state/ethernet_tag (oc-evpn-types:ethernet-tag)

    YANG Description: The Ethernet tag identifying the broadcast domain for this
route
    """
    return self.__ethernet_tag
      
  def _set_ethernet_tag(self, v, load=False):
    """
    Setter method for ethernet_tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/state/ethernet_tag (oc-evpn-types:ethernet-tag)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ethernet_tag is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ethernet_tag() directly.

    YANG Description: The Ethernet tag identifying the broadcast domain for this
route
    """
    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="ethernet-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:ethernet-tag', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ethernet_tag must be of a type compatible with oc-evpn-types:ethernet-tag""",
          'defined-type': "oc-evpn-types:ethernet-tag",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="ethernet-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:ethernet-tag', is_config=False)""",
        })

    self.__ethernet_tag = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ethernet_tag(self):
    self.__ethernet_tag = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="ethernet-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:ethernet-tag', is_config=False)


  def _get_originating_router_ip(self):
    """
    Getter method for originating_router_ip, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/state/originating_router_ip (oc-inet:ip-prefix)

    YANG Description: The Originating Router's IP Address
    """
    return self.__originating_router_ip
      
  def _set_originating_router_ip(self, v, load=False):
    """
    Setter method for originating_router_ip, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/state/originating_router_ip (oc-inet:ip-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_originating_router_ip is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_originating_router_ip() directly.

    YANG Description: The Originating Router's IP Address
    """
    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])'}),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="originating-router-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """originating_router_ip must be of a type compatible with oc-inet:ip-prefix""",
          'defined-type': "oc-inet:ip-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])'}),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="originating-router-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=False)""",
        })

    self.__originating_router_ip = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_originating_router_ip(self):
    self.__originating_router_ip = 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])'}),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="originating-router-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=False)


  def _get_originator_ip_length(self):
    """
    Getter method for originator_ip_length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/state/originator_ip_length (uint32)

    YANG Description: The ip-prefix length for the route
    """
    return self.__originator_ip_length
      
  def _set_originator_ip_length(self, v, load=False):
    """
    Setter method for originator_ip_length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/state/originator_ip_length (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_originator_ip_length is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_originator_ip_length() directly.

    YANG Description: The ip-prefix length for the route
    """
    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="originator-ip-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """originator_ip_length 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="originator-ip-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__originator_ip_length = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_originator_ip_length(self):
    self.__originator_ip_length = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="originator-ip-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  ethernet_tag = __builtin__.property(_get_ethernet_tag)
  originating_router_ip = __builtin__.property(_get_originating_router_ip)
  originator_ip_length = __builtin__.property(_get_originator_ip_length)


  _pyangbind_elements = OrderedDict([('ethernet_tag', ethernet_tag), ('originating_router_ip', originating_router_ip), ('originator_ip_length', originator_ip_length), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag_type_three_route_paths_path_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-three-inclusive-multicast-ethernet-tag/type-three-route/paths/path/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: BGP path attributes for this route
  """
  __slots__ = ('_path_helper', '_extmethods', '__peer_ip','__peer_path_id','__source_route_distinguisher','__source_address_family','__advertised_to_peer','__label','__label2','__bestpath','__multipath','__backup','__last_modified','__valid_route','__invalid_reason','__attr_index','__community_index','__ext_community_index',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__peer_ip = 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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__peer_path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="peer-path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__source_route_distinguisher = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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])'}),], is_leaf=True, yang_name="source-route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', is_config=False)
    self.__source_address_family = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="source-address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__advertised_to_peer = YANGDynClass(unique=True, base=TypedListType(allowed_type=[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}'}),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}|:))'}),]), is_leaf=False, yang_name="advertised-to-peer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__label = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__label2 = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="label2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__bestpath = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="bestpath", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__multipath = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="multipath", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__backup = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="backup", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-three-inclusive-multicast-ethernet-tag', 'type-three-route', 'paths', 'path', 'state']

  def _get_peer_ip(self):
    """
    Getter method for peer_ip, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/state/peer_ip (oc-inet:ip-address)

    YANG Description: The source peer ip address of the imported route
    """
    return self.__peer_ip
      
  def _set_peer_ip(self, v, load=False):
    """
    Setter method for peer_ip, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/state/peer_ip (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_ip is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_ip() directly.

    YANG Description: The source peer ip address of the imported route
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_ip must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__peer_ip = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_ip(self):
    self.__peer_ip = 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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_peer_path_id(self):
    """
    Getter method for peer_path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/state/peer_path_id (uint32)

    YANG Description: The source peer path id of the imported route
    """
    return self.__peer_path_id
      
  def _set_peer_path_id(self, v, load=False):
    """
    Setter method for peer_path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/state/peer_path_id (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_path_id() directly.

    YANG Description: The source peer path id of the imported route
    """
    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="peer-path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_path_id 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="peer-path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__peer_path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_path_id(self):
    self.__peer_path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="peer-path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_source_route_distinguisher(self):
    """
    Getter method for source_route_distinguisher, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/state/source_route_distinguisher (oc-ni-types:route-distinguisher)

    YANG Description: The source route distinguisher is the remote RD source of the
imported route
    """
    return self.__source_route_distinguisher
      
  def _set_source_route_distinguisher(self, v, load=False):
    """
    Setter method for source_route_distinguisher, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/state/source_route_distinguisher (oc-ni-types:route-distinguisher)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_route_distinguisher is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_route_distinguisher() directly.

    YANG Description: The source route distinguisher is the remote RD source of the
imported route
    """
    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,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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])'}),], is_leaf=True, yang_name="source-route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_route_distinguisher must be of a type compatible with oc-ni-types:route-distinguisher""",
          'defined-type': "oc-ni-types:route-distinguisher",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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])'}),], is_leaf=True, yang_name="source-route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', is_config=False)""",
        })

    self.__source_route_distinguisher = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_route_distinguisher(self):
    self.__source_route_distinguisher = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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])'}),], is_leaf=True, yang_name="source-route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', is_config=False)


  def _get_source_address_family(self):
    """
    Getter method for source_address_family, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/state/source_address_family (identityref)

    YANG Description: The source address-family of the imported route
    """
    return self.__source_address_family
      
  def _set_source_address_family(self, v, load=False):
    """
    Setter method for source_address_family, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/state/source_address_family (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address_family is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address_family() directly.

    YANG Description: The source address-family of the imported route
    """
    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_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="source-address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address_family must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="source-address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__source_address_family = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_address_family(self):
    self.__source_address_family = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="source-address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_advertised_to_peer(self):
    """
    Getter method for advertised_to_peer, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/state/advertised_to_peer (oc-inet:ip-address)

    YANG Description: List of peers to which this path is advertised
    """
    return self.__advertised_to_peer
      
  def _set_advertised_to_peer(self, v, load=False):
    """
    Setter method for advertised_to_peer, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/state/advertised_to_peer (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_advertised_to_peer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_advertised_to_peer() directly.

    YANG Description: List of peers to which this path is advertised
    """
    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_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}'}),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}|:))'}),]), is_leaf=False, yang_name="advertised-to-peer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """advertised_to_peer must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=[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}'}),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}|:))'}),]), is_leaf=False, yang_name="advertised-to-peer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__advertised_to_peer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_advertised_to_peer(self):
    self.__advertised_to_peer = YANGDynClass(unique=True, base=TypedListType(allowed_type=[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}'}),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}|:))'}),]), is_leaf=False, yang_name="advertised-to-peer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_label(self):
    """
    Getter method for label, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/state/label (string)

    YANG Description: MPLS Label field used for route attributes
    """
    return self.__label
      
  def _set_label(self, v, load=False):
    """
    Setter method for label, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/state/label (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_label() directly.

    YANG Description: MPLS Label field used for route attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """label must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_label(self):
    self.__label = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_label2(self):
    """
    Getter method for label2, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/state/label2 (string)

    YANG Description: MPLS Label2 field used for route attributes
    """
    return self.__label2
      
  def _set_label2(self, v, load=False):
    """
    Setter method for label2, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/state/label2 (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_label2 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_label2() directly.

    YANG Description: MPLS Label2 field used for route attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="label2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """label2 must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="label2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__label2 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_label2(self):
    self.__label2 = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="label2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_bestpath(self):
    """
    Getter method for bestpath, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/state/bestpath (boolean)

    YANG Description: BGP can receive multiple paths to the same destination. This
parameter indicates that this path is the bestpath to install
in the IP routing table and use for traffic forwarding
    """
    return self.__bestpath
      
  def _set_bestpath(self, v, load=False):
    """
    Setter method for bestpath, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/state/bestpath (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bestpath is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bestpath() directly.

    YANG Description: BGP can receive multiple paths to the same destination. This
parameter indicates that this path is the bestpath to install
in the IP routing table and use for traffic forwarding
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="bestpath", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bestpath must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="bestpath", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__bestpath = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bestpath(self):
    self.__bestpath = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="bestpath", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_multipath(self):
    """
    Getter method for multipath, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/state/multipath (boolean)

    YANG Description: BGP can use multiple paths to reach a destination allowing
BGP to load-balance traffic. This parameter indicates that this
path is marked as multipath
    """
    return self.__multipath
      
  def _set_multipath(self, v, load=False):
    """
    Setter method for multipath, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/state/multipath (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multipath is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multipath() directly.

    YANG Description: BGP can use multiple paths to reach a destination allowing
BGP to load-balance traffic. This parameter indicates that this
path is marked as multipath
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="multipath", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multipath must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="multipath", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__multipath = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multipath(self):
    self.__multipath = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="multipath", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_backup(self):
    """
    Getter method for backup, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/state/backup (boolean)

    YANG Description: BGP path marked as a backup path
    """
    return self.__backup
      
  def _set_backup(self, v, load=False):
    """
    Setter method for backup, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/state/backup (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_backup is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_backup() directly.

    YANG Description: BGP path marked as a backup path
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="backup", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """backup must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="backup", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__backup = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_backup(self):
    self.__backup = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="backup", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_last_modified(self):
    """
    Getter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/state/last_modified (oc-types:timeticks64)

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    return self.__last_modified
      
  def _set_last_modified(self, v, load=False):
    """
    Setter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/state/last_modified (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_last_modified is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_last_modified() directly.

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    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="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """last_modified must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__last_modified = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_last_modified(self):
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_valid_route(self):
    """
    Getter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/state/valid_route (boolean)

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    return self.__valid_route
      
  def _set_valid_route(self, v, load=False):
    """
    Setter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/state/valid_route (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_valid_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_valid_route() directly.

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """valid_route must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__valid_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_valid_route(self):
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_invalid_reason(self):
    """
    Getter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/state/invalid_reason (identityref)

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    return self.__invalid_reason
      
  def _set_invalid_reason(self, v, load=False):
    """
    Setter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/state/invalid_reason (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_invalid_reason is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_invalid_reason() directly.

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    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={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """invalid_reason must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__invalid_reason = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_invalid_reason(self):
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_attr_index(self):
    """
    Getter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/state/attr_index (leafref)

    YANG Description: Reference to the common attribute group for the
route
    """
    return self.__attr_index
      
  def _set_attr_index(self, v, load=False):
    """
    Setter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/state/attr_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_index() directly.

    YANG Description: Reference to the common attribute group for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_index(self):
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_community_index(self):
    """
    Getter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/state/community_index (leafref)

    YANG Description: Reference to the community attribute for the route
    """
    return self.__community_index
      
  def _set_community_index(self, v, load=False):
    """
    Setter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/state/community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_community_index() directly.

    YANG Description: Reference to the community attribute for the route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_community_index(self):
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_ext_community_index(self):
    """
    Getter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/state/ext_community_index (leafref)

    YANG Description: Reference to the extended community attribute for the
route
    """
    return self.__ext_community_index
      
  def _set_ext_community_index(self, v, load=False):
    """
    Setter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/state/ext_community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ext_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ext_community_index() directly.

    YANG Description: Reference to the extended community attribute for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ext_community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__ext_community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ext_community_index(self):
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)

  peer_ip = __builtin__.property(_get_peer_ip)
  peer_path_id = __builtin__.property(_get_peer_path_id)
  source_route_distinguisher = __builtin__.property(_get_source_route_distinguisher)
  source_address_family = __builtin__.property(_get_source_address_family)
  advertised_to_peer = __builtin__.property(_get_advertised_to_peer)
  label = __builtin__.property(_get_label)
  label2 = __builtin__.property(_get_label2)
  bestpath = __builtin__.property(_get_bestpath)
  multipath = __builtin__.property(_get_multipath)
  backup = __builtin__.property(_get_backup)
  last_modified = __builtin__.property(_get_last_modified)
  valid_route = __builtin__.property(_get_valid_route)
  invalid_reason = __builtin__.property(_get_invalid_reason)
  attr_index = __builtin__.property(_get_attr_index)
  community_index = __builtin__.property(_get_community_index)
  ext_community_index = __builtin__.property(_get_ext_community_index)


  _pyangbind_elements = OrderedDict([('peer_ip', peer_ip), ('peer_path_id', peer_path_id), ('source_route_distinguisher', source_route_distinguisher), ('source_address_family', source_address_family), ('advertised_to_peer', advertised_to_peer), ('label', label), ('label2', label2), ('bestpath', bestpath), ('multipath', multipath), ('backup', backup), ('last_modified', last_modified), ('valid_route', valid_route), ('invalid_reason', invalid_reason), ('attr_index', attr_index), ('community_index', community_index), ('ext_community_index', ext_community_index), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag_type_three_route_paths_path_unknown_attributes_unknown_attribute_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-three-inclusive-multicast-ethernet-tag/type-three-route/paths/path/unknown-attributes/unknown-attribute/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for unknown route attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__optional','__transitive','__partial','__extended','__attr_type','__attr_len','__attr_value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-three-inclusive-multicast-ethernet-tag', 'type-three-route', 'paths', 'path', 'unknown-attributes', 'unknown-attribute', 'state']

  def _get_optional(self):
    """
    Getter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/unknown_attributes/unknown_attribute/state/optional (boolean)

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    return self.__optional
      
  def _set_optional(self, v, load=False):
    """
    Setter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/unknown_attributes/unknown_attribute/state/optional (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_optional is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_optional() directly.

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """optional must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__optional = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_optional(self):
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_transitive(self):
    """
    Getter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/unknown_attributes/unknown_attribute/state/transitive (boolean)

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    return self.__transitive
      
  def _set_transitive(self, v, load=False):
    """
    Setter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/unknown_attributes/unknown_attribute/state/transitive (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transitive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transitive() directly.

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transitive must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__transitive = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transitive(self):
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_partial(self):
    """
    Getter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/unknown_attributes/unknown_attribute/state/partial (boolean)

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    return self.__partial
      
  def _set_partial(self, v, load=False):
    """
    Setter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/unknown_attributes/unknown_attribute/state/partial (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_partial is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_partial() directly.

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """partial must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__partial = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_partial(self):
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_extended(self):
    """
    Getter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/unknown_attributes/unknown_attribute/state/extended (boolean)

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    return self.__extended
      
  def _set_extended(self, v, load=False):
    """
    Setter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/unknown_attributes/unknown_attribute/state/extended (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended() directly.

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__extended = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended(self):
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/unknown_attributes/unknown_attribute/state/attr_type (uint8)

    YANG Description: 1-octet value encoding the attribute type code
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/unknown_attributes/unknown_attribute/state/attr_type (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() directly.

    YANG Description: 1-octet value encoding the attribute type code
    """
    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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_attr_len(self):
    """
    Getter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/unknown_attributes/unknown_attribute/state/attr_len (uint16)

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    return self.__attr_len
      
  def _set_attr_len(self, v, load=False):
    """
    Setter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/unknown_attributes/unknown_attribute/state/attr_len (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_len() directly.

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_len 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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__attr_len = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_len(self):
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_attr_value(self):
    """
    Getter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/unknown_attributes/unknown_attribute/state/attr_value (binary)

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    return self.__attr_value
      
  def _set_attr_value(self, v, load=False):
    """
    Setter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/unknown_attributes/unknown_attribute/state/attr_value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_value() directly.

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__attr_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_value(self):
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  optional = __builtin__.property(_get_optional)
  transitive = __builtin__.property(_get_transitive)
  partial = __builtin__.property(_get_partial)
  extended = __builtin__.property(_get_extended)
  attr_type = __builtin__.property(_get_attr_type)
  attr_len = __builtin__.property(_get_attr_len)
  attr_value = __builtin__.property(_get_attr_value)


  _pyangbind_elements = OrderedDict([('optional', optional), ('transitive', transitive), ('partial', partial), ('extended', extended), ('attr_type', attr_type), ('attr_len', attr_len), ('attr_value', attr_value), ])


class yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag_type_three_route_paths_path_unknown_attributes_unknown_attribute(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-three-inclusive-multicast-ethernet-tag/type-three-route/paths/path/unknown-attributes/unknown-attribute. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
  """
  __slots__ = ('_path_helper', '_extmethods', '__attr_type','__state',)

  _yang_name = 'unknown-attribute'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag_type_three_route_paths_path_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-three-inclusive-multicast-ethernet-tag', 'type-three-route', 'paths', 'path', 'unknown-attributes', 'unknown-attribute']

  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/unknown_attributes/unknown_attribute/attr_type (leafref)

    YANG Description: Reference to the list key
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/unknown_attributes/unknown_attribute/attr_type (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/unknown_attributes/unknown_attribute/state (container)

    YANG Description: Operational state for unknown route attributes
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/unknown_attributes/unknown_attribute/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 unknown route attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag_type_three_route_paths_path_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag_type_three_route_paths_path_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag_type_three_route_paths_path_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  attr_type = __builtin__.property(_get_attr_type)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('attr_type', attr_type), ('state', state), ])


class yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag_type_three_route_paths_path_unknown_attributes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-three-inclusive-multicast-ethernet-tag/type-three-route/paths/path/unknown-attributes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
  """
  __slots__ = ('_path_helper', '_extmethods', '__unknown_attribute',)

  _yang_name = 'unknown-attributes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag_type_three_route_paths_path_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-three-inclusive-multicast-ethernet-tag', 'type-three-route', 'paths', 'path', 'unknown-attributes']

  def _get_unknown_attribute(self):
    """
    Getter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/unknown_attributes/unknown_attribute (list)

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    return self.__unknown_attribute
      
  def _set_unknown_attribute(self, v, load=False):
    """
    Setter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/unknown_attributes/unknown_attribute (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attribute is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attribute() directly.

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag_type_three_route_paths_path_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attribute must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag_type_three_route_paths_path_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__unknown_attribute = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attribute(self):
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag_type_three_route_paths_path_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  unknown_attribute = __builtin__.property(_get_unknown_attribute)


  _pyangbind_elements = OrderedDict([('unknown_attribute', unknown_attribute), ])


class yc_path_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag_type_three_route_paths_path(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-three-inclusive-multicast-ethernet-tag/type-three-route/paths/path. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of paths
  """
  __slots__ = ('_path_helper', '_extmethods', '__peer_ip','__peer_path_id','__source_route_distinguisher','__source_address_family','__state','__unknown_attributes',)

  _yang_name = 'path'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__peer_ip = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__peer_path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__source_route_distinguisher = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__source_address_family = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag_type_three_route_paths_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag_type_three_route_paths_path_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-three-inclusive-multicast-ethernet-tag', 'type-three-route', 'paths', 'path']

  def _get_peer_ip(self):
    """
    Getter method for peer_ip, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/peer_ip (leafref)

    YANG Description: The source peer ip address of the imported route
    """
    return self.__peer_ip
      
  def _set_peer_ip(self, v, load=False):
    """
    Setter method for peer_ip, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/peer_ip (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_ip is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_ip() directly.

    YANG Description: The source peer ip address of the imported route
    """
    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="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_ip must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__peer_ip = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_ip(self):
    self.__peer_ip = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_peer_path_id(self):
    """
    Getter method for peer_path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/peer_path_id (leafref)

    YANG Description: The source peer path id of the imported route
    """
    return self.__peer_path_id
      
  def _set_peer_path_id(self, v, load=False):
    """
    Setter method for peer_path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/peer_path_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_path_id() directly.

    YANG Description: The source peer path id of the imported route
    """
    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="peer-path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_path_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__peer_path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_path_id(self):
    self.__peer_path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_source_route_distinguisher(self):
    """
    Getter method for source_route_distinguisher, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/source_route_distinguisher (leafref)

    YANG Description: The source route distinguisher is the remote RD source of the
imported route
    """
    return self.__source_route_distinguisher
      
  def _set_source_route_distinguisher(self, v, load=False):
    """
    Setter method for source_route_distinguisher, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/source_route_distinguisher (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_route_distinguisher is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_route_distinguisher() directly.

    YANG Description: The source route distinguisher is the remote RD source of the
imported route
    """
    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="source-route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_route_distinguisher must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__source_route_distinguisher = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_route_distinguisher(self):
    self.__source_route_distinguisher = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_source_address_family(self):
    """
    Getter method for source_address_family, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/source_address_family (leafref)

    YANG Description: The source address-family of the imported route
    """
    return self.__source_address_family
      
  def _set_source_address_family(self, v, load=False):
    """
    Setter method for source_address_family, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/source_address_family (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address_family is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address_family() directly.

    YANG Description: The source address-family of the imported route
    """
    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="source-address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address_family 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-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__source_address_family = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_address_family(self):
    self.__source_address_family = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/state (container)

    YANG Description: BGP path attributes for this route
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/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: BGP path attributes for this route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag_type_three_route_paths_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag_type_three_route_paths_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag_type_three_route_paths_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unknown_attributes(self):
    """
    Getter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/unknown_attributes (container)

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    return self.__unknown_attributes
      
  def _set_unknown_attributes(self, v, load=False):
    """
    Setter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path/unknown_attributes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attributes() directly.

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag_type_three_route_paths_path_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attributes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag_type_three_route_paths_path_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unknown_attributes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attributes(self):
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag_type_three_route_paths_path_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  peer_ip = __builtin__.property(_get_peer_ip)
  peer_path_id = __builtin__.property(_get_peer_path_id)
  source_route_distinguisher = __builtin__.property(_get_source_route_distinguisher)
  source_address_family = __builtin__.property(_get_source_address_family)
  state = __builtin__.property(_get_state)
  unknown_attributes = __builtin__.property(_get_unknown_attributes)


  _pyangbind_elements = OrderedDict([('peer_ip', peer_ip), ('peer_path_id', peer_path_id), ('source_route_distinguisher', source_route_distinguisher), ('source_address_family', source_address_family), ('state', state), ('unknown_attributes', unknown_attributes), ])


class yc_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag_type_three_route_paths(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-three-inclusive-multicast-ethernet-tag/type-three-route/paths. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of BGP path attributes for this route
  """
  __slots__ = ('_path_helper', '_extmethods', '__path',)

  _yang_name = 'paths'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__path = YANGDynClass(base=YANGListType("peer_ip peer_path_id source_route_distinguisher source_address_family",yc_path_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag_type_three_route_paths_path, yang_name="path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='peer-ip peer-path-id source-route-distinguisher source-address-family', extensions=None), is_container='list', yang_name="path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-three-inclusive-multicast-ethernet-tag', 'type-three-route', 'paths']

  def _get_path(self):
    """
    Getter method for path, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path (list)

    YANG Description: List of paths
    """
    return self.__path
      
  def _set_path(self, v, load=False):
    """
    Setter method for path, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths/path (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path() directly.

    YANG Description: List of paths
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("peer_ip peer_path_id source_route_distinguisher source_address_family",yc_path_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag_type_three_route_paths_path, yang_name="path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='peer-ip peer-path-id source-route-distinguisher source-address-family', extensions=None), is_container='list', yang_name="path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("peer_ip peer_path_id source_route_distinguisher source_address_family",yc_path_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag_type_three_route_paths_path, yang_name="path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='peer-ip peer-path-id source-route-distinguisher source-address-family', extensions=None), is_container='list', yang_name="path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__path = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path(self):
    self.__path = YANGDynClass(base=YANGListType("peer_ip peer_path_id source_route_distinguisher source_address_family",yc_path_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag_type_three_route_paths_path, yang_name="path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='peer-ip peer-path-id source-route-distinguisher source-address-family', extensions=None), is_container='list', yang_name="path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  path = __builtin__.property(_get_path)


  _pyangbind_elements = OrderedDict([('path', path), ])


class yc_type_three_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag_type_three_route(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-three-inclusive-multicast-ethernet-tag/type-three-route. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of Inclusive Multicast Ethernet Tag L2VPN EVPN routes

For the purpose of BGP route key processing, only the Ethernet Tag ID,
IP Address Length, and Originating Router's IP Address fields are
considered to be part of the prefix in the NLRI
  """
  __slots__ = ('_path_helper', '_extmethods', '__ethernet_tag','__originating_router_ip','__originator_ip_length','__state','__paths',)

  _yang_name = 'type-three-route'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__ethernet_tag = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ethernet-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__originating_router_ip = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="originating-router-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__originator_ip_length = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="originator-ip-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag_type_three_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__paths = YANGDynClass(base=yc_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag_type_three_route_paths, is_container='container', yang_name="paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-three-inclusive-multicast-ethernet-tag', 'type-three-route']

  def _get_ethernet_tag(self):
    """
    Getter method for ethernet_tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/ethernet_tag (leafref)

    YANG Description: The Ethernet tag identifies a particular broadcast domain.  An EVPN
instance consists of one or more broadcast domains
    """
    return self.__ethernet_tag
      
  def _set_ethernet_tag(self, v, load=False):
    """
    Setter method for ethernet_tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/ethernet_tag (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ethernet_tag is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ethernet_tag() directly.

    YANG Description: The Ethernet tag identifies a particular broadcast domain.  An EVPN
instance consists of one or more broadcast domains
    """
    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="ethernet-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ethernet_tag must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ethernet-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__ethernet_tag = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ethernet_tag(self):
    self.__ethernet_tag = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ethernet-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_originating_router_ip(self):
    """
    Getter method for originating_router_ip, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/originating_router_ip (leafref)

    YANG Description: Reference to the originating-router-ip list key
    """
    return self.__originating_router_ip
      
  def _set_originating_router_ip(self, v, load=False):
    """
    Setter method for originating_router_ip, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/originating_router_ip (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_originating_router_ip is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_originating_router_ip() directly.

    YANG Description: Reference to the originating-router-ip 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="originating-router-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """originating_router_ip must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="originating-router-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__originating_router_ip = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_originating_router_ip(self):
    self.__originating_router_ip = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="originating-router-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_originator_ip_length(self):
    """
    Getter method for originator_ip_length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/originator_ip_length (leafref)

    YANG Description: Reference to the originating router ip length list key
    """
    return self.__originator_ip_length
      
  def _set_originator_ip_length(self, v, load=False):
    """
    Setter method for originator_ip_length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/originator_ip_length (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_originator_ip_length is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_originator_ip_length() directly.

    YANG Description: Reference to the originating router ip length 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="originator-ip-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """originator_ip_length must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="originator-ip-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__originator_ip_length = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_originator_ip_length(self):
    self.__originator_ip_length = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="originator-ip-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/state (container)

    YANG Description: Operational state data for Inclusive Multicast Ethernet Tag L2VPN
EVPN entries in the BGP LOC-RIB
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/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 Inclusive Multicast Ethernet Tag L2VPN
EVPN entries in the BGP LOC-RIB
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag_type_three_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag_type_three_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag_type_three_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_paths(self):
    """
    Getter method for paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths (container)

    YANG Description: List of BGP path attributes for this route
    """
    return self.__paths
      
  def _set_paths(self, v, load=False):
    """
    Setter method for paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route/paths (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_paths() directly.

    YANG Description: List of BGP path attributes for this route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag_type_three_route_paths, is_container='container', yang_name="paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """paths must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag_type_three_route_paths, is_container='container', yang_name="paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_paths(self):
    self.__paths = YANGDynClass(base=yc_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag_type_three_route_paths, is_container='container', yang_name="paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  ethernet_tag = __builtin__.property(_get_ethernet_tag)
  originating_router_ip = __builtin__.property(_get_originating_router_ip)
  originator_ip_length = __builtin__.property(_get_originator_ip_length)
  state = __builtin__.property(_get_state)
  paths = __builtin__.property(_get_paths)


  _pyangbind_elements = OrderedDict([('ethernet_tag', ethernet_tag), ('originating_router_ip', originating_router_ip), ('originator_ip_length', originator_ip_length), ('state', state), ('paths', paths), ])


class yc_type_three_inclusive_multicast_ethernet_tag_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-three-inclusive-multicast-ethernet-tag. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top level container for Inclusive Multicast Ethernet Tag L2VPN EVPN
routes
  """
  __slots__ = ('_path_helper', '_extmethods', '__type_three_route',)

  _yang_name = 'type-three-inclusive-multicast-ethernet-tag'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type_three_route = YANGDynClass(base=YANGListType("ethernet_tag originating_router_ip originator_ip_length",yc_type_three_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag_type_three_route, yang_name="type-three-route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='ethernet-tag originating-router-ip originator-ip-length', extensions=None), is_container='list', yang_name="type-three-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-three-inclusive-multicast-ethernet-tag']

  def _get_type_three_route(self):
    """
    Getter method for type_three_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route (list)

    YANG Description: List of Inclusive Multicast Ethernet Tag L2VPN EVPN routes

For the purpose of BGP route key processing, only the Ethernet Tag ID,
IP Address Length, and Originating Router's IP Address fields are
considered to be part of the prefix in the NLRI
    """
    return self.__type_three_route
      
  def _set_type_three_route(self, v, load=False):
    """
    Setter method for type_three_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag/type_three_route (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type_three_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type_three_route() directly.

    YANG Description: List of Inclusive Multicast Ethernet Tag L2VPN EVPN routes

For the purpose of BGP route key processing, only the Ethernet Tag ID,
IP Address Length, and Originating Router's IP Address fields are
considered to be part of the prefix in the NLRI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("ethernet_tag originating_router_ip originator_ip_length",yc_type_three_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag_type_three_route, yang_name="type-three-route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='ethernet-tag originating-router-ip originator-ip-length', extensions=None), is_container='list', yang_name="type-three-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type_three_route must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("ethernet_tag originating_router_ip originator_ip_length",yc_type_three_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag_type_three_route, yang_name="type-three-route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='ethernet-tag originating-router-ip originator-ip-length', extensions=None), is_container='list', yang_name="type-three-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__type_three_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type_three_route(self):
    self.__type_three_route = YANGDynClass(base=YANGListType("ethernet_tag originating_router_ip originator_ip_length",yc_type_three_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag_type_three_route, yang_name="type-three-route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='ethernet-tag originating-router-ip originator-ip-length', extensions=None), is_container='list', yang_name="type-three-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  type_three_route = __builtin__.property(_get_type_three_route)


  _pyangbind_elements = OrderedDict([('type_three_route', type_three_route), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment_type_four_route_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-four-ethernet-segment/type-four-route/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for Ethernet Segment L2VPN EVPN route
entries in the BGP LOC-RIB
  """
  __slots__ = ('_path_helper', '_extmethods', '__esi','__originating_router_ip','__originator_ip_length',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__esi = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}), is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi', is_config=False)
    self.__originating_router_ip = 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])'}),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="originating-router-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=False)
    self.__originator_ip_length = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="originator-ip-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-four-ethernet-segment', 'type-four-route', 'state']

  def _get_esi(self):
    """
    Getter method for esi, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/state/esi (oc-evpn-types:esi)

    YANG Description: The Ethernet Segment Identifier (ESI) identifying the ethernet
segment for this route
    """
    return self.__esi
      
  def _set_esi(self, v, load=False):
    """
    Setter method for esi, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/state/esi (oc-evpn-types:esi)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_esi is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_esi() directly.

    YANG Description: The Ethernet Segment Identifier (ESI) identifying the ethernet
segment for this route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}), is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """esi must be of a type compatible with oc-evpn-types:esi""",
          'defined-type': "oc-evpn-types:esi",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}), is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi', is_config=False)""",
        })

    self.__esi = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_esi(self):
    self.__esi = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}), is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi', is_config=False)


  def _get_originating_router_ip(self):
    """
    Getter method for originating_router_ip, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/state/originating_router_ip (oc-inet:ip-prefix)

    YANG Description: The originating router ip
    """
    return self.__originating_router_ip
      
  def _set_originating_router_ip(self, v, load=False):
    """
    Setter method for originating_router_ip, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/state/originating_router_ip (oc-inet:ip-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_originating_router_ip is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_originating_router_ip() directly.

    YANG Description: The originating router ip
    """
    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])'}),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="originating-router-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """originating_router_ip must be of a type compatible with oc-inet:ip-prefix""",
          'defined-type': "oc-inet:ip-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])'}),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="originating-router-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=False)""",
        })

    self.__originating_router_ip = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_originating_router_ip(self):
    self.__originating_router_ip = 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])'}),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="originating-router-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=False)


  def _get_originator_ip_length(self):
    """
    Getter method for originator_ip_length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/state/originator_ip_length (uint32)

    YANG Description: The originating router ip length
    """
    return self.__originator_ip_length
      
  def _set_originator_ip_length(self, v, load=False):
    """
    Setter method for originator_ip_length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/state/originator_ip_length (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_originator_ip_length is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_originator_ip_length() directly.

    YANG Description: The originating router ip length
    """
    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="originator-ip-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """originator_ip_length 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="originator-ip-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__originator_ip_length = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_originator_ip_length(self):
    self.__originator_ip_length = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="originator-ip-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  esi = __builtin__.property(_get_esi)
  originating_router_ip = __builtin__.property(_get_originating_router_ip)
  originator_ip_length = __builtin__.property(_get_originator_ip_length)


  _pyangbind_elements = OrderedDict([('esi', esi), ('originating_router_ip', originating_router_ip), ('originator_ip_length', originator_ip_length), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment_type_four_route_paths_path_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-four-ethernet-segment/type-four-route/paths/path/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: BGP path attributes for this route
  """
  __slots__ = ('_path_helper', '_extmethods', '__peer_ip','__peer_path_id','__source_route_distinguisher','__source_address_family','__advertised_to_peer','__label','__label2','__bestpath','__multipath','__backup','__last_modified','__valid_route','__invalid_reason','__attr_index','__community_index','__ext_community_index',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__peer_ip = 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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__peer_path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="peer-path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__source_route_distinguisher = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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])'}),], is_leaf=True, yang_name="source-route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', is_config=False)
    self.__source_address_family = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="source-address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__advertised_to_peer = YANGDynClass(unique=True, base=TypedListType(allowed_type=[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}'}),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}|:))'}),]), is_leaf=False, yang_name="advertised-to-peer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__label = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__label2 = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="label2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__bestpath = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="bestpath", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__multipath = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="multipath", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__backup = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="backup", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-four-ethernet-segment', 'type-four-route', 'paths', 'path', 'state']

  def _get_peer_ip(self):
    """
    Getter method for peer_ip, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/state/peer_ip (oc-inet:ip-address)

    YANG Description: The source peer ip address of the imported route
    """
    return self.__peer_ip
      
  def _set_peer_ip(self, v, load=False):
    """
    Setter method for peer_ip, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/state/peer_ip (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_ip is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_ip() directly.

    YANG Description: The source peer ip address of the imported route
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_ip must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__peer_ip = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_ip(self):
    self.__peer_ip = 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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_peer_path_id(self):
    """
    Getter method for peer_path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/state/peer_path_id (uint32)

    YANG Description: The source peer path id of the imported route
    """
    return self.__peer_path_id
      
  def _set_peer_path_id(self, v, load=False):
    """
    Setter method for peer_path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/state/peer_path_id (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_path_id() directly.

    YANG Description: The source peer path id of the imported route
    """
    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="peer-path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_path_id 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="peer-path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__peer_path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_path_id(self):
    self.__peer_path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="peer-path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_source_route_distinguisher(self):
    """
    Getter method for source_route_distinguisher, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/state/source_route_distinguisher (oc-ni-types:route-distinguisher)

    YANG Description: The source route distinguisher is the remote RD source of the
imported route
    """
    return self.__source_route_distinguisher
      
  def _set_source_route_distinguisher(self, v, load=False):
    """
    Setter method for source_route_distinguisher, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/state/source_route_distinguisher (oc-ni-types:route-distinguisher)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_route_distinguisher is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_route_distinguisher() directly.

    YANG Description: The source route distinguisher is the remote RD source of the
imported route
    """
    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,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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])'}),], is_leaf=True, yang_name="source-route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_route_distinguisher must be of a type compatible with oc-ni-types:route-distinguisher""",
          'defined-type': "oc-ni-types:route-distinguisher",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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])'}),], is_leaf=True, yang_name="source-route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', is_config=False)""",
        })

    self.__source_route_distinguisher = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_route_distinguisher(self):
    self.__source_route_distinguisher = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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])'}),], is_leaf=True, yang_name="source-route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', is_config=False)


  def _get_source_address_family(self):
    """
    Getter method for source_address_family, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/state/source_address_family (identityref)

    YANG Description: The source address-family of the imported route
    """
    return self.__source_address_family
      
  def _set_source_address_family(self, v, load=False):
    """
    Setter method for source_address_family, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/state/source_address_family (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address_family is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address_family() directly.

    YANG Description: The source address-family of the imported route
    """
    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_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="source-address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address_family must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="source-address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__source_address_family = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_address_family(self):
    self.__source_address_family = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="source-address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_advertised_to_peer(self):
    """
    Getter method for advertised_to_peer, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/state/advertised_to_peer (oc-inet:ip-address)

    YANG Description: List of peers to which this path is advertised
    """
    return self.__advertised_to_peer
      
  def _set_advertised_to_peer(self, v, load=False):
    """
    Setter method for advertised_to_peer, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/state/advertised_to_peer (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_advertised_to_peer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_advertised_to_peer() directly.

    YANG Description: List of peers to which this path is advertised
    """
    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_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}'}),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}|:))'}),]), is_leaf=False, yang_name="advertised-to-peer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """advertised_to_peer must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=[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}'}),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}|:))'}),]), is_leaf=False, yang_name="advertised-to-peer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__advertised_to_peer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_advertised_to_peer(self):
    self.__advertised_to_peer = YANGDynClass(unique=True, base=TypedListType(allowed_type=[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}'}),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}|:))'}),]), is_leaf=False, yang_name="advertised-to-peer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_label(self):
    """
    Getter method for label, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/state/label (string)

    YANG Description: MPLS Label field used for route attributes
    """
    return self.__label
      
  def _set_label(self, v, load=False):
    """
    Setter method for label, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/state/label (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_label() directly.

    YANG Description: MPLS Label field used for route attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """label must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_label(self):
    self.__label = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_label2(self):
    """
    Getter method for label2, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/state/label2 (string)

    YANG Description: MPLS Label2 field used for route attributes
    """
    return self.__label2
      
  def _set_label2(self, v, load=False):
    """
    Setter method for label2, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/state/label2 (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_label2 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_label2() directly.

    YANG Description: MPLS Label2 field used for route attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="label2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """label2 must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="label2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__label2 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_label2(self):
    self.__label2 = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="label2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_bestpath(self):
    """
    Getter method for bestpath, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/state/bestpath (boolean)

    YANG Description: BGP can receive multiple paths to the same destination. This
parameter indicates that this path is the bestpath to install
in the IP routing table and use for traffic forwarding
    """
    return self.__bestpath
      
  def _set_bestpath(self, v, load=False):
    """
    Setter method for bestpath, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/state/bestpath (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bestpath is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bestpath() directly.

    YANG Description: BGP can receive multiple paths to the same destination. This
parameter indicates that this path is the bestpath to install
in the IP routing table and use for traffic forwarding
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="bestpath", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bestpath must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="bestpath", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__bestpath = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bestpath(self):
    self.__bestpath = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="bestpath", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_multipath(self):
    """
    Getter method for multipath, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/state/multipath (boolean)

    YANG Description: BGP can use multiple paths to reach a destination allowing
BGP to load-balance traffic. This parameter indicates that this
path is marked as multipath
    """
    return self.__multipath
      
  def _set_multipath(self, v, load=False):
    """
    Setter method for multipath, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/state/multipath (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multipath is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multipath() directly.

    YANG Description: BGP can use multiple paths to reach a destination allowing
BGP to load-balance traffic. This parameter indicates that this
path is marked as multipath
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="multipath", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multipath must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="multipath", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__multipath = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multipath(self):
    self.__multipath = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="multipath", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_backup(self):
    """
    Getter method for backup, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/state/backup (boolean)

    YANG Description: BGP path marked as a backup path
    """
    return self.__backup
      
  def _set_backup(self, v, load=False):
    """
    Setter method for backup, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/state/backup (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_backup is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_backup() directly.

    YANG Description: BGP path marked as a backup path
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="backup", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """backup must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="backup", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__backup = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_backup(self):
    self.__backup = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="backup", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_last_modified(self):
    """
    Getter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/state/last_modified (oc-types:timeticks64)

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    return self.__last_modified
      
  def _set_last_modified(self, v, load=False):
    """
    Setter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/state/last_modified (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_last_modified is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_last_modified() directly.

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    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="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """last_modified must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__last_modified = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_last_modified(self):
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_valid_route(self):
    """
    Getter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/state/valid_route (boolean)

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    return self.__valid_route
      
  def _set_valid_route(self, v, load=False):
    """
    Setter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/state/valid_route (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_valid_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_valid_route() directly.

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """valid_route must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__valid_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_valid_route(self):
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_invalid_reason(self):
    """
    Getter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/state/invalid_reason (identityref)

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    return self.__invalid_reason
      
  def _set_invalid_reason(self, v, load=False):
    """
    Setter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/state/invalid_reason (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_invalid_reason is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_invalid_reason() directly.

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    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={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """invalid_reason must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__invalid_reason = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_invalid_reason(self):
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_attr_index(self):
    """
    Getter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/state/attr_index (leafref)

    YANG Description: Reference to the common attribute group for the
route
    """
    return self.__attr_index
      
  def _set_attr_index(self, v, load=False):
    """
    Setter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/state/attr_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_index() directly.

    YANG Description: Reference to the common attribute group for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_index(self):
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_community_index(self):
    """
    Getter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/state/community_index (leafref)

    YANG Description: Reference to the community attribute for the route
    """
    return self.__community_index
      
  def _set_community_index(self, v, load=False):
    """
    Setter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/state/community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_community_index() directly.

    YANG Description: Reference to the community attribute for the route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_community_index(self):
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_ext_community_index(self):
    """
    Getter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/state/ext_community_index (leafref)

    YANG Description: Reference to the extended community attribute for the
route
    """
    return self.__ext_community_index
      
  def _set_ext_community_index(self, v, load=False):
    """
    Setter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/state/ext_community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ext_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ext_community_index() directly.

    YANG Description: Reference to the extended community attribute for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ext_community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__ext_community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ext_community_index(self):
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)

  peer_ip = __builtin__.property(_get_peer_ip)
  peer_path_id = __builtin__.property(_get_peer_path_id)
  source_route_distinguisher = __builtin__.property(_get_source_route_distinguisher)
  source_address_family = __builtin__.property(_get_source_address_family)
  advertised_to_peer = __builtin__.property(_get_advertised_to_peer)
  label = __builtin__.property(_get_label)
  label2 = __builtin__.property(_get_label2)
  bestpath = __builtin__.property(_get_bestpath)
  multipath = __builtin__.property(_get_multipath)
  backup = __builtin__.property(_get_backup)
  last_modified = __builtin__.property(_get_last_modified)
  valid_route = __builtin__.property(_get_valid_route)
  invalid_reason = __builtin__.property(_get_invalid_reason)
  attr_index = __builtin__.property(_get_attr_index)
  community_index = __builtin__.property(_get_community_index)
  ext_community_index = __builtin__.property(_get_ext_community_index)


  _pyangbind_elements = OrderedDict([('peer_ip', peer_ip), ('peer_path_id', peer_path_id), ('source_route_distinguisher', source_route_distinguisher), ('source_address_family', source_address_family), ('advertised_to_peer', advertised_to_peer), ('label', label), ('label2', label2), ('bestpath', bestpath), ('multipath', multipath), ('backup', backup), ('last_modified', last_modified), ('valid_route', valid_route), ('invalid_reason', invalid_reason), ('attr_index', attr_index), ('community_index', community_index), ('ext_community_index', ext_community_index), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment_type_four_route_paths_path_unknown_attributes_unknown_attribute_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-four-ethernet-segment/type-four-route/paths/path/unknown-attributes/unknown-attribute/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for unknown route attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__optional','__transitive','__partial','__extended','__attr_type','__attr_len','__attr_value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-four-ethernet-segment', 'type-four-route', 'paths', 'path', 'unknown-attributes', 'unknown-attribute', 'state']

  def _get_optional(self):
    """
    Getter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/unknown_attributes/unknown_attribute/state/optional (boolean)

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    return self.__optional
      
  def _set_optional(self, v, load=False):
    """
    Setter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/unknown_attributes/unknown_attribute/state/optional (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_optional is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_optional() directly.

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """optional must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__optional = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_optional(self):
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_transitive(self):
    """
    Getter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/unknown_attributes/unknown_attribute/state/transitive (boolean)

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    return self.__transitive
      
  def _set_transitive(self, v, load=False):
    """
    Setter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/unknown_attributes/unknown_attribute/state/transitive (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transitive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transitive() directly.

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transitive must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__transitive = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transitive(self):
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_partial(self):
    """
    Getter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/unknown_attributes/unknown_attribute/state/partial (boolean)

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    return self.__partial
      
  def _set_partial(self, v, load=False):
    """
    Setter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/unknown_attributes/unknown_attribute/state/partial (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_partial is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_partial() directly.

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """partial must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__partial = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_partial(self):
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_extended(self):
    """
    Getter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/unknown_attributes/unknown_attribute/state/extended (boolean)

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    return self.__extended
      
  def _set_extended(self, v, load=False):
    """
    Setter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/unknown_attributes/unknown_attribute/state/extended (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended() directly.

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__extended = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended(self):
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/unknown_attributes/unknown_attribute/state/attr_type (uint8)

    YANG Description: 1-octet value encoding the attribute type code
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/unknown_attributes/unknown_attribute/state/attr_type (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() directly.

    YANG Description: 1-octet value encoding the attribute type code
    """
    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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_attr_len(self):
    """
    Getter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/unknown_attributes/unknown_attribute/state/attr_len (uint16)

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    return self.__attr_len
      
  def _set_attr_len(self, v, load=False):
    """
    Setter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/unknown_attributes/unknown_attribute/state/attr_len (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_len() directly.

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_len 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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__attr_len = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_len(self):
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_attr_value(self):
    """
    Getter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/unknown_attributes/unknown_attribute/state/attr_value (binary)

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    return self.__attr_value
      
  def _set_attr_value(self, v, load=False):
    """
    Setter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/unknown_attributes/unknown_attribute/state/attr_value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_value() directly.

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__attr_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_value(self):
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  optional = __builtin__.property(_get_optional)
  transitive = __builtin__.property(_get_transitive)
  partial = __builtin__.property(_get_partial)
  extended = __builtin__.property(_get_extended)
  attr_type = __builtin__.property(_get_attr_type)
  attr_len = __builtin__.property(_get_attr_len)
  attr_value = __builtin__.property(_get_attr_value)


  _pyangbind_elements = OrderedDict([('optional', optional), ('transitive', transitive), ('partial', partial), ('extended', extended), ('attr_type', attr_type), ('attr_len', attr_len), ('attr_value', attr_value), ])


class yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment_type_four_route_paths_path_unknown_attributes_unknown_attribute(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-four-ethernet-segment/type-four-route/paths/path/unknown-attributes/unknown-attribute. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
  """
  __slots__ = ('_path_helper', '_extmethods', '__attr_type','__state',)

  _yang_name = 'unknown-attribute'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment_type_four_route_paths_path_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-four-ethernet-segment', 'type-four-route', 'paths', 'path', 'unknown-attributes', 'unknown-attribute']

  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/unknown_attributes/unknown_attribute/attr_type (leafref)

    YANG Description: Reference to the list key
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/unknown_attributes/unknown_attribute/attr_type (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/unknown_attributes/unknown_attribute/state (container)

    YANG Description: Operational state for unknown route attributes
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/unknown_attributes/unknown_attribute/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 unknown route attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment_type_four_route_paths_path_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment_type_four_route_paths_path_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment_type_four_route_paths_path_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  attr_type = __builtin__.property(_get_attr_type)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('attr_type', attr_type), ('state', state), ])


class yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment_type_four_route_paths_path_unknown_attributes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-four-ethernet-segment/type-four-route/paths/path/unknown-attributes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
  """
  __slots__ = ('_path_helper', '_extmethods', '__unknown_attribute',)

  _yang_name = 'unknown-attributes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment_type_four_route_paths_path_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-four-ethernet-segment', 'type-four-route', 'paths', 'path', 'unknown-attributes']

  def _get_unknown_attribute(self):
    """
    Getter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/unknown_attributes/unknown_attribute (list)

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    return self.__unknown_attribute
      
  def _set_unknown_attribute(self, v, load=False):
    """
    Setter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/unknown_attributes/unknown_attribute (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attribute is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attribute() directly.

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment_type_four_route_paths_path_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attribute must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment_type_four_route_paths_path_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__unknown_attribute = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attribute(self):
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment_type_four_route_paths_path_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  unknown_attribute = __builtin__.property(_get_unknown_attribute)


  _pyangbind_elements = OrderedDict([('unknown_attribute', unknown_attribute), ])


class yc_path_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment_type_four_route_paths_path(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-four-ethernet-segment/type-four-route/paths/path. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of paths
  """
  __slots__ = ('_path_helper', '_extmethods', '__peer_ip','__peer_path_id','__source_route_distinguisher','__source_address_family','__state','__unknown_attributes',)

  _yang_name = 'path'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__peer_ip = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__peer_path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__source_route_distinguisher = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__source_address_family = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment_type_four_route_paths_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment_type_four_route_paths_path_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-four-ethernet-segment', 'type-four-route', 'paths', 'path']

  def _get_peer_ip(self):
    """
    Getter method for peer_ip, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/peer_ip (leafref)

    YANG Description: The source peer ip address of the imported route
    """
    return self.__peer_ip
      
  def _set_peer_ip(self, v, load=False):
    """
    Setter method for peer_ip, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/peer_ip (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_ip is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_ip() directly.

    YANG Description: The source peer ip address of the imported route
    """
    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="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_ip must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__peer_ip = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_ip(self):
    self.__peer_ip = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_peer_path_id(self):
    """
    Getter method for peer_path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/peer_path_id (leafref)

    YANG Description: The source peer path id of the imported route
    """
    return self.__peer_path_id
      
  def _set_peer_path_id(self, v, load=False):
    """
    Setter method for peer_path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/peer_path_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_path_id() directly.

    YANG Description: The source peer path id of the imported route
    """
    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="peer-path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_path_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__peer_path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_path_id(self):
    self.__peer_path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_source_route_distinguisher(self):
    """
    Getter method for source_route_distinguisher, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/source_route_distinguisher (leafref)

    YANG Description: The source route distinguisher is the remote RD source of the
imported route
    """
    return self.__source_route_distinguisher
      
  def _set_source_route_distinguisher(self, v, load=False):
    """
    Setter method for source_route_distinguisher, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/source_route_distinguisher (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_route_distinguisher is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_route_distinguisher() directly.

    YANG Description: The source route distinguisher is the remote RD source of the
imported route
    """
    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="source-route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_route_distinguisher must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__source_route_distinguisher = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_route_distinguisher(self):
    self.__source_route_distinguisher = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_source_address_family(self):
    """
    Getter method for source_address_family, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/source_address_family (leafref)

    YANG Description: The source address-family of the imported route
    """
    return self.__source_address_family
      
  def _set_source_address_family(self, v, load=False):
    """
    Setter method for source_address_family, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/source_address_family (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address_family is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address_family() directly.

    YANG Description: The source address-family of the imported route
    """
    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="source-address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address_family 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-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__source_address_family = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_address_family(self):
    self.__source_address_family = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/state (container)

    YANG Description: BGP path attributes for this route
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/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: BGP path attributes for this route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment_type_four_route_paths_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment_type_four_route_paths_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment_type_four_route_paths_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unknown_attributes(self):
    """
    Getter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/unknown_attributes (container)

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    return self.__unknown_attributes
      
  def _set_unknown_attributes(self, v, load=False):
    """
    Setter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path/unknown_attributes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attributes() directly.

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment_type_four_route_paths_path_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attributes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment_type_four_route_paths_path_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unknown_attributes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attributes(self):
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment_type_four_route_paths_path_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  peer_ip = __builtin__.property(_get_peer_ip)
  peer_path_id = __builtin__.property(_get_peer_path_id)
  source_route_distinguisher = __builtin__.property(_get_source_route_distinguisher)
  source_address_family = __builtin__.property(_get_source_address_family)
  state = __builtin__.property(_get_state)
  unknown_attributes = __builtin__.property(_get_unknown_attributes)


  _pyangbind_elements = OrderedDict([('peer_ip', peer_ip), ('peer_path_id', peer_path_id), ('source_route_distinguisher', source_route_distinguisher), ('source_address_family', source_address_family), ('state', state), ('unknown_attributes', unknown_attributes), ])


class yc_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment_type_four_route_paths(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-four-ethernet-segment/type-four-route/paths. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of BGP path attributes for this route
  """
  __slots__ = ('_path_helper', '_extmethods', '__path',)

  _yang_name = 'paths'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__path = YANGDynClass(base=YANGListType("peer_ip peer_path_id source_route_distinguisher source_address_family",yc_path_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment_type_four_route_paths_path, yang_name="path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='peer-ip peer-path-id source-route-distinguisher source-address-family', extensions=None), is_container='list', yang_name="path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-four-ethernet-segment', 'type-four-route', 'paths']

  def _get_path(self):
    """
    Getter method for path, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path (list)

    YANG Description: List of paths
    """
    return self.__path
      
  def _set_path(self, v, load=False):
    """
    Setter method for path, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths/path (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path() directly.

    YANG Description: List of paths
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("peer_ip peer_path_id source_route_distinguisher source_address_family",yc_path_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment_type_four_route_paths_path, yang_name="path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='peer-ip peer-path-id source-route-distinguisher source-address-family', extensions=None), is_container='list', yang_name="path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("peer_ip peer_path_id source_route_distinguisher source_address_family",yc_path_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment_type_four_route_paths_path, yang_name="path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='peer-ip peer-path-id source-route-distinguisher source-address-family', extensions=None), is_container='list', yang_name="path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__path = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path(self):
    self.__path = YANGDynClass(base=YANGListType("peer_ip peer_path_id source_route_distinguisher source_address_family",yc_path_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment_type_four_route_paths_path, yang_name="path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='peer-ip peer-path-id source-route-distinguisher source-address-family', extensions=None), is_container='list', yang_name="path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  path = __builtin__.property(_get_path)


  _pyangbind_elements = OrderedDict([('path', path), ])


class yc_type_four_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment_type_four_route(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-four-ethernet-segment/type-four-route. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of Ethernet Segment L2VPN EVPN routes

For the purpose of BGP route key processing, only the Ethernet Segment ID,
IP Address Length, and Originating Router's IP Address fields are
considered to be part of the prefix in the NLRI
  """
  __slots__ = ('_path_helper', '_extmethods', '__esi','__originating_router_ip','__originator_ip_length','__state','__paths',)

  _yang_name = 'type-four-route'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__esi = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__originating_router_ip = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="originating-router-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__originator_ip_length = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="originator-ip-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment_type_four_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__paths = YANGDynClass(base=yc_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment_type_four_route_paths, is_container='container', yang_name="paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-four-ethernet-segment', 'type-four-route']

  def _get_esi(self):
    """
    Getter method for esi, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/esi (leafref)

    YANG Description: The Ethernet Segment Identifier (ESI) is a unique non-zero
identifier that identifies an Ethernet segment
    """
    return self.__esi
      
  def _set_esi(self, v, load=False):
    """
    Setter method for esi, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/esi (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_esi is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_esi() directly.

    YANG Description: The Ethernet Segment Identifier (ESI) is a unique non-zero
identifier that identifies an Ethernet segment
    """
    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="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """esi must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__esi = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_esi(self):
    self.__esi = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_originating_router_ip(self):
    """
    Getter method for originating_router_ip, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/originating_router_ip (leafref)

    YANG Description: Reference to the ip-prefix list key
    """
    return self.__originating_router_ip
      
  def _set_originating_router_ip(self, v, load=False):
    """
    Setter method for originating_router_ip, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/originating_router_ip (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_originating_router_ip is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_originating_router_ip() directly.

    YANG Description: Reference to the ip-prefix 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="originating-router-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """originating_router_ip must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="originating-router-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__originating_router_ip = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_originating_router_ip(self):
    self.__originating_router_ip = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="originating-router-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_originator_ip_length(self):
    """
    Getter method for originator_ip_length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/originator_ip_length (leafref)

    YANG Description: Reference to the ip-length list key
    """
    return self.__originator_ip_length
      
  def _set_originator_ip_length(self, v, load=False):
    """
    Setter method for originator_ip_length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/originator_ip_length (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_originator_ip_length is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_originator_ip_length() directly.

    YANG Description: Reference to the ip-length 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="originator-ip-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """originator_ip_length must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="originator-ip-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__originator_ip_length = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_originator_ip_length(self):
    self.__originator_ip_length = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="originator-ip-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/state (container)

    YANG Description: Operational state data for Ethernet Segment L2VPN EVPN route
entries in the BGP LOC-RIB
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/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 Ethernet Segment L2VPN EVPN route
entries in the BGP LOC-RIB
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment_type_four_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment_type_four_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment_type_four_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_paths(self):
    """
    Getter method for paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths (container)

    YANG Description: List of BGP path attributes for this route
    """
    return self.__paths
      
  def _set_paths(self, v, load=False):
    """
    Setter method for paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route/paths (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_paths() directly.

    YANG Description: List of BGP path attributes for this route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment_type_four_route_paths, is_container='container', yang_name="paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """paths must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment_type_four_route_paths, is_container='container', yang_name="paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_paths(self):
    self.__paths = YANGDynClass(base=yc_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment_type_four_route_paths, is_container='container', yang_name="paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  esi = __builtin__.property(_get_esi)
  originating_router_ip = __builtin__.property(_get_originating_router_ip)
  originator_ip_length = __builtin__.property(_get_originator_ip_length)
  state = __builtin__.property(_get_state)
  paths = __builtin__.property(_get_paths)


  _pyangbind_elements = OrderedDict([('esi', esi), ('originating_router_ip', originating_router_ip), ('originator_ip_length', originator_ip_length), ('state', state), ('paths', paths), ])


class yc_type_four_ethernet_segment_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-four-ethernet-segment. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top level container for Ethernet Segment L2VPN EVPN routes
  """
  __slots__ = ('_path_helper', '_extmethods', '__type_four_route',)

  _yang_name = 'type-four-ethernet-segment'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type_four_route = YANGDynClass(base=YANGListType("esi originating_router_ip originator_ip_length",yc_type_four_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment_type_four_route, yang_name="type-four-route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='esi originating-router-ip originator-ip-length', extensions=None), is_container='list', yang_name="type-four-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-four-ethernet-segment']

  def _get_type_four_route(self):
    """
    Getter method for type_four_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route (list)

    YANG Description: List of Ethernet Segment L2VPN EVPN routes

For the purpose of BGP route key processing, only the Ethernet Segment ID,
IP Address Length, and Originating Router's IP Address fields are
considered to be part of the prefix in the NLRI
    """
    return self.__type_four_route
      
  def _set_type_four_route(self, v, load=False):
    """
    Setter method for type_four_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment/type_four_route (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type_four_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type_four_route() directly.

    YANG Description: List of Ethernet Segment L2VPN EVPN routes

For the purpose of BGP route key processing, only the Ethernet Segment ID,
IP Address Length, and Originating Router's IP Address fields are
considered to be part of the prefix in the NLRI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("esi originating_router_ip originator_ip_length",yc_type_four_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment_type_four_route, yang_name="type-four-route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='esi originating-router-ip originator-ip-length', extensions=None), is_container='list', yang_name="type-four-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type_four_route must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("esi originating_router_ip originator_ip_length",yc_type_four_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment_type_four_route, yang_name="type-four-route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='esi originating-router-ip originator-ip-length', extensions=None), is_container='list', yang_name="type-four-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__type_four_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type_four_route(self):
    self.__type_four_route = YANGDynClass(base=YANGListType("esi originating_router_ip originator_ip_length",yc_type_four_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment_type_four_route, yang_name="type-four-route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='esi originating-router-ip originator-ip-length', extensions=None), is_container='list', yang_name="type-four-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  type_four_route = __builtin__.property(_get_type_four_route)


  _pyangbind_elements = OrderedDict([('type_four_route', type_four_route), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix_type_five_route_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-five-ip-prefix/type-five-route/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for IP Prefix Advertisement L2VPN EVPN
route entries in the BGP LOC-RIB
  """
  __slots__ = ('_path_helper', '_extmethods', '__ethernet_tag','__ip_prefix_length','__ip_prefix',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__ethernet_tag = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="ethernet-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:ethernet-tag', is_config=False)
    self.__ip_prefix_length = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ip-prefix-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__ip_prefix = 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])'}),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="ip-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-five-ip-prefix', 'type-five-route', 'state']

  def _get_ethernet_tag(self):
    """
    Getter method for ethernet_tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/state/ethernet_tag (oc-evpn-types:ethernet-tag)

    YANG Description: The Ethernet tag identifying the broadcast domain for this
route
    """
    return self.__ethernet_tag
      
  def _set_ethernet_tag(self, v, load=False):
    """
    Setter method for ethernet_tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/state/ethernet_tag (oc-evpn-types:ethernet-tag)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ethernet_tag is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ethernet_tag() directly.

    YANG Description: The Ethernet tag identifying the broadcast domain for this
route
    """
    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="ethernet-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:ethernet-tag', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ethernet_tag must be of a type compatible with oc-evpn-types:ethernet-tag""",
          'defined-type': "oc-evpn-types:ethernet-tag",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="ethernet-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:ethernet-tag', is_config=False)""",
        })

    self.__ethernet_tag = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ethernet_tag(self):
    self.__ethernet_tag = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="ethernet-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:ethernet-tag', is_config=False)


  def _get_ip_prefix_length(self):
    """
    Getter method for ip_prefix_length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/state/ip_prefix_length (string)

    YANG Description: The ip-prefix length for the route
    """
    return self.__ip_prefix_length
      
  def _set_ip_prefix_length(self, v, load=False):
    """
    Setter method for ip_prefix_length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/state/ip_prefix_length (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ip_prefix_length is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ip_prefix_length() directly.

    YANG Description: The ip-prefix length for the route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="ip-prefix-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ip_prefix_length must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ip-prefix-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__ip_prefix_length = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ip_prefix_length(self):
    self.__ip_prefix_length = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ip-prefix-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_ip_prefix(self):
    """
    Getter method for ip_prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/state/ip_prefix (oc-inet:ip-prefix)

    YANG Description: The ip-prefix for the route
    """
    return self.__ip_prefix
      
  def _set_ip_prefix(self, v, load=False):
    """
    Setter method for ip_prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/state/ip_prefix (oc-inet:ip-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ip_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ip_prefix() directly.

    YANG Description: The ip-prefix for the route
    """
    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])'}),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="ip-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ip_prefix must be of a type compatible with oc-inet:ip-prefix""",
          'defined-type': "oc-inet:ip-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])'}),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="ip-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=False)""",
        })

    self.__ip_prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ip_prefix(self):
    self.__ip_prefix = 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])'}),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="ip-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=False)

  ethernet_tag = __builtin__.property(_get_ethernet_tag)
  ip_prefix_length = __builtin__.property(_get_ip_prefix_length)
  ip_prefix = __builtin__.property(_get_ip_prefix)


  _pyangbind_elements = OrderedDict([('ethernet_tag', ethernet_tag), ('ip_prefix_length', ip_prefix_length), ('ip_prefix', ip_prefix), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix_type_five_route_paths_path_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-five-ip-prefix/type-five-route/paths/path/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: BGP path attributes for this route
  """
  __slots__ = ('_path_helper', '_extmethods', '__esi','__gateway_ip_address','__peer_ip','__peer_path_id','__source_route_distinguisher','__source_address_family','__advertised_to_peer','__label','__label2','__bestpath','__multipath','__backup','__last_modified','__valid_route','__invalid_reason','__attr_index','__community_index','__ext_community_index',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__esi = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}), is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi', is_config=False)
    self.__gateway_ip_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])'}),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="gateway-ip-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=False)
    self.__peer_ip = 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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__peer_path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="peer-path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__source_route_distinguisher = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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])'}),], is_leaf=True, yang_name="source-route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', is_config=False)
    self.__source_address_family = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="source-address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__advertised_to_peer = YANGDynClass(unique=True, base=TypedListType(allowed_type=[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}'}),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}|:))'}),]), is_leaf=False, yang_name="advertised-to-peer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__label = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__label2 = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="label2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__bestpath = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="bestpath", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__multipath = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="multipath", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__backup = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="backup", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-five-ip-prefix', 'type-five-route', 'paths', 'path', 'state']

  def _get_esi(self):
    """
    Getter method for esi, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/state/esi (oc-evpn-types:esi)

    YANG Description: The Ethernet Segment Identifier (ESI) identifying the ethernet
segment for this route
    """
    return self.__esi
      
  def _set_esi(self, v, load=False):
    """
    Setter method for esi, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/state/esi (oc-evpn-types:esi)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_esi is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_esi() directly.

    YANG Description: The Ethernet Segment Identifier (ESI) identifying the ethernet
segment for this route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}), is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """esi must be of a type compatible with oc-evpn-types:esi""",
          'defined-type': "oc-evpn-types:esi",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}), is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi', is_config=False)""",
        })

    self.__esi = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_esi(self):
    self.__esi = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}), is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi', is_config=False)


  def _get_gateway_ip_address(self):
    """
    Getter method for gateway_ip_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/state/gateway_ip_address (oc-inet:ip-prefix)

    YANG Description: The gateway-ip-address for the route
    """
    return self.__gateway_ip_address
      
  def _set_gateway_ip_address(self, v, load=False):
    """
    Setter method for gateway_ip_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/state/gateway_ip_address (oc-inet:ip-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_gateway_ip_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_gateway_ip_address() directly.

    YANG Description: The gateway-ip-address for the route
    """
    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])'}),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="gateway-ip-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """gateway_ip_address must be of a type compatible with oc-inet:ip-prefix""",
          'defined-type': "oc-inet:ip-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])'}),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="gateway-ip-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=False)""",
        })

    self.__gateway_ip_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_gateway_ip_address(self):
    self.__gateway_ip_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])'}),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="gateway-ip-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-prefix', is_config=False)


  def _get_peer_ip(self):
    """
    Getter method for peer_ip, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/state/peer_ip (oc-inet:ip-address)

    YANG Description: The source peer ip address of the imported route
    """
    return self.__peer_ip
      
  def _set_peer_ip(self, v, load=False):
    """
    Setter method for peer_ip, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/state/peer_ip (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_ip is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_ip() directly.

    YANG Description: The source peer ip address of the imported route
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_ip must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__peer_ip = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_ip(self):
    self.__peer_ip = 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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_peer_path_id(self):
    """
    Getter method for peer_path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/state/peer_path_id (uint32)

    YANG Description: The source peer path id of the imported route
    """
    return self.__peer_path_id
      
  def _set_peer_path_id(self, v, load=False):
    """
    Setter method for peer_path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/state/peer_path_id (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_path_id() directly.

    YANG Description: The source peer path id of the imported route
    """
    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="peer-path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_path_id 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="peer-path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__peer_path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_path_id(self):
    self.__peer_path_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="peer-path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_source_route_distinguisher(self):
    """
    Getter method for source_route_distinguisher, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/state/source_route_distinguisher (oc-ni-types:route-distinguisher)

    YANG Description: The source route distinguisher is the remote RD source of the
imported route
    """
    return self.__source_route_distinguisher
      
  def _set_source_route_distinguisher(self, v, load=False):
    """
    Setter method for source_route_distinguisher, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/state/source_route_distinguisher (oc-ni-types:route-distinguisher)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_route_distinguisher is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_route_distinguisher() directly.

    YANG Description: The source route distinguisher is the remote RD source of the
imported route
    """
    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,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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])'}),], is_leaf=True, yang_name="source-route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_route_distinguisher must be of a type compatible with oc-ni-types:route-distinguisher""",
          'defined-type': "oc-ni-types:route-distinguisher",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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])'}),], is_leaf=True, yang_name="source-route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', is_config=False)""",
        })

    self.__source_route_distinguisher = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_route_distinguisher(self):
    self.__source_route_distinguisher = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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])'}),], is_leaf=True, yang_name="source-route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', is_config=False)


  def _get_source_address_family(self):
    """
    Getter method for source_address_family, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/state/source_address_family (identityref)

    YANG Description: The source address-family of the imported route
    """
    return self.__source_address_family
      
  def _set_source_address_family(self, v, load=False):
    """
    Setter method for source_address_family, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/state/source_address_family (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address_family is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address_family() directly.

    YANG Description: The source address-family of the imported route
    """
    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_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="source-address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address_family must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="source-address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__source_address_family = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_address_family(self):
    self.__source_address_family = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV6_LABELED_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_UNICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV4_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L3VPN_IPV6_MULTICAST': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_VPLS': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:L2VPN_EVPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV4': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:SRTE_POLICY_IPV6': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:IPV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:VPNV4_FLOWSPEC': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_VPN': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgp-types:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}, 'oc-bgpt:LINKSTATE_SPF': {'@module': 'openconfig-bgp-types', '@namespace': 'http://openconfig.net/yang/bgp-types'}},), is_leaf=True, yang_name="source-address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_advertised_to_peer(self):
    """
    Getter method for advertised_to_peer, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/state/advertised_to_peer (oc-inet:ip-address)

    YANG Description: List of peers to which this path is advertised
    """
    return self.__advertised_to_peer
      
  def _set_advertised_to_peer(self, v, load=False):
    """
    Setter method for advertised_to_peer, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/state/advertised_to_peer (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_advertised_to_peer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_advertised_to_peer() directly.

    YANG Description: List of peers to which this path is advertised
    """
    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_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}'}),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}|:))'}),]), is_leaf=False, yang_name="advertised-to-peer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """advertised_to_peer must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=[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}'}),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}|:))'}),]), is_leaf=False, yang_name="advertised-to-peer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__advertised_to_peer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_advertised_to_peer(self):
    self.__advertised_to_peer = YANGDynClass(unique=True, base=TypedListType(allowed_type=[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}'}),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}|:))'}),]), is_leaf=False, yang_name="advertised-to-peer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_label(self):
    """
    Getter method for label, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/state/label (string)

    YANG Description: MPLS Label field used for route attributes
    """
    return self.__label
      
  def _set_label(self, v, load=False):
    """
    Setter method for label, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/state/label (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_label() directly.

    YANG Description: MPLS Label field used for route attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """label must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_label(self):
    self.__label = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_label2(self):
    """
    Getter method for label2, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/state/label2 (string)

    YANG Description: MPLS Label2 field used for route attributes
    """
    return self.__label2
      
  def _set_label2(self, v, load=False):
    """
    Setter method for label2, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/state/label2 (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_label2 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_label2() directly.

    YANG Description: MPLS Label2 field used for route attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="label2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """label2 must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="label2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__label2 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_label2(self):
    self.__label2 = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="label2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_bestpath(self):
    """
    Getter method for bestpath, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/state/bestpath (boolean)

    YANG Description: BGP can receive multiple paths to the same destination. This
parameter indicates that this path is the bestpath to install
in the IP routing table and use for traffic forwarding
    """
    return self.__bestpath
      
  def _set_bestpath(self, v, load=False):
    """
    Setter method for bestpath, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/state/bestpath (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bestpath is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bestpath() directly.

    YANG Description: BGP can receive multiple paths to the same destination. This
parameter indicates that this path is the bestpath to install
in the IP routing table and use for traffic forwarding
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="bestpath", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bestpath must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="bestpath", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__bestpath = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bestpath(self):
    self.__bestpath = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="bestpath", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_multipath(self):
    """
    Getter method for multipath, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/state/multipath (boolean)

    YANG Description: BGP can use multiple paths to reach a destination allowing
BGP to load-balance traffic. This parameter indicates that this
path is marked as multipath
    """
    return self.__multipath
      
  def _set_multipath(self, v, load=False):
    """
    Setter method for multipath, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/state/multipath (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multipath is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multipath() directly.

    YANG Description: BGP can use multiple paths to reach a destination allowing
BGP to load-balance traffic. This parameter indicates that this
path is marked as multipath
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="multipath", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multipath must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="multipath", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__multipath = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multipath(self):
    self.__multipath = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="multipath", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_backup(self):
    """
    Getter method for backup, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/state/backup (boolean)

    YANG Description: BGP path marked as a backup path
    """
    return self.__backup
      
  def _set_backup(self, v, load=False):
    """
    Setter method for backup, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/state/backup (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_backup is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_backup() directly.

    YANG Description: BGP path marked as a backup path
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="backup", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """backup must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="backup", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__backup = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_backup(self):
    self.__backup = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="backup", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_last_modified(self):
    """
    Getter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/state/last_modified (oc-types:timeticks64)

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    return self.__last_modified
      
  def _set_last_modified(self, v, load=False):
    """
    Setter method for last_modified, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/state/last_modified (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_last_modified is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_last_modified() directly.

    YANG Description: Timestamp when this path was last modified.

The value is the timestamp relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    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="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """last_modified must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__last_modified = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_last_modified(self):
    self.__last_modified = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-modified", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_valid_route(self):
    """
    Getter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/state/valid_route (boolean)

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    return self.__valid_route
      
  def _set_valid_route(self, v, load=False):
    """
    Setter method for valid_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/state/valid_route (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_valid_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_valid_route() directly.

    YANG Description: Indicates that the route is considered valid by the
local router
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """valid_route must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__valid_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_valid_route(self):
    self.__valid_route = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_invalid_reason(self):
    """
    Getter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/state/invalid_reason (identityref)

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    return self.__invalid_reason
      
  def _set_invalid_reason(self, v, load=False):
    """
    Setter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/state/invalid_reason (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_invalid_reason is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_invalid_reason() directly.

    YANG Description: If the route is rejected as invalid, this indicates the
reason.
    """
    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={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """invalid_reason must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__invalid_reason = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_invalid_reason(self):
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CLUSTER_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_AS_LOOP': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_ORIGINATOR': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprib-types:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgprt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}, 'oc-bgpribt:INVALID_CONFED': {'@module': 'openconfig-rib-bgp-types', '@namespace': 'http://openconfig.net/yang/rib/bgp-types'}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_attr_index(self):
    """
    Getter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/state/attr_index (leafref)

    YANG Description: Reference to the common attribute group for the
route
    """
    return self.__attr_index
      
  def _set_attr_index(self, v, load=False):
    """
    Setter method for attr_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/state/attr_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_index() directly.

    YANG Description: Reference to the common attribute group for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_index(self):
    self.__attr_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_community_index(self):
    """
    Getter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/state/community_index (leafref)

    YANG Description: Reference to the community attribute for the route
    """
    return self.__community_index
      
  def _set_community_index(self, v, load=False):
    """
    Setter method for community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/state/community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_community_index() directly.

    YANG Description: Reference to the community attribute for the route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_community_index(self):
    self.__community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_ext_community_index(self):
    """
    Getter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/state/ext_community_index (leafref)

    YANG Description: Reference to the extended community attribute for the
route
    """
    return self.__ext_community_index
      
  def _set_ext_community_index(self, v, load=False):
    """
    Setter method for ext_community_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/state/ext_community_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ext_community_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ext_community_index() directly.

    YANG Description: Reference to the extended community attribute for the
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ext_community_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__ext_community_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ext_community_index(self):
    self.__ext_community_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ext-community-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)

  esi = __builtin__.property(_get_esi)
  gateway_ip_address = __builtin__.property(_get_gateway_ip_address)
  peer_ip = __builtin__.property(_get_peer_ip)
  peer_path_id = __builtin__.property(_get_peer_path_id)
  source_route_distinguisher = __builtin__.property(_get_source_route_distinguisher)
  source_address_family = __builtin__.property(_get_source_address_family)
  advertised_to_peer = __builtin__.property(_get_advertised_to_peer)
  label = __builtin__.property(_get_label)
  label2 = __builtin__.property(_get_label2)
  bestpath = __builtin__.property(_get_bestpath)
  multipath = __builtin__.property(_get_multipath)
  backup = __builtin__.property(_get_backup)
  last_modified = __builtin__.property(_get_last_modified)
  valid_route = __builtin__.property(_get_valid_route)
  invalid_reason = __builtin__.property(_get_invalid_reason)
  attr_index = __builtin__.property(_get_attr_index)
  community_index = __builtin__.property(_get_community_index)
  ext_community_index = __builtin__.property(_get_ext_community_index)


  _pyangbind_elements = OrderedDict([('esi', esi), ('gateway_ip_address', gateway_ip_address), ('peer_ip', peer_ip), ('peer_path_id', peer_path_id), ('source_route_distinguisher', source_route_distinguisher), ('source_address_family', source_address_family), ('advertised_to_peer', advertised_to_peer), ('label', label), ('label2', label2), ('bestpath', bestpath), ('multipath', multipath), ('backup', backup), ('last_modified', last_modified), ('valid_route', valid_route), ('invalid_reason', invalid_reason), ('attr_index', attr_index), ('community_index', community_index), ('ext_community_index', ext_community_index), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix_type_five_route_paths_path_unknown_attributes_unknown_attribute_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-five-ip-prefix/type-five-route/paths/path/unknown-attributes/unknown-attribute/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for unknown route attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__optional','__transitive','__partial','__extended','__attr_type','__attr_len','__attr_value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-five-ip-prefix', 'type-five-route', 'paths', 'path', 'unknown-attributes', 'unknown-attribute', 'state']

  def _get_optional(self):
    """
    Getter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/unknown_attributes/unknown_attribute/state/optional (boolean)

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    return self.__optional
      
  def _set_optional(self, v, load=False):
    """
    Setter method for optional, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/unknown_attributes/unknown_attribute/state/optional (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_optional is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_optional() directly.

    YANG Description: Defines whether the attribute is optional (if
set to true) or well-known (if set to false).
Set in the high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """optional must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__optional = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_optional(self):
    self.__optional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="optional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_transitive(self):
    """
    Getter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/unknown_attributes/unknown_attribute/state/transitive (boolean)

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    return self.__transitive
      
  def _set_transitive(self, v, load=False):
    """
    Setter method for transitive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/unknown_attributes/unknown_attribute/state/transitive (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transitive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transitive() directly.

    YANG Description: Defines whether an optional attribute is transitive
(if set to true) or non-transitive (if set to false).  For
well-known attributes, the transitive flag MUST be set to
true.  Set in the second high-order bit of the BGP attribute
flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transitive must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__transitive = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transitive(self):
    self.__transitive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transitive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_partial(self):
    """
    Getter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/unknown_attributes/unknown_attribute/state/partial (boolean)

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    return self.__partial
      
  def _set_partial(self, v, load=False):
    """
    Setter method for partial, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/unknown_attributes/unknown_attribute/state/partial (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_partial is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_partial() directly.

    YANG Description: Defines whether the information contained in the optional
transitive attribute is partial (if set to true) or complete
(if set to false).  For well-known attributes and for
optional non-transitive attributes, the partial flag
must be set to false.  Set in the third high-order bit of
the BGP attribute flags octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """partial must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__partial = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_partial(self):
    self.__partial = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="partial", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_extended(self):
    """
    Getter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/unknown_attributes/unknown_attribute/state/extended (boolean)

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    return self.__extended
      
  def _set_extended(self, v, load=False):
    """
    Setter method for extended, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/unknown_attributes/unknown_attribute/state/extended (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended() directly.

    YANG Description: Defines whether the attribute length is one octet
(if set to false) or two octets (if set to true).  Set in
the fourth high-order bit of the BGP attribute flags
octet.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__extended = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended(self):
    self.__extended = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="extended", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/unknown_attributes/unknown_attribute/state/attr_type (uint8)

    YANG Description: 1-octet value encoding the attribute type code
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/unknown_attributes/unknown_attribute/state/attr_type (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() directly.

    YANG Description: 1-octet value encoding the attribute type code
    """
    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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_attr_len(self):
    """
    Getter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/unknown_attributes/unknown_attribute/state/attr_len (uint16)

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    return self.__attr_len
      
  def _set_attr_len(self, v, load=False):
    """
    Setter method for attr_len, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/unknown_attributes/unknown_attribute/state/attr_len (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_len is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_len() directly.

    YANG Description: One or two octet attribute length field indicating the
length of the attribute data in octets.  If the Extended
Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet
    """
    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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_len 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="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__attr_len = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_len(self):
    self.__attr_len = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="attr-len", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_attr_value(self):
    """
    Getter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/unknown_attributes/unknown_attribute/state/attr_value (binary)

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    return self.__attr_value
      
  def _set_attr_value(self, v, load=False):
    """
    Setter method for attr_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/unknown_attributes/unknown_attribute/state/attr_value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_value() directly.

    YANG Description: Raw attribute value, not including the attribute
flags, type, or length.  The maximum length
of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__attr_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_value(self):
    self.__attr_value = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['1..65535']}), is_leaf=True, yang_name="attr-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  optional = __builtin__.property(_get_optional)
  transitive = __builtin__.property(_get_transitive)
  partial = __builtin__.property(_get_partial)
  extended = __builtin__.property(_get_extended)
  attr_type = __builtin__.property(_get_attr_type)
  attr_len = __builtin__.property(_get_attr_len)
  attr_value = __builtin__.property(_get_attr_value)


  _pyangbind_elements = OrderedDict([('optional', optional), ('transitive', transitive), ('partial', partial), ('extended', extended), ('attr_type', attr_type), ('attr_len', attr_len), ('attr_value', attr_value), ])


class yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix_type_five_route_paths_path_unknown_attributes_unknown_attribute(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-five-ip-prefix/type-five-route/paths/path/unknown-attributes/unknown-attribute. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
  """
  __slots__ = ('_path_helper', '_extmethods', '__attr_type','__state',)

  _yang_name = 'unknown-attribute'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix_type_five_route_paths_path_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-five-ip-prefix', 'type-five-route', 'paths', 'path', 'unknown-attributes', 'unknown-attribute']

  def _get_attr_type(self):
    """
    Getter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/unknown_attributes/unknown_attribute/attr_type (leafref)

    YANG Description: Reference to the list key
    """
    return self.__attr_type
      
  def _set_attr_type(self, v, load=False):
    """
    Setter method for attr_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/unknown_attributes/unknown_attribute/attr_type (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_type() 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="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_type must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__attr_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_type(self):
    self.__attr_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="attr-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/unknown_attributes/unknown_attribute/state (container)

    YANG Description: Operational state for unknown route attributes
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/unknown_attributes/unknown_attribute/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 unknown route attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix_type_five_route_paths_path_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix_type_five_route_paths_path_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix_type_five_route_paths_path_unknown_attributes_unknown_attribute_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  attr_type = __builtin__.property(_get_attr_type)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('attr_type', attr_type), ('state', state), ])


class yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix_type_five_route_paths_path_unknown_attributes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-five-ip-prefix/type-five-route/paths/path/unknown-attributes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
  """
  __slots__ = ('_path_helper', '_extmethods', '__unknown_attribute',)

  _yang_name = 'unknown-attributes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix_type_five_route_paths_path_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-five-ip-prefix', 'type-five-route', 'paths', 'path', 'unknown-attributes']

  def _get_unknown_attribute(self):
    """
    Getter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/unknown_attributes/unknown_attribute (list)

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    return self.__unknown_attribute
      
  def _set_unknown_attribute(self, v, load=False):
    """
    Setter method for unknown_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/unknown_attributes/unknown_attribute (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attribute is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attribute() directly.

    YANG Description: This list contains received attributes that are unrecognized
or unsupported by the local router.  The list may be empty.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix_type_five_route_paths_path_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attribute must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix_type_five_route_paths_path_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__unknown_attribute = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attribute(self):
    self.__unknown_attribute = YANGDynClass(base=YANGListType("attr_type",yc_unknown_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix_type_five_route_paths_path_unknown_attributes_unknown_attribute, yang_name="unknown-attribute", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='attr-type', extensions=None), is_container='list', yang_name="unknown-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  unknown_attribute = __builtin__.property(_get_unknown_attribute)


  _pyangbind_elements = OrderedDict([('unknown_attribute', unknown_attribute), ])


class yc_path_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix_type_five_route_paths_path(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-five-ip-prefix/type-five-route/paths/path. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of paths
  """
  __slots__ = ('_path_helper', '_extmethods', '__peer_ip','__peer_path_id','__source_route_distinguisher','__source_address_family','__state','__unknown_attributes',)

  _yang_name = 'path'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__peer_ip = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__peer_path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__source_route_distinguisher = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__source_address_family = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix_type_five_route_paths_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix_type_five_route_paths_path_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-five-ip-prefix', 'type-five-route', 'paths', 'path']

  def _get_peer_ip(self):
    """
    Getter method for peer_ip, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/peer_ip (leafref)

    YANG Description: The source peer ip address of the imported route
    """
    return self.__peer_ip
      
  def _set_peer_ip(self, v, load=False):
    """
    Setter method for peer_ip, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/peer_ip (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_ip is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_ip() directly.

    YANG Description: The source peer ip address of the imported route
    """
    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="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_ip must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__peer_ip = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_ip(self):
    self.__peer_ip = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_peer_path_id(self):
    """
    Getter method for peer_path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/peer_path_id (leafref)

    YANG Description: The source peer path id of the imported route
    """
    return self.__peer_path_id
      
  def _set_peer_path_id(self, v, load=False):
    """
    Setter method for peer_path_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/peer_path_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_path_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_path_id() directly.

    YANG Description: The source peer path id of the imported route
    """
    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="peer-path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_path_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__peer_path_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_path_id(self):
    self.__peer_path_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-path-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_source_route_distinguisher(self):
    """
    Getter method for source_route_distinguisher, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/source_route_distinguisher (leafref)

    YANG Description: The source route distinguisher is the remote RD source of the
imported route
    """
    return self.__source_route_distinguisher
      
  def _set_source_route_distinguisher(self, v, load=False):
    """
    Setter method for source_route_distinguisher, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/source_route_distinguisher (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_route_distinguisher is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_route_distinguisher() directly.

    YANG Description: The source route distinguisher is the remote RD source of the
imported route
    """
    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="source-route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_route_distinguisher must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__source_route_distinguisher = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_route_distinguisher(self):
    self.__source_route_distinguisher = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_source_address_family(self):
    """
    Getter method for source_address_family, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/source_address_family (leafref)

    YANG Description: The source address-family of the imported route
    """
    return self.__source_address_family
      
  def _set_source_address_family(self, v, load=False):
    """
    Setter method for source_address_family, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/source_address_family (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_address_family is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_address_family() directly.

    YANG Description: The source address-family of the imported route
    """
    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="source-address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address_family 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-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__source_address_family = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_address_family(self):
    self.__source_address_family = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/state (container)

    YANG Description: BGP path attributes for this route
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/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: BGP path attributes for this route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix_type_five_route_paths_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix_type_five_route_paths_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix_type_five_route_paths_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unknown_attributes(self):
    """
    Getter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/unknown_attributes (container)

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    return self.__unknown_attributes
      
  def _set_unknown_attributes(self, v, load=False):
    """
    Setter method for unknown_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path/unknown_attributes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_attributes() directly.

    YANG Description: Unknown path attributes that were received in the UPDATE
message which contained the prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix_type_five_route_paths_path_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_attributes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix_type_five_route_paths_path_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unknown_attributes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_attributes(self):
    self.__unknown_attributes = YANGDynClass(base=yc_unknown_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix_type_five_route_paths_path_unknown_attributes, is_container='container', yang_name="unknown-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  peer_ip = __builtin__.property(_get_peer_ip)
  peer_path_id = __builtin__.property(_get_peer_path_id)
  source_route_distinguisher = __builtin__.property(_get_source_route_distinguisher)
  source_address_family = __builtin__.property(_get_source_address_family)
  state = __builtin__.property(_get_state)
  unknown_attributes = __builtin__.property(_get_unknown_attributes)


  _pyangbind_elements = OrderedDict([('peer_ip', peer_ip), ('peer_path_id', peer_path_id), ('source_route_distinguisher', source_route_distinguisher), ('source_address_family', source_address_family), ('state', state), ('unknown_attributes', unknown_attributes), ])


class yc_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix_type_five_route_paths(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-five-ip-prefix/type-five-route/paths. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of BGP path attributes for this route
  """
  __slots__ = ('_path_helper', '_extmethods', '__path',)

  _yang_name = 'paths'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__path = YANGDynClass(base=YANGListType("peer_ip peer_path_id source_route_distinguisher source_address_family",yc_path_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix_type_five_route_paths_path, yang_name="path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='peer-ip peer-path-id source-route-distinguisher source-address-family', extensions=None), is_container='list', yang_name="path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-five-ip-prefix', 'type-five-route', 'paths']

  def _get_path(self):
    """
    Getter method for path, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path (list)

    YANG Description: List of paths
    """
    return self.__path
      
  def _set_path(self, v, load=False):
    """
    Setter method for path, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths/path (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path() directly.

    YANG Description: List of paths
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("peer_ip peer_path_id source_route_distinguisher source_address_family",yc_path_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix_type_five_route_paths_path, yang_name="path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='peer-ip peer-path-id source-route-distinguisher source-address-family', extensions=None), is_container='list', yang_name="path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("peer_ip peer_path_id source_route_distinguisher source_address_family",yc_path_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix_type_five_route_paths_path, yang_name="path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='peer-ip peer-path-id source-route-distinguisher source-address-family', extensions=None), is_container='list', yang_name="path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__path = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path(self):
    self.__path = YANGDynClass(base=YANGListType("peer_ip peer_path_id source_route_distinguisher source_address_family",yc_path_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix_type_five_route_paths_path, yang_name="path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='peer-ip peer-path-id source-route-distinguisher source-address-family', extensions=None), is_container='list', yang_name="path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  path = __builtin__.property(_get_path)


  _pyangbind_elements = OrderedDict([('path', path), ])


class yc_type_five_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix_type_five_route(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-five-ip-prefix/type-five-route. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of IP Prefix Advertisement L2VPN EVPN routes

For the purpose of BGP route key processing, only The RD, Ethernet Tag ID,
IP prefix length, and IP prefix are part of the route key used by BGP to
compare routes
  """
  __slots__ = ('_path_helper', '_extmethods', '__ethernet_tag','__ip_prefix_length','__ip_prefix','__state','__paths',)

  _yang_name = 'type-five-route'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__ethernet_tag = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ethernet-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__ip_prefix_length = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ip-prefix-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__ip_prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ip-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix_type_five_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__paths = YANGDynClass(base=yc_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix_type_five_route_paths, is_container='container', yang_name="paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-five-ip-prefix', 'type-five-route']

  def _get_ethernet_tag(self):
    """
    Getter method for ethernet_tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/ethernet_tag (leafref)

    YANG Description: The Ethernet tag identifies a particular broadcast domain.  An EVPN
instance consists of one or more broadcast domains
    """
    return self.__ethernet_tag
      
  def _set_ethernet_tag(self, v, load=False):
    """
    Setter method for ethernet_tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/ethernet_tag (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ethernet_tag is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ethernet_tag() directly.

    YANG Description: The Ethernet tag identifies a particular broadcast domain.  An EVPN
instance consists of one or more broadcast domains
    """
    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="ethernet-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ethernet_tag must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ethernet-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__ethernet_tag = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ethernet_tag(self):
    self.__ethernet_tag = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ethernet-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_ip_prefix_length(self):
    """
    Getter method for ip_prefix_length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/ip_prefix_length (leafref)

    YANG Description: Reference to the ip-prefix-length list key
    """
    return self.__ip_prefix_length
      
  def _set_ip_prefix_length(self, v, load=False):
    """
    Setter method for ip_prefix_length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/ip_prefix_length (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ip_prefix_length is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ip_prefix_length() directly.

    YANG Description: Reference to the ip-prefix-length 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="ip-prefix-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ip_prefix_length must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ip-prefix-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__ip_prefix_length = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ip_prefix_length(self):
    self.__ip_prefix_length = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ip-prefix-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_ip_prefix(self):
    """
    Getter method for ip_prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/ip_prefix (leafref)

    YANG Description: Reference to the ip-prefix list key
    """
    return self.__ip_prefix
      
  def _set_ip_prefix(self, v, load=False):
    """
    Setter method for ip_prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/ip_prefix (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ip_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ip_prefix() directly.

    YANG Description: Reference to the ip-prefix 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="ip-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ip_prefix must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ip-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__ip_prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ip_prefix(self):
    self.__ip_prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ip-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/state (container)

    YANG Description: Operational state data for IP Prefix Advertisement L2VPN EVPN
route entries in the BGP LOC-RIB
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/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 IP Prefix Advertisement L2VPN EVPN
route entries in the BGP LOC-RIB
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix_type_five_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix_type_five_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix_type_five_route_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_paths(self):
    """
    Getter method for paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths (container)

    YANG Description: List of BGP path attributes for this route
    """
    return self.__paths
      
  def _set_paths(self, v, load=False):
    """
    Setter method for paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route/paths (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_paths() directly.

    YANG Description: List of BGP path attributes for this route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix_type_five_route_paths, is_container='container', yang_name="paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """paths must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix_type_five_route_paths, is_container='container', yang_name="paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_paths(self):
    self.__paths = YANGDynClass(base=yc_paths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix_type_five_route_paths, is_container='container', yang_name="paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  ethernet_tag = __builtin__.property(_get_ethernet_tag)
  ip_prefix_length = __builtin__.property(_get_ip_prefix_length)
  ip_prefix = __builtin__.property(_get_ip_prefix)
  state = __builtin__.property(_get_state)
  paths = __builtin__.property(_get_paths)


  _pyangbind_elements = OrderedDict([('ethernet_tag', ethernet_tag), ('ip_prefix_length', ip_prefix_length), ('ip_prefix', ip_prefix), ('state', state), ('paths', paths), ])


class yc_type_five_ip_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher/type-five-ip-prefix. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top level container for IP Prefix Advertisement L2VPN EVPN routes
  """
  __slots__ = ('_path_helper', '_extmethods', '__type_five_route',)

  _yang_name = 'type-five-ip-prefix'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type_five_route = YANGDynClass(base=YANGListType("ethernet_tag ip_prefix_length ip_prefix",yc_type_five_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix_type_five_route, yang_name="type-five-route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='ethernet-tag ip-prefix-length ip-prefix', extensions=None), is_container='list', yang_name="type-five-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher', 'type-five-ip-prefix']

  def _get_type_five_route(self):
    """
    Getter method for type_five_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route (list)

    YANG Description: List of IP Prefix Advertisement L2VPN EVPN routes

For the purpose of BGP route key processing, only The RD, Ethernet Tag ID,
IP prefix length, and IP prefix are part of the route key used by BGP to
compare routes
    """
    return self.__type_five_route
      
  def _set_type_five_route(self, v, load=False):
    """
    Setter method for type_five_route, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix/type_five_route (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type_five_route is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type_five_route() directly.

    YANG Description: List of IP Prefix Advertisement L2VPN EVPN routes

For the purpose of BGP route key processing, only The RD, Ethernet Tag ID,
IP prefix length, and IP prefix are part of the route key used by BGP to
compare routes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("ethernet_tag ip_prefix_length ip_prefix",yc_type_five_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix_type_five_route, yang_name="type-five-route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='ethernet-tag ip-prefix-length ip-prefix', extensions=None), is_container='list', yang_name="type-five-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type_five_route must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("ethernet_tag ip_prefix_length ip_prefix",yc_type_five_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix_type_five_route, yang_name="type-five-route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='ethernet-tag ip-prefix-length ip-prefix', extensions=None), is_container='list', yang_name="type-five-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__type_five_route = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type_five_route(self):
    self.__type_five_route = YANGDynClass(base=YANGListType("ethernet_tag ip_prefix_length ip_prefix",yc_type_five_route_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix_type_five_route, yang_name="type-five-route", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='ethernet-tag ip-prefix-length ip-prefix', extensions=None), is_container='list', yang_name="type-five-route", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  type_five_route = __builtin__.property(_get_type_five_route)


  _pyangbind_elements = OrderedDict([('type_five_route', type_five_route), ])


class yc_route_distinguisher_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes/route-distinguisher. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of route distinguishers
  """
  __slots__ = ('_path_helper', '_extmethods', '__route_distinguisher','__state','__type_one_ethernet_auto_discovery','__type_two_mac_ip_advertisement','__type_three_inclusive_multicast_ethernet_tag','__type_four_ethernet_segment','__type_five_ip_prefix',)

  _yang_name = 'route-distinguisher'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__route_distinguisher = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__type_one_ethernet_auto_discovery = YANGDynClass(base=yc_type_one_ethernet_auto_discovery_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery, is_container='container', yang_name="type-one-ethernet-auto-discovery", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__type_two_mac_ip_advertisement = YANGDynClass(base=yc_type_two_mac_ip_advertisement_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement, is_container='container', yang_name="type-two-mac-ip-advertisement", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__type_three_inclusive_multicast_ethernet_tag = YANGDynClass(base=yc_type_three_inclusive_multicast_ethernet_tag_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag, is_container='container', yang_name="type-three-inclusive-multicast-ethernet-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__type_four_ethernet_segment = YANGDynClass(base=yc_type_four_ethernet_segment_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment, is_container='container', yang_name="type-four-ethernet-segment", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__type_five_ip_prefix = YANGDynClass(base=yc_type_five_ip_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix, is_container='container', yang_name="type-five-ip-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes', 'route-distinguisher']

  def _get_route_distinguisher(self):
    """
    Getter method for route_distinguisher, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/route_distinguisher (leafref)

    YANG Description: An EVPN instance requires a Route Distinguisher (RD) that is
unique per MAC-VRF
    """
    return self.__route_distinguisher
      
  def _set_route_distinguisher(self, v, load=False):
    """
    Setter method for route_distinguisher, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/route_distinguisher (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route_distinguisher is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route_distinguisher() directly.

    YANG Description: An EVPN instance requires a Route Distinguisher (RD) that is
unique per MAC-VRF
    """
    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="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route_distinguisher must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__route_distinguisher = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route_distinguisher(self):
    self.__route_distinguisher = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/state (container)

    YANG Description: Top level container for L2VPN EVPN RDs
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/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: Top level container for L2VPN EVPN RDs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_type_one_ethernet_auto_discovery(self):
    """
    Getter method for type_one_ethernet_auto_discovery, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery (container)

    YANG Description: Top level container BGP EVPN Ethernet Auto-discovery routes
    """
    return self.__type_one_ethernet_auto_discovery
      
  def _set_type_one_ethernet_auto_discovery(self, v, load=False):
    """
    Setter method for type_one_ethernet_auto_discovery, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_one_ethernet_auto_discovery (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type_one_ethernet_auto_discovery is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type_one_ethernet_auto_discovery() directly.

    YANG Description: Top level container BGP EVPN Ethernet Auto-discovery routes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_type_one_ethernet_auto_discovery_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery, is_container='container', yang_name="type-one-ethernet-auto-discovery", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type_one_ethernet_auto_discovery must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_type_one_ethernet_auto_discovery_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery, is_container='container', yang_name="type-one-ethernet-auto-discovery", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__type_one_ethernet_auto_discovery = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type_one_ethernet_auto_discovery(self):
    self.__type_one_ethernet_auto_discovery = YANGDynClass(base=yc_type_one_ethernet_auto_discovery_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_one_ethernet_auto_discovery, is_container='container', yang_name="type-one-ethernet-auto-discovery", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_type_two_mac_ip_advertisement(self):
    """
    Getter method for type_two_mac_ip_advertisement, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement (container)

    YANG Description: Top level container for MAC_IP Advertisement L2VPN EVPN routes
    """
    return self.__type_two_mac_ip_advertisement
      
  def _set_type_two_mac_ip_advertisement(self, v, load=False):
    """
    Setter method for type_two_mac_ip_advertisement, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_two_mac_ip_advertisement (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type_two_mac_ip_advertisement is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type_two_mac_ip_advertisement() directly.

    YANG Description: Top level container for MAC_IP Advertisement L2VPN EVPN routes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_type_two_mac_ip_advertisement_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement, is_container='container', yang_name="type-two-mac-ip-advertisement", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type_two_mac_ip_advertisement must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_type_two_mac_ip_advertisement_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement, is_container='container', yang_name="type-two-mac-ip-advertisement", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__type_two_mac_ip_advertisement = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type_two_mac_ip_advertisement(self):
    self.__type_two_mac_ip_advertisement = YANGDynClass(base=yc_type_two_mac_ip_advertisement_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_two_mac_ip_advertisement, is_container='container', yang_name="type-two-mac-ip-advertisement", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_type_three_inclusive_multicast_ethernet_tag(self):
    """
    Getter method for type_three_inclusive_multicast_ethernet_tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag (container)

    YANG Description: Top level container for Inclusive Multicast Ethernet Tag L2VPN EVPN
routes
    """
    return self.__type_three_inclusive_multicast_ethernet_tag
      
  def _set_type_three_inclusive_multicast_ethernet_tag(self, v, load=False):
    """
    Setter method for type_three_inclusive_multicast_ethernet_tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_three_inclusive_multicast_ethernet_tag (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type_three_inclusive_multicast_ethernet_tag is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type_three_inclusive_multicast_ethernet_tag() directly.

    YANG Description: Top level container for Inclusive Multicast Ethernet Tag L2VPN EVPN
routes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_type_three_inclusive_multicast_ethernet_tag_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag, is_container='container', yang_name="type-three-inclusive-multicast-ethernet-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type_three_inclusive_multicast_ethernet_tag must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_type_three_inclusive_multicast_ethernet_tag_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag, is_container='container', yang_name="type-three-inclusive-multicast-ethernet-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__type_three_inclusive_multicast_ethernet_tag = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type_three_inclusive_multicast_ethernet_tag(self):
    self.__type_three_inclusive_multicast_ethernet_tag = YANGDynClass(base=yc_type_three_inclusive_multicast_ethernet_tag_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_three_inclusive_multicast_ethernet_tag, is_container='container', yang_name="type-three-inclusive-multicast-ethernet-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_type_four_ethernet_segment(self):
    """
    Getter method for type_four_ethernet_segment, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment (container)

    YANG Description: Top level container for Ethernet Segment L2VPN EVPN routes
    """
    return self.__type_four_ethernet_segment
      
  def _set_type_four_ethernet_segment(self, v, load=False):
    """
    Setter method for type_four_ethernet_segment, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_four_ethernet_segment (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type_four_ethernet_segment is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type_four_ethernet_segment() directly.

    YANG Description: Top level container for Ethernet Segment L2VPN EVPN routes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_type_four_ethernet_segment_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment, is_container='container', yang_name="type-four-ethernet-segment", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type_four_ethernet_segment must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_type_four_ethernet_segment_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment, is_container='container', yang_name="type-four-ethernet-segment", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__type_four_ethernet_segment = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type_four_ethernet_segment(self):
    self.__type_four_ethernet_segment = YANGDynClass(base=yc_type_four_ethernet_segment_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_four_ethernet_segment, is_container='container', yang_name="type-four-ethernet-segment", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_type_five_ip_prefix(self):
    """
    Getter method for type_five_ip_prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix (container)

    YANG Description: Top level container for IP Prefix Advertisement L2VPN EVPN routes
    """
    return self.__type_five_ip_prefix
      
  def _set_type_five_ip_prefix(self, v, load=False):
    """
    Setter method for type_five_ip_prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher/type_five_ip_prefix (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type_five_ip_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type_five_ip_prefix() directly.

    YANG Description: Top level container for IP Prefix Advertisement L2VPN EVPN routes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_type_five_ip_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix, is_container='container', yang_name="type-five-ip-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type_five_ip_prefix must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_type_five_ip_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix, is_container='container', yang_name="type-five-ip-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__type_five_ip_prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type_five_ip_prefix(self):
    self.__type_five_ip_prefix = YANGDynClass(base=yc_type_five_ip_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher_type_five_ip_prefix, is_container='container', yang_name="type-five-ip-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  route_distinguisher = __builtin__.property(_get_route_distinguisher)
  state = __builtin__.property(_get_state)
  type_one_ethernet_auto_discovery = __builtin__.property(_get_type_one_ethernet_auto_discovery)
  type_two_mac_ip_advertisement = __builtin__.property(_get_type_two_mac_ip_advertisement)
  type_three_inclusive_multicast_ethernet_tag = __builtin__.property(_get_type_three_inclusive_multicast_ethernet_tag)
  type_four_ethernet_segment = __builtin__.property(_get_type_four_ethernet_segment)
  type_five_ip_prefix = __builtin__.property(_get_type_five_ip_prefix)


  _pyangbind_elements = OrderedDict([('route_distinguisher', route_distinguisher), ('state', state), ('type_one_ethernet_auto_discovery', type_one_ethernet_auto_discovery), ('type_two_mac_ip_advertisement', type_two_mac_ip_advertisement), ('type_three_inclusive_multicast_ethernet_tag', type_three_inclusive_multicast_ethernet_tag), ('type_four_ethernet_segment', type_four_ethernet_segment), ('type_five_ip_prefix', type_five_ip_prefix), ])


class yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib/routes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for list of routes in the routing
table.
  """
  __slots__ = ('_path_helper', '_extmethods', '__route_distinguisher',)

  _yang_name = 'routes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__route_distinguisher = YANGDynClass(base=YANGListType("route_distinguisher",yc_route_distinguisher_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher, yang_name="route-distinguisher", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='route-distinguisher', extensions=None), is_container='list', yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib', 'routes']

  def _get_route_distinguisher(self):
    """
    Getter method for route_distinguisher, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher (list)

    YANG Description: List of route distinguishers
    """
    return self.__route_distinguisher
      
  def _set_route_distinguisher(self, v, load=False):
    """
    Setter method for route_distinguisher, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes/route_distinguisher (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route_distinguisher is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route_distinguisher() directly.

    YANG Description: List of route distinguishers
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("route_distinguisher",yc_route_distinguisher_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher, yang_name="route-distinguisher", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='route-distinguisher', extensions=None), is_container='list', yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route_distinguisher must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("route_distinguisher",yc_route_distinguisher_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher, yang_name="route-distinguisher", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='route-distinguisher', extensions=None), is_container='list', yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__route_distinguisher = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route_distinguisher(self):
    self.__route_distinguisher = YANGDynClass(base=YANGListType("route_distinguisher",yc_route_distinguisher_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes_route_distinguisher, yang_name="route-distinguisher", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='route-distinguisher', extensions=None), is_container='list', yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  route_distinguisher = __builtin__.property(_get_route_distinguisher)


  _pyangbind_elements = OrderedDict([('route_distinguisher', route_distinguisher), ])


class yc_loc_rib_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/loc-rib. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Container for the L2VPN EVPN BGP LOC-RIB data
  """
  __slots__ = ('_path_helper', '_extmethods', '__routes',)

  _yang_name = 'loc-rib'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'loc-rib']

  def _get_routes(self):
    """
    Getter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes (container)

    YANG Description: Enclosing container for list of routes in the routing
table.
    """
    return self.__routes
      
  def _set_routes(self, v, load=False):
    """
    Setter method for routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib/routes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_routes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_routes() directly.

    YANG Description: Enclosing container for list of routes in the routing
table.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """routes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__routes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_routes(self):
    self.__routes = YANGDynClass(base=yc_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib_routes, is_container='container', yang_name="routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  routes = __builtin__.property(_get_routes)


  _pyangbind_elements = OrderedDict([('routes', routes), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_neighbors_neighbor_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/neighbors/neighbor/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for each neighbor BGP Adj-RIB
  """
  __slots__ = ('_path_helper', '_extmethods', '__neighbor_address',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__neighbor_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}'}),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}|:))'}),], is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'neighbors', 'neighbor', 'state']

  def _get_neighbor_address(self):
    """
    Getter method for neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/neighbors/neighbor/state/neighbor_address (oc-inet:ip-address)

    YANG Description: IP address of the BGP neighbor or peer
    """
    return self.__neighbor_address
      
  def _set_neighbor_address(self, v, load=False):
    """
    Setter method for neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/neighbors/neighbor/state/neighbor_address (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor_address() directly.

    YANG Description: IP address of the BGP neighbor or peer
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor_address must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__neighbor_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor_address(self):
    self.__neighbor_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}'}),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}|:))'}),], is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)

  neighbor_address = __builtin__.property(_get_neighbor_address)


  _pyangbind_elements = OrderedDict([('neighbor_address', neighbor_address), ])


class yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_neighbors_neighbor(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/neighbors/neighbor. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of neighbors (peers) of the local BGP speaker
  """
  __slots__ = ('_path_helper', '_extmethods', '__neighbor_address','__state',)

  _yang_name = 'neighbor'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__neighbor_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'neighbors', 'neighbor']

  def _get_neighbor_address(self):
    """
    Getter method for neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/neighbors/neighbor/neighbor_address (leafref)

    YANG Description: Reference to the list key
    """
    return self.__neighbor_address
      
  def _set_neighbor_address(self, v, load=False):
    """
    Setter method for neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/neighbors/neighbor/neighbor_address (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor_address() 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="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor_address must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__neighbor_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor_address(self):
    self.__neighbor_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/neighbors/neighbor/state (container)

    YANG Description: Operational state for each neighbor BGP Adj-RIB
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/neighbors/neighbor/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 each neighbor BGP Adj-RIB
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  neighbor_address = __builtin__.property(_get_neighbor_address)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('neighbor_address', neighbor_address), ('state', state), ])


class yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_neighbors(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn/neighbors. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for neighbor list
  """
  __slots__ = ('_path_helper', '_extmethods', '__neighbor',)

  _yang_name = 'neighbors'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__neighbor = YANGDynClass(base=YANGListType("neighbor_address",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='neighbor-address', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn', 'neighbors']

  def _get_neighbor(self):
    """
    Getter method for neighbor, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/neighbors/neighbor (list)

    YANG Description: List of neighbors (peers) of the local BGP speaker
    """
    return self.__neighbor
      
  def _set_neighbor(self, v, load=False):
    """
    Setter method for neighbor, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/neighbors/neighbor (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor() directly.

    YANG Description: List of neighbors (peers) of the local BGP speaker
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("neighbor_address",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='neighbor-address', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("neighbor_address",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='neighbor-address', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__neighbor = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor(self):
    self.__neighbor = YANGDynClass(base=YANGListType("neighbor_address",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='neighbor-address', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  neighbor = __builtin__.property(_get_neighbor)


  _pyangbind_elements = OrderedDict([('neighbor', neighbor), ])


class yc_l2vpn_evpn_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/l2vpn-evpn. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Routing tables for l2vpn evpn -- active when the
afi-safi name is l2vpn-evpn
  """
  __slots__ = ('_path_helper', '_extmethods', '__loc_rib','__neighbors',)

  _yang_name = 'l2vpn-evpn'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__loc_rib = YANGDynClass(base=yc_loc_rib_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib, is_container='container', yang_name="loc-rib", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__neighbors = YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi', 'l2vpn-evpn']

  def _get_loc_rib(self):
    """
    Getter method for loc_rib, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib (container)

    YANG Description: Container for the L2VPN EVPN BGP LOC-RIB data
    """
    return self.__loc_rib
      
  def _set_loc_rib(self, v, load=False):
    """
    Setter method for loc_rib, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/loc_rib (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_loc_rib is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_loc_rib() directly.

    YANG Description: Container for the L2VPN EVPN BGP LOC-RIB data
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_loc_rib_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib, is_container='container', yang_name="loc-rib", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """loc_rib must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_loc_rib_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib, is_container='container', yang_name="loc-rib", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__loc_rib = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_loc_rib(self):
    self.__loc_rib = YANGDynClass(base=yc_loc_rib_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_loc_rib, is_container='container', yang_name="loc-rib", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_neighbors(self):
    """
    Getter method for neighbors, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/neighbors (container)

    YANG Description: Enclosing container for neighbor list
    """
    return self.__neighbors
      
  def _set_neighbors(self, v, load=False):
    """
    Setter method for neighbors, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn/neighbors (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbors is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbors() directly.

    YANG Description: Enclosing container for neighbor list
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbors must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__neighbors = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbors(self):
    self.__neighbors = YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  loc_rib = __builtin__.property(_get_loc_rib)
  neighbors = __builtin__.property(_get_neighbors)


  _pyangbind_elements = OrderedDict([('loc_rib', loc_rib), ('neighbors', neighbors), ])


class yc_afi_safi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: list of afi-safi types
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi_safi_name','__state','__ipv4_unicast','__ipv6_unicast','__ipv4_srte_policy','__ipv6_srte_policy','__l2vpn_evpn',)

  _yang_name = 'afi-safi'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi_safi_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ipv4_unicast = YANGDynClass(base=yc_ipv4_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast, is_container='container', yang_name="ipv4-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ipv6_unicast = YANGDynClass(base=yc_ipv6_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast, is_container='container', yang_name="ipv6-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ipv4_srte_policy = YANGDynClass(base=yc_ipv4_srte_policy_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy, is_container='container', yang_name="ipv4-srte-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ipv6_srte_policy = YANGDynClass(base=yc_ipv6_srte_policy_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy, is_container='container', yang_name="ipv6-srte-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__l2vpn_evpn = YANGDynClass(base=yc_l2vpn_evpn_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn, is_container='container', yang_name="l2vpn-evpn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis', 'afi-safi']

  def _get_afi_safi_name(self):
    """
    Getter method for afi_safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/afi_safi_name (leafref)

    YANG Description: Reference to the list key
    """
    return self.__afi_safi_name
      
  def _set_afi_safi_name(self, v, load=False):
    """
    Setter method for afi_safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/afi_safi_name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_safi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_safi_name() 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="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_safi_name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__afi_safi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_safi_name(self):
    self.__afi_safi_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/state (container)

    YANG Description: Operational state data for the BGP list
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/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 BGP list
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ipv4_unicast(self):
    """
    Getter method for ipv4_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast (container)

    YANG Description: Routing tables for IPv4 unicast -- active when the
afi-safi name is ipv4-unicast
    """
    return self.__ipv4_unicast
      
  def _set_ipv4_unicast(self, v, load=False):
    """
    Setter method for ipv4_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_unicast (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv4_unicast is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv4_unicast() directly.

    YANG Description: Routing tables for IPv4 unicast -- active when the
afi-safi name is ipv4-unicast
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv4_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast, is_container='container', yang_name="ipv4-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv4_unicast must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv4_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast, is_container='container', yang_name="ipv4-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ipv4_unicast = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv4_unicast(self):
    self.__ipv4_unicast = YANGDynClass(base=yc_ipv4_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_unicast, is_container='container', yang_name="ipv4-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ipv6_unicast(self):
    """
    Getter method for ipv6_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast (container)

    YANG Description: Routing tables for IPv6 unicast -- active when the
afi-safi name is ipv6-unicast
    """
    return self.__ipv6_unicast
      
  def _set_ipv6_unicast(self, v, load=False):
    """
    Setter method for ipv6_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_unicast (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6_unicast is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6_unicast() directly.

    YANG Description: Routing tables for IPv6 unicast -- active when the
afi-safi name is ipv6-unicast
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv6_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast, is_container='container', yang_name="ipv6-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6_unicast must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv6_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast, is_container='container', yang_name="ipv6-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ipv6_unicast = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6_unicast(self):
    self.__ipv6_unicast = YANGDynClass(base=yc_ipv6_unicast_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_unicast, is_container='container', yang_name="ipv6-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ipv4_srte_policy(self):
    """
    Getter method for ipv4_srte_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy (container)

    YANG Description: Routing tables for the IPv4 Unicast, SR-TE Policy SAFI.
    """
    return self.__ipv4_srte_policy
      
  def _set_ipv4_srte_policy(self, v, load=False):
    """
    Setter method for ipv4_srte_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv4_srte_policy (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv4_srte_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv4_srte_policy() directly.

    YANG Description: Routing tables for the IPv4 Unicast, SR-TE Policy SAFI.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv4_srte_policy_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy, is_container='container', yang_name="ipv4-srte-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv4_srte_policy must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv4_srte_policy_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy, is_container='container', yang_name="ipv4-srte-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ipv4_srte_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv4_srte_policy(self):
    self.__ipv4_srte_policy = YANGDynClass(base=yc_ipv4_srte_policy_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv4_srte_policy, is_container='container', yang_name="ipv4-srte-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ipv6_srte_policy(self):
    """
    Getter method for ipv6_srte_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy (container)

    YANG Description: Routing tables for the IPv6 Unicast, SR-TE Policy SAFI.
    """
    return self.__ipv6_srte_policy
      
  def _set_ipv6_srte_policy(self, v, load=False):
    """
    Setter method for ipv6_srte_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/ipv6_srte_policy (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6_srte_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6_srte_policy() directly.

    YANG Description: Routing tables for the IPv6 Unicast, SR-TE Policy SAFI.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv6_srte_policy_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy, is_container='container', yang_name="ipv6-srte-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6_srte_policy must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv6_srte_policy_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy, is_container='container', yang_name="ipv6-srte-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ipv6_srte_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6_srte_policy(self):
    self.__ipv6_srte_policy = YANGDynClass(base=yc_ipv6_srte_policy_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_ipv6_srte_policy, is_container='container', yang_name="ipv6-srte-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_l2vpn_evpn(self):
    """
    Getter method for l2vpn_evpn, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn (container)

    YANG Description: Routing tables for l2vpn evpn -- active when the
afi-safi name is l2vpn-evpn
    """
    return self.__l2vpn_evpn
      
  def _set_l2vpn_evpn(self, v, load=False):
    """
    Setter method for l2vpn_evpn, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi/l2vpn_evpn (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_l2vpn_evpn is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_l2vpn_evpn() directly.

    YANG Description: Routing tables for l2vpn evpn -- active when the
afi-safi name is l2vpn-evpn
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_l2vpn_evpn_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn, is_container='container', yang_name="l2vpn-evpn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """l2vpn_evpn must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_l2vpn_evpn_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn, is_container='container', yang_name="l2vpn-evpn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__l2vpn_evpn = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_l2vpn_evpn(self):
    self.__l2vpn_evpn = YANGDynClass(base=yc_l2vpn_evpn_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi_l2vpn_evpn, is_container='container', yang_name="l2vpn-evpn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  afi_safi_name = __builtin__.property(_get_afi_safi_name)
  state = __builtin__.property(_get_state)
  ipv4_unicast = __builtin__.property(_get_ipv4_unicast)
  ipv6_unicast = __builtin__.property(_get_ipv6_unicast)
  ipv4_srte_policy = __builtin__.property(_get_ipv4_srte_policy)
  ipv6_srte_policy = __builtin__.property(_get_ipv6_srte_policy)
  l2vpn_evpn = __builtin__.property(_get_l2vpn_evpn)


  _pyangbind_elements = OrderedDict([('afi_safi_name', afi_safi_name), ('state', state), ('ipv4_unicast', ipv4_unicast), ('ipv6_unicast', ipv6_unicast), ('ipv4_srte_policy', ipv4_srte_policy), ('ipv6_srte_policy', ipv6_srte_policy), ('l2vpn_evpn', l2vpn_evpn), ])


class yc_afi_safis_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for address family list
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi_safi',)

  _yang_name = 'afi-safis'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi_safi = YANGDynClass(base=YANGListType("afi_safi_name",yc_afi_safi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi, yang_name="afi-safi", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-safi-name', extensions=None), is_container='list', yang_name="afi-safi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib', 'afi-safis']

  def _get_afi_safi(self):
    """
    Getter method for afi_safi, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi (list)

    YANG Description: list of afi-safi types
    """
    return self.__afi_safi
      
  def _set_afi_safi(self, v, load=False):
    """
    Setter method for afi_safi, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis/afi_safi (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_safi is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_safi() directly.

    YANG Description: list of afi-safi types
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("afi_safi_name",yc_afi_safi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi, yang_name="afi-safi", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-safi-name', extensions=None), is_container='list', yang_name="afi-safi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_safi must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("afi_safi_name",yc_afi_safi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi, yang_name="afi-safi", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-safi-name', extensions=None), is_container='list', yang_name="afi-safi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__afi_safi = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_safi(self):
    self.__afi_safi = YANGDynClass(base=YANGListType("afi_safi_name",yc_afi_safi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis_afi_safi, yang_name="afi-safi", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-safi-name', extensions=None), is_container='list', yang_name="afi-safi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  afi_safi = __builtin__.property(_get_afi_safi)


  _pyangbind_elements = OrderedDict([('afi_safi', afi_safi), ])


class yc_rib_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/rib. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top level container for BGP RIBs
  """
  __slots__ = ('_path_helper', '_extmethods', '__attr_sets','__communities','__ext_communities','__afi_safis',)

  _yang_name = 'rib'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__attr_sets = YANGDynClass(base=yc_attr_sets_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets, is_container='container', yang_name="attr-sets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__communities = YANGDynClass(base=yc_communities_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_communities, is_container='container', yang_name="communities", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ext_communities = YANGDynClass(base=yc_ext_communities_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_ext_communities, is_container='container', yang_name="ext-communities", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__afi_safis = YANGDynClass(base=yc_afi_safis_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis, is_container='container', yang_name="afi-safis", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp', 'rib']

  def _get_attr_sets(self):
    """
    Getter method for attr_sets, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets (container)

    YANG Description: Enclosing container for the list of path attribute sets
    """
    return self.__attr_sets
      
  def _set_attr_sets(self, v, load=False):
    """
    Setter method for attr_sets, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/attr_sets (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attr_sets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attr_sets() directly.

    YANG Description: Enclosing container for the list of path attribute sets
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_attr_sets_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets, is_container='container', yang_name="attr-sets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attr_sets must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_attr_sets_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets, is_container='container', yang_name="attr-sets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__attr_sets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attr_sets(self):
    self.__attr_sets = YANGDynClass(base=yc_attr_sets_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_attr_sets, is_container='container', yang_name="attr-sets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_communities(self):
    """
    Getter method for communities, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/communities (container)

    YANG Description: Enclosing container for the list of community attribute
sets
    """
    return self.__communities
      
  def _set_communities(self, v, load=False):
    """
    Setter method for communities, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/communities (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_communities is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_communities() directly.

    YANG Description: Enclosing container for the list of community attribute
sets
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_communities_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_communities, is_container='container', yang_name="communities", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """communities must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_communities_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_communities, is_container='container', yang_name="communities", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__communities = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_communities(self):
    self.__communities = YANGDynClass(base=yc_communities_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_communities, is_container='container', yang_name="communities", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ext_communities(self):
    """
    Getter method for ext_communities, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/ext_communities (container)

    YANG Description: Enclosing container for the list of extended community
attribute sets
    """
    return self.__ext_communities
      
  def _set_ext_communities(self, v, load=False):
    """
    Setter method for ext_communities, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/ext_communities (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ext_communities is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ext_communities() directly.

    YANG Description: Enclosing container for the list of extended community
attribute sets
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ext_communities_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_ext_communities, is_container='container', yang_name="ext-communities", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ext_communities must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ext_communities_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_ext_communities, is_container='container', yang_name="ext-communities", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ext_communities = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ext_communities(self):
    self.__ext_communities = YANGDynClass(base=yc_ext_communities_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_ext_communities, is_container='container', yang_name="ext-communities", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_afi_safis(self):
    """
    Getter method for afi_safis, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis (container)

    YANG Description: Enclosing container for address family list
    """
    return self.__afi_safis
      
  def _set_afi_safis(self, v, load=False):
    """
    Setter method for afi_safis, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib/afi_safis (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_safis is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_safis() directly.

    YANG Description: Enclosing container for address family list
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_afi_safis_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis, is_container='container', yang_name="afi-safis", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_safis must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_afi_safis_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis, is_container='container', yang_name="afi-safis", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__afi_safis = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_safis(self):
    self.__afi_safis = YANGDynClass(base=yc_afi_safis_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib_afi_safis, is_container='container', yang_name="afi-safis", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  attr_sets = __builtin__.property(_get_attr_sets)
  communities = __builtin__.property(_get_communities)
  ext_communities = __builtin__.property(_get_ext_communities)
  afi_safis = __builtin__.property(_get_afi_safis)


  _pyangbind_elements = OrderedDict([('attr_sets', attr_sets), ('communities', communities), ('ext_communities', ext_communities), ('afi_safis', afi_safis), ])


class yc_bgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level configuration and state for the BGP router
  """
  __slots__ = ('_path_helper', '_extmethods', '__global_','__neighbors','__peer_groups','__rib',)

  _yang_name = 'bgp'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__global_ = YANGDynClass(base=yc_global__openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__neighbors = YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__peer_groups = YANGDynClass(base=yc_peer_groups_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups, is_container='container', yang_name="peer-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__rib = YANGDynClass(base=yc_rib_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib, is_container='container', yang_name="rib", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'bgp']

  def _get_global_(self):
    """
    Getter method for global_, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global (container)

    YANG Description: Global configuration for the BGP router
    """
    return self.__global_
      
  def _set_global_(self, v, load=False):
    """
    Setter method for global_, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_global_ is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_global_() directly.

    YANG Description: Global configuration for the BGP router
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_global__openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """global_ must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_global__openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__global_ = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_global_(self):
    self.__global_ = YANGDynClass(base=yc_global__openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_neighbors(self):
    """
    Getter method for neighbors, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors (container)

    YANG Description: Configuration for BGP neighbors
    """
    return self.__neighbors
      
  def _set_neighbors(self, v, load=False):
    """
    Setter method for neighbors, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbors is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbors() directly.

    YANG Description: Configuration for BGP neighbors
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbors must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__neighbors = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbors(self):
    self.__neighbors = YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_peer_groups(self):
    """
    Getter method for peer_groups, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups (container)

    YANG Description: Configuration for BGP peer-groups
    """
    return self.__peer_groups
      
  def _set_peer_groups(self, v, load=False):
    """
    Setter method for peer_groups, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_groups is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_groups() directly.

    YANG Description: Configuration for BGP peer-groups
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_peer_groups_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups, is_container='container', yang_name="peer-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_groups must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_peer_groups_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups, is_container='container', yang_name="peer-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__peer_groups = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_groups(self):
    self.__peer_groups = YANGDynClass(base=yc_peer_groups_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_peer_groups, is_container='container', yang_name="peer-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_rib(self):
    """
    Getter method for rib, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib (container)

    YANG Description: Top level container for BGP RIBs
    """
    return self.__rib
      
  def _set_rib(self, v, load=False):
    """
    Setter method for rib, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/rib (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_rib is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_rib() directly.

    YANG Description: Top level container for BGP RIBs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_rib_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib, is_container='container', yang_name="rib", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """rib must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_rib_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib, is_container='container', yang_name="rib", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__rib = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_rib(self):
    self.__rib = YANGDynClass(base=yc_rib_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp_rib, is_container='container', yang_name="rib", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  global_ = __builtin__.property(_get_global_, _set_global_)
  neighbors = __builtin__.property(_get_neighbors, _set_neighbors)
  peer_groups = __builtin__.property(_get_peer_groups, _set_peer_groups)
  rib = __builtin__.property(_get_rib, _set_rib)


  _pyangbind_elements = OrderedDict([('global_', global_), ('neighbors', neighbors), ('peer_groups', peer_groups), ('rib', rib), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/global/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Global configuration parameters for OSPFv2
  """
  __slots__ = ('_path_helper', '_extmethods', '__router_id','__summary_route_cost_mode','__igp_shortcuts','__log_adjacency_changes','__hide_transit_only_networks',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__router_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=True)
    self.__summary_route_cost_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'RFC1583_COMPATIBLE': {}, 'RFC2328_COMPATIBLE': {}},), default=six.text_type("RFC2328_COMPATIBLE"), is_leaf=True, yang_name="summary-route-cost-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)
    self.__igp_shortcuts = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="igp-shortcuts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__log_adjacency_changes = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="log-adjacency-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__hide_transit_only_networks = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="hide-transit-only-networks", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'global', 'config']

  def _get_router_id(self):
    """
    Getter method for router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/config/router_id (yang:dotted-quad)

    YANG Description: A 32-bit number represented as a dotted quad assigned to
each router running the OSPFv2 protocol. This number should
be unique within the autonomous system
    """
    return self.__router_id
      
  def _set_router_id(self, v, load=False):
    """
    Setter method for router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/config/router_id (yang:dotted-quad)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_router_id() directly.

    YANG Description: A 32-bit number represented as a dotted quad assigned to
each router running the OSPFv2 protocol. This number should
be unique within the autonomous system
    """
    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][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """router_id must be of a type compatible with yang:dotted-quad""",
          'defined-type': "yang:dotted-quad",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=True)""",
        })

    self.__router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_router_id(self):
    self.__router_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=True)


  def _get_summary_route_cost_mode(self):
    """
    Getter method for summary_route_cost_mode, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/config/summary_route_cost_mode (enumeration)

    YANG Description: Specify how costs for the summary routes should be specified
as per the behaviour in the original OSPF specification
RFC1583, or alternatively whether the revised behaviour
described in RFC2328 should be utilised
    """
    return self.__summary_route_cost_mode
      
  def _set_summary_route_cost_mode(self, v, load=False):
    """
    Setter method for summary_route_cost_mode, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/config/summary_route_cost_mode (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_summary_route_cost_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_summary_route_cost_mode() directly.

    YANG Description: Specify how costs for the summary routes should be specified
as per the behaviour in the original OSPF specification
RFC1583, or alternatively whether the revised behaviour
described in RFC2328 should be utilised
    """
    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={'RFC1583_COMPATIBLE': {}, 'RFC2328_COMPATIBLE': {}},), default=six.text_type("RFC2328_COMPATIBLE"), is_leaf=True, yang_name="summary-route-cost-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """summary_route_cost_mode must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'RFC1583_COMPATIBLE': {}, 'RFC2328_COMPATIBLE': {}},), default=six.text_type("RFC2328_COMPATIBLE"), is_leaf=True, yang_name="summary-route-cost-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)""",
        })

    self.__summary_route_cost_mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_summary_route_cost_mode(self):
    self.__summary_route_cost_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'RFC1583_COMPATIBLE': {}, 'RFC2328_COMPATIBLE': {}},), default=six.text_type("RFC2328_COMPATIBLE"), is_leaf=True, yang_name="summary-route-cost-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)


  def _get_igp_shortcuts(self):
    """
    Getter method for igp_shortcuts, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/config/igp_shortcuts (boolean)

    YANG Description: When this leaf is set to true, OSPFv2 will route traffic to
a remote system via any LSP to the system that is marked as
shortcut eligible.
    """
    return self.__igp_shortcuts
      
  def _set_igp_shortcuts(self, v, load=False):
    """
    Setter method for igp_shortcuts, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/config/igp_shortcuts (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_igp_shortcuts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_igp_shortcuts() directly.

    YANG Description: When this leaf is set to true, OSPFv2 will route traffic to
a remote system via any LSP to the system that is marked as
shortcut eligible.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="igp-shortcuts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """igp_shortcuts must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="igp-shortcuts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__igp_shortcuts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_igp_shortcuts(self):
    self.__igp_shortcuts = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="igp-shortcuts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_log_adjacency_changes(self):
    """
    Getter method for log_adjacency_changes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/config/log_adjacency_changes (boolean)

    YANG Description: When this leaf is set to true, a log message will be
generated when the state of an OSPFv2 neighbour changes.
    """
    return self.__log_adjacency_changes
      
  def _set_log_adjacency_changes(self, v, load=False):
    """
    Setter method for log_adjacency_changes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/config/log_adjacency_changes (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_log_adjacency_changes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_log_adjacency_changes() directly.

    YANG Description: When this leaf is set to true, a log message will be
generated when the state of an OSPFv2 neighbour changes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="log-adjacency-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """log_adjacency_changes must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="log-adjacency-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__log_adjacency_changes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_log_adjacency_changes(self):
    self.__log_adjacency_changes = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="log-adjacency-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_hide_transit_only_networks(self):
    """
    Getter method for hide_transit_only_networks, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/config/hide_transit_only_networks (boolean)

    YANG Description: When this leaf is set to true, do not advertise prefixes
into OSPFv2 that correspond to transit interfaces, as per
the behaviour discussed in RFC6860.
    """
    return self.__hide_transit_only_networks
      
  def _set_hide_transit_only_networks(self, v, load=False):
    """
    Setter method for hide_transit_only_networks, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/config/hide_transit_only_networks (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hide_transit_only_networks is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hide_transit_only_networks() directly.

    YANG Description: When this leaf is set to true, do not advertise prefixes
into OSPFv2 that correspond to transit interfaces, as per
the behaviour discussed in RFC6860.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="hide-transit-only-networks", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hide_transit_only_networks must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="hide-transit-only-networks", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__hide_transit_only_networks = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hide_transit_only_networks(self):
    self.__hide_transit_only_networks = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="hide-transit-only-networks", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  router_id = __builtin__.property(_get_router_id, _set_router_id)
  summary_route_cost_mode = __builtin__.property(_get_summary_route_cost_mode, _set_summary_route_cost_mode)
  igp_shortcuts = __builtin__.property(_get_igp_shortcuts, _set_igp_shortcuts)
  log_adjacency_changes = __builtin__.property(_get_log_adjacency_changes, _set_log_adjacency_changes)
  hide_transit_only_networks = __builtin__.property(_get_hide_transit_only_networks, _set_hide_transit_only_networks)


  _pyangbind_elements = OrderedDict([('router_id', router_id), ('summary_route_cost_mode', summary_route_cost_mode), ('igp_shortcuts', igp_shortcuts), ('log_adjacency_changes', log_adjacency_changes), ('hide_transit_only_networks', hide_transit_only_networks), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/global/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters for OSPFv2
  """
  __slots__ = ('_path_helper', '_extmethods', '__router_id','__summary_route_cost_mode','__igp_shortcuts','__log_adjacency_changes','__hide_transit_only_networks',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__router_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)
    self.__summary_route_cost_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'RFC1583_COMPATIBLE': {}, 'RFC2328_COMPATIBLE': {}},), default=six.text_type("RFC2328_COMPATIBLE"), is_leaf=True, yang_name="summary-route-cost-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__igp_shortcuts = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="igp-shortcuts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__log_adjacency_changes = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="log-adjacency-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__hide_transit_only_networks = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="hide-transit-only-networks", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'global', 'state']

  def _get_router_id(self):
    """
    Getter method for router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/state/router_id (yang:dotted-quad)

    YANG Description: A 32-bit number represented as a dotted quad assigned to
each router running the OSPFv2 protocol. This number should
be unique within the autonomous system
    """
    return self.__router_id
      
  def _set_router_id(self, v, load=False):
    """
    Setter method for router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/state/router_id (yang:dotted-quad)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_router_id() directly.

    YANG Description: A 32-bit number represented as a dotted quad assigned to
each router running the OSPFv2 protocol. This number should
be unique within the autonomous system
    """
    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][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """router_id must be of a type compatible with yang:dotted-quad""",
          'defined-type': "yang:dotted-quad",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)""",
        })

    self.__router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_router_id(self):
    self.__router_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)


  def _get_summary_route_cost_mode(self):
    """
    Getter method for summary_route_cost_mode, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/state/summary_route_cost_mode (enumeration)

    YANG Description: Specify how costs for the summary routes should be specified
as per the behaviour in the original OSPF specification
RFC1583, or alternatively whether the revised behaviour
described in RFC2328 should be utilised
    """
    return self.__summary_route_cost_mode
      
  def _set_summary_route_cost_mode(self, v, load=False):
    """
    Setter method for summary_route_cost_mode, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/state/summary_route_cost_mode (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_summary_route_cost_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_summary_route_cost_mode() directly.

    YANG Description: Specify how costs for the summary routes should be specified
as per the behaviour in the original OSPF specification
RFC1583, or alternatively whether the revised behaviour
described in RFC2328 should be utilised
    """
    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={'RFC1583_COMPATIBLE': {}, 'RFC2328_COMPATIBLE': {}},), default=six.text_type("RFC2328_COMPATIBLE"), is_leaf=True, yang_name="summary-route-cost-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """summary_route_cost_mode must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'RFC1583_COMPATIBLE': {}, 'RFC2328_COMPATIBLE': {}},), default=six.text_type("RFC2328_COMPATIBLE"), is_leaf=True, yang_name="summary-route-cost-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__summary_route_cost_mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_summary_route_cost_mode(self):
    self.__summary_route_cost_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'RFC1583_COMPATIBLE': {}, 'RFC2328_COMPATIBLE': {}},), default=six.text_type("RFC2328_COMPATIBLE"), is_leaf=True, yang_name="summary-route-cost-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_igp_shortcuts(self):
    """
    Getter method for igp_shortcuts, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/state/igp_shortcuts (boolean)

    YANG Description: When this leaf is set to true, OSPFv2 will route traffic to
a remote system via any LSP to the system that is marked as
shortcut eligible.
    """
    return self.__igp_shortcuts
      
  def _set_igp_shortcuts(self, v, load=False):
    """
    Setter method for igp_shortcuts, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/state/igp_shortcuts (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_igp_shortcuts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_igp_shortcuts() directly.

    YANG Description: When this leaf is set to true, OSPFv2 will route traffic to
a remote system via any LSP to the system that is marked as
shortcut eligible.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="igp-shortcuts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """igp_shortcuts must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="igp-shortcuts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__igp_shortcuts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_igp_shortcuts(self):
    self.__igp_shortcuts = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="igp-shortcuts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_log_adjacency_changes(self):
    """
    Getter method for log_adjacency_changes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/state/log_adjacency_changes (boolean)

    YANG Description: When this leaf is set to true, a log message will be
generated when the state of an OSPFv2 neighbour changes.
    """
    return self.__log_adjacency_changes
      
  def _set_log_adjacency_changes(self, v, load=False):
    """
    Setter method for log_adjacency_changes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/state/log_adjacency_changes (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_log_adjacency_changes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_log_adjacency_changes() directly.

    YANG Description: When this leaf is set to true, a log message will be
generated when the state of an OSPFv2 neighbour changes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="log-adjacency-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """log_adjacency_changes must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="log-adjacency-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__log_adjacency_changes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_log_adjacency_changes(self):
    self.__log_adjacency_changes = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="log-adjacency-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_hide_transit_only_networks(self):
    """
    Getter method for hide_transit_only_networks, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/state/hide_transit_only_networks (boolean)

    YANG Description: When this leaf is set to true, do not advertise prefixes
into OSPFv2 that correspond to transit interfaces, as per
the behaviour discussed in RFC6860.
    """
    return self.__hide_transit_only_networks
      
  def _set_hide_transit_only_networks(self, v, load=False):
    """
    Setter method for hide_transit_only_networks, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/state/hide_transit_only_networks (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hide_transit_only_networks is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hide_transit_only_networks() directly.

    YANG Description: When this leaf is set to true, do not advertise prefixes
into OSPFv2 that correspond to transit interfaces, as per
the behaviour discussed in RFC6860.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="hide-transit-only-networks", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hide_transit_only_networks must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="hide-transit-only-networks", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__hide_transit_only_networks = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hide_transit_only_networks(self):
    self.__hide_transit_only_networks = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="hide-transit-only-networks", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  router_id = __builtin__.property(_get_router_id)
  summary_route_cost_mode = __builtin__.property(_get_summary_route_cost_mode)
  igp_shortcuts = __builtin__.property(_get_igp_shortcuts)
  log_adjacency_changes = __builtin__.property(_get_log_adjacency_changes)
  hide_transit_only_networks = __builtin__.property(_get_hide_transit_only_networks)


  _pyangbind_elements = OrderedDict([('router_id', router_id), ('summary_route_cost_mode', summary_route_cost_mode), ('igp_shortcuts', igp_shortcuts), ('log_adjacency_changes', log_adjacency_changes), ('hide_transit_only_networks', hide_transit_only_networks), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_spf_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/global/timers/spf/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to global OSPFv2
SPF timers
  """
  __slots__ = ('_path_helper', '_extmethods', '__initial_delay','__maximum_delay',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__initial_delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="initial-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__maximum_delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maximum-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'global', 'timers', 'spf', 'config']

  def _get_initial_delay(self):
    """
    Getter method for initial_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/spf/config/initial_delay (uint32)

    YANG Description: The value of this leaf specifies the time between a change
in topology being detected and the first run of the SPF
algorithm.
    """
    return self.__initial_delay
      
  def _set_initial_delay(self, v, load=False):
    """
    Setter method for initial_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/spf/config/initial_delay (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_initial_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_initial_delay() directly.

    YANG Description: The value of this leaf specifies the time between a change
in topology being detected and the first run of the SPF
algorithm.
    """
    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="initial-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """initial_delay 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="initial-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__initial_delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_initial_delay(self):
    self.__initial_delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="initial-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_maximum_delay(self):
    """
    Getter method for maximum_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/spf/config/maximum_delay (uint32)

    YANG Description: The value of this leaf specifies the maximum delay between
a topology change being detected and the SPF algorithm
running. This value is used for implementations that support
increasing the wait time between SPF runs.
    """
    return self.__maximum_delay
      
  def _set_maximum_delay(self, v, load=False):
    """
    Setter method for maximum_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/spf/config/maximum_delay (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_maximum_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_maximum_delay() directly.

    YANG Description: The value of this leaf specifies the maximum delay between
a topology change being detected and the SPF algorithm
running. This value is used for implementations that support
increasing the wait time between SPF runs.
    """
    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="maximum-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """maximum_delay 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="maximum-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__maximum_delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_maximum_delay(self):
    self.__maximum_delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maximum-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)

  initial_delay = __builtin__.property(_get_initial_delay, _set_initial_delay)
  maximum_delay = __builtin__.property(_get_maximum_delay, _set_maximum_delay)


  _pyangbind_elements = OrderedDict([('initial_delay', initial_delay), ('maximum_delay', maximum_delay), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_spf_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/global/timers/spf/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 global
OSPFv2 SPF timers
  """
  __slots__ = ('_path_helper', '_extmethods', '__initial_delay','__maximum_delay','__timer_type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__initial_delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="initial-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__maximum_delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maximum-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__timer_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LINEAR_BACKOFF': {}, 'EXPONENTIAL_BACKOFF': {}},), is_leaf=True, yang_name="timer-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'global', 'timers', 'spf', 'state']

  def _get_initial_delay(self):
    """
    Getter method for initial_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/spf/state/initial_delay (uint32)

    YANG Description: The value of this leaf specifies the time between a change
in topology being detected and the first run of the SPF
algorithm.
    """
    return self.__initial_delay
      
  def _set_initial_delay(self, v, load=False):
    """
    Setter method for initial_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/spf/state/initial_delay (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_initial_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_initial_delay() directly.

    YANG Description: The value of this leaf specifies the time between a change
in topology being detected and the first run of the SPF
algorithm.
    """
    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="initial-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """initial_delay 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="initial-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__initial_delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_initial_delay(self):
    self.__initial_delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="initial-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_maximum_delay(self):
    """
    Getter method for maximum_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/spf/state/maximum_delay (uint32)

    YANG Description: The value of this leaf specifies the maximum delay between
a topology change being detected and the SPF algorithm
running. This value is used for implementations that support
increasing the wait time between SPF runs.
    """
    return self.__maximum_delay
      
  def _set_maximum_delay(self, v, load=False):
    """
    Setter method for maximum_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/spf/state/maximum_delay (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_maximum_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_maximum_delay() directly.

    YANG Description: The value of this leaf specifies the maximum delay between
a topology change being detected and the SPF algorithm
running. This value is used for implementations that support
increasing the wait time between SPF runs.
    """
    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="maximum-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """maximum_delay 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="maximum-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__maximum_delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_maximum_delay(self):
    self.__maximum_delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maximum-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_timer_type(self):
    """
    Getter method for timer_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/spf/state/timer_type (enumeration)

    YANG Description: The timer mode that is utilised by the implementation.
    """
    return self.__timer_type
      
  def _set_timer_type(self, v, load=False):
    """
    Setter method for timer_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/spf/state/timer_type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_timer_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_timer_type() directly.

    YANG Description: The timer mode that is utilised by the implementation.
    """
    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={'LINEAR_BACKOFF': {}, 'EXPONENTIAL_BACKOFF': {}},), is_leaf=True, yang_name="timer-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """timer_type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LINEAR_BACKOFF': {}, 'EXPONENTIAL_BACKOFF': {}},), is_leaf=True, yang_name="timer-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__timer_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_timer_type(self):
    self.__timer_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LINEAR_BACKOFF': {}, 'EXPONENTIAL_BACKOFF': {}},), is_leaf=True, yang_name="timer-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)

  initial_delay = __builtin__.property(_get_initial_delay)
  maximum_delay = __builtin__.property(_get_maximum_delay)
  timer_type = __builtin__.property(_get_timer_type)


  _pyangbind_elements = OrderedDict([('initial_delay', initial_delay), ('maximum_delay', maximum_delay), ('timer_type', timer_type), ])


class yc_spf_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_spf(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/global/timers/spf. 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 timers governing the operation of SPF runs
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'spf'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_spf_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_spf_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'global', 'timers', 'spf']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/spf/config (container)

    YANG Description: Configuration parameters relating to global OSPFv2
SPF timers
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/spf/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 global OSPFv2
SPF timers
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_spf_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_spf_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_spf_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/spf/state (container)

    YANG Description: Operational state parameters relating to the global
OSPFv2 SPF timers
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/spf/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 global
OSPFv2 SPF timers
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_spf_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_spf_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_spf_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_max_metric_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/global/timers/max-metric/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to setting the OSPFv2
maximum metric for a set of advertised entities.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_','__timeout','__include','__trigger',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__set_ = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__timeout = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=True)
    self.__include = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MAX_METRIC_INCLUDE_STUB': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:MAX_METRIC_INCLUDE_STUB': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:MAX_METRIC_INCLUDE_STUB': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'MAX_METRIC_INCLUDE_TYPE2_EXTERNAL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:MAX_METRIC_INCLUDE_TYPE2_EXTERNAL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:MAX_METRIC_INCLUDE_TYPE2_EXTERNAL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},)), is_leaf=False, yang_name="include", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__trigger = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MAX_METRIC_ON_SYSTEM_BOOT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:MAX_METRIC_ON_SYSTEM_BOOT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:MAX_METRIC_ON_SYSTEM_BOOT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},)), is_leaf=False, yang_name="trigger", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'global', 'timers', 'max-metric', 'config']

  def _get_set_(self):
    """
    Getter method for set_, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/max_metric/config/set (boolean)

    YANG Description: When this leaf is set to true, all non-stub interfaces of
the local system are advertised with the maximum metric,
such that the router does not act as a transit system,
(similarly to the IS-IS overload functionality).
    """
    return self.__set_
      
  def _set_set_(self, v, load=False):
    """
    Setter method for set_, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/max_metric/config/set (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_ is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_() directly.

    YANG Description: When this leaf is set to true, all non-stub interfaces of
the local system are advertised with the maximum metric,
such that the router does not act as a transit system,
(similarly to the IS-IS overload functionality).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_ must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__set_ = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_(self):
    self.__set_ = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_timeout(self):
    """
    Getter method for timeout, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/max_metric/config/timeout (uint64)

    YANG Description: The delay, in seconds, after which the advertisement of
entities with the maximum metric should be cleared, and
the system reverts to the default, or configured, metrics.
    """
    return self.__timeout
      
  def _set_timeout(self, v, load=False):
    """
    Setter method for timeout, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/max_metric/config/timeout (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_timeout is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_timeout() directly.

    YANG Description: The delay, in seconds, after which the advertisement of
entities with the maximum metric should be cleared, and
the system reverts to the default, or configured, metrics.
    """
    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="timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """timeout 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="timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=True)""",
        })

    self.__timeout = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_timeout(self):
    self.__timeout = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=True)


  def _get_include(self):
    """
    Getter method for include, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/max_metric/config/include (identityref)

    YANG Description: By default, the maximum metric is advertised for all
non-stub interfaces of a device. When identities are
specified within this leaf-list, additional entities
are also advertised with the maximum metric according
to the values within the list.
    """
    return self.__include
      
  def _set_include(self, v, load=False):
    """
    Setter method for include, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/max_metric/config/include (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_include is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_include() directly.

    YANG Description: By default, the maximum metric is advertised for all
non-stub interfaces of a device. When identities are
specified within this leaf-list, additional entities
are also advertised with the maximum metric according
to the values within the list.
    """
    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={'MAX_METRIC_INCLUDE_STUB': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:MAX_METRIC_INCLUDE_STUB': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:MAX_METRIC_INCLUDE_STUB': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'MAX_METRIC_INCLUDE_TYPE2_EXTERNAL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:MAX_METRIC_INCLUDE_TYPE2_EXTERNAL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:MAX_METRIC_INCLUDE_TYPE2_EXTERNAL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},)), is_leaf=False, yang_name="include", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """include must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MAX_METRIC_INCLUDE_STUB': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:MAX_METRIC_INCLUDE_STUB': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:MAX_METRIC_INCLUDE_STUB': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'MAX_METRIC_INCLUDE_TYPE2_EXTERNAL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:MAX_METRIC_INCLUDE_TYPE2_EXTERNAL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:MAX_METRIC_INCLUDE_TYPE2_EXTERNAL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},)), is_leaf=False, yang_name="include", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__include = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_include(self):
    self.__include = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MAX_METRIC_INCLUDE_STUB': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:MAX_METRIC_INCLUDE_STUB': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:MAX_METRIC_INCLUDE_STUB': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'MAX_METRIC_INCLUDE_TYPE2_EXTERNAL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:MAX_METRIC_INCLUDE_TYPE2_EXTERNAL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:MAX_METRIC_INCLUDE_TYPE2_EXTERNAL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},)), is_leaf=False, yang_name="include", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_trigger(self):
    """
    Getter method for trigger, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/max_metric/config/trigger (identityref)

    YANG Description: By default, the maximum metric is only advertised
when the max-metric/set leaf is specified as true.
In the case that identities are specified within this
list, they provide additional triggers (e.g., system
boot) that may cause the max-metric to be set. In this
case, the system should still honour the timeout specified
by the max-metric/timeout leaf, and clear the max-metric
advertisements after the expiration of this timer.
    """
    return self.__trigger
      
  def _set_trigger(self, v, load=False):
    """
    Setter method for trigger, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/max_metric/config/trigger (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_trigger is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_trigger() directly.

    YANG Description: By default, the maximum metric is only advertised
when the max-metric/set leaf is specified as true.
In the case that identities are specified within this
list, they provide additional triggers (e.g., system
boot) that may cause the max-metric to be set. In this
case, the system should still honour the timeout specified
by the max-metric/timeout leaf, and clear the max-metric
advertisements after the expiration of this timer.
    """
    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={'MAX_METRIC_ON_SYSTEM_BOOT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:MAX_METRIC_ON_SYSTEM_BOOT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:MAX_METRIC_ON_SYSTEM_BOOT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},)), is_leaf=False, yang_name="trigger", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """trigger must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MAX_METRIC_ON_SYSTEM_BOOT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:MAX_METRIC_ON_SYSTEM_BOOT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:MAX_METRIC_ON_SYSTEM_BOOT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},)), is_leaf=False, yang_name="trigger", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__trigger = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_trigger(self):
    self.__trigger = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MAX_METRIC_ON_SYSTEM_BOOT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:MAX_METRIC_ON_SYSTEM_BOOT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:MAX_METRIC_ON_SYSTEM_BOOT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},)), is_leaf=False, yang_name="trigger", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)

  set_ = __builtin__.property(_get_set_, _set_set_)
  timeout = __builtin__.property(_get_timeout, _set_timeout)
  include = __builtin__.property(_get_include, _set_include)
  trigger = __builtin__.property(_get_trigger, _set_trigger)


  _pyangbind_elements = OrderedDict([('set_', set_), ('timeout', timeout), ('include', include), ('trigger', trigger), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_max_metric_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/global/timers/max-metric/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 setting the
OSPFv2 maximum metric for a set of advertised entities.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_','__timeout','__include','__trigger',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__set_ = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__timeout = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__include = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MAX_METRIC_INCLUDE_STUB': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:MAX_METRIC_INCLUDE_STUB': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:MAX_METRIC_INCLUDE_STUB': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'MAX_METRIC_INCLUDE_TYPE2_EXTERNAL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:MAX_METRIC_INCLUDE_TYPE2_EXTERNAL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:MAX_METRIC_INCLUDE_TYPE2_EXTERNAL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},)), is_leaf=False, yang_name="include", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__trigger = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MAX_METRIC_ON_SYSTEM_BOOT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:MAX_METRIC_ON_SYSTEM_BOOT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:MAX_METRIC_ON_SYSTEM_BOOT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},)), is_leaf=False, yang_name="trigger", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'global', 'timers', 'max-metric', 'state']

  def _get_set_(self):
    """
    Getter method for set_, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/max_metric/state/set (boolean)

    YANG Description: When this leaf is set to true, all non-stub interfaces of
the local system are advertised with the maximum metric,
such that the router does not act as a transit system,
(similarly to the IS-IS overload functionality).
    """
    return self.__set_
      
  def _set_set_(self, v, load=False):
    """
    Setter method for set_, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/max_metric/state/set (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_ is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_() directly.

    YANG Description: When this leaf is set to true, all non-stub interfaces of
the local system are advertised with the maximum metric,
such that the router does not act as a transit system,
(similarly to the IS-IS overload functionality).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_ must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__set_ = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_(self):
    self.__set_ = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_timeout(self):
    """
    Getter method for timeout, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/max_metric/state/timeout (uint64)

    YANG Description: The delay, in seconds, after which the advertisement of
entities with the maximum metric should be cleared, and
the system reverts to the default, or configured, metrics.
    """
    return self.__timeout
      
  def _set_timeout(self, v, load=False):
    """
    Setter method for timeout, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/max_metric/state/timeout (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_timeout is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_timeout() directly.

    YANG Description: The delay, in seconds, after which the advertisement of
entities with the maximum metric should be cleared, and
the system reverts to the default, or configured, metrics.
    """
    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="timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """timeout 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="timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__timeout = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_timeout(self):
    self.__timeout = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_include(self):
    """
    Getter method for include, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/max_metric/state/include (identityref)

    YANG Description: By default, the maximum metric is advertised for all
non-stub interfaces of a device. When identities are
specified within this leaf-list, additional entities
are also advertised with the maximum metric according
to the values within the list.
    """
    return self.__include
      
  def _set_include(self, v, load=False):
    """
    Setter method for include, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/max_metric/state/include (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_include is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_include() directly.

    YANG Description: By default, the maximum metric is advertised for all
non-stub interfaces of a device. When identities are
specified within this leaf-list, additional entities
are also advertised with the maximum metric according
to the values within the list.
    """
    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={'MAX_METRIC_INCLUDE_STUB': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:MAX_METRIC_INCLUDE_STUB': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:MAX_METRIC_INCLUDE_STUB': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'MAX_METRIC_INCLUDE_TYPE2_EXTERNAL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:MAX_METRIC_INCLUDE_TYPE2_EXTERNAL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:MAX_METRIC_INCLUDE_TYPE2_EXTERNAL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},)), is_leaf=False, yang_name="include", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """include must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MAX_METRIC_INCLUDE_STUB': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:MAX_METRIC_INCLUDE_STUB': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:MAX_METRIC_INCLUDE_STUB': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'MAX_METRIC_INCLUDE_TYPE2_EXTERNAL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:MAX_METRIC_INCLUDE_TYPE2_EXTERNAL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:MAX_METRIC_INCLUDE_TYPE2_EXTERNAL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},)), is_leaf=False, yang_name="include", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__include = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_include(self):
    self.__include = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MAX_METRIC_INCLUDE_STUB': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:MAX_METRIC_INCLUDE_STUB': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:MAX_METRIC_INCLUDE_STUB': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'MAX_METRIC_INCLUDE_TYPE2_EXTERNAL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:MAX_METRIC_INCLUDE_TYPE2_EXTERNAL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:MAX_METRIC_INCLUDE_TYPE2_EXTERNAL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},)), is_leaf=False, yang_name="include", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_trigger(self):
    """
    Getter method for trigger, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/max_metric/state/trigger (identityref)

    YANG Description: By default, the maximum metric is only advertised
when the max-metric/set leaf is specified as true.
In the case that identities are specified within this
list, they provide additional triggers (e.g., system
boot) that may cause the max-metric to be set. In this
case, the system should still honour the timeout specified
by the max-metric/timeout leaf, and clear the max-metric
advertisements after the expiration of this timer.
    """
    return self.__trigger
      
  def _set_trigger(self, v, load=False):
    """
    Setter method for trigger, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/max_metric/state/trigger (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_trigger is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_trigger() directly.

    YANG Description: By default, the maximum metric is only advertised
when the max-metric/set leaf is specified as true.
In the case that identities are specified within this
list, they provide additional triggers (e.g., system
boot) that may cause the max-metric to be set. In this
case, the system should still honour the timeout specified
by the max-metric/timeout leaf, and clear the max-metric
advertisements after the expiration of this timer.
    """
    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={'MAX_METRIC_ON_SYSTEM_BOOT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:MAX_METRIC_ON_SYSTEM_BOOT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:MAX_METRIC_ON_SYSTEM_BOOT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},)), is_leaf=False, yang_name="trigger", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """trigger must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MAX_METRIC_ON_SYSTEM_BOOT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:MAX_METRIC_ON_SYSTEM_BOOT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:MAX_METRIC_ON_SYSTEM_BOOT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},)), is_leaf=False, yang_name="trigger", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__trigger = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_trigger(self):
    self.__trigger = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MAX_METRIC_ON_SYSTEM_BOOT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:MAX_METRIC_ON_SYSTEM_BOOT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:MAX_METRIC_ON_SYSTEM_BOOT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},)), is_leaf=False, yang_name="trigger", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  set_ = __builtin__.property(_get_set_)
  timeout = __builtin__.property(_get_timeout)
  include = __builtin__.property(_get_include)
  trigger = __builtin__.property(_get_trigger)


  _pyangbind_elements = OrderedDict([('set_', set_), ('timeout', timeout), ('include', include), ('trigger', trigger), ])


class yc_max_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_max_metric(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/global/timers/max-metric. 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 setting the OSPFv2 maximum metric.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'max-metric'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_max_metric_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_max_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'global', 'timers', 'max-metric']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/max_metric/config (container)

    YANG Description: Configuration parameters relating to setting the OSPFv2
maximum metric for a set of advertised entities.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/max_metric/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 setting the OSPFv2
maximum metric for a set of advertised entities.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_max_metric_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_max_metric_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_max_metric_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/max_metric/state (container)

    YANG Description: Operational state parameters relating to setting the
OSPFv2 maximum metric for a set of advertised entities.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/max_metric/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 setting the
OSPFv2 maximum metric for a set of advertised entities.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_max_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_max_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_max_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_lsa_generation_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/global/timers/lsa-generation/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 generation of
LSAs by the local system
  """
  __slots__ = ('_path_helper', '_extmethods', '__initial_delay','__maximum_delay',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__initial_delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="initial-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__maximum_delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maximum-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'global', 'timers', 'lsa-generation', 'config']

  def _get_initial_delay(self):
    """
    Getter method for initial_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/lsa_generation/config/initial_delay (uint32)

    YANG Description: The value of this leaf specifies the time between the first
time an LSA is generated and advertised and the subsequent
generation of that LSA.
    """
    return self.__initial_delay
      
  def _set_initial_delay(self, v, load=False):
    """
    Setter method for initial_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/lsa_generation/config/initial_delay (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_initial_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_initial_delay() directly.

    YANG Description: The value of this leaf specifies the time between the first
time an LSA is generated and advertised and the subsequent
generation of that LSA.
    """
    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="initial-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """initial_delay 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="initial-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__initial_delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_initial_delay(self):
    self.__initial_delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="initial-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_maximum_delay(self):
    """
    Getter method for maximum_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/lsa_generation/config/maximum_delay (uint32)

    YANG Description: The value of this leaf specifies the maximum time between the
generation of an LSA and the subsequent re-generation of that
LSA. This value is used in implementations that support
increasing delay between generation of an LSA
    """
    return self.__maximum_delay
      
  def _set_maximum_delay(self, v, load=False):
    """
    Setter method for maximum_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/lsa_generation/config/maximum_delay (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_maximum_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_maximum_delay() directly.

    YANG Description: The value of this leaf specifies the maximum time between the
generation of an LSA and the subsequent re-generation of that
LSA. This value is used in implementations that support
increasing delay between generation of an LSA
    """
    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="maximum-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """maximum_delay 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="maximum-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__maximum_delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_maximum_delay(self):
    self.__maximum_delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maximum-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)

  initial_delay = __builtin__.property(_get_initial_delay, _set_initial_delay)
  maximum_delay = __builtin__.property(_get_maximum_delay, _set_maximum_delay)


  _pyangbind_elements = OrderedDict([('initial_delay', initial_delay), ('maximum_delay', maximum_delay), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_lsa_generation_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/global/timers/lsa-generation/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 generation
of LSAs by the local system
  """
  __slots__ = ('_path_helper', '_extmethods', '__initial_delay','__maximum_delay','__timer_type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__initial_delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="initial-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__maximum_delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maximum-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__timer_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LINEAR_BACKOFF': {}, 'EXPONENTIAL_BACKOFF': {}},), is_leaf=True, yang_name="timer-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'global', 'timers', 'lsa-generation', 'state']

  def _get_initial_delay(self):
    """
    Getter method for initial_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/lsa_generation/state/initial_delay (uint32)

    YANG Description: The value of this leaf specifies the time between the first
time an LSA is generated and advertised and the subsequent
generation of that LSA.
    """
    return self.__initial_delay
      
  def _set_initial_delay(self, v, load=False):
    """
    Setter method for initial_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/lsa_generation/state/initial_delay (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_initial_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_initial_delay() directly.

    YANG Description: The value of this leaf specifies the time between the first
time an LSA is generated and advertised and the subsequent
generation of that LSA.
    """
    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="initial-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """initial_delay 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="initial-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__initial_delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_initial_delay(self):
    self.__initial_delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="initial-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_maximum_delay(self):
    """
    Getter method for maximum_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/lsa_generation/state/maximum_delay (uint32)

    YANG Description: The value of this leaf specifies the maximum time between the
generation of an LSA and the subsequent re-generation of that
LSA. This value is used in implementations that support
increasing delay between generation of an LSA
    """
    return self.__maximum_delay
      
  def _set_maximum_delay(self, v, load=False):
    """
    Setter method for maximum_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/lsa_generation/state/maximum_delay (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_maximum_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_maximum_delay() directly.

    YANG Description: The value of this leaf specifies the maximum time between the
generation of an LSA and the subsequent re-generation of that
LSA. This value is used in implementations that support
increasing delay between generation of an LSA
    """
    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="maximum-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """maximum_delay 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="maximum-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__maximum_delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_maximum_delay(self):
    self.__maximum_delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maximum-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_timer_type(self):
    """
    Getter method for timer_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/lsa_generation/state/timer_type (enumeration)

    YANG Description: The timer mode that is utilised by the implementation.
    """
    return self.__timer_type
      
  def _set_timer_type(self, v, load=False):
    """
    Setter method for timer_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/lsa_generation/state/timer_type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_timer_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_timer_type() directly.

    YANG Description: The timer mode that is utilised by the implementation.
    """
    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={'LINEAR_BACKOFF': {}, 'EXPONENTIAL_BACKOFF': {}},), is_leaf=True, yang_name="timer-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """timer_type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LINEAR_BACKOFF': {}, 'EXPONENTIAL_BACKOFF': {}},), is_leaf=True, yang_name="timer-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__timer_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_timer_type(self):
    self.__timer_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LINEAR_BACKOFF': {}, 'EXPONENTIAL_BACKOFF': {}},), is_leaf=True, yang_name="timer-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)

  initial_delay = __builtin__.property(_get_initial_delay)
  maximum_delay = __builtin__.property(_get_maximum_delay)
  timer_type = __builtin__.property(_get_timer_type)


  _pyangbind_elements = OrderedDict([('initial_delay', initial_delay), ('maximum_delay', maximum_delay), ('timer_type', timer_type), ])


class yc_lsa_generation_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_lsa_generation(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/global/timers/lsa-generation. 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 timers governing the generation of LSAs by the local
system
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'lsa-generation'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_lsa_generation_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_lsa_generation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'global', 'timers', 'lsa-generation']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/lsa_generation/config (container)

    YANG Description: Configuration parameters relating to the generation of
LSAs by the local system
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/lsa_generation/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 generation of
LSAs by the local system
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_lsa_generation_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_lsa_generation_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_lsa_generation_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/lsa_generation/state (container)

    YANG Description: Operational state parameters relating to the generation
of LSAs by the local system
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/lsa_generation/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 generation
of LSAs by the local system
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_lsa_generation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_lsa_generation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_lsa_generation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_timers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/global/timers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration and operational state parameters for OSPFv2
timers
  """
  __slots__ = ('_path_helper', '_extmethods', '__spf','__max_metric','__lsa_generation',)

  _yang_name = 'timers'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__spf = YANGDynClass(base=yc_spf_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_spf, is_container='container', yang_name="spf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__max_metric = YANGDynClass(base=yc_max_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_max_metric, is_container='container', yang_name="max-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__lsa_generation = YANGDynClass(base=yc_lsa_generation_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_lsa_generation, is_container='container', yang_name="lsa-generation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'global', 'timers']

  def _get_spf(self):
    """
    Getter method for spf, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/spf (container)

    YANG Description: Configuration and operational state parameters relating
to timers governing the operation of SPF runs
    """
    return self.__spf
      
  def _set_spf(self, v, load=False):
    """
    Setter method for spf, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/spf (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_spf is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_spf() directly.

    YANG Description: Configuration and operational state parameters relating
to timers governing the operation of SPF runs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_spf_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_spf, is_container='container', yang_name="spf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """spf must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_spf_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_spf, is_container='container', yang_name="spf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__spf = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_spf(self):
    self.__spf = YANGDynClass(base=yc_spf_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_spf, is_container='container', yang_name="spf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_max_metric(self):
    """
    Getter method for max_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/max_metric (container)

    YANG Description: Configuration and operational state parameters relating
to setting the OSPFv2 maximum metric.
    """
    return self.__max_metric
      
  def _set_max_metric(self, v, load=False):
    """
    Setter method for max_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/max_metric (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_metric() directly.

    YANG Description: Configuration and operational state parameters relating
to setting the OSPFv2 maximum metric.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_max_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_max_metric, is_container='container', yang_name="max-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_metric must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_max_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_max_metric, is_container='container', yang_name="max-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__max_metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_metric(self):
    self.__max_metric = YANGDynClass(base=yc_max_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_max_metric, is_container='container', yang_name="max-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_lsa_generation(self):
    """
    Getter method for lsa_generation, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/lsa_generation (container)

    YANG Description: Configuration and operational state parameters relating
to timers governing the generation of LSAs by the local
system
    """
    return self.__lsa_generation
      
  def _set_lsa_generation(self, v, load=False):
    """
    Setter method for lsa_generation, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers/lsa_generation (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsa_generation is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsa_generation() directly.

    YANG Description: Configuration and operational state parameters relating
to timers governing the generation of LSAs by the local
system
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_lsa_generation_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_lsa_generation, is_container='container', yang_name="lsa-generation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsa_generation must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_lsa_generation_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_lsa_generation, is_container='container', yang_name="lsa-generation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__lsa_generation = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsa_generation(self):
    self.__lsa_generation = YANGDynClass(base=yc_lsa_generation_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers_lsa_generation, is_container='container', yang_name="lsa-generation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  spf = __builtin__.property(_get_spf, _set_spf)
  max_metric = __builtin__.property(_get_max_metric, _set_max_metric)
  lsa_generation = __builtin__.property(_get_lsa_generation, _set_lsa_generation)


  _pyangbind_elements = OrderedDict([('spf', spf), ('max_metric', max_metric), ('lsa_generation', lsa_generation), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_graceful_restart_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/global/graceful-restart/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to OSPFv2 graceful
restart
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__helper_only',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__helper_only = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'global', 'graceful-restart', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/graceful_restart/config/enabled (boolean)

    YANG Description: When the value of this leaf is set to true, graceful restart
is enabled on the local system. In this case, the system will
use Grace-LSAs to signal that it is restarting to its
neighbors.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/graceful_restart/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When the value of this leaf is set to true, graceful restart
is enabled on the local system. In this case, the system will
use Grace-LSAs to signal that it is restarting to its
neighbors.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_helper_only(self):
    """
    Getter method for helper_only, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/graceful_restart/config/helper_only (boolean)

    YANG Description: Operate graceful-restart only in helper mode. When this leaf
is set to true, the local system does not use Grace-LSAs to
indicate that it is restarting, but will accept Grace-LSAs
from remote systems, and suppress withdrawl of adjacencies
of the system for the grace period specified
    """
    return self.__helper_only
      
  def _set_helper_only(self, v, load=False):
    """
    Setter method for helper_only, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/graceful_restart/config/helper_only (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_helper_only is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_helper_only() directly.

    YANG Description: Operate graceful-restart only in helper mode. When this leaf
is set to true, the local system does not use Grace-LSAs to
indicate that it is restarting, but will accept Grace-LSAs
from remote systems, and suppress withdrawl of adjacencies
of the system for the grace period specified
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="helper-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """helper_only must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__helper_only = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_helper_only(self):
    self.__helper_only = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)
  helper_only = __builtin__.property(_get_helper_only, _set_helper_only)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('helper_only', helper_only), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_graceful_restart_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/global/graceful-restart/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 OSPFv2 graceful
restart
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__helper_only',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__helper_only = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'global', 'graceful-restart', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/graceful_restart/state/enabled (boolean)

    YANG Description: When the value of this leaf is set to true, graceful restart
is enabled on the local system. In this case, the system will
use Grace-LSAs to signal that it is restarting to its
neighbors.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/graceful_restart/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When the value of this leaf is set to true, graceful restart
is enabled on the local system. In this case, the system will
use Grace-LSAs to signal that it is restarting to its
neighbors.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_helper_only(self):
    """
    Getter method for helper_only, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/graceful_restart/state/helper_only (boolean)

    YANG Description: Operate graceful-restart only in helper mode. When this leaf
is set to true, the local system does not use Grace-LSAs to
indicate that it is restarting, but will accept Grace-LSAs
from remote systems, and suppress withdrawl of adjacencies
of the system for the grace period specified
    """
    return self.__helper_only
      
  def _set_helper_only(self, v, load=False):
    """
    Setter method for helper_only, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/graceful_restart/state/helper_only (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_helper_only is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_helper_only() directly.

    YANG Description: Operate graceful-restart only in helper mode. When this leaf
is set to true, the local system does not use Grace-LSAs to
indicate that it is restarting, but will accept Grace-LSAs
from remote systems, and suppress withdrawl of adjacencies
of the system for the grace period specified
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="helper-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """helper_only must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__helper_only = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_helper_only(self):
    self.__helper_only = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  enabled = __builtin__.property(_get_enabled)
  helper_only = __builtin__.property(_get_helper_only)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('helper_only', helper_only), ])


class yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_graceful_restart(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/global/graceful-restart. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration and operational state parameters for OSPFv2
graceful restart
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'graceful-restart'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'global', 'graceful-restart']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/graceful_restart/config (container)

    YANG Description: Configuration parameters relating to OSPFv2 graceful
restart
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/graceful_restart/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 OSPFv2 graceful
restart
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/graceful_restart/state (container)

    YANG Description: Operational state parameters relating to OSPFv2 graceful
restart
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/graceful_restart/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 OSPFv2 graceful
restart
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_mpls_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/global/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 MPLS for OSPFv2
  """
  __slots__ = ('_path_helper', '_extmethods', '__traffic_engineering_extensions',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__traffic_engineering_extensions = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="traffic-engineering-extensions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'global', 'mpls', 'config']

  def _get_traffic_engineering_extensions(self):
    """
    Getter method for traffic_engineering_extensions, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/mpls/config/traffic_engineering_extensions (boolean)

    YANG Description: When this leaf is set to true, use traffic engineering
extensions for OSPF to advertise TE parameters via type 10
Opaque LSAs
    """
    return self.__traffic_engineering_extensions
      
  def _set_traffic_engineering_extensions(self, v, load=False):
    """
    Setter method for traffic_engineering_extensions, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/mpls/config/traffic_engineering_extensions (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_traffic_engineering_extensions is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_traffic_engineering_extensions() directly.

    YANG Description: When this leaf is set to true, use traffic engineering
extensions for OSPF to advertise TE parameters via type 10
Opaque LSAs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="traffic-engineering-extensions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """traffic_engineering_extensions must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="traffic-engineering-extensions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__traffic_engineering_extensions = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_traffic_engineering_extensions(self):
    self.__traffic_engineering_extensions = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="traffic-engineering-extensions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  traffic_engineering_extensions = __builtin__.property(_get_traffic_engineering_extensions, _set_traffic_engineering_extensions)


  _pyangbind_elements = OrderedDict([('traffic_engineering_extensions', traffic_engineering_extensions), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_mpls_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/global/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 MPLS for
OSPFv2
  """
  __slots__ = ('_path_helper', '_extmethods', '__traffic_engineering_extensions',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__traffic_engineering_extensions = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="traffic-engineering-extensions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'global', 'mpls', 'state']

  def _get_traffic_engineering_extensions(self):
    """
    Getter method for traffic_engineering_extensions, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/mpls/state/traffic_engineering_extensions (boolean)

    YANG Description: When this leaf is set to true, use traffic engineering
extensions for OSPF to advertise TE parameters via type 10
Opaque LSAs
    """
    return self.__traffic_engineering_extensions
      
  def _set_traffic_engineering_extensions(self, v, load=False):
    """
    Setter method for traffic_engineering_extensions, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/mpls/state/traffic_engineering_extensions (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_traffic_engineering_extensions is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_traffic_engineering_extensions() directly.

    YANG Description: When this leaf is set to true, use traffic engineering
extensions for OSPF to advertise TE parameters via type 10
Opaque LSAs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="traffic-engineering-extensions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """traffic_engineering_extensions must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="traffic-engineering-extensions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__traffic_engineering_extensions = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_traffic_engineering_extensions(self):
    self.__traffic_engineering_extensions = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="traffic-engineering-extensions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  traffic_engineering_extensions = __builtin__.property(_get_traffic_engineering_extensions)


  _pyangbind_elements = OrderedDict([('traffic_engineering_extensions', traffic_engineering_extensions), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_mpls_igp_ldp_sync_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/global/mpls/igp-ldp-sync/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to LDP/IG
synchronization.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__post_session_up_delay',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__post_session_up_delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="post-session-up-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'global', 'mpls', 'igp-ldp-sync', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/mpls/igp_ldp_sync/config/enabled (boolean)

    YANG Description: When this leaf is set to true, do not utilise this link for
forwarding via the IGP until such time as LDP adjacencies to
the neighbor(s) over the link are established.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/mpls/igp_ldp_sync/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When this leaf is set to true, do not utilise this link for
forwarding via the IGP until such time as LDP adjacencies to
the neighbor(s) over the link are established.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_post_session_up_delay(self):
    """
    Getter method for post_session_up_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/mpls/igp_ldp_sync/config/post_session_up_delay (uint32)

    YANG Description: This leaf specifies a delay, expressed in units of milliseconds,
between the LDP session to the IGP neighbor being established, and
it being considered synchronized by the IGP.
    """
    return self.__post_session_up_delay
      
  def _set_post_session_up_delay(self, v, load=False):
    """
    Setter method for post_session_up_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/mpls/igp_ldp_sync/config/post_session_up_delay (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_post_session_up_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_post_session_up_delay() directly.

    YANG Description: This leaf specifies a delay, expressed in units of milliseconds,
between the LDP session to the IGP neighbor being established, and
it being considered synchronized by the IGP.
    """
    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="post-session-up-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """post_session_up_delay 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="post-session-up-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__post_session_up_delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_post_session_up_delay(self):
    self.__post_session_up_delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="post-session-up-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)
  post_session_up_delay = __builtin__.property(_get_post_session_up_delay, _set_post_session_up_delay)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('post_session_up_delay', post_session_up_delay), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_mpls_igp_ldp_sync_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/global/mpls/igp-ldp-sync/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state variables relating to LDP/IGP
synchronization
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__post_session_up_delay',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__post_session_up_delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="post-session-up-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'global', 'mpls', 'igp-ldp-sync', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/mpls/igp_ldp_sync/state/enabled (boolean)

    YANG Description: When this leaf is set to true, do not utilise this link for
forwarding via the IGP until such time as LDP adjacencies to
the neighbor(s) over the link are established.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/mpls/igp_ldp_sync/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When this leaf is set to true, do not utilise this link for
forwarding via the IGP until such time as LDP adjacencies to
the neighbor(s) over the link are established.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_post_session_up_delay(self):
    """
    Getter method for post_session_up_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/mpls/igp_ldp_sync/state/post_session_up_delay (uint32)

    YANG Description: This leaf specifies a delay, expressed in units of milliseconds,
between the LDP session to the IGP neighbor being established, and
it being considered synchronized by the IGP.
    """
    return self.__post_session_up_delay
      
  def _set_post_session_up_delay(self, v, load=False):
    """
    Setter method for post_session_up_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/mpls/igp_ldp_sync/state/post_session_up_delay (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_post_session_up_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_post_session_up_delay() directly.

    YANG Description: This leaf specifies a delay, expressed in units of milliseconds,
between the LDP session to the IGP neighbor being established, and
it being considered synchronized by the IGP.
    """
    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="post-session-up-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """post_session_up_delay 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="post-session-up-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__post_session_up_delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_post_session_up_delay(self):
    self.__post_session_up_delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="post-session-up-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  enabled = __builtin__.property(_get_enabled)
  post_session_up_delay = __builtin__.property(_get_post_session_up_delay)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('post_session_up_delay', post_session_up_delay), ])


class yc_igp_ldp_sync_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_mpls_igp_ldp_sync(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/global/mpls/igp-ldp-sync. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: OSPFv2 parameters relating to LDP/IGP synchronization
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'igp-ldp-sync'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_mpls_igp_ldp_sync_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_mpls_igp_ldp_sync_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'global', 'mpls', 'igp-ldp-sync']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/mpls/igp_ldp_sync/config (container)

    YANG Description: Configuration parameters relating to LDP/IG
synchronization.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/mpls/igp_ldp_sync/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 LDP/IG
synchronization.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_mpls_igp_ldp_sync_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_mpls_igp_ldp_sync_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_mpls_igp_ldp_sync_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/mpls/igp_ldp_sync/state (container)

    YANG Description: Operational state variables relating to LDP/IGP
synchronization
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/mpls/igp_ldp_sync/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 variables relating to LDP/IGP
synchronization
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_mpls_igp_ldp_sync_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_mpls_igp_ldp_sync_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_mpls_igp_ldp_sync_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_mpls_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_mpls(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/global/mpls. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: OSPFv2 parameters relating to MPLS
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__igp_ldp_sync',)

  _yang_name = 'mpls'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__igp_ldp_sync = YANGDynClass(base=yc_igp_ldp_sync_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_mpls_igp_ldp_sync, is_container='container', yang_name="igp-ldp-sync", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'global', 'mpls']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/mpls/config (container)

    YANG Description: Configuration parameters relating to MPLS for OSPFv2
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/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 MPLS for OSPFv2
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/mpls/state (container)

    YANG Description: Operational state parameters relating to MPLS for
OSPFv2
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/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 MPLS for
OSPFv2
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_igp_ldp_sync(self):
    """
    Getter method for igp_ldp_sync, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/mpls/igp_ldp_sync (container)

    YANG Description: OSPFv2 parameters relating to LDP/IGP synchronization
    """
    return self.__igp_ldp_sync
      
  def _set_igp_ldp_sync(self, v, load=False):
    """
    Setter method for igp_ldp_sync, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/mpls/igp_ldp_sync (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_igp_ldp_sync is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_igp_ldp_sync() directly.

    YANG Description: OSPFv2 parameters relating to LDP/IGP synchronization
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_igp_ldp_sync_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_mpls_igp_ldp_sync, is_container='container', yang_name="igp-ldp-sync", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """igp_ldp_sync must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_igp_ldp_sync_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_mpls_igp_ldp_sync, is_container='container', yang_name="igp-ldp-sync", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__igp_ldp_sync = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_igp_ldp_sync(self):
    self.__igp_ldp_sync = YANGDynClass(base=yc_igp_ldp_sync_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_mpls_igp_ldp_sync, is_container='container', yang_name="igp-ldp-sync", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  igp_ldp_sync = __builtin__.property(_get_igp_ldp_sync, _set_igp_ldp_sync)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('igp_ldp_sync', igp_ldp_sync), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_inter_area_propagation_policies_inter_area_propagation_policy_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/global/inter-area-propagation-policies/inter-area-propagation-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 the inter-area
propagation policy
  """
  __slots__ = ('_path_helper', '_extmethods', '__src_area','__dst_area','__import_policy','__default_import_policy',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__src_area = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="src-area", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__dst_area = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="dst-area", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'global', 'inter-area-propagation-policies', 'inter-area-propagation-policy', 'config']

  def _get_src_area(self):
    """
    Getter method for src_area, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/inter_area_propagation_policies/inter_area_propagation_policy/config/src_area (leafref)

    YANG Description: The area from which prefixes are to be exported.
    """
    return self.__src_area
      
  def _set_src_area(self, v, load=False):
    """
    Setter method for src_area, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/inter_area_propagation_policies/inter_area_propagation_policy/config/src_area (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_src_area is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_src_area() directly.

    YANG Description: The area from which prefixes are to be exported.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="src-area", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """src_area must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="src-area", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__src_area = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_src_area(self):
    self.__src_area = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="src-area", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_dst_area(self):
    """
    Getter method for dst_area, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/inter_area_propagation_policies/inter_area_propagation_policy/config/dst_area (leafref)

    YANG Description: The destination area to which prefixes are to be imported
    """
    return self.__dst_area
      
  def _set_dst_area(self, v, load=False):
    """
    Setter method for dst_area, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/inter_area_propagation_policies/inter_area_propagation_policy/config/dst_area (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dst_area is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dst_area() directly.

    YANG Description: The destination area to which prefixes are to be imported
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="dst-area", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dst_area must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="dst-area", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__dst_area = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dst_area(self):
    self.__dst_area = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="dst-area", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_import_policy(self):
    """
    Getter method for import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/inter_area_propagation_policies/inter_area_propagation_policy/config/import_policy (leafref)

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    return self.__import_policy
      
  def _set_import_policy(self, v, load=False):
    """
    Setter method for import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/inter_area_propagation_policies/inter_area_propagation_policy/config/import_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_import_policy() directly.

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """import_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__import_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_import_policy(self):
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_default_import_policy(self):
    """
    Getter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/inter_area_propagation_policies/inter_area_propagation_policy/config/default_import_policy (default-policy-type)

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    return self.__default_import_policy
      
  def _set_default_import_policy(self, v, load=False):
    """
    Setter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/inter_area_propagation_policies/inter_area_propagation_policy/config/default_import_policy (default-policy-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_default_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_default_import_policy() directly.

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    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={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """default_import_policy must be of a type compatible with default-policy-type""",
          'defined-type': "openconfig-network-instance:default-policy-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)""",
        })

    self.__default_import_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_default_import_policy(self):
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)

  src_area = __builtin__.property(_get_src_area, _set_src_area)
  dst_area = __builtin__.property(_get_dst_area, _set_dst_area)
  import_policy = __builtin__.property(_get_import_policy, _set_import_policy)
  default_import_policy = __builtin__.property(_get_default_import_policy, _set_default_import_policy)


  _pyangbind_elements = OrderedDict([('src_area', src_area), ('dst_area', dst_area), ('import_policy', import_policy), ('default_import_policy', default_import_policy), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_inter_area_propagation_policies_inter_area_propagation_policy_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/global/inter-area-propagation-policies/inter-area-propagation-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 the inter-area
propagation policy
  """
  __slots__ = ('_path_helper', '_extmethods', '__src_area','__dst_area','__import_policy','__default_import_policy',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__src_area = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="src-area", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__dst_area = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="dst-area", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'global', 'inter-area-propagation-policies', 'inter-area-propagation-policy', 'state']

  def _get_src_area(self):
    """
    Getter method for src_area, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/inter_area_propagation_policies/inter_area_propagation_policy/state/src_area (leafref)

    YANG Description: The area from which prefixes are to be exported.
    """
    return self.__src_area
      
  def _set_src_area(self, v, load=False):
    """
    Setter method for src_area, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/inter_area_propagation_policies/inter_area_propagation_policy/state/src_area (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_src_area is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_src_area() directly.

    YANG Description: The area from which prefixes are to be exported.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="src-area", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """src_area must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="src-area", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__src_area = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_src_area(self):
    self.__src_area = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="src-area", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_dst_area(self):
    """
    Getter method for dst_area, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/inter_area_propagation_policies/inter_area_propagation_policy/state/dst_area (leafref)

    YANG Description: The destination area to which prefixes are to be imported
    """
    return self.__dst_area
      
  def _set_dst_area(self, v, load=False):
    """
    Setter method for dst_area, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/inter_area_propagation_policies/inter_area_propagation_policy/state/dst_area (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dst_area is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dst_area() directly.

    YANG Description: The destination area to which prefixes are to be imported
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="dst-area", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dst_area must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="dst-area", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__dst_area = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dst_area(self):
    self.__dst_area = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="dst-area", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_import_policy(self):
    """
    Getter method for import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/inter_area_propagation_policies/inter_area_propagation_policy/state/import_policy (leafref)

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    return self.__import_policy
      
  def _set_import_policy(self, v, load=False):
    """
    Setter method for import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/inter_area_propagation_policies/inter_area_propagation_policy/state/import_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_import_policy() directly.

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """import_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__import_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_import_policy(self):
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_default_import_policy(self):
    """
    Getter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/inter_area_propagation_policies/inter_area_propagation_policy/state/default_import_policy (default-policy-type)

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    return self.__default_import_policy
      
  def _set_default_import_policy(self, v, load=False):
    """
    Setter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/inter_area_propagation_policies/inter_area_propagation_policy/state/default_import_policy (default-policy-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_default_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_default_import_policy() directly.

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    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={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """default_import_policy must be of a type compatible with default-policy-type""",
          'defined-type': "openconfig-network-instance:default-policy-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)""",
        })

    self.__default_import_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_default_import_policy(self):
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)

  src_area = __builtin__.property(_get_src_area)
  dst_area = __builtin__.property(_get_dst_area)
  import_policy = __builtin__.property(_get_import_policy)
  default_import_policy = __builtin__.property(_get_default_import_policy)


  _pyangbind_elements = OrderedDict([('src_area', src_area), ('dst_area', dst_area), ('import_policy', import_policy), ('default_import_policy', default_import_policy), ])


class yc_inter_area_propagation_policy_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_inter_area_propagation_policies_inter_area_propagation_policy(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/global/inter-area-propagation-policies/inter-area-propagation-policy. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A list of connections between pairs of areas - routes are
propagated from the source (src) area to the destination (dst)
area according to the policy specified
  """
  __slots__ = ('_path_helper', '_extmethods', '__src_area','__dst_area','__config','__state',)

  _yang_name = 'inter-area-propagation-policy'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__src_area = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="src-area", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__dst_area = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="dst-area", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_inter_area_propagation_policies_inter_area_propagation_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_inter_area_propagation_policies_inter_area_propagation_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'global', 'inter-area-propagation-policies', 'inter-area-propagation-policy']

  def _get_src_area(self):
    """
    Getter method for src_area, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/inter_area_propagation_policies/inter_area_propagation_policy/src_area (leafref)

    YANG Description: Reference to the source area
    """
    return self.__src_area
      
  def _set_src_area(self, v, load=False):
    """
    Setter method for src_area, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/inter_area_propagation_policies/inter_area_propagation_policy/src_area (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_src_area is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_src_area() directly.

    YANG Description: Reference to the source area
    """
    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="src-area", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """src_area must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="src-area", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__src_area = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_src_area(self):
    self.__src_area = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="src-area", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_dst_area(self):
    """
    Getter method for dst_area, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/inter_area_propagation_policies/inter_area_propagation_policy/dst_area (leafref)

    YANG Description: Reference to the destination area
    """
    return self.__dst_area
      
  def _set_dst_area(self, v, load=False):
    """
    Setter method for dst_area, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/inter_area_propagation_policies/inter_area_propagation_policy/dst_area (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dst_area is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dst_area() directly.

    YANG Description: Reference to the destination area
    """
    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="dst-area", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dst_area must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="dst-area", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__dst_area = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dst_area(self):
    self.__dst_area = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="dst-area", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/inter_area_propagation_policies/inter_area_propagation_policy/config (container)

    YANG Description: Configuration parameters relating to the inter-area
propagation policy
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/inter_area_propagation_policies/inter_area_propagation_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 the inter-area
propagation policy
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_inter_area_propagation_policies_inter_area_propagation_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_inter_area_propagation_policies_inter_area_propagation_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_inter_area_propagation_policies_inter_area_propagation_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/inter_area_propagation_policies/inter_area_propagation_policy/state (container)

    YANG Description: Operational state parameters relating to the inter-area
propagation policy
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/inter_area_propagation_policies/inter_area_propagation_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 the inter-area
propagation policy
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_inter_area_propagation_policies_inter_area_propagation_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_inter_area_propagation_policies_inter_area_propagation_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_inter_area_propagation_policies_inter_area_propagation_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  src_area = __builtin__.property(_get_src_area, _set_src_area)
  dst_area = __builtin__.property(_get_dst_area, _set_dst_area)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('src_area', src_area), ('dst_area', dst_area), ('config', config), ('state', state), ])


class yc_inter_area_propagation_policies_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_inter_area_propagation_policies(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/global/inter-area-propagation-policies. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Policies defining how inter-area propagation should be performed
by the OSPF instance
  """
  __slots__ = ('_path_helper', '_extmethods', '__inter_area_propagation_policy',)

  _yang_name = 'inter-area-propagation-policies'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__inter_area_propagation_policy = YANGDynClass(base=YANGListType("src_area dst_area",yc_inter_area_propagation_policy_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_inter_area_propagation_policies_inter_area_propagation_policy, yang_name="inter-area-propagation-policy", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='src-area dst-area', extensions=None), is_container='list', yang_name="inter-area-propagation-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'global', 'inter-area-propagation-policies']

  def _get_inter_area_propagation_policy(self):
    """
    Getter method for inter_area_propagation_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/inter_area_propagation_policies/inter_area_propagation_policy (list)

    YANG Description: A list of connections between pairs of areas - routes are
propagated from the source (src) area to the destination (dst)
area according to the policy specified
    """
    return self.__inter_area_propagation_policy
      
  def _set_inter_area_propagation_policy(self, v, load=False):
    """
    Setter method for inter_area_propagation_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/inter_area_propagation_policies/inter_area_propagation_policy (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_inter_area_propagation_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_inter_area_propagation_policy() directly.

    YANG Description: A list of connections between pairs of areas - routes are
propagated from the source (src) area to the destination (dst)
area according to the policy specified
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("src_area dst_area",yc_inter_area_propagation_policy_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_inter_area_propagation_policies_inter_area_propagation_policy, yang_name="inter-area-propagation-policy", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='src-area dst-area', extensions=None), is_container='list', yang_name="inter-area-propagation-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """inter_area_propagation_policy must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("src_area dst_area",yc_inter_area_propagation_policy_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_inter_area_propagation_policies_inter_area_propagation_policy, yang_name="inter-area-propagation-policy", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='src-area dst-area', extensions=None), is_container='list', yang_name="inter-area-propagation-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__inter_area_propagation_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_inter_area_propagation_policy(self):
    self.__inter_area_propagation_policy = YANGDynClass(base=YANGListType("src_area dst_area",yc_inter_area_propagation_policy_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_inter_area_propagation_policies_inter_area_propagation_policy, yang_name="inter-area-propagation-policy", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='src-area dst-area', extensions=None), is_container='list', yang_name="inter-area-propagation-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  inter_area_propagation_policy = __builtin__.property(_get_inter_area_propagation_policy, _set_inter_area_propagation_policy)


  _pyangbind_elements = OrderedDict([('inter_area_propagation_policy', inter_area_propagation_policy), ])


class yc_global__openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/global. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration and operational state parameters for settings
that are global to the OSPFv2 instance
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__timers','__graceful_restart','__mpls','__inter_area_propagation_policies',)

  _yang_name = 'global'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__timers = YANGDynClass(base=yc_timers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers, is_container='container', yang_name="timers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__graceful_restart = YANGDynClass(base=yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__mpls = YANGDynClass(base=yc_mpls_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__inter_area_propagation_policies = YANGDynClass(base=yc_inter_area_propagation_policies_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_inter_area_propagation_policies, is_container='container', yang_name="inter-area-propagation-policies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'global']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/config (container)

    YANG Description: Global configuration parameters for OSPFv2
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/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: Global configuration parameters for OSPFv2
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/state (container)

    YANG Description: Operational state parameters for OSPFv2
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/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 OSPFv2
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_timers(self):
    """
    Getter method for timers, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers (container)

    YANG Description: Configuration and operational state parameters for OSPFv2
timers
    """
    return self.__timers
      
  def _set_timers(self, v, load=False):
    """
    Setter method for timers, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/timers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_timers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_timers() directly.

    YANG Description: Configuration and operational state parameters for OSPFv2
timers
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_timers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers, is_container='container', yang_name="timers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """timers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_timers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers, is_container='container', yang_name="timers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__timers = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_timers(self):
    self.__timers = YANGDynClass(base=yc_timers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_timers, is_container='container', yang_name="timers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_graceful_restart(self):
    """
    Getter method for graceful_restart, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/graceful_restart (container)

    YANG Description: Configuration and operational state parameters for OSPFv2
graceful restart
    """
    return self.__graceful_restart
      
  def _set_graceful_restart(self, v, load=False):
    """
    Setter method for graceful_restart, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/graceful_restart (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_graceful_restart is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_graceful_restart() directly.

    YANG Description: Configuration and operational state parameters for OSPFv2
graceful restart
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """graceful_restart must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__graceful_restart = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_graceful_restart(self):
    self.__graceful_restart = YANGDynClass(base=yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_mpls(self):
    """
    Getter method for mpls, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/mpls (container)

    YANG Description: OSPFv2 parameters relating to MPLS
    """
    return self.__mpls
      
  def _set_mpls(self, v, load=False):
    """
    Setter method for mpls, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/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: OSPFv2 parameters relating to MPLS
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_mpls_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_inter_area_propagation_policies(self):
    """
    Getter method for inter_area_propagation_policies, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/inter_area_propagation_policies (container)

    YANG Description: Policies defining how inter-area propagation should be performed
by the OSPF instance
    """
    return self.__inter_area_propagation_policies
      
  def _set_inter_area_propagation_policies(self, v, load=False):
    """
    Setter method for inter_area_propagation_policies, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global/inter_area_propagation_policies (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_inter_area_propagation_policies is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_inter_area_propagation_policies() directly.

    YANG Description: Policies defining how inter-area propagation should be performed
by the OSPF instance
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_inter_area_propagation_policies_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_inter_area_propagation_policies, is_container='container', yang_name="inter-area-propagation-policies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """inter_area_propagation_policies must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_inter_area_propagation_policies_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_inter_area_propagation_policies, is_container='container', yang_name="inter-area-propagation-policies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__inter_area_propagation_policies = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_inter_area_propagation_policies(self):
    self.__inter_area_propagation_policies = YANGDynClass(base=yc_inter_area_propagation_policies_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global_inter_area_propagation_policies, is_container='container', yang_name="inter-area-propagation-policies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  timers = __builtin__.property(_get_timers, _set_timers)
  graceful_restart = __builtin__.property(_get_graceful_restart, _set_graceful_restart)
  mpls = __builtin__.property(_get_mpls, _set_mpls)
  inter_area_propagation_policies = __builtin__.property(_get_inter_area_propagation_policies, _set_inter_area_propagation_policies)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('timers', timers), ('graceful_restart', graceful_restart), ('mpls', mpls), ('inter_area_propagation_policies', inter_area_propagation_policies), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to an OSPFv2 area
  """
  __slots__ = ('_path_helper', '_extmethods', '__identifier',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__identifier = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}),], is_leaf=True, yang_name="identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-area-identifier', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'config']

  def _get_identifier(self):
    """
    Getter method for identifier, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/config/identifier (oc-ospf-types:ospf-area-identifier)

    YANG Description: An identifier for the OSPFv2 area - described as either a
32-bit unsigned integer, or a dotted-quad
    """
    return self.__identifier
      
  def _set_identifier(self, v, load=False):
    """
    Setter method for identifier, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/config/identifier (oc-ospf-types:ospf-area-identifier)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_identifier is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_identifier() directly.

    YANG Description: An identifier for the OSPFv2 area - described as either a
32-bit unsigned integer, or a dotted-quad
    """
    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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}),], is_leaf=True, yang_name="identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-area-identifier', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """identifier must be of a type compatible with oc-ospf-types:ospf-area-identifier""",
          'defined-type': "oc-ospf-types:ospf-area-identifier",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}),], is_leaf=True, yang_name="identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-area-identifier', is_config=True)""",
        })

    self.__identifier = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_identifier(self):
    self.__identifier = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}),], is_leaf=True, yang_name="identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-area-identifier', is_config=True)

  identifier = __builtin__.property(_get_identifier, _set_identifier)


  _pyangbind_elements = OrderedDict([('identifier', identifier), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/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 an OSPFv2 area
  """
  __slots__ = ('_path_helper', '_extmethods', '__identifier',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__identifier = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}),], is_leaf=True, yang_name="identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-area-identifier', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'state']

  def _get_identifier(self):
    """
    Getter method for identifier, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/state/identifier (oc-ospf-types:ospf-area-identifier)

    YANG Description: An identifier for the OSPFv2 area - described as either a
32-bit unsigned integer, or a dotted-quad
    """
    return self.__identifier
      
  def _set_identifier(self, v, load=False):
    """
    Setter method for identifier, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/state/identifier (oc-ospf-types:ospf-area-identifier)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_identifier is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_identifier() directly.

    YANG Description: An identifier for the OSPFv2 area - described as either a
32-bit unsigned integer, or a dotted-quad
    """
    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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}),], is_leaf=True, yang_name="identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-area-identifier', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """identifier must be of a type compatible with oc-ospf-types:ospf-area-identifier""",
          'defined-type': "oc-ospf-types:ospf-area-identifier",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}),], is_leaf=True, yang_name="identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-area-identifier', is_config=False)""",
        })

    self.__identifier = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_identifier(self):
    self.__identifier = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}),], is_leaf=True, yang_name="identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-area-identifier', is_config=False)

  identifier = __builtin__.property(_get_identifier)


  _pyangbind_elements = OrderedDict([('identifier', identifier), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_mpls_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/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 MPLS extensions for
OSPFv2
  """
  __slots__ = ('_path_helper', '_extmethods', '__traffic_engineering_enabled',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__traffic_engineering_enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="traffic-engineering-enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'mpls', 'config']

  def _get_traffic_engineering_enabled(self):
    """
    Getter method for traffic_engineering_enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/mpls/config/traffic_engineering_enabled (boolean)

    YANG Description: Specifies whether traffic engineering extensions should be
advertised within the area
    """
    return self.__traffic_engineering_enabled
      
  def _set_traffic_engineering_enabled(self, v, load=False):
    """
    Setter method for traffic_engineering_enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/mpls/config/traffic_engineering_enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_traffic_engineering_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_traffic_engineering_enabled() directly.

    YANG Description: Specifies whether traffic engineering extensions should be
advertised within the area
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="traffic-engineering-enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """traffic_engineering_enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="traffic-engineering-enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__traffic_engineering_enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_traffic_engineering_enabled(self):
    self.__traffic_engineering_enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="traffic-engineering-enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  traffic_engineering_enabled = __builtin__.property(_get_traffic_engineering_enabled, _set_traffic_engineering_enabled)


  _pyangbind_elements = OrderedDict([('traffic_engineering_enabled', traffic_engineering_enabled), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_mpls_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/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 MPLS extensions
for OSPFv2
  """
  __slots__ = ('_path_helper', '_extmethods', '__traffic_engineering_enabled',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__traffic_engineering_enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="traffic-engineering-enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'mpls', 'state']

  def _get_traffic_engineering_enabled(self):
    """
    Getter method for traffic_engineering_enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/mpls/state/traffic_engineering_enabled (boolean)

    YANG Description: Specifies whether traffic engineering extensions should be
advertised within the area
    """
    return self.__traffic_engineering_enabled
      
  def _set_traffic_engineering_enabled(self, v, load=False):
    """
    Setter method for traffic_engineering_enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/mpls/state/traffic_engineering_enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_traffic_engineering_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_traffic_engineering_enabled() directly.

    YANG Description: Specifies whether traffic engineering extensions should be
advertised within the area
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="traffic-engineering-enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """traffic_engineering_enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="traffic-engineering-enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__traffic_engineering_enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_traffic_engineering_enabled(self):
    self.__traffic_engineering_enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="traffic-engineering-enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  traffic_engineering_enabled = __builtin__.property(_get_traffic_engineering_enabled)


  _pyangbind_elements = OrderedDict([('traffic_engineering_enabled', traffic_engineering_enabled), ])


class yc_mpls_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_mpls(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/mpls. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration and operational state parameters for OSPFv2
extensions relating to MPLS
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'mpls'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'mpls']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/mpls/config (container)

    YANG Description: Configuration parameters relating to MPLS extensions for
OSPFv2
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/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 MPLS extensions for
OSPFv2
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/mpls/state (container)

    YANG Description: Operational state parameters relating to MPLS extensions
for OSPFv2
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/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 MPLS extensions
for OSPFv2
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_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/network-instance', defining_module='openconfig-network-instance', 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_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/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 OSPFv2
area
  """
  __slots__ = ('_path_helper', '_extmethods', '__identifier',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__identifier = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}),], is_leaf=True, yang_name="identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-area-identifier', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'state']

  def _get_identifier(self):
    """
    Getter method for identifier, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/state/identifier (oc-ospf-types:ospf-area-identifier)

    YANG Description: An identifier for the area, expressed as a dotted quad or
an unsigned 32-bit integer
    """
    return self.__identifier
      
  def _set_identifier(self, v, load=False):
    """
    Setter method for identifier, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/state/identifier (oc-ospf-types:ospf-area-identifier)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_identifier is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_identifier() directly.

    YANG Description: An identifier for the area, expressed as a dotted quad or
an unsigned 32-bit integer
    """
    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),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}),], is_leaf=True, yang_name="identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-area-identifier', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """identifier must be of a type compatible with oc-ospf-types:ospf-area-identifier""",
          'defined-type': "oc-ospf-types:ospf-area-identifier",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}),], is_leaf=True, yang_name="identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-area-identifier', is_config=False)""",
        })

    self.__identifier = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_identifier(self):
    self.__identifier = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}),], is_leaf=True, yang_name="identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-area-identifier', is_config=False)

  identifier = __builtin__.property(_get_identifier)


  _pyangbind_elements = OrderedDict([('identifier', identifier), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level operational state parameters relating to
an LSA within the area
  """
  __slots__ = ('_path_helper', '_extmethods', '__type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'ROUTER_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ROUTER_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ROUTER_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'NETWORK_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:NETWORK_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:NETWORK_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'SUMMARY_IP_NETWORK_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:SUMMARY_IP_NETWORK_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:SUMMARY_IP_NETWORK_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'SUMMARY_ASBR_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:SUMMARY_ASBR_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:SUMMARY_ASBR_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'AS_EXTERNAL_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:AS_EXTERNAL_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:AS_EXTERNAL_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'NSSA_AS_EXTERNAL_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:NSSA_AS_EXTERNAL_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:NSSA_AS_EXTERNAL_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'OSPFV2_LINK_SCOPE_OPAQUE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:OSPFV2_LINK_SCOPE_OPAQUE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:OSPFV2_LINK_SCOPE_OPAQUE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'OSPFV2_AREA_SCOPE_OPAQUE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:OSPFV2_AREA_SCOPE_OPAQUE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:OSPFV2_AREA_SCOPE_OPAQUE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'OSPFV2_AS_SCOPE_OPAQUE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:OSPFV2_AS_SCOPE_OPAQUE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:OSPFV2_AS_SCOPE_OPAQUE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/state/type (identityref)

    YANG Description: The type of LSA being described. The type of the LSA is
expressed as a canonical name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/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: The type of LSA being described. The type of the LSA is
expressed as a canonical name.
    """
    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={'ROUTER_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ROUTER_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ROUTER_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'NETWORK_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:NETWORK_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:NETWORK_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'SUMMARY_IP_NETWORK_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:SUMMARY_IP_NETWORK_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:SUMMARY_IP_NETWORK_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'SUMMARY_ASBR_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:SUMMARY_ASBR_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:SUMMARY_ASBR_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'AS_EXTERNAL_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:AS_EXTERNAL_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:AS_EXTERNAL_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'NSSA_AS_EXTERNAL_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:NSSA_AS_EXTERNAL_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:NSSA_AS_EXTERNAL_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'OSPFV2_LINK_SCOPE_OPAQUE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:OSPFV2_LINK_SCOPE_OPAQUE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:OSPFV2_LINK_SCOPE_OPAQUE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'OSPFV2_AREA_SCOPE_OPAQUE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:OSPFV2_AREA_SCOPE_OPAQUE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:OSPFV2_AREA_SCOPE_OPAQUE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'OSPFV2_AS_SCOPE_OPAQUE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:OSPFV2_AS_SCOPE_OPAQUE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:OSPFV2_AS_SCOPE_OPAQUE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ROUTER_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ROUTER_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ROUTER_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'NETWORK_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:NETWORK_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:NETWORK_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'SUMMARY_IP_NETWORK_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:SUMMARY_IP_NETWORK_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:SUMMARY_IP_NETWORK_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'SUMMARY_ASBR_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:SUMMARY_ASBR_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:SUMMARY_ASBR_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'AS_EXTERNAL_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:AS_EXTERNAL_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:AS_EXTERNAL_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'NSSA_AS_EXTERNAL_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:NSSA_AS_EXTERNAL_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:NSSA_AS_EXTERNAL_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'OSPFV2_LINK_SCOPE_OPAQUE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:OSPFV2_LINK_SCOPE_OPAQUE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:OSPFV2_LINK_SCOPE_OPAQUE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'OSPFV2_AREA_SCOPE_OPAQUE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:OSPFV2_AREA_SCOPE_OPAQUE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:OSPFV2_AREA_SCOPE_OPAQUE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'OSPFV2_AS_SCOPE_OPAQUE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:OSPFV2_AS_SCOPE_OPAQUE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:OSPFV2_AS_SCOPE_OPAQUE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-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/network-instance', defining_module='openconfig-network-instance', 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={'ROUTER_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ROUTER_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ROUTER_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'NETWORK_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:NETWORK_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:NETWORK_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'SUMMARY_IP_NETWORK_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:SUMMARY_IP_NETWORK_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:SUMMARY_IP_NETWORK_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'SUMMARY_ASBR_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:SUMMARY_ASBR_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:SUMMARY_ASBR_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'AS_EXTERNAL_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:AS_EXTERNAL_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:AS_EXTERNAL_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'NSSA_AS_EXTERNAL_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:NSSA_AS_EXTERNAL_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:NSSA_AS_EXTERNAL_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'OSPFV2_LINK_SCOPE_OPAQUE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:OSPFV2_LINK_SCOPE_OPAQUE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:OSPFV2_LINK_SCOPE_OPAQUE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'OSPFV2_AREA_SCOPE_OPAQUE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:OSPFV2_AREA_SCOPE_OPAQUE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:OSPFV2_AREA_SCOPE_OPAQUE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'OSPFV2_AS_SCOPE_OPAQUE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:OSPFV2_AS_SCOPE_OPAQUE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:OSPFV2_AS_SCOPE_OPAQUE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  type = __builtin__.property(_get_type)


  _pyangbind_elements = OrderedDict([('type', type), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/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 all
LSA types
  """
  __slots__ = ('_path_helper', '_extmethods', '__link_state_id','__advertising_router','__sequence_number','__checksum','__age',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__link_state_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="link-state-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)
    self.__advertising_router = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="advertising-router", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)
    self.__sequence_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="sequence-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='int32', is_config=False)
    self.__checksum = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="checksum", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__age = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="age", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'state']

  def _get_link_state_id(self):
    """
    Getter method for link_state_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/state/link_state_id (yang:dotted-quad)

    YANG Description: The Link State ID for the specified LSA type. The exact
defined value of the Link State ID is dependent on the LSA
type.
    """
    return self.__link_state_id
      
  def _set_link_state_id(self, v, load=False):
    """
    Setter method for link_state_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/state/link_state_id (yang:dotted-quad)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_state_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_state_id() directly.

    YANG Description: The Link State ID for the specified LSA type. The exact
defined value of the Link State ID is dependent on the LSA
type.
    """
    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][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="link-state-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_state_id must be of a type compatible with yang:dotted-quad""",
          'defined-type': "yang:dotted-quad",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="link-state-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)""",
        })

    self.__link_state_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_state_id(self):
    self.__link_state_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="link-state-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)


  def _get_advertising_router(self):
    """
    Getter method for advertising_router, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/state/advertising_router (yang:dotted-quad)

    YANG Description: The router ID of the router that originated the LSA
    """
    return self.__advertising_router
      
  def _set_advertising_router(self, v, load=False):
    """
    Setter method for advertising_router, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/state/advertising_router (yang:dotted-quad)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_advertising_router is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_advertising_router() directly.

    YANG Description: The router ID of the router that originated the LSA
    """
    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][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="advertising-router", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """advertising_router must be of a type compatible with yang:dotted-quad""",
          'defined-type': "yang:dotted-quad",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="advertising-router", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)""",
        })

    self.__advertising_router = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_advertising_router(self):
    self.__advertising_router = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="advertising-router", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)


  def _get_sequence_number(self):
    """
    Getter method for sequence_number, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/state/sequence_number (int32)

    YANG Description: A signed 32-bit integer used to detect old and duplicate
LSAs. The greater the sequence number the more recent the
LSA.
    """
    return self.__sequence_number
      
  def _set_sequence_number(self, v, load=False):
    """
    Setter method for sequence_number, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/state/sequence_number (int32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sequence_number is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sequence_number() directly.

    YANG Description: A signed 32-bit integer used to detect old and duplicate
LSAs. The greater the sequence number the more recent the
LSA.
    """
    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="sequence-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='int32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sequence_number 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="sequence-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='int32', is_config=False)""",
        })

    self.__sequence_number = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sequence_number(self):
    self.__sequence_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="sequence-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='int32', is_config=False)


  def _get_checksum(self):
    """
    Getter method for checksum, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/state/checksum (uint16)

    YANG Description: The checksum of the complete contents of the LSA excluding
the age field.
    """
    return self.__checksum
      
  def _set_checksum(self, v, load=False):
    """
    Setter method for checksum, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/state/checksum (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_checksum is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_checksum() directly.

    YANG Description: The checksum of the complete contents of the LSA excluding
the age field.
    """
    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="checksum", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """checksum 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="checksum", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__checksum = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_checksum(self):
    self.__checksum = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="checksum", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_age(self):
    """
    Getter method for age, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/state/age (uint16)

    YANG Description: The time since the LSA's generation in seconds
    """
    return self.__age
      
  def _set_age(self, v, load=False):
    """
    Setter method for age, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/state/age (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_age is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_age() directly.

    YANG Description: The time since the LSA's generation in seconds
    """
    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="age", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """age 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="age", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__age = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_age(self):
    self.__age = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="age", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  link_state_id = __builtin__.property(_get_link_state_id)
  advertising_router = __builtin__.property(_get_advertising_router)
  sequence_number = __builtin__.property(_get_sequence_number)
  checksum = __builtin__.property(_get_checksum)
  age = __builtin__.property(_get_age)


  _pyangbind_elements = OrderedDict([('link_state_id', link_state_id), ('advertising_router', advertising_router), ('sequence_number', sequence_number), ('checksum', checksum), ('age', age), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_router_lsa_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/router-lsa/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of the router LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__link_id','__link_data','__metric','__number_links','__number_tos_metrics',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'ROUTER_LSA_P2P': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ROUTER_LSA_P2P': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ROUTER_LSA_P2P': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'ROUTER_LSA_TRANSIT_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ROUTER_LSA_TRANSIT_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ROUTER_LSA_TRANSIT_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'ROUTER_LSA_STUB_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ROUTER_LSA_STUB_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ROUTER_LSA_STUB_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'ROUTER_LSA_VIRTUAL_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ROUTER_LSA_VIRTUAL_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ROUTER_LSA_VIRTUAL_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__link_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="link-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)
    self.__link_data = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}),RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),], is_leaf=True, yang_name="link-data", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', is_config=False)
    self.__number_links = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number-links", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__number_tos_metrics = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number-tos-metrics", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'router-lsa', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/router_lsa/state/type (identityref)

    YANG Description: The sub-type of the Router LSA.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/router_lsa/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: The sub-type of the Router LSA.
    """
    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={'ROUTER_LSA_P2P': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ROUTER_LSA_P2P': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ROUTER_LSA_P2P': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'ROUTER_LSA_TRANSIT_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ROUTER_LSA_TRANSIT_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ROUTER_LSA_TRANSIT_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'ROUTER_LSA_STUB_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ROUTER_LSA_STUB_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ROUTER_LSA_STUB_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'ROUTER_LSA_VIRTUAL_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ROUTER_LSA_VIRTUAL_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ROUTER_LSA_VIRTUAL_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ROUTER_LSA_P2P': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ROUTER_LSA_P2P': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ROUTER_LSA_P2P': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'ROUTER_LSA_TRANSIT_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ROUTER_LSA_TRANSIT_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ROUTER_LSA_TRANSIT_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'ROUTER_LSA_STUB_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ROUTER_LSA_STUB_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ROUTER_LSA_STUB_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'ROUTER_LSA_VIRTUAL_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ROUTER_LSA_VIRTUAL_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ROUTER_LSA_VIRTUAL_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-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/network-instance', defining_module='openconfig-network-instance', 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={'ROUTER_LSA_P2P': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ROUTER_LSA_P2P': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ROUTER_LSA_P2P': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'ROUTER_LSA_TRANSIT_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ROUTER_LSA_TRANSIT_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ROUTER_LSA_TRANSIT_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'ROUTER_LSA_STUB_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ROUTER_LSA_STUB_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ROUTER_LSA_STUB_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'ROUTER_LSA_VIRTUAL_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ROUTER_LSA_VIRTUAL_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ROUTER_LSA_VIRTUAL_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_link_id(self):
    """
    Getter method for link_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/router_lsa/state/link_id (yang:dotted-quad)

    YANG Description: The identifier for the link specified. The value of the link
identifier is dependent upon the type of the LSA. The value is
specified to be, per sub-type:
 1) Neighbouring router's router ID.
 2) IP address of DR.
 3) IP network address.
 4) Neighbouring router router's ID.
    """
    return self.__link_id
      
  def _set_link_id(self, v, load=False):
    """
    Setter method for link_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/router_lsa/state/link_id (yang:dotted-quad)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_id() directly.

    YANG Description: The identifier for the link specified. The value of the link
identifier is dependent upon the type of the LSA. The value is
specified to be, per sub-type:
 1) Neighbouring router's router ID.
 2) IP address of DR.
 3) IP network address.
 4) Neighbouring router router's ID.
    """
    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][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="link-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_id must be of a type compatible with yang:dotted-quad""",
          'defined-type': "yang:dotted-quad",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="link-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)""",
        })

    self.__link_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_id(self):
    self.__link_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="link-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)


  def _get_link_data(self):
    """
    Getter method for link_data, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/router_lsa/state/link_data (union)

    YANG Description: The data associated with the link type. The value is
dependent upon the subtype of the LSA. When the connection is
to a stub network it represents the mask; for p2p connections
that are unnumbered it represents the ifIndex value of the
router's interface; for all other connections it represents
the local system's IP address
    """
    return self.__link_data
      
  def _set_link_data(self, v, load=False):
    """
    Setter method for link_data, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/router_lsa/state/link_data (union)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_data is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_data() directly.

    YANG Description: The data associated with the link type. The value is
dependent upon the subtype of the LSA. When the connection is
to a stub network it represents the mask; for p2p connections
that are unnumbered it represents the ifIndex value of the
router's interface; for all other connections it represents
the local system's IP address
    """
    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][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}),RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),], is_leaf=True, yang_name="link-data", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_data must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}),RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),], is_leaf=True, yang_name="link-data", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)""",
        })

    self.__link_data = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_data(self):
    self.__link_data = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}),RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),], is_leaf=True, yang_name="link-data", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)


  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/router_lsa/state/metric (oc-ospf-types:ospf-metric)

    YANG Description: The cost of utilising the link specified independent of TOS
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/router_lsa/state/metric (oc-ospf-types:ospf-metric)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: The cost of utilising the link specified independent of TOS
    """
    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="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric must be of a type compatible with oc-ospf-types:ospf-metric""",
          'defined-type': "oc-ospf-types:ospf-metric",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', is_config=False)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', is_config=False)


  def _get_number_links(self):
    """
    Getter method for number_links, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/router_lsa/state/number_links (uint16)

    YANG Description: The number of links that are described within the LSA
    """
    return self.__number_links
      
  def _set_number_links(self, v, load=False):
    """
    Setter method for number_links, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/router_lsa/state/number_links (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_number_links is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_number_links() directly.

    YANG Description: The number of links that are described within the LSA
    """
    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="number-links", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """number_links 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="number-links", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__number_links = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_number_links(self):
    self.__number_links = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number-links", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_number_tos_metrics(self):
    """
    Getter method for number_tos_metrics, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/router_lsa/state/number_tos_metrics (uint16)

    YANG Description: The number of different TOS metrics given for this link, not
including the link metric (which is referred to as TOS 0).
    """
    return self.__number_tos_metrics
      
  def _set_number_tos_metrics(self, v, load=False):
    """
    Setter method for number_tos_metrics, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/router_lsa/state/number_tos_metrics (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_number_tos_metrics is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_number_tos_metrics() directly.

    YANG Description: The number of different TOS metrics given for this link, not
including the link metric (which is referred to as TOS 0).
    """
    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="number-tos-metrics", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """number_tos_metrics 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="number-tos-metrics", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__number_tos_metrics = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_number_tos_metrics(self):
    self.__number_tos_metrics = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number-tos-metrics", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  type = __builtin__.property(_get_type)
  link_id = __builtin__.property(_get_link_id)
  link_data = __builtin__.property(_get_link_data)
  metric = __builtin__.property(_get_metric)
  number_links = __builtin__.property(_get_number_links)
  number_tos_metrics = __builtin__.property(_get_number_tos_metrics)


  _pyangbind_elements = OrderedDict([('type', type), ('link_id', link_id), ('link_data', link_data), ('metric', metric), ('number_links', number_links), ('number_tos_metrics', number_tos_metrics), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_router_lsa_types_of_service_type_of_service_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/router-lsa/types-of-service/type-of-service/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Per-TOS parameters for the LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__tos','__metric',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__tos = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="tos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'router-lsa', 'types-of-service', 'type-of-service', 'state']

  def _get_tos(self):
    """
    Getter method for tos, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/router_lsa/types_of_service/type_of_service/state/tos (uint8)

    YANG Description: OSPF encoding of the type of service referred to by this
LSA. Encoding for OSPF TOS are described in RFC2328.
    """
    return self.__tos
      
  def _set_tos(self, v, load=False):
    """
    Setter method for tos, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/router_lsa/types_of_service/type_of_service/state/tos (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tos is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tos() directly.

    YANG Description: OSPF encoding of the type of service referred to by this
LSA. Encoding for OSPF TOS are described in RFC2328.
    """
    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="tos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tos 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="tos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__tos = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tos(self):
    self.__tos = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="tos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/router_lsa/types_of_service/type_of_service/state/metric (oc-ospf-types:ospf-metric)

    YANG Description: The metric value to be used for the TOS specified. This value
represents the cost of use of the link for the specific type
of service.
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/router_lsa/types_of_service/type_of_service/state/metric (oc-ospf-types:ospf-metric)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: The metric value to be used for the TOS specified. This value
represents the cost of use of the link for the specific type
of service.
    """
    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="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric must be of a type compatible with oc-ospf-types:ospf-metric""",
          'defined-type': "oc-ospf-types:ospf-metric",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', is_config=False)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', is_config=False)

  tos = __builtin__.property(_get_tos)
  metric = __builtin__.property(_get_metric)


  _pyangbind_elements = OrderedDict([('tos', tos), ('metric', metric), ])


class yc_type_of_service_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_router_lsa_types_of_service_type_of_service(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/router-lsa/types-of-service/type-of-service. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Per-type of service parameters for the LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__tos','__state',)

  _yang_name = 'type-of-service'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__tos = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_router_lsa_types_of_service_type_of_service_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'router-lsa', 'types-of-service', 'type-of-service']

  def _get_tos(self):
    """
    Getter method for tos, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/router_lsa/types_of_service/type_of_service/tos (leafref)

    YANG Description: Reference to the type of service identifier which is
specified in the LSA
    """
    return self.__tos
      
  def _set_tos(self, v, load=False):
    """
    Setter method for tos, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/router_lsa/types_of_service/type_of_service/tos (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tos is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tos() directly.

    YANG Description: Reference to the type of service identifier which is
specified in the LSA
    """
    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="tos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tos must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__tos = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tos(self):
    self.__tos = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/router_lsa/types_of_service/type_of_service/state (container)

    YANG Description: Per-TOS parameters for the LSA
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/router_lsa/types_of_service/type_of_service/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: Per-TOS parameters for the LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_router_lsa_types_of_service_type_of_service_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_router_lsa_types_of_service_type_of_service_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_router_lsa_types_of_service_type_of_service_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  tos = __builtin__.property(_get_tos)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('tos', tos), ('state', state), ])


class yc_types_of_service_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_router_lsa_types_of_service(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/router-lsa/types-of-service. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Breakdown of LSA contents specifying multiple
TOS values
  """
  __slots__ = ('_path_helper', '_extmethods', '__type_of_service',)

  _yang_name = 'types-of-service'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type_of_service = YANGDynClass(base=YANGListType("tos",yc_type_of_service_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_router_lsa_types_of_service_type_of_service, yang_name="type-of-service", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tos', extensions=None), is_container='list', yang_name="type-of-service", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'router-lsa', 'types-of-service']

  def _get_type_of_service(self):
    """
    Getter method for type_of_service, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/router_lsa/types_of_service/type_of_service (list)

    YANG Description: Per-type of service parameters for the LSA
    """
    return self.__type_of_service
      
  def _set_type_of_service(self, v, load=False):
    """
    Setter method for type_of_service, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/router_lsa/types_of_service/type_of_service (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type_of_service is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type_of_service() directly.

    YANG Description: Per-type of service parameters for the LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("tos",yc_type_of_service_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_router_lsa_types_of_service_type_of_service, yang_name="type-of-service", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tos', extensions=None), is_container='list', yang_name="type-of-service", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type_of_service must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("tos",yc_type_of_service_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_router_lsa_types_of_service_type_of_service, yang_name="type-of-service", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tos', extensions=None), is_container='list', yang_name="type-of-service", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__type_of_service = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type_of_service(self):
    self.__type_of_service = YANGDynClass(base=YANGListType("tos",yc_type_of_service_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_router_lsa_types_of_service_type_of_service, yang_name="type-of-service", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tos', extensions=None), is_container='list', yang_name="type-of-service", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  type_of_service = __builtin__.property(_get_type_of_service)


  _pyangbind_elements = OrderedDict([('type_of_service', type_of_service), ])


class yc_router_lsa_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_router_lsa(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/router-lsa. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Contents of the router LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__state','__types_of_service',)

  _yang_name = 'router-lsa'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_router_lsa_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__types_of_service = YANGDynClass(base=yc_types_of_service_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_router_lsa_types_of_service, is_container='container', yang_name="types-of-service", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'router-lsa']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/router_lsa/state (container)

    YANG Description: State parameters of the router LSA
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/router_lsa/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 parameters of the router LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_router_lsa_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_router_lsa_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_router_lsa_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_types_of_service(self):
    """
    Getter method for types_of_service, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/router_lsa/types_of_service (container)

    YANG Description: Breakdown of LSA contents specifying multiple
TOS values
    """
    return self.__types_of_service
      
  def _set_types_of_service(self, v, load=False):
    """
    Setter method for types_of_service, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/router_lsa/types_of_service (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_types_of_service is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_types_of_service() directly.

    YANG Description: Breakdown of LSA contents specifying multiple
TOS values
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_types_of_service_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_router_lsa_types_of_service, is_container='container', yang_name="types-of-service", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """types_of_service must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_types_of_service_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_router_lsa_types_of_service, is_container='container', yang_name="types-of-service", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__types_of_service = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_types_of_service(self):
    self.__types_of_service = YANGDynClass(base=yc_types_of_service_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_router_lsa_types_of_service, is_container='container', yang_name="types-of-service", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)
  types_of_service = __builtin__.property(_get_types_of_service)


  _pyangbind_elements = OrderedDict([('state', state), ('types_of_service', types_of_service), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_network_lsa_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/network-lsa/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of the network LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__network_mask','__attached_router',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__network_mask = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..32']}), is_leaf=True, yang_name="network-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__attached_router = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'})), is_leaf=False, yang_name="attached-router", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'network-lsa', 'state']

  def _get_network_mask(self):
    """
    Getter method for network_mask, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/network_lsa/state/network_mask (uint8)

    YANG Description: The mask of the network described by the Network LSA
represented as a CIDR mask.
    """
    return self.__network_mask
      
  def _set_network_mask(self, v, load=False):
    """
    Setter method for network_mask, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/network_lsa/state/network_mask (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_network_mask is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_network_mask() directly.

    YANG Description: The mask of the network described by the Network LSA
represented as a CIDR mask.
    """
    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..32']}), is_leaf=True, yang_name="network-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """network_mask 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..32']}), is_leaf=True, yang_name="network-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__network_mask = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_network_mask(self):
    self.__network_mask = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..32']}), is_leaf=True, yang_name="network-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_attached_router(self):
    """
    Getter method for attached_router, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/network_lsa/state/attached_router (yang:dotted-quad)

    YANG Description: A list of the router ID of the routers that are attached to
the network described by the Network LSA
    """
    return self.__attached_router
      
  def _set_attached_router(self, v, load=False):
    """
    Setter method for attached_router, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/network_lsa/state/attached_router (yang:dotted-quad)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attached_router is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attached_router() directly.

    YANG Description: A list of the router ID of the routers that are attached to
the network described by the Network LSA
    """
    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_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'})), is_leaf=False, yang_name="attached-router", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attached_router must be of a type compatible with yang:dotted-quad""",
          'defined-type': "yang:dotted-quad",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'})), is_leaf=False, yang_name="attached-router", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)""",
        })

    self.__attached_router = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attached_router(self):
    self.__attached_router = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'})), is_leaf=False, yang_name="attached-router", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)

  network_mask = __builtin__.property(_get_network_mask)
  attached_router = __builtin__.property(_get_attached_router)


  _pyangbind_elements = OrderedDict([('network_mask', network_mask), ('attached_router', attached_router), ])


class yc_network_lsa_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_network_lsa(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/network-lsa. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Contents of the network LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'network-lsa'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_network_lsa_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'network-lsa']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/network_lsa/state (container)

    YANG Description: State parameters of the network LSA
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/network_lsa/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 parameters of the network LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_network_lsa_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_network_lsa_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_network_lsa_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_summary_lsa_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/summary-lsa/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of the summary LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__network_mask',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__network_mask = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..32']}), is_leaf=True, yang_name="network-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'summary-lsa', 'state']

  def _get_network_mask(self):
    """
    Getter method for network_mask, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/summary_lsa/state/network_mask (uint8)

    YANG Description: The mask of the network described by the Summary LSA
represented as a CIDR mask.
    """
    return self.__network_mask
      
  def _set_network_mask(self, v, load=False):
    """
    Setter method for network_mask, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/summary_lsa/state/network_mask (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_network_mask is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_network_mask() directly.

    YANG Description: The mask of the network described by the Summary LSA
represented as a CIDR mask.
    """
    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..32']}), is_leaf=True, yang_name="network-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """network_mask 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..32']}), is_leaf=True, yang_name="network-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__network_mask = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_network_mask(self):
    self.__network_mask = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..32']}), is_leaf=True, yang_name="network-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)

  network_mask = __builtin__.property(_get_network_mask)


  _pyangbind_elements = OrderedDict([('network_mask', network_mask), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_summary_lsa_types_of_service_type_of_service_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/summary-lsa/types-of-service/type-of-service/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Per-TOS parameters for the LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__tos','__metric',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__tos = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="tos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'summary-lsa', 'types-of-service', 'type-of-service', 'state']

  def _get_tos(self):
    """
    Getter method for tos, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/summary_lsa/types_of_service/type_of_service/state/tos (uint8)

    YANG Description: OSPF encoding of the type of service referred to by this
LSA. Encoding for OSPF TOS are described in RFC2328.
    """
    return self.__tos
      
  def _set_tos(self, v, load=False):
    """
    Setter method for tos, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/summary_lsa/types_of_service/type_of_service/state/tos (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tos is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tos() directly.

    YANG Description: OSPF encoding of the type of service referred to by this
LSA. Encoding for OSPF TOS are described in RFC2328.
    """
    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="tos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tos 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="tos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__tos = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tos(self):
    self.__tos = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="tos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/summary_lsa/types_of_service/type_of_service/state/metric (oc-ospf-types:ospf-metric)

    YANG Description: The metric value to be used for the TOS specified. This value
represents the cost of use of the link for the specific type
of service.
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/summary_lsa/types_of_service/type_of_service/state/metric (oc-ospf-types:ospf-metric)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: The metric value to be used for the TOS specified. This value
represents the cost of use of the link for the specific type
of service.
    """
    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="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric must be of a type compatible with oc-ospf-types:ospf-metric""",
          'defined-type': "oc-ospf-types:ospf-metric",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', is_config=False)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', is_config=False)

  tos = __builtin__.property(_get_tos)
  metric = __builtin__.property(_get_metric)


  _pyangbind_elements = OrderedDict([('tos', tos), ('metric', metric), ])


class yc_type_of_service_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_summary_lsa_types_of_service_type_of_service(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/summary-lsa/types-of-service/type-of-service. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Per-type of service parameters for the LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__tos','__state',)

  _yang_name = 'type-of-service'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__tos = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_summary_lsa_types_of_service_type_of_service_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'summary-lsa', 'types-of-service', 'type-of-service']

  def _get_tos(self):
    """
    Getter method for tos, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/summary_lsa/types_of_service/type_of_service/tos (leafref)

    YANG Description: Reference to the type of service identifier which is
specified in the LSA
    """
    return self.__tos
      
  def _set_tos(self, v, load=False):
    """
    Setter method for tos, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/summary_lsa/types_of_service/type_of_service/tos (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tos is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tos() directly.

    YANG Description: Reference to the type of service identifier which is
specified in the LSA
    """
    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="tos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tos must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__tos = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tos(self):
    self.__tos = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/summary_lsa/types_of_service/type_of_service/state (container)

    YANG Description: Per-TOS parameters for the LSA
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/summary_lsa/types_of_service/type_of_service/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: Per-TOS parameters for the LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_summary_lsa_types_of_service_type_of_service_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_summary_lsa_types_of_service_type_of_service_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_summary_lsa_types_of_service_type_of_service_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  tos = __builtin__.property(_get_tos)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('tos', tos), ('state', state), ])


class yc_types_of_service_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_summary_lsa_types_of_service(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/summary-lsa/types-of-service. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Breakdown of LSA contents specifying multiple
TOS values
  """
  __slots__ = ('_path_helper', '_extmethods', '__type_of_service',)

  _yang_name = 'types-of-service'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type_of_service = YANGDynClass(base=YANGListType("tos",yc_type_of_service_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_summary_lsa_types_of_service_type_of_service, yang_name="type-of-service", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tos', extensions=None), is_container='list', yang_name="type-of-service", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'summary-lsa', 'types-of-service']

  def _get_type_of_service(self):
    """
    Getter method for type_of_service, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/summary_lsa/types_of_service/type_of_service (list)

    YANG Description: Per-type of service parameters for the LSA
    """
    return self.__type_of_service
      
  def _set_type_of_service(self, v, load=False):
    """
    Setter method for type_of_service, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/summary_lsa/types_of_service/type_of_service (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type_of_service is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type_of_service() directly.

    YANG Description: Per-type of service parameters for the LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("tos",yc_type_of_service_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_summary_lsa_types_of_service_type_of_service, yang_name="type-of-service", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tos', extensions=None), is_container='list', yang_name="type-of-service", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type_of_service must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("tos",yc_type_of_service_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_summary_lsa_types_of_service_type_of_service, yang_name="type-of-service", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tos', extensions=None), is_container='list', yang_name="type-of-service", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__type_of_service = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type_of_service(self):
    self.__type_of_service = YANGDynClass(base=YANGListType("tos",yc_type_of_service_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_summary_lsa_types_of_service_type_of_service, yang_name="type-of-service", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tos', extensions=None), is_container='list', yang_name="type-of-service", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  type_of_service = __builtin__.property(_get_type_of_service)


  _pyangbind_elements = OrderedDict([('type_of_service', type_of_service), ])


class yc_summary_lsa_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_summary_lsa(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/summary-lsa. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Contents of the summary LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__state','__types_of_service',)

  _yang_name = 'summary-lsa'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_summary_lsa_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__types_of_service = YANGDynClass(base=yc_types_of_service_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_summary_lsa_types_of_service, is_container='container', yang_name="types-of-service", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'summary-lsa']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/summary_lsa/state (container)

    YANG Description: State parameters of the summary LSA
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/summary_lsa/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 parameters of the summary LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_summary_lsa_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_summary_lsa_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_summary_lsa_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_types_of_service(self):
    """
    Getter method for types_of_service, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/summary_lsa/types_of_service (container)

    YANG Description: Breakdown of LSA contents specifying multiple
TOS values
    """
    return self.__types_of_service
      
  def _set_types_of_service(self, v, load=False):
    """
    Setter method for types_of_service, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/summary_lsa/types_of_service (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_types_of_service is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_types_of_service() directly.

    YANG Description: Breakdown of LSA contents specifying multiple
TOS values
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_types_of_service_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_summary_lsa_types_of_service, is_container='container', yang_name="types-of-service", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """types_of_service must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_types_of_service_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_summary_lsa_types_of_service, is_container='container', yang_name="types-of-service", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__types_of_service = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_types_of_service(self):
    self.__types_of_service = YANGDynClass(base=yc_types_of_service_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_summary_lsa_types_of_service, is_container='container', yang_name="types-of-service", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)
  types_of_service = __builtin__.property(_get_types_of_service)


  _pyangbind_elements = OrderedDict([('state', state), ('types_of_service', types_of_service), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_as_external_lsa_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/as-external-lsa/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters for the AS external LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__mask','__metric_type','__metric','__forwarding_address','__external_route_tag',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__mask = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..32']}), is_leaf=True, yang_name="mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TYPE_1': {}, 'TYPE_2': {}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', is_config=False)
    self.__forwarding_address = YANGDynClass(base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="forwarding-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)
    self.__external_route_tag = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="external-route-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'as-external-lsa', 'state']

  def _get_mask(self):
    """
    Getter method for mask, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/as_external_lsa/state/mask (uint8)

    YANG Description: The subnet mask for the advertised destination
    """
    return self.__mask
      
  def _set_mask(self, v, load=False):
    """
    Setter method for mask, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/as_external_lsa/state/mask (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mask is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mask() directly.

    YANG Description: The subnet mask for the advertised destination
    """
    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..32']}), is_leaf=True, yang_name="mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mask 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..32']}), is_leaf=True, yang_name="mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__mask = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mask(self):
    self.__mask = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..32']}), is_leaf=True, yang_name="mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_metric_type(self):
    """
    Getter method for metric_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/as_external_lsa/state/metric_type (enumeration)

    YANG Description: The type of metric included within the AS External LSA.
    """
    return self.__metric_type
      
  def _set_metric_type(self, v, load=False):
    """
    Setter method for metric_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/as_external_lsa/state/metric_type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric_type() directly.

    YANG Description: The type of metric included within the AS External LSA.
    """
    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={'TYPE_1': {}, 'TYPE_2': {}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric_type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TYPE_1': {}, 'TYPE_2': {}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__metric_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric_type(self):
    self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TYPE_1': {}, 'TYPE_2': {}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/as_external_lsa/state/metric (oc-ospf-types:ospf-metric)

    YANG Description: The cost to reach the external network specified. The exact
interpretation of this cost is dependent on the type of
metric specified
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/as_external_lsa/state/metric (oc-ospf-types:ospf-metric)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: The cost to reach the external network specified. The exact
interpretation of this cost is dependent on the type of
metric specified
    """
    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="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric must be of a type compatible with oc-ospf-types:ospf-metric""",
          'defined-type': "oc-ospf-types:ospf-metric",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', is_config=False)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', is_config=False)


  def _get_forwarding_address(self):
    """
    Getter method for forwarding_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/as_external_lsa/state/forwarding_address (inet:ipv4-address-no-zone)

    YANG Description: The destination to which traffic for the external prefix
should be advertised. When this value is set to 0.0.0.0 then
traffic should be forwarded to the LSA's originator
    """
    return self.__forwarding_address
      
  def _set_forwarding_address(self, v, load=False):
    """
    Setter method for forwarding_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/as_external_lsa/state/forwarding_address (inet:ipv4-address-no-zone)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_forwarding_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_forwarding_address() directly.

    YANG Description: The destination to which traffic for the external prefix
should be advertised. When this value is set to 0.0.0.0 then
traffic should be forwarded to the LSA's originator
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="forwarding-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """forwarding_address must be of a type compatible with inet:ipv4-address-no-zone""",
          'defined-type': "inet:ipv4-address-no-zone",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="forwarding-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)""",
        })

    self.__forwarding_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_forwarding_address(self):
    self.__forwarding_address = YANGDynClass(base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="forwarding-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)


  def _get_external_route_tag(self):
    """
    Getter method for external_route_tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/as_external_lsa/state/external_route_tag (uint32)

    YANG Description: An opaque tag that set by the LSA originator to carry
information relating to the external route
    """
    return self.__external_route_tag
      
  def _set_external_route_tag(self, v, load=False):
    """
    Setter method for external_route_tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/as_external_lsa/state/external_route_tag (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_external_route_tag is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_external_route_tag() directly.

    YANG Description: An opaque tag that set by the LSA originator to carry
information relating to the external route
    """
    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="external-route-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """external_route_tag 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="external-route-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__external_route_tag = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_external_route_tag(self):
    self.__external_route_tag = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="external-route-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  mask = __builtin__.property(_get_mask)
  metric_type = __builtin__.property(_get_metric_type)
  metric = __builtin__.property(_get_metric)
  forwarding_address = __builtin__.property(_get_forwarding_address)
  external_route_tag = __builtin__.property(_get_external_route_tag)


  _pyangbind_elements = OrderedDict([('mask', mask), ('metric_type', metric_type), ('metric', metric), ('forwarding_address', forwarding_address), ('external_route_tag', external_route_tag), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_as_external_lsa_types_of_service_type_of_service_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/as-external-lsa/types-of-service/type-of-service/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Per-TOS parameters for the LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__forwarding_address','__external_route_tag','__tos','__metric',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__forwarding_address = YANGDynClass(base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="forwarding-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)
    self.__external_route_tag = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="external-route-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__tos = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="tos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'as-external-lsa', 'types-of-service', 'type-of-service', 'state']

  def _get_forwarding_address(self):
    """
    Getter method for forwarding_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/as_external_lsa/types_of_service/type_of_service/state/forwarding_address (inet:ipv4-address-no-zone)

    YANG Description: The destination to which traffic for the external prefix
should be advertised. When this value is set to 0.0.0.0 then
traffic should be forwarded to the LSA's originator
    """
    return self.__forwarding_address
      
  def _set_forwarding_address(self, v, load=False):
    """
    Setter method for forwarding_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/as_external_lsa/types_of_service/type_of_service/state/forwarding_address (inet:ipv4-address-no-zone)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_forwarding_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_forwarding_address() directly.

    YANG Description: The destination to which traffic for the external prefix
should be advertised. When this value is set to 0.0.0.0 then
traffic should be forwarded to the LSA's originator
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="forwarding-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """forwarding_address must be of a type compatible with inet:ipv4-address-no-zone""",
          'defined-type': "inet:ipv4-address-no-zone",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="forwarding-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)""",
        })

    self.__forwarding_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_forwarding_address(self):
    self.__forwarding_address = YANGDynClass(base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="forwarding-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)


  def _get_external_route_tag(self):
    """
    Getter method for external_route_tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/as_external_lsa/types_of_service/type_of_service/state/external_route_tag (uint32)

    YANG Description: An opaque tag that set by the LSA originator to carry
information relating to the external route
    """
    return self.__external_route_tag
      
  def _set_external_route_tag(self, v, load=False):
    """
    Setter method for external_route_tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/as_external_lsa/types_of_service/type_of_service/state/external_route_tag (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_external_route_tag is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_external_route_tag() directly.

    YANG Description: An opaque tag that set by the LSA originator to carry
information relating to the external route
    """
    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="external-route-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """external_route_tag 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="external-route-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__external_route_tag = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_external_route_tag(self):
    self.__external_route_tag = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="external-route-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_tos(self):
    """
    Getter method for tos, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/as_external_lsa/types_of_service/type_of_service/state/tos (uint8)

    YANG Description: OSPF encoding of the type of service referred to by this
LSA. Encoding for OSPF TOS are described in RFC2328.
    """
    return self.__tos
      
  def _set_tos(self, v, load=False):
    """
    Setter method for tos, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/as_external_lsa/types_of_service/type_of_service/state/tos (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tos is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tos() directly.

    YANG Description: OSPF encoding of the type of service referred to by this
LSA. Encoding for OSPF TOS are described in RFC2328.
    """
    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="tos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tos 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="tos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__tos = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tos(self):
    self.__tos = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="tos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/as_external_lsa/types_of_service/type_of_service/state/metric (oc-ospf-types:ospf-metric)

    YANG Description: The metric value to be used for the TOS specified. This value
represents the cost of use of the link for the specific type
of service.
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/as_external_lsa/types_of_service/type_of_service/state/metric (oc-ospf-types:ospf-metric)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: The metric value to be used for the TOS specified. This value
represents the cost of use of the link for the specific type
of service.
    """
    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="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric must be of a type compatible with oc-ospf-types:ospf-metric""",
          'defined-type': "oc-ospf-types:ospf-metric",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', is_config=False)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', is_config=False)

  forwarding_address = __builtin__.property(_get_forwarding_address)
  external_route_tag = __builtin__.property(_get_external_route_tag)
  tos = __builtin__.property(_get_tos)
  metric = __builtin__.property(_get_metric)


  _pyangbind_elements = OrderedDict([('forwarding_address', forwarding_address), ('external_route_tag', external_route_tag), ('tos', tos), ('metric', metric), ])


class yc_type_of_service_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_as_external_lsa_types_of_service_type_of_service(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/as-external-lsa/types-of-service/type-of-service. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Per-type of service parameters for the AS External LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__tos','__state',)

  _yang_name = 'type-of-service'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__tos = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_as_external_lsa_types_of_service_type_of_service_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'as-external-lsa', 'types-of-service', 'type-of-service']

  def _get_tos(self):
    """
    Getter method for tos, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/as_external_lsa/types_of_service/type_of_service/tos (leafref)

    YANG Description: Reference to the type of service identifier which is
specified in the AS External LSA
    """
    return self.__tos
      
  def _set_tos(self, v, load=False):
    """
    Setter method for tos, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/as_external_lsa/types_of_service/type_of_service/tos (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tos is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tos() directly.

    YANG Description: Reference to the type of service identifier which is
specified in the AS External LSA
    """
    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="tos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tos must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__tos = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tos(self):
    self.__tos = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/as_external_lsa/types_of_service/type_of_service/state (container)

    YANG Description: Per-TOS parameters for the LSA
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/as_external_lsa/types_of_service/type_of_service/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: Per-TOS parameters for the LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_as_external_lsa_types_of_service_type_of_service_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_as_external_lsa_types_of_service_type_of_service_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_as_external_lsa_types_of_service_type_of_service_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  tos = __builtin__.property(_get_tos)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('tos', tos), ('state', state), ])


class yc_types_of_service_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_as_external_lsa_types_of_service(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/as-external-lsa/types-of-service. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Breakdown of External LSA contents specifying multiple
TOS values
  """
  __slots__ = ('_path_helper', '_extmethods', '__type_of_service',)

  _yang_name = 'types-of-service'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type_of_service = YANGDynClass(base=YANGListType("tos",yc_type_of_service_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_as_external_lsa_types_of_service_type_of_service, yang_name="type-of-service", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tos', extensions=None), is_container='list', yang_name="type-of-service", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'as-external-lsa', 'types-of-service']

  def _get_type_of_service(self):
    """
    Getter method for type_of_service, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/as_external_lsa/types_of_service/type_of_service (list)

    YANG Description: Per-type of service parameters for the AS External LSA
    """
    return self.__type_of_service
      
  def _set_type_of_service(self, v, load=False):
    """
    Setter method for type_of_service, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/as_external_lsa/types_of_service/type_of_service (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type_of_service is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type_of_service() directly.

    YANG Description: Per-type of service parameters for the AS External LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("tos",yc_type_of_service_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_as_external_lsa_types_of_service_type_of_service, yang_name="type-of-service", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tos', extensions=None), is_container='list', yang_name="type-of-service", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type_of_service must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("tos",yc_type_of_service_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_as_external_lsa_types_of_service_type_of_service, yang_name="type-of-service", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tos', extensions=None), is_container='list', yang_name="type-of-service", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__type_of_service = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type_of_service(self):
    self.__type_of_service = YANGDynClass(base=YANGListType("tos",yc_type_of_service_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_as_external_lsa_types_of_service_type_of_service, yang_name="type-of-service", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tos', extensions=None), is_container='list', yang_name="type-of-service", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  type_of_service = __builtin__.property(_get_type_of_service)


  _pyangbind_elements = OrderedDict([('type_of_service', type_of_service), ])


class yc_as_external_lsa_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_as_external_lsa(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/as-external-lsa. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Contents of the AS External LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__state','__types_of_service',)

  _yang_name = 'as-external-lsa'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_as_external_lsa_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__types_of_service = YANGDynClass(base=yc_types_of_service_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_as_external_lsa_types_of_service, is_container='container', yang_name="types-of-service", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'as-external-lsa']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/as_external_lsa/state (container)

    YANG Description: State parameters for the AS external LSA
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/as_external_lsa/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 parameters for the AS external LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_as_external_lsa_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_as_external_lsa_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_as_external_lsa_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_types_of_service(self):
    """
    Getter method for types_of_service, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/as_external_lsa/types_of_service (container)

    YANG Description: Breakdown of External LSA contents specifying multiple
TOS values
    """
    return self.__types_of_service
      
  def _set_types_of_service(self, v, load=False):
    """
    Setter method for types_of_service, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/as_external_lsa/types_of_service (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_types_of_service is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_types_of_service() directly.

    YANG Description: Breakdown of External LSA contents specifying multiple
TOS values
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_types_of_service_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_as_external_lsa_types_of_service, is_container='container', yang_name="types-of-service", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """types_of_service must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_types_of_service_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_as_external_lsa_types_of_service, is_container='container', yang_name="types-of-service", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__types_of_service = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_types_of_service(self):
    self.__types_of_service = YANGDynClass(base=yc_types_of_service_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_as_external_lsa_types_of_service, is_container='container', yang_name="types-of-service", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)
  types_of_service = __builtin__.property(_get_types_of_service)


  _pyangbind_elements = OrderedDict([('state', state), ('types_of_service', types_of_service), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_nssa_external_lsa_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/nssa-external-lsa/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters for the AS external LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__mask','__metric_type','__metric','__forwarding_address','__external_route_tag','__propagate',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__mask = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..32']}), is_leaf=True, yang_name="mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TYPE_1': {}, 'TYPE_2': {}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', is_config=False)
    self.__forwarding_address = YANGDynClass(base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="forwarding-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)
    self.__external_route_tag = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="external-route-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__propagate = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="propagate", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'nssa-external-lsa', 'state']

  def _get_mask(self):
    """
    Getter method for mask, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/nssa_external_lsa/state/mask (uint8)

    YANG Description: The subnet mask for the advertised destination
    """
    return self.__mask
      
  def _set_mask(self, v, load=False):
    """
    Setter method for mask, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/nssa_external_lsa/state/mask (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mask is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mask() directly.

    YANG Description: The subnet mask for the advertised destination
    """
    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..32']}), is_leaf=True, yang_name="mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mask 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..32']}), is_leaf=True, yang_name="mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__mask = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mask(self):
    self.__mask = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..32']}), is_leaf=True, yang_name="mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_metric_type(self):
    """
    Getter method for metric_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/nssa_external_lsa/state/metric_type (enumeration)

    YANG Description: The type of metric included within the AS External LSA.
    """
    return self.__metric_type
      
  def _set_metric_type(self, v, load=False):
    """
    Setter method for metric_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/nssa_external_lsa/state/metric_type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric_type() directly.

    YANG Description: The type of metric included within the AS External LSA.
    """
    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={'TYPE_1': {}, 'TYPE_2': {}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric_type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TYPE_1': {}, 'TYPE_2': {}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__metric_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric_type(self):
    self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TYPE_1': {}, 'TYPE_2': {}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/nssa_external_lsa/state/metric (oc-ospf-types:ospf-metric)

    YANG Description: The cost to reach the external network specified. The exact
interpretation of this cost is dependent on the type of
metric specified
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/nssa_external_lsa/state/metric (oc-ospf-types:ospf-metric)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: The cost to reach the external network specified. The exact
interpretation of this cost is dependent on the type of
metric specified
    """
    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="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric must be of a type compatible with oc-ospf-types:ospf-metric""",
          'defined-type': "oc-ospf-types:ospf-metric",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', is_config=False)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', is_config=False)


  def _get_forwarding_address(self):
    """
    Getter method for forwarding_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/nssa_external_lsa/state/forwarding_address (inet:ipv4-address-no-zone)

    YANG Description: The destination to which traffic for the external prefix
should be advertised. When this value is set to 0.0.0.0 then
traffic should be forwarded to the LSA's originator
    """
    return self.__forwarding_address
      
  def _set_forwarding_address(self, v, load=False):
    """
    Setter method for forwarding_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/nssa_external_lsa/state/forwarding_address (inet:ipv4-address-no-zone)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_forwarding_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_forwarding_address() directly.

    YANG Description: The destination to which traffic for the external prefix
should be advertised. When this value is set to 0.0.0.0 then
traffic should be forwarded to the LSA's originator
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="forwarding-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """forwarding_address must be of a type compatible with inet:ipv4-address-no-zone""",
          'defined-type': "inet:ipv4-address-no-zone",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="forwarding-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)""",
        })

    self.__forwarding_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_forwarding_address(self):
    self.__forwarding_address = YANGDynClass(base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="forwarding-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)


  def _get_external_route_tag(self):
    """
    Getter method for external_route_tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/nssa_external_lsa/state/external_route_tag (uint32)

    YANG Description: An opaque tag that set by the LSA originator to carry
information relating to the external route
    """
    return self.__external_route_tag
      
  def _set_external_route_tag(self, v, load=False):
    """
    Setter method for external_route_tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/nssa_external_lsa/state/external_route_tag (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_external_route_tag is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_external_route_tag() directly.

    YANG Description: An opaque tag that set by the LSA originator to carry
information relating to the external route
    """
    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="external-route-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """external_route_tag 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="external-route-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__external_route_tag = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_external_route_tag(self):
    self.__external_route_tag = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="external-route-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_propagate(self):
    """
    Getter method for propagate, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/nssa_external_lsa/state/propagate (boolean)

    YANG Description: When this bit is set to true, an NSSA border router will
translate a Type 7 LSA (NSSA External) to a Type 5 LSA
(AS External).
    """
    return self.__propagate
      
  def _set_propagate(self, v, load=False):
    """
    Setter method for propagate, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/nssa_external_lsa/state/propagate (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_propagate is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_propagate() directly.

    YANG Description: When this bit is set to true, an NSSA border router will
translate a Type 7 LSA (NSSA External) to a Type 5 LSA
(AS External).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="propagate", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """propagate must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="propagate", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__propagate = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_propagate(self):
    self.__propagate = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="propagate", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  mask = __builtin__.property(_get_mask)
  metric_type = __builtin__.property(_get_metric_type)
  metric = __builtin__.property(_get_metric)
  forwarding_address = __builtin__.property(_get_forwarding_address)
  external_route_tag = __builtin__.property(_get_external_route_tag)
  propagate = __builtin__.property(_get_propagate)


  _pyangbind_elements = OrderedDict([('mask', mask), ('metric_type', metric_type), ('metric', metric), ('forwarding_address', forwarding_address), ('external_route_tag', external_route_tag), ('propagate', propagate), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_nssa_external_lsa_types_of_service_type_of_service_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/nssa-external-lsa/types-of-service/type-of-service/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Per-TOS parameters for the LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__forwarding_address','__external_route_tag','__tos','__metric',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__forwarding_address = YANGDynClass(base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="forwarding-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)
    self.__external_route_tag = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="external-route-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__tos = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="tos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'nssa-external-lsa', 'types-of-service', 'type-of-service', 'state']

  def _get_forwarding_address(self):
    """
    Getter method for forwarding_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/nssa_external_lsa/types_of_service/type_of_service/state/forwarding_address (inet:ipv4-address-no-zone)

    YANG Description: The destination to which traffic for the external prefix
should be advertised. When this value is set to 0.0.0.0 then
traffic should be forwarded to the LSA's originator
    """
    return self.__forwarding_address
      
  def _set_forwarding_address(self, v, load=False):
    """
    Setter method for forwarding_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/nssa_external_lsa/types_of_service/type_of_service/state/forwarding_address (inet:ipv4-address-no-zone)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_forwarding_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_forwarding_address() directly.

    YANG Description: The destination to which traffic for the external prefix
should be advertised. When this value is set to 0.0.0.0 then
traffic should be forwarded to the LSA's originator
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="forwarding-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """forwarding_address must be of a type compatible with inet:ipv4-address-no-zone""",
          'defined-type': "inet:ipv4-address-no-zone",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="forwarding-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)""",
        })

    self.__forwarding_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_forwarding_address(self):
    self.__forwarding_address = YANGDynClass(base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="forwarding-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)


  def _get_external_route_tag(self):
    """
    Getter method for external_route_tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/nssa_external_lsa/types_of_service/type_of_service/state/external_route_tag (uint32)

    YANG Description: An opaque tag that set by the LSA originator to carry
information relating to the external route
    """
    return self.__external_route_tag
      
  def _set_external_route_tag(self, v, load=False):
    """
    Setter method for external_route_tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/nssa_external_lsa/types_of_service/type_of_service/state/external_route_tag (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_external_route_tag is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_external_route_tag() directly.

    YANG Description: An opaque tag that set by the LSA originator to carry
information relating to the external route
    """
    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="external-route-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """external_route_tag 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="external-route-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__external_route_tag = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_external_route_tag(self):
    self.__external_route_tag = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="external-route-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_tos(self):
    """
    Getter method for tos, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/nssa_external_lsa/types_of_service/type_of_service/state/tos (uint8)

    YANG Description: OSPF encoding of the type of service referred to by this
LSA. Encoding for OSPF TOS are described in RFC2328.
    """
    return self.__tos
      
  def _set_tos(self, v, load=False):
    """
    Setter method for tos, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/nssa_external_lsa/types_of_service/type_of_service/state/tos (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tos is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tos() directly.

    YANG Description: OSPF encoding of the type of service referred to by this
LSA. Encoding for OSPF TOS are described in RFC2328.
    """
    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="tos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tos 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="tos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__tos = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tos(self):
    self.__tos = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="tos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/nssa_external_lsa/types_of_service/type_of_service/state/metric (oc-ospf-types:ospf-metric)

    YANG Description: The metric value to be used for the TOS specified. This value
represents the cost of use of the link for the specific type
of service.
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/nssa_external_lsa/types_of_service/type_of_service/state/metric (oc-ospf-types:ospf-metric)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: The metric value to be used for the TOS specified. This value
represents the cost of use of the link for the specific type
of service.
    """
    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="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric must be of a type compatible with oc-ospf-types:ospf-metric""",
          'defined-type': "oc-ospf-types:ospf-metric",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', is_config=False)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', is_config=False)

  forwarding_address = __builtin__.property(_get_forwarding_address)
  external_route_tag = __builtin__.property(_get_external_route_tag)
  tos = __builtin__.property(_get_tos)
  metric = __builtin__.property(_get_metric)


  _pyangbind_elements = OrderedDict([('forwarding_address', forwarding_address), ('external_route_tag', external_route_tag), ('tos', tos), ('metric', metric), ])


class yc_type_of_service_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_nssa_external_lsa_types_of_service_type_of_service(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/nssa-external-lsa/types-of-service/type-of-service. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Per-type of service parameters for the NSSA external LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__tos','__state',)

  _yang_name = 'type-of-service'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__tos = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_nssa_external_lsa_types_of_service_type_of_service_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'nssa-external-lsa', 'types-of-service', 'type-of-service']

  def _get_tos(self):
    """
    Getter method for tos, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/nssa_external_lsa/types_of_service/type_of_service/tos (leafref)

    YANG Description: Reference to the type of services identifier which is specified
in the NSSA External LSA
    """
    return self.__tos
      
  def _set_tos(self, v, load=False):
    """
    Setter method for tos, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/nssa_external_lsa/types_of_service/type_of_service/tos (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tos is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tos() directly.

    YANG Description: Reference to the type of services identifier which is specified
in the NSSA External LSA
    """
    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="tos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tos must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__tos = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tos(self):
    self.__tos = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/nssa_external_lsa/types_of_service/type_of_service/state (container)

    YANG Description: Per-TOS parameters for the LSA
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/nssa_external_lsa/types_of_service/type_of_service/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: Per-TOS parameters for the LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_nssa_external_lsa_types_of_service_type_of_service_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_nssa_external_lsa_types_of_service_type_of_service_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_nssa_external_lsa_types_of_service_type_of_service_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  tos = __builtin__.property(_get_tos)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('tos', tos), ('state', state), ])


class yc_types_of_service_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_nssa_external_lsa_types_of_service(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/nssa-external-lsa/types-of-service. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Breakdown of the NSSA External LSA contents specifying multiple
TOS values
  """
  __slots__ = ('_path_helper', '_extmethods', '__type_of_service',)

  _yang_name = 'types-of-service'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type_of_service = YANGDynClass(base=YANGListType("tos",yc_type_of_service_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_nssa_external_lsa_types_of_service_type_of_service, yang_name="type-of-service", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tos', extensions=None), is_container='list', yang_name="type-of-service", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'nssa-external-lsa', 'types-of-service']

  def _get_type_of_service(self):
    """
    Getter method for type_of_service, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/nssa_external_lsa/types_of_service/type_of_service (list)

    YANG Description: Per-type of service parameters for the NSSA external LSA
    """
    return self.__type_of_service
      
  def _set_type_of_service(self, v, load=False):
    """
    Setter method for type_of_service, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/nssa_external_lsa/types_of_service/type_of_service (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_type_of_service is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_type_of_service() directly.

    YANG Description: Per-type of service parameters for the NSSA external LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("tos",yc_type_of_service_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_nssa_external_lsa_types_of_service_type_of_service, yang_name="type-of-service", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tos', extensions=None), is_container='list', yang_name="type-of-service", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type_of_service must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("tos",yc_type_of_service_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_nssa_external_lsa_types_of_service_type_of_service, yang_name="type-of-service", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tos', extensions=None), is_container='list', yang_name="type-of-service", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__type_of_service = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type_of_service(self):
    self.__type_of_service = YANGDynClass(base=YANGListType("tos",yc_type_of_service_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_nssa_external_lsa_types_of_service_type_of_service, yang_name="type-of-service", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tos', extensions=None), is_container='list', yang_name="type-of-service", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  type_of_service = __builtin__.property(_get_type_of_service)


  _pyangbind_elements = OrderedDict([('type_of_service', type_of_service), ])


class yc_nssa_external_lsa_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_nssa_external_lsa(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/nssa-external-lsa. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Contents of the NSSA External LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__state','__types_of_service',)

  _yang_name = 'nssa-external-lsa'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_nssa_external_lsa_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__types_of_service = YANGDynClass(base=yc_types_of_service_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_nssa_external_lsa_types_of_service, is_container='container', yang_name="types-of-service", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'nssa-external-lsa']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/nssa_external_lsa/state (container)

    YANG Description: State parameters for the AS external LSA
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/nssa_external_lsa/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 parameters for the AS external LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_nssa_external_lsa_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_nssa_external_lsa_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_nssa_external_lsa_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_types_of_service(self):
    """
    Getter method for types_of_service, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/nssa_external_lsa/types_of_service (container)

    YANG Description: Breakdown of the NSSA External LSA contents specifying multiple
TOS values
    """
    return self.__types_of_service
      
  def _set_types_of_service(self, v, load=False):
    """
    Setter method for types_of_service, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/nssa_external_lsa/types_of_service (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_types_of_service is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_types_of_service() directly.

    YANG Description: Breakdown of the NSSA External LSA contents specifying multiple
TOS values
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_types_of_service_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_nssa_external_lsa_types_of_service, is_container='container', yang_name="types-of-service", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """types_of_service must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_types_of_service_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_nssa_external_lsa_types_of_service, is_container='container', yang_name="types-of-service", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__types_of_service = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_types_of_service(self):
    self.__types_of_service = YANGDynClass(base=yc_types_of_service_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_nssa_external_lsa_types_of_service, is_container='container', yang_name="types-of-service", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)
  types_of_service = __builtin__.property(_get_types_of_service)


  _pyangbind_elements = OrderedDict([('state', state), ('types_of_service', types_of_service), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters for the opaque LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__scope','__type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__scope = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LINK': {}, 'AREA': {}, 'AS': {}},), is_leaf=True, yang_name="scope", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TRAFFIC_ENGINEERING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TRAFFIC_ENGINEERING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TRAFFIC_ENGINEERING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'GRACE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:GRACE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:GRACE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'ROUTER_INFORMATION': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ROUTER_INFORMATION': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ROUTER_INFORMATION': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'OSPFV2_EXTENDED_PREFIX': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:OSPFV2_EXTENDED_PREFIX': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:OSPFV2_EXTENDED_PREFIX': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'OSPFV2_EXTENDED_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:OSPFV2_EXTENDED_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:OSPFV2_EXTENDED_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'state']

  def _get_scope(self):
    """
    Getter method for scope, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/state/scope (enumeration)

    YANG Description: The scope of the opaque LSA. The type of the LSA
indicates its scope - the value of this leaf
determines both the flooding domain, and the type
of the LSA.
    """
    return self.__scope
      
  def _set_scope(self, v, load=False):
    """
    Setter method for scope, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/state/scope (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_scope is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_scope() directly.

    YANG Description: The scope of the opaque LSA. The type of the LSA
indicates its scope - the value of this leaf
determines both the flooding domain, and the type
of the LSA.
    """
    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={'LINK': {}, 'AREA': {}, 'AS': {}},), is_leaf=True, yang_name="scope", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """scope must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LINK': {}, 'AREA': {}, 'AS': {}},), is_leaf=True, yang_name="scope", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__scope = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_scope(self):
    self.__scope = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LINK': {}, 'AREA': {}, 'AS': {}},), is_leaf=True, yang_name="scope", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/state/type (identityref)

    YANG Description: The Opaque Type of the LSA. This value is used to
indicate the type of data carried by the opaque LSA
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/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: The Opaque Type of the LSA. This value is used to
indicate the type of data carried by the opaque LSA
    """
    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={'TRAFFIC_ENGINEERING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TRAFFIC_ENGINEERING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TRAFFIC_ENGINEERING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'GRACE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:GRACE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:GRACE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'ROUTER_INFORMATION': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ROUTER_INFORMATION': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ROUTER_INFORMATION': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'OSPFV2_EXTENDED_PREFIX': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:OSPFV2_EXTENDED_PREFIX': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:OSPFV2_EXTENDED_PREFIX': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'OSPFV2_EXTENDED_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:OSPFV2_EXTENDED_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:OSPFV2_EXTENDED_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TRAFFIC_ENGINEERING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TRAFFIC_ENGINEERING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TRAFFIC_ENGINEERING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'GRACE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:GRACE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:GRACE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'ROUTER_INFORMATION': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ROUTER_INFORMATION': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ROUTER_INFORMATION': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'OSPFV2_EXTENDED_PREFIX': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:OSPFV2_EXTENDED_PREFIX': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:OSPFV2_EXTENDED_PREFIX': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'OSPFV2_EXTENDED_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:OSPFV2_EXTENDED_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:OSPFV2_EXTENDED_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-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/network-instance', defining_module='openconfig-network-instance', 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={'TRAFFIC_ENGINEERING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TRAFFIC_ENGINEERING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TRAFFIC_ENGINEERING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'GRACE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:GRACE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:GRACE_LSA': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'ROUTER_INFORMATION': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ROUTER_INFORMATION': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ROUTER_INFORMATION': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'OSPFV2_EXTENDED_PREFIX': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:OSPFV2_EXTENDED_PREFIX': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:OSPFV2_EXTENDED_PREFIX': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'OSPFV2_EXTENDED_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:OSPFV2_EXTENDED_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:OSPFV2_EXTENDED_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  scope = __builtin__.property(_get_scope)
  type = __builtin__.property(_get_type)


  _pyangbind_elements = OrderedDict([('scope', scope), ('type', type), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/traffic-engineering/tlvs/tlv/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The contents of the TLV tuple within the TE LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'TE_ROUTER_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_ROUTER_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_ROUTER_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_ROUTER_IPV6_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_ROUTER_IPV6_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_ROUTER_IPV6_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_LINK_LOCAL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK_LOCAL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK_LOCAL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_NODE_ATTRIBUTE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_NODE_ATTRIBUTE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_NODE_ATTRIBUTE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_OPTICAL_NODE_PROPERTY': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_OPTICAL_NODE_PROPERTY': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_OPTICAL_NODE_PROPERTY': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'traffic-engineering', 'tlvs', 'tlv', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/state/type (identityref)

    YANG Description: The type of TLV within the Traffic Engineering LSA
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/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: The type of TLV within the Traffic Engineering LSA
    """
    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={'TE_ROUTER_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_ROUTER_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_ROUTER_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_ROUTER_IPV6_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_ROUTER_IPV6_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_ROUTER_IPV6_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_LINK_LOCAL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK_LOCAL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK_LOCAL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_NODE_ATTRIBUTE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_NODE_ATTRIBUTE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_NODE_ATTRIBUTE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_OPTICAL_NODE_PROPERTY': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_OPTICAL_NODE_PROPERTY': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_OPTICAL_NODE_PROPERTY': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TE_ROUTER_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_ROUTER_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_ROUTER_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_ROUTER_IPV6_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_ROUTER_IPV6_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_ROUTER_IPV6_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_LINK_LOCAL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK_LOCAL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK_LOCAL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_NODE_ATTRIBUTE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_NODE_ATTRIBUTE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_NODE_ATTRIBUTE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_OPTICAL_NODE_PROPERTY': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_OPTICAL_NODE_PROPERTY': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_OPTICAL_NODE_PROPERTY': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-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/network-instance', defining_module='openconfig-network-instance', 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={'TE_ROUTER_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_ROUTER_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_ROUTER_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_ROUTER_IPV6_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_ROUTER_IPV6_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_ROUTER_IPV6_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_LINK_LOCAL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK_LOCAL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK_LOCAL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_NODE_ATTRIBUTE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_NODE_ATTRIBUTE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_NODE_ATTRIBUTE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_OPTICAL_NODE_PROPERTY': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_OPTICAL_NODE_PROPERTY': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_OPTICAL_NODE_PROPERTY': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  type = __builtin__.property(_get_type)


  _pyangbind_elements = OrderedDict([('type', type), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_unknown_tlv_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/traffic-engineering/tlvs/tlv/unknown-tlv/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Contents of an unknown TLV within the LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__length','__value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__value = YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'traffic-engineering', 'tlvs', 'tlv', 'unknown-tlv', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/unknown_tlv/state/type (uint16)

    YANG Description: The type value of the unknown TLV
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/unknown_tlv/state/type (uint16)
    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: The type value of the unknown TLV
    """
    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="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type 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="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_length(self):
    """
    Getter method for length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/unknown_tlv/state/length (uint16)

    YANG Description: The length value of the unknown TLV
    """
    return self.__length
      
  def _set_length(self, v, load=False):
    """
    Setter method for length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/unknown_tlv/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: The length value of the unknown TLV
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/unknown_tlv/state/value (binary)

    YANG Description: The value portion of the unknwon TLV
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/unknown_tlv/state/value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: The value portion of the unknwon TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  type = __builtin__.property(_get_type)
  length = __builtin__.property(_get_length)
  value = __builtin__.property(_get_value)


  _pyangbind_elements = OrderedDict([('type', type), ('length', length), ('value', value), ])


class yc_unknown_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_unknown_tlv(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/traffic-engineering/tlvs/tlv/unknown-tlv. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: An unknown TLV within the context. Unknown TLVs are
defined to be the set of TLVs that are not modelled
within the OpenConfig model, or are unknown to the
local system such that it cannot decode their value.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'unknown-tlv'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_unknown_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'traffic-engineering', 'tlvs', 'tlv', 'unknown-tlv']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/unknown_tlv/state (container)

    YANG Description: Contents of an unknown TLV within the LSA
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/unknown_tlv/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: Contents of an unknown TLV within the LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_unknown_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_unknown_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_unknown_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_router_address_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/traffic-engineering/tlvs/tlv/router-address/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of the router address TLV
  """
  __slots__ = ('_path_helper', '_extmethods', '__address',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__address = YANGDynClass(base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'traffic-engineering', 'tlvs', 'tlv', 'router-address', 'state']

  def _get_address(self):
    """
    Getter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/router_address/state/address (inet:ipv4-address-no-zone)

    YANG Description: A stable IP address of the advertising router, that is always
reachable when the router is connected to the network. Typically this
is a loopback address.
    """
    return self.__address
      
  def _set_address(self, v, load=False):
    """
    Setter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/router_address/state/address (inet:ipv4-address-no-zone)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address() directly.

    YANG Description: A stable IP address of the advertising router, that is always
reachable when the router is connected to the network. Typically this
is a loopback address.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address must be of a type compatible with inet:ipv4-address-no-zone""",
          'defined-type': "inet:ipv4-address-no-zone",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)""",
        })

    self.__address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address(self):
    self.__address = YANGDynClass(base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)

  address = __builtin__.property(_get_address)


  _pyangbind_elements = OrderedDict([('address', address), ])


class yc_router_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_router_address(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/traffic-engineering/tlvs/tlv/router-address. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Parameters included in the Router Address TLV
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'router-address'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_router_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'traffic-engineering', 'tlvs', 'tlv', 'router-address']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/router_address/state (container)

    YANG Description: State parameters of the router address TLV
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/router_address/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 parameters of the router address TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_router_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_router_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_router_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/traffic-engineering/tlvs/tlv/link/sub-tlvs/sub-tlv/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of the Link Sub-TLV
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__unknown_type','__unknown_value','__link_type','__link_id','__local_ip_address','__remote_ip_address','__metric','__maximum_bandwidth','__maximum_reservable_bandwidth',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'TE_LINK_TYPE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK_TYPE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK_TYPE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_LINK_ID': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK_ID': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK_ID': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_LINK_LOCAL_IP': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK_LOCAL_IP': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK_LOCAL_IP': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_LINK_REMOTE_IP': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK_REMOTE_IP': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK_REMOTE_IP': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_LINK_METRIC': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK_METRIC': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK_METRIC': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_LINK_MAXIMUM_BANDWIDTH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK_MAXIMUM_BANDWIDTH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK_MAXIMUM_BANDWIDTH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_LINK_MAXIMUM_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK_MAXIMUM_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK_MAXIMUM_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_LINK_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_LINK_ADMIN_GROUP': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK_ADMIN_GROUP': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK_ADMIN_GROUP': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UNKNOWN': {}},),], is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    self.__unknown_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="unknown-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__unknown_value = YANGDynClass(base=bitarray, is_leaf=True, yang_name="unknown-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    self.__link_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'POINT_TO_POINT': {}, 'MULTI_ACCESS': {}, 'UNKNOWN': {}},), is_leaf=True, yang_name="link-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__link_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="link-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)
    self.__local_ip_address = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'})), is_leaf=False, yang_name="local-ip-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)
    self.__remote_ip_address = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'})), is_leaf=False, yang_name="remote-ip-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__maximum_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="maximum-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    self.__maximum_reservable_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="maximum-reservable-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'traffic-engineering', 'tlvs', 'tlv', 'link', 'sub-tlvs', 'sub-tlv', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/state/type (union)

    YANG Description: The sub-TLV type specified in the Link TLV. When the value is
known by the local system, a canonical name of the sub-TLV is utilised
- the special UNKNOWN value indicates that the system did not
support the sub-TLV type received in the LSA.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/state/type (union)
    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: The sub-TLV type specified in the Link TLV. When the value is
known by the local system, a canonical name of the sub-TLV is utilised
- the special UNKNOWN value indicates that the system did not
support the sub-TLV type received in the LSA.
    """
    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={'TE_LINK_TYPE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK_TYPE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK_TYPE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_LINK_ID': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK_ID': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK_ID': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_LINK_LOCAL_IP': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK_LOCAL_IP': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK_LOCAL_IP': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_LINK_REMOTE_IP': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK_REMOTE_IP': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK_REMOTE_IP': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_LINK_METRIC': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK_METRIC': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK_METRIC': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_LINK_MAXIMUM_BANDWIDTH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK_MAXIMUM_BANDWIDTH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK_MAXIMUM_BANDWIDTH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_LINK_MAXIMUM_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK_MAXIMUM_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK_MAXIMUM_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_LINK_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_LINK_ADMIN_GROUP': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK_ADMIN_GROUP': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK_ADMIN_GROUP': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UNKNOWN': {}},),], is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TE_LINK_TYPE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK_TYPE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK_TYPE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_LINK_ID': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK_ID': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK_ID': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_LINK_LOCAL_IP': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK_LOCAL_IP': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK_LOCAL_IP': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_LINK_REMOTE_IP': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK_REMOTE_IP': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK_REMOTE_IP': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_LINK_METRIC': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK_METRIC': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK_METRIC': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_LINK_MAXIMUM_BANDWIDTH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK_MAXIMUM_BANDWIDTH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK_MAXIMUM_BANDWIDTH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_LINK_MAXIMUM_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK_MAXIMUM_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK_MAXIMUM_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_LINK_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_LINK_ADMIN_GROUP': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK_ADMIN_GROUP': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK_ADMIN_GROUP': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UNKNOWN': {}},),], is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', 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={'TE_LINK_TYPE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK_TYPE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK_TYPE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_LINK_ID': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK_ID': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK_ID': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_LINK_LOCAL_IP': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK_LOCAL_IP': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK_LOCAL_IP': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_LINK_REMOTE_IP': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK_REMOTE_IP': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK_REMOTE_IP': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_LINK_METRIC': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK_METRIC': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK_METRIC': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_LINK_MAXIMUM_BANDWIDTH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK_MAXIMUM_BANDWIDTH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK_MAXIMUM_BANDWIDTH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_LINK_MAXIMUM_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK_MAXIMUM_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK_MAXIMUM_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_LINK_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TE_LINK_ADMIN_GROUP': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TE_LINK_ADMIN_GROUP': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TE_LINK_ADMIN_GROUP': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UNKNOWN': {}},),], is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)


  def _get_unknown_type(self):
    """
    Getter method for unknown_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/state/unknown_type (uint16)

    YANG Description: The value of the type field of an unknown sub-TLV
    """
    return self.__unknown_type
      
  def _set_unknown_type(self, v, load=False):
    """
    Setter method for unknown_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/state/unknown_type (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_type() directly.

    YANG Description: The value of the type field of an unknown sub-TLV
    """
    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="unknown-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_type 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="unknown-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__unknown_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_type(self):
    self.__unknown_type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="unknown-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_unknown_value(self):
    """
    Getter method for unknown_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/state/unknown_value (binary)

    YANG Description: The binary contents of the unknown TLV
    """
    return self.__unknown_value
      
  def _set_unknown_value(self, v, load=False):
    """
    Setter method for unknown_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/state/unknown_value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_value() directly.

    YANG Description: The binary contents of the unknown TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=bitarray, is_leaf=True, yang_name="unknown-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=bitarray, is_leaf=True, yang_name="unknown-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__unknown_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_value(self):
    self.__unknown_value = YANGDynClass(base=bitarray, is_leaf=True, yang_name="unknown-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)


  def _get_link_type(self):
    """
    Getter method for link_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/state/link_type (enumeration)

    YANG Description: The type of the link that is being described by the TE LSA Link
sub-TLV
    """
    return self.__link_type
      
  def _set_link_type(self, v, load=False):
    """
    Setter method for link_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/state/link_type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_type() directly.

    YANG Description: The type of the link that is being described by the TE LSA Link
sub-TLV
    """
    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={'POINT_TO_POINT': {}, 'MULTI_ACCESS': {}, 'UNKNOWN': {}},), is_leaf=True, yang_name="link-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'POINT_TO_POINT': {}, 'MULTI_ACCESS': {}, 'UNKNOWN': {}},), is_leaf=True, yang_name="link-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__link_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_type(self):
    self.__link_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'POINT_TO_POINT': {}, 'MULTI_ACCESS': {}, 'UNKNOWN': {}},), is_leaf=True, yang_name="link-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_link_id(self):
    """
    Getter method for link_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/state/link_id (yang:dotted-quad)

    YANG Description: The ID of the remote system. For point-to-point links, this is the
router ID of the neighbor. For multi-access links it is the address
of the designated router.
    """
    return self.__link_id
      
  def _set_link_id(self, v, load=False):
    """
    Setter method for link_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/state/link_id (yang:dotted-quad)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_id() directly.

    YANG Description: The ID of the remote system. For point-to-point links, this is the
router ID of the neighbor. For multi-access links it is the address
of the designated router.
    """
    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][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="link-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_id must be of a type compatible with yang:dotted-quad""",
          'defined-type': "yang:dotted-quad",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="link-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)""",
        })

    self.__link_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_id(self):
    self.__link_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="link-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)


  def _get_local_ip_address(self):
    """
    Getter method for local_ip_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/state/local_ip_address (inet:ipv4-address-no-zone)

    YANG Description: The IP address(es) of the local system that correspond to the
specified TE link
    """
    return self.__local_ip_address
      
  def _set_local_ip_address(self, v, load=False):
    """
    Setter method for local_ip_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/state/local_ip_address (inet:ipv4-address-no-zone)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_ip_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_ip_address() directly.

    YANG Description: The IP address(es) of the local system that correspond to the
specified TE link
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'})), is_leaf=False, yang_name="local-ip-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_ip_address must be of a type compatible with inet:ipv4-address-no-zone""",
          'defined-type': "inet:ipv4-address-no-zone",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'})), is_leaf=False, yang_name="local-ip-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)""",
        })

    self.__local_ip_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_ip_address(self):
    self.__local_ip_address = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'})), is_leaf=False, yang_name="local-ip-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)


  def _get_remote_ip_address(self):
    """
    Getter method for remote_ip_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/state/remote_ip_address (inet:ipv4-address-no-zone)

    YANG Description: The IP address(es) of the remote systems that are attached to the
specified TE link
    """
    return self.__remote_ip_address
      
  def _set_remote_ip_address(self, v, load=False):
    """
    Setter method for remote_ip_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/state/remote_ip_address (inet:ipv4-address-no-zone)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_remote_ip_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_remote_ip_address() directly.

    YANG Description: The IP address(es) of the remote systems that are attached to the
specified TE link
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'})), is_leaf=False, yang_name="remote-ip-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """remote_ip_address must be of a type compatible with inet:ipv4-address-no-zone""",
          'defined-type': "inet:ipv4-address-no-zone",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'})), is_leaf=False, yang_name="remote-ip-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)""",
        })

    self.__remote_ip_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_remote_ip_address(self):
    self.__remote_ip_address = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'})), is_leaf=False, yang_name="remote-ip-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)


  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/state/metric (uint32)

    YANG Description: The metric of the link that should be used for traffic engineering
purposes. This link may be different than the standard OSPF link
metric.
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/state/metric (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: The metric of the link that should be used for traffic engineering
purposes. This link may be different than the standard OSPF link
metric.
    """
    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="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric 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="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_maximum_bandwidth(self):
    """
    Getter method for maximum_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/state/maximum_bandwidth (oc-types:ieeefloat32)

    YANG Description: The maximum bandwidth of the link. This value reflects the actual
bandwidth of the link expressed asn IEEE 32-bit floating point
number
    """
    return self.__maximum_bandwidth
      
  def _set_maximum_bandwidth(self, v, load=False):
    """
    Setter method for maximum_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/state/maximum_bandwidth (oc-types:ieeefloat32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_maximum_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_maximum_bandwidth() directly.

    YANG Description: The maximum bandwidth of the link. This value reflects the actual
bandwidth of the link expressed asn IEEE 32-bit floating point
number
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="maximum-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """maximum_bandwidth must be of a type compatible with oc-types:ieeefloat32""",
          'defined-type': "oc-types:ieeefloat32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="maximum-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)""",
        })

    self.__maximum_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_maximum_bandwidth(self):
    self.__maximum_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="maximum-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)


  def _get_maximum_reservable_bandwidth(self):
    """
    Getter method for maximum_reservable_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/state/maximum_reservable_bandwidth (oc-types:ieeefloat32)

    YANG Description: The maximum reservable bandwidth for the link. This value represents
the total bandwidth which may be used for traffic engineering
purposes. The value may exceed the maximum-bandwidth value
in cases where the link is oversubscribed. The value is reflected as
a 32-bit IEEE floating-point number
    """
    return self.__maximum_reservable_bandwidth
      
  def _set_maximum_reservable_bandwidth(self, v, load=False):
    """
    Setter method for maximum_reservable_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/state/maximum_reservable_bandwidth (oc-types:ieeefloat32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_maximum_reservable_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_maximum_reservable_bandwidth() directly.

    YANG Description: The maximum reservable bandwidth for the link. This value represents
the total bandwidth which may be used for traffic engineering
purposes. The value may exceed the maximum-bandwidth value
in cases where the link is oversubscribed. The value is reflected as
a 32-bit IEEE floating-point number
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="maximum-reservable-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """maximum_reservable_bandwidth must be of a type compatible with oc-types:ieeefloat32""",
          'defined-type': "oc-types:ieeefloat32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="maximum-reservable-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)""",
        })

    self.__maximum_reservable_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_maximum_reservable_bandwidth(self):
    self.__maximum_reservable_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="maximum-reservable-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)

  type = __builtin__.property(_get_type)
  unknown_type = __builtin__.property(_get_unknown_type)
  unknown_value = __builtin__.property(_get_unknown_value)
  link_type = __builtin__.property(_get_link_type)
  link_id = __builtin__.property(_get_link_id)
  local_ip_address = __builtin__.property(_get_local_ip_address)
  remote_ip_address = __builtin__.property(_get_remote_ip_address)
  metric = __builtin__.property(_get_metric)
  maximum_bandwidth = __builtin__.property(_get_maximum_bandwidth)
  maximum_reservable_bandwidth = __builtin__.property(_get_maximum_reservable_bandwidth)


  _pyangbind_elements = OrderedDict([('type', type), ('unknown_type', unknown_type), ('unknown_value', unknown_value), ('link_type', link_type), ('link_id', link_id), ('local_ip_address', local_ip_address), ('remote_ip_address', remote_ip_address), ('metric', metric), ('maximum_bandwidth', maximum_bandwidth), ('maximum_reservable_bandwidth', maximum_reservable_bandwidth), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_unknown_subtlv_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/traffic-engineering/tlvs/tlv/link/sub-tlvs/sub-tlv/unknown-subtlv/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Contents of an unknown TLV within the LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__length','__value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__value = YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'traffic-engineering', 'tlvs', 'tlv', 'link', 'sub-tlvs', 'sub-tlv', 'unknown-subtlv', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/unknown_subtlv/state/type (uint16)

    YANG Description: The type value of the unknown TLV
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/unknown_subtlv/state/type (uint16)
    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: The type value of the unknown TLV
    """
    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="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type 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="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_length(self):
    """
    Getter method for length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/unknown_subtlv/state/length (uint16)

    YANG Description: The length value of the unknown TLV
    """
    return self.__length
      
  def _set_length(self, v, load=False):
    """
    Setter method for length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/unknown_subtlv/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: The length value of the unknown TLV
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/unknown_subtlv/state/value (binary)

    YANG Description: The value portion of the unknwon TLV
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/unknown_subtlv/state/value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: The value portion of the unknwon TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  type = __builtin__.property(_get_type)
  length = __builtin__.property(_get_length)
  value = __builtin__.property(_get_value)


  _pyangbind_elements = OrderedDict([('type', type), ('length', length), ('value', value), ])


class yc_unknown_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_unknown_subtlv(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/traffic-engineering/tlvs/tlv/link/sub-tlvs/sub-tlv/unknown-subtlv. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: An unknown SubTLV within the context. Unknown Sub-TLV
are defined to be the set of SubTLVs that are not modelled
by the OpenConfig schema, or are unknown to the local system
such that it cannot decode their value.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'unknown-subtlv'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_unknown_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'traffic-engineering', 'tlvs', 'tlv', 'link', 'sub-tlvs', 'sub-tlv', 'unknown-subtlv']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/unknown_subtlv/state (container)

    YANG Description: Contents of an unknown TLV within the LSA
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/unknown_subtlv/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: Contents of an unknown TLV within the LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_unknown_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_unknown_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_unknown_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_unreserved_bandwidths_unreserved_bandwidth_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/traffic-engineering/tlvs/tlv/link/sub-tlvs/sub-tlv/unreserved-bandwidths/unreserved-bandwidth/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to the unreserved
bandwidth of the link being described
  """
  __slots__ = ('_path_helper', '_extmethods', '__priority','__unreserved_bandwidth',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__priority = 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="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__unreserved_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'traffic-engineering', 'tlvs', 'tlv', 'link', 'sub-tlvs', 'sub-tlv', 'unreserved-bandwidths', 'unreserved-bandwidth', 'state']

  def _get_priority(self):
    """
    Getter method for priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/unreserved_bandwidths/unreserved_bandwidth/state/priority (uint8)

    YANG Description: The priority level being described
    """
    return self.__priority
      
  def _set_priority(self, v, load=False):
    """
    Setter method for priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/unreserved_bandwidths/unreserved_bandwidth/state/priority (uint8)
    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: The priority level being described
    """
    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="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """priority 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..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_priority(self):
    self.__priority = 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="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_unreserved_bandwidth(self):
    """
    Getter method for unreserved_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/unreserved_bandwidths/unreserved_bandwidth/state/unreserved_bandwidth (oc-types:ieeefloat32)

    YANG Description: The unreserved bandwidth for at priority level P, where P is
equal to the priority of the current list entry. The reservable
bandwidth at priority P is equal to the sum of the reservable
bandwidth at all levels 0..P.
    """
    return self.__unreserved_bandwidth
      
  def _set_unreserved_bandwidth(self, v, load=False):
    """
    Setter method for unreserved_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/unreserved_bandwidths/unreserved_bandwidth/state/unreserved_bandwidth (oc-types:ieeefloat32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unreserved_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unreserved_bandwidth() directly.

    YANG Description: The unreserved bandwidth for at priority level P, where P is
equal to the priority of the current list entry. The reservable
bandwidth at priority P is equal to the sum of the reservable
bandwidth at all levels 0..P.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unreserved_bandwidth must be of a type compatible with oc-types:ieeefloat32""",
          'defined-type': "oc-types:ieeefloat32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)""",
        })

    self.__unreserved_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unreserved_bandwidth(self):
    self.__unreserved_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)

  priority = __builtin__.property(_get_priority)
  unreserved_bandwidth = __builtin__.property(_get_unreserved_bandwidth)


  _pyangbind_elements = OrderedDict([('priority', priority), ('unreserved_bandwidth', unreserved_bandwidth), ])


class yc_unreserved_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_unreserved_bandwidths_unreserved_bandwidth(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/traffic-engineering/tlvs/tlv/link/sub-tlvs/sub-tlv/unreserved-bandwidths/unreserved-bandwidth. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The unreserved bandwidth at each priority level
  """
  __slots__ = ('_path_helper', '_extmethods', '__priority','__state',)

  _yang_name = 'unreserved-bandwidth'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__priority = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_unreserved_bandwidths_unreserved_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'traffic-engineering', 'tlvs', 'tlv', 'link', 'sub-tlvs', 'sub-tlv', 'unreserved-bandwidths', 'unreserved-bandwidth']

  def _get_priority(self):
    """
    Getter method for priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/unreserved_bandwidths/unreserved_bandwidth/priority (leafref)

    YANG Description: A reference to the priority level being described
    """
    return self.__priority
      
  def _set_priority(self, v, load=False):
    """
    Setter method for priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/unreserved_bandwidths/unreserved_bandwidth/priority (leafref)
    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: A reference to the priority level being described
    """
    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="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """priority must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_priority(self):
    self.__priority = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/unreserved_bandwidths/unreserved_bandwidth/state (container)

    YANG Description: State parameters relating to the unreserved
bandwidth of the link being described
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/unreserved_bandwidths/unreserved_bandwidth/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 parameters relating to the unreserved
bandwidth of the link being described
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_unreserved_bandwidths_unreserved_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_unreserved_bandwidths_unreserved_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_unreserved_bandwidths_unreserved_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  priority = __builtin__.property(_get_priority)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('priority', priority), ('state', state), ])


class yc_unreserved_bandwidths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_unreserved_bandwidths(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/traffic-engineering/tlvs/tlv/link/sub-tlvs/sub-tlv/unreserved-bandwidths. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The unreserved link bandwidths for the Traffic
Engineering LSA - utilised when the sub-TLV type
indicates that the sub-TLV describes unreserved
bandwidth
  """
  __slots__ = ('_path_helper', '_extmethods', '__unreserved_bandwidth',)

  _yang_name = 'unreserved-bandwidths'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__unreserved_bandwidth = YANGDynClass(base=YANGListType("priority",yc_unreserved_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_unreserved_bandwidths_unreserved_bandwidth, yang_name="unreserved-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'traffic-engineering', 'tlvs', 'tlv', 'link', 'sub-tlvs', 'sub-tlv', 'unreserved-bandwidths']

  def _get_unreserved_bandwidth(self):
    """
    Getter method for unreserved_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/unreserved_bandwidths/unreserved_bandwidth (list)

    YANG Description: The unreserved bandwidth at each priority level
    """
    return self.__unreserved_bandwidth
      
  def _set_unreserved_bandwidth(self, v, load=False):
    """
    Setter method for unreserved_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/unreserved_bandwidths/unreserved_bandwidth (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unreserved_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unreserved_bandwidth() directly.

    YANG Description: The unreserved bandwidth at each priority level
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("priority",yc_unreserved_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_unreserved_bandwidths_unreserved_bandwidth, yang_name="unreserved-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unreserved_bandwidth must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("priority",yc_unreserved_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_unreserved_bandwidths_unreserved_bandwidth, yang_name="unreserved-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__unreserved_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unreserved_bandwidth(self):
    self.__unreserved_bandwidth = YANGDynClass(base=YANGListType("priority",yc_unreserved_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_unreserved_bandwidths_unreserved_bandwidth, yang_name="unreserved-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  unreserved_bandwidth = __builtin__.property(_get_unreserved_bandwidth)


  _pyangbind_elements = OrderedDict([('unreserved_bandwidth', unreserved_bandwidth), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_administrative_groups_admin_group_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/traffic-engineering/tlvs/tlv/link/sub-tlvs/sub-tlv/administrative-groups/admin-group/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to the administrative
groups being described for the link
  """
  __slots__ = ('_path_helper', '_extmethods', '__bit_index','__set_',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__bit_index = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..31']}), is_leaf=True, yang_name="bit-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__set_ = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'traffic-engineering', 'tlvs', 'tlv', 'link', 'sub-tlvs', 'sub-tlv', 'administrative-groups', 'admin-group', 'state']

  def _get_bit_index(self):
    """
    Getter method for bit_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/administrative_groups/admin_group/state/bit_index (uint8)

    YANG Description: The index of the bit within the 32-bit administrative group field
of the Administrative Group sub-TLV of the Traffic Engineering LSA
    """
    return self.__bit_index
      
  def _set_bit_index(self, v, load=False):
    """
    Setter method for bit_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/administrative_groups/admin_group/state/bit_index (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bit_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bit_index() directly.

    YANG Description: The index of the bit within the 32-bit administrative group field
of the Administrative Group sub-TLV of the Traffic Engineering LSA
    """
    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..31']}), is_leaf=True, yang_name="bit-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bit_index 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..31']}), is_leaf=True, yang_name="bit-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__bit_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bit_index(self):
    self.__bit_index = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..31']}), is_leaf=True, yang_name="bit-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_set_(self):
    """
    Getter method for set_, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/administrative_groups/admin_group/state/set (boolean)

    YANG Description: Whether the bit is set within the administrative group field
    """
    return self.__set_
      
  def _set_set_(self, v, load=False):
    """
    Setter method for set_, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/administrative_groups/admin_group/state/set (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_ is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_() directly.

    YANG Description: Whether the bit is set within the administrative group field
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_ must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__set_ = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_(self):
    self.__set_ = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="set", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  bit_index = __builtin__.property(_get_bit_index)
  set_ = __builtin__.property(_get_set_)


  _pyangbind_elements = OrderedDict([('bit_index', bit_index), ('set_', set_), ])


class yc_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_administrative_groups_admin_group(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/traffic-engineering/tlvs/tlv/link/sub-tlvs/sub-tlv/administrative-groups/admin-group. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The administrative group described within the
sub-TLV
  """
  __slots__ = ('_path_helper', '_extmethods', '__bit_index','__state',)

  _yang_name = 'admin-group'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__bit_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="bit-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_administrative_groups_admin_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'traffic-engineering', 'tlvs', 'tlv', 'link', 'sub-tlvs', 'sub-tlv', 'administrative-groups', 'admin-group']

  def _get_bit_index(self):
    """
    Getter method for bit_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/administrative_groups/admin_group/bit_index (leafref)

    YANG Description: A reference to the bit index being described
    """
    return self.__bit_index
      
  def _set_bit_index(self, v, load=False):
    """
    Setter method for bit_index, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/administrative_groups/admin_group/bit_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bit_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bit_index() directly.

    YANG Description: A reference to the bit index being described
    """
    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="bit-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bit_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="bit-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__bit_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bit_index(self):
    self.__bit_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="bit-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/administrative_groups/admin_group/state (container)

    YANG Description: State parameters relating to the administrative
groups being described for the link
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/administrative_groups/admin_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: State parameters relating to the administrative
groups being described for the link
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_administrative_groups_admin_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_administrative_groups_admin_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_administrative_groups_admin_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  bit_index = __builtin__.property(_get_bit_index)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('bit_index', bit_index), ('state', state), ])


class yc_administrative_groups_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_administrative_groups(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/traffic-engineering/tlvs/tlv/link/sub-tlvs/sub-tlv/administrative-groups. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The administrative groups that are set for the
Traffic Engineering LSA - utilised when the sub-TLV type
indicates that the sub-TLV describes administrative
groups
  """
  __slots__ = ('_path_helper', '_extmethods', '__admin_group',)

  _yang_name = 'administrative-groups'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__admin_group = YANGDynClass(base=YANGListType("bit_index",yc_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_administrative_groups_admin_group, yang_name="admin-group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='bit-index', extensions=None), is_container='list', yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'traffic-engineering', 'tlvs', 'tlv', 'link', 'sub-tlvs', 'sub-tlv', 'administrative-groups']

  def _get_admin_group(self):
    """
    Getter method for admin_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/administrative_groups/admin_group (list)

    YANG Description: The administrative group described within the
sub-TLV
    """
    return self.__admin_group
      
  def _set_admin_group(self, v, load=False):
    """
    Setter method for admin_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/administrative_groups/admin_group (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_admin_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_admin_group() directly.

    YANG Description: The administrative group described within the
sub-TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("bit_index",yc_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_administrative_groups_admin_group, yang_name="admin-group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='bit-index', extensions=None), is_container='list', yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """admin_group must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("bit_index",yc_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_administrative_groups_admin_group, yang_name="admin-group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='bit-index', extensions=None), is_container='list', yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__admin_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_admin_group(self):
    self.__admin_group = YANGDynClass(base=YANGListType("bit_index",yc_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_administrative_groups_admin_group, yang_name="admin-group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='bit-index', extensions=None), is_container='list', yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  admin_group = __builtin__.property(_get_admin_group)


  _pyangbind_elements = OrderedDict([('admin_group', admin_group), ])


class yc_sub_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/traffic-engineering/tlvs/tlv/link/sub-tlvs/sub-tlv. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The Sub-TLVs included within the Traffic Engineering
LSA's sub-TLV
  """
  __slots__ = ('_path_helper', '_extmethods', '__state','__unknown_subtlv','__unreserved_bandwidths','__administrative_groups',)

  _yang_name = 'sub-tlv'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unknown_subtlv = YANGDynClass(base=yc_unknown_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_unknown_subtlv, is_container='container', yang_name="unknown-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unreserved_bandwidths = YANGDynClass(base=yc_unreserved_bandwidths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_unreserved_bandwidths, is_container='container', yang_name="unreserved-bandwidths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__administrative_groups = YANGDynClass(base=yc_administrative_groups_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_administrative_groups, is_container='container', yang_name="administrative-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'traffic-engineering', 'tlvs', 'tlv', 'link', 'sub-tlvs', 'sub-tlv']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/state (container)

    YANG Description: State parameters of the Link Sub-TLV
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/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 parameters of the Link Sub-TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unknown_subtlv(self):
    """
    Getter method for unknown_subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/unknown_subtlv (container)

    YANG Description: An unknown SubTLV within the context. Unknown Sub-TLV
are defined to be the set of SubTLVs that are not modelled
by the OpenConfig schema, or are unknown to the local system
such that it cannot decode their value.
    """
    return self.__unknown_subtlv
      
  def _set_unknown_subtlv(self, v, load=False):
    """
    Setter method for unknown_subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/unknown_subtlv (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_subtlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_subtlv() directly.

    YANG Description: An unknown SubTLV within the context. Unknown Sub-TLV
are defined to be the set of SubTLVs that are not modelled
by the OpenConfig schema, or are unknown to the local system
such that it cannot decode their value.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unknown_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_unknown_subtlv, is_container='container', yang_name="unknown-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_subtlv must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unknown_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_unknown_subtlv, is_container='container', yang_name="unknown-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unknown_subtlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_subtlv(self):
    self.__unknown_subtlv = YANGDynClass(base=yc_unknown_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_unknown_subtlv, is_container='container', yang_name="unknown-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unreserved_bandwidths(self):
    """
    Getter method for unreserved_bandwidths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/unreserved_bandwidths (container)

    YANG Description: The unreserved link bandwidths for the Traffic
Engineering LSA - utilised when the sub-TLV type
indicates that the sub-TLV describes unreserved
bandwidth
    """
    return self.__unreserved_bandwidths
      
  def _set_unreserved_bandwidths(self, v, load=False):
    """
    Setter method for unreserved_bandwidths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/unreserved_bandwidths (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unreserved_bandwidths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unreserved_bandwidths() directly.

    YANG Description: The unreserved link bandwidths for the Traffic
Engineering LSA - utilised when the sub-TLV type
indicates that the sub-TLV describes unreserved
bandwidth
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unreserved_bandwidths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_unreserved_bandwidths, is_container='container', yang_name="unreserved-bandwidths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unreserved_bandwidths must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unreserved_bandwidths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_unreserved_bandwidths, is_container='container', yang_name="unreserved-bandwidths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unreserved_bandwidths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unreserved_bandwidths(self):
    self.__unreserved_bandwidths = YANGDynClass(base=yc_unreserved_bandwidths_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_unreserved_bandwidths, is_container='container', yang_name="unreserved-bandwidths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_administrative_groups(self):
    """
    Getter method for administrative_groups, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/administrative_groups (container)

    YANG Description: The administrative groups that are set for the
Traffic Engineering LSA - utilised when the sub-TLV type
indicates that the sub-TLV describes administrative
groups
    """
    return self.__administrative_groups
      
  def _set_administrative_groups(self, v, load=False):
    """
    Setter method for administrative_groups, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv/administrative_groups (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_administrative_groups is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_administrative_groups() directly.

    YANG Description: The administrative groups that are set for the
Traffic Engineering LSA - utilised when the sub-TLV type
indicates that the sub-TLV describes administrative
groups
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_administrative_groups_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_administrative_groups, is_container='container', yang_name="administrative-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """administrative_groups must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_administrative_groups_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_administrative_groups, is_container='container', yang_name="administrative-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__administrative_groups = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_administrative_groups(self):
    self.__administrative_groups = YANGDynClass(base=yc_administrative_groups_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv_administrative_groups, is_container='container', yang_name="administrative-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)
  unknown_subtlv = __builtin__.property(_get_unknown_subtlv)
  unreserved_bandwidths = __builtin__.property(_get_unreserved_bandwidths)
  administrative_groups = __builtin__.property(_get_administrative_groups)


  _pyangbind_elements = OrderedDict([('state', state), ('unknown_subtlv', unknown_subtlv), ('unreserved_bandwidths', unreserved_bandwidths), ('administrative_groups', administrative_groups), ])


class yc_sub_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/traffic-engineering/tlvs/tlv/link/sub-tlvs. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Sub-TLVs included in the Link TLV
  """
  __slots__ = ('_path_helper', '_extmethods', '__sub_tlv',)

  _yang_name = 'sub-tlvs'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__sub_tlv = YANGDynClass(base=YANGListType(False,yc_sub_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv, yang_name="sub-tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="sub-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'traffic-engineering', 'tlvs', 'tlv', 'link', 'sub-tlvs']

  def _get_sub_tlv(self):
    """
    Getter method for sub_tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv (list)

    YANG Description: The Sub-TLVs included within the Traffic Engineering
LSA's sub-TLV
    """
    return self.__sub_tlv
      
  def _set_sub_tlv(self, v, load=False):
    """
    Setter method for sub_tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs/sub_tlv (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sub_tlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sub_tlv() directly.

    YANG Description: The Sub-TLVs included within the Traffic Engineering
LSA's sub-TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType(False,yc_sub_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv, yang_name="sub-tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="sub-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sub_tlv must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType(False,yc_sub_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv, yang_name="sub-tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="sub-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__sub_tlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sub_tlv(self):
    self.__sub_tlv = YANGDynClass(base=YANGListType(False,yc_sub_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs_sub_tlv, yang_name="sub-tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="sub-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  sub_tlv = __builtin__.property(_get_sub_tlv)


  _pyangbind_elements = OrderedDict([('sub_tlv', sub_tlv), ])


class yc_link_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/traffic-engineering/tlvs/tlv/link. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Parameters included in the Link TLV
  """
  __slots__ = ('_path_helper', '_extmethods', '__sub_tlvs',)

  _yang_name = 'link'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__sub_tlvs = YANGDynClass(base=yc_sub_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs, is_container='container', yang_name="sub-tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'traffic-engineering', 'tlvs', 'tlv', 'link']

  def _get_sub_tlvs(self):
    """
    Getter method for sub_tlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs (container)

    YANG Description: Sub-TLVs included in the Link TLV
    """
    return self.__sub_tlvs
      
  def _set_sub_tlvs(self, v, load=False):
    """
    Setter method for sub_tlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link/sub_tlvs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sub_tlvs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sub_tlvs() directly.

    YANG Description: Sub-TLVs included in the Link TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_sub_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs, is_container='container', yang_name="sub-tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sub_tlvs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_sub_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs, is_container='container', yang_name="sub-tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__sub_tlvs = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sub_tlvs(self):
    self.__sub_tlvs = YANGDynClass(base=yc_sub_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link_sub_tlvs, is_container='container', yang_name="sub-tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  sub_tlvs = __builtin__.property(_get_sub_tlvs)


  _pyangbind_elements = OrderedDict([('sub_tlvs', sub_tlvs), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_node_attribute_sub_tlvs_sub_tlv_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/traffic-engineering/tlvs/tlv/node-attribute/sub-tlvs/sub-tlv/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of the Node Attribute TLV sub-TLV
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__local_ipv4_addresses','__local_ipv6_addresses',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'NODE_IPV4_LOCAL_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:NODE_IPV4_LOCAL_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:NODE_IPV4_LOCAL_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'NODE_IPV6_LOCAL_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:NODE_IPV6_LOCAL_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:NODE_IPV6_LOCAL_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UNKNOWN': {}},),], is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    self.__local_ipv4_addresses = YANGDynClass(unique=True, base=TypedListType(allowed_type=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=False, yang_name="local-ipv4-addresses", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-prefix', is_config=False)
    self.__local_ipv6_addresses = YANGDynClass(unique=True, base=TypedListType(allowed_type=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=False, yang_name="local-ipv6-addresses", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'traffic-engineering', 'tlvs', 'tlv', 'node-attribute', 'sub-tlvs', 'sub-tlv', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/node_attribute/sub_tlvs/sub_tlv/state/type (union)

    YANG Description: The type of the sub-TLV of the Node Attribute TLV contained within
the TE LSA. If the local system can interpret the value received the
canonical name of the type is utilised, otherwise the special UNKNOWN
value is used
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/node_attribute/sub_tlvs/sub_tlv/state/type (union)
    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: The type of the sub-TLV of the Node Attribute TLV contained within
the TE LSA. If the local system can interpret the value received the
canonical name of the type is utilised, otherwise the special UNKNOWN
value is used
    """
    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={'NODE_IPV4_LOCAL_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:NODE_IPV4_LOCAL_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:NODE_IPV4_LOCAL_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'NODE_IPV6_LOCAL_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:NODE_IPV6_LOCAL_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:NODE_IPV6_LOCAL_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UNKNOWN': {}},),], is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'NODE_IPV4_LOCAL_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:NODE_IPV4_LOCAL_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:NODE_IPV4_LOCAL_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'NODE_IPV6_LOCAL_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:NODE_IPV6_LOCAL_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:NODE_IPV6_LOCAL_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UNKNOWN': {}},),], is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', 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={'NODE_IPV4_LOCAL_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:NODE_IPV4_LOCAL_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:NODE_IPV4_LOCAL_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'NODE_IPV6_LOCAL_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:NODE_IPV6_LOCAL_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:NODE_IPV6_LOCAL_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UNKNOWN': {}},),], is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)


  def _get_local_ipv4_addresses(self):
    """
    Getter method for local_ipv4_addresses, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/node_attribute/sub_tlvs/sub_tlv/state/local_ipv4_addresses (inet:ipv4-prefix)

    YANG Description: The local IPv4 addresses of the node expressed in CIDR notation
    """
    return self.__local_ipv4_addresses
      
  def _set_local_ipv4_addresses(self, v, load=False):
    """
    Setter method for local_ipv4_addresses, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/node_attribute/sub_tlvs/sub_tlv/state/local_ipv4_addresses (inet:ipv4-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_ipv4_addresses is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_ipv4_addresses() directly.

    YANG Description: The local IPv4 addresses of the node expressed in CIDR notation
    """
    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_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=False, yang_name="local-ipv4-addresses", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_ipv4_addresses must be of a type compatible with inet:ipv4-prefix""",
          'defined-type': "inet:ipv4-prefix",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=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=False, yang_name="local-ipv4-addresses", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-prefix', is_config=False)""",
        })

    self.__local_ipv4_addresses = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_ipv4_addresses(self):
    self.__local_ipv4_addresses = YANGDynClass(unique=True, base=TypedListType(allowed_type=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=False, yang_name="local-ipv4-addresses", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-prefix', is_config=False)


  def _get_local_ipv6_addresses(self):
    """
    Getter method for local_ipv6_addresses, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/node_attribute/sub_tlvs/sub_tlv/state/local_ipv6_addresses (inet:ipv6-prefix)

    YANG Description: The local IPv6 addreses of the node
    """
    return self.__local_ipv6_addresses
      
  def _set_local_ipv6_addresses(self, v, load=False):
    """
    Setter method for local_ipv6_addresses, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/node_attribute/sub_tlvs/sub_tlv/state/local_ipv6_addresses (inet:ipv6-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_ipv6_addresses is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_ipv6_addresses() directly.

    YANG Description: The local IPv6 addreses of the node
    """
    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_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=False, yang_name="local-ipv6-addresses", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_ipv6_addresses must be of a type compatible with inet:ipv6-prefix""",
          'defined-type': "inet:ipv6-prefix",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=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=False, yang_name="local-ipv6-addresses", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', is_config=False)""",
        })

    self.__local_ipv6_addresses = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_ipv6_addresses(self):
    self.__local_ipv6_addresses = YANGDynClass(unique=True, base=TypedListType(allowed_type=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=False, yang_name="local-ipv6-addresses", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', is_config=False)

  type = __builtin__.property(_get_type)
  local_ipv4_addresses = __builtin__.property(_get_local_ipv4_addresses)
  local_ipv6_addresses = __builtin__.property(_get_local_ipv6_addresses)


  _pyangbind_elements = OrderedDict([('type', type), ('local_ipv4_addresses', local_ipv4_addresses), ('local_ipv6_addresses', local_ipv6_addresses), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_node_attribute_sub_tlvs_sub_tlv_unknown_subtlv_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/traffic-engineering/tlvs/tlv/node-attribute/sub-tlvs/sub-tlv/unknown-subtlv/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Contents of an unknown TLV within the LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__length','__value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__value = YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'traffic-engineering', 'tlvs', 'tlv', 'node-attribute', 'sub-tlvs', 'sub-tlv', 'unknown-subtlv', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/node_attribute/sub_tlvs/sub_tlv/unknown_subtlv/state/type (uint16)

    YANG Description: The type value of the unknown TLV
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/node_attribute/sub_tlvs/sub_tlv/unknown_subtlv/state/type (uint16)
    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: The type value of the unknown TLV
    """
    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="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type 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="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_length(self):
    """
    Getter method for length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/node_attribute/sub_tlvs/sub_tlv/unknown_subtlv/state/length (uint16)

    YANG Description: The length value of the unknown TLV
    """
    return self.__length
      
  def _set_length(self, v, load=False):
    """
    Setter method for length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/node_attribute/sub_tlvs/sub_tlv/unknown_subtlv/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: The length value of the unknown TLV
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/node_attribute/sub_tlvs/sub_tlv/unknown_subtlv/state/value (binary)

    YANG Description: The value portion of the unknwon TLV
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/node_attribute/sub_tlvs/sub_tlv/unknown_subtlv/state/value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: The value portion of the unknwon TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  type = __builtin__.property(_get_type)
  length = __builtin__.property(_get_length)
  value = __builtin__.property(_get_value)


  _pyangbind_elements = OrderedDict([('type', type), ('length', length), ('value', value), ])


class yc_unknown_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_node_attribute_sub_tlvs_sub_tlv_unknown_subtlv(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/traffic-engineering/tlvs/tlv/node-attribute/sub-tlvs/sub-tlv/unknown-subtlv. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: An unknown SubTLV within the context. Unknown Sub-TLV
are defined to be the set of SubTLVs that are not modelled
by the OpenConfig schema, or are unknown to the local system
such that it cannot decode their value.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'unknown-subtlv'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_node_attribute_sub_tlvs_sub_tlv_unknown_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'traffic-engineering', 'tlvs', 'tlv', 'node-attribute', 'sub-tlvs', 'sub-tlv', 'unknown-subtlv']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/node_attribute/sub_tlvs/sub_tlv/unknown_subtlv/state (container)

    YANG Description: Contents of an unknown TLV within the LSA
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/node_attribute/sub_tlvs/sub_tlv/unknown_subtlv/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: Contents of an unknown TLV within the LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_node_attribute_sub_tlvs_sub_tlv_unknown_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_node_attribute_sub_tlvs_sub_tlv_unknown_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_node_attribute_sub_tlvs_sub_tlv_unknown_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_sub_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_node_attribute_sub_tlvs_sub_tlv(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/traffic-engineering/tlvs/tlv/node-attribute/sub-tlvs/sub-tlv. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of the Sub-TLVs contained within the Node Attribute
TLV
  """
  __slots__ = ('_path_helper', '_extmethods', '__state','__unknown_subtlv',)

  _yang_name = 'sub-tlv'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_node_attribute_sub_tlvs_sub_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unknown_subtlv = YANGDynClass(base=yc_unknown_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_node_attribute_sub_tlvs_sub_tlv_unknown_subtlv, is_container='container', yang_name="unknown-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'traffic-engineering', 'tlvs', 'tlv', 'node-attribute', 'sub-tlvs', 'sub-tlv']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/node_attribute/sub_tlvs/sub_tlv/state (container)

    YANG Description: State parameters of the Node Attribute TLV sub-TLV
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/node_attribute/sub_tlvs/sub_tlv/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 parameters of the Node Attribute TLV sub-TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_node_attribute_sub_tlvs_sub_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_node_attribute_sub_tlvs_sub_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_node_attribute_sub_tlvs_sub_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unknown_subtlv(self):
    """
    Getter method for unknown_subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/node_attribute/sub_tlvs/sub_tlv/unknown_subtlv (container)

    YANG Description: An unknown SubTLV within the context. Unknown Sub-TLV
are defined to be the set of SubTLVs that are not modelled
by the OpenConfig schema, or are unknown to the local system
such that it cannot decode their value.
    """
    return self.__unknown_subtlv
      
  def _set_unknown_subtlv(self, v, load=False):
    """
    Setter method for unknown_subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/node_attribute/sub_tlvs/sub_tlv/unknown_subtlv (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_subtlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_subtlv() directly.

    YANG Description: An unknown SubTLV within the context. Unknown Sub-TLV
are defined to be the set of SubTLVs that are not modelled
by the OpenConfig schema, or are unknown to the local system
such that it cannot decode their value.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unknown_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_node_attribute_sub_tlvs_sub_tlv_unknown_subtlv, is_container='container', yang_name="unknown-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_subtlv must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unknown_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_node_attribute_sub_tlvs_sub_tlv_unknown_subtlv, is_container='container', yang_name="unknown-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unknown_subtlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_subtlv(self):
    self.__unknown_subtlv = YANGDynClass(base=yc_unknown_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_node_attribute_sub_tlvs_sub_tlv_unknown_subtlv, is_container='container', yang_name="unknown-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)
  unknown_subtlv = __builtin__.property(_get_unknown_subtlv)


  _pyangbind_elements = OrderedDict([('state', state), ('unknown_subtlv', unknown_subtlv), ])


class yc_sub_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_node_attribute_sub_tlvs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/traffic-engineering/tlvs/tlv/node-attribute/sub-tlvs. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Sub-TLVs of the Node Attribute TLV of the Traffic
Engineering LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__sub_tlv',)

  _yang_name = 'sub-tlvs'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__sub_tlv = YANGDynClass(base=YANGListType(False,yc_sub_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_node_attribute_sub_tlvs_sub_tlv, yang_name="sub-tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="sub-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'traffic-engineering', 'tlvs', 'tlv', 'node-attribute', 'sub-tlvs']

  def _get_sub_tlv(self):
    """
    Getter method for sub_tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/node_attribute/sub_tlvs/sub_tlv (list)

    YANG Description: List of the Sub-TLVs contained within the Node Attribute
TLV
    """
    return self.__sub_tlv
      
  def _set_sub_tlv(self, v, load=False):
    """
    Setter method for sub_tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/node_attribute/sub_tlvs/sub_tlv (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sub_tlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sub_tlv() directly.

    YANG Description: List of the Sub-TLVs contained within the Node Attribute
TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType(False,yc_sub_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_node_attribute_sub_tlvs_sub_tlv, yang_name="sub-tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="sub-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sub_tlv must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType(False,yc_sub_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_node_attribute_sub_tlvs_sub_tlv, yang_name="sub-tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="sub-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__sub_tlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sub_tlv(self):
    self.__sub_tlv = YANGDynClass(base=YANGListType(False,yc_sub_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_node_attribute_sub_tlvs_sub_tlv, yang_name="sub-tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="sub-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  sub_tlv = __builtin__.property(_get_sub_tlv)


  _pyangbind_elements = OrderedDict([('sub_tlv', sub_tlv), ])


class yc_node_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_node_attribute(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/traffic-engineering/tlvs/tlv/node-attribute. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Parameters included in the Node Attribute TLV
  """
  __slots__ = ('_path_helper', '_extmethods', '__sub_tlvs',)

  _yang_name = 'node-attribute'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__sub_tlvs = YANGDynClass(base=yc_sub_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_node_attribute_sub_tlvs, is_container='container', yang_name="sub-tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'traffic-engineering', 'tlvs', 'tlv', 'node-attribute']

  def _get_sub_tlvs(self):
    """
    Getter method for sub_tlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/node_attribute/sub_tlvs (container)

    YANG Description: Sub-TLVs of the Node Attribute TLV of the Traffic
Engineering LSA
    """
    return self.__sub_tlvs
      
  def _set_sub_tlvs(self, v, load=False):
    """
    Setter method for sub_tlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/node_attribute/sub_tlvs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sub_tlvs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sub_tlvs() directly.

    YANG Description: Sub-TLVs of the Node Attribute TLV of the Traffic
Engineering LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_sub_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_node_attribute_sub_tlvs, is_container='container', yang_name="sub-tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sub_tlvs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_sub_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_node_attribute_sub_tlvs, is_container='container', yang_name="sub-tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__sub_tlvs = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sub_tlvs(self):
    self.__sub_tlvs = YANGDynClass(base=yc_sub_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_node_attribute_sub_tlvs, is_container='container', yang_name="sub-tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  sub_tlvs = __builtin__.property(_get_sub_tlvs)


  _pyangbind_elements = OrderedDict([('sub_tlvs', sub_tlvs), ])


class yc_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/traffic-engineering/tlvs/tlv. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The Type-Length-Value tuples included in the TE LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__state','__unknown_tlv','__router_address','__link','__node_attribute',)

  _yang_name = 'tlv'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unknown_tlv = YANGDynClass(base=yc_unknown_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_unknown_tlv, is_container='container', yang_name="unknown-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__router_address = YANGDynClass(base=yc_router_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_router_address, is_container='container', yang_name="router-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__link = YANGDynClass(base=yc_link_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link, is_container='container', yang_name="link", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__node_attribute = YANGDynClass(base=yc_node_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_node_attribute, is_container='container', yang_name="node-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'traffic-engineering', 'tlvs', 'tlv']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/state (container)

    YANG Description: The contents of the TLV tuple within the TE LSA
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/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: The contents of the TLV tuple within the TE LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unknown_tlv(self):
    """
    Getter method for unknown_tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/unknown_tlv (container)

    YANG Description: An unknown TLV within the context. Unknown TLVs are
defined to be the set of TLVs that are not modelled
within the OpenConfig model, or are unknown to the
local system such that it cannot decode their value.
    """
    return self.__unknown_tlv
      
  def _set_unknown_tlv(self, v, load=False):
    """
    Setter method for unknown_tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/unknown_tlv (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_tlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_tlv() directly.

    YANG Description: An unknown TLV within the context. Unknown TLVs are
defined to be the set of TLVs that are not modelled
within the OpenConfig model, or are unknown to the
local system such that it cannot decode their value.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unknown_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_unknown_tlv, is_container='container', yang_name="unknown-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_tlv must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unknown_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_unknown_tlv, is_container='container', yang_name="unknown-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unknown_tlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_tlv(self):
    self.__unknown_tlv = YANGDynClass(base=yc_unknown_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_unknown_tlv, is_container='container', yang_name="unknown-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_router_address(self):
    """
    Getter method for router_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/router_address (container)

    YANG Description: Parameters included in the Router Address TLV
    """
    return self.__router_address
      
  def _set_router_address(self, v, load=False):
    """
    Setter method for router_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/router_address (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_router_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_router_address() directly.

    YANG Description: Parameters included in the Router Address TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_router_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_router_address, is_container='container', yang_name="router-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """router_address must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_router_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_router_address, is_container='container', yang_name="router-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__router_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_router_address(self):
    self.__router_address = YANGDynClass(base=yc_router_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_router_address, is_container='container', yang_name="router-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_link(self):
    """
    Getter method for link, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link (container)

    YANG Description: Parameters included in the Link TLV
    """
    return self.__link
      
  def _set_link(self, v, load=False):
    """
    Setter method for link, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/link (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link() directly.

    YANG Description: Parameters included in the Link TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_link_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link, is_container='container', yang_name="link", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_link_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link, is_container='container', yang_name="link", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__link = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link(self):
    self.__link = YANGDynClass(base=yc_link_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_link, is_container='container', yang_name="link", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_node_attribute(self):
    """
    Getter method for node_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/node_attribute (container)

    YANG Description: Parameters included in the Node Attribute TLV
    """
    return self.__node_attribute
      
  def _set_node_attribute(self, v, load=False):
    """
    Setter method for node_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/node_attribute (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_node_attribute is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_node_attribute() directly.

    YANG Description: Parameters included in the Node Attribute TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_node_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_node_attribute, is_container='container', yang_name="node-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """node_attribute must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_node_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_node_attribute, is_container='container', yang_name="node-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__node_attribute = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_node_attribute(self):
    self.__node_attribute = YANGDynClass(base=yc_node_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv_node_attribute, is_container='container', yang_name="node-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)
  unknown_tlv = __builtin__.property(_get_unknown_tlv)
  router_address = __builtin__.property(_get_router_address)
  link = __builtin__.property(_get_link)
  node_attribute = __builtin__.property(_get_node_attribute)


  _pyangbind_elements = OrderedDict([('state', state), ('unknown_tlv', unknown_tlv), ('router_address', router_address), ('link', link), ('node_attribute', node_attribute), ])


class yc_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/traffic-engineering/tlvs. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The TLVs contained in the TE Opaque LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__tlv',)

  _yang_name = 'tlvs'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__tlv = YANGDynClass(base=YANGListType(False,yc_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv, yang_name="tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'traffic-engineering', 'tlvs']

  def _get_tlv(self):
    """
    Getter method for tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv (list)

    YANG Description: The Type-Length-Value tuples included in the TE LSA
    """
    return self.__tlv
      
  def _set_tlv(self, v, load=False):
    """
    Setter method for tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tlv() directly.

    YANG Description: The Type-Length-Value tuples included in the TE LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType(False,yc_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv, yang_name="tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tlv must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType(False,yc_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv, yang_name="tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__tlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tlv(self):
    self.__tlv = YANGDynClass(base=YANGListType(False,yc_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs_tlv, yang_name="tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  tlv = __builtin__.property(_get_tlv)


  _pyangbind_elements = OrderedDict([('tlv', tlv), ])


class yc_traffic_engineering_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/traffic-engineering. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Contents of the Traffic Engineering Opaque LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__tlvs',)

  _yang_name = 'traffic-engineering'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__tlvs = YANGDynClass(base=yc_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs, is_container='container', yang_name="tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'traffic-engineering']

  def _get_tlvs(self):
    """
    Getter method for tlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs (container)

    YANG Description: The TLVs contained in the TE Opaque LSA
    """
    return self.__tlvs
      
  def _set_tlvs(self, v, load=False):
    """
    Setter method for tlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tlvs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tlvs() directly.

    YANG Description: The TLVs contained in the TE Opaque LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs, is_container='container', yang_name="tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tlvs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs, is_container='container', yang_name="tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__tlvs = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tlvs(self):
    self.__tlvs = YANGDynClass(base=yc_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering_tlvs, is_container='container', yang_name="tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  tlvs = __builtin__.property(_get_tlvs)


  _pyangbind_elements = OrderedDict([('tlvs', tlvs), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_grace_lsa_tlvs_tlv_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/grace-lsa/tlvs/tlv/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Per-TLV state parameters of the Grace LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__period','__reason','__ip_interface_address',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'GRACE_PERIOD': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:GRACE_PERIOD': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:GRACE_PERIOD': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'GRACE_RESTART_REASON': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:GRACE_RESTART_REASON': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:GRACE_RESTART_REASON': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'GRACE_IP_INTERFACE_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:GRACE_IP_INTERFACE_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:GRACE_IP_INTERFACE_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__period = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="period", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UNKNOWN': {'value': 0}, 'SOFTWARE_RESTART': {'value': 1}, 'SOFTWARE_RELOAD_UPGRADE': {'value': 2}, 'CONTROL_PROCESSOR_SWITCH': {'value': 3}},), is_leaf=True, yang_name="reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__ip_interface_address = YANGDynClass(base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="ip-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'grace-lsa', 'tlvs', 'tlv', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/grace_lsa/tlvs/tlv/state/type (identityref)

    YANG Description: The type of the sub-TLV received within the Grace LSA
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/grace_lsa/tlvs/tlv/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: The type of the sub-TLV received within the Grace LSA
    """
    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={'GRACE_PERIOD': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:GRACE_PERIOD': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:GRACE_PERIOD': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'GRACE_RESTART_REASON': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:GRACE_RESTART_REASON': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:GRACE_RESTART_REASON': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'GRACE_IP_INTERFACE_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:GRACE_IP_INTERFACE_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:GRACE_IP_INTERFACE_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'GRACE_PERIOD': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:GRACE_PERIOD': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:GRACE_PERIOD': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'GRACE_RESTART_REASON': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:GRACE_RESTART_REASON': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:GRACE_RESTART_REASON': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'GRACE_IP_INTERFACE_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:GRACE_IP_INTERFACE_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:GRACE_IP_INTERFACE_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-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/network-instance', defining_module='openconfig-network-instance', 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={'GRACE_PERIOD': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:GRACE_PERIOD': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:GRACE_PERIOD': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'GRACE_RESTART_REASON': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:GRACE_RESTART_REASON': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:GRACE_RESTART_REASON': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'GRACE_IP_INTERFACE_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:GRACE_IP_INTERFACE_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:GRACE_IP_INTERFACE_ADDRESS': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_period(self):
    """
    Getter method for period, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/grace_lsa/tlvs/tlv/state/period (uint32)

    YANG Description: The number of seconds that the router's neighbors should advertise
the local system as fully adjacent regardless of database
synchronization state
    """
    return self.__period
      
  def _set_period(self, v, load=False):
    """
    Setter method for period, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/grace_lsa/tlvs/tlv/state/period (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_period is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_period() directly.

    YANG Description: The number of seconds that the router's neighbors should advertise
the local system as fully adjacent regardless of database
synchronization state
    """
    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="period", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """period 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="period", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__period = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_period(self):
    self.__period = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="period", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_reason(self):
    """
    Getter method for reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/grace_lsa/tlvs/tlv/state/reason (enumeration)

    YANG Description: The reason for the graceful restart event occurring, as advertised
by the restarting system
    """
    return self.__reason
      
  def _set_reason(self, v, load=False):
    """
    Setter method for reason, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/grace_lsa/tlvs/tlv/state/reason (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_reason is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_reason() directly.

    YANG Description: The reason for the graceful restart event occurring, as advertised
by the restarting system
    """
    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={'UNKNOWN': {'value': 0}, 'SOFTWARE_RESTART': {'value': 1}, 'SOFTWARE_RELOAD_UPGRADE': {'value': 2}, 'CONTROL_PROCESSOR_SWITCH': {'value': 3}},), is_leaf=True, yang_name="reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """reason must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UNKNOWN': {'value': 0}, 'SOFTWARE_RESTART': {'value': 1}, 'SOFTWARE_RELOAD_UPGRADE': {'value': 2}, 'CONTROL_PROCESSOR_SWITCH': {'value': 3}},), is_leaf=True, yang_name="reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__reason = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_reason(self):
    self.__reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UNKNOWN': {'value': 0}, 'SOFTWARE_RESTART': {'value': 1}, 'SOFTWARE_RELOAD_UPGRADE': {'value': 2}, 'CONTROL_PROCESSOR_SWITCH': {'value': 3}},), is_leaf=True, yang_name="reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_ip_interface_address(self):
    """
    Getter method for ip_interface_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/grace_lsa/tlvs/tlv/state/ip_interface_address (inet:ipv4-address-no-zone)

    YANG Description: The restarting system's IP address on the interface via which the
Grace LSA is being advertised.
    """
    return self.__ip_interface_address
      
  def _set_ip_interface_address(self, v, load=False):
    """
    Setter method for ip_interface_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/grace_lsa/tlvs/tlv/state/ip_interface_address (inet:ipv4-address-no-zone)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ip_interface_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ip_interface_address() directly.

    YANG Description: The restarting system's IP address on the interface via which the
Grace LSA is being advertised.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="ip-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ip_interface_address must be of a type compatible with inet:ipv4-address-no-zone""",
          'defined-type': "inet:ipv4-address-no-zone",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="ip-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)""",
        })

    self.__ip_interface_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ip_interface_address(self):
    self.__ip_interface_address = YANGDynClass(base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="ip-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)

  type = __builtin__.property(_get_type)
  period = __builtin__.property(_get_period)
  reason = __builtin__.property(_get_reason)
  ip_interface_address = __builtin__.property(_get_ip_interface_address)


  _pyangbind_elements = OrderedDict([('type', type), ('period', period), ('reason', reason), ('ip_interface_address', ip_interface_address), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_grace_lsa_tlvs_tlv_unknown_tlv_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/grace-lsa/tlvs/tlv/unknown-tlv/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Contents of an unknown TLV within the LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__length','__value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__value = YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'grace-lsa', 'tlvs', 'tlv', 'unknown-tlv', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/grace_lsa/tlvs/tlv/unknown_tlv/state/type (uint16)

    YANG Description: The type value of the unknown TLV
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/grace_lsa/tlvs/tlv/unknown_tlv/state/type (uint16)
    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: The type value of the unknown TLV
    """
    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="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type 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="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_length(self):
    """
    Getter method for length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/grace_lsa/tlvs/tlv/unknown_tlv/state/length (uint16)

    YANG Description: The length value of the unknown TLV
    """
    return self.__length
      
  def _set_length(self, v, load=False):
    """
    Setter method for length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/grace_lsa/tlvs/tlv/unknown_tlv/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: The length value of the unknown TLV
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/grace_lsa/tlvs/tlv/unknown_tlv/state/value (binary)

    YANG Description: The value portion of the unknwon TLV
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/grace_lsa/tlvs/tlv/unknown_tlv/state/value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: The value portion of the unknwon TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  type = __builtin__.property(_get_type)
  length = __builtin__.property(_get_length)
  value = __builtin__.property(_get_value)


  _pyangbind_elements = OrderedDict([('type', type), ('length', length), ('value', value), ])


class yc_unknown_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_grace_lsa_tlvs_tlv_unknown_tlv(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/grace-lsa/tlvs/tlv/unknown-tlv. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: An unknown TLV within the context. Unknown TLVs are
defined to be the set of TLVs that are not modelled
within the OpenConfig model, or are unknown to the
local system such that it cannot decode their value.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'unknown-tlv'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_grace_lsa_tlvs_tlv_unknown_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'grace-lsa', 'tlvs', 'tlv', 'unknown-tlv']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/grace_lsa/tlvs/tlv/unknown_tlv/state (container)

    YANG Description: Contents of an unknown TLV within the LSA
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/grace_lsa/tlvs/tlv/unknown_tlv/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: Contents of an unknown TLV within the LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_grace_lsa_tlvs_tlv_unknown_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_grace_lsa_tlvs_tlv_unknown_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_grace_lsa_tlvs_tlv_unknown_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_grace_lsa_tlvs_tlv(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/grace-lsa/tlvs/tlv. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: TLV entry in the Grace LSA, advertised by a system undergoing
graceful restart
  """
  __slots__ = ('_path_helper', '_extmethods', '__state','__unknown_tlv',)

  _yang_name = 'tlv'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_grace_lsa_tlvs_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unknown_tlv = YANGDynClass(base=yc_unknown_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_grace_lsa_tlvs_tlv_unknown_tlv, is_container='container', yang_name="unknown-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'grace-lsa', 'tlvs', 'tlv']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/grace_lsa/tlvs/tlv/state (container)

    YANG Description: Per-TLV state parameters of the Grace LSA
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/grace_lsa/tlvs/tlv/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: Per-TLV state parameters of the Grace LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_grace_lsa_tlvs_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_grace_lsa_tlvs_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_grace_lsa_tlvs_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unknown_tlv(self):
    """
    Getter method for unknown_tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/grace_lsa/tlvs/tlv/unknown_tlv (container)

    YANG Description: An unknown TLV within the context. Unknown TLVs are
defined to be the set of TLVs that are not modelled
within the OpenConfig model, or are unknown to the
local system such that it cannot decode their value.
    """
    return self.__unknown_tlv
      
  def _set_unknown_tlv(self, v, load=False):
    """
    Setter method for unknown_tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/grace_lsa/tlvs/tlv/unknown_tlv (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_tlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_tlv() directly.

    YANG Description: An unknown TLV within the context. Unknown TLVs are
defined to be the set of TLVs that are not modelled
within the OpenConfig model, or are unknown to the
local system such that it cannot decode their value.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unknown_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_grace_lsa_tlvs_tlv_unknown_tlv, is_container='container', yang_name="unknown-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_tlv must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unknown_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_grace_lsa_tlvs_tlv_unknown_tlv, is_container='container', yang_name="unknown-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unknown_tlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_tlv(self):
    self.__unknown_tlv = YANGDynClass(base=yc_unknown_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_grace_lsa_tlvs_tlv_unknown_tlv, is_container='container', yang_name="unknown-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)
  unknown_tlv = __builtin__.property(_get_unknown_tlv)


  _pyangbind_elements = OrderedDict([('state', state), ('unknown_tlv', unknown_tlv), ])


class yc_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_grace_lsa_tlvs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/grace-lsa/tlvs. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: TLVs of the Grace LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__tlv',)

  _yang_name = 'tlvs'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__tlv = YANGDynClass(base=YANGListType(False,yc_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_grace_lsa_tlvs_tlv, yang_name="tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'grace-lsa', 'tlvs']

  def _get_tlv(self):
    """
    Getter method for tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/grace_lsa/tlvs/tlv (list)

    YANG Description: TLV entry in the Grace LSA, advertised by a system undergoing
graceful restart
    """
    return self.__tlv
      
  def _set_tlv(self, v, load=False):
    """
    Setter method for tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/grace_lsa/tlvs/tlv (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tlv() directly.

    YANG Description: TLV entry in the Grace LSA, advertised by a system undergoing
graceful restart
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType(False,yc_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_grace_lsa_tlvs_tlv, yang_name="tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tlv must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType(False,yc_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_grace_lsa_tlvs_tlv, yang_name="tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__tlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tlv(self):
    self.__tlv = YANGDynClass(base=YANGListType(False,yc_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_grace_lsa_tlvs_tlv, yang_name="tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  tlv = __builtin__.property(_get_tlv)


  _pyangbind_elements = OrderedDict([('tlv', tlv), ])


class yc_grace_lsa_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_grace_lsa(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/grace-lsa. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The Grace LSA is utilised when a remote system is undergoing
graceful restart
  """
  __slots__ = ('_path_helper', '_extmethods', '__tlvs',)

  _yang_name = 'grace-lsa'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__tlvs = YANGDynClass(base=yc_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_grace_lsa_tlvs, is_container='container', yang_name="tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'grace-lsa']

  def _get_tlvs(self):
    """
    Getter method for tlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/grace_lsa/tlvs (container)

    YANG Description: TLVs of the Grace LSA
    """
    return self.__tlvs
      
  def _set_tlvs(self, v, load=False):
    """
    Setter method for tlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/grace_lsa/tlvs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tlvs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tlvs() directly.

    YANG Description: TLVs of the Grace LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_grace_lsa_tlvs, is_container='container', yang_name="tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tlvs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_grace_lsa_tlvs, is_container='container', yang_name="tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__tlvs = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tlvs(self):
    self.__tlvs = YANGDynClass(base=yc_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_grace_lsa_tlvs, is_container='container', yang_name="tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  tlvs = __builtin__.property(_get_tlvs)


  _pyangbind_elements = OrderedDict([('tlvs', tlvs), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/router-information/tlvs/tlv/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Per-TLV state parameters of the RI LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'RI_INFORMATIONAL_CAPABILITIES': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:RI_INFORMATIONAL_CAPABILITIES': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:RI_INFORMATIONAL_CAPABILITIES': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'RI_FUNCTIONAL_CAPABILITIES': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:RI_FUNCTIONAL_CAPABILITIES': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:RI_FUNCTIONAL_CAPABILITIES': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'RI_NODE_ADMIN_TAG': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:RI_NODE_ADMIN_TAG': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:RI_NODE_ADMIN_TAG': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'RI_SR_SID_LABEL_RANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:RI_SR_SID_LABEL_RANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:RI_SR_SID_LABEL_RANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'RI_SR_ALGORITHM': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:RI_SR_ALGORITHM': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:RI_SR_ALGORITHM': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UNKNOWN': {}},),], is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'router-information', 'tlvs', 'tlv', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/state/type (union)

    YANG Description: The type of sub-TLV of the Router Information opaque LSA
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/state/type (union)
    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: The type of sub-TLV of the Router Information opaque LSA
    """
    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={'RI_INFORMATIONAL_CAPABILITIES': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:RI_INFORMATIONAL_CAPABILITIES': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:RI_INFORMATIONAL_CAPABILITIES': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'RI_FUNCTIONAL_CAPABILITIES': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:RI_FUNCTIONAL_CAPABILITIES': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:RI_FUNCTIONAL_CAPABILITIES': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'RI_NODE_ADMIN_TAG': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:RI_NODE_ADMIN_TAG': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:RI_NODE_ADMIN_TAG': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'RI_SR_SID_LABEL_RANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:RI_SR_SID_LABEL_RANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:RI_SR_SID_LABEL_RANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'RI_SR_ALGORITHM': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:RI_SR_ALGORITHM': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:RI_SR_ALGORITHM': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UNKNOWN': {}},),], is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'RI_INFORMATIONAL_CAPABILITIES': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:RI_INFORMATIONAL_CAPABILITIES': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:RI_INFORMATIONAL_CAPABILITIES': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'RI_FUNCTIONAL_CAPABILITIES': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:RI_FUNCTIONAL_CAPABILITIES': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:RI_FUNCTIONAL_CAPABILITIES': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'RI_NODE_ADMIN_TAG': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:RI_NODE_ADMIN_TAG': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:RI_NODE_ADMIN_TAG': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'RI_SR_SID_LABEL_RANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:RI_SR_SID_LABEL_RANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:RI_SR_SID_LABEL_RANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'RI_SR_ALGORITHM': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:RI_SR_ALGORITHM': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:RI_SR_ALGORITHM': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UNKNOWN': {}},),], is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', 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={'RI_INFORMATIONAL_CAPABILITIES': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:RI_INFORMATIONAL_CAPABILITIES': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:RI_INFORMATIONAL_CAPABILITIES': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'RI_FUNCTIONAL_CAPABILITIES': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:RI_FUNCTIONAL_CAPABILITIES': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:RI_FUNCTIONAL_CAPABILITIES': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'RI_NODE_ADMIN_TAG': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:RI_NODE_ADMIN_TAG': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:RI_NODE_ADMIN_TAG': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'RI_SR_SID_LABEL_RANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:RI_SR_SID_LABEL_RANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:RI_SR_SID_LABEL_RANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'RI_SR_ALGORITHM': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:RI_SR_ALGORITHM': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:RI_SR_ALGORITHM': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UNKNOWN': {}},),], is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)

  type = __builtin__.property(_get_type)


  _pyangbind_elements = OrderedDict([('type', type), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_unknown_tlv_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/router-information/tlvs/tlv/unknown-tlv/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Contents of an unknown TLV within the LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__length','__value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__value = YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'router-information', 'tlvs', 'tlv', 'unknown-tlv', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/unknown_tlv/state/type (uint16)

    YANG Description: The type value of the unknown TLV
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/unknown_tlv/state/type (uint16)
    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: The type value of the unknown TLV
    """
    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="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type 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="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_length(self):
    """
    Getter method for length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/unknown_tlv/state/length (uint16)

    YANG Description: The length value of the unknown TLV
    """
    return self.__length
      
  def _set_length(self, v, load=False):
    """
    Setter method for length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/unknown_tlv/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: The length value of the unknown TLV
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/unknown_tlv/state/value (binary)

    YANG Description: The value portion of the unknwon TLV
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/unknown_tlv/state/value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: The value portion of the unknwon TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  type = __builtin__.property(_get_type)
  length = __builtin__.property(_get_length)
  value = __builtin__.property(_get_value)


  _pyangbind_elements = OrderedDict([('type', type), ('length', length), ('value', value), ])


class yc_unknown_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_unknown_tlv(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/router-information/tlvs/tlv/unknown-tlv. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: An unknown TLV within the context. Unknown TLVs are
defined to be the set of TLVs that are not modelled
within the OpenConfig model, or are unknown to the
local system such that it cannot decode their value.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'unknown-tlv'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_unknown_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'router-information', 'tlvs', 'tlv', 'unknown-tlv']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/unknown_tlv/state (container)

    YANG Description: Contents of an unknown TLV within the LSA
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/unknown_tlv/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: Contents of an unknown TLV within the LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_unknown_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_unknown_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_unknown_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_informational_capabilities_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/router-information/tlvs/tlv/informational-capabilities/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of the informational capabilitis of the
RI LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__graceful_restart_capable','__graceful_restart_helper','__stub_router','__traffic_engineering','__point_to_point_over_lan','__experimental_te',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__graceful_restart_capable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="graceful-restart-capable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__graceful_restart_helper = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="graceful-restart-helper", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__stub_router = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="stub-router", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__traffic_engineering = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="traffic-engineering", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__point_to_point_over_lan = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="point-to-point-over-lan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__experimental_te = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="experimental-te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'router-information', 'tlvs', 'tlv', 'informational-capabilities', 'state']

  def _get_graceful_restart_capable(self):
    """
    Getter method for graceful_restart_capable, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/informational_capabilities/state/graceful_restart_capable (boolean)

    YANG Description: When this leaf is set to true, the advertising system is capable of
OSPF graceful restart.
    """
    return self.__graceful_restart_capable
      
  def _set_graceful_restart_capable(self, v, load=False):
    """
    Setter method for graceful_restart_capable, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/informational_capabilities/state/graceful_restart_capable (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_graceful_restart_capable is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_graceful_restart_capable() directly.

    YANG Description: When this leaf is set to true, the advertising system is capable of
OSPF graceful restart.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="graceful-restart-capable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """graceful_restart_capable must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="graceful-restart-capable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__graceful_restart_capable = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_graceful_restart_capable(self):
    self.__graceful_restart_capable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="graceful-restart-capable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_graceful_restart_helper(self):
    """
    Getter method for graceful_restart_helper, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/informational_capabilities/state/graceful_restart_helper (boolean)

    YANG Description: When this leaf is set to true, the advertising system is capable of
being a helper for OSPF graceful restart
    """
    return self.__graceful_restart_helper
      
  def _set_graceful_restart_helper(self, v, load=False):
    """
    Setter method for graceful_restart_helper, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/informational_capabilities/state/graceful_restart_helper (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_graceful_restart_helper is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_graceful_restart_helper() directly.

    YANG Description: When this leaf is set to true, the advertising system is capable of
being a helper for OSPF graceful restart
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="graceful-restart-helper", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """graceful_restart_helper must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="graceful-restart-helper", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__graceful_restart_helper = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_graceful_restart_helper(self):
    self.__graceful_restart_helper = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="graceful-restart-helper", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_stub_router(self):
    """
    Getter method for stub_router, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/informational_capabilities/state/stub_router (boolean)

    YANG Description: When this leaf is set to true, the advertising system is able to
advertise its status as a stub router
    """
    return self.__stub_router
      
  def _set_stub_router(self, v, load=False):
    """
    Setter method for stub_router, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/informational_capabilities/state/stub_router (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_stub_router is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_stub_router() directly.

    YANG Description: When this leaf is set to true, the advertising system is able to
advertise its status as a stub router
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="stub-router", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """stub_router must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="stub-router", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__stub_router = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_stub_router(self):
    self.__stub_router = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="stub-router", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_traffic_engineering(self):
    """
    Getter method for traffic_engineering, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/informational_capabilities/state/traffic_engineering (boolean)

    YANG Description: When this leaf is set to true, the advertising system supports OSPFv2
traffic engineering capabilities
    """
    return self.__traffic_engineering
      
  def _set_traffic_engineering(self, v, load=False):
    """
    Setter method for traffic_engineering, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/informational_capabilities/state/traffic_engineering (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_traffic_engineering is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_traffic_engineering() directly.

    YANG Description: When this leaf is set to true, the advertising system supports OSPFv2
traffic engineering capabilities
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="traffic-engineering", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """traffic_engineering must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="traffic-engineering", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__traffic_engineering = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_traffic_engineering(self):
    self.__traffic_engineering = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="traffic-engineering", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_point_to_point_over_lan(self):
    """
    Getter method for point_to_point_over_lan, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/informational_capabilities/state/point_to_point_over_lan (boolean)

    YANG Description: When this leaf is set to true, the advertising system supports treating
LAN adjacencies as though they were point to point
    """
    return self.__point_to_point_over_lan
      
  def _set_point_to_point_over_lan(self, v, load=False):
    """
    Setter method for point_to_point_over_lan, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/informational_capabilities/state/point_to_point_over_lan (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_point_to_point_over_lan is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_point_to_point_over_lan() directly.

    YANG Description: When this leaf is set to true, the advertising system supports treating
LAN adjacencies as though they were point to point
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="point-to-point-over-lan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """point_to_point_over_lan must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="point-to-point-over-lan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__point_to_point_over_lan = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_point_to_point_over_lan(self):
    self.__point_to_point_over_lan = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="point-to-point-over-lan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_experimental_te(self):
    """
    Getter method for experimental_te, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/informational_capabilities/state/experimental_te (boolean)

    YANG Description: When this leaf is set to ture, the advertising system supports the
experimental extensions to OSPF for TE described in RFC4973
    """
    return self.__experimental_te
      
  def _set_experimental_te(self, v, load=False):
    """
    Setter method for experimental_te, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/informational_capabilities/state/experimental_te (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_experimental_te is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_experimental_te() directly.

    YANG Description: When this leaf is set to ture, the advertising system supports the
experimental extensions to OSPF for TE described in RFC4973
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="experimental-te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """experimental_te must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="experimental-te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__experimental_te = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_experimental_te(self):
    self.__experimental_te = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="experimental-te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  graceful_restart_capable = __builtin__.property(_get_graceful_restart_capable)
  graceful_restart_helper = __builtin__.property(_get_graceful_restart_helper)
  stub_router = __builtin__.property(_get_stub_router)
  traffic_engineering = __builtin__.property(_get_traffic_engineering)
  point_to_point_over_lan = __builtin__.property(_get_point_to_point_over_lan)
  experimental_te = __builtin__.property(_get_experimental_te)


  _pyangbind_elements = OrderedDict([('graceful_restart_capable', graceful_restart_capable), ('graceful_restart_helper', graceful_restart_helper), ('stub_router', stub_router), ('traffic_engineering', traffic_engineering), ('point_to_point_over_lan', point_to_point_over_lan), ('experimental_te', experimental_te), ])


class yc_informational_capabilities_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_informational_capabilities(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/router-information/tlvs/tlv/informational-capabilities. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Information related to the capabilities of the advertising
router within the scope that the opaque RI LSA is being
advertised
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'informational-capabilities'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_informational_capabilities_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'router-information', 'tlvs', 'tlv', 'informational-capabilities']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/informational_capabilities/state (container)

    YANG Description: State parameters of the informational capabilitis of the
RI LSA
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/informational_capabilities/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 parameters of the informational capabilitis of the
RI LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_informational_capabilities_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_informational_capabilities_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_informational_capabilities_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_node_administrative_tags_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/router-information/tlvs/tlv/node-administrative-tags/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of the node administrative tags advertised
in the RI LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__administrative_tags',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__administrative_tags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="administrative-tags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'router-information', 'tlvs', 'tlv', 'node-administrative-tags', 'state']

  def _get_administrative_tags(self):
    """
    Getter method for administrative_tags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/node_administrative_tags/state/administrative_tags (uint32)

    YANG Description: The set of administrative tags assigned to the local system by
the network operator. The meaning of these tags is opaque to OSPF
- and their interpretation is per-domain specific
    """
    return self.__administrative_tags
      
  def _set_administrative_tags(self, v, load=False):
    """
    Setter method for administrative_tags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/node_administrative_tags/state/administrative_tags (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_administrative_tags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_administrative_tags() directly.

    YANG Description: The set of administrative tags assigned to the local system by
the network operator. The meaning of these tags is opaque to OSPF
- and their interpretation is per-domain specific
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="administrative-tags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """administrative_tags must be of a type compatible with uint32""",
          'defined-type': "uint32",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="administrative-tags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__administrative_tags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_administrative_tags(self):
    self.__administrative_tags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="administrative-tags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  administrative_tags = __builtin__.property(_get_administrative_tags)


  _pyangbind_elements = OrderedDict([('administrative_tags', administrative_tags), ])


class yc_node_administrative_tags_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_node_administrative_tags(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/router-information/tlvs/tlv/node-administrative-tags. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Per-node administrative tags associated with the local system
specified by the operator
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'node-administrative-tags'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_node_administrative_tags_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'router-information', 'tlvs', 'tlv', 'node-administrative-tags']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/node_administrative_tags/state (container)

    YANG Description: State parameters of the node administrative tags advertised
in the RI LSA
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/node_administrative_tags/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 parameters of the node administrative tags advertised
in the RI LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_node_administrative_tags_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_node_administrative_tags_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_node_administrative_tags_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_algorithm_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/router-information/tlvs/tlv/segment-routing-algorithm/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of the Segment Routing algorithm advertised in
the RI LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__supported_algorithms',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__supported_algorithms = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'SPF': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:SPF': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:SPF': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'STRICT_SPF': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:STRICT_SPF': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:STRICT_SPF': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},)), is_leaf=False, yang_name="supported-algorithms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'router-information', 'tlvs', 'tlv', 'segment-routing-algorithm', 'state']

  def _get_supported_algorithms(self):
    """
    Getter method for supported_algorithms, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/segment_routing_algorithm/state/supported_algorithms (identityref)

    YANG Description: A list of the algorithms that are supported for segment routing
by the advertising system
    """
    return self.__supported_algorithms
      
  def _set_supported_algorithms(self, v, load=False):
    """
    Setter method for supported_algorithms, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/segment_routing_algorithm/state/supported_algorithms (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_supported_algorithms is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_supported_algorithms() directly.

    YANG Description: A list of the algorithms that are supported for segment routing
by the advertising system
    """
    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={'SPF': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:SPF': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:SPF': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'STRICT_SPF': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:STRICT_SPF': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:STRICT_SPF': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},)), is_leaf=False, yang_name="supported-algorithms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """supported_algorithms must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'SPF': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:SPF': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:SPF': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'STRICT_SPF': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:STRICT_SPF': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:STRICT_SPF': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},)), is_leaf=False, yang_name="supported-algorithms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__supported_algorithms = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_supported_algorithms(self):
    self.__supported_algorithms = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'SPF': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:SPF': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:SPF': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'STRICT_SPF': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:STRICT_SPF': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:STRICT_SPF': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},)), is_leaf=False, yang_name="supported-algorithms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  supported_algorithms = __builtin__.property(_get_supported_algorithms)


  _pyangbind_elements = OrderedDict([('supported_algorithms', supported_algorithms), ])


class yc_segment_routing_algorithm_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_algorithm(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/router-information/tlvs/tlv/segment-routing-algorithm. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The algorithms supported for Segment Routing by the local system
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'segment-routing-algorithm'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_algorithm_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'router-information', 'tlvs', 'tlv', 'segment-routing-algorithm']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/segment_routing_algorithm/state (container)

    YANG Description: State parameters of the Segment Routing algorithm advertised in
the RI LSA
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/segment_routing_algorithm/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 parameters of the Segment Routing algorithm advertised in
the RI LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_algorithm_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_algorithm_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_algorithm_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_sid_label_range_tlvs_tlv_unknown_tlv_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/router-information/tlvs/tlv/segment-routing-sid-label-range/tlvs/tlv/unknown-tlv/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Contents of an unknown TLV within the LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__length','__value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__value = YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'router-information', 'tlvs', 'tlv', 'segment-routing-sid-label-range', 'tlvs', 'tlv', 'unknown-tlv', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/segment_routing_sid_label_range/tlvs/tlv/unknown_tlv/state/type (uint16)

    YANG Description: The type value of the unknown TLV
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/segment_routing_sid_label_range/tlvs/tlv/unknown_tlv/state/type (uint16)
    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: The type value of the unknown TLV
    """
    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="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type 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="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_length(self):
    """
    Getter method for length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/segment_routing_sid_label_range/tlvs/tlv/unknown_tlv/state/length (uint16)

    YANG Description: The length value of the unknown TLV
    """
    return self.__length
      
  def _set_length(self, v, load=False):
    """
    Setter method for length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/segment_routing_sid_label_range/tlvs/tlv/unknown_tlv/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: The length value of the unknown TLV
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/segment_routing_sid_label_range/tlvs/tlv/unknown_tlv/state/value (binary)

    YANG Description: The value portion of the unknwon TLV
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/segment_routing_sid_label_range/tlvs/tlv/unknown_tlv/state/value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: The value portion of the unknwon TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  type = __builtin__.property(_get_type)
  length = __builtin__.property(_get_length)
  value = __builtin__.property(_get_value)


  _pyangbind_elements = OrderedDict([('type', type), ('length', length), ('value', value), ])


class yc_unknown_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_sid_label_range_tlvs_tlv_unknown_tlv(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/router-information/tlvs/tlv/segment-routing-sid-label-range/tlvs/tlv/unknown-tlv. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: An unknown TLV within the context. Unknown TLVs are
defined to be the set of TLVs that are not modelled
within the OpenConfig model, or are unknown to the
local system such that it cannot decode their value.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'unknown-tlv'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_sid_label_range_tlvs_tlv_unknown_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'router-information', 'tlvs', 'tlv', 'segment-routing-sid-label-range', 'tlvs', 'tlv', 'unknown-tlv']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/segment_routing_sid_label_range/tlvs/tlv/unknown_tlv/state (container)

    YANG Description: Contents of an unknown TLV within the LSA
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/segment_routing_sid_label_range/tlvs/tlv/unknown_tlv/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: Contents of an unknown TLV within the LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_sid_label_range_tlvs_tlv_unknown_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_sid_label_range_tlvs_tlv_unknown_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_sid_label_range_tlvs_tlv_unknown_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_sid_label_range_tlvs_tlv_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/router-information/tlvs/tlv/segment-routing-sid-label-range/tlvs/tlv/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of the sub-TLVs of the SR/Label range TLV
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__range_size',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'SR_SID_LABEL_TLV': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:SR_SID_LABEL_TLV': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:SR_SID_LABEL_TLV': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UNKNOWN': {}},),], is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    self.__range_size = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..16777216']}), is_leaf=True, yang_name="range-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'router-information', 'tlvs', 'tlv', 'segment-routing-sid-label-range', 'tlvs', 'tlv', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/segment_routing_sid_label_range/tlvs/tlv/state/type (union)

    YANG Description: The type of the sub-TLV received by the local system within the
SR SID/Label Range TLV of the RI LSA
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/segment_routing_sid_label_range/tlvs/tlv/state/type (union)
    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: The type of the sub-TLV received by the local system within the
SR SID/Label Range TLV of the RI LSA
    """
    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={'SR_SID_LABEL_TLV': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:SR_SID_LABEL_TLV': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:SR_SID_LABEL_TLV': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UNKNOWN': {}},),], is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'SR_SID_LABEL_TLV': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:SR_SID_LABEL_TLV': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:SR_SID_LABEL_TLV': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UNKNOWN': {}},),], is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', 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={'SR_SID_LABEL_TLV': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:SR_SID_LABEL_TLV': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:SR_SID_LABEL_TLV': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UNKNOWN': {}},),], is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)


  def _get_range_size(self):
    """
    Getter method for range_size, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/segment_routing_sid_label_range/tlvs/tlv/state/range_size (uint32)

    YANG Description: The number of entries within the range being described within the
SID/Label range TLV
    """
    return self.__range_size
      
  def _set_range_size(self, v, load=False):
    """
    Setter method for range_size, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/segment_routing_sid_label_range/tlvs/tlv/state/range_size (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_range_size is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_range_size() directly.

    YANG Description: The number of entries within the range being described within the
SID/Label range TLV
    """
    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..16777216']}), is_leaf=True, yang_name="range-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """range_size must be of a type compatible with uint32""",
          'defined-type': "uint32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..16777216']}), is_leaf=True, yang_name="range-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__range_size = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_range_size(self):
    self.__range_size = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..16777216']}), is_leaf=True, yang_name="range-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  type = __builtin__.property(_get_type)
  range_size = __builtin__.property(_get_range_size)


  _pyangbind_elements = OrderedDict([('type', type), ('range_size', range_size), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_sid_label_range_tlvs_tlv_sid_label_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/router-information/tlvs/tlv/segment-routing-sid-label-range/tlvs/tlv/sid-label/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of the SID/Label sub-TLV of the SR/Label
range TLV of the RI LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__entry_type','__first_value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__entry_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LABEL': {}, 'SID': {}},), is_leaf=True, yang_name="entry-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:sr-sid-type', is_config=False)
    self.__first_value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="first-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'router-information', 'tlvs', 'tlv', 'segment-routing-sid-label-range', 'tlvs', 'tlv', 'sid-label', 'state']

  def _get_entry_type(self):
    """
    Getter method for entry_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/segment_routing_sid_label_range/tlvs/tlv/sid_label/state/entry_type (oc-ospf-types:sr-sid-type)

    YANG Description: The type of entry that is contained within the sub-TLV. The range may
be represented as either a range of MPLS labels, or numeric segment
identifiers
    """
    return self.__entry_type
      
  def _set_entry_type(self, v, load=False):
    """
    Setter method for entry_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/segment_routing_sid_label_range/tlvs/tlv/sid_label/state/entry_type (oc-ospf-types:sr-sid-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_entry_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_entry_type() directly.

    YANG Description: The type of entry that is contained within the sub-TLV. The range may
be represented as either a range of MPLS labels, or numeric segment
identifiers
    """
    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={'LABEL': {}, 'SID': {}},), is_leaf=True, yang_name="entry-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:sr-sid-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """entry_type must be of a type compatible with oc-ospf-types:sr-sid-type""",
          'defined-type': "oc-ospf-types:sr-sid-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LABEL': {}, 'SID': {}},), is_leaf=True, yang_name="entry-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:sr-sid-type', is_config=False)""",
        })

    self.__entry_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_entry_type(self):
    self.__entry_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LABEL': {}, 'SID': {}},), is_leaf=True, yang_name="entry-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:sr-sid-type', is_config=False)


  def _get_first_value(self):
    """
    Getter method for first_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/segment_routing_sid_label_range/tlvs/tlv/sid_label/state/first_value (uint32)

    YANG Description: The first value within the SRGB range being specified. The type of the
entry is determined based on the value of the entry type as this value
may represent either a segment identifier or an MPLS label.
    """
    return self.__first_value
      
  def _set_first_value(self, v, load=False):
    """
    Setter method for first_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/segment_routing_sid_label_range/tlvs/tlv/sid_label/state/first_value (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_first_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_first_value() directly.

    YANG Description: The first value within the SRGB range being specified. The type of the
entry is determined based on the value of the entry type as this value
may represent either a segment identifier or an MPLS label.
    """
    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="first-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """first_value 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="first-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__first_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_first_value(self):
    self.__first_value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="first-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  entry_type = __builtin__.property(_get_entry_type)
  first_value = __builtin__.property(_get_first_value)


  _pyangbind_elements = OrderedDict([('entry_type', entry_type), ('first_value', first_value), ])


class yc_sid_label_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_sid_label_range_tlvs_tlv_sid_label(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/router-information/tlvs/tlv/segment-routing-sid-label-range/tlvs/tlv/sid-label. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Sub-TLV used to advertise the SID or label associated with the
subset of the SRGB being advertised
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'sid-label'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_sid_label_range_tlvs_tlv_sid_label_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'router-information', 'tlvs', 'tlv', 'segment-routing-sid-label-range', 'tlvs', 'tlv', 'sid-label']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/segment_routing_sid_label_range/tlvs/tlv/sid_label/state (container)

    YANG Description: State parameters of the SID/Label sub-TLV of the SR/Label
range TLV of the RI LSA
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/segment_routing_sid_label_range/tlvs/tlv/sid_label/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 parameters of the SID/Label sub-TLV of the SR/Label
range TLV of the RI LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_sid_label_range_tlvs_tlv_sid_label_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_sid_label_range_tlvs_tlv_sid_label_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_sid_label_range_tlvs_tlv_sid_label_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_sid_label_range_tlvs_tlv(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/router-information/tlvs/tlv/segment-routing-sid-label-range/tlvs/tlv. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Sub-TLVs of the SID/Label range TLV
  """
  __slots__ = ('_path_helper', '_extmethods', '__unknown_tlv','__state','__sid_label',)

  _yang_name = 'tlv'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__unknown_tlv = YANGDynClass(base=yc_unknown_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_sid_label_range_tlvs_tlv_unknown_tlv, is_container='container', yang_name="unknown-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_sid_label_range_tlvs_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__sid_label = YANGDynClass(base=yc_sid_label_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_sid_label_range_tlvs_tlv_sid_label, is_container='container', yang_name="sid-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'router-information', 'tlvs', 'tlv', 'segment-routing-sid-label-range', 'tlvs', 'tlv']

  def _get_unknown_tlv(self):
    """
    Getter method for unknown_tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/segment_routing_sid_label_range/tlvs/tlv/unknown_tlv (container)

    YANG Description: An unknown TLV within the context. Unknown TLVs are
defined to be the set of TLVs that are not modelled
within the OpenConfig model, or are unknown to the
local system such that it cannot decode their value.
    """
    return self.__unknown_tlv
      
  def _set_unknown_tlv(self, v, load=False):
    """
    Setter method for unknown_tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/segment_routing_sid_label_range/tlvs/tlv/unknown_tlv (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_tlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_tlv() directly.

    YANG Description: An unknown TLV within the context. Unknown TLVs are
defined to be the set of TLVs that are not modelled
within the OpenConfig model, or are unknown to the
local system such that it cannot decode their value.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unknown_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_sid_label_range_tlvs_tlv_unknown_tlv, is_container='container', yang_name="unknown-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_tlv must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unknown_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_sid_label_range_tlvs_tlv_unknown_tlv, is_container='container', yang_name="unknown-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unknown_tlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_tlv(self):
    self.__unknown_tlv = YANGDynClass(base=yc_unknown_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_sid_label_range_tlvs_tlv_unknown_tlv, is_container='container', yang_name="unknown-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/segment_routing_sid_label_range/tlvs/tlv/state (container)

    YANG Description: State parameters of the sub-TLVs of the SR/Label range TLV
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/segment_routing_sid_label_range/tlvs/tlv/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 parameters of the sub-TLVs of the SR/Label range TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_sid_label_range_tlvs_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_sid_label_range_tlvs_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_sid_label_range_tlvs_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_sid_label(self):
    """
    Getter method for sid_label, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/segment_routing_sid_label_range/tlvs/tlv/sid_label (container)

    YANG Description: Sub-TLV used to advertise the SID or label associated with the
subset of the SRGB being advertised
    """
    return self.__sid_label
      
  def _set_sid_label(self, v, load=False):
    """
    Setter method for sid_label, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/segment_routing_sid_label_range/tlvs/tlv/sid_label (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sid_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sid_label() directly.

    YANG Description: Sub-TLV used to advertise the SID or label associated with the
subset of the SRGB being advertised
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_sid_label_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_sid_label_range_tlvs_tlv_sid_label, is_container='container', yang_name="sid-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sid_label must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_sid_label_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_sid_label_range_tlvs_tlv_sid_label, is_container='container', yang_name="sid-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__sid_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sid_label(self):
    self.__sid_label = YANGDynClass(base=yc_sid_label_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_sid_label_range_tlvs_tlv_sid_label, is_container='container', yang_name="sid-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  unknown_tlv = __builtin__.property(_get_unknown_tlv)
  state = __builtin__.property(_get_state)
  sid_label = __builtin__.property(_get_sid_label)


  _pyangbind_elements = OrderedDict([('unknown_tlv', unknown_tlv), ('state', state), ('sid_label', sid_label), ])


class yc_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_sid_label_range_tlvs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/router-information/tlvs/tlv/segment-routing-sid-label-range/tlvs. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Sub-TLVs of the SID/Label range TLV of the RI LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__tlv',)

  _yang_name = 'tlvs'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__tlv = YANGDynClass(base=YANGListType(False,yc_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_sid_label_range_tlvs_tlv, yang_name="tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'router-information', 'tlvs', 'tlv', 'segment-routing-sid-label-range', 'tlvs']

  def _get_tlv(self):
    """
    Getter method for tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/segment_routing_sid_label_range/tlvs/tlv (list)

    YANG Description: Sub-TLVs of the SID/Label range TLV
    """
    return self.__tlv
      
  def _set_tlv(self, v, load=False):
    """
    Setter method for tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/segment_routing_sid_label_range/tlvs/tlv (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tlv() directly.

    YANG Description: Sub-TLVs of the SID/Label range TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType(False,yc_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_sid_label_range_tlvs_tlv, yang_name="tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tlv must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType(False,yc_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_sid_label_range_tlvs_tlv, yang_name="tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__tlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tlv(self):
    self.__tlv = YANGDynClass(base=YANGListType(False,yc_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_sid_label_range_tlvs_tlv, yang_name="tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  tlv = __builtin__.property(_get_tlv)


  _pyangbind_elements = OrderedDict([('tlv', tlv), ])


class yc_segment_routing_sid_label_range_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_sid_label_range(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/router-information/tlvs/tlv/segment-routing-sid-label-range. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The Segment Identifier (SID) or label ranges that are supported by
the local system for Segment Routing
  """
  __slots__ = ('_path_helper', '_extmethods', '__tlvs',)

  _yang_name = 'segment-routing-sid-label-range'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__tlvs = YANGDynClass(base=yc_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_sid_label_range_tlvs, is_container='container', yang_name="tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'router-information', 'tlvs', 'tlv', 'segment-routing-sid-label-range']

  def _get_tlvs(self):
    """
    Getter method for tlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/segment_routing_sid_label_range/tlvs (container)

    YANG Description: Sub-TLVs of the SID/Label range TLV of the RI LSA
    """
    return self.__tlvs
      
  def _set_tlvs(self, v, load=False):
    """
    Setter method for tlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/segment_routing_sid_label_range/tlvs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tlvs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tlvs() directly.

    YANG Description: Sub-TLVs of the SID/Label range TLV of the RI LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_sid_label_range_tlvs, is_container='container', yang_name="tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tlvs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_sid_label_range_tlvs, is_container='container', yang_name="tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__tlvs = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tlvs(self):
    self.__tlvs = YANGDynClass(base=yc_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_sid_label_range_tlvs, is_container='container', yang_name="tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  tlvs = __builtin__.property(_get_tlvs)


  _pyangbind_elements = OrderedDict([('tlvs', tlvs), ])


class yc_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/router-information/tlvs/tlv. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: TLV entry in the Router Information LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__state','__unknown_tlv','__informational_capabilities','__node_administrative_tags','__segment_routing_algorithm','__segment_routing_sid_label_range',)

  _yang_name = 'tlv'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unknown_tlv = YANGDynClass(base=yc_unknown_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_unknown_tlv, is_container='container', yang_name="unknown-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__informational_capabilities = YANGDynClass(base=yc_informational_capabilities_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_informational_capabilities, is_container='container', yang_name="informational-capabilities", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__node_administrative_tags = YANGDynClass(base=yc_node_administrative_tags_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_node_administrative_tags, is_container='container', yang_name="node-administrative-tags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__segment_routing_algorithm = YANGDynClass(base=yc_segment_routing_algorithm_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_algorithm, is_container='container', yang_name="segment-routing-algorithm", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__segment_routing_sid_label_range = YANGDynClass(base=yc_segment_routing_sid_label_range_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_sid_label_range, is_container='container', yang_name="segment-routing-sid-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'router-information', 'tlvs', 'tlv']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/state (container)

    YANG Description: Per-TLV state parameters of the RI LSA
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/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: Per-TLV state parameters of the RI LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unknown_tlv(self):
    """
    Getter method for unknown_tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/unknown_tlv (container)

    YANG Description: An unknown TLV within the context. Unknown TLVs are
defined to be the set of TLVs that are not modelled
within the OpenConfig model, or are unknown to the
local system such that it cannot decode their value.
    """
    return self.__unknown_tlv
      
  def _set_unknown_tlv(self, v, load=False):
    """
    Setter method for unknown_tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/unknown_tlv (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_tlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_tlv() directly.

    YANG Description: An unknown TLV within the context. Unknown TLVs are
defined to be the set of TLVs that are not modelled
within the OpenConfig model, or are unknown to the
local system such that it cannot decode their value.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unknown_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_unknown_tlv, is_container='container', yang_name="unknown-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_tlv must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unknown_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_unknown_tlv, is_container='container', yang_name="unknown-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unknown_tlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_tlv(self):
    self.__unknown_tlv = YANGDynClass(base=yc_unknown_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_unknown_tlv, is_container='container', yang_name="unknown-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_informational_capabilities(self):
    """
    Getter method for informational_capabilities, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/informational_capabilities (container)

    YANG Description: Information related to the capabilities of the advertising
router within the scope that the opaque RI LSA is being
advertised
    """
    return self.__informational_capabilities
      
  def _set_informational_capabilities(self, v, load=False):
    """
    Setter method for informational_capabilities, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/informational_capabilities (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_informational_capabilities is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_informational_capabilities() directly.

    YANG Description: Information related to the capabilities of the advertising
router within the scope that the opaque RI LSA is being
advertised
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_informational_capabilities_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_informational_capabilities, is_container='container', yang_name="informational-capabilities", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """informational_capabilities must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_informational_capabilities_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_informational_capabilities, is_container='container', yang_name="informational-capabilities", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__informational_capabilities = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_informational_capabilities(self):
    self.__informational_capabilities = YANGDynClass(base=yc_informational_capabilities_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_informational_capabilities, is_container='container', yang_name="informational-capabilities", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_node_administrative_tags(self):
    """
    Getter method for node_administrative_tags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/node_administrative_tags (container)

    YANG Description: Per-node administrative tags associated with the local system
specified by the operator
    """
    return self.__node_administrative_tags
      
  def _set_node_administrative_tags(self, v, load=False):
    """
    Setter method for node_administrative_tags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/node_administrative_tags (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_node_administrative_tags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_node_administrative_tags() directly.

    YANG Description: Per-node administrative tags associated with the local system
specified by the operator
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_node_administrative_tags_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_node_administrative_tags, is_container='container', yang_name="node-administrative-tags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """node_administrative_tags must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_node_administrative_tags_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_node_administrative_tags, is_container='container', yang_name="node-administrative-tags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__node_administrative_tags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_node_administrative_tags(self):
    self.__node_administrative_tags = YANGDynClass(base=yc_node_administrative_tags_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_node_administrative_tags, is_container='container', yang_name="node-administrative-tags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_segment_routing_algorithm(self):
    """
    Getter method for segment_routing_algorithm, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/segment_routing_algorithm (container)

    YANG Description: The algorithms supported for Segment Routing by the local system
    """
    return self.__segment_routing_algorithm
      
  def _set_segment_routing_algorithm(self, v, load=False):
    """
    Setter method for segment_routing_algorithm, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/segment_routing_algorithm (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_segment_routing_algorithm is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_segment_routing_algorithm() directly.

    YANG Description: The algorithms supported for Segment Routing by the local system
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_segment_routing_algorithm_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_algorithm, is_container='container', yang_name="segment-routing-algorithm", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """segment_routing_algorithm must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_segment_routing_algorithm_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_algorithm, is_container='container', yang_name="segment-routing-algorithm", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__segment_routing_algorithm = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_segment_routing_algorithm(self):
    self.__segment_routing_algorithm = YANGDynClass(base=yc_segment_routing_algorithm_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_algorithm, is_container='container', yang_name="segment-routing-algorithm", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_segment_routing_sid_label_range(self):
    """
    Getter method for segment_routing_sid_label_range, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/segment_routing_sid_label_range (container)

    YANG Description: The Segment Identifier (SID) or label ranges that are supported by
the local system for Segment Routing
    """
    return self.__segment_routing_sid_label_range
      
  def _set_segment_routing_sid_label_range(self, v, load=False):
    """
    Setter method for segment_routing_sid_label_range, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv/segment_routing_sid_label_range (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_segment_routing_sid_label_range is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_segment_routing_sid_label_range() directly.

    YANG Description: The Segment Identifier (SID) or label ranges that are supported by
the local system for Segment Routing
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_segment_routing_sid_label_range_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_sid_label_range, is_container='container', yang_name="segment-routing-sid-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """segment_routing_sid_label_range must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_segment_routing_sid_label_range_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_sid_label_range, is_container='container', yang_name="segment-routing-sid-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__segment_routing_sid_label_range = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_segment_routing_sid_label_range(self):
    self.__segment_routing_sid_label_range = YANGDynClass(base=yc_segment_routing_sid_label_range_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv_segment_routing_sid_label_range, is_container='container', yang_name="segment-routing-sid-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)
  unknown_tlv = __builtin__.property(_get_unknown_tlv)
  informational_capabilities = __builtin__.property(_get_informational_capabilities)
  node_administrative_tags = __builtin__.property(_get_node_administrative_tags)
  segment_routing_algorithm = __builtin__.property(_get_segment_routing_algorithm)
  segment_routing_sid_label_range = __builtin__.property(_get_segment_routing_sid_label_range)


  _pyangbind_elements = OrderedDict([('state', state), ('unknown_tlv', unknown_tlv), ('informational_capabilities', informational_capabilities), ('node_administrative_tags', node_administrative_tags), ('segment_routing_algorithm', segment_routing_algorithm), ('segment_routing_sid_label_range', segment_routing_sid_label_range), ])


class yc_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/router-information/tlvs. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The TLVs included within the Router Information LSA.
  """
  __slots__ = ('_path_helper', '_extmethods', '__tlv',)

  _yang_name = 'tlvs'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__tlv = YANGDynClass(base=YANGListType(False,yc_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv, yang_name="tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'router-information', 'tlvs']

  def _get_tlv(self):
    """
    Getter method for tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv (list)

    YANG Description: TLV entry in the Router Information LSA
    """
    return self.__tlv
      
  def _set_tlv(self, v, load=False):
    """
    Setter method for tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs/tlv (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tlv() directly.

    YANG Description: TLV entry in the Router Information LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType(False,yc_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv, yang_name="tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tlv must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType(False,yc_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv, yang_name="tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__tlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tlv(self):
    self.__tlv = YANGDynClass(base=YANGListType(False,yc_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs_tlv, yang_name="tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  tlv = __builtin__.property(_get_tlv)


  _pyangbind_elements = OrderedDict([('tlv', tlv), ])


class yc_router_information_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/router-information. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The router information LSA is utilised to advertise capabilities
of a system to other systems who receive the LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__tlvs',)

  _yang_name = 'router-information'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__tlvs = YANGDynClass(base=yc_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs, is_container='container', yang_name="tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'router-information']

  def _get_tlvs(self):
    """
    Getter method for tlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs (container)

    YANG Description: The TLVs included within the Router Information LSA.
    """
    return self.__tlvs
      
  def _set_tlvs(self, v, load=False):
    """
    Setter method for tlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information/tlvs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tlvs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tlvs() directly.

    YANG Description: The TLVs included within the Router Information LSA.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs, is_container='container', yang_name="tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tlvs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs, is_container='container', yang_name="tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__tlvs = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tlvs(self):
    self.__tlvs = YANGDynClass(base=yc_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information_tlvs, is_container='container', yang_name="tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  tlvs = __builtin__.property(_get_tlvs)


  _pyangbind_elements = OrderedDict([('tlvs', tlvs), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/extended-prefix/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of the Extended Prefix LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__route_type','__prefix_length','__address_family','__attached','__node','__prefix',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__route_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UNSPECIFIED': {'value': 0}, 'INTRA_AREA': {'value': 1}, 'INTER_AREA': {'value': 3}, 'AS_EXTERNAL': {'value': 5}, 'NSSA_EXTERNAL': {'value': 7}},), is_leaf=True, yang_name="route-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__prefix_length = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..32']}), is_leaf=True, yang_name="prefix-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__address_family = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_UNICAST': {'value': 0}},), is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__attached = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="attached", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__node = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__prefix = YANGDynClass(base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'extended-prefix', 'state']

  def _get_route_type(self):
    """
    Getter method for route_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/state/route_type (enumeration)

    YANG Description: The type of prefix that is contained within the Extended Prefix LSA.
The information contained in sub-TLVs of the attribute is applicable
regardless of this value.
    """
    return self.__route_type
      
  def _set_route_type(self, v, load=False):
    """
    Setter method for route_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/state/route_type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route_type() directly.

    YANG Description: The type of prefix that is contained within the Extended Prefix LSA.
The information contained in sub-TLVs of the attribute is applicable
regardless of this value.
    """
    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={'UNSPECIFIED': {'value': 0}, 'INTRA_AREA': {'value': 1}, 'INTER_AREA': {'value': 3}, 'AS_EXTERNAL': {'value': 5}, 'NSSA_EXTERNAL': {'value': 7}},), is_leaf=True, yang_name="route-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route_type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UNSPECIFIED': {'value': 0}, 'INTRA_AREA': {'value': 1}, 'INTER_AREA': {'value': 3}, 'AS_EXTERNAL': {'value': 5}, 'NSSA_EXTERNAL': {'value': 7}},), is_leaf=True, yang_name="route-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__route_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route_type(self):
    self.__route_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UNSPECIFIED': {'value': 0}, 'INTRA_AREA': {'value': 1}, 'INTER_AREA': {'value': 3}, 'AS_EXTERNAL': {'value': 5}, 'NSSA_EXTERNAL': {'value': 7}},), is_leaf=True, yang_name="route-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_prefix_length(self):
    """
    Getter method for prefix_length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/state/prefix_length (uint8)

    YANG Description: The length of the IPv4 prefix contained in the Extended Prefix LSA
    """
    return self.__prefix_length
      
  def _set_prefix_length(self, v, load=False):
    """
    Setter method for prefix_length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/state/prefix_length (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_length is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_length() directly.

    YANG Description: The length of the IPv4 prefix contained in the Extended Prefix LSA
    """
    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..32']}), is_leaf=True, yang_name="prefix-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_length 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..32']}), is_leaf=True, yang_name="prefix-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__prefix_length = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_length(self):
    self.__prefix_length = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..32']}), is_leaf=True, yang_name="prefix-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_address_family(self):
    """
    Getter method for address_family, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/state/address_family (enumeration)

    YANG Description: The address family of the prefix contained in the Extended Prefix
LSA
    """
    return self.__address_family
      
  def _set_address_family(self, v, load=False):
    """
    Setter method for address_family, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/state/address_family (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address_family is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address_family() directly.

    YANG Description: The address family of the prefix contained in the Extended Prefix
LSA
    """
    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_UNICAST': {'value': 0}},), is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address_family must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_UNICAST': {'value': 0}},), is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__address_family = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address_family(self):
    self.__address_family = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_UNICAST': {'value': 0}},), is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_attached(self):
    """
    Getter method for attached, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/state/attached (boolean)

    YANG Description: If this value is set to true, the prefix being advertised was
generated by an ABR for an inter-area prefix. The value corresponds
to the A-flag of the flags field of the Extended Prefix LSA
    """
    return self.__attached
      
  def _set_attached(self, v, load=False):
    """
    Setter method for attached, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/state/attached (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attached is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attached() directly.

    YANG Description: If this value is set to true, the prefix being advertised was
generated by an ABR for an inter-area prefix. The value corresponds
to the A-flag of the flags field of the Extended Prefix LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="attached", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attached must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="attached", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__attached = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attached(self):
    self.__attached = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="attached", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_node(self):
    """
    Getter method for node, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/state/node (boolean)

    YANG Description: If this value is set to true, the prefix being advertised represents
the advertising router. Typically, the prefix within the LSA is
expected to be globally-reachable prefix associated with a loopback
interface
    """
    return self.__node
      
  def _set_node(self, v, load=False):
    """
    Setter method for node, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/state/node (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_node is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_node() directly.

    YANG Description: If this value is set to true, the prefix being advertised represents
the advertising router. Typically, the prefix within the LSA is
expected to be globally-reachable prefix associated with a loopback
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """node must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__node = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_node(self):
    self.__node = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/state/prefix (inet:ipv4-address-no-zone)

    YANG Description: The IPv4 prefix contained within the extended prefix LSA
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/state/prefix (inet:ipv4-address-no-zone)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: The IPv4 prefix contained within the extended prefix LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with inet:ipv4-address-no-zone""",
          'defined-type': "inet:ipv4-address-no-zone",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = YANGDynClass(base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)

  route_type = __builtin__.property(_get_route_type)
  prefix_length = __builtin__.property(_get_prefix_length)
  address_family = __builtin__.property(_get_address_family)
  attached = __builtin__.property(_get_attached)
  node = __builtin__.property(_get_node)
  prefix = __builtin__.property(_get_prefix)


  _pyangbind_elements = OrderedDict([('route_type', route_type), ('prefix_length', prefix_length), ('address_family', address_family), ('attached', attached), ('node', node), ('prefix', prefix), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/extended-prefix/tlvs/tlv/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to the sub-TLV of the extended
prefix LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'EXTENDED_PREFIX_RANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:EXTENDED_PREFIX_RANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:EXTENDED_PREFIX_RANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'PREFIX_SID': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:PREFIX_SID': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:PREFIX_SID': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'SID_LABEL_BINDING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:SID_LABEL_BINDING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:SID_LABEL_BINDING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'extended-prefix', 'tlvs', 'tlv', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/state/type (identityref)

    YANG Description: The type of sub-TLV as indicated by the Extended Prefix LSA
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/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: The type of sub-TLV as indicated by the Extended Prefix LSA
    """
    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={'EXTENDED_PREFIX_RANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:EXTENDED_PREFIX_RANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:EXTENDED_PREFIX_RANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'PREFIX_SID': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:PREFIX_SID': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:PREFIX_SID': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'SID_LABEL_BINDING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:SID_LABEL_BINDING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:SID_LABEL_BINDING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'EXTENDED_PREFIX_RANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:EXTENDED_PREFIX_RANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:EXTENDED_PREFIX_RANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'PREFIX_SID': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:PREFIX_SID': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:PREFIX_SID': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'SID_LABEL_BINDING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:SID_LABEL_BINDING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:SID_LABEL_BINDING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-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/network-instance', defining_module='openconfig-network-instance', 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={'EXTENDED_PREFIX_RANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:EXTENDED_PREFIX_RANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:EXTENDED_PREFIX_RANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'PREFIX_SID': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:PREFIX_SID': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:PREFIX_SID': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'SID_LABEL_BINDING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:SID_LABEL_BINDING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:SID_LABEL_BINDING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  type = __builtin__.property(_get_type)


  _pyangbind_elements = OrderedDict([('type', type), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_extended_prefix_range_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/extended-prefix/tlvs/tlv/extended-prefix-range/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to the Extended Prefix Range
sub-TLV of the Extended Prefix LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_length','__address_family','__range_size','__inter_area','__prefix',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_length = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..32']}), is_leaf=True, yang_name="prefix-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__address_family = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_UNICAST': {'value': 0}},), is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__range_size = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="range-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__inter_area = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="inter-area", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__prefix = 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-prefix', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'extended-prefix', 'tlvs', 'tlv', 'extended-prefix-range', 'state']

  def _get_prefix_length(self):
    """
    Getter method for prefix_length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/extended_prefix_range/state/prefix_length (uint8)

    YANG Description: The length of the IPv4 prefix contained in the Extended Prefix LSA
    """
    return self.__prefix_length
      
  def _set_prefix_length(self, v, load=False):
    """
    Setter method for prefix_length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/extended_prefix_range/state/prefix_length (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_length is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_length() directly.

    YANG Description: The length of the IPv4 prefix contained in the Extended Prefix LSA
    """
    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..32']}), is_leaf=True, yang_name="prefix-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_length 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..32']}), is_leaf=True, yang_name="prefix-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__prefix_length = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_length(self):
    self.__prefix_length = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..32']}), is_leaf=True, yang_name="prefix-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_address_family(self):
    """
    Getter method for address_family, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/extended_prefix_range/state/address_family (enumeration)

    YANG Description: The address family of the prefix contained in the Extended Prefix
LSA
    """
    return self.__address_family
      
  def _set_address_family(self, v, load=False):
    """
    Setter method for address_family, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/extended_prefix_range/state/address_family (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address_family is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address_family() directly.

    YANG Description: The address family of the prefix contained in the Extended Prefix
LSA
    """
    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_UNICAST': {'value': 0}},), is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address_family must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_UNICAST': {'value': 0}},), is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__address_family = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address_family(self):
    self.__address_family = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_UNICAST': {'value': 0}},), is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_range_size(self):
    """
    Getter method for range_size, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/extended_prefix_range/state/range_size (uint16)

    YANG Description: The number of prefixes that are covered by the advertisement.
    """
    return self.__range_size
      
  def _set_range_size(self, v, load=False):
    """
    Setter method for range_size, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/extended_prefix_range/state/range_size (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_range_size is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_range_size() directly.

    YANG Description: The number of prefixes that are covered by the advertisement.
    """
    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="range-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """range_size 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="range-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__range_size = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_range_size(self):
    self.__range_size = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="range-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_inter_area(self):
    """
    Getter method for inter_area, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/extended_prefix_range/state/inter_area (boolean)

    YANG Description: When this leaf is set to true, then the prefix range is inter-area -
the flag is set by the ABR that advertises the Extended Prefix Range
TLV
    """
    return self.__inter_area
      
  def _set_inter_area(self, v, load=False):
    """
    Setter method for inter_area, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/extended_prefix_range/state/inter_area (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_inter_area is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_inter_area() directly.

    YANG Description: When this leaf is set to true, then the prefix range is inter-area -
the flag is set by the ABR that advertises the Extended Prefix Range
TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="inter-area", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """inter_area must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="inter-area", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__inter_area = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_inter_area(self):
    self.__inter_area = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="inter-area", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/extended_prefix_range/state/prefix (inet:ipv4-prefix)

    YANG Description: The first prefix in the range of prefixes being described by the
extended prefix range sub-TLV
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/extended_prefix_range/state/prefix (inet:ipv4-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: The first prefix in the range of prefixes being described by the
extended prefix range sub-TLV
    """
    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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with inet:ipv4-prefix""",
          'defined-type': "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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-prefix', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-prefix', is_config=False)

  prefix_length = __builtin__.property(_get_prefix_length)
  address_family = __builtin__.property(_get_address_family)
  range_size = __builtin__.property(_get_range_size)
  inter_area = __builtin__.property(_get_inter_area)
  prefix = __builtin__.property(_get_prefix)


  _pyangbind_elements = OrderedDict([('prefix_length', prefix_length), ('address_family', address_family), ('range_size', range_size), ('inter_area', inter_area), ('prefix', prefix), ])


class yc_extended_prefix_range_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_extended_prefix_range(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/extended-prefix/tlvs/tlv/extended-prefix-range. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to the extended prefix range
sub-TLV of the extended prefix LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'extended-prefix-range'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_extended_prefix_range_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'extended-prefix', 'tlvs', 'tlv', 'extended-prefix-range']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/extended_prefix_range/state (container)

    YANG Description: State parameters relating to the Extended Prefix Range
sub-TLV of the Extended Prefix LSA
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/extended_prefix_range/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 parameters relating to the Extended Prefix Range
sub-TLV of the Extended Prefix LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_extended_prefix_range_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_extended_prefix_range_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_extended_prefix_range_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_prefix_sid_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/extended-prefix/tlvs/tlv/prefix-sid/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to the Prefix SID sub-TLV of the
extended prefix LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__no_php','__mapping_server','__explicit_null','__sid_value_type','__sid_scope','__multi_topology_identifier','__algorithm','__sid_value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__no_php = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="no-php", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__mapping_server = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="mapping-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__explicit_null = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="explicit-null", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__sid_value_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ABSOLUTE': {}, 'INDEX': {}},), is_leaf=True, yang_name="sid-value-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__sid_scope = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LOCAL': {}, 'GLOBAL': {}},), is_leaf=True, yang_name="sid-scope", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__multi_topology_identifier = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="multi-topology-identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__algorithm = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="algorithm", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__sid_value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sid-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'extended-prefix', 'tlvs', 'tlv', 'prefix-sid', 'state']

  def _get_no_php(self):
    """
    Getter method for no_php, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/prefix_sid/state/no_php (boolean)

    YANG Description: If this leaf is set the advertising system has indicated that the
prefix SID must not be popped before delivering packets to it
    """
    return self.__no_php
      
  def _set_no_php(self, v, load=False):
    """
    Setter method for no_php, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/prefix_sid/state/no_php (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_no_php is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_no_php() directly.

    YANG Description: If this leaf is set the advertising system has indicated that the
prefix SID must not be popped before delivering packets to it
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="no-php", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """no_php must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="no-php", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__no_php = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_no_php(self):
    self.__no_php = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="no-php", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_mapping_server(self):
    """
    Getter method for mapping_server, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/prefix_sid/state/mapping_server (boolean)

    YANG Description: If this leaf is set the SID was advertised by a Segment Routing
mapping server
    """
    return self.__mapping_server
      
  def _set_mapping_server(self, v, load=False):
    """
    Setter method for mapping_server, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/prefix_sid/state/mapping_server (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mapping_server is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mapping_server() directly.

    YANG Description: If this leaf is set the SID was advertised by a Segment Routing
mapping server
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="mapping-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mapping_server must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="mapping-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__mapping_server = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mapping_server(self):
    self.__mapping_server = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="mapping-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_explicit_null(self):
    """
    Getter method for explicit_null, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/prefix_sid/state/explicit_null (boolean)

    YANG Description: If this leaf is set, the advertising system has requested that the
prefix SID value should be replaced with the explicit null label
value
    """
    return self.__explicit_null
      
  def _set_explicit_null(self, v, load=False):
    """
    Setter method for explicit_null, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/prefix_sid/state/explicit_null (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_explicit_null is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_explicit_null() directly.

    YANG Description: If this leaf is set, the advertising system has requested that the
prefix SID value should be replaced with the explicit null label
value
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="explicit-null", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """explicit_null must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="explicit-null", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__explicit_null = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_explicit_null(self):
    self.__explicit_null = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="explicit-null", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_sid_value_type(self):
    """
    Getter method for sid_value_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/prefix_sid/state/sid_value_type (enumeration)

    YANG Description: Specifies the type of the value specified within the Prefix SID
sub-TLV - in particular, whether the value is an index or an
absolute value. This value corresponds with the V-flag of the Prefix
SID sub-TLV
    """
    return self.__sid_value_type
      
  def _set_sid_value_type(self, v, load=False):
    """
    Setter method for sid_value_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/prefix_sid/state/sid_value_type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sid_value_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sid_value_type() directly.

    YANG Description: Specifies the type of the value specified within the Prefix SID
sub-TLV - in particular, whether the value is an index or an
absolute value. This value corresponds with the V-flag of the Prefix
SID sub-TLV
    """
    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={'ABSOLUTE': {}, 'INDEX': {}},), is_leaf=True, yang_name="sid-value-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sid_value_type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ABSOLUTE': {}, 'INDEX': {}},), is_leaf=True, yang_name="sid-value-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__sid_value_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sid_value_type(self):
    self.__sid_value_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ABSOLUTE': {}, 'INDEX': {}},), is_leaf=True, yang_name="sid-value-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_sid_scope(self):
    """
    Getter method for sid_scope, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/prefix_sid/state/sid_scope (enumeration)

    YANG Description: Specifies the scope of the SID advertisement within the Prefix SID
sub-TLV. The scope of the SID is independent of whether the SID
contained is an index, or an absolute value
    """
    return self.__sid_scope
      
  def _set_sid_scope(self, v, load=False):
    """
    Setter method for sid_scope, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/prefix_sid/state/sid_scope (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sid_scope is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sid_scope() directly.

    YANG Description: Specifies the scope of the SID advertisement within the Prefix SID
sub-TLV. The scope of the SID is independent of whether the SID
contained is an index, or an absolute value
    """
    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={'LOCAL': {}, 'GLOBAL': {}},), is_leaf=True, yang_name="sid-scope", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sid_scope must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LOCAL': {}, 'GLOBAL': {}},), is_leaf=True, yang_name="sid-scope", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__sid_scope = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sid_scope(self):
    self.__sid_scope = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LOCAL': {}, 'GLOBAL': {}},), is_leaf=True, yang_name="sid-scope", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_multi_topology_identifier(self):
    """
    Getter method for multi_topology_identifier, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/prefix_sid/state/multi_topology_identifier (uint8)

    YANG Description: The identifier for the topology to which the Prefix SID relates. The
value of this leaf is a MT-ID as defined in RFC4915
    """
    return self.__multi_topology_identifier
      
  def _set_multi_topology_identifier(self, v, load=False):
    """
    Setter method for multi_topology_identifier, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/prefix_sid/state/multi_topology_identifier (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multi_topology_identifier is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multi_topology_identifier() directly.

    YANG Description: The identifier for the topology to which the Prefix SID relates. The
value of this leaf is a MT-ID as defined in RFC4915
    """
    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="multi-topology-identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multi_topology_identifier 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="multi-topology-identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__multi_topology_identifier = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multi_topology_identifier(self):
    self.__multi_topology_identifier = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="multi-topology-identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_algorithm(self):
    """
    Getter method for algorithm, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/prefix_sid/state/algorithm (uint8)

    YANG Description: The algorithm that computes the path associated with the Prefix SID
    """
    return self.__algorithm
      
  def _set_algorithm(self, v, load=False):
    """
    Setter method for algorithm, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/prefix_sid/state/algorithm (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_algorithm is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_algorithm() directly.

    YANG Description: The algorithm that computes the path associated with the Prefix SID
    """
    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="algorithm", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """algorithm 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="algorithm", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__algorithm = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_algorithm(self):
    self.__algorithm = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="algorithm", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_sid_value(self):
    """
    Getter method for sid_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/prefix_sid/state/sid_value (uint32)

    YANG Description: The value of the Prefix SID. The meaning of this value is dependent
upon the type of SID, and its scope. The value contained is either a
32-bit value indicating the index of the SID, or a 24-bit label where
the 20 right-most bits are used for encoding the label value
    """
    return self.__sid_value
      
  def _set_sid_value(self, v, load=False):
    """
    Setter method for sid_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/prefix_sid/state/sid_value (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sid_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sid_value() directly.

    YANG Description: The value of the Prefix SID. The meaning of this value is dependent
upon the type of SID, and its scope. The value contained is either a
32-bit value indicating the index of the SID, or a 24-bit label where
the 20 right-most bits are used for encoding the label value
    """
    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="sid-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sid_value 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="sid-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__sid_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sid_value(self):
    self.__sid_value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sid-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  no_php = __builtin__.property(_get_no_php)
  mapping_server = __builtin__.property(_get_mapping_server)
  explicit_null = __builtin__.property(_get_explicit_null)
  sid_value_type = __builtin__.property(_get_sid_value_type)
  sid_scope = __builtin__.property(_get_sid_scope)
  multi_topology_identifier = __builtin__.property(_get_multi_topology_identifier)
  algorithm = __builtin__.property(_get_algorithm)
  sid_value = __builtin__.property(_get_sid_value)


  _pyangbind_elements = OrderedDict([('no_php', no_php), ('mapping_server', mapping_server), ('explicit_null', explicit_null), ('sid_value_type', sid_value_type), ('sid_scope', sid_scope), ('multi_topology_identifier', multi_topology_identifier), ('algorithm', algorithm), ('sid_value', sid_value), ])


class yc_prefix_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_prefix_sid(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/extended-prefix/tlvs/tlv/prefix-sid. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to the Prefix SID sub-TLV of the
extended prefix LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'prefix-sid'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_prefix_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'extended-prefix', 'tlvs', 'tlv', 'prefix-sid']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/prefix_sid/state (container)

    YANG Description: State parameters relating to the Prefix SID sub-TLV of the
extended prefix LSA
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/prefix_sid/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 parameters relating to the Prefix SID sub-TLV of the
extended prefix LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_prefix_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_prefix_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_prefix_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/extended-prefix/tlvs/tlv/sid-label-binding/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to the SID/Label binding sub-TLV
of the extended prefix LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__mirroring','__multi_topology_identifier','__weight',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__mirroring = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="mirroring", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__multi_topology_identifier = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="multi-topology-identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'extended-prefix', 'tlvs', 'tlv', 'sid-label-binding', 'state']

  def _get_mirroring(self):
    """
    Getter method for mirroring, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/state/mirroring (boolean)

    YANG Description: When set to true, this indicates that the SID/Label Binding sub-TLV
entries contained within this TLV are indicative of a mirroring
context
    """
    return self.__mirroring
      
  def _set_mirroring(self, v, load=False):
    """
    Setter method for mirroring, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/state/mirroring (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mirroring is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mirroring() directly.

    YANG Description: When set to true, this indicates that the SID/Label Binding sub-TLV
entries contained within this TLV are indicative of a mirroring
context
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="mirroring", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mirroring must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="mirroring", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__mirroring = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mirroring(self):
    self.__mirroring = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="mirroring", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_multi_topology_identifier(self):
    """
    Getter method for multi_topology_identifier, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/state/multi_topology_identifier (uint8)

    YANG Description: The identifier for the topology to which the SID/Label Binding
sub-TLV is associated. The value of this leaf is a MT-ID as defined
in RFC4915
    """
    return self.__multi_topology_identifier
      
  def _set_multi_topology_identifier(self, v, load=False):
    """
    Setter method for multi_topology_identifier, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/state/multi_topology_identifier (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multi_topology_identifier is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multi_topology_identifier() directly.

    YANG Description: The identifier for the topology to which the SID/Label Binding
sub-TLV is associated. The value of this leaf is a MT-ID as defined
in RFC4915
    """
    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="multi-topology-identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multi_topology_identifier 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="multi-topology-identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__multi_topology_identifier = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multi_topology_identifier(self):
    self.__multi_topology_identifier = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="multi-topology-identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_weight(self):
    """
    Getter method for weight, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/state/weight (uint8)

    YANG Description: The weight of the advertised binding when used for load-balancing
purposes
    """
    return self.__weight
      
  def _set_weight(self, v, load=False):
    """
    Setter method for weight, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/state/weight (uint8)
    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 weight of the advertised binding when used for load-balancing
purposes
    """
    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="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """weight 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="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__weight = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_weight(self):
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)

  mirroring = __builtin__.property(_get_mirroring)
  multi_topology_identifier = __builtin__.property(_get_multi_topology_identifier)
  weight = __builtin__.property(_get_weight)


  _pyangbind_elements = OrderedDict([('mirroring', mirroring), ('multi_topology_identifier', multi_topology_identifier), ('weight', weight), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/extended-prefix/tlvs/tlv/sid-label-binding/tlvs/tlv/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to the SID/Label Binding
sub-TLV
  """
  __slots__ = ('_path_helper', '_extmethods', '__type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'SID_MPLS_LABEL_BINDING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:SID_MPLS_LABEL_BINDING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:SID_MPLS_LABEL_BINDING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'ERO_METRIC': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ERO_METRIC': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ERO_METRIC': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'ERO_PATH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ERO_PATH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ERO_PATH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'extended-prefix', 'tlvs', 'tlv', 'sid-label-binding', 'tlvs', 'tlv', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/state/type (identityref)

    YANG Description: The type of sub-TLV that is being contained within the SID/Label
sub-TLV
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/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: The type of sub-TLV that is being contained within the SID/Label
sub-TLV
    """
    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={'SID_MPLS_LABEL_BINDING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:SID_MPLS_LABEL_BINDING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:SID_MPLS_LABEL_BINDING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'ERO_METRIC': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ERO_METRIC': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ERO_METRIC': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'ERO_PATH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ERO_PATH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ERO_PATH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'SID_MPLS_LABEL_BINDING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:SID_MPLS_LABEL_BINDING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:SID_MPLS_LABEL_BINDING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'ERO_METRIC': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ERO_METRIC': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ERO_METRIC': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'ERO_PATH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ERO_PATH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ERO_PATH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-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/network-instance', defining_module='openconfig-network-instance', 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={'SID_MPLS_LABEL_BINDING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:SID_MPLS_LABEL_BINDING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:SID_MPLS_LABEL_BINDING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'ERO_METRIC': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ERO_METRIC': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ERO_METRIC': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'ERO_PATH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ERO_PATH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ERO_PATH': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  type = __builtin__.property(_get_type)


  _pyangbind_elements = OrderedDict([('type', type), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_sid_label_binding_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/extended-prefix/tlvs/tlv/sid-label-binding/tlvs/tlv/sid-label-binding/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameteres relating to the SID/Label Binding
sub-TLV
  """
  __slots__ = ('_path_helper', '_extmethods', '__sid_type','__sid_value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__sid_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LABEL': {}, 'SID': {}},), is_leaf=True, yang_name="sid-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:sr-sid-type', is_config=False)
    self.__sid_value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sid-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'extended-prefix', 'tlvs', 'tlv', 'sid-label-binding', 'tlvs', 'tlv', 'sid-label-binding', 'state']

  def _get_sid_type(self):
    """
    Getter method for sid_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/sid_label_binding/state/sid_type (oc-ospf-types:sr-sid-type)

    YANG Description: The type of the value contained within the sub-TLV
    """
    return self.__sid_type
      
  def _set_sid_type(self, v, load=False):
    """
    Setter method for sid_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/sid_label_binding/state/sid_type (oc-ospf-types:sr-sid-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sid_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sid_type() directly.

    YANG Description: The type of the value contained within the sub-TLV
    """
    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={'LABEL': {}, 'SID': {}},), is_leaf=True, yang_name="sid-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:sr-sid-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sid_type must be of a type compatible with oc-ospf-types:sr-sid-type""",
          'defined-type': "oc-ospf-types:sr-sid-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LABEL': {}, 'SID': {}},), is_leaf=True, yang_name="sid-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:sr-sid-type', is_config=False)""",
        })

    self.__sid_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sid_type(self):
    self.__sid_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LABEL': {}, 'SID': {}},), is_leaf=True, yang_name="sid-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:sr-sid-type', is_config=False)


  def _get_sid_value(self):
    """
    Getter method for sid_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/sid_label_binding/state/sid_value (uint32)

    YANG Description: The value of the binding included within the sub-TLV. The type of
this binding is indicated by the type leaf.
    """
    return self.__sid_value
      
  def _set_sid_value(self, v, load=False):
    """
    Setter method for sid_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/sid_label_binding/state/sid_value (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sid_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sid_value() directly.

    YANG Description: The value of the binding included within the sub-TLV. The type of
this binding is indicated by the type 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="sid-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sid_value 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="sid-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__sid_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sid_value(self):
    self.__sid_value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sid-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  sid_type = __builtin__.property(_get_sid_type)
  sid_value = __builtin__.property(_get_sid_value)


  _pyangbind_elements = OrderedDict([('sid_type', sid_type), ('sid_value', sid_value), ])


class yc_sid_label_binding_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_sid_label_binding(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/extended-prefix/tlvs/tlv/sid-label-binding/tlvs/tlv/sid-label-binding. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Parameters for the SID/Label Binding sub-TLV of the
SID/Label binding TLV
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'sid-label-binding'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_sid_label_binding_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'extended-prefix', 'tlvs', 'tlv', 'sid-label-binding', 'tlvs', 'tlv', 'sid-label-binding']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/sid_label_binding/state (container)

    YANG Description: State parameteres relating to the SID/Label Binding
sub-TLV
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/sid_label_binding/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 parameteres relating to the SID/Label Binding
sub-TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_sid_label_binding_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_sid_label_binding_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_sid_label_binding_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_metric_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/extended-prefix/tlvs/tlv/sid-label-binding/tlvs/tlv/ero-metric/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to the ERO Metric Sub-TLV of
the SID/Label binding TLV
  """
  __slots__ = ('_path_helper', '_extmethods', '__metric',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'extended-prefix', 'tlvs', 'tlv', 'sid-label-binding', 'tlvs', 'tlv', 'ero-metric', 'state']

  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/ero_metric/state/metric (uint32)

    YANG Description: The metric representing the aggregate IGP or TE path cost for the
binding included within the SID/Label Binding TLV
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/ero_metric/state/metric (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: The metric representing the aggregate IGP or TE path cost for the
binding included within the SID/Label Binding TLV
    """
    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="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric 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="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  metric = __builtin__.property(_get_metric)


  _pyangbind_elements = OrderedDict([('metric', metric), ])


class yc_ero_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_metric(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/extended-prefix/tlvs/tlv/sid-label-binding/tlvs/tlv/ero-metric. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Parameters for the ERO Metric Sub-TLV of the SID/Label
binding TLV
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'ero-metric'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'extended-prefix', 'tlvs', 'tlv', 'sid-label-binding', 'tlvs', 'tlv', 'ero-metric']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/ero_metric/state (container)

    YANG Description: State parameters relating to the ERO Metric Sub-TLV of
the SID/Label binding TLV
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/ero_metric/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 parameters relating to the ERO Metric Sub-TLV of
the SID/Label binding TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_path_segments_segment_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/extended-prefix/tlvs/tlv/sid-label-binding/tlvs/tlv/ero-path/segments/segment/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to the path segment
contained within the sub-TLV
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__loose',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'IPV4_SEGMENT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:IPV4_SEGMENT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:IPV4_SEGMENT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'UNNUMBERED_INTERFACE_SEGMENT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:UNNUMBERED_INTERFACE_SEGMENT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:UNNUMBERED_INTERFACE_SEGMENT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__loose = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="loose", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'extended-prefix', 'tlvs', 'tlv', 'sid-label-binding', 'tlvs', 'tlv', 'ero-path', 'segments', 'segment', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/ero_path/segments/segment/state/type (identityref)

    YANG Description: The type of the segment being specified as part of the ERO
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/ero_path/segments/segment/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: The type of the segment being specified as part of the ERO
    """
    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_SEGMENT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:IPV4_SEGMENT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:IPV4_SEGMENT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'UNNUMBERED_INTERFACE_SEGMENT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:UNNUMBERED_INTERFACE_SEGMENT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:UNNUMBERED_INTERFACE_SEGMENT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_SEGMENT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:IPV4_SEGMENT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:IPV4_SEGMENT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'UNNUMBERED_INTERFACE_SEGMENT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:UNNUMBERED_INTERFACE_SEGMENT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:UNNUMBERED_INTERFACE_SEGMENT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-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/network-instance', defining_module='openconfig-network-instance', 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={'IPV4_SEGMENT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:IPV4_SEGMENT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:IPV4_SEGMENT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'UNNUMBERED_INTERFACE_SEGMENT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:UNNUMBERED_INTERFACE_SEGMENT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:UNNUMBERED_INTERFACE_SEGMENT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_loose(self):
    """
    Getter method for loose, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/ero_path/segments/segment/state/loose (boolean)

    YANG Description: If this leaf is set the segment is identifier as a loose path
segment, otherwise the path strictly follows the path specified
    """
    return self.__loose
      
  def _set_loose(self, v, load=False):
    """
    Setter method for loose, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/ero_path/segments/segment/state/loose (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_loose is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_loose() directly.

    YANG Description: If this leaf is set the segment is identifier as a loose path
segment, otherwise the path strictly follows the path specified
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="loose", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """loose must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="loose", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__loose = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_loose(self):
    self.__loose = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="loose", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  type = __builtin__.property(_get_type)
  loose = __builtin__.property(_get_loose)


  _pyangbind_elements = OrderedDict([('type', type), ('loose', loose), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_path_segments_segment_ipv4_segment_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/extended-prefix/tlvs/tlv/sid-label-binding/tlvs/tlv/ero-path/segments/segment/ipv4-segment/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of the IPv4 segment of the ERO
  """
  __slots__ = ('_path_helper', '_extmethods', '__address',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__address = YANGDynClass(base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'extended-prefix', 'tlvs', 'tlv', 'sid-label-binding', 'tlvs', 'tlv', 'ero-path', 'segments', 'segment', 'ipv4-segment', 'state']

  def _get_address(self):
    """
    Getter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/ero_path/segments/segment/ipv4_segment/state/address (inet:ipv4-address-no-zone)

    YANG Description: The IPv4 address of the hop within the ERO
    """
    return self.__address
      
  def _set_address(self, v, load=False):
    """
    Setter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/ero_path/segments/segment/ipv4_segment/state/address (inet:ipv4-address-no-zone)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address() directly.

    YANG Description: The IPv4 address of the hop within the ERO
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address must be of a type compatible with inet:ipv4-address-no-zone""",
          'defined-type': "inet:ipv4-address-no-zone",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)""",
        })

    self.__address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address(self):
    self.__address = YANGDynClass(base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)

  address = __builtin__.property(_get_address)


  _pyangbind_elements = OrderedDict([('address', address), ])


class yc_ipv4_segment_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_path_segments_segment_ipv4_segment(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/extended-prefix/tlvs/tlv/sid-label-binding/tlvs/tlv/ero-path/segments/segment/ipv4-segment. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Details of the IPv4 segment interface of the ERO
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'ipv4-segment'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_path_segments_segment_ipv4_segment_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'extended-prefix', 'tlvs', 'tlv', 'sid-label-binding', 'tlvs', 'tlv', 'ero-path', 'segments', 'segment', 'ipv4-segment']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/ero_path/segments/segment/ipv4_segment/state (container)

    YANG Description: State parameters of the IPv4 segment of the ERO
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/ero_path/segments/segment/ipv4_segment/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 parameters of the IPv4 segment of the ERO
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_path_segments_segment_ipv4_segment_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_path_segments_segment_ipv4_segment_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_path_segments_segment_ipv4_segment_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_path_segments_segment_unnumbered_hop_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/extended-prefix/tlvs/tlv/sid-label-binding/tlvs/tlv/ero-path/segments/segment/unnumbered-hop/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of the unnumbered interface
segment of the ERO
  """
  __slots__ = ('_path_helper', '_extmethods', '__router_id','__interface_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__router_id = YANGDynClass(base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)
    self.__interface_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'extended-prefix', 'tlvs', 'tlv', 'sid-label-binding', 'tlvs', 'tlv', 'ero-path', 'segments', 'segment', 'unnumbered-hop', 'state']

  def _get_router_id(self):
    """
    Getter method for router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/ero_path/segments/segment/unnumbered_hop/state/router_id (inet:ipv4-address-no-zone)

    YANG Description: The IPv4 router identtifier of the remote system
    """
    return self.__router_id
      
  def _set_router_id(self, v, load=False):
    """
    Setter method for router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/ero_path/segments/segment/unnumbered_hop/state/router_id (inet:ipv4-address-no-zone)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_router_id() directly.

    YANG Description: The IPv4 router identtifier of the remote system
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """router_id must be of a type compatible with inet:ipv4-address-no-zone""",
          'defined-type': "inet:ipv4-address-no-zone",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)""",
        })

    self.__router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_router_id(self):
    self.__router_id = YANGDynClass(base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)


  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/ero_path/segments/segment/unnumbered_hop/state/interface_id (uint32)

    YANG Description: The identifier assigned to the link by the remote system
    """
    return self.__interface_id
      
  def _set_interface_id(self, v, load=False):
    """
    Setter method for interface_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/ero_path/segments/segment/unnumbered_hop/state/interface_id (uint32)
    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: The identifier assigned to the link by the remote system
    """
    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="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_id 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="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__interface_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_interface_id(self):
    self.__interface_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), 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/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  router_id = __builtin__.property(_get_router_id)
  interface_id = __builtin__.property(_get_interface_id)


  _pyangbind_elements = OrderedDict([('router_id', router_id), ('interface_id', interface_id), ])


class yc_unnumbered_hop_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_path_segments_segment_unnumbered_hop(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/extended-prefix/tlvs/tlv/sid-label-binding/tlvs/tlv/ero-path/segments/segment/unnumbered-hop. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Details of the unnumbered interface segment of the
ERO
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'unnumbered-hop'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_path_segments_segment_unnumbered_hop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'extended-prefix', 'tlvs', 'tlv', 'sid-label-binding', 'tlvs', 'tlv', 'ero-path', 'segments', 'segment', 'unnumbered-hop']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/ero_path/segments/segment/unnumbered_hop/state (container)

    YANG Description: State parameters of the unnumbered interface
segment of the ERO
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/ero_path/segments/segment/unnumbered_hop/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 parameters of the unnumbered interface
segment of the ERO
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_path_segments_segment_unnumbered_hop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_path_segments_segment_unnumbered_hop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_path_segments_segment_unnumbered_hop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_segment_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_path_segments_segment(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/extended-prefix/tlvs/tlv/sid-label-binding/tlvs/tlv/ero-path/segments/segment. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A segment of the path described within the sub-TLV
  """
  __slots__ = ('_path_helper', '_extmethods', '__state','__ipv4_segment','__unnumbered_hop',)

  _yang_name = 'segment'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_path_segments_segment_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ipv4_segment = YANGDynClass(base=yc_ipv4_segment_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_path_segments_segment_ipv4_segment, is_container='container', yang_name="ipv4-segment", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unnumbered_hop = YANGDynClass(base=yc_unnumbered_hop_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_path_segments_segment_unnumbered_hop, is_container='container', yang_name="unnumbered-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'extended-prefix', 'tlvs', 'tlv', 'sid-label-binding', 'tlvs', 'tlv', 'ero-path', 'segments', 'segment']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/ero_path/segments/segment/state (container)

    YANG Description: State parameters relating to the path segment
contained within the sub-TLV
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/ero_path/segments/segment/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 parameters relating to the path segment
contained within the sub-TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_path_segments_segment_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_path_segments_segment_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_path_segments_segment_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ipv4_segment(self):
    """
    Getter method for ipv4_segment, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/ero_path/segments/segment/ipv4_segment (container)

    YANG Description: Details of the IPv4 segment interface of the ERO
    """
    return self.__ipv4_segment
      
  def _set_ipv4_segment(self, v, load=False):
    """
    Setter method for ipv4_segment, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/ero_path/segments/segment/ipv4_segment (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv4_segment is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv4_segment() directly.

    YANG Description: Details of the IPv4 segment interface of the ERO
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv4_segment_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_path_segments_segment_ipv4_segment, is_container='container', yang_name="ipv4-segment", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv4_segment must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv4_segment_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_path_segments_segment_ipv4_segment, is_container='container', yang_name="ipv4-segment", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ipv4_segment = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv4_segment(self):
    self.__ipv4_segment = YANGDynClass(base=yc_ipv4_segment_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_path_segments_segment_ipv4_segment, is_container='container', yang_name="ipv4-segment", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unnumbered_hop(self):
    """
    Getter method for unnumbered_hop, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/ero_path/segments/segment/unnumbered_hop (container)

    YANG Description: Details of the unnumbered interface segment of the
ERO
    """
    return self.__unnumbered_hop
      
  def _set_unnumbered_hop(self, v, load=False):
    """
    Setter method for unnumbered_hop, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/ero_path/segments/segment/unnumbered_hop (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unnumbered_hop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unnumbered_hop() directly.

    YANG Description: Details of the unnumbered interface segment of the
ERO
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unnumbered_hop_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_path_segments_segment_unnumbered_hop, is_container='container', yang_name="unnumbered-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unnumbered_hop must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unnumbered_hop_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_path_segments_segment_unnumbered_hop, is_container='container', yang_name="unnumbered-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unnumbered_hop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unnumbered_hop(self):
    self.__unnumbered_hop = YANGDynClass(base=yc_unnumbered_hop_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_path_segments_segment_unnumbered_hop, is_container='container', yang_name="unnumbered-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)
  ipv4_segment = __builtin__.property(_get_ipv4_segment)
  unnumbered_hop = __builtin__.property(_get_unnumbered_hop)


  _pyangbind_elements = OrderedDict([('state', state), ('ipv4_segment', ipv4_segment), ('unnumbered_hop', unnumbered_hop), ])


class yc_segments_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_path_segments(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/extended-prefix/tlvs/tlv/sid-label-binding/tlvs/tlv/ero-path/segments. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Segments of the path described within the SID/Label
Binding sub-TLV
  """
  __slots__ = ('_path_helper', '_extmethods', '__segment',)

  _yang_name = 'segments'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__segment = YANGDynClass(base=YANGListType(False,yc_segment_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_path_segments_segment, yang_name="segment", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="segment", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'extended-prefix', 'tlvs', 'tlv', 'sid-label-binding', 'tlvs', 'tlv', 'ero-path', 'segments']

  def _get_segment(self):
    """
    Getter method for segment, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/ero_path/segments/segment (list)

    YANG Description: A segment of the path described within the sub-TLV
    """
    return self.__segment
      
  def _set_segment(self, v, load=False):
    """
    Setter method for segment, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/ero_path/segments/segment (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_segment is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_segment() directly.

    YANG Description: A segment of the path described within the sub-TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType(False,yc_segment_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_path_segments_segment, yang_name="segment", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="segment", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """segment must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType(False,yc_segment_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_path_segments_segment, yang_name="segment", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="segment", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__segment = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_segment(self):
    self.__segment = YANGDynClass(base=YANGListType(False,yc_segment_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_path_segments_segment, yang_name="segment", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="segment", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  segment = __builtin__.property(_get_segment)


  _pyangbind_elements = OrderedDict([('segment', segment), ])


class yc_ero_path_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_path(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/extended-prefix/tlvs/tlv/sid-label-binding/tlvs/tlv/ero-path. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Parameters for the ERO Path Sub-TLV of the SID/Label
binding TLV
  """
  __slots__ = ('_path_helper', '_extmethods', '__segments',)

  _yang_name = 'ero-path'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__segments = YANGDynClass(base=yc_segments_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_path_segments, is_container='container', yang_name="segments", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'extended-prefix', 'tlvs', 'tlv', 'sid-label-binding', 'tlvs', 'tlv', 'ero-path']

  def _get_segments(self):
    """
    Getter method for segments, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/ero_path/segments (container)

    YANG Description: Segments of the path described within the SID/Label
Binding sub-TLV
    """
    return self.__segments
      
  def _set_segments(self, v, load=False):
    """
    Setter method for segments, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/ero_path/segments (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_segments is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_segments() directly.

    YANG Description: Segments of the path described within the SID/Label
Binding sub-TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_segments_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_path_segments, is_container='container', yang_name="segments", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """segments must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_segments_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_path_segments, is_container='container', yang_name="segments", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__segments = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_segments(self):
    self.__segments = YANGDynClass(base=yc_segments_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_path_segments, is_container='container', yang_name="segments", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  segments = __builtin__.property(_get_segments)


  _pyangbind_elements = OrderedDict([('segments', segments), ])


class yc_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/extended-prefix/tlvs/tlv/sid-label-binding/tlvs/tlv. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A TLV contained within the SID/Label Binding sub-TLV
  """
  __slots__ = ('_path_helper', '_extmethods', '__state','__sid_label_binding','__ero_metric','__ero_path',)

  _yang_name = 'tlv'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__sid_label_binding = YANGDynClass(base=yc_sid_label_binding_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_sid_label_binding, is_container='container', yang_name="sid-label-binding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ero_metric = YANGDynClass(base=yc_ero_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_metric, is_container='container', yang_name="ero-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ero_path = YANGDynClass(base=yc_ero_path_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_path, is_container='container', yang_name="ero-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'extended-prefix', 'tlvs', 'tlv', 'sid-label-binding', 'tlvs', 'tlv']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/state (container)

    YANG Description: State parameters relating to the SID/Label Binding
sub-TLV
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/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 parameters relating to the SID/Label Binding
sub-TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_sid_label_binding(self):
    """
    Getter method for sid_label_binding, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/sid_label_binding (container)

    YANG Description: Parameters for the SID/Label Binding sub-TLV of the
SID/Label binding TLV
    """
    return self.__sid_label_binding
      
  def _set_sid_label_binding(self, v, load=False):
    """
    Setter method for sid_label_binding, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/sid_label_binding (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sid_label_binding is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sid_label_binding() directly.

    YANG Description: Parameters for the SID/Label Binding sub-TLV of the
SID/Label binding TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_sid_label_binding_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_sid_label_binding, is_container='container', yang_name="sid-label-binding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sid_label_binding must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_sid_label_binding_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_sid_label_binding, is_container='container', yang_name="sid-label-binding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__sid_label_binding = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sid_label_binding(self):
    self.__sid_label_binding = YANGDynClass(base=yc_sid_label_binding_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_sid_label_binding, is_container='container', yang_name="sid-label-binding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ero_metric(self):
    """
    Getter method for ero_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/ero_metric (container)

    YANG Description: Parameters for the ERO Metric Sub-TLV of the SID/Label
binding TLV
    """
    return self.__ero_metric
      
  def _set_ero_metric(self, v, load=False):
    """
    Setter method for ero_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/ero_metric (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ero_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ero_metric() directly.

    YANG Description: Parameters for the ERO Metric Sub-TLV of the SID/Label
binding TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ero_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_metric, is_container='container', yang_name="ero-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ero_metric must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ero_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_metric, is_container='container', yang_name="ero-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ero_metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ero_metric(self):
    self.__ero_metric = YANGDynClass(base=yc_ero_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_metric, is_container='container', yang_name="ero-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ero_path(self):
    """
    Getter method for ero_path, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/ero_path (container)

    YANG Description: Parameters for the ERO Path Sub-TLV of the SID/Label
binding TLV
    """
    return self.__ero_path
      
  def _set_ero_path(self, v, load=False):
    """
    Setter method for ero_path, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv/ero_path (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ero_path is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ero_path() directly.

    YANG Description: Parameters for the ERO Path Sub-TLV of the SID/Label
binding TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ero_path_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_path, is_container='container', yang_name="ero-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ero_path must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ero_path_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_path, is_container='container', yang_name="ero-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ero_path = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ero_path(self):
    self.__ero_path = YANGDynClass(base=yc_ero_path_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv_ero_path, is_container='container', yang_name="ero-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)
  sid_label_binding = __builtin__.property(_get_sid_label_binding)
  ero_metric = __builtin__.property(_get_ero_metric)
  ero_path = __builtin__.property(_get_ero_path)


  _pyangbind_elements = OrderedDict([('state', state), ('sid_label_binding', sid_label_binding), ('ero_metric', ero_metric), ('ero_path', ero_path), ])


class yc_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/extended-prefix/tlvs/tlv/sid-label-binding/tlvs. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: TLVs contained within the SID/Label Binding sub-TLV of the
SID/Label Binding TLV
  """
  __slots__ = ('_path_helper', '_extmethods', '__tlv',)

  _yang_name = 'tlvs'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__tlv = YANGDynClass(base=YANGListType(False,yc_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv, yang_name="tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'extended-prefix', 'tlvs', 'tlv', 'sid-label-binding', 'tlvs']

  def _get_tlv(self):
    """
    Getter method for tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv (list)

    YANG Description: A TLV contained within the SID/Label Binding sub-TLV
    """
    return self.__tlv
      
  def _set_tlv(self, v, load=False):
    """
    Setter method for tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs/tlv (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tlv() directly.

    YANG Description: A TLV contained within the SID/Label Binding sub-TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType(False,yc_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv, yang_name="tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tlv must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType(False,yc_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv, yang_name="tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__tlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tlv(self):
    self.__tlv = YANGDynClass(base=YANGListType(False,yc_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs_tlv, yang_name="tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  tlv = __builtin__.property(_get_tlv)


  _pyangbind_elements = OrderedDict([('tlv', tlv), ])


class yc_sid_label_binding_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/extended-prefix/tlvs/tlv/sid-label-binding. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to the SID/Label binding sub-TLV
of the extended prefix LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__state','__tlvs',)

  _yang_name = 'sid-label-binding'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__tlvs = YANGDynClass(base=yc_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs, is_container='container', yang_name="tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'extended-prefix', 'tlvs', 'tlv', 'sid-label-binding']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/state (container)

    YANG Description: State parameters relating to the SID/Label binding sub-TLV
of the extended prefix LSA
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/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 parameters relating to the SID/Label binding sub-TLV
of the extended prefix LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_tlvs(self):
    """
    Getter method for tlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs (container)

    YANG Description: TLVs contained within the SID/Label Binding sub-TLV of the
SID/Label Binding TLV
    """
    return self.__tlvs
      
  def _set_tlvs(self, v, load=False):
    """
    Setter method for tlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding/tlvs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tlvs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tlvs() directly.

    YANG Description: TLVs contained within the SID/Label Binding sub-TLV of the
SID/Label Binding TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs, is_container='container', yang_name="tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tlvs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs, is_container='container', yang_name="tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__tlvs = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tlvs(self):
    self.__tlvs = YANGDynClass(base=yc_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding_tlvs, is_container='container', yang_name="tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)
  tlvs = __builtin__.property(_get_tlvs)


  _pyangbind_elements = OrderedDict([('state', state), ('tlvs', tlvs), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_unknown_tlv_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/extended-prefix/tlvs/tlv/unknown-tlv/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Contents of an unknown TLV within the LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__length','__value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__value = YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'extended-prefix', 'tlvs', 'tlv', 'unknown-tlv', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/unknown_tlv/state/type (uint16)

    YANG Description: The type value of the unknown TLV
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/unknown_tlv/state/type (uint16)
    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: The type value of the unknown TLV
    """
    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="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type 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="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_length(self):
    """
    Getter method for length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/unknown_tlv/state/length (uint16)

    YANG Description: The length value of the unknown TLV
    """
    return self.__length
      
  def _set_length(self, v, load=False):
    """
    Setter method for length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/unknown_tlv/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: The length value of the unknown TLV
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/unknown_tlv/state/value (binary)

    YANG Description: The value portion of the unknwon TLV
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/unknown_tlv/state/value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: The value portion of the unknwon TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  type = __builtin__.property(_get_type)
  length = __builtin__.property(_get_length)
  value = __builtin__.property(_get_value)


  _pyangbind_elements = OrderedDict([('type', type), ('length', length), ('value', value), ])


class yc_unknown_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_unknown_tlv(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/extended-prefix/tlvs/tlv/unknown-tlv. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: An unknown TLV within the context. Unknown TLVs are
defined to be the set of TLVs that are not modelled
within the OpenConfig model, or are unknown to the
local system such that it cannot decode their value.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'unknown-tlv'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_unknown_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'extended-prefix', 'tlvs', 'tlv', 'unknown-tlv']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/unknown_tlv/state (container)

    YANG Description: Contents of an unknown TLV within the LSA
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/unknown_tlv/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: Contents of an unknown TLV within the LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_unknown_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_unknown_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_unknown_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/extended-prefix/tlvs/tlv. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A TLV contained within the extended prefix LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__state','__extended_prefix_range','__prefix_sid','__sid_label_binding','__unknown_tlv',)

  _yang_name = 'tlv'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__extended_prefix_range = YANGDynClass(base=yc_extended_prefix_range_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_extended_prefix_range, is_container='container', yang_name="extended-prefix-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__prefix_sid = YANGDynClass(base=yc_prefix_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_prefix_sid, is_container='container', yang_name="prefix-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__sid_label_binding = YANGDynClass(base=yc_sid_label_binding_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding, is_container='container', yang_name="sid-label-binding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unknown_tlv = YANGDynClass(base=yc_unknown_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_unknown_tlv, is_container='container', yang_name="unknown-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'extended-prefix', 'tlvs', 'tlv']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/state (container)

    YANG Description: State parameters relating to the sub-TLV of the extended
prefix LSA
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/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 parameters relating to the sub-TLV of the extended
prefix LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_extended_prefix_range(self):
    """
    Getter method for extended_prefix_range, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/extended_prefix_range (container)

    YANG Description: State parameters relating to the extended prefix range
sub-TLV of the extended prefix LSA
    """
    return self.__extended_prefix_range
      
  def _set_extended_prefix_range(self, v, load=False):
    """
    Setter method for extended_prefix_range, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/extended_prefix_range (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended_prefix_range is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended_prefix_range() directly.

    YANG Description: State parameters relating to the extended prefix range
sub-TLV of the extended prefix LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_extended_prefix_range_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_extended_prefix_range, is_container='container', yang_name="extended-prefix-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended_prefix_range must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_extended_prefix_range_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_extended_prefix_range, is_container='container', yang_name="extended-prefix-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__extended_prefix_range = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended_prefix_range(self):
    self.__extended_prefix_range = YANGDynClass(base=yc_extended_prefix_range_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_extended_prefix_range, is_container='container', yang_name="extended-prefix-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_prefix_sid(self):
    """
    Getter method for prefix_sid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/prefix_sid (container)

    YANG Description: State parameters relating to the Prefix SID sub-TLV of the
extended prefix LSA
    """
    return self.__prefix_sid
      
  def _set_prefix_sid(self, v, load=False):
    """
    Setter method for prefix_sid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/prefix_sid (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_sid is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_sid() directly.

    YANG Description: State parameters relating to the Prefix SID sub-TLV of the
extended prefix LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_prefix_sid, is_container='container', yang_name="prefix-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_sid must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_prefix_sid, is_container='container', yang_name="prefix-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__prefix_sid = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_sid(self):
    self.__prefix_sid = YANGDynClass(base=yc_prefix_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_prefix_sid, is_container='container', yang_name="prefix-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_sid_label_binding(self):
    """
    Getter method for sid_label_binding, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding (container)

    YANG Description: State parameters relating to the SID/Label binding sub-TLV
of the extended prefix LSA
    """
    return self.__sid_label_binding
      
  def _set_sid_label_binding(self, v, load=False):
    """
    Setter method for sid_label_binding, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/sid_label_binding (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sid_label_binding is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sid_label_binding() directly.

    YANG Description: State parameters relating to the SID/Label binding sub-TLV
of the extended prefix LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_sid_label_binding_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding, is_container='container', yang_name="sid-label-binding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sid_label_binding must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_sid_label_binding_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding, is_container='container', yang_name="sid-label-binding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__sid_label_binding = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sid_label_binding(self):
    self.__sid_label_binding = YANGDynClass(base=yc_sid_label_binding_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_sid_label_binding, is_container='container', yang_name="sid-label-binding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unknown_tlv(self):
    """
    Getter method for unknown_tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/unknown_tlv (container)

    YANG Description: An unknown TLV within the context. Unknown TLVs are
defined to be the set of TLVs that are not modelled
within the OpenConfig model, or are unknown to the
local system such that it cannot decode their value.
    """
    return self.__unknown_tlv
      
  def _set_unknown_tlv(self, v, load=False):
    """
    Setter method for unknown_tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv/unknown_tlv (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_tlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_tlv() directly.

    YANG Description: An unknown TLV within the context. Unknown TLVs are
defined to be the set of TLVs that are not modelled
within the OpenConfig model, or are unknown to the
local system such that it cannot decode their value.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unknown_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_unknown_tlv, is_container='container', yang_name="unknown-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_tlv must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unknown_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_unknown_tlv, is_container='container', yang_name="unknown-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unknown_tlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_tlv(self):
    self.__unknown_tlv = YANGDynClass(base=yc_unknown_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv_unknown_tlv, is_container='container', yang_name="unknown-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)
  extended_prefix_range = __builtin__.property(_get_extended_prefix_range)
  prefix_sid = __builtin__.property(_get_prefix_sid)
  sid_label_binding = __builtin__.property(_get_sid_label_binding)
  unknown_tlv = __builtin__.property(_get_unknown_tlv)


  _pyangbind_elements = OrderedDict([('state', state), ('extended_prefix_range', extended_prefix_range), ('prefix_sid', prefix_sid), ('sid_label_binding', sid_label_binding), ('unknown_tlv', unknown_tlv), ])


class yc_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/extended-prefix/tlvs. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: TLVs contained within the Extended Prefix LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__tlv',)

  _yang_name = 'tlvs'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__tlv = YANGDynClass(base=YANGListType(False,yc_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv, yang_name="tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'extended-prefix', 'tlvs']

  def _get_tlv(self):
    """
    Getter method for tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv (list)

    YANG Description: A TLV contained within the extended prefix LSA
    """
    return self.__tlv
      
  def _set_tlv(self, v, load=False):
    """
    Setter method for tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs/tlv (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tlv() directly.

    YANG Description: A TLV contained within the extended prefix LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType(False,yc_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv, yang_name="tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tlv must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType(False,yc_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv, yang_name="tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__tlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tlv(self):
    self.__tlv = YANGDynClass(base=YANGListType(False,yc_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs_tlv, yang_name="tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  tlv = __builtin__.property(_get_tlv)


  _pyangbind_elements = OrderedDict([('tlv', tlv), ])


class yc_extended_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/extended-prefix. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: An OSPFv2 Extended Prefix Opaque LSA, used to encapsulate
TLV attributes associated with a prefix advertised in OSPF.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state','__tlvs',)

  _yang_name = 'extended-prefix'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__tlvs = YANGDynClass(base=yc_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs, is_container='container', yang_name="tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'extended-prefix']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/state (container)

    YANG Description: State parameters of the Extended Prefix LSA
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/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 parameters of the Extended Prefix LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_tlvs(self):
    """
    Getter method for tlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs (container)

    YANG Description: TLVs contained within the Extended Prefix LSA
    """
    return self.__tlvs
      
  def _set_tlvs(self, v, load=False):
    """
    Setter method for tlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix/tlvs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tlvs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tlvs() directly.

    YANG Description: TLVs contained within the Extended Prefix LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs, is_container='container', yang_name="tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tlvs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs, is_container='container', yang_name="tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__tlvs = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tlvs(self):
    self.__tlvs = YANGDynClass(base=yc_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix_tlvs, is_container='container', yang_name="tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)
  tlvs = __builtin__.property(_get_tlvs)


  _pyangbind_elements = OrderedDict([('state', state), ('tlvs', tlvs), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/extended-link/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of the Extended Link LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__link_type','__link_id','__link_data',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__link_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'POINT_TO_POINT_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:POINT_TO_POINT_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:POINT_TO_POINT_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TRANSIT_NETWORK_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TRANSIT_NETWORK_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TRANSIT_NETWORK_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'STUB_NETWORK_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:STUB_NETWORK_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:STUB_NETWORK_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'VIRTUAL_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:VIRTUAL_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:VIRTUAL_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},), is_leaf=True, yang_name="link-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__link_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="link-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)
    self.__link_data = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}),RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),], is_leaf=True, yang_name="link-data", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'extended-link', 'state']

  def _get_link_type(self):
    """
    Getter method for link_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/state/link_type (identityref)

    YANG Description: The type of link with which extended attributes are associated
    """
    return self.__link_type
      
  def _set_link_type(self, v, load=False):
    """
    Setter method for link_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/state/link_type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_type() directly.

    YANG Description: The type of link with which extended attributes are associated
    """
    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={'POINT_TO_POINT_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:POINT_TO_POINT_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:POINT_TO_POINT_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TRANSIT_NETWORK_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TRANSIT_NETWORK_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TRANSIT_NETWORK_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'STUB_NETWORK_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:STUB_NETWORK_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:STUB_NETWORK_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'VIRTUAL_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:VIRTUAL_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:VIRTUAL_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},), is_leaf=True, yang_name="link-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_type must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'POINT_TO_POINT_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:POINT_TO_POINT_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:POINT_TO_POINT_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TRANSIT_NETWORK_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TRANSIT_NETWORK_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TRANSIT_NETWORK_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'STUB_NETWORK_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:STUB_NETWORK_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:STUB_NETWORK_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'VIRTUAL_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:VIRTUAL_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:VIRTUAL_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},), is_leaf=True, yang_name="link-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__link_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_type(self):
    self.__link_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'POINT_TO_POINT_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:POINT_TO_POINT_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:POINT_TO_POINT_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TRANSIT_NETWORK_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TRANSIT_NETWORK_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TRANSIT_NETWORK_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'STUB_NETWORK_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:STUB_NETWORK_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:STUB_NETWORK_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'VIRTUAL_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:VIRTUAL_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:VIRTUAL_LINK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},), is_leaf=True, yang_name="link-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_link_id(self):
    """
    Getter method for link_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/state/link_id (yang:dotted-quad)

    YANG Description: The identifier for the link specified. The value of the link
identifier is dependent upon the type of the LSA. The value is
specified to be, per sub-type:
 1) Neighbouring router's router ID.
 2) IP address of DR.
 3) IP network address.
 4) Neighbouring router router's ID.
    """
    return self.__link_id
      
  def _set_link_id(self, v, load=False):
    """
    Setter method for link_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/state/link_id (yang:dotted-quad)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_id() directly.

    YANG Description: The identifier for the link specified. The value of the link
identifier is dependent upon the type of the LSA. The value is
specified to be, per sub-type:
 1) Neighbouring router's router ID.
 2) IP address of DR.
 3) IP network address.
 4) Neighbouring router router's ID.
    """
    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][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="link-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_id must be of a type compatible with yang:dotted-quad""",
          'defined-type': "yang:dotted-quad",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="link-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)""",
        })

    self.__link_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_id(self):
    self.__link_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="link-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)


  def _get_link_data(self):
    """
    Getter method for link_data, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/state/link_data (union)

    YANG Description: The data associated with the link type. The value is
dependent upon the subtype of the LSA. When the connection is
to a stub network it represents the mask; for p2p connections
that are unnumbered it represents the ifIndex value of the
router's interface; for all other connections it represents
the local system's IP address
    """
    return self.__link_data
      
  def _set_link_data(self, v, load=False):
    """
    Setter method for link_data, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/state/link_data (union)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_data is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_data() directly.

    YANG Description: The data associated with the link type. The value is
dependent upon the subtype of the LSA. When the connection is
to a stub network it represents the mask; for p2p connections
that are unnumbered it represents the ifIndex value of the
router's interface; for all other connections it represents
the local system's IP address
    """
    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][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}),RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),], is_leaf=True, yang_name="link-data", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_data must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}),RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),], is_leaf=True, yang_name="link-data", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)""",
        })

    self.__link_data = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_data(self):
    self.__link_data = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}),RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),], is_leaf=True, yang_name="link-data", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)

  link_type = __builtin__.property(_get_link_type)
  link_id = __builtin__.property(_get_link_id)
  link_data = __builtin__.property(_get_link_data)


  _pyangbind_elements = OrderedDict([('link_type', link_type), ('link_id', link_id), ('link_data', link_data), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link_tlvs_tlv_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/extended-link/tlvs/tlv/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to the sub-TLV of the extended link
LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'ADJACENCY_SID': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ADJACENCY_SID': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ADJACENCY_SID': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'extended-link', 'tlvs', 'tlv', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/tlvs/tlv/state/type (identityref)

    YANG Description: The type of the sub-TLV contained within the extended link TLV
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/tlvs/tlv/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: The type of the sub-TLV contained within the extended link TLV
    """
    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={'ADJACENCY_SID': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ADJACENCY_SID': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ADJACENCY_SID': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ADJACENCY_SID': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ADJACENCY_SID': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ADJACENCY_SID': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-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/network-instance', defining_module='openconfig-network-instance', 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={'ADJACENCY_SID': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ADJACENCY_SID': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ADJACENCY_SID': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  type = __builtin__.property(_get_type)


  _pyangbind_elements = OrderedDict([('type', type), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link_tlvs_tlv_unknown_tlv_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/extended-link/tlvs/tlv/unknown-tlv/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Contents of an unknown TLV within the LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__length','__value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__value = YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'extended-link', 'tlvs', 'tlv', 'unknown-tlv', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/tlvs/tlv/unknown_tlv/state/type (uint16)

    YANG Description: The type value of the unknown TLV
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/tlvs/tlv/unknown_tlv/state/type (uint16)
    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: The type value of the unknown TLV
    """
    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="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type 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="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_length(self):
    """
    Getter method for length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/tlvs/tlv/unknown_tlv/state/length (uint16)

    YANG Description: The length value of the unknown TLV
    """
    return self.__length
      
  def _set_length(self, v, load=False):
    """
    Setter method for length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/tlvs/tlv/unknown_tlv/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: The length value of the unknown TLV
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/tlvs/tlv/unknown_tlv/state/value (binary)

    YANG Description: The value portion of the unknwon TLV
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/tlvs/tlv/unknown_tlv/state/value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: The value portion of the unknwon TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  type = __builtin__.property(_get_type)
  length = __builtin__.property(_get_length)
  value = __builtin__.property(_get_value)


  _pyangbind_elements = OrderedDict([('type', type), ('length', length), ('value', value), ])


class yc_unknown_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link_tlvs_tlv_unknown_tlv(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/extended-link/tlvs/tlv/unknown-tlv. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: An unknown TLV within the context. Unknown TLVs are
defined to be the set of TLVs that are not modelled
within the OpenConfig model, or are unknown to the
local system such that it cannot decode their value.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'unknown-tlv'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link_tlvs_tlv_unknown_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'extended-link', 'tlvs', 'tlv', 'unknown-tlv']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/tlvs/tlv/unknown_tlv/state (container)

    YANG Description: Contents of an unknown TLV within the LSA
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/tlvs/tlv/unknown_tlv/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: Contents of an unknown TLV within the LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link_tlvs_tlv_unknown_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link_tlvs_tlv_unknown_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link_tlvs_tlv_unknown_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link_tlvs_tlv_adjacency_sid_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/extended-link/tlvs/tlv/adjacency-sid/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to an Adjacency SID
  """
  __slots__ = ('_path_helper', '_extmethods', '__backup','__group','__sid_type','__sid_value','__weight','__multi_topology_identifier',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__backup = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="backup", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__group = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__sid_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LABEL': {}, 'SID': {}},), is_leaf=True, yang_name="sid-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:sr-sid-type', is_config=False)
    self.__sid_value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sid-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__multi_topology_identifier = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="multi-topology-identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'extended-link', 'tlvs', 'tlv', 'adjacency-sid', 'state']

  def _get_backup(self):
    """
    Getter method for backup, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/tlvs/tlv/adjacency_sid/state/backup (boolean)

    YANG Description: When this flag is set, it indicates that the adjacency SID refers to
an adjacency which is eligible for protection
    """
    return self.__backup
      
  def _set_backup(self, v, load=False):
    """
    Setter method for backup, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/tlvs/tlv/adjacency_sid/state/backup (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_backup is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_backup() directly.

    YANG Description: When this flag is set, it indicates that the adjacency SID refers to
an adjacency which is eligible for protection
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="backup", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """backup must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="backup", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__backup = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_backup(self):
    self.__backup = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="backup", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_group(self):
    """
    Getter method for group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/tlvs/tlv/adjacency_sid/state/group (boolean)

    YANG Description: When this flag is set it indicates that the adjacency SID refers to
a group of adjacencies that have a common value
    """
    return self.__group
      
  def _set_group(self, v, load=False):
    """
    Setter method for group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/tlvs/tlv/adjacency_sid/state/group (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_group() directly.

    YANG Description: When this flag is set it indicates that the adjacency SID refers to
a group of adjacencies that have a common value
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """group must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_group(self):
    self.__group = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_sid_type(self):
    """
    Getter method for sid_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/tlvs/tlv/adjacency_sid/state/sid_type (oc-ospf-types:sr-sid-type)

    YANG Description: The type of the value contained within the sub-TLV
    """
    return self.__sid_type
      
  def _set_sid_type(self, v, load=False):
    """
    Setter method for sid_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/tlvs/tlv/adjacency_sid/state/sid_type (oc-ospf-types:sr-sid-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sid_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sid_type() directly.

    YANG Description: The type of the value contained within the sub-TLV
    """
    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={'LABEL': {}, 'SID': {}},), is_leaf=True, yang_name="sid-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:sr-sid-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sid_type must be of a type compatible with oc-ospf-types:sr-sid-type""",
          'defined-type': "oc-ospf-types:sr-sid-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LABEL': {}, 'SID': {}},), is_leaf=True, yang_name="sid-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:sr-sid-type', is_config=False)""",
        })

    self.__sid_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sid_type(self):
    self.__sid_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LABEL': {}, 'SID': {}},), is_leaf=True, yang_name="sid-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:sr-sid-type', is_config=False)


  def _get_sid_value(self):
    """
    Getter method for sid_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/tlvs/tlv/adjacency_sid/state/sid_value (uint32)

    YANG Description: The value of the binding included within the sub-TLV. The type of
this binding is indicated by the type leaf.
    """
    return self.__sid_value
      
  def _set_sid_value(self, v, load=False):
    """
    Setter method for sid_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/tlvs/tlv/adjacency_sid/state/sid_value (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sid_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sid_value() directly.

    YANG Description: The value of the binding included within the sub-TLV. The type of
this binding is indicated by the type 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="sid-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sid_value 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="sid-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__sid_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sid_value(self):
    self.__sid_value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sid-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_weight(self):
    """
    Getter method for weight, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/tlvs/tlv/adjacency_sid/state/weight (uint8)

    YANG Description: The weight of the Adjacency SID when used for load-balancing
    """
    return self.__weight
      
  def _set_weight(self, v, load=False):
    """
    Setter method for weight, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/tlvs/tlv/adjacency_sid/state/weight (uint8)
    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 weight of the Adjacency SID when used for load-balancing
    """
    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="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """weight 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="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__weight = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_weight(self):
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_multi_topology_identifier(self):
    """
    Getter method for multi_topology_identifier, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/tlvs/tlv/adjacency_sid/state/multi_topology_identifier (uint8)

    YANG Description: The multi-topology identifier with which the adjacency SID is
associated
    """
    return self.__multi_topology_identifier
      
  def _set_multi_topology_identifier(self, v, load=False):
    """
    Setter method for multi_topology_identifier, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/tlvs/tlv/adjacency_sid/state/multi_topology_identifier (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multi_topology_identifier is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multi_topology_identifier() directly.

    YANG Description: The multi-topology identifier with which the adjacency SID is
associated
    """
    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="multi-topology-identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multi_topology_identifier 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="multi-topology-identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__multi_topology_identifier = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multi_topology_identifier(self):
    self.__multi_topology_identifier = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="multi-topology-identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)

  backup = __builtin__.property(_get_backup)
  group = __builtin__.property(_get_group)
  sid_type = __builtin__.property(_get_sid_type)
  sid_value = __builtin__.property(_get_sid_value)
  weight = __builtin__.property(_get_weight)
  multi_topology_identifier = __builtin__.property(_get_multi_topology_identifier)


  _pyangbind_elements = OrderedDict([('backup', backup), ('group', group), ('sid_type', sid_type), ('sid_value', sid_value), ('weight', weight), ('multi_topology_identifier', multi_topology_identifier), ])


class yc_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link_tlvs_tlv_adjacency_sid(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/extended-link/tlvs/tlv/adjacency-sid. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Parameters relating to an Adjacency SID sub-TLV of the
extended link LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'adjacency-sid'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link_tlvs_tlv_adjacency_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'extended-link', 'tlvs', 'tlv', 'adjacency-sid']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/tlvs/tlv/adjacency_sid/state (container)

    YANG Description: State parameters relating to an Adjacency SID
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/tlvs/tlv/adjacency_sid/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 parameters relating to an Adjacency SID
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link_tlvs_tlv_adjacency_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link_tlvs_tlv_adjacency_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link_tlvs_tlv_adjacency_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link_tlvs_tlv(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/extended-link/tlvs/tlv. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of TLVs within the Extended Link LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__state','__unknown_tlv','__adjacency_sid',)

  _yang_name = 'tlv'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link_tlvs_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unknown_tlv = YANGDynClass(base=yc_unknown_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link_tlvs_tlv_unknown_tlv, is_container='container', yang_name="unknown-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__adjacency_sid = YANGDynClass(base=yc_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link_tlvs_tlv_adjacency_sid, is_container='container', yang_name="adjacency-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'extended-link', 'tlvs', 'tlv']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/tlvs/tlv/state (container)

    YANG Description: State parameters relating to the sub-TLV of the extended link
LSA
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/tlvs/tlv/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 parameters relating to the sub-TLV of the extended link
LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link_tlvs_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link_tlvs_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link_tlvs_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unknown_tlv(self):
    """
    Getter method for unknown_tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/tlvs/tlv/unknown_tlv (container)

    YANG Description: An unknown TLV within the context. Unknown TLVs are
defined to be the set of TLVs that are not modelled
within the OpenConfig model, or are unknown to the
local system such that it cannot decode their value.
    """
    return self.__unknown_tlv
      
  def _set_unknown_tlv(self, v, load=False):
    """
    Setter method for unknown_tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/tlvs/tlv/unknown_tlv (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_tlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_tlv() directly.

    YANG Description: An unknown TLV within the context. Unknown TLVs are
defined to be the set of TLVs that are not modelled
within the OpenConfig model, or are unknown to the
local system such that it cannot decode their value.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unknown_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link_tlvs_tlv_unknown_tlv, is_container='container', yang_name="unknown-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_tlv must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unknown_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link_tlvs_tlv_unknown_tlv, is_container='container', yang_name="unknown-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unknown_tlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_tlv(self):
    self.__unknown_tlv = YANGDynClass(base=yc_unknown_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link_tlvs_tlv_unknown_tlv, is_container='container', yang_name="unknown-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_adjacency_sid(self):
    """
    Getter method for adjacency_sid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/tlvs/tlv/adjacency_sid (container)

    YANG Description: Parameters relating to an Adjacency SID sub-TLV of the
extended link LSA
    """
    return self.__adjacency_sid
      
  def _set_adjacency_sid(self, v, load=False):
    """
    Setter method for adjacency_sid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/tlvs/tlv/adjacency_sid (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adjacency_sid is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adjacency_sid() directly.

    YANG Description: Parameters relating to an Adjacency SID sub-TLV of the
extended link LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link_tlvs_tlv_adjacency_sid, is_container='container', yang_name="adjacency-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adjacency_sid must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link_tlvs_tlv_adjacency_sid, is_container='container', yang_name="adjacency-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__adjacency_sid = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adjacency_sid(self):
    self.__adjacency_sid = YANGDynClass(base=yc_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link_tlvs_tlv_adjacency_sid, is_container='container', yang_name="adjacency-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)
  unknown_tlv = __builtin__.property(_get_unknown_tlv)
  adjacency_sid = __builtin__.property(_get_adjacency_sid)


  _pyangbind_elements = OrderedDict([('state', state), ('unknown_tlv', unknown_tlv), ('adjacency_sid', adjacency_sid), ])


class yc_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link_tlvs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/extended-link/tlvs. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: TLVs contained within the Extended Link LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__tlv',)

  _yang_name = 'tlvs'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__tlv = YANGDynClass(base=YANGListType(False,yc_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link_tlvs_tlv, yang_name="tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'extended-link', 'tlvs']

  def _get_tlv(self):
    """
    Getter method for tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/tlvs/tlv (list)

    YANG Description: List of TLVs within the Extended Link LSA
    """
    return self.__tlv
      
  def _set_tlv(self, v, load=False):
    """
    Setter method for tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/tlvs/tlv (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tlv() directly.

    YANG Description: List of TLVs within the Extended Link LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType(False,yc_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link_tlvs_tlv, yang_name="tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tlv must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType(False,yc_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link_tlvs_tlv, yang_name="tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__tlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tlv(self):
    self.__tlv = YANGDynClass(base=YANGListType(False,yc_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link_tlvs_tlv, yang_name="tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions=None), is_container='list', yang_name="tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  tlv = __builtin__.property(_get_tlv)


  _pyangbind_elements = OrderedDict([('tlv', tlv), ])


class yc_extended_link_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/extended-link. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The OSPFv2 Extended Link Opaque LSA, used to encapsulate TLV
attributes associated with a link advertised in OSPF.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state','__tlvs',)

  _yang_name = 'extended-link'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__tlvs = YANGDynClass(base=yc_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link_tlvs, is_container='container', yang_name="tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'extended-link']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/state (container)

    YANG Description: State parameters of the Extended Link LSA
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/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 parameters of the Extended Link LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_tlvs(self):
    """
    Getter method for tlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/tlvs (container)

    YANG Description: TLVs contained within the Extended Link LSA
    """
    return self.__tlvs
      
  def _set_tlvs(self, v, load=False):
    """
    Setter method for tlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link/tlvs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tlvs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tlvs() directly.

    YANG Description: TLVs contained within the Extended Link LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link_tlvs, is_container='container', yang_name="tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tlvs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link_tlvs, is_container='container', yang_name="tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__tlvs = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tlvs(self):
    self.__tlvs = YANGDynClass(base=yc_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link_tlvs, is_container='container', yang_name="tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)
  tlvs = __builtin__.property(_get_tlvs)


  _pyangbind_elements = OrderedDict([('state', state), ('tlvs', tlvs), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_unknown_tlv_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/unknown-tlv/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Contents of an unknown TLV within the LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__length','__value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__value = YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'unknown-tlv', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/unknown_tlv/state/type (uint16)

    YANG Description: The type value of the unknown TLV
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/unknown_tlv/state/type (uint16)
    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: The type value of the unknown TLV
    """
    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="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type 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="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_length(self):
    """
    Getter method for length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/unknown_tlv/state/length (uint16)

    YANG Description: The length value of the unknown TLV
    """
    return self.__length
      
  def _set_length(self, v, load=False):
    """
    Setter method for length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/unknown_tlv/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: The length value of the unknown TLV
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/unknown_tlv/state/value (binary)

    YANG Description: The value portion of the unknwon TLV
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/unknown_tlv/state/value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: The value portion of the unknwon TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  type = __builtin__.property(_get_type)
  length = __builtin__.property(_get_length)
  value = __builtin__.property(_get_value)


  _pyangbind_elements = OrderedDict([('type', type), ('length', length), ('value', value), ])


class yc_unknown_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_unknown_tlv(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa/unknown-tlv. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: An unknown TLV within the context. Unknown TLVs are
defined to be the set of TLVs that are not modelled
within the OpenConfig model, or are unknown to the
local system such that it cannot decode their value.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'unknown-tlv'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_unknown_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa', 'unknown-tlv']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/unknown_tlv/state (container)

    YANG Description: Contents of an unknown TLV within the LSA
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/unknown_tlv/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: Contents of an unknown TLV within the LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_unknown_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_unknown_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_unknown_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_opaque_lsa_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa/opaque-lsa. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Contents of the opaque LSA
  """
  __slots__ = ('_path_helper', '_extmethods', '__state','__traffic_engineering','__grace_lsa','__router_information','__extended_prefix','__extended_link','__unknown_tlv',)

  _yang_name = 'opaque-lsa'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__traffic_engineering = YANGDynClass(base=yc_traffic_engineering_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering, is_container='container', yang_name="traffic-engineering", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__grace_lsa = YANGDynClass(base=yc_grace_lsa_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_grace_lsa, is_container='container', yang_name="grace-lsa", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__router_information = YANGDynClass(base=yc_router_information_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information, is_container='container', yang_name="router-information", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__extended_prefix = YANGDynClass(base=yc_extended_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix, is_container='container', yang_name="extended-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__extended_link = YANGDynClass(base=yc_extended_link_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link, is_container='container', yang_name="extended-link", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unknown_tlv = YANGDynClass(base=yc_unknown_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_unknown_tlv, is_container='container', yang_name="unknown-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa', 'opaque-lsa']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/state (container)

    YANG Description: State parameters for the opaque LSA
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/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 parameters for the opaque LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_traffic_engineering(self):
    """
    Getter method for traffic_engineering, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering (container)

    YANG Description: Contents of the Traffic Engineering Opaque LSA
    """
    return self.__traffic_engineering
      
  def _set_traffic_engineering(self, v, load=False):
    """
    Setter method for traffic_engineering, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_traffic_engineering is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_traffic_engineering() directly.

    YANG Description: Contents of the Traffic Engineering Opaque LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_traffic_engineering_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering, is_container='container', yang_name="traffic-engineering", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """traffic_engineering must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_traffic_engineering_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering, is_container='container', yang_name="traffic-engineering", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__traffic_engineering = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_traffic_engineering(self):
    self.__traffic_engineering = YANGDynClass(base=yc_traffic_engineering_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_traffic_engineering, is_container='container', yang_name="traffic-engineering", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_grace_lsa(self):
    """
    Getter method for grace_lsa, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/grace_lsa (container)

    YANG Description: The Grace LSA is utilised when a remote system is undergoing
graceful restart
    """
    return self.__grace_lsa
      
  def _set_grace_lsa(self, v, load=False):
    """
    Setter method for grace_lsa, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/grace_lsa (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_grace_lsa is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_grace_lsa() directly.

    YANG Description: The Grace LSA is utilised when a remote system is undergoing
graceful restart
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_grace_lsa_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_grace_lsa, is_container='container', yang_name="grace-lsa", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """grace_lsa must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_grace_lsa_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_grace_lsa, is_container='container', yang_name="grace-lsa", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__grace_lsa = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_grace_lsa(self):
    self.__grace_lsa = YANGDynClass(base=yc_grace_lsa_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_grace_lsa, is_container='container', yang_name="grace-lsa", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_router_information(self):
    """
    Getter method for router_information, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information (container)

    YANG Description: The router information LSA is utilised to advertise capabilities
of a system to other systems who receive the LSA
    """
    return self.__router_information
      
  def _set_router_information(self, v, load=False):
    """
    Setter method for router_information, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/router_information (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_router_information is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_router_information() directly.

    YANG Description: The router information LSA is utilised to advertise capabilities
of a system to other systems who receive the LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_router_information_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information, is_container='container', yang_name="router-information", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """router_information must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_router_information_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information, is_container='container', yang_name="router-information", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__router_information = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_router_information(self):
    self.__router_information = YANGDynClass(base=yc_router_information_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_router_information, is_container='container', yang_name="router-information", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_extended_prefix(self):
    """
    Getter method for extended_prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix (container)

    YANG Description: An OSPFv2 Extended Prefix Opaque LSA, used to encapsulate
TLV attributes associated with a prefix advertised in OSPF.
    """
    return self.__extended_prefix
      
  def _set_extended_prefix(self, v, load=False):
    """
    Setter method for extended_prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_prefix (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended_prefix() directly.

    YANG Description: An OSPFv2 Extended Prefix Opaque LSA, used to encapsulate
TLV attributes associated with a prefix advertised in OSPF.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_extended_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix, is_container='container', yang_name="extended-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended_prefix must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_extended_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix, is_container='container', yang_name="extended-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__extended_prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended_prefix(self):
    self.__extended_prefix = YANGDynClass(base=yc_extended_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_prefix, is_container='container', yang_name="extended-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_extended_link(self):
    """
    Getter method for extended_link, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link (container)

    YANG Description: The OSPFv2 Extended Link Opaque LSA, used to encapsulate TLV
attributes associated with a link advertised in OSPF.
    """
    return self.__extended_link
      
  def _set_extended_link(self, v, load=False):
    """
    Setter method for extended_link, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/extended_link (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended_link is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended_link() directly.

    YANG Description: The OSPFv2 Extended Link Opaque LSA, used to encapsulate TLV
attributes associated with a link advertised in OSPF.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_extended_link_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link, is_container='container', yang_name="extended-link", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended_link must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_extended_link_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link, is_container='container', yang_name="extended-link", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__extended_link = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended_link(self):
    self.__extended_link = YANGDynClass(base=yc_extended_link_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_extended_link, is_container='container', yang_name="extended-link", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unknown_tlv(self):
    """
    Getter method for unknown_tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/unknown_tlv (container)

    YANG Description: An unknown TLV within the context. Unknown TLVs are
defined to be the set of TLVs that are not modelled
within the OpenConfig model, or are unknown to the
local system such that it cannot decode their value.
    """
    return self.__unknown_tlv
      
  def _set_unknown_tlv(self, v, load=False):
    """
    Setter method for unknown_tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/unknown_tlv (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_tlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_tlv() directly.

    YANG Description: An unknown TLV within the context. Unknown TLVs are
defined to be the set of TLVs that are not modelled
within the OpenConfig model, or are unknown to the
local system such that it cannot decode their value.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unknown_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_unknown_tlv, is_container='container', yang_name="unknown-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_tlv must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unknown_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_unknown_tlv, is_container='container', yang_name="unknown-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unknown_tlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_tlv(self):
    self.__unknown_tlv = YANGDynClass(base=yc_unknown_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa_unknown_tlv, is_container='container', yang_name="unknown-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)
  traffic_engineering = __builtin__.property(_get_traffic_engineering)
  grace_lsa = __builtin__.property(_get_grace_lsa)
  router_information = __builtin__.property(_get_router_information)
  extended_prefix = __builtin__.property(_get_extended_prefix)
  extended_link = __builtin__.property(_get_extended_link)
  unknown_tlv = __builtin__.property(_get_unknown_tlv)


  _pyangbind_elements = OrderedDict([('state', state), ('traffic_engineering', traffic_engineering), ('grace_lsa', grace_lsa), ('router_information', router_information), ('extended_prefix', extended_prefix), ('extended_link', extended_link), ('unknown_tlv', unknown_tlv), ])


class yc_lsa_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas/lsa. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of the LSAs of a specified type in the
LSDB for the specified area
  """
  __slots__ = ('_path_helper', '_extmethods', '__link_state_id','__state','__router_lsa','__network_lsa','__summary_lsa','__as_external_lsa','__nssa_external_lsa','__opaque_lsa',)

  _yang_name = 'lsa'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__link_state_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="link-state-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__router_lsa = YANGDynClass(base=yc_router_lsa_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_router_lsa, is_container='container', yang_name="router-lsa", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__network_lsa = YANGDynClass(base=yc_network_lsa_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_network_lsa, is_container='container', yang_name="network-lsa", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__summary_lsa = YANGDynClass(base=yc_summary_lsa_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_summary_lsa, is_container='container', yang_name="summary-lsa", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__as_external_lsa = YANGDynClass(base=yc_as_external_lsa_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_as_external_lsa, is_container='container', yang_name="as-external-lsa", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__nssa_external_lsa = YANGDynClass(base=yc_nssa_external_lsa_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_nssa_external_lsa, is_container='container', yang_name="nssa-external-lsa", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__opaque_lsa = YANGDynClass(base=yc_opaque_lsa_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa, is_container='container', yang_name="opaque-lsa", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas', 'lsa']

  def _get_link_state_id(self):
    """
    Getter method for link_state_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/link_state_id (leafref)

    YANG Description: Reference to the Link State ID of the LSA
    """
    return self.__link_state_id
      
  def _set_link_state_id(self, v, load=False):
    """
    Setter method for link_state_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/link_state_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_state_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_state_id() directly.

    YANG Description: Reference to the Link State ID of the LSA
    """
    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="link-state-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_state_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="link-state-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__link_state_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_state_id(self):
    self.__link_state_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="link-state-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/state (container)

    YANG Description: Operational state parameters relating to all
LSA types
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/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 all
LSA types
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_router_lsa(self):
    """
    Getter method for router_lsa, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/router_lsa (container)

    YANG Description: Contents of the router LSA
    """
    return self.__router_lsa
      
  def _set_router_lsa(self, v, load=False):
    """
    Setter method for router_lsa, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/router_lsa (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_router_lsa is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_router_lsa() directly.

    YANG Description: Contents of the router LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_router_lsa_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_router_lsa, is_container='container', yang_name="router-lsa", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """router_lsa must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_router_lsa_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_router_lsa, is_container='container', yang_name="router-lsa", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__router_lsa = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_router_lsa(self):
    self.__router_lsa = YANGDynClass(base=yc_router_lsa_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_router_lsa, is_container='container', yang_name="router-lsa", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_network_lsa(self):
    """
    Getter method for network_lsa, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/network_lsa (container)

    YANG Description: Contents of the network LSA
    """
    return self.__network_lsa
      
  def _set_network_lsa(self, v, load=False):
    """
    Setter method for network_lsa, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/network_lsa (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_network_lsa is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_network_lsa() directly.

    YANG Description: Contents of the network LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_network_lsa_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_network_lsa, is_container='container', yang_name="network-lsa", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """network_lsa must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_network_lsa_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_network_lsa, is_container='container', yang_name="network-lsa", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__network_lsa = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_network_lsa(self):
    self.__network_lsa = YANGDynClass(base=yc_network_lsa_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_network_lsa, is_container='container', yang_name="network-lsa", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_summary_lsa(self):
    """
    Getter method for summary_lsa, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/summary_lsa (container)

    YANG Description: Contents of the summary LSA
    """
    return self.__summary_lsa
      
  def _set_summary_lsa(self, v, load=False):
    """
    Setter method for summary_lsa, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/summary_lsa (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_summary_lsa is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_summary_lsa() directly.

    YANG Description: Contents of the summary LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_summary_lsa_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_summary_lsa, is_container='container', yang_name="summary-lsa", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """summary_lsa must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_summary_lsa_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_summary_lsa, is_container='container', yang_name="summary-lsa", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__summary_lsa = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_summary_lsa(self):
    self.__summary_lsa = YANGDynClass(base=yc_summary_lsa_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_summary_lsa, is_container='container', yang_name="summary-lsa", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_as_external_lsa(self):
    """
    Getter method for as_external_lsa, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/as_external_lsa (container)

    YANG Description: Contents of the AS External LSA
    """
    return self.__as_external_lsa
      
  def _set_as_external_lsa(self, v, load=False):
    """
    Setter method for as_external_lsa, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/as_external_lsa (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_as_external_lsa is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_as_external_lsa() directly.

    YANG Description: Contents of the AS External LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_as_external_lsa_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_as_external_lsa, is_container='container', yang_name="as-external-lsa", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """as_external_lsa must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_as_external_lsa_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_as_external_lsa, is_container='container', yang_name="as-external-lsa", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__as_external_lsa = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_as_external_lsa(self):
    self.__as_external_lsa = YANGDynClass(base=yc_as_external_lsa_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_as_external_lsa, is_container='container', yang_name="as-external-lsa", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_nssa_external_lsa(self):
    """
    Getter method for nssa_external_lsa, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/nssa_external_lsa (container)

    YANG Description: Contents of the NSSA External LSA
    """
    return self.__nssa_external_lsa
      
  def _set_nssa_external_lsa(self, v, load=False):
    """
    Setter method for nssa_external_lsa, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/nssa_external_lsa (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_nssa_external_lsa is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_nssa_external_lsa() directly.

    YANG Description: Contents of the NSSA External LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_nssa_external_lsa_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_nssa_external_lsa, is_container='container', yang_name="nssa-external-lsa", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """nssa_external_lsa must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_nssa_external_lsa_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_nssa_external_lsa, is_container='container', yang_name="nssa-external-lsa", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__nssa_external_lsa = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_nssa_external_lsa(self):
    self.__nssa_external_lsa = YANGDynClass(base=yc_nssa_external_lsa_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_nssa_external_lsa, is_container='container', yang_name="nssa-external-lsa", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_opaque_lsa(self):
    """
    Getter method for opaque_lsa, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa (container)

    YANG Description: Contents of the opaque LSA
    """
    return self.__opaque_lsa
      
  def _set_opaque_lsa(self, v, load=False):
    """
    Setter method for opaque_lsa, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_opaque_lsa is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_opaque_lsa() directly.

    YANG Description: Contents of the opaque LSA
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_opaque_lsa_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa, is_container='container', yang_name="opaque-lsa", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """opaque_lsa must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_opaque_lsa_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa, is_container='container', yang_name="opaque-lsa", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__opaque_lsa = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_opaque_lsa(self):
    self.__opaque_lsa = YANGDynClass(base=yc_opaque_lsa_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa_opaque_lsa, is_container='container', yang_name="opaque-lsa", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  link_state_id = __builtin__.property(_get_link_state_id)
  state = __builtin__.property(_get_state)
  router_lsa = __builtin__.property(_get_router_lsa)
  network_lsa = __builtin__.property(_get_network_lsa)
  summary_lsa = __builtin__.property(_get_summary_lsa)
  as_external_lsa = __builtin__.property(_get_as_external_lsa)
  nssa_external_lsa = __builtin__.property(_get_nssa_external_lsa)
  opaque_lsa = __builtin__.property(_get_opaque_lsa)


  _pyangbind_elements = OrderedDict([('link_state_id', link_state_id), ('state', state), ('router_lsa', router_lsa), ('network_lsa', network_lsa), ('summary_lsa', summary_lsa), ('as_external_lsa', as_external_lsa), ('nssa_external_lsa', nssa_external_lsa), ('opaque_lsa', opaque_lsa), ])


class yc_lsas_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type/lsas. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for a list of the LSAs of
the specified type received by the system
  """
  __slots__ = ('_path_helper', '_extmethods', '__lsa',)

  _yang_name = 'lsas'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__lsa = YANGDynClass(base=YANGListType("link_state_id",yc_lsa_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa, yang_name="lsa", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='link-state-id', extensions=None), is_container='list', yang_name="lsa", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type', 'lsas']

  def _get_lsa(self):
    """
    Getter method for lsa, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa (list)

    YANG Description: List of the LSAs of a specified type in the
LSDB for the specified area
    """
    return self.__lsa
      
  def _set_lsa(self, v, load=False):
    """
    Setter method for lsa, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsa is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsa() directly.

    YANG Description: List of the LSAs of a specified type in the
LSDB for the specified area
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("link_state_id",yc_lsa_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa, yang_name="lsa", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='link-state-id', extensions=None), is_container='list', yang_name="lsa", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsa must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("link_state_id",yc_lsa_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa, yang_name="lsa", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='link-state-id', extensions=None), is_container='list', yang_name="lsa", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__lsa = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsa(self):
    self.__lsa = YANGDynClass(base=YANGListType("link_state_id",yc_lsa_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas_lsa, yang_name="lsa", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='link-state-id', extensions=None), is_container='list', yang_name="lsa", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  lsa = __builtin__.property(_get_lsa)


  _pyangbind_elements = OrderedDict([('lsa', lsa), ])


class yc_lsa_type_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types/lsa-type. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of LSA types in the LSDB for the specified
area
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__state','__lsas',)

  _yang_name = 'lsa-type'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__lsas = YANGDynClass(base=yc_lsas_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas, is_container='container', yang_name="lsas", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types', 'lsa-type']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/type (leafref)

    YANG Description: A reference for the LSA type being described within
the LSDB
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/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: A reference for the LSA type being described within
the LSDB
    """
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/state (container)

    YANG Description: Top-level operational state parameters relating to
an LSA within the area
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/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: Top-level operational state parameters relating to
an LSA within the area
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_lsas(self):
    """
    Getter method for lsas, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas (container)

    YANG Description: Enclosing container for a list of the LSAs of
the specified type received by the system
    """
    return self.__lsas
      
  def _set_lsas(self, v, load=False):
    """
    Setter method for lsas, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsas is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsas() directly.

    YANG Description: Enclosing container for a list of the LSAs of
the specified type received by the system
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_lsas_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas, is_container='container', yang_name="lsas", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsas must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_lsas_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas, is_container='container', yang_name="lsas", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__lsas = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsas(self):
    self.__lsas = YANGDynClass(base=yc_lsas_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type_lsas, is_container='container', yang_name="lsas", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  type = __builtin__.property(_get_type)
  state = __builtin__.property(_get_state)
  lsas = __builtin__.property(_get_lsas)


  _pyangbind_elements = OrderedDict([('type', type), ('state', state), ('lsas', lsas), ])


class yc_lsa_types_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa-types. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for a list of LSA types that are
in the LSDB for the specified area
  """
  __slots__ = ('_path_helper', '_extmethods', '__lsa_type',)

  _yang_name = 'lsa-types'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__lsa_type = YANGDynClass(base=YANGListType("type",yc_lsa_type_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type, yang_name="lsa-type", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="lsa-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb', 'lsa-types']

  def _get_lsa_type(self):
    """
    Getter method for lsa_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type (list)

    YANG Description: List of LSA types in the LSDB for the specified
area
    """
    return self.__lsa_type
      
  def _set_lsa_type(self, v, load=False):
    """
    Setter method for lsa_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsa_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsa_type() directly.

    YANG Description: List of LSA types in the LSDB for the specified
area
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("type",yc_lsa_type_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type, yang_name="lsa-type", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="lsa-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsa_type must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("type",yc_lsa_type_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type, yang_name="lsa-type", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="lsa-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__lsa_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsa_type(self):
    self.__lsa_type = YANGDynClass(base=YANGListType("type",yc_lsa_type_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types_lsa_type, yang_name="lsa-type", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="lsa-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  lsa_type = __builtin__.property(_get_lsa_type)


  _pyangbind_elements = OrderedDict([('lsa_type', lsa_type), ])


class yc_lsdb_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/lsdb. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The link-state database for the OSPFv2 area
  """
  __slots__ = ('_path_helper', '_extmethods', '__state','__lsa_types',)

  _yang_name = 'lsdb'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__lsa_types = YANGDynClass(base=yc_lsa_types_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types, is_container='container', yang_name="lsa-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'lsdb']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/state (container)

    YANG Description: Operational state parameters relating to the OSPFv2
area
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/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 OSPFv2
area
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_lsa_types(self):
    """
    Getter method for lsa_types, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types (container)

    YANG Description: Enclosing container for a list of LSA types that are
in the LSDB for the specified area
    """
    return self.__lsa_types
      
  def _set_lsa_types(self, v, load=False):
    """
    Setter method for lsa_types, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsa_types is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsa_types() directly.

    YANG Description: Enclosing container for a list of LSA types that are
in the LSDB for the specified area
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_lsa_types_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types, is_container='container', yang_name="lsa-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsa_types must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_lsa_types_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types, is_container='container', yang_name="lsa-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__lsa_types = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsa_types(self):
    self.__lsa_types = YANGDynClass(base=yc_lsa_types_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb_lsa_types, is_container='container', yang_name="lsa-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)
  lsa_types = __builtin__.property(_get_lsa_types)


  _pyangbind_elements = OrderedDict([('state', state), ('lsa_types', lsa_types), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for the interface on which
OSPFv2 is enabled
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__network_type','__priority','__multi_area_adjacency_primary','__authentication_type','__metric','__passive','__hide_network',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__network_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'POINT_TO_POINT_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:POINT_TO_POINT_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:POINT_TO_POINT_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'NON_BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:NON_BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:NON_BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},), is_leaf=True, yang_name="network-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    self.__multi_area_adjacency_primary = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="multi-area-adjacency-primary", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__authentication_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', is_config=True)
    self.__passive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="passive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__hide_network = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="hide-network", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'interfaces', 'interface', 'config']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/config/id (string)

    YANG Description: An operator-specified string utilised to uniquely
reference this interface
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/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: An operator-specified string utilised to uniquely
reference this interface
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_network_type(self):
    """
    Getter method for network_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/config/network_type (identityref)

    YANG Description: The type of network that OSPFv2 should use for the specified
interface.
    """
    return self.__network_type
      
  def _set_network_type(self, v, load=False):
    """
    Setter method for network_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/config/network_type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_network_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_network_type() directly.

    YANG Description: The type of network that OSPFv2 should use for the specified
interface.
    """
    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={'POINT_TO_POINT_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:POINT_TO_POINT_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:POINT_TO_POINT_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'NON_BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:NON_BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:NON_BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},), is_leaf=True, yang_name="network-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """network_type must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'POINT_TO_POINT_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:POINT_TO_POINT_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:POINT_TO_POINT_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'NON_BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:NON_BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:NON_BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},), is_leaf=True, yang_name="network-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__network_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_network_type(self):
    self.__network_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'POINT_TO_POINT_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:POINT_TO_POINT_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:POINT_TO_POINT_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'NON_BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:NON_BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:NON_BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},), is_leaf=True, yang_name="network-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_priority(self):
    """
    Getter method for priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/config/priority (uint8)

    YANG Description: The local system's priority to become the designated
router
    """
    return self.__priority
      
  def _set_priority(self, v, load=False):
    """
    Setter method for priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/config/priority (uint8)
    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: The local system's priority to become the designated
router
    """
    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="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """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="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
        })

    self.__priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_priority(self):
    self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)


  def _get_multi_area_adjacency_primary(self):
    """
    Getter method for multi_area_adjacency_primary, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/config/multi_area_adjacency_primary (boolean)

    YANG Description: When the specified interface is included in more than one
area's configuration, this leaf marks whether the area should
be considered the primary (when the value is true). In the
case that this value is false, the area is considered a
secondary area.
    """
    return self.__multi_area_adjacency_primary
      
  def _set_multi_area_adjacency_primary(self, v, load=False):
    """
    Setter method for multi_area_adjacency_primary, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/config/multi_area_adjacency_primary (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multi_area_adjacency_primary is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multi_area_adjacency_primary() directly.

    YANG Description: When the specified interface is included in more than one
area's configuration, this leaf marks whether the area should
be considered the primary (when the value is true). In the
case that this value is false, the area is considered a
secondary area.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="multi-area-adjacency-primary", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multi_area_adjacency_primary must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="multi-area-adjacency-primary", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__multi_area_adjacency_primary = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multi_area_adjacency_primary(self):
    self.__multi_area_adjacency_primary = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="multi-area-adjacency-primary", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_authentication_type(self):
    """
    Getter method for authentication_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/config/authentication_type (string)

    YANG Description: The type of authentication that should be used on this
interface
    """
    return self.__authentication_type
      
  def _set_authentication_type(self, v, load=False):
    """
    Setter method for authentication_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/config/authentication_type (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_authentication_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_authentication_type() directly.

    YANG Description: The type of authentication that should be used on this
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="authentication-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """authentication_type must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)""",
        })

    self.__authentication_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_authentication_type(self):
    self.__authentication_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/config/metric (oc-ospf-types:ospf-metric)

    YANG Description: The metric for the interface
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/config/metric (oc-ospf-types:ospf-metric)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: The metric for the interface
    """
    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="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric must be of a type compatible with oc-ospf-types:ospf-metric""",
          'defined-type': "oc-ospf-types:ospf-metric",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', is_config=True)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', is_config=True)


  def _get_passive(self):
    """
    Getter method for passive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/config/passive (boolean)

    YANG Description: When this leaf is set to true, the interface should be
advertised within the OSPF area but OSPF adjacencies should
not be established over the interface
    """
    return self.__passive
      
  def _set_passive(self, v, load=False):
    """
    Setter method for passive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/config/passive (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_passive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_passive() directly.

    YANG Description: When this leaf is set to true, the interface should be
advertised within the OSPF area but OSPF adjacencies should
not be established over the interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="passive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """passive must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="passive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__passive = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_passive(self):
    self.__passive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="passive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_hide_network(self):
    """
    Getter method for hide_network, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/config/hide_network (boolean)

    YANG Description: When this leaf is set to true, the network connected to
the interface should be hidden from OSPFv2 advertisements
per the procedure described in RFC6860.
    """
    return self.__hide_network
      
  def _set_hide_network(self, v, load=False):
    """
    Setter method for hide_network, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/config/hide_network (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hide_network is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hide_network() directly.

    YANG Description: When this leaf is set to true, the network connected to
the interface should be hidden from OSPFv2 advertisements
per the procedure described in RFC6860.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="hide-network", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hide_network must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="hide-network", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__hide_network = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hide_network(self):
    self.__hide_network = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="hide-network", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  id = __builtin__.property(_get_id, _set_id)
  network_type = __builtin__.property(_get_network_type, _set_network_type)
  priority = __builtin__.property(_get_priority, _set_priority)
  multi_area_adjacency_primary = __builtin__.property(_get_multi_area_adjacency_primary, _set_multi_area_adjacency_primary)
  authentication_type = __builtin__.property(_get_authentication_type, _set_authentication_type)
  metric = __builtin__.property(_get_metric, _set_metric)
  passive = __builtin__.property(_get_passive, _set_passive)
  hide_network = __builtin__.property(_get_hide_network, _set_hide_network)


  _pyangbind_elements = OrderedDict([('id', id), ('network_type', network_type), ('priority', priority), ('multi_area_adjacency_primary', multi_area_adjacency_primary), ('authentication_type', authentication_type), ('metric', metric), ('passive', passive), ('hide_network', hide_network), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/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 interface on which
OSPFv2 is enabled
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__network_type','__priority','__multi_area_adjacency_primary','__authentication_type','__metric','__passive','__hide_network',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__network_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'POINT_TO_POINT_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:POINT_TO_POINT_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:POINT_TO_POINT_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'NON_BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:NON_BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:NON_BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},), is_leaf=True, yang_name="network-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__multi_area_adjacency_primary = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="multi-area-adjacency-primary", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__authentication_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', is_config=False)
    self.__passive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="passive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__hide_network = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="hide-network", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'interfaces', 'interface', 'state']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/state/id (string)

    YANG Description: An operator-specified string utilised to uniquely
reference this interface
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/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: An operator-specified string utilised to uniquely
reference this interface
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_network_type(self):
    """
    Getter method for network_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/state/network_type (identityref)

    YANG Description: The type of network that OSPFv2 should use for the specified
interface.
    """
    return self.__network_type
      
  def _set_network_type(self, v, load=False):
    """
    Setter method for network_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/state/network_type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_network_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_network_type() directly.

    YANG Description: The type of network that OSPFv2 should use for the specified
interface.
    """
    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={'POINT_TO_POINT_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:POINT_TO_POINT_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:POINT_TO_POINT_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'NON_BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:NON_BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:NON_BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},), is_leaf=True, yang_name="network-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """network_type must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'POINT_TO_POINT_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:POINT_TO_POINT_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:POINT_TO_POINT_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'NON_BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:NON_BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:NON_BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},), is_leaf=True, yang_name="network-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__network_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_network_type(self):
    self.__network_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'POINT_TO_POINT_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:POINT_TO_POINT_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:POINT_TO_POINT_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'NON_BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:NON_BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:NON_BROADCAST_NETWORK': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},), is_leaf=True, yang_name="network-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_priority(self):
    """
    Getter method for priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/state/priority (uint8)

    YANG Description: The local system's priority to become the designated
router
    """
    return self.__priority
      
  def _set_priority(self, v, load=False):
    """
    Setter method for priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/state/priority (uint8)
    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: The local system's priority to become the designated
router
    """
    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="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """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="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_priority(self):
    self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_multi_area_adjacency_primary(self):
    """
    Getter method for multi_area_adjacency_primary, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/state/multi_area_adjacency_primary (boolean)

    YANG Description: When the specified interface is included in more than one
area's configuration, this leaf marks whether the area should
be considered the primary (when the value is true). In the
case that this value is false, the area is considered a
secondary area.
    """
    return self.__multi_area_adjacency_primary
      
  def _set_multi_area_adjacency_primary(self, v, load=False):
    """
    Setter method for multi_area_adjacency_primary, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/state/multi_area_adjacency_primary (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multi_area_adjacency_primary is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multi_area_adjacency_primary() directly.

    YANG Description: When the specified interface is included in more than one
area's configuration, this leaf marks whether the area should
be considered the primary (when the value is true). In the
case that this value is false, the area is considered a
secondary area.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="multi-area-adjacency-primary", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multi_area_adjacency_primary must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="multi-area-adjacency-primary", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__multi_area_adjacency_primary = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multi_area_adjacency_primary(self):
    self.__multi_area_adjacency_primary = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="multi-area-adjacency-primary", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_authentication_type(self):
    """
    Getter method for authentication_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/state/authentication_type (string)

    YANG Description: The type of authentication that should be used on this
interface
    """
    return self.__authentication_type
      
  def _set_authentication_type(self, v, load=False):
    """
    Setter method for authentication_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/state/authentication_type (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_authentication_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_authentication_type() directly.

    YANG Description: The type of authentication that should be used on this
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="authentication-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """authentication_type must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__authentication_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_authentication_type(self):
    self.__authentication_type = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/state/metric (oc-ospf-types:ospf-metric)

    YANG Description: The metric for the interface
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/state/metric (oc-ospf-types:ospf-metric)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: The metric for the interface
    """
    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="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric must be of a type compatible with oc-ospf-types:ospf-metric""",
          'defined-type': "oc-ospf-types:ospf-metric",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', is_config=False)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', is_config=False)


  def _get_passive(self):
    """
    Getter method for passive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/state/passive (boolean)

    YANG Description: When this leaf is set to true, the interface should be
advertised within the OSPF area but OSPF adjacencies should
not be established over the interface
    """
    return self.__passive
      
  def _set_passive(self, v, load=False):
    """
    Setter method for passive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/state/passive (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_passive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_passive() directly.

    YANG Description: When this leaf is set to true, the interface should be
advertised within the OSPF area but OSPF adjacencies should
not be established over the interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="passive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """passive must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="passive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__passive = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_passive(self):
    self.__passive = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="passive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_hide_network(self):
    """
    Getter method for hide_network, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/state/hide_network (boolean)

    YANG Description: When this leaf is set to true, the network connected to
the interface should be hidden from OSPFv2 advertisements
per the procedure described in RFC6860.
    """
    return self.__hide_network
      
  def _set_hide_network(self, v, load=False):
    """
    Setter method for hide_network, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/state/hide_network (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hide_network is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hide_network() directly.

    YANG Description: When this leaf is set to true, the network connected to
the interface should be hidden from OSPFv2 advertisements
per the procedure described in RFC6860.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="hide-network", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hide_network must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="hide-network", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__hide_network = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hide_network(self):
    self.__hide_network = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="hide-network", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  id = __builtin__.property(_get_id)
  network_type = __builtin__.property(_get_network_type)
  priority = __builtin__.property(_get_priority)
  multi_area_adjacency_primary = __builtin__.property(_get_multi_area_adjacency_primary)
  authentication_type = __builtin__.property(_get_authentication_type)
  metric = __builtin__.property(_get_metric)
  passive = __builtin__.property(_get_passive)
  hide_network = __builtin__.property(_get_hide_network)


  _pyangbind_elements = OrderedDict([('id', id), ('network_type', network_type), ('priority', priority), ('multi_area_adjacency_primary', multi_area_adjacency_primary), ('authentication_type', authentication_type), ('metric', metric), ('passive', passive), ('hide_network', hide_network), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_interface_ref_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'interfaces', 'interface', 'interface-ref', 'config']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/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 /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/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 /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_interface_ref_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'interfaces', 'interface', 'interface-ref', 'state']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/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 /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/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 /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_interface_ref(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/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
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'interface-ref'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'interfaces', 'interface', 'interface-ref']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/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 /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/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 /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_timers_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/timers/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for OSPFv2 timers on the
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__dead_interval','__hello_interval','__retransmission_interval',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__dead_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="dead-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__retransmission_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="retransmission-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'interfaces', 'interface', 'timers', 'config']

  def _get_dead_interval(self):
    """
    Getter method for dead_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/timers/config/dead_interval (uint32)

    YANG Description: The number of seconds that the local system should let
elapse before declaring a silent router down
    """
    return self.__dead_interval
      
  def _set_dead_interval(self, v, load=False):
    """
    Setter method for dead_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/timers/config/dead_interval (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dead_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dead_interval() directly.

    YANG Description: The number of seconds that the local system should let
elapse before declaring a silent router down
    """
    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="dead-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dead_interval 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="dead-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__dead_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dead_interval(self):
    self.__dead_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="dead-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_hello_interval(self):
    """
    Getter method for hello_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/timers/config/hello_interval (uint32)

    YANG Description: The number of seconds the local system waits between the
transmission of subsequent Hello packets
    """
    return self.__hello_interval
      
  def _set_hello_interval(self, v, load=False):
    """
    Setter method for hello_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/timers/config/hello_interval (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_interval() directly.

    YANG Description: The number of seconds the local system waits between the
transmission of subsequent Hello packets
    """
    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="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_interval 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="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__hello_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_interval(self):
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_retransmission_interval(self):
    """
    Getter method for retransmission_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/timers/config/retransmission_interval (uint32)

    YANG Description: The number of seconds that the local system waits before
retransmitting an unacknowledged LSA.
    """
    return self.__retransmission_interval
      
  def _set_retransmission_interval(self, v, load=False):
    """
    Setter method for retransmission_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/timers/config/retransmission_interval (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_retransmission_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_retransmission_interval() directly.

    YANG Description: The number of seconds that the local system waits before
retransmitting an unacknowledged LSA.
    """
    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="retransmission-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """retransmission_interval 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="retransmission-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__retransmission_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_retransmission_interval(self):
    self.__retransmission_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="retransmission-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)

  dead_interval = __builtin__.property(_get_dead_interval, _set_dead_interval)
  hello_interval = __builtin__.property(_get_hello_interval, _set_hello_interval)
  retransmission_interval = __builtin__.property(_get_retransmission_interval, _set_retransmission_interval)


  _pyangbind_elements = OrderedDict([('dead_interval', dead_interval), ('hello_interval', hello_interval), ('retransmission_interval', retransmission_interval), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_timers_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/timers/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters for OSPFv2 timers on
the interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__dead_interval','__hello_interval','__retransmission_interval',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__dead_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="dead-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__retransmission_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="retransmission-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'interfaces', 'interface', 'timers', 'state']

  def _get_dead_interval(self):
    """
    Getter method for dead_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/timers/state/dead_interval (uint32)

    YANG Description: The number of seconds that the local system should let
elapse before declaring a silent router down
    """
    return self.__dead_interval
      
  def _set_dead_interval(self, v, load=False):
    """
    Setter method for dead_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/timers/state/dead_interval (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dead_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dead_interval() directly.

    YANG Description: The number of seconds that the local system should let
elapse before declaring a silent router down
    """
    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="dead-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dead_interval 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="dead-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__dead_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dead_interval(self):
    self.__dead_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="dead-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_hello_interval(self):
    """
    Getter method for hello_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/timers/state/hello_interval (uint32)

    YANG Description: The number of seconds the local system waits between the
transmission of subsequent Hello packets
    """
    return self.__hello_interval
      
  def _set_hello_interval(self, v, load=False):
    """
    Setter method for hello_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/timers/state/hello_interval (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_interval() directly.

    YANG Description: The number of seconds the local system waits between the
transmission of subsequent Hello packets
    """
    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="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_interval 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="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__hello_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_interval(self):
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_retransmission_interval(self):
    """
    Getter method for retransmission_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/timers/state/retransmission_interval (uint32)

    YANG Description: The number of seconds that the local system waits before
retransmitting an unacknowledged LSA.
    """
    return self.__retransmission_interval
      
  def _set_retransmission_interval(self, v, load=False):
    """
    Setter method for retransmission_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/timers/state/retransmission_interval (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_retransmission_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_retransmission_interval() directly.

    YANG Description: The number of seconds that the local system waits before
retransmitting an unacknowledged LSA.
    """
    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="retransmission-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """retransmission_interval 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="retransmission-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__retransmission_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_retransmission_interval(self):
    self.__retransmission_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="retransmission-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  dead_interval = __builtin__.property(_get_dead_interval)
  hello_interval = __builtin__.property(_get_hello_interval)
  retransmission_interval = __builtin__.property(_get_retransmission_interval)


  _pyangbind_elements = OrderedDict([('dead_interval', dead_interval), ('hello_interval', hello_interval), ('retransmission_interval', retransmission_interval), ])


class yc_timers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_timers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/timers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Timers relating to OSPFv2 on the interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'timers'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_timers_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_timers_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'interfaces', 'interface', 'timers']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/timers/config (container)

    YANG Description: Configuration parameters for OSPFv2 timers on the
interface
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/timers/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 OSPFv2 timers on the
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_timers_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_timers_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_timers_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/timers/state (container)

    YANG Description: Operational state parameters for OSPFv2 timers on
the interface
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/timers/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 OSPFv2 timers on
the interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_timers_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_timers_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_timers_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_mpls_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/mpls/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for OSPFv2 extensions relating
to MPLS for the interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__traffic_engineering_metric',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__traffic_engineering_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="traffic-engineering-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'interfaces', 'interface', 'mpls', 'config']

  def _get_traffic_engineering_metric(self):
    """
    Getter method for traffic_engineering_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/mpls/config/traffic_engineering_metric (uint32)

    YANG Description: A link metric that should only be considered for traffic
engineering purposes.
    """
    return self.__traffic_engineering_metric
      
  def _set_traffic_engineering_metric(self, v, load=False):
    """
    Setter method for traffic_engineering_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/mpls/config/traffic_engineering_metric (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_traffic_engineering_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_traffic_engineering_metric() directly.

    YANG Description: A link metric that should only be considered for traffic
engineering purposes.
    """
    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="traffic-engineering-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """traffic_engineering_metric 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="traffic-engineering-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__traffic_engineering_metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_traffic_engineering_metric(self):
    self.__traffic_engineering_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="traffic-engineering-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)

  traffic_engineering_metric = __builtin__.property(_get_traffic_engineering_metric, _set_traffic_engineering_metric)


  _pyangbind_elements = OrderedDict([('traffic_engineering_metric', traffic_engineering_metric), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_mpls_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/mpls/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for OSPFv2 extensions relating to
MPLS for the interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__traffic_engineering_metric',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__traffic_engineering_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="traffic-engineering-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'interfaces', 'interface', 'mpls', 'state']

  def _get_traffic_engineering_metric(self):
    """
    Getter method for traffic_engineering_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/mpls/state/traffic_engineering_metric (uint32)

    YANG Description: A link metric that should only be considered for traffic
engineering purposes.
    """
    return self.__traffic_engineering_metric
      
  def _set_traffic_engineering_metric(self, v, load=False):
    """
    Setter method for traffic_engineering_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/mpls/state/traffic_engineering_metric (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_traffic_engineering_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_traffic_engineering_metric() directly.

    YANG Description: A link metric that should only be considered for traffic
engineering purposes.
    """
    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="traffic-engineering-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """traffic_engineering_metric 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="traffic-engineering-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__traffic_engineering_metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_traffic_engineering_metric(self):
    self.__traffic_engineering_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="traffic-engineering-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  traffic_engineering_metric = __builtin__.property(_get_traffic_engineering_metric)


  _pyangbind_elements = OrderedDict([('traffic_engineering_metric', traffic_engineering_metric), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_mpls_igp_ldp_sync_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/mpls/igp-ldp-sync/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to LDP/IG
synchronization.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__post_session_up_delay',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__post_session_up_delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="post-session-up-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'interfaces', 'interface', 'mpls', 'igp-ldp-sync', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/mpls/igp_ldp_sync/config/enabled (boolean)

    YANG Description: When this leaf is set to true, do not utilise this link for
forwarding via the IGP until such time as LDP adjacencies to
the neighbor(s) over the link are established.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/mpls/igp_ldp_sync/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When this leaf is set to true, do not utilise this link for
forwarding via the IGP until such time as LDP adjacencies to
the neighbor(s) over the link are established.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_post_session_up_delay(self):
    """
    Getter method for post_session_up_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/mpls/igp_ldp_sync/config/post_session_up_delay (uint32)

    YANG Description: This leaf specifies a delay, expressed in units of milliseconds,
between the LDP session to the IGP neighbor being established, and
it being considered synchronized by the IGP.
    """
    return self.__post_session_up_delay
      
  def _set_post_session_up_delay(self, v, load=False):
    """
    Setter method for post_session_up_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/mpls/igp_ldp_sync/config/post_session_up_delay (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_post_session_up_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_post_session_up_delay() directly.

    YANG Description: This leaf specifies a delay, expressed in units of milliseconds,
between the LDP session to the IGP neighbor being established, and
it being considered synchronized by the IGP.
    """
    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="post-session-up-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """post_session_up_delay 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="post-session-up-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__post_session_up_delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_post_session_up_delay(self):
    self.__post_session_up_delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="post-session-up-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)
  post_session_up_delay = __builtin__.property(_get_post_session_up_delay, _set_post_session_up_delay)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('post_session_up_delay', post_session_up_delay), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_mpls_igp_ldp_sync_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/mpls/igp-ldp-sync/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state variables relating to LDP/IGP
synchronization
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__post_session_up_delay','__synchronized',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__post_session_up_delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="post-session-up-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__synchronized = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="synchronized", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'interfaces', 'interface', 'mpls', 'igp-ldp-sync', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/mpls/igp_ldp_sync/state/enabled (boolean)

    YANG Description: When this leaf is set to true, do not utilise this link for
forwarding via the IGP until such time as LDP adjacencies to
the neighbor(s) over the link are established.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/mpls/igp_ldp_sync/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When this leaf is set to true, do not utilise this link for
forwarding via the IGP until such time as LDP adjacencies to
the neighbor(s) over the link are established.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_post_session_up_delay(self):
    """
    Getter method for post_session_up_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/mpls/igp_ldp_sync/state/post_session_up_delay (uint32)

    YANG Description: This leaf specifies a delay, expressed in units of milliseconds,
between the LDP session to the IGP neighbor being established, and
it being considered synchronized by the IGP.
    """
    return self.__post_session_up_delay
      
  def _set_post_session_up_delay(self, v, load=False):
    """
    Setter method for post_session_up_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/mpls/igp_ldp_sync/state/post_session_up_delay (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_post_session_up_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_post_session_up_delay() directly.

    YANG Description: This leaf specifies a delay, expressed in units of milliseconds,
between the LDP session to the IGP neighbor being established, and
it being considered synchronized by the IGP.
    """
    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="post-session-up-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """post_session_up_delay 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="post-session-up-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__post_session_up_delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_post_session_up_delay(self):
    self.__post_session_up_delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="post-session-up-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_synchronized(self):
    """
    Getter method for synchronized, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/mpls/igp_ldp_sync/state/synchronized (boolean)

    YANG Description: When the value of this leaf is set to true, the
LDP neighbors reachable via this interface are considered
to be synchronized, and hence the link is considered
usable by the IGP.
    """
    return self.__synchronized
      
  def _set_synchronized(self, v, load=False):
    """
    Setter method for synchronized, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/mpls/igp_ldp_sync/state/synchronized (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_synchronized is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_synchronized() directly.

    YANG Description: When the value of this leaf is set to true, the
LDP neighbors reachable via this interface are considered
to be synchronized, and hence the link is considered
usable by the IGP.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="synchronized", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """synchronized must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="synchronized", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__synchronized = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_synchronized(self):
    self.__synchronized = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="synchronized", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  enabled = __builtin__.property(_get_enabled)
  post_session_up_delay = __builtin__.property(_get_post_session_up_delay)
  synchronized = __builtin__.property(_get_synchronized)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('post_session_up_delay', post_session_up_delay), ('synchronized', synchronized), ])


class yc_igp_ldp_sync_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_mpls_igp_ldp_sync(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/mpls/igp-ldp-sync. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: OSPFv2 parameters relating to LDP/IGP synchronization
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'igp-ldp-sync'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_mpls_igp_ldp_sync_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_mpls_igp_ldp_sync_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'interfaces', 'interface', 'mpls', 'igp-ldp-sync']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/mpls/igp_ldp_sync/config (container)

    YANG Description: Configuration parameters relating to LDP/IG
synchronization.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/mpls/igp_ldp_sync/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 LDP/IG
synchronization.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_mpls_igp_ldp_sync_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_mpls_igp_ldp_sync_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_mpls_igp_ldp_sync_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/mpls/igp_ldp_sync/state (container)

    YANG Description: Operational state variables relating to LDP/IGP
synchronization
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/mpls/igp_ldp_sync/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 variables relating to LDP/IGP
synchronization
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_mpls_igp_ldp_sync_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_mpls_igp_ldp_sync_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_mpls_igp_ldp_sync_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_mpls_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_mpls(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/mpls. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration and operational state parameters for
OSPFv2 extensions related to MPLS on the interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__igp_ldp_sync',)

  _yang_name = 'mpls'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__igp_ldp_sync = YANGDynClass(base=yc_igp_ldp_sync_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_mpls_igp_ldp_sync, is_container='container', yang_name="igp-ldp-sync", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'interfaces', 'interface', 'mpls']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/mpls/config (container)

    YANG Description: Configuration parameters for OSPFv2 extensions relating
to MPLS for the interface
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/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 for OSPFv2 extensions relating
to MPLS for the interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/mpls/state (container)

    YANG Description: Operational state for OSPFv2 extensions relating to
MPLS for the interface
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/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 for OSPFv2 extensions relating to
MPLS for the interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_igp_ldp_sync(self):
    """
    Getter method for igp_ldp_sync, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/mpls/igp_ldp_sync (container)

    YANG Description: OSPFv2 parameters relating to LDP/IGP synchronization
    """
    return self.__igp_ldp_sync
      
  def _set_igp_ldp_sync(self, v, load=False):
    """
    Setter method for igp_ldp_sync, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/mpls/igp_ldp_sync (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_igp_ldp_sync is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_igp_ldp_sync() directly.

    YANG Description: OSPFv2 parameters relating to LDP/IGP synchronization
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_igp_ldp_sync_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_mpls_igp_ldp_sync, is_container='container', yang_name="igp-ldp-sync", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """igp_ldp_sync must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_igp_ldp_sync_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_mpls_igp_ldp_sync, is_container='container', yang_name="igp-ldp-sync", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__igp_ldp_sync = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_igp_ldp_sync(self):
    self.__igp_ldp_sync = YANGDynClass(base=yc_igp_ldp_sync_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_mpls_igp_ldp_sync, is_container='container', yang_name="igp-ldp-sync", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  igp_ldp_sync = __builtin__.property(_get_igp_ldp_sync, _set_igp_ldp_sync)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('igp_ldp_sync', igp_ldp_sync), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_lsa_filter_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/lsa-filter/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to filtering LSAs
on the specified interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__all',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__all = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="all", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'interfaces', 'interface', 'lsa-filter', 'config']

  def _get_all(self):
    """
    Getter method for all, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/lsa_filter/config/all (boolean)

    YANG Description: When this leaf is set to true, all LSAs should be
filtered to the neighbours with whom adjacencies are
formed on the interface.
    """
    return self.__all
      
  def _set_all(self, v, load=False):
    """
    Setter method for all, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/lsa_filter/config/all (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_all is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_all() directly.

    YANG Description: When this leaf is set to true, all LSAs should be
filtered to the neighbours with whom adjacencies are
formed on the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="all", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """all must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="all", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__all = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_all(self):
    self.__all = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="all", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  all = __builtin__.property(_get_all, _set_all)


  _pyangbind_elements = OrderedDict([('all', all), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_lsa_filter_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/lsa-filter/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 filtering
LSAs on the specified interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__all',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__all = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="all", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'interfaces', 'interface', 'lsa-filter', 'state']

  def _get_all(self):
    """
    Getter method for all, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/lsa_filter/state/all (boolean)

    YANG Description: When this leaf is set to true, all LSAs should be
filtered to the neighbours with whom adjacencies are
formed on the interface.
    """
    return self.__all
      
  def _set_all(self, v, load=False):
    """
    Setter method for all, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/lsa_filter/state/all (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_all is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_all() directly.

    YANG Description: When this leaf is set to true, all LSAs should be
filtered to the neighbours with whom adjacencies are
formed on the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="all", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """all must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="all", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__all = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_all(self):
    self.__all = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="all", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  all = __builtin__.property(_get_all)


  _pyangbind_elements = OrderedDict([('all', all), ])


class yc_lsa_filter_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_lsa_filter(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/lsa-filter. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: OSPFv2 parameters relating to filtering of LSAs to
neighbors the specified interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'lsa-filter'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_lsa_filter_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_lsa_filter_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'interfaces', 'interface', 'lsa-filter']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/lsa_filter/config (container)

    YANG Description: Configuration parameters relating to filtering LSAs
on the specified interface.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/lsa_filter/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 filtering LSAs
on the specified interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_lsa_filter_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_lsa_filter_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_lsa_filter_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/lsa_filter/state (container)

    YANG Description: Operational state parameters relating to filtering
LSAs on the specified interface
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/lsa_filter/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 filtering
LSAs on the specified interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_lsa_filter_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_lsa_filter_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_lsa_filter_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_neighbors_neighbor_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors/neighbor/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 adjacent
system
  """
  __slots__ = ('_path_helper', '_extmethods', '__router_id','__metric',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__router_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=True)
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'interfaces', 'interface', 'neighbors', 'neighbor', 'config']

  def _get_router_id(self):
    """
    Getter method for router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors/neighbor/config/router_id (yang:dotted-quad)

    YANG Description: The router ID of the remote system.
    """
    return self.__router_id
      
  def _set_router_id(self, v, load=False):
    """
    Setter method for router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors/neighbor/config/router_id (yang:dotted-quad)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_router_id() directly.

    YANG Description: The router ID of the remote system.
    """
    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][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """router_id must be of a type compatible with yang:dotted-quad""",
          'defined-type': "yang:dotted-quad",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=True)""",
        })

    self.__router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_router_id(self):
    self.__router_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=True)


  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors/neighbor/config/metric (oc-ospf-types:ospf-metric)

    YANG Description: The metric that should be considered to the remote neighbor
over this interface. This configuration is only applicable
for multiple-access networks
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors/neighbor/config/metric (oc-ospf-types:ospf-metric)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: The metric that should be considered to the remote neighbor
over this interface. This configuration is only applicable
for multiple-access networks
    """
    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="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric must be of a type compatible with oc-ospf-types:ospf-metric""",
          'defined-type': "oc-ospf-types:ospf-metric",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', is_config=True)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', is_config=True)

  router_id = __builtin__.property(_get_router_id, _set_router_id)
  metric = __builtin__.property(_get_metric, _set_metric)


  _pyangbind_elements = OrderedDict([('router_id', router_id), ('metric', metric), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_neighbors_neighbor_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors/neighbor/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 adjacent
system
  """
  __slots__ = ('_path_helper', '_extmethods', '__router_id','__metric','__priority','__dead_time','__designated_router','__backup_designated_router','__optional_capabilities','__last_established_time','__adjacency_state','__state_changes','__retransmission_queue_length',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__router_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', is_config=False)
    self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__dead_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dead-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__designated_router = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="designated-router", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)
    self.__backup_designated_router = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="backup-designated-router", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)
    self.__optional_capabilities = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="optional-capabilities", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:hex-string', is_config=False)
    self.__last_established_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-established-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__adjacency_state = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DOWN': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:DOWN': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:DOWN': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'ATTEMPT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ATTEMPT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ATTEMPT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'INIT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:INIT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:INIT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TWO_WAY': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TWO_WAY': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TWO_WAY': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'EXSTART': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:EXSTART': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:EXSTART': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'EXCHANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:EXCHANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:EXCHANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'LOADING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:LOADING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:LOADING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'FULL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:FULL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:FULL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},), is_leaf=True, yang_name="adjacency-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__state_changes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="state-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__retransmission_queue_length = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="retransmission-queue-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'interfaces', 'interface', 'neighbors', 'neighbor', 'state']

  def _get_router_id(self):
    """
    Getter method for router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors/neighbor/state/router_id (yang:dotted-quad)

    YANG Description: The router ID of the remote system.
    """
    return self.__router_id
      
  def _set_router_id(self, v, load=False):
    """
    Setter method for router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors/neighbor/state/router_id (yang:dotted-quad)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_router_id() directly.

    YANG Description: The router ID of the remote system.
    """
    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][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """router_id must be of a type compatible with yang:dotted-quad""",
          'defined-type': "yang:dotted-quad",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)""",
        })

    self.__router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_router_id(self):
    self.__router_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)


  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors/neighbor/state/metric (oc-ospf-types:ospf-metric)

    YANG Description: The metric that should be considered to the remote neighbor
over this interface. This configuration is only applicable
for multiple-access networks
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors/neighbor/state/metric (oc-ospf-types:ospf-metric)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: The metric that should be considered to the remote neighbor
over this interface. This configuration is only applicable
for multiple-access networks
    """
    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="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric must be of a type compatible with oc-ospf-types:ospf-metric""",
          'defined-type': "oc-ospf-types:ospf-metric",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', is_config=False)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ospf-types:ospf-metric', is_config=False)


  def _get_priority(self):
    """
    Getter method for priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors/neighbor/state/priority (uint8)

    YANG Description: The remote system's priority to become the designated
router
    """
    return self.__priority
      
  def _set_priority(self, v, load=False):
    """
    Setter method for priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors/neighbor/state/priority (uint8)
    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: The remote system's priority to become the designated
router
    """
    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="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """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="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_priority(self):
    self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_dead_time(self):
    """
    Getter method for dead_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors/neighbor/state/dead_time (oc-types:timeticks64)

    YANG Description: The time at which this neighbor's adjacency will be
considered dead. The value is expressed relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    return self.__dead_time
      
  def _set_dead_time(self, v, load=False):
    """
    Setter method for dead_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors/neighbor/state/dead_time (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dead_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dead_time() directly.

    YANG Description: The time at which this neighbor's adjacency will be
considered dead. The value is expressed relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    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="dead-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dead_time must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dead-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__dead_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dead_time(self):
    self.__dead_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dead-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_designated_router(self):
    """
    Getter method for designated_router, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors/neighbor/state/designated_router (yang:dotted-quad)

    YANG Description: The designated router for the adjacency. This device
advertises the Network LSA for broadcast and NBMA networks.
    """
    return self.__designated_router
      
  def _set_designated_router(self, v, load=False):
    """
    Setter method for designated_router, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors/neighbor/state/designated_router (yang:dotted-quad)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_designated_router is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_designated_router() directly.

    YANG Description: The designated router for the adjacency. This device
advertises the Network LSA for broadcast and NBMA networks.
    """
    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][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="designated-router", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """designated_router must be of a type compatible with yang:dotted-quad""",
          'defined-type': "yang:dotted-quad",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="designated-router", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)""",
        })

    self.__designated_router = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_designated_router(self):
    self.__designated_router = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="designated-router", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)


  def _get_backup_designated_router(self):
    """
    Getter method for backup_designated_router, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors/neighbor/state/backup_designated_router (yang:dotted-quad)

    YANG Description: The backup designated router for the adjacency.
    """
    return self.__backup_designated_router
      
  def _set_backup_designated_router(self, v, load=False):
    """
    Setter method for backup_designated_router, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors/neighbor/state/backup_designated_router (yang:dotted-quad)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_backup_designated_router is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_backup_designated_router() directly.

    YANG Description: The backup designated router for the adjacency.
    """
    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][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="backup-designated-router", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """backup_designated_router must be of a type compatible with yang:dotted-quad""",
          'defined-type': "yang:dotted-quad",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="backup-designated-router", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)""",
        })

    self.__backup_designated_router = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_backup_designated_router(self):
    self.__backup_designated_router = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="backup-designated-router", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)


  def _get_optional_capabilities(self):
    """
    Getter method for optional_capabilities, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors/neighbor/state/optional_capabilities (yang:hex-string)

    YANG Description: The optional capabilities field received in the Hello
message from the neighbor
    """
    return self.__optional_capabilities
      
  def _set_optional_capabilities(self, v, load=False):
    """
    Setter method for optional_capabilities, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors/neighbor/state/optional_capabilities (yang:hex-string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_optional_capabilities is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_optional_capabilities() directly.

    YANG Description: The optional capabilities field received in the Hello
message from the neighbor
    """
    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})*)?'}), is_leaf=True, yang_name="optional-capabilities", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:hex-string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """optional_capabilities must be of a type compatible with yang:hex-string""",
          'defined-type': "yang:hex-string",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="optional-capabilities", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:hex-string', is_config=False)""",
        })

    self.__optional_capabilities = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_optional_capabilities(self):
    self.__optional_capabilities = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="optional-capabilities", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:hex-string', is_config=False)


  def _get_last_established_time(self):
    """
    Getter method for last_established_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors/neighbor/state/last_established_time (oc-types:timeticks64)

    YANG Description: The time at which the adjacency was last established with
the neighbor. That is to say the time at which the
adjacency last transitioned into the FULL state. The
value is expressed relative to the Unix Epoch (Jan 1 1970
00:00:00 UTC).
    """
    return self.__last_established_time
      
  def _set_last_established_time(self, v, load=False):
    """
    Setter method for last_established_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors/neighbor/state/last_established_time (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_last_established_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_last_established_time() directly.

    YANG Description: The time at which the adjacency was last established with
the neighbor. That is to say the time at which the
adjacency last transitioned into the FULL state. The
value is expressed relative to the Unix Epoch (Jan 1 1970
00:00:00 UTC).
    """
    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="last-established-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """last_established_time must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-established-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__last_established_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_last_established_time(self):
    self.__last_established_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-established-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_adjacency_state(self):
    """
    Getter method for adjacency_state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors/neighbor/state/adjacency_state (identityref)

    YANG Description: The state of the adjacency with the neighbor.
    """
    return self.__adjacency_state
      
  def _set_adjacency_state(self, v, load=False):
    """
    Setter method for adjacency_state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors/neighbor/state/adjacency_state (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adjacency_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adjacency_state() directly.

    YANG Description: The state of the adjacency with the neighbor.
    """
    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={'DOWN': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:DOWN': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:DOWN': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'ATTEMPT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ATTEMPT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ATTEMPT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'INIT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:INIT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:INIT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TWO_WAY': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TWO_WAY': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TWO_WAY': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'EXSTART': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:EXSTART': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:EXSTART': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'EXCHANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:EXCHANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:EXCHANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'LOADING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:LOADING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:LOADING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'FULL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:FULL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:FULL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},), is_leaf=True, yang_name="adjacency-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adjacency_state must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DOWN': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:DOWN': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:DOWN': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'ATTEMPT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ATTEMPT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ATTEMPT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'INIT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:INIT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:INIT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TWO_WAY': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TWO_WAY': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TWO_WAY': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'EXSTART': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:EXSTART': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:EXSTART': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'EXCHANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:EXCHANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:EXCHANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'LOADING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:LOADING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:LOADING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'FULL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:FULL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:FULL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},), is_leaf=True, yang_name="adjacency-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__adjacency_state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adjacency_state(self):
    self.__adjacency_state = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DOWN': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:DOWN': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:DOWN': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'ATTEMPT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ATTEMPT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ATTEMPT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'INIT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:INIT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:INIT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TWO_WAY': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TWO_WAY': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TWO_WAY': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'EXSTART': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:EXSTART': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:EXSTART': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'EXCHANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:EXCHANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:EXCHANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'LOADING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:LOADING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:LOADING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'FULL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:FULL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:FULL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},), is_leaf=True, yang_name="adjacency-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_state_changes(self):
    """
    Getter method for state_changes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors/neighbor/state/state_changes (uint32)

    YANG Description: The number of transitions out of the FULL state that this
neighbor has been through
    """
    return self.__state_changes
      
  def _set_state_changes(self, v, load=False):
    """
    Setter method for state_changes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors/neighbor/state/state_changes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state_changes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state_changes() directly.

    YANG Description: The number of transitions out of the FULL state that this
neighbor has been through
    """
    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="state-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state_changes 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="state-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__state_changes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state_changes(self):
    self.__state_changes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="state-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_retransmission_queue_length(self):
    """
    Getter method for retransmission_queue_length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors/neighbor/state/retransmission_queue_length (uint32)

    YANG Description: The number of LSAs that are currently in the queue to be
retransmitted to the neighbor
    """
    return self.__retransmission_queue_length
      
  def _set_retransmission_queue_length(self, v, load=False):
    """
    Setter method for retransmission_queue_length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors/neighbor/state/retransmission_queue_length (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_retransmission_queue_length is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_retransmission_queue_length() directly.

    YANG Description: The number of LSAs that are currently in the queue to be
retransmitted to the neighbor
    """
    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="retransmission-queue-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """retransmission_queue_length 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="retransmission-queue-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__retransmission_queue_length = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_retransmission_queue_length(self):
    self.__retransmission_queue_length = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="retransmission-queue-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  router_id = __builtin__.property(_get_router_id)
  metric = __builtin__.property(_get_metric)
  priority = __builtin__.property(_get_priority)
  dead_time = __builtin__.property(_get_dead_time)
  designated_router = __builtin__.property(_get_designated_router)
  backup_designated_router = __builtin__.property(_get_backup_designated_router)
  optional_capabilities = __builtin__.property(_get_optional_capabilities)
  last_established_time = __builtin__.property(_get_last_established_time)
  adjacency_state = __builtin__.property(_get_adjacency_state)
  state_changes = __builtin__.property(_get_state_changes)
  retransmission_queue_length = __builtin__.property(_get_retransmission_queue_length)


  _pyangbind_elements = OrderedDict([('router_id', router_id), ('metric', metric), ('priority', priority), ('dead_time', dead_time), ('designated_router', designated_router), ('backup_designated_router', backup_designated_router), ('optional_capabilities', optional_capabilities), ('last_established_time', last_established_time), ('adjacency_state', adjacency_state), ('state_changes', state_changes), ('retransmission_queue_length', retransmission_queue_length), ])


class yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_neighbors_neighbor(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors/neighbor. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A neighbor with which an OSPFv2 adjacency has been
established within this area
  """
  __slots__ = ('_path_helper', '_extmethods', '__router_id','__config','__state',)

  _yang_name = 'neighbor'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__router_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_neighbors_neighbor_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'interfaces', 'interface', 'neighbors', 'neighbor']

  def _get_router_id(self):
    """
    Getter method for router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors/neighbor/router_id (leafref)

    YANG Description: Reference to the router ID of the adjacent system
    """
    return self.__router_id
      
  def _set_router_id(self, v, load=False):
    """
    Setter method for router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors/neighbor/router_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_router_id() directly.

    YANG Description: Reference to the router ID of the adjacent system
    """
    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="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """router_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_router_id(self):
    self.__router_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors/neighbor/config (container)

    YANG Description: Configuration parameters relating to the adjacent
system
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors/neighbor/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 adjacent
system
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_neighbors_neighbor_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_neighbors_neighbor_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_neighbors_neighbor_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors/neighbor/state (container)

    YANG Description: Operational state parameters relating to the adjacent
system
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors/neighbor/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 adjacent
system
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  router_id = __builtin__.property(_get_router_id, _set_router_id)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('router_id', router_id), ('config', config), ('state', state), ])


class yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_neighbors(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors. 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 neighbors that
an adjacency has been established with on the interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__neighbor',)

  _yang_name = 'neighbors'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__neighbor = YANGDynClass(base=YANGListType("router_id",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='router-id', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'interfaces', 'interface', 'neighbors']

  def _get_neighbor(self):
    """
    Getter method for neighbor, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors/neighbor (list)

    YANG Description: A neighbor with which an OSPFv2 adjacency has been
established within this area
    """
    return self.__neighbor
      
  def _set_neighbor(self, v, load=False):
    """
    Setter method for neighbor, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors/neighbor (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor() directly.

    YANG Description: A neighbor with which an OSPFv2 adjacency has been
established within this area
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("router_id",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='router-id', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("router_id",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='router-id', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__neighbor = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor(self):
    self.__neighbor = YANGDynClass(base=YANGListType("router_id",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='router-id', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  neighbor = __builtin__.property(_get_neighbor, _set_neighbor)


  _pyangbind_elements = OrderedDict([('neighbor', neighbor), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_enable_bfd_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/enable-bfd/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to enabling BFD.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'interfaces', 'interface', 'enable-bfd', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/enable_bfd/config/enabled (boolean)

    YANG Description: When this leaf is set to true, BFD is used to detect the
liveliness of the remote peer or next-hop.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/enable_bfd/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When this leaf is set to true, BFD is used to detect the
liveliness of the remote peer or next-hop.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_enable_bfd_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/enable-bfd/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 enabing BFD.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'interfaces', 'interface', 'enable-bfd', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/enable_bfd/state/enabled (boolean)

    YANG Description: When this leaf is set to true, BFD is used to detect the
liveliness of the remote peer or next-hop.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/enable_bfd/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When this leaf is set to true, BFD is used to detect the
liveliness of the remote peer or next-hop.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  enabled = __builtin__.property(_get_enabled)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ])


class yc_enable_bfd_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_enable_bfd(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/enable-bfd. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enable BFD for liveliness detection to the next-hop or
neighbour.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'enable-bfd'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_enable_bfd_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_enable_bfd_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'interfaces', 'interface', 'enable-bfd']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/enable_bfd/config (container)

    YANG Description: Configuration parameters relating to enabling BFD.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/enable_bfd/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 enabling BFD.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_enable_bfd_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_enable_bfd_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_enable_bfd_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/enable_bfd/state (container)

    YANG Description: Operational state parameters relating to enabing BFD.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/enable_bfd/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 enabing BFD.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_enable_bfd_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_enable_bfd_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_enable_bfd_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_interface_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/interfaces/interface. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of interfaces which are enabled within this area
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__config','__state','__interface_ref','__timers','__mpls','__lsa_filter','__neighbors','__enable_bfd',)

  _yang_name = 'interface'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__interface_ref = YANGDynClass(base=yc_interface_ref_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__timers = YANGDynClass(base=yc_timers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_timers, is_container='container', yang_name="timers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__mpls = YANGDynClass(base=yc_mpls_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__lsa_filter = YANGDynClass(base=yc_lsa_filter_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_lsa_filter, is_container='container', yang_name="lsa-filter", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__neighbors = YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__enable_bfd = YANGDynClass(base=yc_enable_bfd_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_enable_bfd, is_container='container', yang_name="enable-bfd", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'interfaces', 'interface']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/id (leafref)

    YANG Description: A pointer to the identifier for the interface.
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/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: A pointer to the identifier for 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="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/config (container)

    YANG Description: Configuration parameters for the interface on which
OSPFv2 is enabled
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/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 parameters for the interface on which
OSPFv2 is enabled
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/state (container)

    YANG Description: Operational state parameters for the interface on which
OSPFv2 is enabled
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/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 parameters for the interface on which
OSPFv2 is enabled
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_interface_ref(self):
    """
    Getter method for interface_ref, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/interface_ref (container)

    YANG Description: Reference to an interface or subinterface
    """
    return self.__interface_ref
      
  def _set_interface_ref(self, v, load=False):
    """
    Setter method for interface_ref, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/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
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interface_ref_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_timers(self):
    """
    Getter method for timers, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/timers (container)

    YANG Description: Timers relating to OSPFv2 on the interface
    """
    return self.__timers
      
  def _set_timers(self, v, load=False):
    """
    Setter method for timers, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/timers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_timers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_timers() directly.

    YANG Description: Timers relating to OSPFv2 on the interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_timers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_timers, is_container='container', yang_name="timers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """timers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_timers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_timers, is_container='container', yang_name="timers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__timers = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_timers(self):
    self.__timers = YANGDynClass(base=yc_timers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_timers, is_container='container', yang_name="timers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_mpls(self):
    """
    Getter method for mpls, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/mpls (container)

    YANG Description: Configuration and operational state parameters for
OSPFv2 extensions related to MPLS on the interface.
    """
    return self.__mpls
      
  def _set_mpls(self, v, load=False):
    """
    Setter method for mpls, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/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: Configuration and operational state parameters for
OSPFv2 extensions related to MPLS on the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_mpls_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_lsa_filter(self):
    """
    Getter method for lsa_filter, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/lsa_filter (container)

    YANG Description: OSPFv2 parameters relating to filtering of LSAs to
neighbors the specified interface.
    """
    return self.__lsa_filter
      
  def _set_lsa_filter(self, v, load=False):
    """
    Setter method for lsa_filter, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/lsa_filter (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsa_filter is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsa_filter() directly.

    YANG Description: OSPFv2 parameters relating to filtering of LSAs to
neighbors the specified interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_lsa_filter_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_lsa_filter, is_container='container', yang_name="lsa-filter", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsa_filter must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_lsa_filter_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_lsa_filter, is_container='container', yang_name="lsa-filter", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__lsa_filter = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsa_filter(self):
    self.__lsa_filter = YANGDynClass(base=yc_lsa_filter_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_lsa_filter, is_container='container', yang_name="lsa-filter", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_neighbors(self):
    """
    Getter method for neighbors, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors (container)

    YANG Description: Enclosing container for the list of neighbors that
an adjacency has been established with on the interface
    """
    return self.__neighbors
      
  def _set_neighbors(self, v, load=False):
    """
    Setter method for neighbors, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbors is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbors() directly.

    YANG Description: Enclosing container for the list of neighbors that
an adjacency has been established with on the interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbors must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__neighbors = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbors(self):
    self.__neighbors = YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_enable_bfd(self):
    """
    Getter method for enable_bfd, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/enable_bfd (container)

    YANG Description: Enable BFD for liveliness detection to the next-hop or
neighbour.
    """
    return self.__enable_bfd
      
  def _set_enable_bfd(self, v, load=False):
    """
    Setter method for enable_bfd, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/enable_bfd (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable_bfd is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable_bfd() directly.

    YANG Description: Enable BFD for liveliness detection to the next-hop or
neighbour.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_enable_bfd_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_enable_bfd, is_container='container', yang_name="enable-bfd", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable_bfd must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_enable_bfd_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_enable_bfd, is_container='container', yang_name="enable-bfd", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__enable_bfd = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable_bfd(self):
    self.__enable_bfd = YANGDynClass(base=yc_enable_bfd_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface_enable_bfd, is_container='container', yang_name="enable-bfd", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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)
  interface_ref = __builtin__.property(_get_interface_ref, _set_interface_ref)
  timers = __builtin__.property(_get_timers, _set_timers)
  mpls = __builtin__.property(_get_mpls, _set_mpls)
  lsa_filter = __builtin__.property(_get_lsa_filter, _set_lsa_filter)
  neighbors = __builtin__.property(_get_neighbors, _set_neighbors)
  enable_bfd = __builtin__.property(_get_enable_bfd, _set_enable_bfd)


  _pyangbind_elements = OrderedDict([('id', id), ('config', config), ('state', state), ('interface_ref', interface_ref), ('timers', timers), ('mpls', mpls), ('lsa_filter', lsa_filter), ('neighbors', neighbors), ('enable_bfd', enable_bfd), ])


class yc_interfaces_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/interfaces. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for a list of interfaces enabled within
this area
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface',)

  _yang_name = 'interfaces'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__interface = YANGDynClass(base=YANGListType("id",yc_interface_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface, yang_name="interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'interfaces']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces/interface (list)

    YANG Description: List of interfaces which are enabled within this area
    """
    return self.__interface
      
  def _set_interface(self, v, load=False):
    """
    Setter method for interface, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/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 which are enabled within this area
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("id",yc_interface_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface, yang_name="interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='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/network-instance', defining_module='openconfig-network-instance', 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("id",yc_interface_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface, yang_name="interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='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/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__interface = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_interface(self):
    self.__interface = YANGDynClass(base=YANGListType("id",yc_interface_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_interfaces_interface, yang_name="interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='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/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  interface = __builtin__.property(_get_interface, _set_interface)


  _pyangbind_elements = OrderedDict([('interface', interface), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_virtual_links_virtual_link_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/virtual-links/virtual-link/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 OSPF virtual link
  """
  __slots__ = ('_path_helper', '_extmethods', '__remote_router_id',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__remote_router_id = YANGDynClass(base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="remote-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'virtual-links', 'virtual-link', 'config']

  def _get_remote_router_id(self):
    """
    Getter method for remote_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/virtual_links/virtual_link/config/remote_router_id (inet:ipv4-address-no-zone)

    YANG Description: The router ID of the device which terminates the remote end
of the virtual link
    """
    return self.__remote_router_id
      
  def _set_remote_router_id(self, v, load=False):
    """
    Setter method for remote_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/virtual_links/virtual_link/config/remote_router_id (inet:ipv4-address-no-zone)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_remote_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_remote_router_id() directly.

    YANG Description: The router ID of the device which terminates the remote end
of the virtual link
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="remote-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """remote_router_id must be of a type compatible with inet:ipv4-address-no-zone""",
          'defined-type': "inet:ipv4-address-no-zone",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="remote-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=True)""",
        })

    self.__remote_router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_remote_router_id(self):
    self.__remote_router_id = YANGDynClass(base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="remote-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=True)

  remote_router_id = __builtin__.property(_get_remote_router_id, _set_remote_router_id)


  _pyangbind_elements = OrderedDict([('remote_router_id', remote_router_id), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_virtual_links_virtual_link_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/virtual-links/virtual-link/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to the OSPF virtual link
  """
  __slots__ = ('_path_helper', '_extmethods', '__remote_router_id','__priority','__dead_time','__designated_router','__backup_designated_router','__optional_capabilities','__last_established_time','__adjacency_state','__state_changes','__retransmission_queue_length',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__remote_router_id = YANGDynClass(base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="remote-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)
    self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__dead_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dead-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__designated_router = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="designated-router", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)
    self.__backup_designated_router = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="backup-designated-router", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)
    self.__optional_capabilities = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="optional-capabilities", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:hex-string', is_config=False)
    self.__last_established_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-established-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__adjacency_state = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DOWN': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:DOWN': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:DOWN': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'ATTEMPT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ATTEMPT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ATTEMPT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'INIT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:INIT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:INIT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TWO_WAY': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TWO_WAY': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TWO_WAY': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'EXSTART': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:EXSTART': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:EXSTART': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'EXCHANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:EXCHANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:EXCHANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'LOADING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:LOADING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:LOADING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'FULL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:FULL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:FULL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},), is_leaf=True, yang_name="adjacency-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__state_changes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="state-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__retransmission_queue_length = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="retransmission-queue-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'virtual-links', 'virtual-link', 'state']

  def _get_remote_router_id(self):
    """
    Getter method for remote_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/virtual_links/virtual_link/state/remote_router_id (inet:ipv4-address-no-zone)

    YANG Description: The router ID of the device which terminates the remote end
of the virtual link
    """
    return self.__remote_router_id
      
  def _set_remote_router_id(self, v, load=False):
    """
    Setter method for remote_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/virtual_links/virtual_link/state/remote_router_id (inet:ipv4-address-no-zone)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_remote_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_remote_router_id() directly.

    YANG Description: The router ID of the device which terminates the remote end
of the virtual link
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="remote-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """remote_router_id must be of a type compatible with inet:ipv4-address-no-zone""",
          'defined-type': "inet:ipv4-address-no-zone",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="remote-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)""",
        })

    self.__remote_router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_remote_router_id(self):
    self.__remote_router_id = YANGDynClass(base=RestrictedClassType(base_type=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}'}), restriction_dict={'pattern': '[0-9\\.]*'}), is_leaf=True, yang_name="remote-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address-no-zone', is_config=False)


  def _get_priority(self):
    """
    Getter method for priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/virtual_links/virtual_link/state/priority (uint8)

    YANG Description: The remote system's priority to become the designated
router
    """
    return self.__priority
      
  def _set_priority(self, v, load=False):
    """
    Setter method for priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/virtual_links/virtual_link/state/priority (uint8)
    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: The remote system's priority to become the designated
router
    """
    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="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """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="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_priority(self):
    self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_dead_time(self):
    """
    Getter method for dead_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/virtual_links/virtual_link/state/dead_time (oc-types:timeticks64)

    YANG Description: The time at which this neighbor's adjacency will be
considered dead. The value is expressed relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    return self.__dead_time
      
  def _set_dead_time(self, v, load=False):
    """
    Setter method for dead_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/virtual_links/virtual_link/state/dead_time (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dead_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dead_time() directly.

    YANG Description: The time at which this neighbor's adjacency will be
considered dead. The value is expressed relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    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="dead-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dead_time must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dead-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__dead_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dead_time(self):
    self.__dead_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="dead-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_designated_router(self):
    """
    Getter method for designated_router, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/virtual_links/virtual_link/state/designated_router (yang:dotted-quad)

    YANG Description: The designated router for the adjacency. This device
advertises the Network LSA for broadcast and NBMA networks.
    """
    return self.__designated_router
      
  def _set_designated_router(self, v, load=False):
    """
    Setter method for designated_router, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/virtual_links/virtual_link/state/designated_router (yang:dotted-quad)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_designated_router is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_designated_router() directly.

    YANG Description: The designated router for the adjacency. This device
advertises the Network LSA for broadcast and NBMA networks.
    """
    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][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="designated-router", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """designated_router must be of a type compatible with yang:dotted-quad""",
          'defined-type': "yang:dotted-quad",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="designated-router", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)""",
        })

    self.__designated_router = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_designated_router(self):
    self.__designated_router = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="designated-router", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)


  def _get_backup_designated_router(self):
    """
    Getter method for backup_designated_router, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/virtual_links/virtual_link/state/backup_designated_router (yang:dotted-quad)

    YANG Description: The backup designated router for the adjacency.
    """
    return self.__backup_designated_router
      
  def _set_backup_designated_router(self, v, load=False):
    """
    Setter method for backup_designated_router, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/virtual_links/virtual_link/state/backup_designated_router (yang:dotted-quad)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_backup_designated_router is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_backup_designated_router() directly.

    YANG Description: The backup designated router for the adjacency.
    """
    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][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="backup-designated-router", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """backup_designated_router must be of a type compatible with yang:dotted-quad""",
          'defined-type': "yang:dotted-quad",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="backup-designated-router", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)""",
        })

    self.__backup_designated_router = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_backup_designated_router(self):
    self.__backup_designated_router = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="backup-designated-router", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)


  def _get_optional_capabilities(self):
    """
    Getter method for optional_capabilities, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/virtual_links/virtual_link/state/optional_capabilities (yang:hex-string)

    YANG Description: The optional capabilities field received in the Hello
message from the neighbor
    """
    return self.__optional_capabilities
      
  def _set_optional_capabilities(self, v, load=False):
    """
    Setter method for optional_capabilities, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/virtual_links/virtual_link/state/optional_capabilities (yang:hex-string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_optional_capabilities is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_optional_capabilities() directly.

    YANG Description: The optional capabilities field received in the Hello
message from the neighbor
    """
    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})*)?'}), is_leaf=True, yang_name="optional-capabilities", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:hex-string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """optional_capabilities must be of a type compatible with yang:hex-string""",
          'defined-type': "yang:hex-string",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="optional-capabilities", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:hex-string', is_config=False)""",
        })

    self.__optional_capabilities = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_optional_capabilities(self):
    self.__optional_capabilities = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="optional-capabilities", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:hex-string', is_config=False)


  def _get_last_established_time(self):
    """
    Getter method for last_established_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/virtual_links/virtual_link/state/last_established_time (oc-types:timeticks64)

    YANG Description: The time at which the adjacency was last established with
the neighbor. That is to say the time at which the
adjacency last transitioned into the FULL state. The
value is expressed relative to the Unix Epoch (Jan 1 1970
00:00:00 UTC).
    """
    return self.__last_established_time
      
  def _set_last_established_time(self, v, load=False):
    """
    Setter method for last_established_time, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/virtual_links/virtual_link/state/last_established_time (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_last_established_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_last_established_time() directly.

    YANG Description: The time at which the adjacency was last established with
the neighbor. That is to say the time at which the
adjacency last transitioned into the FULL state. The
value is expressed relative to the Unix Epoch (Jan 1 1970
00:00:00 UTC).
    """
    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="last-established-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """last_established_time must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-established-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__last_established_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_last_established_time(self):
    self.__last_established_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-established-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_adjacency_state(self):
    """
    Getter method for adjacency_state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/virtual_links/virtual_link/state/adjacency_state (identityref)

    YANG Description: The state of the adjacency with the neighbor.
    """
    return self.__adjacency_state
      
  def _set_adjacency_state(self, v, load=False):
    """
    Setter method for adjacency_state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/virtual_links/virtual_link/state/adjacency_state (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adjacency_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adjacency_state() directly.

    YANG Description: The state of the adjacency with the neighbor.
    """
    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={'DOWN': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:DOWN': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:DOWN': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'ATTEMPT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ATTEMPT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ATTEMPT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'INIT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:INIT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:INIT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TWO_WAY': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TWO_WAY': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TWO_WAY': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'EXSTART': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:EXSTART': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:EXSTART': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'EXCHANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:EXCHANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:EXCHANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'LOADING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:LOADING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:LOADING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'FULL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:FULL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:FULL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},), is_leaf=True, yang_name="adjacency-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adjacency_state must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DOWN': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:DOWN': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:DOWN': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'ATTEMPT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ATTEMPT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ATTEMPT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'INIT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:INIT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:INIT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TWO_WAY': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TWO_WAY': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TWO_WAY': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'EXSTART': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:EXSTART': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:EXSTART': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'EXCHANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:EXCHANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:EXCHANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'LOADING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:LOADING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:LOADING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'FULL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:FULL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:FULL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},), is_leaf=True, yang_name="adjacency-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__adjacency_state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adjacency_state(self):
    self.__adjacency_state = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DOWN': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:DOWN': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:DOWN': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'ATTEMPT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:ATTEMPT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:ATTEMPT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'INIT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:INIT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:INIT': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'TWO_WAY': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:TWO_WAY': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:TWO_WAY': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'EXSTART': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:EXSTART': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:EXSTART': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'EXCHANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:EXCHANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:EXCHANGE': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'LOADING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:LOADING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:LOADING': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'FULL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospf-types:FULL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}, 'oc-ospft:FULL': {'@module': 'openconfig-ospf-types', '@namespace': 'http://openconfig.net/yang/ospf-types'}},), is_leaf=True, yang_name="adjacency-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_state_changes(self):
    """
    Getter method for state_changes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/virtual_links/virtual_link/state/state_changes (uint32)

    YANG Description: The number of transitions out of the FULL state that this
neighbor has been through
    """
    return self.__state_changes
      
  def _set_state_changes(self, v, load=False):
    """
    Setter method for state_changes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/virtual_links/virtual_link/state/state_changes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state_changes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state_changes() directly.

    YANG Description: The number of transitions out of the FULL state that this
neighbor has been through
    """
    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="state-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state_changes 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="state-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__state_changes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state_changes(self):
    self.__state_changes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="state-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_retransmission_queue_length(self):
    """
    Getter method for retransmission_queue_length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/virtual_links/virtual_link/state/retransmission_queue_length (uint32)

    YANG Description: The number of LSAs that are currently in the queue to be
retransmitted to the neighbor
    """
    return self.__retransmission_queue_length
      
  def _set_retransmission_queue_length(self, v, load=False):
    """
    Setter method for retransmission_queue_length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/virtual_links/virtual_link/state/retransmission_queue_length (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_retransmission_queue_length is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_retransmission_queue_length() directly.

    YANG Description: The number of LSAs that are currently in the queue to be
retransmitted to the neighbor
    """
    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="retransmission-queue-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """retransmission_queue_length 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="retransmission-queue-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__retransmission_queue_length = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_retransmission_queue_length(self):
    self.__retransmission_queue_length = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="retransmission-queue-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  remote_router_id = __builtin__.property(_get_remote_router_id)
  priority = __builtin__.property(_get_priority)
  dead_time = __builtin__.property(_get_dead_time)
  designated_router = __builtin__.property(_get_designated_router)
  backup_designated_router = __builtin__.property(_get_backup_designated_router)
  optional_capabilities = __builtin__.property(_get_optional_capabilities)
  last_established_time = __builtin__.property(_get_last_established_time)
  adjacency_state = __builtin__.property(_get_adjacency_state)
  state_changes = __builtin__.property(_get_state_changes)
  retransmission_queue_length = __builtin__.property(_get_retransmission_queue_length)


  _pyangbind_elements = OrderedDict([('remote_router_id', remote_router_id), ('priority', priority), ('dead_time', dead_time), ('designated_router', designated_router), ('backup_designated_router', backup_designated_router), ('optional_capabilities', optional_capabilities), ('last_established_time', last_established_time), ('adjacency_state', adjacency_state), ('state_changes', state_changes), ('retransmission_queue_length', retransmission_queue_length), ])


class yc_virtual_link_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_virtual_links_virtual_link(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/virtual-links/virtual-link. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration and state parameters relating to a
virtual link
  """
  __slots__ = ('_path_helper', '_extmethods', '__remote_router_id','__config','__state',)

  _yang_name = 'virtual-link'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__remote_router_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="remote-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_virtual_links_virtual_link_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_virtual_links_virtual_link_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'virtual-links', 'virtual-link']

  def _get_remote_router_id(self):
    """
    Getter method for remote_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/virtual_links/virtual_link/remote_router_id (leafref)

    YANG Description: Reference to the remote router ID
    """
    return self.__remote_router_id
      
  def _set_remote_router_id(self, v, load=False):
    """
    Setter method for remote_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/virtual_links/virtual_link/remote_router_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_remote_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_remote_router_id() directly.

    YANG Description: Reference to the remote router ID
    """
    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="remote-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """remote_router_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="remote-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__remote_router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_remote_router_id(self):
    self.__remote_router_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="remote-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/virtual_links/virtual_link/config (container)

    YANG Description: Configuration parameters relating to the OSPF virtual link
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/virtual_links/virtual_link/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 OSPF virtual link
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_virtual_links_virtual_link_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_virtual_links_virtual_link_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_virtual_links_virtual_link_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/virtual_links/virtual_link/state (container)

    YANG Description: State parameters relating to the OSPF virtual link
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/virtual_links/virtual_link/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 parameters relating to the OSPF virtual link
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_virtual_links_virtual_link_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_virtual_links_virtual_link_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_virtual_links_virtual_link_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  remote_router_id = __builtin__.property(_get_remote_router_id, _set_remote_router_id)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('remote_router_id', remote_router_id), ('config', config), ('state', state), ])


class yc_virtual_links_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_virtual_links(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/virtual-links. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration and state parameters relating to virtual
links from the source area to a remote router
  """
  __slots__ = ('_path_helper', '_extmethods', '__virtual_link',)

  _yang_name = 'virtual-links'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__virtual_link = YANGDynClass(base=YANGListType("remote_router_id",yc_virtual_link_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_virtual_links_virtual_link, yang_name="virtual-link", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='remote-router-id', extensions=None), is_container='list', yang_name="virtual-link", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area', 'virtual-links']

  def _get_virtual_link(self):
    """
    Getter method for virtual_link, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/virtual_links/virtual_link (list)

    YANG Description: Configuration and state parameters relating to a
virtual link
    """
    return self.__virtual_link
      
  def _set_virtual_link(self, v, load=False):
    """
    Setter method for virtual_link, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/virtual_links/virtual_link (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_virtual_link is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_virtual_link() directly.

    YANG Description: Configuration and state parameters relating to a
virtual link
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("remote_router_id",yc_virtual_link_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_virtual_links_virtual_link, yang_name="virtual-link", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='remote-router-id', extensions=None), is_container='list', yang_name="virtual-link", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """virtual_link must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("remote_router_id",yc_virtual_link_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_virtual_links_virtual_link, yang_name="virtual-link", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='remote-router-id', extensions=None), is_container='list', yang_name="virtual-link", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__virtual_link = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_virtual_link(self):
    self.__virtual_link = YANGDynClass(base=YANGListType("remote_router_id",yc_virtual_link_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_virtual_links_virtual_link, yang_name="virtual-link", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='remote-router-id', extensions=None), is_container='list', yang_name="virtual-link", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  virtual_link = __builtin__.property(_get_virtual_link, _set_virtual_link)


  _pyangbind_elements = OrderedDict([('virtual_link', virtual_link), ])


class yc_area_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas/area. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The OSPFv2 areas within which the local system exists
  """
  __slots__ = ('_path_helper', '_extmethods', '__identifier','__config','__state','__mpls','__lsdb','__interfaces','__virtual_links',)

  _yang_name = 'area'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__identifier = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__mpls = YANGDynClass(base=yc_mpls_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__lsdb = YANGDynClass(base=yc_lsdb_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb, is_container='container', yang_name="lsdb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__interfaces = YANGDynClass(base=yc_interfaces_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__virtual_links = YANGDynClass(base=yc_virtual_links_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_virtual_links, is_container='container', yang_name="virtual-links", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas', 'area']

  def _get_identifier(self):
    """
    Getter method for identifier, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/identifier (leafref)

    YANG Description: A reference to the identifier for the area.
    """
    return self.__identifier
      
  def _set_identifier(self, v, load=False):
    """
    Setter method for identifier, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/identifier (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_identifier is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_identifier() directly.

    YANG Description: A reference to the identifier for the area.
    """
    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="identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """identifier must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__identifier = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_identifier(self):
    self.__identifier = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/config (container)

    YANG Description: Configuration parameters relating to an OSPFv2 area
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/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 an OSPFv2 area
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/state (container)

    YANG Description: Operational state parameters relating to an OSPFv2 area
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/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 an OSPFv2 area
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_mpls(self):
    """
    Getter method for mpls, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/mpls (container)

    YANG Description: Configuration and operational state parameters for OSPFv2
extensions relating to MPLS
    """
    return self.__mpls
      
  def _set_mpls(self, v, load=False):
    """
    Setter method for mpls, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/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: Configuration and operational state parameters for OSPFv2
extensions relating to MPLS
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_mpls_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_lsdb(self):
    """
    Getter method for lsdb, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb (container)

    YANG Description: The link-state database for the OSPFv2 area
    """
    return self.__lsdb
      
  def _set_lsdb(self, v, load=False):
    """
    Setter method for lsdb, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsdb is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsdb() directly.

    YANG Description: The link-state database for the OSPFv2 area
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_lsdb_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb, is_container='container', yang_name="lsdb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsdb must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_lsdb_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb, is_container='container', yang_name="lsdb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__lsdb = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsdb(self):
    self.__lsdb = YANGDynClass(base=yc_lsdb_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_lsdb, is_container='container', yang_name="lsdb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_interfaces(self):
    """
    Getter method for interfaces, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/interfaces (container)

    YANG Description: Enclosing container for a list of interfaces enabled within
this area
    """
    return self.__interfaces
      
  def _set_interfaces(self, v, load=False):
    """
    Setter method for interfaces, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/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 a list of interfaces enabled within
this area
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interfaces_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_virtual_links(self):
    """
    Getter method for virtual_links, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/virtual_links (container)

    YANG Description: Configuration and state parameters relating to virtual
links from the source area to a remote router
    """
    return self.__virtual_links
      
  def _set_virtual_links(self, v, load=False):
    """
    Setter method for virtual_links, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area/virtual_links (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_virtual_links is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_virtual_links() directly.

    YANG Description: Configuration and state parameters relating to virtual
links from the source area to a remote router
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_virtual_links_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_virtual_links, is_container='container', yang_name="virtual-links", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """virtual_links must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_virtual_links_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_virtual_links, is_container='container', yang_name="virtual-links", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__virtual_links = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_virtual_links(self):
    self.__virtual_links = YANGDynClass(base=yc_virtual_links_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area_virtual_links, is_container='container', yang_name="virtual-links", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  identifier = __builtin__.property(_get_identifier, _set_identifier)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  mpls = __builtin__.property(_get_mpls, _set_mpls)
  lsdb = __builtin__.property(_get_lsdb, _set_lsdb)
  interfaces = __builtin__.property(_get_interfaces, _set_interfaces)
  virtual_links = __builtin__.property(_get_virtual_links, _set_virtual_links)


  _pyangbind_elements = OrderedDict([('identifier', identifier), ('config', config), ('state', state), ('mpls', mpls), ('lsdb', lsdb), ('interfaces', interfaces), ('virtual_links', virtual_links), ])


class yc_areas_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2/areas. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration and operational state relating to an
OSPFv2 area.
  """
  __slots__ = ('_path_helper', '_extmethods', '__area',)

  _yang_name = 'areas'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__area = YANGDynClass(base=YANGListType("identifier",yc_area_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area, yang_name="area", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='identifier', extensions=None), is_container='list', yang_name="area", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2', 'areas']

  def _get_area(self):
    """
    Getter method for area, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area (list)

    YANG Description: The OSPFv2 areas within which the local system exists
    """
    return self.__area
      
  def _set_area(self, v, load=False):
    """
    Setter method for area, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas/area (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_area is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_area() directly.

    YANG Description: The OSPFv2 areas within which the local system exists
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("identifier",yc_area_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area, yang_name="area", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='identifier', extensions=None), is_container='list', yang_name="area", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """area must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("identifier",yc_area_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area, yang_name="area", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='identifier', extensions=None), is_container='list', yang_name="area", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__area = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_area(self):
    self.__area = YANGDynClass(base=YANGListType("identifier",yc_area_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas_area, yang_name="area", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='identifier', extensions=None), is_container='list', yang_name="area", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  area = __builtin__.property(_get_area, _set_area)


  _pyangbind_elements = OrderedDict([('area', area), ])


class yc_ospfv2_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/ospfv2. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level configuration and operational state for
Open Shortest Path First (OSPF) v2
  """
  __slots__ = ('_path_helper', '_extmethods', '__global_','__areas',)

  _yang_name = 'ospfv2'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__global_ = YANGDynClass(base=yc_global__openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__areas = YANGDynClass(base=yc_areas_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas, is_container='container', yang_name="areas", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'ospfv2']

  def _get_global_(self):
    """
    Getter method for global_, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global (container)

    YANG Description: Configuration and operational state parameters for settings
that are global to the OSPFv2 instance
    """
    return self.__global_
      
  def _set_global_(self, v, load=False):
    """
    Setter method for global_, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/global (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_global_ is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_global_() directly.

    YANG Description: Configuration and operational state parameters for settings
that are global to the OSPFv2 instance
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_global__openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """global_ must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_global__openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__global_ = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_global_(self):
    self.__global_ = YANGDynClass(base=yc_global__openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_areas(self):
    """
    Getter method for areas, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas (container)

    YANG Description: Configuration and operational state relating to an
OSPFv2 area.
    """
    return self.__areas
      
  def _set_areas(self, v, load=False):
    """
    Setter method for areas, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2/areas (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_areas is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_areas() directly.

    YANG Description: Configuration and operational state relating to an
OSPFv2 area.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_areas_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas, is_container='container', yang_name="areas", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """areas must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_areas_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas, is_container='container', yang_name="areas", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__areas = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_areas(self):
    self.__areas = YANGDynClass(base=yc_areas_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2_areas, is_container='container', yang_name="areas", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  global_ = __builtin__.property(_get_global_, _set_global_)
  areas = __builtin__.property(_get_areas, _set_areas)


  _pyangbind_elements = OrderedDict([('global_', global_), ('areas', areas), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS global configuration router.
  """
  __slots__ = ('_path_helper', '_extmethods', '__authentication_check','__instance','__net','__maximum_area_addresses','__level_capability','__max_ecmp_paths','__poi_tlv','__iid_tlv','__fast_flooding','__csnp_enable_on_p2p_links','__hello_padding',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__authentication_check = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="authentication-check", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__instance = YANGDynClass(base=six.text_type, default=six.text_type("0"), is_leaf=True, yang_name="instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__net = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[a-fA-F0-9]{2}(\\.[a-fA-F0-9]{4}){3,9}\\.[a-fA-F0-9]{2}'})), is_leaf=False, yang_name="net", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:net', is_config=True)
    self.__maximum_area_addresses = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(3), is_leaf=True, yang_name="maximum-area-addresses", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    self.__level_capability = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LEVEL_1': {}, 'LEVEL_2': {}, 'LEVEL_1_2': {}},), default=six.text_type("LEVEL_1_2"), is_leaf=True, yang_name="level-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:level-type', is_config=True)
    self.__max_ecmp_paths = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="max-ecmp-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    self.__poi_tlv = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="poi-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__iid_tlv = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="iid-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__fast_flooding = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="fast-flooding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__csnp_enable_on_p2p_links = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="csnp-enable-on-p2p-links", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__hello_padding = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}, 'LOOSE': {}, 'ADAPTIVE': {}, 'DISABLE': {}},), default=six.text_type("STRICT"), is_leaf=True, yang_name="hello-padding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:hello-padding-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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'config']

  def _get_authentication_check(self):
    """
    Getter method for authentication_check, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/config/authentication_check (boolean)

    YANG Description: When set to true, reject all ISIS protocol PDUs that either have a mismatch
in authentication-type or authentication-key.
    """
    return self.__authentication_check
      
  def _set_authentication_check(self, v, load=False):
    """
    Setter method for authentication_check, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/config/authentication_check (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_authentication_check is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_authentication_check() directly.

    YANG Description: When set to true, reject all ISIS protocol PDUs that either have a mismatch
in authentication-type or authentication-key.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="authentication-check", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """authentication_check must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="authentication-check", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__authentication_check = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_authentication_check(self):
    self.__authentication_check = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="authentication-check", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_instance(self):
    """
    Getter method for instance, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/config/instance (string)

    YANG Description: ISIS Instance.
    """
    return self.__instance
      
  def _set_instance(self, v, load=False):
    """
    Setter method for instance, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/config/instance (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_instance is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_instance() directly.

    YANG Description: ISIS Instance.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, default=six.text_type("0"), is_leaf=True, yang_name="instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """instance must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, default=six.text_type("0"), is_leaf=True, yang_name="instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)""",
        })

    self.__instance = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_instance(self):
    self.__instance = YANGDynClass(base=six.text_type, default=six.text_type("0"), is_leaf=True, yang_name="instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_net(self):
    """
    Getter method for net, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/config/net (oc-isis-types:net)

    YANG Description: ISIS network entity title (NET). The first 8 bits are usually
49 (private AFI), next 16 bits represent area, next 48 bits represent
system id and final 8 bits are set to 0.
    """
    return self.__net
      
  def _set_net(self, v, load=False):
    """
    Setter method for net, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/config/net (oc-isis-types:net)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_net is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_net() directly.

    YANG Description: ISIS network entity title (NET). The first 8 bits are usually
49 (private AFI), next 16 bits represent area, next 48 bits represent
system id and final 8 bits are set to 0.
    """
    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_dict={'pattern': '[a-fA-F0-9]{2}(\\.[a-fA-F0-9]{4}){3,9}\\.[a-fA-F0-9]{2}'})), is_leaf=False, yang_name="net", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:net', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """net must be of a type compatible with oc-isis-types:net""",
          'defined-type': "oc-isis-types:net",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[a-fA-F0-9]{2}(\\.[a-fA-F0-9]{4}){3,9}\\.[a-fA-F0-9]{2}'})), is_leaf=False, yang_name="net", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:net', is_config=True)""",
        })

    self.__net = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_net(self):
    self.__net = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[a-fA-F0-9]{2}(\\.[a-fA-F0-9]{4}){3,9}\\.[a-fA-F0-9]{2}'})), is_leaf=False, yang_name="net", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:net', is_config=True)


  def _get_maximum_area_addresses(self):
    """
    Getter method for maximum_area_addresses, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/config/maximum_area_addresses (uint8)

    YANG Description: Maximum areas supported.
    """
    return self.__maximum_area_addresses
      
  def _set_maximum_area_addresses(self, v, load=False):
    """
    Setter method for maximum_area_addresses, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/config/maximum_area_addresses (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_maximum_area_addresses is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_maximum_area_addresses() directly.

    YANG Description: Maximum areas supported.
    """
    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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(3), is_leaf=True, yang_name="maximum-area-addresses", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """maximum_area_addresses 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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(3), is_leaf=True, yang_name="maximum-area-addresses", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
        })

    self.__maximum_area_addresses = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_maximum_area_addresses(self):
    self.__maximum_area_addresses = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(3), is_leaf=True, yang_name="maximum-area-addresses", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)


  def _get_level_capability(self):
    """
    Getter method for level_capability, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/config/level_capability (oc-isis-types:level-type)

    YANG Description: ISIS level capability(level-1, level-2, level-1-2).
    """
    return self.__level_capability
      
  def _set_level_capability(self, v, load=False):
    """
    Setter method for level_capability, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/config/level_capability (oc-isis-types:level-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_level_capability is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_level_capability() directly.

    YANG Description: ISIS level capability(level-1, level-2, level-1-2).
    """
    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={'LEVEL_1': {}, 'LEVEL_2': {}, 'LEVEL_1_2': {}},), default=six.text_type("LEVEL_1_2"), is_leaf=True, yang_name="level-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:level-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """level_capability must be of a type compatible with oc-isis-types:level-type""",
          'defined-type': "oc-isis-types:level-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LEVEL_1': {}, 'LEVEL_2': {}, 'LEVEL_1_2': {}},), default=six.text_type("LEVEL_1_2"), is_leaf=True, yang_name="level-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:level-type', is_config=True)""",
        })

    self.__level_capability = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_level_capability(self):
    self.__level_capability = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LEVEL_1': {}, 'LEVEL_2': {}, 'LEVEL_1_2': {}},), default=six.text_type("LEVEL_1_2"), is_leaf=True, yang_name="level-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:level-type', is_config=True)


  def _get_max_ecmp_paths(self):
    """
    Getter method for max_ecmp_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/config/max_ecmp_paths (uint8)

    YANG Description: ISIS max-paths count.
    """
    return self.__max_ecmp_paths
      
  def _set_max_ecmp_paths(self, v, load=False):
    """
    Setter method for max_ecmp_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/config/max_ecmp_paths (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_ecmp_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_ecmp_paths() directly.

    YANG Description: ISIS max-paths count.
    """
    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="max-ecmp-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_ecmp_paths 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="max-ecmp-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
        })

    self.__max_ecmp_paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_ecmp_paths(self):
    self.__max_ecmp_paths = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="max-ecmp-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)


  def _get_poi_tlv(self):
    """
    Getter method for poi_tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/config/poi_tlv (boolean)

    YANG Description: ISIS purge TLV. When set to true, a TLV is added to purges to record
the system ID  of the IS generating the purge.
    """
    return self.__poi_tlv
      
  def _set_poi_tlv(self, v, load=False):
    """
    Setter method for poi_tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/config/poi_tlv (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_poi_tlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_poi_tlv() directly.

    YANG Description: ISIS purge TLV. When set to true, a TLV is added to purges to record
the system ID  of the IS generating the purge.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="poi-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """poi_tlv must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="poi-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__poi_tlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_poi_tlv(self):
    self.__poi_tlv = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="poi-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_iid_tlv(self):
    """
    Getter method for iid_tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/config/iid_tlv (boolean)

    YANG Description: ISIS Instance Identifier TLV. When set to trues, the IID-TLV identifies
the unique instance as well as the topology/topologies to which the
PDU applies.
    """
    return self.__iid_tlv
      
  def _set_iid_tlv(self, v, load=False):
    """
    Setter method for iid_tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/config/iid_tlv (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_iid_tlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_iid_tlv() directly.

    YANG Description: ISIS Instance Identifier TLV. When set to trues, the IID-TLV identifies
the unique instance as well as the topology/topologies to which the
PDU applies.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="iid-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """iid_tlv must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="iid-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__iid_tlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_iid_tlv(self):
    self.__iid_tlv = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="iid-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_fast_flooding(self):
    """
    Getter method for fast_flooding, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/config/fast_flooding (boolean)

    YANG Description: When set to true, IS will always flood the LSP that triggered an SPF
before the router actually runs the SPF computation.
    """
    return self.__fast_flooding
      
  def _set_fast_flooding(self, v, load=False):
    """
    Setter method for fast_flooding, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/config/fast_flooding (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_fast_flooding is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_fast_flooding() directly.

    YANG Description: When set to true, IS will always flood the LSP that triggered an SPF
before the router actually runs the SPF computation.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="fast-flooding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """fast_flooding must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="fast-flooding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__fast_flooding = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_fast_flooding(self):
    self.__fast_flooding = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="fast-flooding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_csnp_enable_on_p2p_links(self):
    """
    Getter method for csnp_enable_on_p2p_links, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/config/csnp_enable_on_p2p_links (boolean)

    YANG Description: When set to true, ISIS will always enable CSNP on P2P Links.
    """
    return self.__csnp_enable_on_p2p_links
      
  def _set_csnp_enable_on_p2p_links(self, v, load=False):
    """
    Setter method for csnp_enable_on_p2p_links, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/config/csnp_enable_on_p2p_links (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_csnp_enable_on_p2p_links is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_csnp_enable_on_p2p_links() directly.

    YANG Description: When set to true, ISIS will always enable CSNP on P2P Links.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="csnp-enable-on-p2p-links", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """csnp_enable_on_p2p_links must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="csnp-enable-on-p2p-links", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__csnp_enable_on_p2p_links = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_csnp_enable_on_p2p_links(self):
    self.__csnp_enable_on_p2p_links = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="csnp-enable-on-p2p-links", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_hello_padding(self):
    """
    Getter method for hello_padding, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/config/hello_padding (oc-isis-types:hello-padding-type)

    YANG Description: Controls the padding type for IS-IS Hello PDUs on a global level.
    """
    return self.__hello_padding
      
  def _set_hello_padding(self, v, load=False):
    """
    Setter method for hello_padding, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/config/hello_padding (oc-isis-types:hello-padding-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_padding is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_padding() directly.

    YANG Description: Controls the padding type for IS-IS Hello PDUs on a global level.
    """
    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': {}, 'LOOSE': {}, 'ADAPTIVE': {}, 'DISABLE': {}},), default=six.text_type("STRICT"), is_leaf=True, yang_name="hello-padding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:hello-padding-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_padding must be of a type compatible with oc-isis-types:hello-padding-type""",
          'defined-type': "oc-isis-types:hello-padding-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}, 'LOOSE': {}, 'ADAPTIVE': {}, 'DISABLE': {}},), default=six.text_type("STRICT"), is_leaf=True, yang_name="hello-padding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:hello-padding-type', is_config=True)""",
        })

    self.__hello_padding = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_padding(self):
    self.__hello_padding = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}, 'LOOSE': {}, 'ADAPTIVE': {}, 'DISABLE': {}},), default=six.text_type("STRICT"), is_leaf=True, yang_name="hello-padding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:hello-padding-type', is_config=True)

  authentication_check = __builtin__.property(_get_authentication_check, _set_authentication_check)
  instance = __builtin__.property(_get_instance, _set_instance)
  net = __builtin__.property(_get_net, _set_net)
  maximum_area_addresses = __builtin__.property(_get_maximum_area_addresses, _set_maximum_area_addresses)
  level_capability = __builtin__.property(_get_level_capability, _set_level_capability)
  max_ecmp_paths = __builtin__.property(_get_max_ecmp_paths, _set_max_ecmp_paths)
  poi_tlv = __builtin__.property(_get_poi_tlv, _set_poi_tlv)
  iid_tlv = __builtin__.property(_get_iid_tlv, _set_iid_tlv)
  fast_flooding = __builtin__.property(_get_fast_flooding, _set_fast_flooding)
  csnp_enable_on_p2p_links = __builtin__.property(_get_csnp_enable_on_p2p_links, _set_csnp_enable_on_p2p_links)
  hello_padding = __builtin__.property(_get_hello_padding, _set_hello_padding)


  _pyangbind_elements = OrderedDict([('authentication_check', authentication_check), ('instance', instance), ('net', net), ('maximum_area_addresses', maximum_area_addresses), ('level_capability', level_capability), ('max_ecmp_paths', max_ecmp_paths), ('poi_tlv', poi_tlv), ('iid_tlv', iid_tlv), ('fast_flooding', fast_flooding), ('csnp_enable_on_p2p_links', csnp_enable_on_p2p_links), ('hello_padding', hello_padding), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines state for ISIS global router.
  """
  __slots__ = ('_path_helper', '_extmethods', '__authentication_check','__instance','__net','__maximum_area_addresses','__level_capability','__max_ecmp_paths','__poi_tlv','__iid_tlv','__fast_flooding','__csnp_enable_on_p2p_links','__hello_padding',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__authentication_check = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="authentication-check", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__instance = YANGDynClass(base=six.text_type, default=six.text_type("0"), is_leaf=True, yang_name="instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__net = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[a-fA-F0-9]{2}(\\.[a-fA-F0-9]{4}){3,9}\\.[a-fA-F0-9]{2}'})), is_leaf=False, yang_name="net", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:net', is_config=False)
    self.__maximum_area_addresses = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(3), is_leaf=True, yang_name="maximum-area-addresses", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__level_capability = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LEVEL_1': {}, 'LEVEL_2': {}, 'LEVEL_1_2': {}},), default=six.text_type("LEVEL_1_2"), is_leaf=True, yang_name="level-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:level-type', is_config=False)
    self.__max_ecmp_paths = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="max-ecmp-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__poi_tlv = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="poi-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__iid_tlv = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="iid-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__fast_flooding = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="fast-flooding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__csnp_enable_on_p2p_links = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="csnp-enable-on-p2p-links", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__hello_padding = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}, 'LOOSE': {}, 'ADAPTIVE': {}, 'DISABLE': {}},), default=six.text_type("STRICT"), is_leaf=True, yang_name="hello-padding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:hello-padding-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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'state']

  def _get_authentication_check(self):
    """
    Getter method for authentication_check, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/state/authentication_check (boolean)

    YANG Description: When set to true, reject all ISIS protocol PDUs that either have a mismatch
in authentication-type or authentication-key.
    """
    return self.__authentication_check
      
  def _set_authentication_check(self, v, load=False):
    """
    Setter method for authentication_check, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/state/authentication_check (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_authentication_check is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_authentication_check() directly.

    YANG Description: When set to true, reject all ISIS protocol PDUs that either have a mismatch
in authentication-type or authentication-key.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="authentication-check", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """authentication_check must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="authentication-check", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__authentication_check = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_authentication_check(self):
    self.__authentication_check = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="authentication-check", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_instance(self):
    """
    Getter method for instance, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/state/instance (string)

    YANG Description: ISIS Instance.
    """
    return self.__instance
      
  def _set_instance(self, v, load=False):
    """
    Setter method for instance, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/state/instance (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_instance is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_instance() directly.

    YANG Description: ISIS Instance.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, default=six.text_type("0"), is_leaf=True, yang_name="instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """instance must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, default=six.text_type("0"), is_leaf=True, yang_name="instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__instance = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_instance(self):
    self.__instance = YANGDynClass(base=six.text_type, default=six.text_type("0"), is_leaf=True, yang_name="instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_net(self):
    """
    Getter method for net, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/state/net (oc-isis-types:net)

    YANG Description: ISIS network entity title (NET). The first 8 bits are usually
49 (private AFI), next 16 bits represent area, next 48 bits represent
system id and final 8 bits are set to 0.
    """
    return self.__net
      
  def _set_net(self, v, load=False):
    """
    Setter method for net, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/state/net (oc-isis-types:net)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_net is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_net() directly.

    YANG Description: ISIS network entity title (NET). The first 8 bits are usually
49 (private AFI), next 16 bits represent area, next 48 bits represent
system id and final 8 bits are set to 0.
    """
    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_dict={'pattern': '[a-fA-F0-9]{2}(\\.[a-fA-F0-9]{4}){3,9}\\.[a-fA-F0-9]{2}'})), is_leaf=False, yang_name="net", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:net', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """net must be of a type compatible with oc-isis-types:net""",
          'defined-type': "oc-isis-types:net",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[a-fA-F0-9]{2}(\\.[a-fA-F0-9]{4}){3,9}\\.[a-fA-F0-9]{2}'})), is_leaf=False, yang_name="net", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:net', is_config=False)""",
        })

    self.__net = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_net(self):
    self.__net = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[a-fA-F0-9]{2}(\\.[a-fA-F0-9]{4}){3,9}\\.[a-fA-F0-9]{2}'})), is_leaf=False, yang_name="net", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:net', is_config=False)


  def _get_maximum_area_addresses(self):
    """
    Getter method for maximum_area_addresses, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/state/maximum_area_addresses (uint8)

    YANG Description: Maximum areas supported.
    """
    return self.__maximum_area_addresses
      
  def _set_maximum_area_addresses(self, v, load=False):
    """
    Setter method for maximum_area_addresses, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/state/maximum_area_addresses (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_maximum_area_addresses is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_maximum_area_addresses() directly.

    YANG Description: Maximum areas supported.
    """
    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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(3), is_leaf=True, yang_name="maximum-area-addresses", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """maximum_area_addresses 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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(3), is_leaf=True, yang_name="maximum-area-addresses", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__maximum_area_addresses = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_maximum_area_addresses(self):
    self.__maximum_area_addresses = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(3), is_leaf=True, yang_name="maximum-area-addresses", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_level_capability(self):
    """
    Getter method for level_capability, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/state/level_capability (oc-isis-types:level-type)

    YANG Description: ISIS level capability(level-1, level-2, level-1-2).
    """
    return self.__level_capability
      
  def _set_level_capability(self, v, load=False):
    """
    Setter method for level_capability, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/state/level_capability (oc-isis-types:level-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_level_capability is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_level_capability() directly.

    YANG Description: ISIS level capability(level-1, level-2, level-1-2).
    """
    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={'LEVEL_1': {}, 'LEVEL_2': {}, 'LEVEL_1_2': {}},), default=six.text_type("LEVEL_1_2"), is_leaf=True, yang_name="level-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:level-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """level_capability must be of a type compatible with oc-isis-types:level-type""",
          'defined-type': "oc-isis-types:level-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LEVEL_1': {}, 'LEVEL_2': {}, 'LEVEL_1_2': {}},), default=six.text_type("LEVEL_1_2"), is_leaf=True, yang_name="level-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:level-type', is_config=False)""",
        })

    self.__level_capability = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_level_capability(self):
    self.__level_capability = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LEVEL_1': {}, 'LEVEL_2': {}, 'LEVEL_1_2': {}},), default=six.text_type("LEVEL_1_2"), is_leaf=True, yang_name="level-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:level-type', is_config=False)


  def _get_max_ecmp_paths(self):
    """
    Getter method for max_ecmp_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/state/max_ecmp_paths (uint8)

    YANG Description: ISIS max-paths count.
    """
    return self.__max_ecmp_paths
      
  def _set_max_ecmp_paths(self, v, load=False):
    """
    Setter method for max_ecmp_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/state/max_ecmp_paths (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_ecmp_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_ecmp_paths() directly.

    YANG Description: ISIS max-paths count.
    """
    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="max-ecmp-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_ecmp_paths 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="max-ecmp-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__max_ecmp_paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_ecmp_paths(self):
    self.__max_ecmp_paths = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="max-ecmp-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_poi_tlv(self):
    """
    Getter method for poi_tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/state/poi_tlv (boolean)

    YANG Description: ISIS purge TLV. When set to true, a TLV is added to purges to record
the system ID  of the IS generating the purge.
    """
    return self.__poi_tlv
      
  def _set_poi_tlv(self, v, load=False):
    """
    Setter method for poi_tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/state/poi_tlv (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_poi_tlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_poi_tlv() directly.

    YANG Description: ISIS purge TLV. When set to true, a TLV is added to purges to record
the system ID  of the IS generating the purge.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="poi-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """poi_tlv must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="poi-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__poi_tlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_poi_tlv(self):
    self.__poi_tlv = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="poi-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_iid_tlv(self):
    """
    Getter method for iid_tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/state/iid_tlv (boolean)

    YANG Description: ISIS Instance Identifier TLV. When set to trues, the IID-TLV identifies
the unique instance as well as the topology/topologies to which the
PDU applies.
    """
    return self.__iid_tlv
      
  def _set_iid_tlv(self, v, load=False):
    """
    Setter method for iid_tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/state/iid_tlv (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_iid_tlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_iid_tlv() directly.

    YANG Description: ISIS Instance Identifier TLV. When set to trues, the IID-TLV identifies
the unique instance as well as the topology/topologies to which the
PDU applies.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="iid-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """iid_tlv must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="iid-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__iid_tlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_iid_tlv(self):
    self.__iid_tlv = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="iid-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_fast_flooding(self):
    """
    Getter method for fast_flooding, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/state/fast_flooding (boolean)

    YANG Description: When set to true, IS will always flood the LSP that triggered an SPF
before the router actually runs the SPF computation.
    """
    return self.__fast_flooding
      
  def _set_fast_flooding(self, v, load=False):
    """
    Setter method for fast_flooding, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/state/fast_flooding (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_fast_flooding is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_fast_flooding() directly.

    YANG Description: When set to true, IS will always flood the LSP that triggered an SPF
before the router actually runs the SPF computation.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="fast-flooding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """fast_flooding must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="fast-flooding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__fast_flooding = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_fast_flooding(self):
    self.__fast_flooding = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="fast-flooding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_csnp_enable_on_p2p_links(self):
    """
    Getter method for csnp_enable_on_p2p_links, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/state/csnp_enable_on_p2p_links (boolean)

    YANG Description: When set to true, ISIS will always enable CSNP on P2P Links.
    """
    return self.__csnp_enable_on_p2p_links
      
  def _set_csnp_enable_on_p2p_links(self, v, load=False):
    """
    Setter method for csnp_enable_on_p2p_links, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/state/csnp_enable_on_p2p_links (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_csnp_enable_on_p2p_links is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_csnp_enable_on_p2p_links() directly.

    YANG Description: When set to true, ISIS will always enable CSNP on P2P Links.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="csnp-enable-on-p2p-links", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """csnp_enable_on_p2p_links must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="csnp-enable-on-p2p-links", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__csnp_enable_on_p2p_links = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_csnp_enable_on_p2p_links(self):
    self.__csnp_enable_on_p2p_links = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="csnp-enable-on-p2p-links", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_hello_padding(self):
    """
    Getter method for hello_padding, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/state/hello_padding (oc-isis-types:hello-padding-type)

    YANG Description: Controls the padding type for IS-IS Hello PDUs on a global level.
    """
    return self.__hello_padding
      
  def _set_hello_padding(self, v, load=False):
    """
    Setter method for hello_padding, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/state/hello_padding (oc-isis-types:hello-padding-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_padding is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_padding() directly.

    YANG Description: Controls the padding type for IS-IS Hello PDUs on a global level.
    """
    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': {}, 'LOOSE': {}, 'ADAPTIVE': {}, 'DISABLE': {}},), default=six.text_type("STRICT"), is_leaf=True, yang_name="hello-padding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:hello-padding-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_padding must be of a type compatible with oc-isis-types:hello-padding-type""",
          'defined-type': "oc-isis-types:hello-padding-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}, 'LOOSE': {}, 'ADAPTIVE': {}, 'DISABLE': {}},), default=six.text_type("STRICT"), is_leaf=True, yang_name="hello-padding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:hello-padding-type', is_config=False)""",
        })

    self.__hello_padding = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_padding(self):
    self.__hello_padding = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}, 'LOOSE': {}, 'ADAPTIVE': {}, 'DISABLE': {}},), default=six.text_type("STRICT"), is_leaf=True, yang_name="hello-padding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:hello-padding-type', is_config=False)

  authentication_check = __builtin__.property(_get_authentication_check)
  instance = __builtin__.property(_get_instance)
  net = __builtin__.property(_get_net)
  maximum_area_addresses = __builtin__.property(_get_maximum_area_addresses)
  level_capability = __builtin__.property(_get_level_capability)
  max_ecmp_paths = __builtin__.property(_get_max_ecmp_paths)
  poi_tlv = __builtin__.property(_get_poi_tlv)
  iid_tlv = __builtin__.property(_get_iid_tlv)
  fast_flooding = __builtin__.property(_get_fast_flooding)
  csnp_enable_on_p2p_links = __builtin__.property(_get_csnp_enable_on_p2p_links)
  hello_padding = __builtin__.property(_get_hello_padding)


  _pyangbind_elements = OrderedDict([('authentication_check', authentication_check), ('instance', instance), ('net', net), ('maximum_area_addresses', maximum_area_addresses), ('level_capability', level_capability), ('max_ecmp_paths', max_ecmp_paths), ('poi_tlv', poi_tlv), ('iid_tlv', iid_tlv), ('fast_flooding', fast_flooding), ('csnp_enable_on_p2p_links', csnp_enable_on_p2p_links), ('hello_padding', hello_padding), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_overload_bit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/lsp-bit/overload-bit/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS Overload Bit configuration.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_bit','__set_bit_on_boot','__advertise_high_metric',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__set_bit = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="set-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__set_bit_on_boot = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="set-bit-on-boot", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__advertise_high_metric = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="advertise-high-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'lsp-bit', 'overload-bit', 'config']

  def _get_set_bit(self):
    """
    Getter method for set_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/overload_bit/config/set_bit (boolean)

    YANG Description: When set to true, IS-IS overload bit is set.
    """
    return self.__set_bit
      
  def _set_set_bit(self, v, load=False):
    """
    Setter method for set_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/overload_bit/config/set_bit (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_bit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_bit() directly.

    YANG Description: When set to true, IS-IS overload bit is set.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="set-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_bit must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="set-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__set_bit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_bit(self):
    self.__set_bit = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="set-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_set_bit_on_boot(self):
    """
    Getter method for set_bit_on_boot, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/overload_bit/config/set_bit_on_boot (boolean)

    YANG Description: When set to true, the IS-IS overload bit is set on system boot.
    """
    return self.__set_bit_on_boot
      
  def _set_set_bit_on_boot(self, v, load=False):
    """
    Setter method for set_bit_on_boot, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/overload_bit/config/set_bit_on_boot (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_bit_on_boot is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_bit_on_boot() directly.

    YANG Description: When set to true, the IS-IS overload bit is set on system boot.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="set-bit-on-boot", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_bit_on_boot must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="set-bit-on-boot", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__set_bit_on_boot = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_bit_on_boot(self):
    self.__set_bit_on_boot = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="set-bit-on-boot", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_advertise_high_metric(self):
    """
    Getter method for advertise_high_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/overload_bit/config/advertise_high_metric (boolean)

    YANG Description: When set to true, the local IS advertises links with the highest
available metric regardless of their configured metric. The metric
value is based on the metric style - if wide metrics are utilised
the metric is advertised as 16777214, otherwise they are advertised
with a value of 63.
    """
    return self.__advertise_high_metric
      
  def _set_advertise_high_metric(self, v, load=False):
    """
    Setter method for advertise_high_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/overload_bit/config/advertise_high_metric (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_advertise_high_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_advertise_high_metric() directly.

    YANG Description: When set to true, the local IS advertises links with the highest
available metric regardless of their configured metric. The metric
value is based on the metric style - if wide metrics are utilised
the metric is advertised as 16777214, otherwise they are advertised
with a value of 63.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="advertise-high-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """advertise_high_metric must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="advertise-high-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__advertise_high_metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_advertise_high_metric(self):
    self.__advertise_high_metric = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="advertise-high-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  set_bit = __builtin__.property(_get_set_bit, _set_set_bit)
  set_bit_on_boot = __builtin__.property(_get_set_bit_on_boot, _set_set_bit_on_boot)
  advertise_high_metric = __builtin__.property(_get_advertise_high_metric, _set_advertise_high_metric)


  _pyangbind_elements = OrderedDict([('set_bit', set_bit), ('set_bit_on_boot', set_bit_on_boot), ('advertise_high_metric', advertise_high_metric), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_overload_bit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/lsp-bit/overload-bit/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines state for ISIS Overload Bit.
  """
  __slots__ = ('_path_helper', '_extmethods', '__set_bit','__set_bit_on_boot','__advertise_high_metric',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__set_bit = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="set-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__set_bit_on_boot = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="set-bit-on-boot", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__advertise_high_metric = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="advertise-high-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'lsp-bit', 'overload-bit', 'state']

  def _get_set_bit(self):
    """
    Getter method for set_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/overload_bit/state/set_bit (boolean)

    YANG Description: When set to true, IS-IS overload bit is set.
    """
    return self.__set_bit
      
  def _set_set_bit(self, v, load=False):
    """
    Setter method for set_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/overload_bit/state/set_bit (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_bit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_bit() directly.

    YANG Description: When set to true, IS-IS overload bit is set.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="set-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_bit must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="set-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__set_bit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_bit(self):
    self.__set_bit = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="set-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_set_bit_on_boot(self):
    """
    Getter method for set_bit_on_boot, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/overload_bit/state/set_bit_on_boot (boolean)

    YANG Description: When set to true, the IS-IS overload bit is set on system boot.
    """
    return self.__set_bit_on_boot
      
  def _set_set_bit_on_boot(self, v, load=False):
    """
    Setter method for set_bit_on_boot, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/overload_bit/state/set_bit_on_boot (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_bit_on_boot is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_bit_on_boot() directly.

    YANG Description: When set to true, the IS-IS overload bit is set on system boot.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="set-bit-on-boot", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_bit_on_boot must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="set-bit-on-boot", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__set_bit_on_boot = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_bit_on_boot(self):
    self.__set_bit_on_boot = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="set-bit-on-boot", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_advertise_high_metric(self):
    """
    Getter method for advertise_high_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/overload_bit/state/advertise_high_metric (boolean)

    YANG Description: When set to true, the local IS advertises links with the highest
available metric regardless of their configured metric. The metric
value is based on the metric style - if wide metrics are utilised
the metric is advertised as 16777214, otherwise they are advertised
with a value of 63.
    """
    return self.__advertise_high_metric
      
  def _set_advertise_high_metric(self, v, load=False):
    """
    Setter method for advertise_high_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/overload_bit/state/advertise_high_metric (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_advertise_high_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_advertise_high_metric() directly.

    YANG Description: When set to true, the local IS advertises links with the highest
available metric regardless of their configured metric. The metric
value is based on the metric style - if wide metrics are utilised
the metric is advertised as 16777214, otherwise they are advertised
with a value of 63.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="advertise-high-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """advertise_high_metric must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="advertise-high-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__advertise_high_metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_advertise_high_metric(self):
    self.__advertise_high_metric = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="advertise-high-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  set_bit = __builtin__.property(_get_set_bit)
  set_bit_on_boot = __builtin__.property(_get_set_bit_on_boot)
  advertise_high_metric = __builtin__.property(_get_advertise_high_metric)


  _pyangbind_elements = OrderedDict([('set_bit', set_bit), ('set_bit_on_boot', set_bit_on_boot), ('advertise_high_metric', advertise_high_metric), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_overload_bit_reset_triggers_reset_trigger_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/lsp-bit/overload-bit/reset-triggers/reset-trigger/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS Overload Bit reset trigger
configuration.
  """
  __slots__ = ('_path_helper', '_extmethods', '__reset_trigger','__delay',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__reset_trigger = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'WAIT_FOR_BGP': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:WAIT_FOR_BGP': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'WAIT_FOR_SYSTEM': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:WAIT_FOR_SYSTEM': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="reset-trigger", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__delay = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'lsp-bit', 'overload-bit', 'reset-triggers', 'reset-trigger', 'config']

  def _get_reset_trigger(self):
    """
    Getter method for reset_trigger, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/overload_bit/reset_triggers/reset_trigger/config/reset_trigger (identityref)

    YANG Description: In the case that the system sets the overload bit on start, the
system should reset the bit (i.e., clear the overload bit) upon
the specified trigger.
    """
    return self.__reset_trigger
      
  def _set_reset_trigger(self, v, load=False):
    """
    Setter method for reset_trigger, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/overload_bit/reset_triggers/reset_trigger/config/reset_trigger (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_reset_trigger is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_reset_trigger() directly.

    YANG Description: In the case that the system sets the overload bit on start, the
system should reset the bit (i.e., clear the overload bit) upon
the specified trigger.
    """
    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={'WAIT_FOR_BGP': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:WAIT_FOR_BGP': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'WAIT_FOR_SYSTEM': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:WAIT_FOR_SYSTEM': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="reset-trigger", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """reset_trigger must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'WAIT_FOR_BGP': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:WAIT_FOR_BGP': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'WAIT_FOR_SYSTEM': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:WAIT_FOR_SYSTEM': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="reset-trigger", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__reset_trigger = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_reset_trigger(self):
    self.__reset_trigger = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'WAIT_FOR_BGP': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:WAIT_FOR_BGP': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'WAIT_FOR_SYSTEM': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:WAIT_FOR_SYSTEM': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="reset-trigger", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_delay(self):
    """
    Getter method for delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/overload_bit/reset_triggers/reset_trigger/config/delay (uint16)

    YANG Description: If a reset trigger is specified, the system should delay resetting
the overload bit for the specified number of seconds after the
trigger occurs.
    """
    return self.__delay
      
  def _set_delay(self, v, load=False):
    """
    Setter method for delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/overload_bit/reset_triggers/reset_trigger/config/delay (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_delay() directly.

    YANG Description: If a reset trigger is specified, the system should delay resetting
the overload bit for the specified number of seconds after the
trigger occurs.
    """
    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="delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """delay 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="delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_delay(self):
    self.__delay = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

  reset_trigger = __builtin__.property(_get_reset_trigger, _set_reset_trigger)
  delay = __builtin__.property(_get_delay, _set_delay)


  _pyangbind_elements = OrderedDict([('reset_trigger', reset_trigger), ('delay', delay), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_overload_bit_reset_triggers_reset_trigger_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/lsp-bit/overload-bit/reset-triggers/reset-trigger/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines state for ISIS Overload Bit reset
triggers.
  """
  __slots__ = ('_path_helper', '_extmethods', '__reset_trigger','__delay',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__reset_trigger = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'WAIT_FOR_BGP': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:WAIT_FOR_BGP': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'WAIT_FOR_SYSTEM': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:WAIT_FOR_SYSTEM': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="reset-trigger", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__delay = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'lsp-bit', 'overload-bit', 'reset-triggers', 'reset-trigger', 'state']

  def _get_reset_trigger(self):
    """
    Getter method for reset_trigger, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/overload_bit/reset_triggers/reset_trigger/state/reset_trigger (identityref)

    YANG Description: In the case that the system sets the overload bit on start, the
system should reset the bit (i.e., clear the overload bit) upon
the specified trigger.
    """
    return self.__reset_trigger
      
  def _set_reset_trigger(self, v, load=False):
    """
    Setter method for reset_trigger, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/overload_bit/reset_triggers/reset_trigger/state/reset_trigger (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_reset_trigger is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_reset_trigger() directly.

    YANG Description: In the case that the system sets the overload bit on start, the
system should reset the bit (i.e., clear the overload bit) upon
the specified trigger.
    """
    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={'WAIT_FOR_BGP': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:WAIT_FOR_BGP': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'WAIT_FOR_SYSTEM': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:WAIT_FOR_SYSTEM': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="reset-trigger", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """reset_trigger must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'WAIT_FOR_BGP': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:WAIT_FOR_BGP': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'WAIT_FOR_SYSTEM': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:WAIT_FOR_SYSTEM': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="reset-trigger", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__reset_trigger = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_reset_trigger(self):
    self.__reset_trigger = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'WAIT_FOR_BGP': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:WAIT_FOR_BGP': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'WAIT_FOR_SYSTEM': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:WAIT_FOR_SYSTEM': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="reset-trigger", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_delay(self):
    """
    Getter method for delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/overload_bit/reset_triggers/reset_trigger/state/delay (uint16)

    YANG Description: If a reset trigger is specified, the system should delay resetting
the overload bit for the specified number of seconds after the
trigger occurs.
    """
    return self.__delay
      
  def _set_delay(self, v, load=False):
    """
    Setter method for delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/overload_bit/reset_triggers/reset_trigger/state/delay (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_delay() directly.

    YANG Description: If a reset trigger is specified, the system should delay resetting
the overload bit for the specified number of seconds after the
trigger occurs.
    """
    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="delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """delay 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="delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_delay(self):
    self.__delay = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  reset_trigger = __builtin__.property(_get_reset_trigger)
  delay = __builtin__.property(_get_delay)


  _pyangbind_elements = OrderedDict([('reset_trigger', reset_trigger), ('delay', delay), ])


class yc_reset_trigger_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_overload_bit_reset_triggers_reset_trigger(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/lsp-bit/overload-bit/reset-triggers/reset-trigger. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This list describes ISIS Overload reset trigger reasons.
  """
  __slots__ = ('_path_helper', '_extmethods', '__reset_trigger','__config','__state',)

  _yang_name = 'reset-trigger'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__reset_trigger = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="reset-trigger", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_overload_bit_reset_triggers_reset_trigger_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_overload_bit_reset_triggers_reset_trigger_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'lsp-bit', 'overload-bit', 'reset-triggers', 'reset-trigger']

  def _get_reset_trigger(self):
    """
    Getter method for reset_trigger, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/overload_bit/reset_triggers/reset_trigger/reset_trigger (leafref)

    YANG Description: Reference to the reset trigger reason
    """
    return self.__reset_trigger
      
  def _set_reset_trigger(self, v, load=False):
    """
    Setter method for reset_trigger, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/overload_bit/reset_triggers/reset_trigger/reset_trigger (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_reset_trigger is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_reset_trigger() directly.

    YANG Description: Reference to the reset trigger reason
    """
    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="reset-trigger", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """reset_trigger must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="reset-trigger", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__reset_trigger = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_reset_trigger(self):
    self.__reset_trigger = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="reset-trigger", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/overload_bit/reset_triggers/reset_trigger/config (container)

    YANG Description: This container defines ISIS Overload Bit reset trigger
configuration.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/overload_bit/reset_triggers/reset_trigger/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: This container defines ISIS Overload Bit reset trigger
configuration.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_overload_bit_reset_triggers_reset_trigger_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_overload_bit_reset_triggers_reset_trigger_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_overload_bit_reset_triggers_reset_trigger_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/overload_bit/reset_triggers/reset_trigger/state (container)

    YANG Description: This container defines state for ISIS Overload Bit reset
triggers.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/overload_bit/reset_triggers/reset_trigger/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: This container defines state for ISIS Overload Bit reset
triggers.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_overload_bit_reset_triggers_reset_trigger_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_overload_bit_reset_triggers_reset_trigger_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_overload_bit_reset_triggers_reset_trigger_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  reset_trigger = __builtin__.property(_get_reset_trigger, _set_reset_trigger)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('reset_trigger', reset_trigger), ('config', config), ('state', state), ])


class yc_reset_triggers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_overload_bit_reset_triggers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/lsp-bit/overload-bit/reset-triggers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines state for ISIS Overload Bit reset triggers
  """
  __slots__ = ('_path_helper', '_extmethods', '__reset_trigger',)

  _yang_name = 'reset-triggers'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__reset_trigger = YANGDynClass(base=YANGListType("reset_trigger",yc_reset_trigger_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_overload_bit_reset_triggers_reset_trigger, yang_name="reset-trigger", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='reset-trigger', extensions=None), is_container='list', yang_name="reset-trigger", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'lsp-bit', 'overload-bit', 'reset-triggers']

  def _get_reset_trigger(self):
    """
    Getter method for reset_trigger, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/overload_bit/reset_triggers/reset_trigger (list)

    YANG Description: This list describes ISIS Overload reset trigger reasons.
    """
    return self.__reset_trigger
      
  def _set_reset_trigger(self, v, load=False):
    """
    Setter method for reset_trigger, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/overload_bit/reset_triggers/reset_trigger (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_reset_trigger is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_reset_trigger() directly.

    YANG Description: This list describes ISIS Overload reset trigger reasons.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("reset_trigger",yc_reset_trigger_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_overload_bit_reset_triggers_reset_trigger, yang_name="reset-trigger", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='reset-trigger', extensions=None), is_container='list', yang_name="reset-trigger", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """reset_trigger must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("reset_trigger",yc_reset_trigger_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_overload_bit_reset_triggers_reset_trigger, yang_name="reset-trigger", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='reset-trigger', extensions=None), is_container='list', yang_name="reset-trigger", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__reset_trigger = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_reset_trigger(self):
    self.__reset_trigger = YANGDynClass(base=YANGListType("reset_trigger",yc_reset_trigger_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_overload_bit_reset_triggers_reset_trigger, yang_name="reset-trigger", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='reset-trigger', extensions=None), is_container='list', yang_name="reset-trigger", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  reset_trigger = __builtin__.property(_get_reset_trigger, _set_reset_trigger)


  _pyangbind_elements = OrderedDict([('reset_trigger', reset_trigger), ])


class yc_overload_bit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_overload_bit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/lsp-bit/overload-bit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines Overload Bit configuration.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__reset_triggers',)

  _yang_name = 'overload-bit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_overload_bit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_overload_bit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__reset_triggers = YANGDynClass(base=yc_reset_triggers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_overload_bit_reset_triggers, is_container='container', yang_name="reset-triggers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'lsp-bit', 'overload-bit']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/overload_bit/config (container)

    YANG Description: This container defines ISIS Overload Bit configuration.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/overload_bit/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: This container defines ISIS Overload Bit configuration.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_overload_bit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_overload_bit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_overload_bit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/overload_bit/state (container)

    YANG Description: This container defines state for ISIS Overload Bit.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/overload_bit/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: This container defines state for ISIS Overload Bit.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_overload_bit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_overload_bit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_overload_bit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_reset_triggers(self):
    """
    Getter method for reset_triggers, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/overload_bit/reset_triggers (container)

    YANG Description: This container defines state for ISIS Overload Bit reset triggers
    """
    return self.__reset_triggers
      
  def _set_reset_triggers(self, v, load=False):
    """
    Setter method for reset_triggers, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/overload_bit/reset_triggers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_reset_triggers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_reset_triggers() directly.

    YANG Description: This container defines state for ISIS Overload Bit reset triggers
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_reset_triggers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_overload_bit_reset_triggers, is_container='container', yang_name="reset-triggers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """reset_triggers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_reset_triggers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_overload_bit_reset_triggers, is_container='container', yang_name="reset-triggers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__reset_triggers = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_reset_triggers(self):
    self.__reset_triggers = YANGDynClass(base=yc_reset_triggers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_overload_bit_reset_triggers, is_container='container', yang_name="reset-triggers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  reset_triggers = __builtin__.property(_get_reset_triggers, _set_reset_triggers)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('reset_triggers', reset_triggers), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_attached_bit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/lsp-bit/attached-bit/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines Attached Bit configuration.
  """
  __slots__ = ('_path_helper', '_extmethods', '__ignore_bit','__suppress_bit',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__ignore_bit = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ignore-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__suppress_bit = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="suppress-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'lsp-bit', 'attached-bit', 'config']

  def _get_ignore_bit(self):
    """
    Getter method for ignore_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/attached_bit/config/ignore_bit (boolean)

    YANG Description: When set to true, if the attached bit is set on an incoming Level 1
IS-IS, the local system ignores it. In this case the local system
does not set a default route to the L1L2 router advertising the PDU
with the attached bit set.
    """
    return self.__ignore_bit
      
  def _set_ignore_bit(self, v, load=False):
    """
    Setter method for ignore_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/attached_bit/config/ignore_bit (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ignore_bit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ignore_bit() directly.

    YANG Description: When set to true, if the attached bit is set on an incoming Level 1
IS-IS, the local system ignores it. In this case the local system
does not set a default route to the L1L2 router advertising the PDU
with the attached bit set.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ignore-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ignore_bit must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ignore-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__ignore_bit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ignore_bit(self):
    self.__ignore_bit = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ignore-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_suppress_bit(self):
    """
    Getter method for suppress_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/attached_bit/config/suppress_bit (boolean)

    YANG Description: When set to true, if the local IS acts as a L1L2 router, then the
attached bit is not advertised in locally generated PDUs.
    """
    return self.__suppress_bit
      
  def _set_suppress_bit(self, v, load=False):
    """
    Setter method for suppress_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/attached_bit/config/suppress_bit (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_suppress_bit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_suppress_bit() directly.

    YANG Description: When set to true, if the local IS acts as a L1L2 router, then the
attached bit is not advertised in locally generated PDUs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="suppress-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """suppress_bit must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="suppress-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__suppress_bit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_suppress_bit(self):
    self.__suppress_bit = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="suppress-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  ignore_bit = __builtin__.property(_get_ignore_bit, _set_ignore_bit)
  suppress_bit = __builtin__.property(_get_suppress_bit, _set_suppress_bit)


  _pyangbind_elements = OrderedDict([('ignore_bit', ignore_bit), ('suppress_bit', suppress_bit), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_attached_bit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/lsp-bit/attached-bit/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines state for Link State PDU Bit.
  """
  __slots__ = ('_path_helper', '_extmethods', '__ignore_bit','__suppress_bit',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__ignore_bit = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ignore-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__suppress_bit = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="suppress-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'lsp-bit', 'attached-bit', 'state']

  def _get_ignore_bit(self):
    """
    Getter method for ignore_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/attached_bit/state/ignore_bit (boolean)

    YANG Description: When set to true, if the attached bit is set on an incoming Level 1
IS-IS, the local system ignores it. In this case the local system
does not set a default route to the L1L2 router advertising the PDU
with the attached bit set.
    """
    return self.__ignore_bit
      
  def _set_ignore_bit(self, v, load=False):
    """
    Setter method for ignore_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/attached_bit/state/ignore_bit (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ignore_bit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ignore_bit() directly.

    YANG Description: When set to true, if the attached bit is set on an incoming Level 1
IS-IS, the local system ignores it. In this case the local system
does not set a default route to the L1L2 router advertising the PDU
with the attached bit set.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ignore-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ignore_bit must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ignore-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__ignore_bit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ignore_bit(self):
    self.__ignore_bit = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="ignore-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_suppress_bit(self):
    """
    Getter method for suppress_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/attached_bit/state/suppress_bit (boolean)

    YANG Description: When set to true, if the local IS acts as a L1L2 router, then the
attached bit is not advertised in locally generated PDUs.
    """
    return self.__suppress_bit
      
  def _set_suppress_bit(self, v, load=False):
    """
    Setter method for suppress_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/attached_bit/state/suppress_bit (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_suppress_bit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_suppress_bit() directly.

    YANG Description: When set to true, if the local IS acts as a L1L2 router, then the
attached bit is not advertised in locally generated PDUs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="suppress-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """suppress_bit must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="suppress-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__suppress_bit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_suppress_bit(self):
    self.__suppress_bit = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="suppress-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  ignore_bit = __builtin__.property(_get_ignore_bit)
  suppress_bit = __builtin__.property(_get_suppress_bit)


  _pyangbind_elements = OrderedDict([('ignore_bit', ignore_bit), ('suppress_bit', suppress_bit), ])


class yc_attached_bit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_attached_bit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/lsp-bit/attached-bit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines Attached Bit.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'attached-bit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_attached_bit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_attached_bit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'lsp-bit', 'attached-bit']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/attached_bit/config (container)

    YANG Description: This container defines Attached Bit configuration.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/attached_bit/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: This container defines Attached Bit configuration.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_attached_bit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_attached_bit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_attached_bit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/attached_bit/state (container)

    YANG Description: This container defines state for Link State PDU Bit.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/attached_bit/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: This container defines state for Link State PDU Bit.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_attached_bit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_attached_bit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_attached_bit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_lsp_bit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/lsp-bit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS LSP Operational Bits.
  """
  __slots__ = ('_path_helper', '_extmethods', '__overload_bit','__attached_bit',)

  _yang_name = 'lsp-bit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__overload_bit = YANGDynClass(base=yc_overload_bit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_overload_bit, is_container='container', yang_name="overload-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__attached_bit = YANGDynClass(base=yc_attached_bit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_attached_bit, is_container='container', yang_name="attached-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'lsp-bit']

  def _get_overload_bit(self):
    """
    Getter method for overload_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/overload_bit (container)

    YANG Description: This container defines Overload Bit configuration.
    """
    return self.__overload_bit
      
  def _set_overload_bit(self, v, load=False):
    """
    Setter method for overload_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/overload_bit (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_overload_bit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_overload_bit() directly.

    YANG Description: This container defines Overload Bit configuration.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_overload_bit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_overload_bit, is_container='container', yang_name="overload-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """overload_bit must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_overload_bit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_overload_bit, is_container='container', yang_name="overload-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__overload_bit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_overload_bit(self):
    self.__overload_bit = YANGDynClass(base=yc_overload_bit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_overload_bit, is_container='container', yang_name="overload-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_attached_bit(self):
    """
    Getter method for attached_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/attached_bit (container)

    YANG Description: This container defines Attached Bit.
    """
    return self.__attached_bit
      
  def _set_attached_bit(self, v, load=False):
    """
    Setter method for attached_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit/attached_bit (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attached_bit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attached_bit() directly.

    YANG Description: This container defines Attached Bit.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_attached_bit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_attached_bit, is_container='container', yang_name="attached-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attached_bit must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_attached_bit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_attached_bit, is_container='container', yang_name="attached-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__attached_bit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attached_bit(self):
    self.__attached_bit = YANGDynClass(base=yc_attached_bit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit_attached_bit, is_container='container', yang_name="attached-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  overload_bit = __builtin__.property(_get_overload_bit, _set_overload_bit)
  attached_bit = __builtin__.property(_get_attached_bit, _set_attached_bit)


  _pyangbind_elements = OrderedDict([('overload_bit', overload_bit), ('attached_bit', attached_bit), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_reference_bandwidth_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/reference-bandwidth/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines Reference Bandwidth configuration
  """
  __slots__ = ('_path_helper', '_extmethods', '__reference_bandwidth',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__reference_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="reference-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'reference-bandwidth', 'config']

  def _get_reference_bandwidth(self):
    """
    Getter method for reference_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/reference_bandwidth/config/reference_bandwidth (uint32)

    YANG Description: ISIS Reference Bandwidth value
    """
    return self.__reference_bandwidth
      
  def _set_reference_bandwidth(self, v, load=False):
    """
    Setter method for reference_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/reference_bandwidth/config/reference_bandwidth (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_reference_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_reference_bandwidth() directly.

    YANG Description: ISIS Reference Bandwidth value
    """
    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="reference-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """reference_bandwidth 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="reference-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__reference_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_reference_bandwidth(self):
    self.__reference_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="reference-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)

  reference_bandwidth = __builtin__.property(_get_reference_bandwidth, _set_reference_bandwidth)


  _pyangbind_elements = OrderedDict([('reference_bandwidth', reference_bandwidth), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_reference_bandwidth_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/reference-bandwidth/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines state for Reference Bandwidth.
  """
  __slots__ = ('_path_helper', '_extmethods', '__reference_bandwidth',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__reference_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="reference-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'reference-bandwidth', 'state']

  def _get_reference_bandwidth(self):
    """
    Getter method for reference_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/reference_bandwidth/state/reference_bandwidth (uint32)

    YANG Description: ISIS Reference Bandwidth value
    """
    return self.__reference_bandwidth
      
  def _set_reference_bandwidth(self, v, load=False):
    """
    Setter method for reference_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/reference_bandwidth/state/reference_bandwidth (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_reference_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_reference_bandwidth() directly.

    YANG Description: ISIS Reference Bandwidth value
    """
    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="reference-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """reference_bandwidth 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="reference-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__reference_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_reference_bandwidth(self):
    self.__reference_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="reference-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  reference_bandwidth = __builtin__.property(_get_reference_bandwidth)


  _pyangbind_elements = OrderedDict([('reference_bandwidth', reference_bandwidth), ])


class yc_reference_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_reference_bandwidth(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/reference-bandwidth. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS Reference Bandwidth.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'reference-bandwidth'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_reference_bandwidth_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_reference_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'reference-bandwidth']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/reference_bandwidth/config (container)

    YANG Description: This container defines Reference Bandwidth configuration
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/reference_bandwidth/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: This container defines Reference Bandwidth configuration
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_reference_bandwidth_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_reference_bandwidth_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_reference_bandwidth_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/reference_bandwidth/state (container)

    YANG Description: This container defines state for Reference Bandwidth.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/reference_bandwidth/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: This container defines state for Reference Bandwidth.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_reference_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_reference_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_reference_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_nsr_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/nsr/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines Non-Stop-Routing configuration.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'nsr', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/nsr/config/enabled (boolean)

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/nsr/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_nsr_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/nsr/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines state for Non-Stop-Routing
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'nsr', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/nsr/state/enabled (boolean)

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/nsr/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  enabled = __builtin__.property(_get_enabled)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ])


class yc_nsr_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_nsr(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/nsr. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS Non-Stop Routing.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'nsr'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_nsr_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_nsr_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'nsr']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/nsr/config (container)

    YANG Description: This container defines Non-Stop-Routing configuration.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/nsr/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: This container defines Non-Stop-Routing configuration.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_nsr_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_nsr_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_nsr_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/nsr/state (container)

    YANG Description: This container defines state for Non-Stop-Routing
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/nsr/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: This container defines state for Non-Stop-Routing
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_nsr_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_nsr_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_nsr_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_graceful_restart_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/graceful-restart/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS graceful-restart configuration.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__helper_only',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__helper_only = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'graceful-restart', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/graceful_restart/config/enabled (boolean)

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/graceful_restart/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_helper_only(self):
    """
    Getter method for helper_only, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/graceful_restart/config/helper_only (boolean)

    YANG Description: Enable or disable the IS-IS graceful restart helper function. When
this leaf is set, the local system does not utilise the IS-IS
graceful restart procedures during its own restart, but supports
retaining forwarding information during a remote speaker's restart.
    """
    return self.__helper_only
      
  def _set_helper_only(self, v, load=False):
    """
    Setter method for helper_only, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/graceful_restart/config/helper_only (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_helper_only is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_helper_only() directly.

    YANG Description: Enable or disable the IS-IS graceful restart helper function. When
this leaf is set, the local system does not utilise the IS-IS
graceful restart procedures during its own restart, but supports
retaining forwarding information during a remote speaker's restart.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="helper-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """helper_only must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__helper_only = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_helper_only(self):
    self.__helper_only = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)
  helper_only = __builtin__.property(_get_helper_only, _set_helper_only)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('helper_only', helper_only), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_graceful_restart_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/graceful-restart/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines state information for ISIS graceful-restart.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__helper_only',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__helper_only = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'graceful-restart', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/graceful_restart/state/enabled (boolean)

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/graceful_restart/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_helper_only(self):
    """
    Getter method for helper_only, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/graceful_restart/state/helper_only (boolean)

    YANG Description: Enable or disable the IS-IS graceful restart helper function. When
this leaf is set, the local system does not utilise the IS-IS
graceful restart procedures during its own restart, but supports
retaining forwarding information during a remote speaker's restart.
    """
    return self.__helper_only
      
  def _set_helper_only(self, v, load=False):
    """
    Setter method for helper_only, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/graceful_restart/state/helper_only (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_helper_only is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_helper_only() directly.

    YANG Description: Enable or disable the IS-IS graceful restart helper function. When
this leaf is set, the local system does not utilise the IS-IS
graceful restart procedures during its own restart, but supports
retaining forwarding information during a remote speaker's restart.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="helper-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """helper_only must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__helper_only = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_helper_only(self):
    self.__helper_only = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  enabled = __builtin__.property(_get_enabled)
  helper_only = __builtin__.property(_get_helper_only)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('helper_only', helper_only), ])


class yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_graceful_restart(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/graceful-restart. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS Graceful Restart.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'graceful-restart'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'graceful-restart']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/graceful_restart/config (container)

    YANG Description: This container defines ISIS graceful-restart configuration.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/graceful_restart/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: This container defines ISIS graceful-restart configuration.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/graceful_restart/state (container)

    YANG Description: This container defines state information for ISIS graceful-restart.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/graceful_restart/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: This container defines state information for ISIS graceful-restart.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/timers/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS global timers configuration.
  """
  __slots__ = ('_path_helper', '_extmethods', '__lsp_lifetime_interval','__lsp_refresh_interval',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__lsp_lifetime_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1200), is_leaf=True, yang_name="lsp-lifetime-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__lsp_refresh_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="lsp-refresh-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'timers', 'config']

  def _get_lsp_lifetime_interval(self):
    """
    Getter method for lsp_lifetime_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/config/lsp_lifetime_interval (uint16)

    YANG Description: Time interval in seconds that specifies how long an LSP remains in
LSDB without being refreshed.
    """
    return self.__lsp_lifetime_interval
      
  def _set_lsp_lifetime_interval(self, v, load=False):
    """
    Setter method for lsp_lifetime_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/config/lsp_lifetime_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsp_lifetime_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsp_lifetime_interval() directly.

    YANG Description: Time interval in seconds that specifies how long an LSP remains in
LSDB without being refreshed.
    """
    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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1200), is_leaf=True, yang_name="lsp-lifetime-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsp_lifetime_interval 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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1200), is_leaf=True, yang_name="lsp-lifetime-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__lsp_lifetime_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsp_lifetime_interval(self):
    self.__lsp_lifetime_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1200), is_leaf=True, yang_name="lsp-lifetime-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_lsp_refresh_interval(self):
    """
    Getter method for lsp_refresh_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/config/lsp_refresh_interval (uint16)

    YANG Description: Time interval in seconds that specifies how often route topology
that a device originates is transmitted in LSPs.
    """
    return self.__lsp_refresh_interval
      
  def _set_lsp_refresh_interval(self, v, load=False):
    """
    Setter method for lsp_refresh_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/config/lsp_refresh_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsp_refresh_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsp_refresh_interval() directly.

    YANG Description: Time interval in seconds that specifies how often route topology
that a device originates is transmitted in LSPs.
    """
    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="lsp-refresh-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsp_refresh_interval 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="lsp-refresh-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__lsp_refresh_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsp_refresh_interval(self):
    self.__lsp_refresh_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="lsp-refresh-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

  lsp_lifetime_interval = __builtin__.property(_get_lsp_lifetime_interval, _set_lsp_lifetime_interval)
  lsp_refresh_interval = __builtin__.property(_get_lsp_refresh_interval, _set_lsp_refresh_interval)


  _pyangbind_elements = OrderedDict([('lsp_lifetime_interval', lsp_lifetime_interval), ('lsp_refresh_interval', lsp_refresh_interval), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/timers/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines state information for ISIS global timers.
  """
  __slots__ = ('_path_helper', '_extmethods', '__lsp_lifetime_interval','__lsp_refresh_interval',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__lsp_lifetime_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1200), is_leaf=True, yang_name="lsp-lifetime-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__lsp_refresh_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="lsp-refresh-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'timers', 'state']

  def _get_lsp_lifetime_interval(self):
    """
    Getter method for lsp_lifetime_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/state/lsp_lifetime_interval (uint16)

    YANG Description: Time interval in seconds that specifies how long an LSP remains in
LSDB without being refreshed.
    """
    return self.__lsp_lifetime_interval
      
  def _set_lsp_lifetime_interval(self, v, load=False):
    """
    Setter method for lsp_lifetime_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/state/lsp_lifetime_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsp_lifetime_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsp_lifetime_interval() directly.

    YANG Description: Time interval in seconds that specifies how long an LSP remains in
LSDB without being refreshed.
    """
    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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1200), is_leaf=True, yang_name="lsp-lifetime-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsp_lifetime_interval 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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1200), is_leaf=True, yang_name="lsp-lifetime-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__lsp_lifetime_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsp_lifetime_interval(self):
    self.__lsp_lifetime_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1200), is_leaf=True, yang_name="lsp-lifetime-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_lsp_refresh_interval(self):
    """
    Getter method for lsp_refresh_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/state/lsp_refresh_interval (uint16)

    YANG Description: Time interval in seconds that specifies how often route topology
that a device originates is transmitted in LSPs.
    """
    return self.__lsp_refresh_interval
      
  def _set_lsp_refresh_interval(self, v, load=False):
    """
    Setter method for lsp_refresh_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/state/lsp_refresh_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsp_refresh_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsp_refresh_interval() directly.

    YANG Description: Time interval in seconds that specifies how often route topology
that a device originates is transmitted in LSPs.
    """
    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="lsp-refresh-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsp_refresh_interval 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="lsp-refresh-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__lsp_refresh_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsp_refresh_interval(self):
    self.__lsp_refresh_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="lsp-refresh-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  lsp_lifetime_interval = __builtin__.property(_get_lsp_lifetime_interval)
  lsp_refresh_interval = __builtin__.property(_get_lsp_refresh_interval)


  _pyangbind_elements = OrderedDict([('lsp_lifetime_interval', lsp_lifetime_interval), ('lsp_refresh_interval', lsp_refresh_interval), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers_spf_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/timers/spf/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS SPF timers configuration.
  """
  __slots__ = ('_path_helper', '_extmethods', '__spf_hold_interval','__spf_first_interval','__spf_second_interval',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__spf_hold_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)(5000), is_leaf=True, yang_name="spf-hold-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=True)
    self.__spf_first_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="spf-first-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=True)
    self.__spf_second_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="spf-second-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'timers', 'spf', 'config']

  def _get_spf_hold_interval(self):
    """
    Getter method for spf_hold_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/spf/config/spf_hold_interval (uint64)

    YANG Description: SPF Hold Down time interval in milliseconds.
    """
    return self.__spf_hold_interval
      
  def _set_spf_hold_interval(self, v, load=False):
    """
    Setter method for spf_hold_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/spf/config/spf_hold_interval (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_spf_hold_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_spf_hold_interval() directly.

    YANG Description: SPF Hold Down time interval in milliseconds.
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)(5000), is_leaf=True, yang_name="spf-hold-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """spf_hold_interval 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), default=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)(5000), is_leaf=True, yang_name="spf-hold-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=True)""",
        })

    self.__spf_hold_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_spf_hold_interval(self):
    self.__spf_hold_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)(5000), is_leaf=True, yang_name="spf-hold-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=True)


  def _get_spf_first_interval(self):
    """
    Getter method for spf_first_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/spf/config/spf_first_interval (uint64)

    YANG Description: Time interval in milliseconds between the
detection of topology change and when the SPF algorithm runs.
    """
    return self.__spf_first_interval
      
  def _set_spf_first_interval(self, v, load=False):
    """
    Setter method for spf_first_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/spf/config/spf_first_interval (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_spf_first_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_spf_first_interval() directly.

    YANG Description: Time interval in milliseconds between the
detection of topology change and when the SPF algorithm runs.
    """
    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="spf-first-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """spf_first_interval 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="spf-first-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=True)""",
        })

    self.__spf_first_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_spf_first_interval(self):
    self.__spf_first_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="spf-first-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=True)


  def _get_spf_second_interval(self):
    """
    Getter method for spf_second_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/spf/config/spf_second_interval (uint64)

    YANG Description: Time interval in milliseconds between the first and second
SPF calculation.
    """
    return self.__spf_second_interval
      
  def _set_spf_second_interval(self, v, load=False):
    """
    Setter method for spf_second_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/spf/config/spf_second_interval (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_spf_second_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_spf_second_interval() directly.

    YANG Description: Time interval in milliseconds between the first and second
SPF calculation.
    """
    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="spf-second-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """spf_second_interval 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="spf-second-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=True)""",
        })

    self.__spf_second_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_spf_second_interval(self):
    self.__spf_second_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="spf-second-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=True)

  spf_hold_interval = __builtin__.property(_get_spf_hold_interval, _set_spf_hold_interval)
  spf_first_interval = __builtin__.property(_get_spf_first_interval, _set_spf_first_interval)
  spf_second_interval = __builtin__.property(_get_spf_second_interval, _set_spf_second_interval)


  _pyangbind_elements = OrderedDict([('spf_hold_interval', spf_hold_interval), ('spf_first_interval', spf_first_interval), ('spf_second_interval', spf_second_interval), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers_spf_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/timers/spf/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines state information for ISIS SPF timers.
  """
  __slots__ = ('_path_helper', '_extmethods', '__spf_hold_interval','__spf_first_interval','__spf_second_interval','__adaptive_timer',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__spf_hold_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)(5000), is_leaf=True, yang_name="spf-hold-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__spf_first_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="spf-first-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__spf_second_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="spf-second-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__adaptive_timer = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LINEAR': {}, 'EXPONENTIAL': {}},), is_leaf=True, yang_name="adaptive-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:adaptive-timer-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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'timers', 'spf', 'state']

  def _get_spf_hold_interval(self):
    """
    Getter method for spf_hold_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/spf/state/spf_hold_interval (uint64)

    YANG Description: SPF Hold Down time interval in milliseconds.
    """
    return self.__spf_hold_interval
      
  def _set_spf_hold_interval(self, v, load=False):
    """
    Setter method for spf_hold_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/spf/state/spf_hold_interval (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_spf_hold_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_spf_hold_interval() directly.

    YANG Description: SPF Hold Down time interval in milliseconds.
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)(5000), is_leaf=True, yang_name="spf-hold-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """spf_hold_interval 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), default=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)(5000), is_leaf=True, yang_name="spf-hold-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__spf_hold_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_spf_hold_interval(self):
    self.__spf_hold_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)(5000), is_leaf=True, yang_name="spf-hold-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_spf_first_interval(self):
    """
    Getter method for spf_first_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/spf/state/spf_first_interval (uint64)

    YANG Description: Time interval in milliseconds between the
detection of topology change and when the SPF algorithm runs.
    """
    return self.__spf_first_interval
      
  def _set_spf_first_interval(self, v, load=False):
    """
    Setter method for spf_first_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/spf/state/spf_first_interval (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_spf_first_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_spf_first_interval() directly.

    YANG Description: Time interval in milliseconds between the
detection of topology change and when the SPF algorithm runs.
    """
    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="spf-first-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """spf_first_interval 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="spf-first-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__spf_first_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_spf_first_interval(self):
    self.__spf_first_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="spf-first-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_spf_second_interval(self):
    """
    Getter method for spf_second_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/spf/state/spf_second_interval (uint64)

    YANG Description: Time interval in milliseconds between the first and second
SPF calculation.
    """
    return self.__spf_second_interval
      
  def _set_spf_second_interval(self, v, load=False):
    """
    Setter method for spf_second_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/spf/state/spf_second_interval (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_spf_second_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_spf_second_interval() directly.

    YANG Description: Time interval in milliseconds between the first and second
SPF calculation.
    """
    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="spf-second-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """spf_second_interval 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="spf-second-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__spf_second_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_spf_second_interval(self):
    self.__spf_second_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="spf-second-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_adaptive_timer(self):
    """
    Getter method for adaptive_timer, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/spf/state/adaptive_timer (oc-isis-types:adaptive-timer-type)

    YANG Description: ISIS adaptive timer types (linear, exponential).
    """
    return self.__adaptive_timer
      
  def _set_adaptive_timer(self, v, load=False):
    """
    Setter method for adaptive_timer, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/spf/state/adaptive_timer (oc-isis-types:adaptive-timer-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adaptive_timer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adaptive_timer() directly.

    YANG Description: ISIS adaptive timer types (linear, exponential).
    """
    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={'LINEAR': {}, 'EXPONENTIAL': {}},), is_leaf=True, yang_name="adaptive-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:adaptive-timer-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adaptive_timer must be of a type compatible with oc-isis-types:adaptive-timer-type""",
          'defined-type': "oc-isis-types:adaptive-timer-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LINEAR': {}, 'EXPONENTIAL': {}},), is_leaf=True, yang_name="adaptive-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:adaptive-timer-type', is_config=False)""",
        })

    self.__adaptive_timer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adaptive_timer(self):
    self.__adaptive_timer = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LINEAR': {}, 'EXPONENTIAL': {}},), is_leaf=True, yang_name="adaptive-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:adaptive-timer-type', is_config=False)

  spf_hold_interval = __builtin__.property(_get_spf_hold_interval)
  spf_first_interval = __builtin__.property(_get_spf_first_interval)
  spf_second_interval = __builtin__.property(_get_spf_second_interval)
  adaptive_timer = __builtin__.property(_get_adaptive_timer)


  _pyangbind_elements = OrderedDict([('spf_hold_interval', spf_hold_interval), ('spf_first_interval', spf_first_interval), ('spf_second_interval', spf_second_interval), ('adaptive_timer', adaptive_timer), ])


class yc_spf_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers_spf(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/timers/spf. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS SPF timer settings.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'spf'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers_spf_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers_spf_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'timers', 'spf']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/spf/config (container)

    YANG Description: This container defines ISIS SPF timers configuration.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/spf/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: This container defines ISIS SPF timers configuration.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers_spf_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers_spf_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers_spf_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/spf/state (container)

    YANG Description: This container defines state information for ISIS SPF timers.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/spf/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: This container defines state information for ISIS SPF timers.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers_spf_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers_spf_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers_spf_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers_lsp_generation_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/timers/lsp-generation/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS LSP Generation timers
configuration.
  """
  __slots__ = ('_path_helper', '_extmethods', '__lsp_max_wait_interval','__lsp_first_wait_interval','__lsp_second_wait_interval',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__lsp_max_wait_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="lsp-max-wait-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=True)
    self.__lsp_first_wait_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="lsp-first-wait-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=True)
    self.__lsp_second_wait_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="lsp-second-wait-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'timers', 'lsp-generation', 'config']

  def _get_lsp_max_wait_interval(self):
    """
    Getter method for lsp_max_wait_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/lsp_generation/config/lsp_max_wait_interval (uint64)

    YANG Description: Time interval in milliseconds that specifies max interval between
two consecutive occurrences of an LSP being generated.
    """
    return self.__lsp_max_wait_interval
      
  def _set_lsp_max_wait_interval(self, v, load=False):
    """
    Setter method for lsp_max_wait_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/lsp_generation/config/lsp_max_wait_interval (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsp_max_wait_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsp_max_wait_interval() directly.

    YANG Description: Time interval in milliseconds that specifies max interval between
two consecutive occurrences of an LSP being generated.
    """
    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="lsp-max-wait-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsp_max_wait_interval 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="lsp-max-wait-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=True)""",
        })

    self.__lsp_max_wait_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsp_max_wait_interval(self):
    self.__lsp_max_wait_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="lsp-max-wait-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=True)


  def _get_lsp_first_wait_interval(self):
    """
    Getter method for lsp_first_wait_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/lsp_generation/config/lsp_first_wait_interval (uint64)

    YANG Description: Time interval in milliseconds that specifies the first LSP generation
delay.
    """
    return self.__lsp_first_wait_interval
      
  def _set_lsp_first_wait_interval(self, v, load=False):
    """
    Setter method for lsp_first_wait_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/lsp_generation/config/lsp_first_wait_interval (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsp_first_wait_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsp_first_wait_interval() directly.

    YANG Description: Time interval in milliseconds that specifies the first LSP generation
delay.
    """
    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="lsp-first-wait-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsp_first_wait_interval 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="lsp-first-wait-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=True)""",
        })

    self.__lsp_first_wait_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsp_first_wait_interval(self):
    self.__lsp_first_wait_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="lsp-first-wait-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=True)


  def _get_lsp_second_wait_interval(self):
    """
    Getter method for lsp_second_wait_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/lsp_generation/config/lsp_second_wait_interval (uint64)

    YANG Description: Time interval in milliseconds that specifies the millisecond LSP
generation delay.
    """
    return self.__lsp_second_wait_interval
      
  def _set_lsp_second_wait_interval(self, v, load=False):
    """
    Setter method for lsp_second_wait_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/lsp_generation/config/lsp_second_wait_interval (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsp_second_wait_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsp_second_wait_interval() directly.

    YANG Description: Time interval in milliseconds that specifies the millisecond LSP
generation delay.
    """
    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="lsp-second-wait-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsp_second_wait_interval 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="lsp-second-wait-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=True)""",
        })

    self.__lsp_second_wait_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsp_second_wait_interval(self):
    self.__lsp_second_wait_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="lsp-second-wait-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=True)

  lsp_max_wait_interval = __builtin__.property(_get_lsp_max_wait_interval, _set_lsp_max_wait_interval)
  lsp_first_wait_interval = __builtin__.property(_get_lsp_first_wait_interval, _set_lsp_first_wait_interval)
  lsp_second_wait_interval = __builtin__.property(_get_lsp_second_wait_interval, _set_lsp_second_wait_interval)


  _pyangbind_elements = OrderedDict([('lsp_max_wait_interval', lsp_max_wait_interval), ('lsp_first_wait_interval', lsp_first_wait_interval), ('lsp_second_wait_interval', lsp_second_wait_interval), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers_lsp_generation_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/timers/lsp-generation/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines state information for ISIS LSP Generation
timers.
  """
  __slots__ = ('_path_helper', '_extmethods', '__lsp_max_wait_interval','__lsp_first_wait_interval','__lsp_second_wait_interval','__adaptive_timer',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__lsp_max_wait_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="lsp-max-wait-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__lsp_first_wait_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="lsp-first-wait-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__lsp_second_wait_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="lsp-second-wait-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__adaptive_timer = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LINEAR': {}, 'EXPONENTIAL': {}},), is_leaf=True, yang_name="adaptive-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:adaptive-timer-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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'timers', 'lsp-generation', 'state']

  def _get_lsp_max_wait_interval(self):
    """
    Getter method for lsp_max_wait_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/lsp_generation/state/lsp_max_wait_interval (uint64)

    YANG Description: Time interval in milliseconds that specifies max interval between
two consecutive occurrences of an LSP being generated.
    """
    return self.__lsp_max_wait_interval
      
  def _set_lsp_max_wait_interval(self, v, load=False):
    """
    Setter method for lsp_max_wait_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/lsp_generation/state/lsp_max_wait_interval (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsp_max_wait_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsp_max_wait_interval() directly.

    YANG Description: Time interval in milliseconds that specifies max interval between
two consecutive occurrences of an LSP being generated.
    """
    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="lsp-max-wait-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsp_max_wait_interval 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="lsp-max-wait-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__lsp_max_wait_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsp_max_wait_interval(self):
    self.__lsp_max_wait_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="lsp-max-wait-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_lsp_first_wait_interval(self):
    """
    Getter method for lsp_first_wait_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/lsp_generation/state/lsp_first_wait_interval (uint64)

    YANG Description: Time interval in milliseconds that specifies the first LSP generation
delay.
    """
    return self.__lsp_first_wait_interval
      
  def _set_lsp_first_wait_interval(self, v, load=False):
    """
    Setter method for lsp_first_wait_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/lsp_generation/state/lsp_first_wait_interval (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsp_first_wait_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsp_first_wait_interval() directly.

    YANG Description: Time interval in milliseconds that specifies the first LSP generation
delay.
    """
    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="lsp-first-wait-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsp_first_wait_interval 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="lsp-first-wait-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__lsp_first_wait_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsp_first_wait_interval(self):
    self.__lsp_first_wait_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="lsp-first-wait-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_lsp_second_wait_interval(self):
    """
    Getter method for lsp_second_wait_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/lsp_generation/state/lsp_second_wait_interval (uint64)

    YANG Description: Time interval in milliseconds that specifies the millisecond LSP
generation delay.
    """
    return self.__lsp_second_wait_interval
      
  def _set_lsp_second_wait_interval(self, v, load=False):
    """
    Setter method for lsp_second_wait_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/lsp_generation/state/lsp_second_wait_interval (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsp_second_wait_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsp_second_wait_interval() directly.

    YANG Description: Time interval in milliseconds that specifies the millisecond LSP
generation delay.
    """
    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="lsp-second-wait-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsp_second_wait_interval 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="lsp-second-wait-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__lsp_second_wait_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsp_second_wait_interval(self):
    self.__lsp_second_wait_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="lsp-second-wait-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_adaptive_timer(self):
    """
    Getter method for adaptive_timer, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/lsp_generation/state/adaptive_timer (oc-isis-types:adaptive-timer-type)

    YANG Description: ISIS adaptive timer types (linear, exponential).
    """
    return self.__adaptive_timer
      
  def _set_adaptive_timer(self, v, load=False):
    """
    Setter method for adaptive_timer, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/lsp_generation/state/adaptive_timer (oc-isis-types:adaptive-timer-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adaptive_timer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adaptive_timer() directly.

    YANG Description: ISIS adaptive timer types (linear, exponential).
    """
    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={'LINEAR': {}, 'EXPONENTIAL': {}},), is_leaf=True, yang_name="adaptive-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:adaptive-timer-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adaptive_timer must be of a type compatible with oc-isis-types:adaptive-timer-type""",
          'defined-type': "oc-isis-types:adaptive-timer-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LINEAR': {}, 'EXPONENTIAL': {}},), is_leaf=True, yang_name="adaptive-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:adaptive-timer-type', is_config=False)""",
        })

    self.__adaptive_timer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adaptive_timer(self):
    self.__adaptive_timer = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LINEAR': {}, 'EXPONENTIAL': {}},), is_leaf=True, yang_name="adaptive-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:adaptive-timer-type', is_config=False)

  lsp_max_wait_interval = __builtin__.property(_get_lsp_max_wait_interval)
  lsp_first_wait_interval = __builtin__.property(_get_lsp_first_wait_interval)
  lsp_second_wait_interval = __builtin__.property(_get_lsp_second_wait_interval)
  adaptive_timer = __builtin__.property(_get_adaptive_timer)


  _pyangbind_elements = OrderedDict([('lsp_max_wait_interval', lsp_max_wait_interval), ('lsp_first_wait_interval', lsp_first_wait_interval), ('lsp_second_wait_interval', lsp_second_wait_interval), ('adaptive_timer', adaptive_timer), ])


class yc_lsp_generation_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers_lsp_generation(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/timers/lsp-generation. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS LSP Generation.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'lsp-generation'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers_lsp_generation_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers_lsp_generation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'timers', 'lsp-generation']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/lsp_generation/config (container)

    YANG Description: This container defines ISIS LSP Generation timers
configuration.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/lsp_generation/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: This container defines ISIS LSP Generation timers
configuration.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers_lsp_generation_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers_lsp_generation_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers_lsp_generation_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/lsp_generation/state (container)

    YANG Description: This container defines state information for ISIS LSP Generation
timers.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/lsp_generation/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: This container defines state information for ISIS LSP Generation
timers.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers_lsp_generation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers_lsp_generation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers_lsp_generation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_timers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/timers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS timers.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__spf','__lsp_generation',)

  _yang_name = 'timers'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__spf = YANGDynClass(base=yc_spf_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers_spf, is_container='container', yang_name="spf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__lsp_generation = YANGDynClass(base=yc_lsp_generation_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers_lsp_generation, is_container='container', yang_name="lsp-generation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'timers']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/config (container)

    YANG Description: This container defines ISIS global timers configuration.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/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: This container defines ISIS global timers configuration.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/state (container)

    YANG Description: This container defines state information for ISIS global timers.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/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: This container defines state information for ISIS global timers.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_spf(self):
    """
    Getter method for spf, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/spf (container)

    YANG Description: This container defines ISIS SPF timer settings.
    """
    return self.__spf
      
  def _set_spf(self, v, load=False):
    """
    Setter method for spf, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/spf (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_spf is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_spf() directly.

    YANG Description: This container defines ISIS SPF timer settings.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_spf_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers_spf, is_container='container', yang_name="spf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """spf must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_spf_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers_spf, is_container='container', yang_name="spf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__spf = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_spf(self):
    self.__spf = YANGDynClass(base=yc_spf_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers_spf, is_container='container', yang_name="spf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_lsp_generation(self):
    """
    Getter method for lsp_generation, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/lsp_generation (container)

    YANG Description: This container defines ISIS LSP Generation.
    """
    return self.__lsp_generation
      
  def _set_lsp_generation(self, v, load=False):
    """
    Setter method for lsp_generation, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers/lsp_generation (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsp_generation is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsp_generation() directly.

    YANG Description: This container defines ISIS LSP Generation.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_lsp_generation_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers_lsp_generation, is_container='container', yang_name="lsp-generation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsp_generation must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_lsp_generation_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers_lsp_generation, is_container='container', yang_name="lsp-generation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__lsp_generation = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsp_generation(self):
    self.__lsp_generation = YANGDynClass(base=yc_lsp_generation_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers_lsp_generation, is_container='container', yang_name="lsp-generation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  spf = __builtin__.property(_get_spf, _set_spf)
  lsp_generation = __builtin__.property(_get_lsp_generation, _set_lsp_generation)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('spf', spf), ('lsp_generation', lsp_generation), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_transport_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/transport/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS transport related configuration.
  """
  __slots__ = ('_path_helper', '_extmethods', '__lsp_mtu_size',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__lsp_mtu_size = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="lsp-mtu-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'transport', 'config']

  def _get_lsp_mtu_size(self):
    """
    Getter method for lsp_mtu_size, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/transport/config/lsp_mtu_size (uint16)

    YANG Description: The maximum size in bytes of an IS-IS Link state PDU.
    """
    return self.__lsp_mtu_size
      
  def _set_lsp_mtu_size(self, v, load=False):
    """
    Setter method for lsp_mtu_size, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/transport/config/lsp_mtu_size (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsp_mtu_size is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsp_mtu_size() directly.

    YANG Description: The maximum size in bytes of an IS-IS Link state PDU.
    """
    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="lsp-mtu-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsp_mtu_size 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="lsp-mtu-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__lsp_mtu_size = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsp_mtu_size(self):
    self.__lsp_mtu_size = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="lsp-mtu-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

  lsp_mtu_size = __builtin__.property(_get_lsp_mtu_size, _set_lsp_mtu_size)


  _pyangbind_elements = OrderedDict([('lsp_mtu_size', lsp_mtu_size), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_transport_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/transport/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines state information for ISIS transport
parameters.
  """
  __slots__ = ('_path_helper', '_extmethods', '__lsp_mtu_size',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__lsp_mtu_size = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="lsp-mtu-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'transport', 'state']

  def _get_lsp_mtu_size(self):
    """
    Getter method for lsp_mtu_size, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/transport/state/lsp_mtu_size (uint16)

    YANG Description: The maximum size in bytes of an IS-IS Link state PDU.
    """
    return self.__lsp_mtu_size
      
  def _set_lsp_mtu_size(self, v, load=False):
    """
    Setter method for lsp_mtu_size, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/transport/state/lsp_mtu_size (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsp_mtu_size is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsp_mtu_size() directly.

    YANG Description: The maximum size in bytes of an IS-IS Link state PDU.
    """
    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="lsp-mtu-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsp_mtu_size 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="lsp-mtu-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__lsp_mtu_size = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsp_mtu_size(self):
    self.__lsp_mtu_size = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="lsp-mtu-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  lsp_mtu_size = __builtin__.property(_get_lsp_mtu_size)


  _pyangbind_elements = OrderedDict([('lsp_mtu_size', lsp_mtu_size), ])


class yc_transport_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_transport(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/transport. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS transport.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'transport'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'transport']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/transport/config (container)

    YANG Description: This container defines ISIS transport related configuration.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/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: This container defines ISIS transport related configuration.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/transport/state (container)

    YANG Description: This container defines state information for ISIS transport
parameters.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/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: This container defines state information for ISIS transport
parameters.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_mpls_igp_ldp_sync_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/mpls/igp-ldp-sync/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS/IGP configuration.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__post_session_up_delay',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__post_session_up_delay = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="post-session-up-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'mpls', 'igp-ldp-sync', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/mpls/igp_ldp_sync/config/enabled (boolean)

    YANG Description: When set to true, rely on IGP/LDP synchronization. IGP cost for
link is maintained at max until LDP adjacencies are established 
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/mpls/igp_ldp_sync/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When set to true, rely on IGP/LDP synchronization. IGP cost for
link is maintained at max until LDP adjacencies are established 
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_post_session_up_delay(self):
    """
    Getter method for post_session_up_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/mpls/igp_ldp_sync/config/post_session_up_delay (uint16)

    YANG Description: Specifies a delay, expressed in units of seconds,
between the LDP session to the IGP neighbor being established, and
it being considered synchronized by the IGP.
    """
    return self.__post_session_up_delay
      
  def _set_post_session_up_delay(self, v, load=False):
    """
    Setter method for post_session_up_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/mpls/igp_ldp_sync/config/post_session_up_delay (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_post_session_up_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_post_session_up_delay() directly.

    YANG Description: Specifies a delay, expressed in units of seconds,
between the LDP session to the IGP neighbor being established, and
it being considered synchronized by the IGP.
    """
    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="post-session-up-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """post_session_up_delay 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="post-session-up-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__post_session_up_delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_post_session_up_delay(self):
    self.__post_session_up_delay = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="post-session-up-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)
  post_session_up_delay = __builtin__.property(_get_post_session_up_delay, _set_post_session_up_delay)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('post_session_up_delay', post_session_up_delay), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_mpls_igp_ldp_sync_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/mpls/igp-ldp-sync/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines state information for ISIS/LDP Sync.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__post_session_up_delay',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__post_session_up_delay = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="post-session-up-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'mpls', 'igp-ldp-sync', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/mpls/igp_ldp_sync/state/enabled (boolean)

    YANG Description: When set to true, rely on IGP/LDP synchronization. IGP cost for
link is maintained at max until LDP adjacencies are established 
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/mpls/igp_ldp_sync/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When set to true, rely on IGP/LDP synchronization. IGP cost for
link is maintained at max until LDP adjacencies are established 
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_post_session_up_delay(self):
    """
    Getter method for post_session_up_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/mpls/igp_ldp_sync/state/post_session_up_delay (uint16)

    YANG Description: Specifies a delay, expressed in units of seconds,
between the LDP session to the IGP neighbor being established, and
it being considered synchronized by the IGP.
    """
    return self.__post_session_up_delay
      
  def _set_post_session_up_delay(self, v, load=False):
    """
    Setter method for post_session_up_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/mpls/igp_ldp_sync/state/post_session_up_delay (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_post_session_up_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_post_session_up_delay() directly.

    YANG Description: Specifies a delay, expressed in units of seconds,
between the LDP session to the IGP neighbor being established, and
it being considered synchronized by the IGP.
    """
    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="post-session-up-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """post_session_up_delay 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="post-session-up-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__post_session_up_delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_post_session_up_delay(self):
    self.__post_session_up_delay = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="post-session-up-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  enabled = __builtin__.property(_get_enabled)
  post_session_up_delay = __builtin__.property(_get_post_session_up_delay)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('post_session_up_delay', post_session_up_delay), ])


class yc_igp_ldp_sync_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_mpls_igp_ldp_sync(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/mpls/igp-ldp-sync. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration and operational state relating to synchronisation
between the LDP and IS-IS
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'igp-ldp-sync'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_mpls_igp_ldp_sync_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_mpls_igp_ldp_sync_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'mpls', 'igp-ldp-sync']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/mpls/igp_ldp_sync/config (container)

    YANG Description: This container defines ISIS/IGP configuration.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/mpls/igp_ldp_sync/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: This container defines ISIS/IGP configuration.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_mpls_igp_ldp_sync_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_mpls_igp_ldp_sync_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_mpls_igp_ldp_sync_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/mpls/igp_ldp_sync/state (container)

    YANG Description: This container defines state information for ISIS/LDP Sync.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/mpls/igp_ldp_sync/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: This container defines state information for ISIS/LDP Sync.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_mpls_igp_ldp_sync_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_mpls_igp_ldp_sync_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_mpls_igp_ldp_sync_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_mpls_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_mpls(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/mpls. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration and operational state relating to MPLS-related
features in IS-IS
  """
  __slots__ = ('_path_helper', '_extmethods', '__igp_ldp_sync',)

  _yang_name = 'mpls'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__igp_ldp_sync = YANGDynClass(base=yc_igp_ldp_sync_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_mpls_igp_ldp_sync, is_container='container', yang_name="igp-ldp-sync", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'mpls']

  def _get_igp_ldp_sync(self):
    """
    Getter method for igp_ldp_sync, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/mpls/igp_ldp_sync (container)

    YANG Description: Configuration and operational state relating to synchronisation
between the LDP and IS-IS
    """
    return self.__igp_ldp_sync
      
  def _set_igp_ldp_sync(self, v, load=False):
    """
    Setter method for igp_ldp_sync, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/mpls/igp_ldp_sync (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_igp_ldp_sync is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_igp_ldp_sync() directly.

    YANG Description: Configuration and operational state relating to synchronisation
between the LDP and IS-IS
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_igp_ldp_sync_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_mpls_igp_ldp_sync, is_container='container', yang_name="igp-ldp-sync", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """igp_ldp_sync must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_igp_ldp_sync_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_mpls_igp_ldp_sync, is_container='container', yang_name="igp-ldp-sync", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__igp_ldp_sync = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_igp_ldp_sync(self):
    self.__igp_ldp_sync = YANGDynClass(base=yc_igp_ldp_sync_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_mpls_igp_ldp_sync, is_container='container', yang_name="igp-ldp-sync", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  igp_ldp_sync = __builtin__.property(_get_igp_ldp_sync, _set_igp_ldp_sync)


  _pyangbind_elements = OrderedDict([('igp_ldp_sync', igp_ldp_sync), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_igp_shortcuts_afi_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/igp-shortcuts/afi/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS Shortcuts configuration parameters
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi_name','__nh_type',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__nh_type = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},)), is_leaf=False, yang_name="nh-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'igp-shortcuts', 'afi', 'config']

  def _get_afi_name(self):
    """
    Getter method for afi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/igp_shortcuts/afi/config/afi_name (identityref)

    YANG Description: Address-family type.
    """
    return self.__afi_name
      
  def _set_afi_name(self, v, load=False):
    """
    Setter method for afi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/igp_shortcuts/afi/config/afi_name (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_name() directly.

    YANG Description: Address-family type.
    """
    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': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_name must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__afi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_name(self):
    self.__afi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_nh_type(self):
    """
    Getter method for nh_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/igp_shortcuts/afi/config/nh_type (identityref)

    YANG Description: Tunnel NH Type(RSVP,SR). When present it implies
that nh-type shortcut is enabled for a specified AFI.
    """
    return self.__nh_type
      
  def _set_nh_type(self, v, load=False):
    """
    Setter method for nh_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/igp_shortcuts/afi/config/nh_type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_nh_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_nh_type() directly.

    YANG Description: Tunnel NH Type(RSVP,SR). When present it implies
that nh-type shortcut is enabled for a specified AFI.
    """
    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={'PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},)), is_leaf=False, yang_name="nh-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """nh_type must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},)), is_leaf=False, yang_name="nh-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__nh_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_nh_type(self):
    self.__nh_type = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},)), is_leaf=False, yang_name="nh-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)

  afi_name = __builtin__.property(_get_afi_name, _set_afi_name)
  nh_type = __builtin__.property(_get_nh_type, _set_nh_type)


  _pyangbind_elements = OrderedDict([('afi_name', afi_name), ('nh_type', nh_type), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_igp_shortcuts_afi_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/igp-shortcuts/afi/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS Shortcuts state information
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi_name','__nh_type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__nh_type = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},)), is_leaf=False, yang_name="nh-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'igp-shortcuts', 'afi', 'state']

  def _get_afi_name(self):
    """
    Getter method for afi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/igp_shortcuts/afi/state/afi_name (identityref)

    YANG Description: Address-family type.
    """
    return self.__afi_name
      
  def _set_afi_name(self, v, load=False):
    """
    Setter method for afi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/igp_shortcuts/afi/state/afi_name (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_name() directly.

    YANG Description: Address-family type.
    """
    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': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_name must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__afi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_name(self):
    self.__afi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_nh_type(self):
    """
    Getter method for nh_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/igp_shortcuts/afi/state/nh_type (identityref)

    YANG Description: Tunnel NH Type(RSVP,SR). When present it implies
that nh-type shortcut is enabled for a specified AFI.
    """
    return self.__nh_type
      
  def _set_nh_type(self, v, load=False):
    """
    Setter method for nh_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/igp_shortcuts/afi/state/nh_type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_nh_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_nh_type() directly.

    YANG Description: Tunnel NH Type(RSVP,SR). When present it implies
that nh-type shortcut is enabled for a specified AFI.
    """
    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={'PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},)), is_leaf=False, yang_name="nh-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """nh_type must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},)), is_leaf=False, yang_name="nh-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__nh_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_nh_type(self):
    self.__nh_type = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},)), is_leaf=False, yang_name="nh-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  afi_name = __builtin__.property(_get_afi_name)
  nh_type = __builtin__.property(_get_nh_type)


  _pyangbind_elements = OrderedDict([('afi_name', afi_name), ('nh_type', nh_type), ])


class yc_afi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_igp_shortcuts_afi(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/igp-shortcuts/afi. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Address-family list.
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi_name','__config','__state',)

  _yang_name = 'afi'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_igp_shortcuts_afi_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_igp_shortcuts_afi_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'igp-shortcuts', 'afi']

  def _get_afi_name(self):
    """
    Getter method for afi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/igp_shortcuts/afi/afi_name (leafref)

    YANG Description: Reference to address-family type.
    """
    return self.__afi_name
      
  def _set_afi_name(self, v, load=False):
    """
    Setter method for afi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/igp_shortcuts/afi/afi_name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_name() directly.

    YANG Description: Reference to address-family type.
    """
    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="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__afi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_name(self):
    self.__afi_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/igp_shortcuts/afi/config (container)

    YANG Description: This container defines ISIS Shortcuts configuration parameters
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/igp_shortcuts/afi/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: This container defines ISIS Shortcuts configuration parameters
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_igp_shortcuts_afi_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_igp_shortcuts_afi_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_igp_shortcuts_afi_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/igp_shortcuts/afi/state (container)

    YANG Description: This container defines ISIS Shortcuts state information
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/igp_shortcuts/afi/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: This container defines ISIS Shortcuts state information
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_igp_shortcuts_afi_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_igp_shortcuts_afi_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_igp_shortcuts_afi_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  afi_name = __builtin__.property(_get_afi_name, _set_afi_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('afi_name', afi_name), ('config', config), ('state', state), ])


class yc_igp_shortcuts_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_igp_shortcuts(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/igp-shortcuts. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines IGP shortcuts configuration and state
information.
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi',)

  _yang_name = 'igp-shortcuts'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi = YANGDynClass(base=YANGListType("afi_name",yc_afi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_igp_shortcuts_afi, yang_name="afi", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-name', extensions=None), is_container='list', yang_name="afi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'igp-shortcuts']

  def _get_afi(self):
    """
    Getter method for afi, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/igp_shortcuts/afi (list)

    YANG Description: Address-family list.
    """
    return self.__afi
      
  def _set_afi(self, v, load=False):
    """
    Setter method for afi, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/igp_shortcuts/afi (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi() directly.

    YANG Description: Address-family list.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("afi_name",yc_afi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_igp_shortcuts_afi, yang_name="afi", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-name', extensions=None), is_container='list', yang_name="afi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("afi_name",yc_afi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_igp_shortcuts_afi, yang_name="afi", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-name', extensions=None), is_container='list', yang_name="afi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__afi = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi(self):
    self.__afi = YANGDynClass(base=YANGListType("afi_name",yc_afi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_igp_shortcuts_afi, yang_name="afi", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-name', extensions=None), is_container='list', yang_name="afi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  afi = __builtin__.property(_get_afi, _set_afi)


  _pyangbind_elements = OrderedDict([('afi', afi), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_afi_safi_af_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/afi-safi/af/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines AFI-SAFI configuration parameters
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi_name','__safi_name','__metric','__enabled',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__safi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(10), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'afi-safi', 'af', 'config']

  def _get_afi_name(self):
    """
    Getter method for afi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af/config/afi_name (identityref)

    YANG Description: Address-family type.
    """
    return self.__afi_name
      
  def _set_afi_name(self, v, load=False):
    """
    Setter method for afi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af/config/afi_name (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_name() directly.

    YANG Description: Address-family type.
    """
    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': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_name must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__afi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_name(self):
    self.__afi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_safi_name(self):
    """
    Getter method for safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af/config/safi_name (identityref)

    YANG Description: Subsequent address-family type.
    """
    return self.__safi_name
      
  def _set_safi_name(self, v, load=False):
    """
    Setter method for safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af/config/safi_name (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_safi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_safi_name() directly.

    YANG Description: Subsequent address-family type.
    """
    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={'UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """safi_name must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__safi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_safi_name(self):
    self.__safi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af/config/metric (uint32)

    YANG Description: ISIS metric value(default=10).
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af/config/metric (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: ISIS metric value(default=10).
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(10), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric 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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(10), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(10), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af/config/enabled (boolean)

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  afi_name = __builtin__.property(_get_afi_name, _set_afi_name)
  safi_name = __builtin__.property(_get_safi_name, _set_safi_name)
  metric = __builtin__.property(_get_metric, _set_metric)
  enabled = __builtin__.property(_get_enabled, _set_enabled)


  _pyangbind_elements = OrderedDict([('afi_name', afi_name), ('safi_name', safi_name), ('metric', metric), ('enabled', enabled), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_afi_safi_af_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/afi-safi/af/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines AFI-SAFI State information
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi_name','__safi_name','__metric','__enabled',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__safi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(10), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'afi-safi', 'af', 'state']

  def _get_afi_name(self):
    """
    Getter method for afi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af/state/afi_name (identityref)

    YANG Description: Address-family type.
    """
    return self.__afi_name
      
  def _set_afi_name(self, v, load=False):
    """
    Setter method for afi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af/state/afi_name (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_name() directly.

    YANG Description: Address-family type.
    """
    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': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_name must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__afi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_name(self):
    self.__afi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_safi_name(self):
    """
    Getter method for safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af/state/safi_name (identityref)

    YANG Description: Subsequent address-family type.
    """
    return self.__safi_name
      
  def _set_safi_name(self, v, load=False):
    """
    Setter method for safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af/state/safi_name (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_safi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_safi_name() directly.

    YANG Description: Subsequent address-family type.
    """
    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={'UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """safi_name must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__safi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_safi_name(self):
    self.__safi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af/state/metric (uint32)

    YANG Description: ISIS metric value(default=10).
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af/state/metric (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: ISIS metric value(default=10).
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(10), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric 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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(10), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(10), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af/state/enabled (boolean)

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  afi_name = __builtin__.property(_get_afi_name)
  safi_name = __builtin__.property(_get_safi_name)
  metric = __builtin__.property(_get_metric)
  enabled = __builtin__.property(_get_enabled)


  _pyangbind_elements = OrderedDict([('afi_name', afi_name), ('safi_name', safi_name), ('metric', metric), ('enabled', enabled), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_afi_safi_af_multi_topology_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/afi-safi/af/multi-topology/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines AFI-SAFI multi-topology configuration
parameters
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi_name','__safi_name',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__safi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'afi-safi', 'af', 'multi-topology', 'config']

  def _get_afi_name(self):
    """
    Getter method for afi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af/multi_topology/config/afi_name (identityref)

    YANG Description: Address-family type.
    """
    return self.__afi_name
      
  def _set_afi_name(self, v, load=False):
    """
    Setter method for afi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af/multi_topology/config/afi_name (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_name() directly.

    YANG Description: Address-family type.
    """
    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': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_name must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__afi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_name(self):
    self.__afi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_safi_name(self):
    """
    Getter method for safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af/multi_topology/config/safi_name (identityref)

    YANG Description: Subsequent address-family type.
    """
    return self.__safi_name
      
  def _set_safi_name(self, v, load=False):
    """
    Setter method for safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af/multi_topology/config/safi_name (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_safi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_safi_name() directly.

    YANG Description: Subsequent address-family type.
    """
    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={'UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """safi_name must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__safi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_safi_name(self):
    self.__safi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)

  afi_name = __builtin__.property(_get_afi_name, _set_afi_name)
  safi_name = __builtin__.property(_get_safi_name, _set_safi_name)


  _pyangbind_elements = OrderedDict([('afi_name', afi_name), ('safi_name', safi_name), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_afi_safi_af_multi_topology_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/afi-safi/af/multi-topology/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines AFI-SAFI multi-topology state information
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi_name','__safi_name','__enabled',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__safi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'afi-safi', 'af', 'multi-topology', 'state']

  def _get_afi_name(self):
    """
    Getter method for afi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af/multi_topology/state/afi_name (identityref)

    YANG Description: Address-family type.
    """
    return self.__afi_name
      
  def _set_afi_name(self, v, load=False):
    """
    Setter method for afi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af/multi_topology/state/afi_name (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_name() directly.

    YANG Description: Address-family type.
    """
    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': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_name must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__afi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_name(self):
    self.__afi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_safi_name(self):
    """
    Getter method for safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af/multi_topology/state/safi_name (identityref)

    YANG Description: Subsequent address-family type.
    """
    return self.__safi_name
      
  def _set_safi_name(self, v, load=False):
    """
    Setter method for safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af/multi_topology/state/safi_name (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_safi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_safi_name() directly.

    YANG Description: Subsequent address-family type.
    """
    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={'UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """safi_name must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__safi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_safi_name(self):
    self.__safi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af/multi_topology/state/enabled (boolean)

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af/multi_topology/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  afi_name = __builtin__.property(_get_afi_name)
  safi_name = __builtin__.property(_get_safi_name)
  enabled = __builtin__.property(_get_enabled)


  _pyangbind_elements = OrderedDict([('afi_name', afi_name), ('safi_name', safi_name), ('enabled', enabled), ])


class yc_multi_topology_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_afi_safi_af_multi_topology(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/afi-safi/af/multi-topology. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines multi-topology address-family configuration
and state information. ISIS TLV 235, 237.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'multi-topology'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_afi_safi_af_multi_topology_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_afi_safi_af_multi_topology_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'afi-safi', 'af', 'multi-topology']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af/multi_topology/config (container)

    YANG Description: This container defines AFI-SAFI multi-topology configuration
parameters
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af/multi_topology/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: This container defines AFI-SAFI multi-topology configuration
parameters
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_afi_safi_af_multi_topology_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_afi_safi_af_multi_topology_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_afi_safi_af_multi_topology_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af/multi_topology/state (container)

    YANG Description: This container defines AFI-SAFI multi-topology state information
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af/multi_topology/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: This container defines AFI-SAFI multi-topology state information
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_afi_safi_af_multi_topology_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_afi_safi_af_multi_topology_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_afi_safi_af_multi_topology_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_af_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_afi_safi_af(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/afi-safi/af. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Address-family/Subsequent Address-family list.
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi_name','__safi_name','__config','__state','__multi_topology',)

  _yang_name = 'af'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__safi_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_afi_safi_af_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_afi_safi_af_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__multi_topology = YANGDynClass(base=yc_multi_topology_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_afi_safi_af_multi_topology, is_container='container', yang_name="multi-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'afi-safi', 'af']

  def _get_afi_name(self):
    """
    Getter method for afi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af/afi_name (leafref)

    YANG Description: Reference to address-family type
    """
    return self.__afi_name
      
  def _set_afi_name(self, v, load=False):
    """
    Setter method for afi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af/afi_name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_name() directly.

    YANG Description: Reference to address-family type
    """
    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="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__afi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_name(self):
    self.__afi_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_safi_name(self):
    """
    Getter method for safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af/safi_name (leafref)

    YANG Description: Reference to subsequent address-family type
    """
    return self.__safi_name
      
  def _set_safi_name(self, v, load=False):
    """
    Setter method for safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af/safi_name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_safi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_safi_name() directly.

    YANG Description: Reference to subsequent address-family type
    """
    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="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """safi_name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__safi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_safi_name(self):
    self.__safi_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af/config (container)

    YANG Description: This container defines AFI-SAFI configuration parameters
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af/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: This container defines AFI-SAFI configuration parameters
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_afi_safi_af_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_afi_safi_af_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_afi_safi_af_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af/state (container)

    YANG Description: This container defines AFI-SAFI State information
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af/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: This container defines AFI-SAFI State information
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_afi_safi_af_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_afi_safi_af_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_afi_safi_af_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_multi_topology(self):
    """
    Getter method for multi_topology, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af/multi_topology (container)

    YANG Description: This container defines multi-topology address-family configuration
and state information. ISIS TLV 235, 237.
    """
    return self.__multi_topology
      
  def _set_multi_topology(self, v, load=False):
    """
    Setter method for multi_topology, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af/multi_topology (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multi_topology is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multi_topology() directly.

    YANG Description: This container defines multi-topology address-family configuration
and state information. ISIS TLV 235, 237.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_multi_topology_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_afi_safi_af_multi_topology, is_container='container', yang_name="multi-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multi_topology must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_multi_topology_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_afi_safi_af_multi_topology, is_container='container', yang_name="multi-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__multi_topology = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multi_topology(self):
    self.__multi_topology = YANGDynClass(base=yc_multi_topology_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_afi_safi_af_multi_topology, is_container='container', yang_name="multi-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  afi_name = __builtin__.property(_get_afi_name, _set_afi_name)
  safi_name = __builtin__.property(_get_safi_name, _set_safi_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  multi_topology = __builtin__.property(_get_multi_topology, _set_multi_topology)


  _pyangbind_elements = OrderedDict([('afi_name', afi_name), ('safi_name', safi_name), ('config', config), ('state', state), ('multi_topology', multi_topology), ])


class yc_afi_safi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_afi_safi(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/afi-safi. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines address-family specific configuration
and state information.
  """
  __slots__ = ('_path_helper', '_extmethods', '__af',)

  _yang_name = 'afi-safi'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__af = YANGDynClass(base=YANGListType("afi_name safi_name",yc_af_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_afi_safi_af, yang_name="af", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-name safi-name', extensions=None), is_container='list', yang_name="af", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'afi-safi']

  def _get_af(self):
    """
    Getter method for af, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af (list)

    YANG Description: Address-family/Subsequent Address-family list.
    """
    return self.__af
      
  def _set_af(self, v, load=False):
    """
    Setter method for af, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi/af (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_af is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_af() directly.

    YANG Description: Address-family/Subsequent Address-family list.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("afi_name safi_name",yc_af_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_afi_safi_af, yang_name="af", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-name safi-name', extensions=None), is_container='list', yang_name="af", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """af must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("afi_name safi_name",yc_af_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_afi_safi_af, yang_name="af", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-name safi-name', extensions=None), is_container='list', yang_name="af", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__af = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_af(self):
    self.__af = YANGDynClass(base=YANGListType("afi_name safi_name",yc_af_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_afi_safi_af, yang_name="af", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-name safi-name', extensions=None), is_container='list', yang_name="af", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  af = __builtin__.property(_get_af, _set_af)


  _pyangbind_elements = OrderedDict([('af', af), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_segment_routing_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/segment-routing/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 configuration of segment
routing for the IGP instance.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__srgb','__srlb',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__srgb = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="srgb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__srlb = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="srlb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'segment-routing', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/segment_routing/config/enabled (boolean)

    YANG Description: When this leaf is set to true, the segment routing extensions are
utilised within the IGP.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/segment_routing/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When this leaf is set to true, the segment routing extensions are
utilised within the IGP.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_srgb(self):
    """
    Getter method for srgb, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/segment_routing/config/srgb (leafref)

    YANG Description: A reference to the Segment Routing Global Block (SRGB) that is
to be used by this IGP instance.
    """
    return self.__srgb
      
  def _set_srgb(self, v, load=False):
    """
    Setter method for srgb, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/segment_routing/config/srgb (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_srgb is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_srgb() directly.

    YANG Description: A reference to the Segment Routing Global Block (SRGB) that is
to be used by this IGP instance.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="srgb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """srgb must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="srgb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__srgb = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_srgb(self):
    self.__srgb = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="srgb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_srlb(self):
    """
    Getter method for srlb, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/segment_routing/config/srlb (leafref)

    YANG Description: A reference to the Segment Routing Local Block (SRLB) that is to
be advertised by the IGP instance.
    """
    return self.__srlb
      
  def _set_srlb(self, v, load=False):
    """
    Setter method for srlb, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/segment_routing/config/srlb (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_srlb is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_srlb() directly.

    YANG Description: A reference to the Segment Routing Local Block (SRLB) that is to
be advertised by the IGP instance.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="srlb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """srlb must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="srlb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__srlb = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_srlb(self):
    self.__srlb = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="srlb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)
  srgb = __builtin__.property(_get_srgb, _set_srgb)
  srlb = __builtin__.property(_get_srlb, _set_srlb)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('srgb', srgb), ('srlb', srlb), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_segment_routing_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/segment-routing/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 segment routing for the
IGP instance.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__srgb','__srlb',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__srgb = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="srgb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__srlb = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="srlb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'segment-routing', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/segment_routing/state/enabled (boolean)

    YANG Description: When this leaf is set to true, the segment routing extensions are
utilised within the IGP.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/segment_routing/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When this leaf is set to true, the segment routing extensions are
utilised within the IGP.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_srgb(self):
    """
    Getter method for srgb, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/segment_routing/state/srgb (leafref)

    YANG Description: A reference to the Segment Routing Global Block (SRGB) that is
to be used by this IGP instance.
    """
    return self.__srgb
      
  def _set_srgb(self, v, load=False):
    """
    Setter method for srgb, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/segment_routing/state/srgb (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_srgb is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_srgb() directly.

    YANG Description: A reference to the Segment Routing Global Block (SRGB) that is
to be used by this IGP instance.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="srgb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """srgb must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="srgb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__srgb = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_srgb(self):
    self.__srgb = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="srgb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_srlb(self):
    """
    Getter method for srlb, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/segment_routing/state/srlb (leafref)

    YANG Description: A reference to the Segment Routing Local Block (SRLB) that is to
be advertised by the IGP instance.
    """
    return self.__srlb
      
  def _set_srlb(self, v, load=False):
    """
    Setter method for srlb, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/segment_routing/state/srlb (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_srlb is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_srlb() directly.

    YANG Description: A reference to the Segment Routing Local Block (SRLB) that is to
be advertised by the IGP instance.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="srlb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """srlb must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="srlb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__srlb = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_srlb(self):
    self.__srlb = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="srlb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)

  enabled = __builtin__.property(_get_enabled)
  srgb = __builtin__.property(_get_srgb)
  srlb = __builtin__.property(_get_srlb)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('srgb', srgb), ('srlb', srlb), ])


class yc_segment_routing_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_segment_routing(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/segment-routing. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration and operational state relating to segment routing.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'segment-routing'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_segment_routing_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_segment_routing_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'segment-routing']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/segment_routing/config (container)

    YANG Description: Configuration parameters relating to the configuration of segment
routing for the IGP instance.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/segment_routing/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 configuration of segment
routing for the IGP instance.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_segment_routing_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_segment_routing_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_segment_routing_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/segment_routing/state (container)

    YANG Description: Operational state parameters relating to segment routing for the
IGP instance.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/segment_routing/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 segment routing for the
IGP instance.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_segment_routing_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_segment_routing_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_segment_routing_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_inter_level_propagation_policies_level1_to_level2_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/inter-level-propagation-policies/level1-to-level2/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 propagation
of prefixes from IS-IS Level 1 to Level 2.
  """
  __slots__ = ('_path_helper', '_extmethods', '__import_policy','__default_import_policy',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'inter-level-propagation-policies', 'level1-to-level2', 'config']

  def _get_import_policy(self):
    """
    Getter method for import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/inter_level_propagation_policies/level1_to_level2/config/import_policy (leafref)

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    return self.__import_policy
      
  def _set_import_policy(self, v, load=False):
    """
    Setter method for import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/inter_level_propagation_policies/level1_to_level2/config/import_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_import_policy() directly.

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """import_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__import_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_import_policy(self):
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_default_import_policy(self):
    """
    Getter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/inter_level_propagation_policies/level1_to_level2/config/default_import_policy (default-policy-type)

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    return self.__default_import_policy
      
  def _set_default_import_policy(self, v, load=False):
    """
    Setter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/inter_level_propagation_policies/level1_to_level2/config/default_import_policy (default-policy-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_default_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_default_import_policy() directly.

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    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={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """default_import_policy must be of a type compatible with default-policy-type""",
          'defined-type': "openconfig-network-instance:default-policy-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)""",
        })

    self.__default_import_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_default_import_policy(self):
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)

  import_policy = __builtin__.property(_get_import_policy, _set_import_policy)
  default_import_policy = __builtin__.property(_get_default_import_policy, _set_default_import_policy)


  _pyangbind_elements = OrderedDict([('import_policy', import_policy), ('default_import_policy', default_import_policy), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_inter_level_propagation_policies_level1_to_level2_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/inter-level-propagation-policies/level1-to-level2/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
propagation of prefixes from IS-IS Level 1 to Level 2.
  """
  __slots__ = ('_path_helper', '_extmethods', '__import_policy','__default_import_policy',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'inter-level-propagation-policies', 'level1-to-level2', 'state']

  def _get_import_policy(self):
    """
    Getter method for import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/inter_level_propagation_policies/level1_to_level2/state/import_policy (leafref)

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    return self.__import_policy
      
  def _set_import_policy(self, v, load=False):
    """
    Setter method for import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/inter_level_propagation_policies/level1_to_level2/state/import_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_import_policy() directly.

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """import_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__import_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_import_policy(self):
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_default_import_policy(self):
    """
    Getter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/inter_level_propagation_policies/level1_to_level2/state/default_import_policy (default-policy-type)

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    return self.__default_import_policy
      
  def _set_default_import_policy(self, v, load=False):
    """
    Setter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/inter_level_propagation_policies/level1_to_level2/state/default_import_policy (default-policy-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_default_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_default_import_policy() directly.

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    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={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """default_import_policy must be of a type compatible with default-policy-type""",
          'defined-type': "openconfig-network-instance:default-policy-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)""",
        })

    self.__default_import_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_default_import_policy(self):
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)

  import_policy = __builtin__.property(_get_import_policy)
  default_import_policy = __builtin__.property(_get_default_import_policy)


  _pyangbind_elements = OrderedDict([('import_policy', import_policy), ('default_import_policy', default_import_policy), ])


class yc_level1_to_level2_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_inter_level_propagation_policies_level1_to_level2(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/inter-level-propagation-policies/level1-to-level2. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Policies relating to prefixes to be propagated from
Level 1 to Level 2.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'level1-to-level2'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_inter_level_propagation_policies_level1_to_level2_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_inter_level_propagation_policies_level1_to_level2_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'inter-level-propagation-policies', 'level1-to-level2']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/inter_level_propagation_policies/level1_to_level2/config (container)

    YANG Description: Configuration parameters relating to the propagation
of prefixes from IS-IS Level 1 to Level 2.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/inter_level_propagation_policies/level1_to_level2/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 propagation
of prefixes from IS-IS Level 1 to Level 2.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_inter_level_propagation_policies_level1_to_level2_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_inter_level_propagation_policies_level1_to_level2_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_inter_level_propagation_policies_level1_to_level2_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/inter_level_propagation_policies/level1_to_level2/state (container)

    YANG Description: Operational state parameters relating to the
propagation of prefixes from IS-IS Level 1 to Level 2.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/inter_level_propagation_policies/level1_to_level2/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
propagation of prefixes from IS-IS Level 1 to Level 2.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_inter_level_propagation_policies_level1_to_level2_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_inter_level_propagation_policies_level1_to_level2_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_inter_level_propagation_policies_level1_to_level2_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_inter_level_propagation_policies_level2_to_level1_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/inter-level-propagation-policies/level2-to-level1/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 propagation
of prefixes from IS-IS Level 2 to Level 1.
  """
  __slots__ = ('_path_helper', '_extmethods', '__import_policy','__default_import_policy',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'inter-level-propagation-policies', 'level2-to-level1', 'config']

  def _get_import_policy(self):
    """
    Getter method for import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/inter_level_propagation_policies/level2_to_level1/config/import_policy (leafref)

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    return self.__import_policy
      
  def _set_import_policy(self, v, load=False):
    """
    Setter method for import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/inter_level_propagation_policies/level2_to_level1/config/import_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_import_policy() directly.

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """import_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__import_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_import_policy(self):
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_default_import_policy(self):
    """
    Getter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/inter_level_propagation_policies/level2_to_level1/config/default_import_policy (default-policy-type)

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    return self.__default_import_policy
      
  def _set_default_import_policy(self, v, load=False):
    """
    Setter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/inter_level_propagation_policies/level2_to_level1/config/default_import_policy (default-policy-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_default_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_default_import_policy() directly.

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    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={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """default_import_policy must be of a type compatible with default-policy-type""",
          'defined-type': "openconfig-network-instance:default-policy-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)""",
        })

    self.__default_import_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_default_import_policy(self):
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)

  import_policy = __builtin__.property(_get_import_policy, _set_import_policy)
  default_import_policy = __builtin__.property(_get_default_import_policy, _set_default_import_policy)


  _pyangbind_elements = OrderedDict([('import_policy', import_policy), ('default_import_policy', default_import_policy), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_inter_level_propagation_policies_level2_to_level1_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/inter-level-propagation-policies/level2-to-level1/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 propagation
of prefixes from IS-IS Level 2 to Level 1.
  """
  __slots__ = ('_path_helper', '_extmethods', '__import_policy','__default_import_policy',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'inter-level-propagation-policies', 'level2-to-level1', 'state']

  def _get_import_policy(self):
    """
    Getter method for import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/inter_level_propagation_policies/level2_to_level1/state/import_policy (leafref)

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    return self.__import_policy
      
  def _set_import_policy(self, v, load=False):
    """
    Setter method for import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/inter_level_propagation_policies/level2_to_level1/state/import_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_import_policy() directly.

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """import_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__import_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_import_policy(self):
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_default_import_policy(self):
    """
    Getter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/inter_level_propagation_policies/level2_to_level1/state/default_import_policy (default-policy-type)

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    return self.__default_import_policy
      
  def _set_default_import_policy(self, v, load=False):
    """
    Setter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/inter_level_propagation_policies/level2_to_level1/state/default_import_policy (default-policy-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_default_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_default_import_policy() directly.

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    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={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """default_import_policy must be of a type compatible with default-policy-type""",
          'defined-type': "openconfig-network-instance:default-policy-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)""",
        })

    self.__default_import_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_default_import_policy(self):
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)

  import_policy = __builtin__.property(_get_import_policy)
  default_import_policy = __builtin__.property(_get_default_import_policy)


  _pyangbind_elements = OrderedDict([('import_policy', import_policy), ('default_import_policy', default_import_policy), ])


class yc_level2_to_level1_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_inter_level_propagation_policies_level2_to_level1(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/inter-level-propagation-policies/level2-to-level1. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Policies relating to prefixes to be propagated from
Level2 to Level 1.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'level2-to-level1'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_inter_level_propagation_policies_level2_to_level1_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_inter_level_propagation_policies_level2_to_level1_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'inter-level-propagation-policies', 'level2-to-level1']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/inter_level_propagation_policies/level2_to_level1/config (container)

    YANG Description: Configuration parameters relating to the propagation
of prefixes from IS-IS Level 2 to Level 1.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/inter_level_propagation_policies/level2_to_level1/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 propagation
of prefixes from IS-IS Level 2 to Level 1.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_inter_level_propagation_policies_level2_to_level1_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_inter_level_propagation_policies_level2_to_level1_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_inter_level_propagation_policies_level2_to_level1_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/inter_level_propagation_policies/level2_to_level1/state (container)

    YANG Description: Operational state parameters relating to the propagation
of prefixes from IS-IS Level 2 to Level 1.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/inter_level_propagation_policies/level2_to_level1/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 propagation
of prefixes from IS-IS Level 2 to Level 1.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_inter_level_propagation_policies_level2_to_level1_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_inter_level_propagation_policies_level2_to_level1_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_inter_level_propagation_policies_level2_to_level1_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_inter_level_propagation_policies_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_inter_level_propagation_policies(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global/inter-level-propagation-policies. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Policies to propagate prefixes between IS-IS levels.
  """
  __slots__ = ('_path_helper', '_extmethods', '__level1_to_level2','__level2_to_level1',)

  _yang_name = 'inter-level-propagation-policies'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__level1_to_level2 = YANGDynClass(base=yc_level1_to_level2_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_inter_level_propagation_policies_level1_to_level2, is_container='container', yang_name="level1-to-level2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__level2_to_level1 = YANGDynClass(base=yc_level2_to_level1_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_inter_level_propagation_policies_level2_to_level1, is_container='container', yang_name="level2-to-level1", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global', 'inter-level-propagation-policies']

  def _get_level1_to_level2(self):
    """
    Getter method for level1_to_level2, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/inter_level_propagation_policies/level1_to_level2 (container)

    YANG Description: Policies relating to prefixes to be propagated from
Level 1 to Level 2.
    """
    return self.__level1_to_level2
      
  def _set_level1_to_level2(self, v, load=False):
    """
    Setter method for level1_to_level2, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/inter_level_propagation_policies/level1_to_level2 (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_level1_to_level2 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_level1_to_level2() directly.

    YANG Description: Policies relating to prefixes to be propagated from
Level 1 to Level 2.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_level1_to_level2_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_inter_level_propagation_policies_level1_to_level2, is_container='container', yang_name="level1-to-level2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """level1_to_level2 must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_level1_to_level2_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_inter_level_propagation_policies_level1_to_level2, is_container='container', yang_name="level1-to-level2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__level1_to_level2 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_level1_to_level2(self):
    self.__level1_to_level2 = YANGDynClass(base=yc_level1_to_level2_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_inter_level_propagation_policies_level1_to_level2, is_container='container', yang_name="level1-to-level2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_level2_to_level1(self):
    """
    Getter method for level2_to_level1, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/inter_level_propagation_policies/level2_to_level1 (container)

    YANG Description: Policies relating to prefixes to be propagated from
Level2 to Level 1.
    """
    return self.__level2_to_level1
      
  def _set_level2_to_level1(self, v, load=False):
    """
    Setter method for level2_to_level1, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/inter_level_propagation_policies/level2_to_level1 (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_level2_to_level1 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_level2_to_level1() directly.

    YANG Description: Policies relating to prefixes to be propagated from
Level2 to Level 1.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_level2_to_level1_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_inter_level_propagation_policies_level2_to_level1, is_container='container', yang_name="level2-to-level1", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """level2_to_level1 must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_level2_to_level1_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_inter_level_propagation_policies_level2_to_level1, is_container='container', yang_name="level2-to-level1", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__level2_to_level1 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_level2_to_level1(self):
    self.__level2_to_level1 = YANGDynClass(base=yc_level2_to_level1_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_inter_level_propagation_policies_level2_to_level1, is_container='container', yang_name="level2-to-level1", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  level1_to_level2 = __builtin__.property(_get_level1_to_level2, _set_level1_to_level2)
  level2_to_level1 = __builtin__.property(_get_level2_to_level1, _set_level2_to_level1)


  _pyangbind_elements = OrderedDict([('level1_to_level2', level1_to_level2), ('level2_to_level1', level2_to_level1), ])


class yc_global__openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/global. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines global ISIS configuration and state
information.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__lsp_bit','__reference_bandwidth','__nsr','__graceful_restart','__timers','__transport','__mpls','__igp_shortcuts','__afi_safi','__segment_routing','__inter_level_propagation_policies',)

  _yang_name = 'global'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__lsp_bit = YANGDynClass(base=yc_lsp_bit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit, is_container='container', yang_name="lsp-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__reference_bandwidth = YANGDynClass(base=yc_reference_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_reference_bandwidth, is_container='container', yang_name="reference-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__nsr = YANGDynClass(base=yc_nsr_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_nsr, is_container='container', yang_name="nsr", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__graceful_restart = YANGDynClass(base=yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__timers = YANGDynClass(base=yc_timers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers, is_container='container', yang_name="timers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__transport = YANGDynClass(base=yc_transport_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__mpls = YANGDynClass(base=yc_mpls_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__igp_shortcuts = YANGDynClass(base=yc_igp_shortcuts_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_igp_shortcuts, is_container='container', yang_name="igp-shortcuts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__afi_safi = YANGDynClass(base=yc_afi_safi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_afi_safi, is_container='container', yang_name="afi-safi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__segment_routing = YANGDynClass(base=yc_segment_routing_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_segment_routing, is_container='container', yang_name="segment-routing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__inter_level_propagation_policies = YANGDynClass(base=yc_inter_level_propagation_policies_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_inter_level_propagation_policies, is_container='container', yang_name="inter-level-propagation-policies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'global']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/config (container)

    YANG Description: This container defines ISIS global configuration router.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/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: This container defines ISIS global configuration router.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/state (container)

    YANG Description: This container defines state for ISIS global router.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/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: This container defines state for ISIS global router.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_lsp_bit(self):
    """
    Getter method for lsp_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit (container)

    YANG Description: This container defines ISIS LSP Operational Bits.
    """
    return self.__lsp_bit
      
  def _set_lsp_bit(self, v, load=False):
    """
    Setter method for lsp_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/lsp_bit (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsp_bit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsp_bit() directly.

    YANG Description: This container defines ISIS LSP Operational Bits.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_lsp_bit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit, is_container='container', yang_name="lsp-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsp_bit must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_lsp_bit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit, is_container='container', yang_name="lsp-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__lsp_bit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsp_bit(self):
    self.__lsp_bit = YANGDynClass(base=yc_lsp_bit_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_lsp_bit, is_container='container', yang_name="lsp-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_reference_bandwidth(self):
    """
    Getter method for reference_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/reference_bandwidth (container)

    YANG Description: This container defines ISIS Reference Bandwidth.
    """
    return self.__reference_bandwidth
      
  def _set_reference_bandwidth(self, v, load=False):
    """
    Setter method for reference_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/reference_bandwidth (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_reference_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_reference_bandwidth() directly.

    YANG Description: This container defines ISIS Reference Bandwidth.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_reference_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_reference_bandwidth, is_container='container', yang_name="reference-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """reference_bandwidth must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_reference_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_reference_bandwidth, is_container='container', yang_name="reference-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__reference_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_reference_bandwidth(self):
    self.__reference_bandwidth = YANGDynClass(base=yc_reference_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_reference_bandwidth, is_container='container', yang_name="reference-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_nsr(self):
    """
    Getter method for nsr, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/nsr (container)

    YANG Description: This container defines ISIS Non-Stop Routing.
    """
    return self.__nsr
      
  def _set_nsr(self, v, load=False):
    """
    Setter method for nsr, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/nsr (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_nsr is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_nsr() directly.

    YANG Description: This container defines ISIS Non-Stop Routing.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_nsr_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_nsr, is_container='container', yang_name="nsr", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """nsr must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_nsr_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_nsr, is_container='container', yang_name="nsr", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__nsr = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_nsr(self):
    self.__nsr = YANGDynClass(base=yc_nsr_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_nsr, is_container='container', yang_name="nsr", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_graceful_restart(self):
    """
    Getter method for graceful_restart, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/graceful_restart (container)

    YANG Description: This container defines ISIS Graceful Restart.
    """
    return self.__graceful_restart
      
  def _set_graceful_restart(self, v, load=False):
    """
    Setter method for graceful_restart, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/graceful_restart (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_graceful_restart is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_graceful_restart() directly.

    YANG Description: This container defines ISIS Graceful Restart.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """graceful_restart must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__graceful_restart = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_graceful_restart(self):
    self.__graceful_restart = YANGDynClass(base=yc_graceful_restart_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_timers(self):
    """
    Getter method for timers, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers (container)

    YANG Description: This container defines ISIS timers.
    """
    return self.__timers
      
  def _set_timers(self, v, load=False):
    """
    Setter method for timers, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/timers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_timers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_timers() directly.

    YANG Description: This container defines ISIS timers.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_timers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers, is_container='container', yang_name="timers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """timers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_timers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers, is_container='container', yang_name="timers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__timers = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_timers(self):
    self.__timers = YANGDynClass(base=yc_timers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_timers, is_container='container', yang_name="timers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_transport(self):
    """
    Getter method for transport, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/transport (container)

    YANG Description: This container defines ISIS transport.
    """
    return self.__transport
      
  def _set_transport(self, v, load=False):
    """
    Setter method for transport, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/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: This container defines ISIS transport.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_transport_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_mpls(self):
    """
    Getter method for mpls, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/mpls (container)

    YANG Description: Configuration and operational state relating to MPLS-related
features in IS-IS
    """
    return self.__mpls
      
  def _set_mpls(self, v, load=False):
    """
    Setter method for mpls, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/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: Configuration and operational state relating to MPLS-related
features in IS-IS
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_mpls_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_global_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_igp_shortcuts(self):
    """
    Getter method for igp_shortcuts, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/igp_shortcuts (container)

    YANG Description: This container defines IGP shortcuts configuration and state
information.
    """
    return self.__igp_shortcuts
      
  def _set_igp_shortcuts(self, v, load=False):
    """
    Setter method for igp_shortcuts, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/igp_shortcuts (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_igp_shortcuts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_igp_shortcuts() directly.

    YANG Description: This container defines IGP shortcuts configuration and state
information.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_igp_shortcuts_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_igp_shortcuts, is_container='container', yang_name="igp-shortcuts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """igp_shortcuts must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_igp_shortcuts_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_igp_shortcuts, is_container='container', yang_name="igp-shortcuts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__igp_shortcuts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_igp_shortcuts(self):
    self.__igp_shortcuts = YANGDynClass(base=yc_igp_shortcuts_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_igp_shortcuts, is_container='container', yang_name="igp-shortcuts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_afi_safi(self):
    """
    Getter method for afi_safi, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi (container)

    YANG Description: This container defines address-family specific configuration
and state information.
    """
    return self.__afi_safi
      
  def _set_afi_safi(self, v, load=False):
    """
    Setter method for afi_safi, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/afi_safi (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_safi is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_safi() directly.

    YANG Description: This container defines address-family specific configuration
and state information.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_afi_safi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_afi_safi, is_container='container', yang_name="afi-safi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_safi must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_afi_safi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_afi_safi, is_container='container', yang_name="afi-safi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__afi_safi = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_safi(self):
    self.__afi_safi = YANGDynClass(base=yc_afi_safi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_afi_safi, is_container='container', yang_name="afi-safi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_segment_routing(self):
    """
    Getter method for segment_routing, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/segment_routing (container)

    YANG Description: Configuration and operational state relating to segment routing.
    """
    return self.__segment_routing
      
  def _set_segment_routing(self, v, load=False):
    """
    Setter method for segment_routing, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/segment_routing (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_segment_routing is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_segment_routing() directly.

    YANG Description: Configuration and operational state relating to segment routing.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_segment_routing_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_segment_routing, is_container='container', yang_name="segment-routing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """segment_routing must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_segment_routing_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_segment_routing, is_container='container', yang_name="segment-routing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__segment_routing = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_segment_routing(self):
    self.__segment_routing = YANGDynClass(base=yc_segment_routing_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_segment_routing, is_container='container', yang_name="segment-routing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_inter_level_propagation_policies(self):
    """
    Getter method for inter_level_propagation_policies, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/inter_level_propagation_policies (container)

    YANG Description: Policies to propagate prefixes between IS-IS levels.
    """
    return self.__inter_level_propagation_policies
      
  def _set_inter_level_propagation_policies(self, v, load=False):
    """
    Setter method for inter_level_propagation_policies, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global/inter_level_propagation_policies (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_inter_level_propagation_policies is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_inter_level_propagation_policies() directly.

    YANG Description: Policies to propagate prefixes between IS-IS levels.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_inter_level_propagation_policies_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_inter_level_propagation_policies, is_container='container', yang_name="inter-level-propagation-policies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """inter_level_propagation_policies must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_inter_level_propagation_policies_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_inter_level_propagation_policies, is_container='container', yang_name="inter-level-propagation-policies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__inter_level_propagation_policies = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_inter_level_propagation_policies(self):
    self.__inter_level_propagation_policies = YANGDynClass(base=yc_inter_level_propagation_policies_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global_inter_level_propagation_policies, is_container='container', yang_name="inter-level-propagation-policies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  lsp_bit = __builtin__.property(_get_lsp_bit, _set_lsp_bit)
  reference_bandwidth = __builtin__.property(_get_reference_bandwidth, _set_reference_bandwidth)
  nsr = __builtin__.property(_get_nsr, _set_nsr)
  graceful_restart = __builtin__.property(_get_graceful_restart, _set_graceful_restart)
  timers = __builtin__.property(_get_timers, _set_timers)
  transport = __builtin__.property(_get_transport, _set_transport)
  mpls = __builtin__.property(_get_mpls, _set_mpls)
  igp_shortcuts = __builtin__.property(_get_igp_shortcuts, _set_igp_shortcuts)
  afi_safi = __builtin__.property(_get_afi_safi, _set_afi_safi)
  segment_routing = __builtin__.property(_get_segment_routing, _set_segment_routing)
  inter_level_propagation_policies = __builtin__.property(_get_inter_level_propagation_policies, _set_inter_level_propagation_policies)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('lsp_bit', lsp_bit), ('reference_bandwidth', reference_bandwidth), ('nsr', nsr), ('graceful_restart', graceful_restart), ('timers', timers), ('transport', transport), ('mpls', mpls), ('igp_shortcuts', igp_shortcuts), ('afi_safi', afi_safi), ('segment_routing', segment_routing), ('inter_level_propagation_policies', inter_level_propagation_policies), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS level based configuration.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__level_number','__metric_style','__authentication_check',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__level_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..2']}), is_leaf=True, yang_name="level-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:level-number', is_config=True)
    self.__metric_style = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'NARROW_METRIC': {}, 'WIDE_METRIC': {}},), is_leaf=True, yang_name="metric-style", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:metric-style', is_config=True)
    self.__authentication_check = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="authentication-check", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/config/enabled (boolean)

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_level_number(self):
    """
    Getter method for level_number, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/config/level_number (oc-isis-types:level-number)

    YANG Description: ISIS level number (level-1, level-2).
    """
    return self.__level_number
      
  def _set_level_number(self, v, load=False):
    """
    Setter method for level_number, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/config/level_number (oc-isis-types:level-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_level_number is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_level_number() directly.

    YANG Description: ISIS level number (level-1, level-2).
    """
    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': ['1..2']}), is_leaf=True, yang_name="level-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:level-number', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """level_number must be of a type compatible with oc-isis-types:level-number""",
          'defined-type': "oc-isis-types:level-number",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..2']}), is_leaf=True, yang_name="level-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:level-number', is_config=True)""",
        })

    self.__level_number = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_level_number(self):
    self.__level_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..2']}), is_leaf=True, yang_name="level-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:level-number', is_config=True)


  def _get_metric_style(self):
    """
    Getter method for metric_style, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/config/metric_style (oc-isis-types:metric-style)

    YANG Description: ISIS metric style types(narrow, wide).
    """
    return self.__metric_style
      
  def _set_metric_style(self, v, load=False):
    """
    Setter method for metric_style, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/config/metric_style (oc-isis-types:metric-style)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric_style is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric_style() directly.

    YANG Description: ISIS metric style types(narrow, wide).
    """
    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={'NARROW_METRIC': {}, 'WIDE_METRIC': {}},), is_leaf=True, yang_name="metric-style", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:metric-style', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric_style must be of a type compatible with oc-isis-types:metric-style""",
          'defined-type': "oc-isis-types:metric-style",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'NARROW_METRIC': {}, 'WIDE_METRIC': {}},), is_leaf=True, yang_name="metric-style", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:metric-style', is_config=True)""",
        })

    self.__metric_style = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric_style(self):
    self.__metric_style = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'NARROW_METRIC': {}, 'WIDE_METRIC': {}},), is_leaf=True, yang_name="metric-style", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:metric-style', is_config=True)


  def _get_authentication_check(self):
    """
    Getter method for authentication_check, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/config/authentication_check (boolean)

    YANG Description: When set to true, reject all ISIS protocol PDUs that either have a mismatch
in authentication-type or authentication-key.
    """
    return self.__authentication_check
      
  def _set_authentication_check(self, v, load=False):
    """
    Setter method for authentication_check, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/config/authentication_check (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_authentication_check is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_authentication_check() directly.

    YANG Description: When set to true, reject all ISIS protocol PDUs that either have a mismatch
in authentication-type or authentication-key.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="authentication-check", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """authentication_check must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="authentication-check", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__authentication_check = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_authentication_check(self):
    self.__authentication_check = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="authentication-check", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)
  level_number = __builtin__.property(_get_level_number, _set_level_number)
  metric_style = __builtin__.property(_get_metric_style, _set_metric_style)
  authentication_check = __builtin__.property(_get_authentication_check, _set_authentication_check)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('level_number', level_number), ('metric_style', metric_style), ('authentication_check', authentication_check), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS level state information.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__level_number','__metric_style','__authentication_check',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__level_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..2']}), is_leaf=True, yang_name="level-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:level-number', is_config=False)
    self.__metric_style = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'NARROW_METRIC': {}, 'WIDE_METRIC': {}},), is_leaf=True, yang_name="metric-style", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:metric-style', is_config=False)
    self.__authentication_check = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="authentication-check", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/state/enabled (boolean)

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_level_number(self):
    """
    Getter method for level_number, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/state/level_number (oc-isis-types:level-number)

    YANG Description: ISIS level number (level-1, level-2).
    """
    return self.__level_number
      
  def _set_level_number(self, v, load=False):
    """
    Setter method for level_number, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/state/level_number (oc-isis-types:level-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_level_number is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_level_number() directly.

    YANG Description: ISIS level number (level-1, level-2).
    """
    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': ['1..2']}), is_leaf=True, yang_name="level-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:level-number', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """level_number must be of a type compatible with oc-isis-types:level-number""",
          'defined-type': "oc-isis-types:level-number",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..2']}), is_leaf=True, yang_name="level-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:level-number', is_config=False)""",
        })

    self.__level_number = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_level_number(self):
    self.__level_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..2']}), is_leaf=True, yang_name="level-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:level-number', is_config=False)


  def _get_metric_style(self):
    """
    Getter method for metric_style, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/state/metric_style (oc-isis-types:metric-style)

    YANG Description: ISIS metric style types(narrow, wide).
    """
    return self.__metric_style
      
  def _set_metric_style(self, v, load=False):
    """
    Setter method for metric_style, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/state/metric_style (oc-isis-types:metric-style)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric_style is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric_style() directly.

    YANG Description: ISIS metric style types(narrow, wide).
    """
    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={'NARROW_METRIC': {}, 'WIDE_METRIC': {}},), is_leaf=True, yang_name="metric-style", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:metric-style', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric_style must be of a type compatible with oc-isis-types:metric-style""",
          'defined-type': "oc-isis-types:metric-style",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'NARROW_METRIC': {}, 'WIDE_METRIC': {}},), is_leaf=True, yang_name="metric-style", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:metric-style', is_config=False)""",
        })

    self.__metric_style = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric_style(self):
    self.__metric_style = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'NARROW_METRIC': {}, 'WIDE_METRIC': {}},), is_leaf=True, yang_name="metric-style", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:metric-style', is_config=False)


  def _get_authentication_check(self):
    """
    Getter method for authentication_check, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/state/authentication_check (boolean)

    YANG Description: When set to true, reject all ISIS protocol PDUs that either have a mismatch
in authentication-type or authentication-key.
    """
    return self.__authentication_check
      
  def _set_authentication_check(self, v, load=False):
    """
    Setter method for authentication_check, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/state/authentication_check (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_authentication_check is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_authentication_check() directly.

    YANG Description: When set to true, reject all ISIS protocol PDUs that either have a mismatch
in authentication-type or authentication-key.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="authentication-check", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """authentication_check must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="authentication-check", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__authentication_check = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_authentication_check(self):
    self.__authentication_check = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="authentication-check", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  enabled = __builtin__.property(_get_enabled)
  level_number = __builtin__.property(_get_level_number)
  metric_style = __builtin__.property(_get_metric_style)
  authentication_check = __builtin__.property(_get_authentication_check)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('level_number', level_number), ('metric_style', metric_style), ('authentication_check', authentication_check), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_system_level_counters_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The container defines a list of system counters for the IS.
  """
  __slots__ = ('_path_helper', '_extmethods', '__corrupted_lsps','__database_overloads','__manual_address_drop_from_areas','__exceed_max_seq_nums','__seq_num_skips','__own_lsp_purges','__id_len_mismatch','__part_changes','__max_area_address_mismatches','__auth_fails','__spf_runs','__auth_type_fails','__lsp_errors',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__corrupted_lsps = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="corrupted-lsps", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__database_overloads = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="database-overloads", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__manual_address_drop_from_areas = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="manual-address-drop-from-areas", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__exceed_max_seq_nums = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="exceed-max-seq-nums", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__seq_num_skips = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="seq-num-skips", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__own_lsp_purges = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="own-lsp-purges", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__id_len_mismatch = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="id-len-mismatch", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__part_changes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="part-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__max_area_address_mismatches = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-area-address-mismatches", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__auth_fails = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="auth-fails", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__spf_runs = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="spf-runs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__auth_type_fails = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="auth-type-fails", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__lsp_errors = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="lsp-errors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'system-level-counters', 'state']

  def _get_corrupted_lsps(self):
    """
    Getter method for corrupted_lsps, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/system_level_counters/state/corrupted_lsps (oc-yang:counter32)

    YANG Description: Number of corrupted in-memory LSPs detected. LSPs received from the
wire with a bad checksum are silently dropped and not counted. LSPs
received from the wire with parse errors are counted by lsp-errors. MIB
Entry: SysCorrLSPs.
    """
    return self.__corrupted_lsps
      
  def _set_corrupted_lsps(self, v, load=False):
    """
    Setter method for corrupted_lsps, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/system_level_counters/state/corrupted_lsps (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_corrupted_lsps is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_corrupted_lsps() directly.

    YANG Description: Number of corrupted in-memory LSPs detected. LSPs received from the
wire with a bad checksum are silently dropped and not counted. LSPs
received from the wire with parse errors are counted by lsp-errors. MIB
Entry: SysCorrLSPs.
    """
    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="corrupted-lsps", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """corrupted_lsps must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="corrupted-lsps", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__corrupted_lsps = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_corrupted_lsps(self):
    self.__corrupted_lsps = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="corrupted-lsps", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_database_overloads(self):
    """
    Getter method for database_overloads, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/system_level_counters/state/database_overloads (oc-yang:counter32)

    YANG Description: Number of times the database has become
overloaded.
MIB entry: SysLSPL(Level)DbaseOloads.
    """
    return self.__database_overloads
      
  def _set_database_overloads(self, v, load=False):
    """
    Setter method for database_overloads, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/system_level_counters/state/database_overloads (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_database_overloads is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_database_overloads() directly.

    YANG Description: Number of times the database has become
overloaded.
MIB entry: SysLSPL(Level)DbaseOloads.
    """
    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="database-overloads", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """database_overloads must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="database-overloads", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__database_overloads = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_database_overloads(self):
    self.__database_overloads = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="database-overloads", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_manual_address_drop_from_areas(self):
    """
    Getter method for manual_address_drop_from_areas, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/system_level_counters/state/manual_address_drop_from_areas (oc-yang:counter32)

    YANG Description: Number of times a manual address has been dropped from area.
MIB Entry: SysManAddrDropFromAreas.
    """
    return self.__manual_address_drop_from_areas
      
  def _set_manual_address_drop_from_areas(self, v, load=False):
    """
    Setter method for manual_address_drop_from_areas, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/system_level_counters/state/manual_address_drop_from_areas (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_manual_address_drop_from_areas is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_manual_address_drop_from_areas() directly.

    YANG Description: Number of times a manual address has been dropped from area.
MIB Entry: SysManAddrDropFromAreas.
    """
    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="manual-address-drop-from-areas", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """manual_address_drop_from_areas must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="manual-address-drop-from-areas", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__manual_address_drop_from_areas = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_manual_address_drop_from_areas(self):
    self.__manual_address_drop_from_areas = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="manual-address-drop-from-areas", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_exceed_max_seq_nums(self):
    """
    Getter method for exceed_max_seq_nums, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/system_level_counters/state/exceed_max_seq_nums (oc-yang:counter32)

    YANG Description: The number of times the system has attempted to exceed the maximum
sequence number. MIB Entry: SysAttmptToExMaxSeqNums.
    """
    return self.__exceed_max_seq_nums
      
  def _set_exceed_max_seq_nums(self, v, load=False):
    """
    Setter method for exceed_max_seq_nums, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/system_level_counters/state/exceed_max_seq_nums (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_exceed_max_seq_nums is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_exceed_max_seq_nums() directly.

    YANG Description: The number of times the system has attempted to exceed the maximum
sequence number. MIB Entry: SysAttmptToExMaxSeqNums.
    """
    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="exceed-max-seq-nums", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """exceed_max_seq_nums must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="exceed-max-seq-nums", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__exceed_max_seq_nums = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_exceed_max_seq_nums(self):
    self.__exceed_max_seq_nums = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="exceed-max-seq-nums", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_seq_num_skips(self):
    """
    Getter method for seq_num_skips, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/system_level_counters/state/seq_num_skips (oc-yang:counter32)

    YANG Description: Number of times a sequence number skip has occurred. MIB Entry:
SysSeqNumSkips.
    """
    return self.__seq_num_skips
      
  def _set_seq_num_skips(self, v, load=False):
    """
    Setter method for seq_num_skips, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/system_level_counters/state/seq_num_skips (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_seq_num_skips is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_seq_num_skips() directly.

    YANG Description: Number of times a sequence number skip has occurred. MIB Entry:
SysSeqNumSkips.
    """
    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="seq-num-skips", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """seq_num_skips must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="seq-num-skips", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__seq_num_skips = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_seq_num_skips(self):
    self.__seq_num_skips = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="seq-num-skips", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_own_lsp_purges(self):
    """
    Getter method for own_lsp_purges, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/system_level_counters/state/own_lsp_purges (oc-yang:counter32)

    YANG Description: Number of times a zero-aged copy of the system's
own LSP is received from some other node.
MIB Entry: isisSysOwnLSPPurges.
    """
    return self.__own_lsp_purges
      
  def _set_own_lsp_purges(self, v, load=False):
    """
    Setter method for own_lsp_purges, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/system_level_counters/state/own_lsp_purges (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_own_lsp_purges is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_own_lsp_purges() directly.

    YANG Description: Number of times a zero-aged copy of the system's
own LSP is received from some other node.
MIB Entry: isisSysOwnLSPPurges.
    """
    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="own-lsp-purges", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """own_lsp_purges must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="own-lsp-purges", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__own_lsp_purges = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_own_lsp_purges(self):
    self.__own_lsp_purges = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="own-lsp-purges", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_id_len_mismatch(self):
    """
    Getter method for id_len_mismatch, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/system_level_counters/state/id_len_mismatch (oc-yang:counter32)

    YANG Description: Number of times a PDU is received with a different value for ID field
length from that of the receiving system. MIB Entry:
isisSysIDFieldLenMismatches.
    """
    return self.__id_len_mismatch
      
  def _set_id_len_mismatch(self, v, load=False):
    """
    Setter method for id_len_mismatch, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/system_level_counters/state/id_len_mismatch (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id_len_mismatch is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id_len_mismatch() directly.

    YANG Description: Number of times a PDU is received with a different value for ID field
length from that of the receiving system. MIB Entry:
isisSysIDFieldLenMismatches.
    """
    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="id-len-mismatch", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id_len_mismatch must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="id-len-mismatch", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__id_len_mismatch = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_id_len_mismatch(self):
    self.__id_len_mismatch = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="id-len-mismatch", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_part_changes(self):
    """
    Getter method for part_changes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/system_level_counters/state/part_changes (oc-yang:counter32)

    YANG Description: The number of partition changes detected. MIB Entry: SysPartChanges.
    """
    return self.__part_changes
      
  def _set_part_changes(self, v, load=False):
    """
    Setter method for part_changes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/system_level_counters/state/part_changes (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_part_changes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_part_changes() directly.

    YANG Description: The number of partition changes detected. MIB Entry: SysPartChanges.
    """
    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="part-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """part_changes must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="part-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__part_changes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_part_changes(self):
    self.__part_changes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="part-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_max_area_address_mismatches(self):
    """
    Getter method for max_area_address_mismatches, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/system_level_counters/state/max_area_address_mismatches (oc-yang:counter32)

    YANG Description: Number of times a PDU is received with a different value for
MaximumAreaAddresses from that of the receiving system. MIB Entry:
SysMaxAreaAddrMismatches.
    """
    return self.__max_area_address_mismatches
      
  def _set_max_area_address_mismatches(self, v, load=False):
    """
    Setter method for max_area_address_mismatches, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/system_level_counters/state/max_area_address_mismatches (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_area_address_mismatches is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_area_address_mismatches() directly.

    YANG Description: Number of times a PDU is received with a different value for
MaximumAreaAddresses from that of the receiving system. MIB Entry:
SysMaxAreaAddrMismatches.
    """
    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-area-address-mismatches", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_area_address_mismatches must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-area-address-mismatches", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__max_area_address_mismatches = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_area_address_mismatches(self):
    self.__max_area_address_mismatches = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-area-address-mismatches", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_auth_fails(self):
    """
    Getter method for auth_fails, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/system_level_counters/state/auth_fails (oc-yang:counter32)

    YANG Description: The number of authentication key failures.
MIB Entry: SysAuthFails.
    """
    return self.__auth_fails
      
  def _set_auth_fails(self, v, load=False):
    """
    Setter method for auth_fails, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/system_level_counters/state/auth_fails (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_auth_fails is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_auth_fails() directly.

    YANG Description: The number of authentication key failures.
MIB Entry: SysAuthFails.
    """
    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="auth-fails", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """auth_fails must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="auth-fails", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__auth_fails = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_auth_fails(self):
    self.__auth_fails = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="auth-fails", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_spf_runs(self):
    """
    Getter method for spf_runs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/system_level_counters/state/spf_runs (oc-yang:counter32)

    YANG Description: The number of times SPF was ran at this level.
    """
    return self.__spf_runs
      
  def _set_spf_runs(self, v, load=False):
    """
    Setter method for spf_runs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/system_level_counters/state/spf_runs (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_spf_runs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_spf_runs() directly.

    YANG Description: The number of times SPF was ran at this level.
    """
    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="spf-runs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """spf_runs must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="spf-runs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__spf_runs = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_spf_runs(self):
    self.__spf_runs = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="spf-runs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_auth_type_fails(self):
    """
    Getter method for auth_type_fails, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/system_level_counters/state/auth_type_fails (oc-yang:counter32)

    YANG Description: The number of authentication type mismatches.
    """
    return self.__auth_type_fails
      
  def _set_auth_type_fails(self, v, load=False):
    """
    Setter method for auth_type_fails, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/system_level_counters/state/auth_type_fails (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_auth_type_fails is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_auth_type_fails() directly.

    YANG Description: The number of authentication type mismatches.
    """
    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="auth-type-fails", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """auth_type_fails must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="auth-type-fails", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__auth_type_fails = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_auth_type_fails(self):
    self.__auth_type_fails = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="auth-type-fails", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_lsp_errors(self):
    """
    Getter method for lsp_errors, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/system_level_counters/state/lsp_errors (oc-yang:counter32)

    YANG Description: The number of received LSPs with errors.
    """
    return self.__lsp_errors
      
  def _set_lsp_errors(self, v, load=False):
    """
    Setter method for lsp_errors, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/system_level_counters/state/lsp_errors (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsp_errors is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsp_errors() directly.

    YANG Description: The number of received LSPs with errors.
    """
    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="lsp-errors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsp_errors must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="lsp-errors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__lsp_errors = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsp_errors(self):
    self.__lsp_errors = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="lsp-errors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)

  corrupted_lsps = __builtin__.property(_get_corrupted_lsps)
  database_overloads = __builtin__.property(_get_database_overloads)
  manual_address_drop_from_areas = __builtin__.property(_get_manual_address_drop_from_areas)
  exceed_max_seq_nums = __builtin__.property(_get_exceed_max_seq_nums)
  seq_num_skips = __builtin__.property(_get_seq_num_skips)
  own_lsp_purges = __builtin__.property(_get_own_lsp_purges)
  id_len_mismatch = __builtin__.property(_get_id_len_mismatch)
  part_changes = __builtin__.property(_get_part_changes)
  max_area_address_mismatches = __builtin__.property(_get_max_area_address_mismatches)
  auth_fails = __builtin__.property(_get_auth_fails)
  spf_runs = __builtin__.property(_get_spf_runs)
  auth_type_fails = __builtin__.property(_get_auth_type_fails)
  lsp_errors = __builtin__.property(_get_lsp_errors)


  _pyangbind_elements = OrderedDict([('corrupted_lsps', corrupted_lsps), ('database_overloads', database_overloads), ('manual_address_drop_from_areas', manual_address_drop_from_areas), ('exceed_max_seq_nums', exceed_max_seq_nums), ('seq_num_skips', seq_num_skips), ('own_lsp_purges', own_lsp_purges), ('id_len_mismatch', id_len_mismatch), ('part_changes', part_changes), ('max_area_address_mismatches', max_area_address_mismatches), ('auth_fails', auth_fails), ('spf_runs', spf_runs), ('auth_type_fails', auth_type_fails), ('lsp_errors', lsp_errors), ])


class yc_system_level_counters_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_system_level_counters(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS system level counters.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'system-level-counters'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_system_level_counters_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'system-level-counters']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/system_level_counters/state (container)

    YANG Description: The container defines a list of system counters for the IS.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/system_level_counters/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: The container defines a list of system counters for the IS.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_system_level_counters_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_system_level_counters_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_system_level_counters_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of Link State PDU.
  """
  __slots__ = ('_path_helper', '_extmethods', '__lsp_id','__maximum_area_addresses','__version','__version2','__id_length','__pdu_type','__remaining_lifetime','__sequence_number','__checksum','__pdu_length','__flags','__is_type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__lsp_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9][0-9]-[0-9][0-9]'}), is_leaf=True, yang_name="lsp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:lsp-id', is_config=False)
    self.__maximum_area_addresses = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="maximum-area-addresses", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__version = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="version", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__version2 = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="version2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__id_length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="id-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__pdu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LEVEL_1': {}, 'LEVEL_2': {}},), is_leaf=True, yang_name="pdu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__remaining_lifetime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="remaining-lifetime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__sequence_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sequence-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__checksum = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="checksum", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__pdu_length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="pdu-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PARTITION_REPAIR': {}, 'ATTACHED_ERROR': {}, 'ATTACHED_EXPENSE': {}, 'ATTACHED_DELAY': {}, 'ATTACHED_DEFAULT': {}, 'OVERLOAD': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__is_type = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..2']}), is_leaf=True, yang_name="is-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:level-number', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'state']

  def _get_lsp_id(self):
    """
    Getter method for lsp_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/state/lsp_id (oc-isis-types:lsp-id)

    YANG Description: LSP ID of the LSP.
    """
    return self.__lsp_id
      
  def _set_lsp_id(self, v, load=False):
    """
    Setter method for lsp_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/state/lsp_id (oc-isis-types:lsp-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsp_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsp_id() directly.

    YANG Description: LSP ID of the LSP.
    """
    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]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9][0-9]-[0-9][0-9]'}), is_leaf=True, yang_name="lsp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:lsp-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsp_id must be of a type compatible with oc-isis-types:lsp-id""",
          'defined-type': "oc-isis-types:lsp-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9][0-9]-[0-9][0-9]'}), is_leaf=True, yang_name="lsp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:lsp-id', is_config=False)""",
        })

    self.__lsp_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsp_id(self):
    self.__lsp_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9][0-9]-[0-9][0-9]'}), is_leaf=True, yang_name="lsp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:lsp-id', is_config=False)


  def _get_maximum_area_addresses(self):
    """
    Getter method for maximum_area_addresses, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/state/maximum_area_addresses (uint8)

    YANG Description: Number of area addresses permitted for this ISs area. 0
indicates the IS only supports three area addresses (by
default). Any number inclusive of 1 and 254 indicates the
number of areas allowed.
    """
    return self.__maximum_area_addresses
      
  def _set_maximum_area_addresses(self, v, load=False):
    """
    Setter method for maximum_area_addresses, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/state/maximum_area_addresses (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_maximum_area_addresses is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_maximum_area_addresses() directly.

    YANG Description: Number of area addresses permitted for this ISs area. 0
indicates the IS only supports three area addresses (by
default). Any number inclusive of 1 and 254 indicates the
number of areas allowed.
    """
    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="maximum-area-addresses", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """maximum_area_addresses 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="maximum-area-addresses", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__maximum_area_addresses = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_maximum_area_addresses(self):
    self.__maximum_area_addresses = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="maximum-area-addresses", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_version(self):
    """
    Getter method for version, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/state/version (uint8)

    YANG Description: PDU version. This is set to 1.
    """
    return self.__version
      
  def _set_version(self, v, load=False):
    """
    Setter method for version, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/state/version (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_version is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_version() directly.

    YANG Description: PDU version. This is set to 1.
    """
    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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="version", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """version 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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="version", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__version = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_version(self):
    self.__version = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="version", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_version2(self):
    """
    Getter method for version2, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/state/version2 (uint8)

    YANG Description: PDU version2. This is set to 1
    """
    return self.__version2
      
  def _set_version2(self, v, load=False):
    """
    Setter method for version2, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/state/version2 (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_version2 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_version2() directly.

    YANG Description: PDU version2. This is set to 1
    """
    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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="version2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """version2 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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="version2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__version2 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_version2(self):
    self.__version2 = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="version2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_id_length(self):
    """
    Getter method for id_length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/state/id_length (uint8)

    YANG Description: Length of the ID field of NSAP addresses and NETs used in
this routing domain.
    """
    return self.__id_length
      
  def _set_id_length(self, v, load=False):
    """
    Setter method for id_length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/state/id_length (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id_length is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id_length() directly.

    YANG Description: Length of the ID field of NSAP addresses and NETs used in
this routing domain.
    """
    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="id-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id_length 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="id-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__id_length = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_id_length(self):
    self.__id_length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="id-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_pdu_type(self):
    """
    Getter method for pdu_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/state/pdu_type (enumeration)

    YANG Description: Link State PDU type.
    """
    return self.__pdu_type
      
  def _set_pdu_type(self, v, load=False):
    """
    Setter method for pdu_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/state/pdu_type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pdu_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pdu_type() directly.

    YANG Description: Link State PDU type.
    """
    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={'LEVEL_1': {}, 'LEVEL_2': {}},), is_leaf=True, yang_name="pdu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pdu_type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LEVEL_1': {}, 'LEVEL_2': {}},), is_leaf=True, yang_name="pdu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__pdu_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_pdu_type(self):
    self.__pdu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LEVEL_1': {}, 'LEVEL_2': {}},), is_leaf=True, yang_name="pdu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_remaining_lifetime(self):
    """
    Getter method for remaining_lifetime, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/state/remaining_lifetime (uint16)

    YANG Description: Remaining lifetime in seconds before the LSP expiration.
    """
    return self.__remaining_lifetime
      
  def _set_remaining_lifetime(self, v, load=False):
    """
    Setter method for remaining_lifetime, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/state/remaining_lifetime (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_remaining_lifetime is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_remaining_lifetime() directly.

    YANG Description: Remaining lifetime in seconds before the LSP expiration.
    """
    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="remaining-lifetime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """remaining_lifetime 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="remaining-lifetime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__remaining_lifetime = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_remaining_lifetime(self):
    self.__remaining_lifetime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="remaining-lifetime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_sequence_number(self):
    """
    Getter method for sequence_number, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/state/sequence_number (uint32)

    YANG Description: Sequence number of the LSP.
    """
    return self.__sequence_number
      
  def _set_sequence_number(self, v, load=False):
    """
    Setter method for sequence_number, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/state/sequence_number (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sequence_number is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sequence_number() directly.

    YANG Description: Sequence number of the LSP.
    """
    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-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sequence_number 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-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__sequence_number = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sequence_number(self):
    self.__sequence_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sequence-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_checksum(self):
    """
    Getter method for checksum, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/state/checksum (uint16)

    YANG Description: Checksum of the LSP.
    """
    return self.__checksum
      
  def _set_checksum(self, v, load=False):
    """
    Setter method for checksum, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/state/checksum (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_checksum is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_checksum() directly.

    YANG Description: Checksum of the LSP.
    """
    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="checksum", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """checksum 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="checksum", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__checksum = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_checksum(self):
    self.__checksum = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="checksum", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_pdu_length(self):
    """
    Getter method for pdu_length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/state/pdu_length (uint16)

    YANG Description: Total length of the LSP.
    """
    return self.__pdu_length
      
  def _set_pdu_length(self, v, load=False):
    """
    Setter method for pdu_length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/state/pdu_length (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pdu_length is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pdu_length() directly.

    YANG Description: Total length of the LSP.
    """
    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="pdu-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pdu_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="pdu-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__pdu_length = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_pdu_length(self):
    self.__pdu_length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="pdu-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_flags(self):
    """
    Getter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/state/flags (enumeration)

    YANG Description: LSP Type-Block flags.
    """
    return self.__flags
      
  def _set_flags(self, v, load=False):
    """
    Setter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/state/flags (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flags() directly.

    YANG Description: LSP Type-Block flags.
    """
    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={'PARTITION_REPAIR': {}, 'ATTACHED_ERROR': {}, 'ATTACHED_EXPENSE': {}, 'ATTACHED_DELAY': {}, 'ATTACHED_DEFAULT': {}, 'OVERLOAD': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flags must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PARTITION_REPAIR': {}, 'ATTACHED_ERROR': {}, 'ATTACHED_EXPENSE': {}, 'ATTACHED_DELAY': {}, 'ATTACHED_DEFAULT': {}, 'OVERLOAD': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_flags(self):
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PARTITION_REPAIR': {}, 'ATTACHED_ERROR': {}, 'ATTACHED_EXPENSE': {}, 'ATTACHED_DELAY': {}, 'ATTACHED_DEFAULT': {}, 'OVERLOAD': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_is_type(self):
    """
    Getter method for is_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/state/is_type (oc-isis-types:level-number)

    YANG Description: Type of neighboring system.
    """
    return self.__is_type
      
  def _set_is_type(self, v, load=False):
    """
    Setter method for is_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/state/is_type (oc-isis-types:level-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_is_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_is_type() directly.

    YANG Description: Type of neighboring system.
    """
    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': ['1..2']}), is_leaf=True, yang_name="is-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:level-number', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """is_type must be of a type compatible with oc-isis-types:level-number""",
          'defined-type': "oc-isis-types:level-number",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..2']}), is_leaf=True, yang_name="is-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:level-number', is_config=False)""",
        })

    self.__is_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_is_type(self):
    self.__is_type = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..2']}), is_leaf=True, yang_name="is-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:level-number', is_config=False)

  lsp_id = __builtin__.property(_get_lsp_id)
  maximum_area_addresses = __builtin__.property(_get_maximum_area_addresses)
  version = __builtin__.property(_get_version)
  version2 = __builtin__.property(_get_version2)
  id_length = __builtin__.property(_get_id_length)
  pdu_type = __builtin__.property(_get_pdu_type)
  remaining_lifetime = __builtin__.property(_get_remaining_lifetime)
  sequence_number = __builtin__.property(_get_sequence_number)
  checksum = __builtin__.property(_get_checksum)
  pdu_length = __builtin__.property(_get_pdu_length)
  flags = __builtin__.property(_get_flags)
  is_type = __builtin__.property(_get_is_type)


  _pyangbind_elements = OrderedDict([('lsp_id', lsp_id), ('maximum_area_addresses', maximum_area_addresses), ('version', version), ('version2', version2), ('id_length', id_length), ('pdu_type', pdu_type), ('remaining_lifetime', remaining_lifetime), ('sequence_number', sequence_number), ('checksum', checksum), ('pdu_length', pdu_length), ('flags', flags), ('is_type', is_type), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/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 specified
LSP
  """
  __slots__ = ('_path_helper', '_extmethods', '__type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'AREA_ADDRESSES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:AREA_ADDRESSES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IIS_NEIGHBORS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IIS_NEIGHBORS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'INSTANCE_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:INSTANCE_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'AUTHENTICATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:AUTHENTICATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'PURGE_OI': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:PURGE_OI': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'LSP_BUFFER_SIZE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:LSP_BUFFER_SIZE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'EXTENDED_IS_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:EXTENDED_IS_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_NEIGHBOR_ATTRIBUTE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_NEIGHBOR_ATTRIBUTE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ISIS_ALIAS_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ISIS_ALIAS_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IPV4_INTERNAL_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IPV4_INTERNAL_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'NLPID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:NLPID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IPV4_EXTERNAL_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IPV4_EXTERNAL_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IPV4_INTERFACE_ADDRESSES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IPV4_INTERFACE_ADDRESSES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IPV4_TE_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IPV4_TE_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'EXTENDED_IPV4_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:EXTENDED_IPV4_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'DYNAMIC_NAME': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:DYNAMIC_NAME': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IPV4_SRLG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IPV4_SRLG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IPV6_SRLG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IPV6_SRLG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IPV6_TE_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IPV6_TE_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'MT_ISN': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:MT_ISN': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'MT_IS_NEIGHBOR_ATTRIBUTE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:MT_IS_NEIGHBOR_ATTRIBUTE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'MULTI_TOPOLOGY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:MULTI_TOPOLOGY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IPV6_INTERFACE_ADDRESSES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IPV6_INTERFACE_ADDRESSES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'MT_IPV4_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:MT_IPV4_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IPV6_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IPV6_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'MT_IPV6_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:MT_IPV6_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/state/type (identityref)

    YANG Description: The type of TLV being described. The type of TLV is
expressed as a canonical name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/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: The type of TLV being described. The type of TLV is
expressed as a canonical name.
    """
    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={'AREA_ADDRESSES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:AREA_ADDRESSES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IIS_NEIGHBORS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IIS_NEIGHBORS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'INSTANCE_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:INSTANCE_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'AUTHENTICATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:AUTHENTICATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'PURGE_OI': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:PURGE_OI': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'LSP_BUFFER_SIZE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:LSP_BUFFER_SIZE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'EXTENDED_IS_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:EXTENDED_IS_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_NEIGHBOR_ATTRIBUTE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_NEIGHBOR_ATTRIBUTE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ISIS_ALIAS_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ISIS_ALIAS_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IPV4_INTERNAL_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IPV4_INTERNAL_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'NLPID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:NLPID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IPV4_EXTERNAL_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IPV4_EXTERNAL_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IPV4_INTERFACE_ADDRESSES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IPV4_INTERFACE_ADDRESSES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IPV4_TE_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IPV4_TE_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'EXTENDED_IPV4_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:EXTENDED_IPV4_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'DYNAMIC_NAME': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:DYNAMIC_NAME': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IPV4_SRLG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IPV4_SRLG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IPV6_SRLG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IPV6_SRLG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IPV6_TE_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IPV6_TE_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'MT_ISN': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:MT_ISN': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'MT_IS_NEIGHBOR_ATTRIBUTE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:MT_IS_NEIGHBOR_ATTRIBUTE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'MULTI_TOPOLOGY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:MULTI_TOPOLOGY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IPV6_INTERFACE_ADDRESSES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IPV6_INTERFACE_ADDRESSES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'MT_IPV4_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:MT_IPV4_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IPV6_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IPV6_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'MT_IPV6_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:MT_IPV6_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'AREA_ADDRESSES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:AREA_ADDRESSES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IIS_NEIGHBORS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IIS_NEIGHBORS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'INSTANCE_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:INSTANCE_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'AUTHENTICATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:AUTHENTICATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'PURGE_OI': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:PURGE_OI': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'LSP_BUFFER_SIZE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:LSP_BUFFER_SIZE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'EXTENDED_IS_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:EXTENDED_IS_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_NEIGHBOR_ATTRIBUTE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_NEIGHBOR_ATTRIBUTE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ISIS_ALIAS_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ISIS_ALIAS_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IPV4_INTERNAL_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IPV4_INTERNAL_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'NLPID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:NLPID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IPV4_EXTERNAL_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IPV4_EXTERNAL_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IPV4_INTERFACE_ADDRESSES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IPV4_INTERFACE_ADDRESSES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IPV4_TE_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IPV4_TE_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'EXTENDED_IPV4_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:EXTENDED_IPV4_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'DYNAMIC_NAME': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:DYNAMIC_NAME': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IPV4_SRLG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IPV4_SRLG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IPV6_SRLG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IPV6_SRLG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IPV6_TE_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IPV6_TE_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'MT_ISN': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:MT_ISN': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'MT_IS_NEIGHBOR_ATTRIBUTE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:MT_IS_NEIGHBOR_ATTRIBUTE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'MULTI_TOPOLOGY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:MULTI_TOPOLOGY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IPV6_INTERFACE_ADDRESSES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IPV6_INTERFACE_ADDRESSES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'MT_IPV4_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:MT_IPV4_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IPV6_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IPV6_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'MT_IPV6_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:MT_IPV6_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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={'AREA_ADDRESSES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:AREA_ADDRESSES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IIS_NEIGHBORS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IIS_NEIGHBORS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'INSTANCE_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:INSTANCE_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'AUTHENTICATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:AUTHENTICATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'PURGE_OI': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:PURGE_OI': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'LSP_BUFFER_SIZE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:LSP_BUFFER_SIZE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'EXTENDED_IS_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:EXTENDED_IS_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_NEIGHBOR_ATTRIBUTE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_NEIGHBOR_ATTRIBUTE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ISIS_ALIAS_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ISIS_ALIAS_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IPV4_INTERNAL_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IPV4_INTERNAL_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'NLPID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:NLPID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IPV4_EXTERNAL_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IPV4_EXTERNAL_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IPV4_INTERFACE_ADDRESSES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IPV4_INTERFACE_ADDRESSES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IPV4_TE_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IPV4_TE_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'EXTENDED_IPV4_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:EXTENDED_IPV4_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'DYNAMIC_NAME': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:DYNAMIC_NAME': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IPV4_SRLG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IPV4_SRLG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IPV6_SRLG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IPV6_SRLG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IPV6_TE_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IPV6_TE_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'MT_ISN': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:MT_ISN': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'MT_IS_NEIGHBOR_ATTRIBUTE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:MT_IS_NEIGHBOR_ATTRIBUTE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'MULTI_TOPOLOGY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:MULTI_TOPOLOGY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IPV6_INTERFACE_ADDRESSES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IPV6_INTERFACE_ADDRESSES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'MT_IPV4_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:MT_IPV4_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IPV6_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IPV6_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'MT_IPV6_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:MT_IPV6_REACHABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  type = __builtin__.property(_get_type)


  _pyangbind_elements = OrderedDict([('type', type), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_area_address_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/area-address/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of ISIS TLV 1.
  """
  __slots__ = ('_path_helper', '_extmethods', '__address',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__address = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{2}(\\.[0-9A-Fa-f]{4}){0,3}'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:area-address', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'area-address', 'state']

  def _get_address(self):
    """
    Getter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/area_address/state/address (oc-isis-types:area-address)

    YANG Description: Area adress(es) of the IS. Set of manual area
addresses of this IS.
    """
    return self.__address
      
  def _set_address(self, v, load=False):
    """
    Setter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/area_address/state/address (oc-isis-types:area-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address() directly.

    YANG Description: Area adress(es) of the IS. Set of manual area
addresses of this IS.
    """
    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_dict={'pattern': '[0-9A-Fa-f]{2}(\\.[0-9A-Fa-f]{4}){0,3}'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:area-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address must be of a type compatible with oc-isis-types:area-address""",
          'defined-type': "oc-isis-types:area-address",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{2}(\\.[0-9A-Fa-f]{4}){0,3}'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:area-address', is_config=False)""",
        })

    self.__address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address(self):
    self.__address = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{2}(\\.[0-9A-Fa-f]{4}){0,3}'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:area-address', is_config=False)

  address = __builtin__.property(_get_address)


  _pyangbind_elements = OrderedDict([('address', address), ])


class yc_area_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_area_address(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/area-address. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines TLV 1.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'area-address'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_area_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'area-address']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/area_address/state (container)

    YANG Description: State parameters of ISIS TLV 1.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/area_address/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 parameters of ISIS TLV 1.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_area_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_area_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_area_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_lsp_buffer_size_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/lsp-buffer-size/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of TLV 14.
  """
  __slots__ = ('_path_helper', '_extmethods', '__size',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__size = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'lsp-buffer-size', 'state']

  def _get_size(self):
    """
    Getter method for size, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/lsp_buffer_size/state/size (uint16)

    YANG Description: The maximum MTU that the advertising system can
receive, expressed in bytes.
    """
    return self.__size
      
  def _set_size(self, v, load=False):
    """
    Setter method for size, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/lsp_buffer_size/state/size (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_size is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_size() directly.

    YANG Description: The maximum MTU that the advertising system can
receive, expressed in bytes.
    """
    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="size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """size 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="size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__size = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_size(self):
    self.__size = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  size = __builtin__.property(_get_size)


  _pyangbind_elements = OrderedDict([('size', size), ])


class yc_lsp_buffer_size_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_lsp_buffer_size(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/lsp-buffer-size. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines TLV 14 - the LSP Buffer Size
TLV.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'lsp-buffer-size'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_lsp_buffer_size_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'lsp-buffer-size']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/lsp_buffer_size/state (container)

    YANG Description: State parameters of TLV 14.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/lsp_buffer_size/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 parameters of TLV 14.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_lsp_buffer_size_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_lsp_buffer_size_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_lsp_buffer_size_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_nlpid_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/nlpid/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of ISIS TLV 129.
  """
  __slots__ = ('_path_helper', '_extmethods', '__nlpid',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__nlpid = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}},)), is_leaf=False, yang_name="nlpid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'nlpid', 'state']

  def _get_nlpid(self):
    """
    Getter method for nlpid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/nlpid/state/nlpid (enumeration)

    YANG Description: Protocol supported. IPv4 is defined as (0xcc) and IPv6 -
(0x8e)
    """
    return self.__nlpid
      
  def _set_nlpid(self, v, load=False):
    """
    Setter method for nlpid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/nlpid/state/nlpid (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_nlpid is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_nlpid() directly.

    YANG Description: Protocol supported. IPv4 is defined as (0xcc) and IPv6 -
(0x8e)
    """
    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={'IPV4': {}, 'IPV6': {}},)), is_leaf=False, yang_name="nlpid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """nlpid must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}},)), is_leaf=False, yang_name="nlpid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__nlpid = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_nlpid(self):
    self.__nlpid = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}},)), is_leaf=False, yang_name="nlpid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)

  nlpid = __builtin__.property(_get_nlpid)


  _pyangbind_elements = OrderedDict([('nlpid', nlpid), ])


class yc_nlpid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_nlpid(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/nlpid. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines TLV 129.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'nlpid'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_nlpid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'nlpid']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/nlpid/state (container)

    YANG Description: State parameters of ISIS TLV 129.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/nlpid/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 parameters of ISIS TLV 129.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_nlpid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_nlpid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_nlpid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_hostname_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/hostname/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of ISIS TLV 137.
  """
  __slots__ = ('_path_helper', '_extmethods', '__hostname',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__hostname = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="hostname", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'hostname', 'state']

  def _get_hostname(self):
    """
    Getter method for hostname, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/hostname/state/hostname (string)

    YANG Description: Name of the node.
    """
    return self.__hostname
      
  def _set_hostname(self, v, load=False):
    """
    Setter method for hostname, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/hostname/state/hostname (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hostname is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hostname() directly.

    YANG Description: Name of the node.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="hostname", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hostname must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="hostname", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__hostname = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hostname(self):
    self.__hostname = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="hostname", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)

  hostname = __builtin__.property(_get_hostname)


  _pyangbind_elements = OrderedDict([('hostname', hostname), ])


class yc_hostname_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_hostname(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/hostname. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines TLV 137.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'hostname'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_hostname_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'hostname']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/hostname/state (container)

    YANG Description: State parameters of ISIS TLV 137.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/hostname/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 parameters of ISIS TLV 137.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_hostname_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_hostname_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_hostname_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_interface_addresses_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv4-interface-addresses/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of ISIS TLV 132.
  """
  __slots__ = ('_path_helper', '_extmethods', '__address',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__address = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv4-interface-addresses', 'state']

  def _get_address(self):
    """
    Getter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_interface_addresses/state/address (inet:ipv4-address)

    YANG Description: IPv4 address(es) of the interface corresponding to
the SNPA over which this PDU is to be transmitted.
    """
    return self.__address
      
  def _set_address(self, v, load=False):
    """
    Setter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_interface_addresses/state/address (inet:ipv4-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address() directly.

    YANG Description: IPv4 address(es) of the interface corresponding to
the SNPA over which this PDU is to be transmitted.
    """
    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_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}'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address must be of a type compatible with inet:ipv4-address""",
          'defined-type': "inet:ipv4-address",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=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}'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)""",
        })

    self.__address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address(self):
    self.__address = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)

  address = __builtin__.property(_get_address)


  _pyangbind_elements = OrderedDict([('address', address), ])


class yc_ipv4_interface_addresses_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_interface_addresses(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv4-interface-addresses. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines TLV 132.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'ipv4-interface-addresses'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_interface_addresses_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv4-interface-addresses']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_interface_addresses/state (container)

    YANG Description: State parameters of ISIS TLV 132.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_interface_addresses/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 parameters of ISIS TLV 132.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_interface_addresses_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_interface_addresses_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_interface_addresses_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_interface_addresses_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv6-interface-addresses/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of ISIS TLV 232.
  """
  __slots__ = ('_path_helper', '_extmethods', '__address',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__address = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}|:))'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv6-interface-addresses', 'state']

  def _get_address(self):
    """
    Getter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_interface_addresses/state/address (inet:ipv6-address)

    YANG Description: IPv6 interface addresses of the node.  MUST contain
only the non-link-local IPv6 addresses assigned to the
IS.
    """
    return self.__address
      
  def _set_address(self, v, load=False):
    """
    Setter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_interface_addresses/state/address (inet:ipv6-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address() directly.

    YANG Description: IPv6 interface addresses of the node.  MUST contain
only the non-link-local IPv6 addresses assigned to the
IS.
    """
    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_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}|:))'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address must be of a type compatible with inet:ipv6-address""",
          'defined-type': "inet:ipv6-address",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=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}|:))'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)""",
        })

    self.__address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address(self):
    self.__address = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}|:))'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)

  address = __builtin__.property(_get_address)


  _pyangbind_elements = OrderedDict([('address', address), ])


class yc_ipv6_interface_addresses_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_interface_addresses(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv6-interface-addresses. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines TLV 232.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'ipv6-interface-addresses'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_interface_addresses_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv6-interface-addresses']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_interface_addresses/state (container)

    YANG Description: State parameters of ISIS TLV 232.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_interface_addresses/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 parameters of ISIS TLV 232.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_interface_addresses_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_interface_addresses_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_interface_addresses_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_te_router_id_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv4-te-router-id/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of ISIS TLV 134.
  """
  __slots__ = ('_path_helper', '_extmethods', '__router_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__router_id = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}'})), is_leaf=False, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv4-te-router-id', 'state']

  def _get_router_id(self):
    """
    Getter method for router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_te_router_id/state/router_id (inet:ipv4-address)

    YANG Description: IPv4 Traffic Engineering router ID of the node. For
traffic engineering, it guarantees that we have a
single stable address that can always be referenced in
a path that will be reachable from multiple hops away,
regardless of the state of the node's interfaces.
    """
    return self.__router_id
      
  def _set_router_id(self, v, load=False):
    """
    Setter method for router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_te_router_id/state/router_id (inet:ipv4-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_router_id() directly.

    YANG Description: IPv4 Traffic Engineering router ID of the node. For
traffic engineering, it guarantees that we have a
single stable address that can always be referenced in
a path that will be reachable from multiple hops away,
regardless of the state of the node's interfaces.
    """
    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_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}'})), is_leaf=False, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """router_id must be of a type compatible with inet:ipv4-address""",
          'defined-type': "inet:ipv4-address",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=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}'})), is_leaf=False, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)""",
        })

    self.__router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_router_id(self):
    self.__router_id = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}'})), is_leaf=False, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)

  router_id = __builtin__.property(_get_router_id)


  _pyangbind_elements = OrderedDict([('router_id', router_id), ])


class yc_ipv4_te_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_te_router_id(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv4-te-router-id. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines TLV 134.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'ipv4-te-router-id'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_te_router_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv4-te-router-id']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_te_router_id/state (container)

    YANG Description: State parameters of ISIS TLV 134.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_te_router_id/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 parameters of ISIS TLV 134.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_te_router_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_te_router_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_te_router_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_te_router_id_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv6-te-router-id/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of ISIS TLV 140.
  """
  __slots__ = ('_path_helper', '_extmethods', '__router_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__router_id = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}|:))'})), is_leaf=False, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv6-te-router-id', 'state']

  def _get_router_id(self):
    """
    Getter method for router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_te_router_id/state/router_id (inet:ipv6-address)

    YANG Description: IPv6 Traffic Engineering router ID of the node. For
traffic engineering, it guarantees that we have a
single stable address that can always be referenced in
a path that will be reachable from multiple hops away,
regardless of the state of the node's interfaces.
    """
    return self.__router_id
      
  def _set_router_id(self, v, load=False):
    """
    Setter method for router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_te_router_id/state/router_id (inet:ipv6-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_router_id() directly.

    YANG Description: IPv6 Traffic Engineering router ID of the node. For
traffic engineering, it guarantees that we have a
single stable address that can always be referenced in
a path that will be reachable from multiple hops away,
regardless of the state of the node's interfaces.
    """
    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_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}|:))'})), is_leaf=False, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """router_id must be of a type compatible with inet:ipv6-address""",
          'defined-type': "inet:ipv6-address",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=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}|:))'})), is_leaf=False, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)""",
        })

    self.__router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_router_id(self):
    self.__router_id = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}|:))'})), is_leaf=False, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)

  router_id = __builtin__.property(_get_router_id)


  _pyangbind_elements = OrderedDict([('router_id', router_id), ])


class yc_ipv6_te_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_te_router_id(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv6-te-router-id. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines TLV 140.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'ipv6-te-router-id'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_te_router_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv6-te-router-id']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_te_router_id/state (container)

    YANG Description: State parameters of ISIS TLV 140.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_te_router_id/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 parameters of ISIS TLV 140.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_te_router_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_te_router_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_te_router_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_instance_ids_instance_id_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/instance-ids/instance-id/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of ISIS TLV 7.
  """
  __slots__ = ('_path_helper', '_extmethods', '__instance_id','__topology_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__instance_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="instance-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__topology_id = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)), is_leaf=False, yang_name="topology-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'instance-ids', 'instance-id', 'state']

  def _get_instance_id(self):
    """
    Getter method for instance_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/instance_ids/instance_id/state/instance_id (uint16)

    YANG Description: An Instance Identifier (IID) to uniquely identify
an IS-IS instance. When the IID = 0, the list of
supported ITIDs MUST NOT be present. An IID-TLV with
IID = 0 MUST NOT appear in an SNP or LSP. When the
TLV appears (with a non-zero IID) in an SNP or LSP,
exactly one ITID. MUST be present indicating the
topology with which the PDU is associated. If no
ITIDs or multiple ITIDs are present or the IID is
zero, then the PDU MUST be ignored.
    """
    return self.__instance_id
      
  def _set_instance_id(self, v, load=False):
    """
    Setter method for instance_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/instance_ids/instance_id/state/instance_id (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_instance_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_instance_id() directly.

    YANG Description: An Instance Identifier (IID) to uniquely identify
an IS-IS instance. When the IID = 0, the list of
supported ITIDs MUST NOT be present. An IID-TLV with
IID = 0 MUST NOT appear in an SNP or LSP. When the
TLV appears (with a non-zero IID) in an SNP or LSP,
exactly one ITID. MUST be present indicating the
topology with which the PDU is associated. If no
ITIDs or multiple ITIDs are present or the IID is
zero, then the PDU MUST be ignored.
    """
    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="instance-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """instance_id 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="instance-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__instance_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_instance_id(self):
    self.__instance_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="instance-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_topology_id(self):
    """
    Getter method for topology_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/instance_ids/instance_id/state/topology_id (uint16)

    YANG Description: Instance-Specific Topology Identifiers (ITIDs).
    """
    return self.__topology_id
      
  def _set_topology_id(self, v, load=False):
    """
    Setter method for topology_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/instance_ids/instance_id/state/topology_id (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_topology_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_topology_id() directly.

    YANG Description: Instance-Specific Topology Identifiers (ITIDs).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)), is_leaf=False, yang_name="topology-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """topology_id must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)), is_leaf=False, yang_name="topology-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__topology_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_topology_id(self):
    self.__topology_id = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)), is_leaf=False, yang_name="topology-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  instance_id = __builtin__.property(_get_instance_id)
  topology_id = __builtin__.property(_get_topology_id)


  _pyangbind_elements = OrderedDict([('instance_id', instance_id), ('topology_id', topology_id), ])


class yc_instance_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_instance_ids_instance_id(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/instance-ids/instance-id. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A list of instance IDs received within TLV 7 within an
IS-IS LSP. In the case that more than one instance of
TLV 7 is included in the LSP, the instance IDs specified
within the instances are concatenated within this
list.
  """
  __slots__ = ('_path_helper', '_extmethods', '__instance_id','__state',)

  _yang_name = 'instance-id'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__instance_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="instance-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_instance_ids_instance_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'instance-ids', 'instance-id']

  def _get_instance_id(self):
    """
    Getter method for instance_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/instance_ids/instance_id/instance_id (leafref)

    YANG Description: Reference to the unique instance ID.
    """
    return self.__instance_id
      
  def _set_instance_id(self, v, load=False):
    """
    Setter method for instance_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/instance_ids/instance_id/instance_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_instance_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_instance_id() directly.

    YANG Description: Reference to the unique instance ID.
    """
    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="instance-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """instance_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="instance-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__instance_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_instance_id(self):
    self.__instance_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="instance-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/instance_ids/instance_id/state (container)

    YANG Description: State parameters of ISIS TLV 7.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/instance_ids/instance_id/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 parameters of ISIS TLV 7.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_instance_ids_instance_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_instance_ids_instance_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_instance_ids_instance_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  instance_id = __builtin__.property(_get_instance_id)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('instance_id', instance_id), ('state', state), ])


class yc_instance_ids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_instance_ids(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/instance-ids. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS Instance Identifier TLV.
  """
  __slots__ = ('_path_helper', '_extmethods', '__instance_id',)

  _yang_name = 'instance-ids'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__instance_id = YANGDynClass(base=YANGListType("instance_id",yc_instance_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_instance_ids_instance_id, yang_name="instance-id", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='instance-id', extensions=None), is_container='list', yang_name="instance-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'instance-ids']

  def _get_instance_id(self):
    """
    Getter method for instance_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/instance_ids/instance_id (list)

    YANG Description: A list of instance IDs received within TLV 7 within an
IS-IS LSP. In the case that more than one instance of
TLV 7 is included in the LSP, the instance IDs specified
within the instances are concatenated within this
list.
    """
    return self.__instance_id
      
  def _set_instance_id(self, v, load=False):
    """
    Setter method for instance_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/instance_ids/instance_id (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_instance_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_instance_id() directly.

    YANG Description: A list of instance IDs received within TLV 7 within an
IS-IS LSP. In the case that more than one instance of
TLV 7 is included in the LSP, the instance IDs specified
within the instances are concatenated within this
list.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("instance_id",yc_instance_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_instance_ids_instance_id, yang_name="instance-id", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='instance-id', extensions=None), is_container='list', yang_name="instance-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """instance_id must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("instance_id",yc_instance_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_instance_ids_instance_id, yang_name="instance-id", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='instance-id', extensions=None), is_container='list', yang_name="instance-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__instance_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_instance_id(self):
    self.__instance_id = YANGDynClass(base=YANGListType("instance_id",yc_instance_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_instance_ids_instance_id, yang_name="instance-id", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='instance-id', extensions=None), is_container='list', yang_name="instance-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  instance_id = __builtin__.property(_get_instance_id)


  _pyangbind_elements = OrderedDict([('instance_id', instance_id), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_srlgs_ipv4_srlg_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv4-srlgs/ipv4-srlg/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of TLV 138.
  """
  __slots__ = ('_path_helper', '_extmethods', '__instance_number','__system_id','__psn_number','__flags','__ipv4_interface_address','__ipv4_neighbor_address','__srlg_value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__instance_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="instance-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__system_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)
    self.__psn_number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="psn-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'NUMBERED': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__ipv4_interface_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}'}), is_leaf=True, yang_name="ipv4-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)
    self.__ipv4_neighbor_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}'}), is_leaf=True, yang_name="ipv4-neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)
    self.__srlg_value = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="srlg-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv4-srlgs', 'ipv4-srlg', 'state']

  def _get_instance_number(self):
    """
    Getter method for instance_number, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_srlgs/ipv4_srlg/state/instance_number (uint32)

    YANG Description: An arbitrary unsigned 32-bit integer used to
disambiguate the instance of TLV 138. The instance
identifier is synthesised by the system
and may be renumbered for the same SRLG definition
in subsequent advertised LSPs if (and only if) the
entire list of SRLGs is replaced.
    """
    return self.__instance_number
      
  def _set_instance_number(self, v, load=False):
    """
    Setter method for instance_number, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_srlgs/ipv4_srlg/state/instance_number (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_instance_number is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_instance_number() directly.

    YANG Description: An arbitrary unsigned 32-bit integer used to
disambiguate the instance of TLV 138. The instance
identifier is synthesised by the system
and may be renumbered for the same SRLG definition
in subsequent advertised LSPs if (and only if) the
entire list of SRLGs is replaced.
    """
    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="instance-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """instance_number 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="instance-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__instance_number = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_instance_number(self):
    self.__instance_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="instance-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_system_id(self):
    """
    Getter method for system_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_srlgs/ipv4_srlg/state/system_id (oc-isis-types:system-id)

    YANG Description: Neighbor system ID.
    """
    return self.__system_id
      
  def _set_system_id(self, v, load=False):
    """
    Setter method for system_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_srlgs/ipv4_srlg/state/system_id (oc-isis-types:system-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_system_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_system_id() directly.

    YANG Description: Neighbor system ID.
    """
    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]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """system_id must be of a type compatible with oc-isis-types:system-id""",
          'defined-type': "oc-isis-types:system-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)""",
        })

    self.__system_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_system_id(self):
    self.__system_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)


  def _get_psn_number(self):
    """
    Getter method for psn_number, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_srlgs/ipv4_srlg/state/psn_number (uint8)

    YANG Description: Pseudonode number if the neighbor is on a LAN
interface.
    """
    return self.__psn_number
      
  def _set_psn_number(self, v, load=False):
    """
    Setter method for psn_number, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_srlgs/ipv4_srlg/state/psn_number (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_psn_number is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_psn_number() directly.

    YANG Description: Pseudonode number if the neighbor is on a LAN
interface.
    """
    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="psn-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """psn_number 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="psn-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__psn_number = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_psn_number(self):
    self.__psn_number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="psn-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_flags(self):
    """
    Getter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_srlgs/ipv4_srlg/state/flags (enumeration)

    YANG Description: SRLG flags.
    """
    return self.__flags
      
  def _set_flags(self, v, load=False):
    """
    Setter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_srlgs/ipv4_srlg/state/flags (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flags() directly.

    YANG Description: SRLG flags.
    """
    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={'NUMBERED': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flags must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'NUMBERED': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_flags(self):
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'NUMBERED': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_ipv4_interface_address(self):
    """
    Getter method for ipv4_interface_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_srlgs/ipv4_srlg/state/ipv4_interface_address (inet:ipv4-address)

    YANG Description: IPv4 interface address.
    """
    return self.__ipv4_interface_address
      
  def _set_ipv4_interface_address(self, v, load=False):
    """
    Setter method for ipv4_interface_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_srlgs/ipv4_srlg/state/ipv4_interface_address (inet:ipv4-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv4_interface_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv4_interface_address() directly.

    YANG Description: IPv4 interface address.
    """
    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}'}), is_leaf=True, yang_name="ipv4-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv4_interface_address must be of a type compatible with inet:ipv4-address""",
          'defined-type': "inet:ipv4-address",
          '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}'}), is_leaf=True, yang_name="ipv4-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)""",
        })

    self.__ipv4_interface_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv4_interface_address(self):
    self.__ipv4_interface_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}'}), is_leaf=True, yang_name="ipv4-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)


  def _get_ipv4_neighbor_address(self):
    """
    Getter method for ipv4_neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_srlgs/ipv4_srlg/state/ipv4_neighbor_address (inet:ipv4-address)

    YANG Description: IPv4 neighbor address.
    """
    return self.__ipv4_neighbor_address
      
  def _set_ipv4_neighbor_address(self, v, load=False):
    """
    Setter method for ipv4_neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_srlgs/ipv4_srlg/state/ipv4_neighbor_address (inet:ipv4-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv4_neighbor_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv4_neighbor_address() directly.

    YANG Description: IPv4 neighbor address.
    """
    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}'}), is_leaf=True, yang_name="ipv4-neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv4_neighbor_address must be of a type compatible with inet:ipv4-address""",
          'defined-type': "inet:ipv4-address",
          '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}'}), is_leaf=True, yang_name="ipv4-neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)""",
        })

    self.__ipv4_neighbor_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv4_neighbor_address(self):
    self.__ipv4_neighbor_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}'}), is_leaf=True, yang_name="ipv4-neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)


  def _get_srlg_value(self):
    """
    Getter method for srlg_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_srlgs/ipv4_srlg/state/srlg_value (uint32)

    YANG Description: List of SRLG values.
    """
    return self.__srlg_value
      
  def _set_srlg_value(self, v, load=False):
    """
    Setter method for srlg_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_srlgs/ipv4_srlg/state/srlg_value (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_srlg_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_srlg_value() directly.

    YANG Description: List of SRLG values.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="srlg-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """srlg_value must be of a type compatible with uint32""",
          'defined-type': "uint32",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="srlg-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__srlg_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_srlg_value(self):
    self.__srlg_value = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="srlg-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  instance_number = __builtin__.property(_get_instance_number)
  system_id = __builtin__.property(_get_system_id)
  psn_number = __builtin__.property(_get_psn_number)
  flags = __builtin__.property(_get_flags)
  ipv4_interface_address = __builtin__.property(_get_ipv4_interface_address)
  ipv4_neighbor_address = __builtin__.property(_get_ipv4_neighbor_address)
  srlg_value = __builtin__.property(_get_srlg_value)


  _pyangbind_elements = OrderedDict([('instance_number', instance_number), ('system_id', system_id), ('psn_number', psn_number), ('flags', flags), ('ipv4_interface_address', ipv4_interface_address), ('ipv4_neighbor_address', ipv4_neighbor_address), ('srlg_value', srlg_value), ])


class yc_ipv4_srlg_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_srlgs_ipv4_srlg(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv4-srlgs/ipv4-srlg. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Instance of the IPv4 SRLG TLV
  """
  __slots__ = ('_path_helper', '_extmethods', '__instance_number','__state',)

  _yang_name = 'ipv4-srlg'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__instance_number = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="instance-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_srlgs_ipv4_srlg_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv4-srlgs', 'ipv4-srlg']

  def _get_instance_number(self):
    """
    Getter method for instance_number, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_srlgs/ipv4_srlg/instance_number (leafref)

    YANG Description: Reference to the instance number of TLV 138.
    """
    return self.__instance_number
      
  def _set_instance_number(self, v, load=False):
    """
    Setter method for instance_number, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_srlgs/ipv4_srlg/instance_number (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_instance_number is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_instance_number() directly.

    YANG Description: Reference to the instance number of TLV 138.
    """
    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="instance-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """instance_number must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="instance-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__instance_number = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_instance_number(self):
    self.__instance_number = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="instance-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_srlgs/ipv4_srlg/state (container)

    YANG Description: State parameters of TLV 138.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_srlgs/ipv4_srlg/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 parameters of TLV 138.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_srlgs_ipv4_srlg_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_srlgs_ipv4_srlg_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_srlgs_ipv4_srlg_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  instance_number = __builtin__.property(_get_instance_number)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('instance_number', instance_number), ('state', state), ])


class yc_ipv4_srlgs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_srlgs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv4-srlgs. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS SRLG TLV 138.
  """
  __slots__ = ('_path_helper', '_extmethods', '__ipv4_srlg',)

  _yang_name = 'ipv4-srlgs'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__ipv4_srlg = YANGDynClass(base=YANGListType("instance_number",yc_ipv4_srlg_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_srlgs_ipv4_srlg, yang_name="ipv4-srlg", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='instance-number', extensions=None), is_container='list', yang_name="ipv4-srlg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv4-srlgs']

  def _get_ipv4_srlg(self):
    """
    Getter method for ipv4_srlg, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_srlgs/ipv4_srlg (list)

    YANG Description: Instance of the IPv4 SRLG TLV
    """
    return self.__ipv4_srlg
      
  def _set_ipv4_srlg(self, v, load=False):
    """
    Setter method for ipv4_srlg, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_srlgs/ipv4_srlg (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv4_srlg is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv4_srlg() directly.

    YANG Description: Instance of the IPv4 SRLG TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("instance_number",yc_ipv4_srlg_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_srlgs_ipv4_srlg, yang_name="ipv4-srlg", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='instance-number', extensions=None), is_container='list', yang_name="ipv4-srlg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv4_srlg must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("instance_number",yc_ipv4_srlg_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_srlgs_ipv4_srlg, yang_name="ipv4-srlg", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='instance-number', extensions=None), is_container='list', yang_name="ipv4-srlg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__ipv4_srlg = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv4_srlg(self):
    self.__ipv4_srlg = YANGDynClass(base=YANGListType("instance_number",yc_ipv4_srlg_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_srlgs_ipv4_srlg, yang_name="ipv4-srlg", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='instance-number', extensions=None), is_container='list', yang_name="ipv4-srlg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  ipv4_srlg = __builtin__.property(_get_ipv4_srlg)


  _pyangbind_elements = OrderedDict([('ipv4_srlg', ipv4_srlg), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_srlgs_ipv6_srlg_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv6-srlgs/ipv6-srlg/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of TLV 139.
  """
  __slots__ = ('_path_helper', '_extmethods', '__instance_number','__system_id','__psn_number','__flags','__ipv6_interface_address','__ipv6_neighbor_address','__srlg_value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__instance_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="instance-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__system_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)
    self.__psn_number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="psn-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'NA': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__ipv6_interface_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}|:))'}), is_leaf=True, yang_name="ipv6-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)
    self.__ipv6_neighbor_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}|:))'}), is_leaf=True, yang_name="ipv6-neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)
    self.__srlg_value = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="srlg-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv6-srlgs', 'ipv6-srlg', 'state']

  def _get_instance_number(self):
    """
    Getter method for instance_number, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_srlgs/ipv6_srlg/state/instance_number (uint32)

    YANG Description: An arbitrary unsigned 32-bit integer used to
disambiguate the instance of TLV 138. The instance
identifier is synthesised by the system
and may be renumbered for the same SRLG definition
in subsequent advertised LSPs if (and only if) the
entire list of SRLGs is replaced.
    """
    return self.__instance_number
      
  def _set_instance_number(self, v, load=False):
    """
    Setter method for instance_number, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_srlgs/ipv6_srlg/state/instance_number (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_instance_number is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_instance_number() directly.

    YANG Description: An arbitrary unsigned 32-bit integer used to
disambiguate the instance of TLV 138. The instance
identifier is synthesised by the system
and may be renumbered for the same SRLG definition
in subsequent advertised LSPs if (and only if) the
entire list of SRLGs is replaced.
    """
    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="instance-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """instance_number 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="instance-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__instance_number = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_instance_number(self):
    self.__instance_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="instance-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_system_id(self):
    """
    Getter method for system_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_srlgs/ipv6_srlg/state/system_id (oc-isis-types:system-id)

    YANG Description: Neighbor system ID.
    """
    return self.__system_id
      
  def _set_system_id(self, v, load=False):
    """
    Setter method for system_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_srlgs/ipv6_srlg/state/system_id (oc-isis-types:system-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_system_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_system_id() directly.

    YANG Description: Neighbor system ID.
    """
    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]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """system_id must be of a type compatible with oc-isis-types:system-id""",
          'defined-type': "oc-isis-types:system-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)""",
        })

    self.__system_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_system_id(self):
    self.__system_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)


  def _get_psn_number(self):
    """
    Getter method for psn_number, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_srlgs/ipv6_srlg/state/psn_number (uint8)

    YANG Description: Pseudonode number if the neighbor is on a LAN
interface.
    """
    return self.__psn_number
      
  def _set_psn_number(self, v, load=False):
    """
    Setter method for psn_number, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_srlgs/ipv6_srlg/state/psn_number (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_psn_number is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_psn_number() directly.

    YANG Description: Pseudonode number if the neighbor is on a LAN
interface.
    """
    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="psn-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """psn_number 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="psn-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__psn_number = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_psn_number(self):
    self.__psn_number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="psn-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_flags(self):
    """
    Getter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_srlgs/ipv6_srlg/state/flags (enumeration)

    YANG Description: IPv6 SRLG flags.
    """
    return self.__flags
      
  def _set_flags(self, v, load=False):
    """
    Setter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_srlgs/ipv6_srlg/state/flags (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flags() directly.

    YANG Description: IPv6 SRLG flags.
    """
    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={'NA': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flags must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'NA': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_flags(self):
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'NA': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_ipv6_interface_address(self):
    """
    Getter method for ipv6_interface_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_srlgs/ipv6_srlg/state/ipv6_interface_address (inet:ipv6-address)

    YANG Description: IPv6 interface address or Link Local Identifier.
    """
    return self.__ipv6_interface_address
      
  def _set_ipv6_interface_address(self, v, load=False):
    """
    Setter method for ipv6_interface_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_srlgs/ipv6_srlg/state/ipv6_interface_address (inet:ipv6-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6_interface_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6_interface_address() directly.

    YANG Description: IPv6 interface address or Link Local Identifier.
    """
    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}|:))'}), is_leaf=True, yang_name="ipv6-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6_interface_address must be of a type compatible with inet:ipv6-address""",
          'defined-type': "inet:ipv6-address",
          '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}|:))'}), is_leaf=True, yang_name="ipv6-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)""",
        })

    self.__ipv6_interface_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6_interface_address(self):
    self.__ipv6_interface_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}|:))'}), is_leaf=True, yang_name="ipv6-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)


  def _get_ipv6_neighbor_address(self):
    """
    Getter method for ipv6_neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_srlgs/ipv6_srlg/state/ipv6_neighbor_address (inet:ipv6-address)

    YANG Description: IPv6 neighbor address or Link Remote Identifier.
    """
    return self.__ipv6_neighbor_address
      
  def _set_ipv6_neighbor_address(self, v, load=False):
    """
    Setter method for ipv6_neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_srlgs/ipv6_srlg/state/ipv6_neighbor_address (inet:ipv6-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6_neighbor_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6_neighbor_address() directly.

    YANG Description: IPv6 neighbor address or Link Remote Identifier.
    """
    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}|:))'}), is_leaf=True, yang_name="ipv6-neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6_neighbor_address must be of a type compatible with inet:ipv6-address""",
          'defined-type': "inet:ipv6-address",
          '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}|:))'}), is_leaf=True, yang_name="ipv6-neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)""",
        })

    self.__ipv6_neighbor_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6_neighbor_address(self):
    self.__ipv6_neighbor_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}|:))'}), is_leaf=True, yang_name="ipv6-neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)


  def _get_srlg_value(self):
    """
    Getter method for srlg_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_srlgs/ipv6_srlg/state/srlg_value (uint32)

    YANG Description: SRLG values.
    """
    return self.__srlg_value
      
  def _set_srlg_value(self, v, load=False):
    """
    Setter method for srlg_value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_srlgs/ipv6_srlg/state/srlg_value (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_srlg_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_srlg_value() directly.

    YANG Description: SRLG values.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="srlg-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """srlg_value must be of a type compatible with uint32""",
          'defined-type': "uint32",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="srlg-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__srlg_value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_srlg_value(self):
    self.__srlg_value = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="srlg-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  instance_number = __builtin__.property(_get_instance_number)
  system_id = __builtin__.property(_get_system_id)
  psn_number = __builtin__.property(_get_psn_number)
  flags = __builtin__.property(_get_flags)
  ipv6_interface_address = __builtin__.property(_get_ipv6_interface_address)
  ipv6_neighbor_address = __builtin__.property(_get_ipv6_neighbor_address)
  srlg_value = __builtin__.property(_get_srlg_value)


  _pyangbind_elements = OrderedDict([('instance_number', instance_number), ('system_id', system_id), ('psn_number', psn_number), ('flags', flags), ('ipv6_interface_address', ipv6_interface_address), ('ipv6_neighbor_address', ipv6_neighbor_address), ('srlg_value', srlg_value), ])


class yc_ipv6_srlg_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_srlgs_ipv6_srlg(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv6-srlgs/ipv6-srlg. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Instance of the IPv6 SRLG TLV.
  """
  __slots__ = ('_path_helper', '_extmethods', '__instance_number','__state',)

  _yang_name = 'ipv6-srlg'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__instance_number = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="instance-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_srlgs_ipv6_srlg_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv6-srlgs', 'ipv6-srlg']

  def _get_instance_number(self):
    """
    Getter method for instance_number, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_srlgs/ipv6_srlg/instance_number (leafref)

    YANG Description: Reference to the instance number of the IPv6 Shared
Risk Link Group (SRLG) TLV.
    """
    return self.__instance_number
      
  def _set_instance_number(self, v, load=False):
    """
    Setter method for instance_number, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_srlgs/ipv6_srlg/instance_number (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_instance_number is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_instance_number() directly.

    YANG Description: Reference to the instance number of the IPv6 Shared
Risk Link Group (SRLG) TLV.
    """
    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="instance-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """instance_number must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="instance-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__instance_number = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_instance_number(self):
    self.__instance_number = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="instance-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_srlgs/ipv6_srlg/state (container)

    YANG Description: State parameters of TLV 139.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_srlgs/ipv6_srlg/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 parameters of TLV 139.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_srlgs_ipv6_srlg_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_srlgs_ipv6_srlg_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_srlgs_ipv6_srlg_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  instance_number = __builtin__.property(_get_instance_number)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('instance_number', instance_number), ('state', state), ])


class yc_ipv6_srlgs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_srlgs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv6-srlgs. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS SRLG TLV.
  """
  __slots__ = ('_path_helper', '_extmethods', '__ipv6_srlg',)

  _yang_name = 'ipv6-srlgs'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__ipv6_srlg = YANGDynClass(base=YANGListType("instance_number",yc_ipv6_srlg_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_srlgs_ipv6_srlg, yang_name="ipv6-srlg", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='instance-number', extensions=None), is_container='list', yang_name="ipv6-srlg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv6-srlgs']

  def _get_ipv6_srlg(self):
    """
    Getter method for ipv6_srlg, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_srlgs/ipv6_srlg (list)

    YANG Description: Instance of the IPv6 SRLG TLV.
    """
    return self.__ipv6_srlg
      
  def _set_ipv6_srlg(self, v, load=False):
    """
    Setter method for ipv6_srlg, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_srlgs/ipv6_srlg (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6_srlg is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6_srlg() directly.

    YANG Description: Instance of the IPv6 SRLG TLV.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("instance_number",yc_ipv6_srlg_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_srlgs_ipv6_srlg, yang_name="ipv6-srlg", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='instance-number', extensions=None), is_container='list', yang_name="ipv6-srlg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6_srlg must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("instance_number",yc_ipv6_srlg_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_srlgs_ipv6_srlg, yang_name="ipv6-srlg", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='instance-number', extensions=None), is_container='list', yang_name="ipv6-srlg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__ipv6_srlg = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6_srlg(self):
    self.__ipv6_srlg = YANGDynClass(base=YANGListType("instance_number",yc_ipv6_srlg_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_srlgs_ipv6_srlg, yang_name="ipv6-srlg", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='instance-number', extensions=None), is_container='list', yang_name="ipv6-srlg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  ipv6_srlg = __builtin__.property(_get_ipv6_srlg)


  _pyangbind_elements = OrderedDict([('ipv6_srlg', ipv6_srlg), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_purge_oi_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/purge-oi/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of TLV 13.
  """
  __slots__ = ('_path_helper', '_extmethods', '__system_id_count','__source_system_id','__received_system_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__system_id_count = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="system-id-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__source_system_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="source-system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)
    self.__received_system_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="received-system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'purge-oi', 'state']

  def _get_system_id_count(self):
    """
    Getter method for system_id_count, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/purge_oi/state/system_id_count (uint8)

    YANG Description: Number of system IDs carried in this TLV.
    """
    return self.__system_id_count
      
  def _set_system_id_count(self, v, load=False):
    """
    Setter method for system_id_count, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/purge_oi/state/system_id_count (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_system_id_count is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_system_id_count() directly.

    YANG Description: Number of system IDs carried in this TLV.
    """
    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="system-id-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """system_id_count 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="system-id-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__system_id_count = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_system_id_count(self):
    self.__system_id_count = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="system-id-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_source_system_id(self):
    """
    Getter method for source_system_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/purge_oi/state/source_system_id (oc-isis-types:system-id)

    YANG Description: System ID of the Intermediate System that inserted
this TLV.
    """
    return self.__source_system_id
      
  def _set_source_system_id(self, v, load=False):
    """
    Setter method for source_system_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/purge_oi/state/source_system_id (oc-isis-types:system-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_system_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_system_id() directly.

    YANG Description: System ID of the Intermediate System that inserted
this TLV.
    """
    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]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="source-system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_system_id must be of a type compatible with oc-isis-types:system-id""",
          'defined-type': "oc-isis-types:system-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="source-system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)""",
        })

    self.__source_system_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_system_id(self):
    self.__source_system_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="source-system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)


  def _get_received_system_id(self):
    """
    Getter method for received_system_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/purge_oi/state/received_system_id (oc-isis-types:system-id)

    YANG Description: System ID of the Intermediate System from which the
purge was received.
    """
    return self.__received_system_id
      
  def _set_received_system_id(self, v, load=False):
    """
    Setter method for received_system_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/purge_oi/state/received_system_id (oc-isis-types:system-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_received_system_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_received_system_id() directly.

    YANG Description: System ID of the Intermediate System from which the
purge was received.
    """
    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]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="received-system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """received_system_id must be of a type compatible with oc-isis-types:system-id""",
          'defined-type': "oc-isis-types:system-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="received-system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)""",
        })

    self.__received_system_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_received_system_id(self):
    self.__received_system_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="received-system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)

  system_id_count = __builtin__.property(_get_system_id_count)
  source_system_id = __builtin__.property(_get_source_system_id)
  received_system_id = __builtin__.property(_get_received_system_id)


  _pyangbind_elements = OrderedDict([('system_id_count', system_id_count), ('source_system_id', source_system_id), ('received_system_id', received_system_id), ])


class yc_purge_oi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_purge_oi(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/purge-oi. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS purge TLV.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'purge-oi'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_purge_oi_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'purge-oi']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/purge_oi/state (container)

    YANG Description: State parameters of TLV 13.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/purge_oi/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 parameters of TLV 13.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_purge_oi_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_purge_oi_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_purge_oi_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/router-capabilities/capability/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of TLV 242.
  """
  __slots__ = ('_path_helper', '_extmethods', '__instance_number','__router_id','__flags',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__instance_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="instance-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__router_id = 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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'FLOOD': {}, 'DOWN': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'router-capabilities', 'capability', 'state']

  def _get_instance_number(self):
    """
    Getter method for instance_number, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/state/instance_number (uint32)

    YANG Description: A unique instance number for the instance of the
router capabilities TLV. The instance number should
be autogenerated by the producer of the data and may
be renumbered if the entire LSP contents are
replaced in subsequent advertisements.
    """
    return self.__instance_number
      
  def _set_instance_number(self, v, load=False):
    """
    Setter method for instance_number, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/state/instance_number (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_instance_number is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_instance_number() directly.

    YANG Description: A unique instance number for the instance of the
router capabilities TLV. The instance number should
be autogenerated by the producer of the data and may
be renumbered if the entire LSP contents are
replaced in subsequent advertisements.
    """
    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="instance-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """instance_number 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="instance-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__instance_number = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_instance_number(self):
    self.__instance_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="instance-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_router_id(self):
    """
    Getter method for router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/state/router_id (inet:ipv4-address)

    YANG Description: IPv4 router-id.
    """
    return self.__router_id
      
  def _set_router_id(self, v, load=False):
    """
    Setter method for router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/state/router_id (inet:ipv4-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_router_id() directly.

    YANG Description: IPv4 router-id.
    """
    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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """router_id must be of a type compatible with inet:ipv4-address""",
          'defined-type': "inet:ipv4-address",
          '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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)""",
        })

    self.__router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_router_id(self):
    self.__router_id = 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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)


  def _get_flags(self):
    """
    Getter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/state/flags (enumeration)

    YANG Description: Router capability flags.
    """
    return self.__flags
      
  def _set_flags(self, v, load=False):
    """
    Setter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/state/flags (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flags() directly.

    YANG Description: Router capability flags.
    """
    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={'FLOOD': {}, 'DOWN': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flags must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'FLOOD': {}, 'DOWN': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_flags(self):
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'FLOOD': {}, 'DOWN': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)

  instance_number = __builtin__.property(_get_instance_number)
  router_id = __builtin__.property(_get_router_id)
  flags = __builtin__.property(_get_flags)


  _pyangbind_elements = OrderedDict([('instance_number', instance_number), ('router_id', router_id), ('flags', flags), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/router-capabilities/capability/subtlvs/subtlv/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS Router Capabilities
  """
  __slots__ = ('_path_helper', '_extmethods', '__type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'router-capabilities', 'capability', 'subtlvs', 'subtlv', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/subtlvs/subtlv/state/type (identityref)

    YANG Description: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/subtlvs/subtlv/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: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  type = __builtin__.property(_get_type)


  _pyangbind_elements = OrderedDict([('type', type), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv_segment_routing_algorithms_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/router-capabilities/capability/subtlvs/subtlv/segment-routing-algorithms/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 19 - Segment
Routing Algorithm.
  """
  __slots__ = ('_path_helper', '_extmethods', '__algorithm',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__algorithm = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SPF': {'value': 0}, 'STRICT_SPF': {'value': 1}},)), is_leaf=False, yang_name="algorithm", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'router-capabilities', 'capability', 'subtlvs', 'subtlv', 'segment-routing-algorithms', 'state']

  def _get_algorithm(self):
    """
    Getter method for algorithm, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/subtlvs/subtlv/segment_routing_algorithms/state/algorithm (enumeration)

    YANG Description: The Segment Routing algorithm that is
described by the TLV.
    """
    return self.__algorithm
      
  def _set_algorithm(self, v, load=False):
    """
    Setter method for algorithm, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/subtlvs/subtlv/segment_routing_algorithms/state/algorithm (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_algorithm is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_algorithm() directly.

    YANG Description: The Segment Routing algorithm that is
described by the TLV.
    """
    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={'SPF': {'value': 0}, 'STRICT_SPF': {'value': 1}},)), is_leaf=False, yang_name="algorithm", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """algorithm must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SPF': {'value': 0}, 'STRICT_SPF': {'value': 1}},)), is_leaf=False, yang_name="algorithm", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__algorithm = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_algorithm(self):
    self.__algorithm = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SPF': {'value': 0}, 'STRICT_SPF': {'value': 1}},)), is_leaf=False, yang_name="algorithm", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)

  algorithm = __builtin__.property(_get_algorithm)


  _pyangbind_elements = OrderedDict([('algorithm', algorithm), ])


class yc_segment_routing_algorithms_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv_segment_routing_algorithms(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/router-capabilities/capability/subtlvs/subtlv/segment-routing-algorithms. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines SR algorithm sub-TLV 19.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'segment-routing-algorithms'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv_segment_routing_algorithms_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'router-capabilities', 'capability', 'subtlvs', 'subtlv', 'segment-routing-algorithms']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/subtlvs/subtlv/segment_routing_algorithms/state (container)

    YANG Description: State parameters of sub-TLV 19 - Segment
Routing Algorithm.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/subtlvs/subtlv/segment_routing_algorithms/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 parameters of sub-TLV 19 - Segment
Routing Algorithm.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv_segment_routing_algorithms_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv_segment_routing_algorithms_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv_segment_routing_algorithms_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv_segment_routing_capability_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/router-capabilities/capability/subtlvs/subtlv/segment-routing-capability/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS SR Router Capability
  """
  __slots__ = ('_path_helper', '_extmethods', '__flags',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_MPLS': {}, 'IPV6_MPLS': {}, 'IPV6_SR': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'router-capabilities', 'capability', 'subtlvs', 'subtlv', 'segment-routing-capability', 'state']

  def _get_flags(self):
    """
    Getter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/subtlvs/subtlv/segment_routing_capability/state/flags (enumeration)

    YANG Description: Segment Routing Capability Flags.
    """
    return self.__flags
      
  def _set_flags(self, v, load=False):
    """
    Setter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/subtlvs/subtlv/segment_routing_capability/state/flags (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flags() directly.

    YANG Description: Segment Routing Capability Flags.
    """
    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={'IPV4_MPLS': {}, 'IPV6_MPLS': {}, 'IPV6_SR': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flags must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_MPLS': {}, 'IPV6_MPLS': {}, 'IPV6_SR': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_flags(self):
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4_MPLS': {}, 'IPV6_MPLS': {}, 'IPV6_SR': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)

  flags = __builtin__.property(_get_flags)


  _pyangbind_elements = OrderedDict([('flags', flags), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv_segment_routing_capability_srgb_descriptors_srgb_descriptor_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/router-capabilities/capability/subtlvs/subtlv/segment-routing-capability/srgb-descriptors/srgb-descriptor/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of the SR range
  """
  __slots__ = ('_path_helper', '_extmethods', '__range','__label',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__range = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__label = 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="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'router-capabilities', 'capability', 'subtlvs', 'subtlv', 'segment-routing-capability', 'srgb-descriptors', 'srgb-descriptor', 'state']

  def _get_range(self):
    """
    Getter method for range, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/subtlvs/subtlv/segment_routing_capability/srgb_descriptors/srgb_descriptor/state/range (uint32)

    YANG Description: Number of SRGB elements. The range
value MUST be greater than 0.
    """
    return self.__range
      
  def _set_range(self, v, load=False):
    """
    Setter method for range, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/subtlvs/subtlv/segment_routing_capability/srgb_descriptors/srgb_descriptor/state/range (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_range is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_range() directly.

    YANG Description: Number of SRGB elements. The range
value MUST be greater than 0.
    """
    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="range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """range 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="range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__range = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_range(self):
    self.__range = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_label(self):
    """
    Getter method for label, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/subtlvs/subtlv/segment_routing_capability/srgb_descriptors/srgb_descriptor/state/label (oc-mplst:mpls-label)

    YANG Description: The first value of the SRGB when
expressed as an MPLS label.
    """
    return self.__label
      
  def _set_label(self, v, load=False):
    """
    Setter method for label, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/subtlvs/subtlv/segment_routing_capability/srgb_descriptors/srgb_descriptor/state/label (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_label() directly.

    YANG Description: The first value of the SRGB when
expressed as an MPLS 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': ['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="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """label must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)""",
        })

    self.__label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_label(self):
    self.__label = 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="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)

  range = __builtin__.property(_get_range)
  label = __builtin__.property(_get_label)


  _pyangbind_elements = OrderedDict([('range', range), ('label', label), ])


class yc_srgb_descriptor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv_segment_routing_capability_srgb_descriptors_srgb_descriptor(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/router-capabilities/capability/subtlvs/subtlv/segment-routing-capability/srgb-descriptors/srgb-descriptor. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Descriptor entry within the SR capabilty
sub-TLV
  """
  __slots__ = ('_path_helper', '_extmethods', '__range','__state',)

  _yang_name = 'srgb-descriptor'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__range = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv_segment_routing_capability_srgb_descriptors_srgb_descriptor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'router-capabilities', 'capability', 'subtlvs', 'subtlv', 'segment-routing-capability', 'srgb-descriptors', 'srgb-descriptor']

  def _get_range(self):
    """
    Getter method for range, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/subtlvs/subtlv/segment_routing_capability/srgb_descriptors/srgb_descriptor/range (leafref)

    YANG Description: Reference to unique SRGB Descriptor.
    """
    return self.__range
      
  def _set_range(self, v, load=False):
    """
    Setter method for range, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/subtlvs/subtlv/segment_routing_capability/srgb_descriptors/srgb_descriptor/range (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_range is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_range() directly.

    YANG Description: Reference to unique SRGB Descriptor.
    """
    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="range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """range must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__range = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_range(self):
    self.__range = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/subtlvs/subtlv/segment_routing_capability/srgb_descriptors/srgb_descriptor/state (container)

    YANG Description: State parameters of the SR range
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/subtlvs/subtlv/segment_routing_capability/srgb_descriptors/srgb_descriptor/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 parameters of the SR range
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv_segment_routing_capability_srgb_descriptors_srgb_descriptor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv_segment_routing_capability_srgb_descriptors_srgb_descriptor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv_segment_routing_capability_srgb_descriptors_srgb_descriptor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  range = __builtin__.property(_get_range)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('range', range), ('state', state), ])


class yc_srgb_descriptors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv_segment_routing_capability_srgb_descriptors(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/router-capabilities/capability/subtlvs/subtlv/segment-routing-capability/srgb-descriptors. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: SRGB Descriptors included within the SR
capability sub-TLV
  """
  __slots__ = ('_path_helper', '_extmethods', '__srgb_descriptor',)

  _yang_name = 'srgb-descriptors'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__srgb_descriptor = YANGDynClass(base=YANGListType("range",yc_srgb_descriptor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv_segment_routing_capability_srgb_descriptors_srgb_descriptor, yang_name="srgb-descriptor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='range', extensions=None), is_container='list', yang_name="srgb-descriptor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'router-capabilities', 'capability', 'subtlvs', 'subtlv', 'segment-routing-capability', 'srgb-descriptors']

  def _get_srgb_descriptor(self):
    """
    Getter method for srgb_descriptor, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/subtlvs/subtlv/segment_routing_capability/srgb_descriptors/srgb_descriptor (list)

    YANG Description: Descriptor entry within the SR capabilty
sub-TLV
    """
    return self.__srgb_descriptor
      
  def _set_srgb_descriptor(self, v, load=False):
    """
    Setter method for srgb_descriptor, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/subtlvs/subtlv/segment_routing_capability/srgb_descriptors/srgb_descriptor (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_srgb_descriptor is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_srgb_descriptor() directly.

    YANG Description: Descriptor entry within the SR capabilty
sub-TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("range",yc_srgb_descriptor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv_segment_routing_capability_srgb_descriptors_srgb_descriptor, yang_name="srgb-descriptor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='range', extensions=None), is_container='list', yang_name="srgb-descriptor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """srgb_descriptor must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("range",yc_srgb_descriptor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv_segment_routing_capability_srgb_descriptors_srgb_descriptor, yang_name="srgb-descriptor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='range', extensions=None), is_container='list', yang_name="srgb-descriptor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__srgb_descriptor = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_srgb_descriptor(self):
    self.__srgb_descriptor = YANGDynClass(base=YANGListType("range",yc_srgb_descriptor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv_segment_routing_capability_srgb_descriptors_srgb_descriptor, yang_name="srgb-descriptor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='range', extensions=None), is_container='list', yang_name="srgb-descriptor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  srgb_descriptor = __builtin__.property(_get_srgb_descriptor)


  _pyangbind_elements = OrderedDict([('srgb_descriptor', srgb_descriptor), ])


class yc_segment_routing_capability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv_segment_routing_capability(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/router-capabilities/capability/subtlvs/subtlv/segment-routing-capability. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines SR Capability sub-TLV 2.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state','__srgb_descriptors',)

  _yang_name = 'segment-routing-capability'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv_segment_routing_capability_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__srgb_descriptors = YANGDynClass(base=yc_srgb_descriptors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv_segment_routing_capability_srgb_descriptors, is_container='container', yang_name="srgb-descriptors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'router-capabilities', 'capability', 'subtlvs', 'subtlv', 'segment-routing-capability']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/subtlvs/subtlv/segment_routing_capability/state (container)

    YANG Description: State parameters of IS SR Router Capability
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/subtlvs/subtlv/segment_routing_capability/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 parameters of IS SR Router Capability
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv_segment_routing_capability_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv_segment_routing_capability_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv_segment_routing_capability_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_srgb_descriptors(self):
    """
    Getter method for srgb_descriptors, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/subtlvs/subtlv/segment_routing_capability/srgb_descriptors (container)

    YANG Description: SRGB Descriptors included within the SR
capability sub-TLV
    """
    return self.__srgb_descriptors
      
  def _set_srgb_descriptors(self, v, load=False):
    """
    Setter method for srgb_descriptors, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/subtlvs/subtlv/segment_routing_capability/srgb_descriptors (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_srgb_descriptors is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_srgb_descriptors() directly.

    YANG Description: SRGB Descriptors included within the SR
capability sub-TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_srgb_descriptors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv_segment_routing_capability_srgb_descriptors, is_container='container', yang_name="srgb-descriptors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """srgb_descriptors must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_srgb_descriptors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv_segment_routing_capability_srgb_descriptors, is_container='container', yang_name="srgb-descriptors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__srgb_descriptors = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_srgb_descriptors(self):
    self.__srgb_descriptors = YANGDynClass(base=yc_srgb_descriptors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv_segment_routing_capability_srgb_descriptors, is_container='container', yang_name="srgb-descriptors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)
  srgb_descriptors = __builtin__.property(_get_srgb_descriptors)


  _pyangbind_elements = OrderedDict([('state', state), ('srgb_descriptors', srgb_descriptors), ])


class yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/router-capabilities/capability/subtlvs/subtlv. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of subTLV types in the LSDB for the specified
TLV
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__state','__segment_routing_algorithms','__segment_routing_capability',)

  _yang_name = 'subtlv'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__segment_routing_algorithms = YANGDynClass(base=yc_segment_routing_algorithms_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv_segment_routing_algorithms, is_container='container', yang_name="segment-routing-algorithms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__segment_routing_capability = YANGDynClass(base=yc_segment_routing_capability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv_segment_routing_capability, is_container='container', yang_name="segment-routing-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'router-capabilities', 'capability', 'subtlvs', 'subtlv']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/subtlvs/subtlv/type (leafref)

    YANG Description: Reference to the sub-TLV type
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/subtlvs/subtlv/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 sub-TLV type
    """
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/subtlvs/subtlv/state (container)

    YANG Description: State parameters of IS Router Capabilities
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/subtlvs/subtlv/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 parameters of IS Router Capabilities
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_segment_routing_algorithms(self):
    """
    Getter method for segment_routing_algorithms, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/subtlvs/subtlv/segment_routing_algorithms (container)

    YANG Description: This container defines SR algorithm sub-TLV 19.
    """
    return self.__segment_routing_algorithms
      
  def _set_segment_routing_algorithms(self, v, load=False):
    """
    Setter method for segment_routing_algorithms, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/subtlvs/subtlv/segment_routing_algorithms (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_segment_routing_algorithms is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_segment_routing_algorithms() directly.

    YANG Description: This container defines SR algorithm sub-TLV 19.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_segment_routing_algorithms_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv_segment_routing_algorithms, is_container='container', yang_name="segment-routing-algorithms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """segment_routing_algorithms must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_segment_routing_algorithms_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv_segment_routing_algorithms, is_container='container', yang_name="segment-routing-algorithms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__segment_routing_algorithms = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_segment_routing_algorithms(self):
    self.__segment_routing_algorithms = YANGDynClass(base=yc_segment_routing_algorithms_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv_segment_routing_algorithms, is_container='container', yang_name="segment-routing-algorithms", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_segment_routing_capability(self):
    """
    Getter method for segment_routing_capability, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/subtlvs/subtlv/segment_routing_capability (container)

    YANG Description: This container defines SR Capability sub-TLV 2.
    """
    return self.__segment_routing_capability
      
  def _set_segment_routing_capability(self, v, load=False):
    """
    Setter method for segment_routing_capability, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/subtlvs/subtlv/segment_routing_capability (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_segment_routing_capability is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_segment_routing_capability() directly.

    YANG Description: This container defines SR Capability sub-TLV 2.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_segment_routing_capability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv_segment_routing_capability, is_container='container', yang_name="segment-routing-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """segment_routing_capability must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_segment_routing_capability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv_segment_routing_capability, is_container='container', yang_name="segment-routing-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__segment_routing_capability = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_segment_routing_capability(self):
    self.__segment_routing_capability = YANGDynClass(base=yc_segment_routing_capability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv_segment_routing_capability, is_container='container', yang_name="segment-routing-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  type = __builtin__.property(_get_type)
  state = __builtin__.property(_get_state)
  segment_routing_algorithms = __builtin__.property(_get_segment_routing_algorithms)
  segment_routing_capability = __builtin__.property(_get_segment_routing_capability)


  _pyangbind_elements = OrderedDict([('type', type), ('state', state), ('segment_routing_algorithms', segment_routing_algorithms), ('segment_routing_capability', segment_routing_capability), ])


class yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/router-capabilities/capability/subtlvs. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container describes router capability TLV
sub-TLVs
  """
  __slots__ = ('_path_helper', '_extmethods', '__subtlv',)

  _yang_name = 'subtlvs'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__subtlv = YANGDynClass(base=YANGListType("type",yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv, yang_name="subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'router-capabilities', 'capability', 'subtlvs']

  def _get_subtlv(self):
    """
    Getter method for subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/subtlvs/subtlv (list)

    YANG Description: List of subTLV types in the LSDB for the specified
TLV
    """
    return self.__subtlv
      
  def _set_subtlv(self, v, load=False):
    """
    Setter method for subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/subtlvs/subtlv (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_subtlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_subtlv() directly.

    YANG Description: List of subTLV types in the LSDB for the specified
TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("type",yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv, yang_name="subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """subtlv must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("type",yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv, yang_name="subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__subtlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_subtlv(self):
    self.__subtlv = YANGDynClass(base=YANGListType("type",yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs_subtlv, yang_name="subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  subtlv = __builtin__.property(_get_subtlv)


  _pyangbind_elements = OrderedDict([('subtlv', subtlv), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_undefined_subtlvs_undefined_subtlv_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/router-capabilities/capability/undefined-subtlvs/undefined-subtlv/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of the undefined sub-TLV.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__length','__value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__value = YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'router-capabilities', 'capability', 'undefined-subtlvs', 'undefined-subtlv', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/undefined_subtlvs/undefined_subtlv/state/type (uint8)

    YANG Description: TLV Type.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/undefined_subtlvs/undefined_subtlv/state/type (uint8)
    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: TLV Type.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with uint8""",
          'defined-type': "uint8",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_length(self):
    """
    Getter method for length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/undefined_subtlvs/undefined_subtlv/state/length (uint8)

    YANG Description: TLV length.
    """
    return self.__length
      
  def _set_length(self, v, load=False):
    """
    Setter method for length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/undefined_subtlvs/undefined_subtlv/state/length (uint8)
    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: TLV length.
    """
    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="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """length 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="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', 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..255']}, int_size=8), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/undefined_subtlvs/undefined_subtlv/state/value (binary)

    YANG Description: TLV value.
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/undefined_subtlvs/undefined_subtlv/state/value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: TLV value.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  type = __builtin__.property(_get_type)
  length = __builtin__.property(_get_length)
  value = __builtin__.property(_get_value)


  _pyangbind_elements = OrderedDict([('type', type), ('length', length), ('value', value), ])


class yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_undefined_subtlvs_undefined_subtlv(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/router-capabilities/capability/undefined-subtlvs/undefined-subtlv. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Sub-TLVs that are not defined in the model or not
recognised by system.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__state',)

  _yang_name = 'undefined-subtlv'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_undefined_subtlvs_undefined_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'router-capabilities', 'capability', 'undefined-subtlvs', 'undefined-subtlv']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/undefined_subtlvs/undefined_subtlv/type (leafref)

    YANG Description: Reference to the type of the undefined sub-TLV
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/undefined_subtlvs/undefined_subtlv/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 type of the undefined sub-TLV
    """
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/undefined_subtlvs/undefined_subtlv/state (container)

    YANG Description: State parameters of the undefined sub-TLV.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/undefined_subtlvs/undefined_subtlv/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 parameters of the undefined sub-TLV.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_undefined_subtlvs_undefined_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_undefined_subtlvs_undefined_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_undefined_subtlvs_undefined_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  type = __builtin__.property(_get_type)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('type', type), ('state', state), ])


class yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_undefined_subtlvs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/router-capabilities/capability/undefined-subtlvs. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container describes undefined ISIS TLVs.
  """
  __slots__ = ('_path_helper', '_extmethods', '__undefined_subtlv',)

  _yang_name = 'undefined-subtlvs'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__undefined_subtlv = YANGDynClass(base=YANGListType("type",yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_undefined_subtlvs_undefined_subtlv, yang_name="undefined-subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="undefined-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'router-capabilities', 'capability', 'undefined-subtlvs']

  def _get_undefined_subtlv(self):
    """
    Getter method for undefined_subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/undefined_subtlvs/undefined_subtlv (list)

    YANG Description: Sub-TLVs that are not defined in the model or not
recognised by system.
    """
    return self.__undefined_subtlv
      
  def _set_undefined_subtlv(self, v, load=False):
    """
    Setter method for undefined_subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/undefined_subtlvs/undefined_subtlv (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_undefined_subtlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_undefined_subtlv() directly.

    YANG Description: Sub-TLVs that are not defined in the model or not
recognised by system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("type",yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_undefined_subtlvs_undefined_subtlv, yang_name="undefined-subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="undefined-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """undefined_subtlv must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("type",yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_undefined_subtlvs_undefined_subtlv, yang_name="undefined-subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="undefined-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__undefined_subtlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_undefined_subtlv(self):
    self.__undefined_subtlv = YANGDynClass(base=YANGListType("type",yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_undefined_subtlvs_undefined_subtlv, yang_name="undefined-subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="undefined-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  undefined_subtlv = __builtin__.property(_get_undefined_subtlv)


  _pyangbind_elements = OrderedDict([('undefined_subtlv', undefined_subtlv), ])


class yc_capability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/router-capabilities/capability. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This list describes IS Router capabilities.
  """
  __slots__ = ('_path_helper', '_extmethods', '__instance_number','__state','__subtlvs','__undefined_subtlvs',)

  _yang_name = 'capability'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__instance_number = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="instance-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__subtlvs = YANGDynClass(base=yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs, is_container='container', yang_name="subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__undefined_subtlvs = YANGDynClass(base=yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_undefined_subtlvs, is_container='container', yang_name="undefined-subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'router-capabilities', 'capability']

  def _get_instance_number(self):
    """
    Getter method for instance_number, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/instance_number (leafref)

    YANG Description: Reference to the instance number of the router
capability TLV.
    """
    return self.__instance_number
      
  def _set_instance_number(self, v, load=False):
    """
    Setter method for instance_number, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/instance_number (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_instance_number is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_instance_number() directly.

    YANG Description: Reference to the instance number of the router
capability TLV.
    """
    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="instance-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """instance_number must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="instance-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__instance_number = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_instance_number(self):
    self.__instance_number = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="instance-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/state (container)

    YANG Description: State parameters of TLV 242.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/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 parameters of TLV 242.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_subtlvs(self):
    """
    Getter method for subtlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/subtlvs (container)

    YANG Description: This container describes router capability TLV
sub-TLVs
    """
    return self.__subtlvs
      
  def _set_subtlvs(self, v, load=False):
    """
    Setter method for subtlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/subtlvs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_subtlvs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_subtlvs() directly.

    YANG Description: This container describes router capability TLV
sub-TLVs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs, is_container='container', yang_name="subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """subtlvs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs, is_container='container', yang_name="subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__subtlvs = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_subtlvs(self):
    self.__subtlvs = YANGDynClass(base=yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_subtlvs, is_container='container', yang_name="subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_undefined_subtlvs(self):
    """
    Getter method for undefined_subtlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/undefined_subtlvs (container)

    YANG Description: This container describes undefined ISIS TLVs.
    """
    return self.__undefined_subtlvs
      
  def _set_undefined_subtlvs(self, v, load=False):
    """
    Setter method for undefined_subtlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability/undefined_subtlvs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_undefined_subtlvs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_undefined_subtlvs() directly.

    YANG Description: This container describes undefined ISIS TLVs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_undefined_subtlvs, is_container='container', yang_name="undefined-subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """undefined_subtlvs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_undefined_subtlvs, is_container='container', yang_name="undefined-subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__undefined_subtlvs = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_undefined_subtlvs(self):
    self.__undefined_subtlvs = YANGDynClass(base=yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability_undefined_subtlvs, is_container='container', yang_name="undefined-subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  instance_number = __builtin__.property(_get_instance_number)
  state = __builtin__.property(_get_state)
  subtlvs = __builtin__.property(_get_subtlvs)
  undefined_subtlvs = __builtin__.property(_get_undefined_subtlvs)


  _pyangbind_elements = OrderedDict([('instance_number', instance_number), ('state', state), ('subtlvs', subtlvs), ('undefined_subtlvs', undefined_subtlvs), ])


class yc_router_capabilities_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/router-capabilities. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines router capabilities.
  """
  __slots__ = ('_path_helper', '_extmethods', '__capability',)

  _yang_name = 'router-capabilities'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__capability = YANGDynClass(base=YANGListType("instance_number",yc_capability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability, yang_name="capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='instance-number', extensions=None), is_container='list', yang_name="capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'router-capabilities']

  def _get_capability(self):
    """
    Getter method for capability, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability (list)

    YANG Description: This list describes IS Router capabilities.
    """
    return self.__capability
      
  def _set_capability(self, v, load=False):
    """
    Setter method for capability, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities/capability (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_capability is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_capability() directly.

    YANG Description: This list describes IS Router capabilities.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("instance_number",yc_capability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability, yang_name="capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='instance-number', extensions=None), is_container='list', yang_name="capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """capability must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("instance_number",yc_capability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability, yang_name="capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='instance-number', extensions=None), is_container='list', yang_name="capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__capability = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_capability(self):
    self.__capability = YANGDynClass(base=YANGListType("instance_number",yc_capability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities_capability, yang_name="capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='instance-number', extensions=None), is_container='list', yang_name="capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  capability = __builtin__.property(_get_capability)


  _pyangbind_elements = OrderedDict([('capability', capability), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/is-reachability/neighbors/neighbor/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS standard neighbor.
  """
  __slots__ = ('_path_helper', '_extmethods', '__system_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__system_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'is-reachability', 'neighbors', 'neighbor', 'state']

  def _get_system_id(self):
    """
    Getter method for system_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors/neighbor/state/system_id (oc-isis-types:system-id)

    YANG Description: System-ID of IS neighbor.
    """
    return self.__system_id
      
  def _set_system_id(self, v, load=False):
    """
    Setter method for system_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors/neighbor/state/system_id (oc-isis-types:system-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_system_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_system_id() directly.

    YANG Description: System-ID of IS neighbor.
    """
    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]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """system_id must be of a type compatible with oc-isis-types:system-id""",
          'defined-type': "oc-isis-types:system-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)""",
        })

    self.__system_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_system_id(self):
    self.__system_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)

  system_id = __builtin__.property(_get_system_id)


  _pyangbind_elements = OrderedDict([('system_id', system_id), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_default_metric_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/is-reachability/neighbors/neighbor/default-metric/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters for default-metric.
  """
  __slots__ = ('_path_helper', '_extmethods', '__flags','__metric',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__flags = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}},), is_leaf=True, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'is-reachability', 'neighbors', 'neighbor', 'default-metric', 'state']

  def _get_flags(self):
    """
    Getter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors/neighbor/default_metric/state/flags (enumeration)

    YANG Description: ISIS Default-Metric Flags.
    """
    return self.__flags
      
  def _set_flags(self, v, load=False):
    """
    Setter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors/neighbor/default_metric/state/flags (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flags() directly.

    YANG Description: ISIS Default-Metric Flags.
    """
    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={'INTERNAL': {}},), is_leaf=True, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flags must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}},), is_leaf=True, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_flags(self):
    self.__flags = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}},), is_leaf=True, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors/neighbor/default_metric/state/metric (oc-isis-types:narrow-metric)

    YANG Description: ISIS default metric value. This is a metric understood by
every Intermediate system in the domain. Each circuit
shall have a positive  integral value assigned for this
metric. The value may be associated with any  objective
function of the circuit, but by convention is intended to
measure the capacity of the circuit for handling traffic,
for example, its throughput in  bits-per-second. Higher
values indicate a lower capacity.
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors/neighbor/default_metric/state/metric (oc-isis-types:narrow-metric)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: ISIS default metric value. This is a metric understood by
every Intermediate system in the domain. Each circuit
shall have a positive  integral value assigned for this
metric. The value may be associated with any  objective
function of the circuit, but by convention is intended to
measure the capacity of the circuit for handling traffic,
for example, its throughput in  bits-per-second. Higher
values indicate a lower capacity.
    """
    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': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric must be of a type compatible with oc-isis-types:narrow-metric""",
          'defined-type': "oc-isis-types:narrow-metric",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)

  flags = __builtin__.property(_get_flags)
  metric = __builtin__.property(_get_metric)


  _pyangbind_elements = OrderedDict([('flags', flags), ('metric', metric), ])


class yc_default_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_default_metric(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/is-reachability/neighbors/neighbor/default-metric. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS Default Metric.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'default-metric'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_default_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'is-reachability', 'neighbors', 'neighbor', 'default-metric']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors/neighbor/default_metric/state (container)

    YANG Description: State parameters for default-metric.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors/neighbor/default_metric/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 parameters for default-metric.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_default_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_default_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_default_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_delay_metric_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/is-reachability/neighbors/neighbor/delay-metric/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of delay-metric.
  """
  __slots__ = ('_path_helper', '_extmethods', '__metric','__flags',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}, 'UNSUPPORTED': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='isis-metric-flags', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'is-reachability', 'neighbors', 'neighbor', 'delay-metric', 'state']

  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors/neighbor/delay_metric/state/metric (oc-isis-types:narrow-metric)

    YANG Description: ISIS delay metric value. This metric measures the transit
delay of the associated circuit. It is an optional metric,
which if assigned to a circuit shall have a positive
integral value. Higher values indicate a longer transit
delay.
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors/neighbor/delay_metric/state/metric (oc-isis-types:narrow-metric)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: ISIS delay metric value. This metric measures the transit
delay of the associated circuit. It is an optional metric,
which if assigned to a circuit shall have a positive
integral value. Higher values indicate a longer transit
delay.
    """
    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': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric must be of a type compatible with oc-isis-types:narrow-metric""",
          'defined-type': "oc-isis-types:narrow-metric",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)


  def _get_flags(self):
    """
    Getter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors/neighbor/delay_metric/state/flags (isis-metric-flags)

    YANG Description: ISIS Delay Metric Flags.
    """
    return self.__flags
      
  def _set_flags(self, v, load=False):
    """
    Setter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors/neighbor/delay_metric/state/flags (isis-metric-flags)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flags() directly.

    YANG Description: ISIS Delay Metric Flags.
    """
    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={'INTERNAL': {}, 'UNSUPPORTED': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='isis-metric-flags', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flags must be of a type compatible with isis-metric-flags""",
          'defined-type': "openconfig-network-instance:isis-metric-flags",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}, 'UNSUPPORTED': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='isis-metric-flags', is_config=False)""",
        })

    self.__flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_flags(self):
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}, 'UNSUPPORTED': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='isis-metric-flags', is_config=False)

  metric = __builtin__.property(_get_metric)
  flags = __builtin__.property(_get_flags)


  _pyangbind_elements = OrderedDict([('metric', metric), ('flags', flags), ])


class yc_delay_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_delay_metric(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/is-reachability/neighbors/neighbor/delay-metric. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines the ISIS delay metric.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'delay-metric'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_delay_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'is-reachability', 'neighbors', 'neighbor', 'delay-metric']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors/neighbor/delay_metric/state (container)

    YANG Description: State parameters of delay-metric.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors/neighbor/delay_metric/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 parameters of delay-metric.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_delay_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_delay_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_delay_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_expense_metric_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/is-reachability/neighbors/neighbor/expense-metric/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of expense-metric.
  """
  __slots__ = ('_path_helper', '_extmethods', '__metric','__flags',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}, 'UNSUPPORTED': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='isis-metric-flags', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'is-reachability', 'neighbors', 'neighbor', 'expense-metric', 'state']

  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors/neighbor/expense_metric/state/metric (oc-isis-types:narrow-metric)

    YANG Description: ISIS expense metric value. This metric measures the
monetary cost of utilising the associated circuit. It is
an optional metric, which if assigned to a circuit shall
have a positive integral value1). Higher values indicate a
larger monetary expense.
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors/neighbor/expense_metric/state/metric (oc-isis-types:narrow-metric)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: ISIS expense metric value. This metric measures the
monetary cost of utilising the associated circuit. It is
an optional metric, which if assigned to a circuit shall
have a positive integral value1). Higher values indicate a
larger monetary expense.
    """
    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': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric must be of a type compatible with oc-isis-types:narrow-metric""",
          'defined-type': "oc-isis-types:narrow-metric",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)


  def _get_flags(self):
    """
    Getter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors/neighbor/expense_metric/state/flags (isis-metric-flags)

    YANG Description: ISIS Expense Metric Flags.
    """
    return self.__flags
      
  def _set_flags(self, v, load=False):
    """
    Setter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors/neighbor/expense_metric/state/flags (isis-metric-flags)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flags() directly.

    YANG Description: ISIS Expense Metric Flags.
    """
    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={'INTERNAL': {}, 'UNSUPPORTED': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='isis-metric-flags', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flags must be of a type compatible with isis-metric-flags""",
          'defined-type': "openconfig-network-instance:isis-metric-flags",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}, 'UNSUPPORTED': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='isis-metric-flags', is_config=False)""",
        })

    self.__flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_flags(self):
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}, 'UNSUPPORTED': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='isis-metric-flags', is_config=False)

  metric = __builtin__.property(_get_metric)
  flags = __builtin__.property(_get_flags)


  _pyangbind_elements = OrderedDict([('metric', metric), ('flags', flags), ])


class yc_expense_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_expense_metric(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/is-reachability/neighbors/neighbor/expense-metric. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines the ISIS expense metric.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'expense-metric'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_expense_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'is-reachability', 'neighbors', 'neighbor', 'expense-metric']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors/neighbor/expense_metric/state (container)

    YANG Description: State parameters of expense-metric.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors/neighbor/expense_metric/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 parameters of expense-metric.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_expense_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_expense_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_expense_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_error_metric_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/is-reachability/neighbors/neighbor/error-metric/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of error-metric.
  """
  __slots__ = ('_path_helper', '_extmethods', '__metric','__flags',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}, 'UNSUPPORTED': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='isis-metric-flags', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'is-reachability', 'neighbors', 'neighbor', 'error-metric', 'state']

  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors/neighbor/error_metric/state/metric (oc-isis-types:narrow-metric)

    YANG Description: ISIS error metric value. This metric measures the
residual error probability of the associated circuit. It
is an optional metric, which if assigned to a circuit
shall have a non-zero value. Higher values indicate a
larger probability of undetected errors on the circuit.
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors/neighbor/error_metric/state/metric (oc-isis-types:narrow-metric)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: ISIS error metric value. This metric measures the
residual error probability of the associated circuit. It
is an optional metric, which if assigned to a circuit
shall have a non-zero value. Higher values indicate a
larger probability of undetected errors on the circuit.
    """
    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': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric must be of a type compatible with oc-isis-types:narrow-metric""",
          'defined-type': "oc-isis-types:narrow-metric",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)


  def _get_flags(self):
    """
    Getter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors/neighbor/error_metric/state/flags (isis-metric-flags)

    YANG Description: IS-IS error metric flags.
    """
    return self.__flags
      
  def _set_flags(self, v, load=False):
    """
    Setter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors/neighbor/error_metric/state/flags (isis-metric-flags)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flags() directly.

    YANG Description: IS-IS error metric flags.
    """
    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={'INTERNAL': {}, 'UNSUPPORTED': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='isis-metric-flags', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flags must be of a type compatible with isis-metric-flags""",
          'defined-type': "openconfig-network-instance:isis-metric-flags",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}, 'UNSUPPORTED': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='isis-metric-flags', is_config=False)""",
        })

    self.__flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_flags(self):
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}, 'UNSUPPORTED': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='isis-metric-flags', is_config=False)

  metric = __builtin__.property(_get_metric)
  flags = __builtin__.property(_get_flags)


  _pyangbind_elements = OrderedDict([('metric', metric), ('flags', flags), ])


class yc_error_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_error_metric(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/is-reachability/neighbors/neighbor/error-metric. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines the ISIS error metric.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'error-metric'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_error_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'is-reachability', 'neighbors', 'neighbor', 'error-metric']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors/neighbor/error_metric/state (container)

    YANG Description: State parameters of error-metric.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors/neighbor/error_metric/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 parameters of error-metric.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_error_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_error_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_error_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/is-reachability/neighbors/neighbor. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: IS reachability neighbor attributes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__system_id','__state','__default_metric','__delay_metric','__expense_metric','__error_metric',)

  _yang_name = 'neighbor'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__system_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__default_metric = YANGDynClass(base=yc_default_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_default_metric, is_container='container', yang_name="default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__delay_metric = YANGDynClass(base=yc_delay_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_delay_metric, is_container='container', yang_name="delay-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__expense_metric = YANGDynClass(base=yc_expense_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_expense_metric, is_container='container', yang_name="expense-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__error_metric = YANGDynClass(base=yc_error_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_error_metric, is_container='container', yang_name="error-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'is-reachability', 'neighbors', 'neighbor']

  def _get_system_id(self):
    """
    Getter method for system_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors/neighbor/system_id (leafref)

    YANG Description: Reference to the system ID of the neighbor.
    """
    return self.__system_id
      
  def _set_system_id(self, v, load=False):
    """
    Setter method for system_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors/neighbor/system_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_system_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_system_id() directly.

    YANG Description: Reference to the system ID of the neighbor.
    """
    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="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """system_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__system_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_system_id(self):
    self.__system_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors/neighbor/state (container)

    YANG Description: State parameters of IS standard neighbor.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors/neighbor/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 parameters of IS standard neighbor.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_default_metric(self):
    """
    Getter method for default_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors/neighbor/default_metric (container)

    YANG Description: This container defines ISIS Default Metric.
    """
    return self.__default_metric
      
  def _set_default_metric(self, v, load=False):
    """
    Setter method for default_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors/neighbor/default_metric (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_default_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_default_metric() directly.

    YANG Description: This container defines ISIS Default Metric.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_default_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_default_metric, is_container='container', yang_name="default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """default_metric must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_default_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_default_metric, is_container='container', yang_name="default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__default_metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_default_metric(self):
    self.__default_metric = YANGDynClass(base=yc_default_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_default_metric, is_container='container', yang_name="default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_delay_metric(self):
    """
    Getter method for delay_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors/neighbor/delay_metric (container)

    YANG Description: This container defines the ISIS delay metric.
    """
    return self.__delay_metric
      
  def _set_delay_metric(self, v, load=False):
    """
    Setter method for delay_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors/neighbor/delay_metric (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_delay_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_delay_metric() directly.

    YANG Description: This container defines the ISIS delay metric.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_delay_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_delay_metric, is_container='container', yang_name="delay-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """delay_metric must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_delay_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_delay_metric, is_container='container', yang_name="delay-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__delay_metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_delay_metric(self):
    self.__delay_metric = YANGDynClass(base=yc_delay_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_delay_metric, is_container='container', yang_name="delay-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_expense_metric(self):
    """
    Getter method for expense_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors/neighbor/expense_metric (container)

    YANG Description: This container defines the ISIS expense metric.
    """
    return self.__expense_metric
      
  def _set_expense_metric(self, v, load=False):
    """
    Setter method for expense_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors/neighbor/expense_metric (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_expense_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_expense_metric() directly.

    YANG Description: This container defines the ISIS expense metric.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_expense_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_expense_metric, is_container='container', yang_name="expense-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """expense_metric must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_expense_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_expense_metric, is_container='container', yang_name="expense-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__expense_metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_expense_metric(self):
    self.__expense_metric = YANGDynClass(base=yc_expense_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_expense_metric, is_container='container', yang_name="expense-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_error_metric(self):
    """
    Getter method for error_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors/neighbor/error_metric (container)

    YANG Description: This container defines the ISIS error metric.
    """
    return self.__error_metric
      
  def _set_error_metric(self, v, load=False):
    """
    Setter method for error_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors/neighbor/error_metric (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_error_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_error_metric() directly.

    YANG Description: This container defines the ISIS error metric.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_error_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_error_metric, is_container='container', yang_name="error-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """error_metric must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_error_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_error_metric, is_container='container', yang_name="error-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__error_metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_error_metric(self):
    self.__error_metric = YANGDynClass(base=yc_error_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor_error_metric, is_container='container', yang_name="error-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  system_id = __builtin__.property(_get_system_id)
  state = __builtin__.property(_get_state)
  default_metric = __builtin__.property(_get_default_metric)
  delay_metric = __builtin__.property(_get_delay_metric)
  expense_metric = __builtin__.property(_get_expense_metric)
  error_metric = __builtin__.property(_get_error_metric)


  _pyangbind_elements = OrderedDict([('system_id', system_id), ('state', state), ('default_metric', default_metric), ('delay_metric', delay_metric), ('expense_metric', expense_metric), ('error_metric', error_metric), ])


class yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/is-reachability/neighbors. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container describes IS neighbors.
  """
  __slots__ = ('_path_helper', '_extmethods', '__neighbor',)

  _yang_name = 'neighbors'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__neighbor = YANGDynClass(base=YANGListType("system_id",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='system-id', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'is-reachability', 'neighbors']

  def _get_neighbor(self):
    """
    Getter method for neighbor, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors/neighbor (list)

    YANG Description: IS reachability neighbor attributes.
    """
    return self.__neighbor
      
  def _set_neighbor(self, v, load=False):
    """
    Setter method for neighbor, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors/neighbor (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor() directly.

    YANG Description: IS reachability neighbor attributes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("system_id",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='system-id', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("system_id",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='system-id', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__neighbor = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor(self):
    self.__neighbor = YANGDynClass(base=YANGListType("system_id",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='system-id', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  neighbor = __builtin__.property(_get_neighbor)


  _pyangbind_elements = OrderedDict([('neighbor', neighbor), ])


class yc_is_reachability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/is-reachability. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container describes list of ISIS neighbors and
attributes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__neighbors',)

  _yang_name = 'is-reachability'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__neighbors = YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'is-reachability']

  def _get_neighbors(self):
    """
    Getter method for neighbors, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors (container)

    YANG Description: This container describes IS neighbors.
    """
    return self.__neighbors
      
  def _set_neighbors(self, v, load=False):
    """
    Setter method for neighbors, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability/neighbors (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbors is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbors() directly.

    YANG Description: This container describes IS neighbors.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbors must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__neighbors = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbors(self):
    self.__neighbors = YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  neighbors = __builtin__.property(_get_neighbors)


  _pyangbind_elements = OrderedDict([('neighbors', neighbors), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv4-internal-reachability/prefixes/prefix/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IPv4 standard prefix.
  """
  __slots__ = ('_path_helper', '_extmethods', '__up_down','__prefix',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__up_down = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="up-down", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__prefix = 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-prefix', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv4-internal-reachability', 'prefixes', 'prefix', 'state']

  def _get_up_down(self):
    """
    Getter method for up_down, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix/state/up_down (boolean)

    YANG Description: The up/down bit. Set if a prefix is advertised from a
higher level to a lower level (e.g., level 2 to level 1),
indicating that the prefix has traveled down the hierarchy.
Prefixes that have the up/down bit set may only be
advertised down the hierarchy, i.e., to lower levels. When a
prefix is first injected into IS-IS, the bit is UNSET.
    """
    return self.__up_down
      
  def _set_up_down(self, v, load=False):
    """
    Setter method for up_down, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix/state/up_down (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_up_down is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_up_down() directly.

    YANG Description: The up/down bit. Set if a prefix is advertised from a
higher level to a lower level (e.g., level 2 to level 1),
indicating that the prefix has traveled down the hierarchy.
Prefixes that have the up/down bit set may only be
advertised down the hierarchy, i.e., to lower levels. When a
prefix is first injected into IS-IS, the bit is UNSET.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="up-down", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """up_down must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="up-down", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__up_down = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_up_down(self):
    self.__up_down = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="up-down", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix/state/prefix (inet:ipv4-prefix)

    YANG Description: IPv4 prefix contained within reachability TLVs.
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix/state/prefix (inet:ipv4-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: IPv4 prefix contained within reachability TLVs.
    """
    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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with inet:ipv4-prefix""",
          'defined-type': "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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-prefix', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-prefix', is_config=False)

  up_down = __builtin__.property(_get_up_down)
  prefix = __builtin__.property(_get_prefix)


  _pyangbind_elements = OrderedDict([('up_down', up_down), ('prefix', prefix), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_default_metric_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv4-internal-reachability/prefixes/prefix/default-metric/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters for default-metric.
  """
  __slots__ = ('_path_helper', '_extmethods', '__flags','__metric',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__flags = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}},), is_leaf=True, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv4-internal-reachability', 'prefixes', 'prefix', 'default-metric', 'state']

  def _get_flags(self):
    """
    Getter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix/default_metric/state/flags (enumeration)

    YANG Description: ISIS Default-Metric Flags.
    """
    return self.__flags
      
  def _set_flags(self, v, load=False):
    """
    Setter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix/default_metric/state/flags (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flags() directly.

    YANG Description: ISIS Default-Metric Flags.
    """
    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={'INTERNAL': {}},), is_leaf=True, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flags must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}},), is_leaf=True, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_flags(self):
    self.__flags = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}},), is_leaf=True, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix/default_metric/state/metric (oc-isis-types:narrow-metric)

    YANG Description: ISIS default metric value. This is a metric understood by
every Intermediate system in the domain. Each circuit
shall have a positive  integral value assigned for this
metric. The value may be associated with any  objective
function of the circuit, but by convention is intended to
measure the capacity of the circuit for handling traffic,
for example, its throughput in  bits-per-second. Higher
values indicate a lower capacity.
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix/default_metric/state/metric (oc-isis-types:narrow-metric)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: ISIS default metric value. This is a metric understood by
every Intermediate system in the domain. Each circuit
shall have a positive  integral value assigned for this
metric. The value may be associated with any  objective
function of the circuit, but by convention is intended to
measure the capacity of the circuit for handling traffic,
for example, its throughput in  bits-per-second. Higher
values indicate a lower capacity.
    """
    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': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric must be of a type compatible with oc-isis-types:narrow-metric""",
          'defined-type': "oc-isis-types:narrow-metric",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)

  flags = __builtin__.property(_get_flags)
  metric = __builtin__.property(_get_metric)


  _pyangbind_elements = OrderedDict([('flags', flags), ('metric', metric), ])


class yc_default_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_default_metric(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv4-internal-reachability/prefixes/prefix/default-metric. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS Default Metric.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'default-metric'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_default_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv4-internal-reachability', 'prefixes', 'prefix', 'default-metric']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix/default_metric/state (container)

    YANG Description: State parameters for default-metric.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix/default_metric/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 parameters for default-metric.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_default_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_default_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_default_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_delay_metric_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv4-internal-reachability/prefixes/prefix/delay-metric/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of delay-metric.
  """
  __slots__ = ('_path_helper', '_extmethods', '__metric','__flags',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}, 'UNSUPPORTED': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='isis-metric-flags', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv4-internal-reachability', 'prefixes', 'prefix', 'delay-metric', 'state']

  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix/delay_metric/state/metric (oc-isis-types:narrow-metric)

    YANG Description: ISIS delay metric value. This metric measures the transit
delay of the associated circuit. It is an optional metric,
which if assigned to a circuit shall have a positive
integral value. Higher values indicate a longer transit
delay.
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix/delay_metric/state/metric (oc-isis-types:narrow-metric)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: ISIS delay metric value. This metric measures the transit
delay of the associated circuit. It is an optional metric,
which if assigned to a circuit shall have a positive
integral value. Higher values indicate a longer transit
delay.
    """
    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': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric must be of a type compatible with oc-isis-types:narrow-metric""",
          'defined-type': "oc-isis-types:narrow-metric",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)


  def _get_flags(self):
    """
    Getter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix/delay_metric/state/flags (isis-metric-flags)

    YANG Description: ISIS Delay Metric Flags.
    """
    return self.__flags
      
  def _set_flags(self, v, load=False):
    """
    Setter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix/delay_metric/state/flags (isis-metric-flags)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flags() directly.

    YANG Description: ISIS Delay Metric Flags.
    """
    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={'INTERNAL': {}, 'UNSUPPORTED': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='isis-metric-flags', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flags must be of a type compatible with isis-metric-flags""",
          'defined-type': "openconfig-network-instance:isis-metric-flags",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}, 'UNSUPPORTED': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='isis-metric-flags', is_config=False)""",
        })

    self.__flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_flags(self):
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}, 'UNSUPPORTED': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='isis-metric-flags', is_config=False)

  metric = __builtin__.property(_get_metric)
  flags = __builtin__.property(_get_flags)


  _pyangbind_elements = OrderedDict([('metric', metric), ('flags', flags), ])


class yc_delay_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_delay_metric(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv4-internal-reachability/prefixes/prefix/delay-metric. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines the ISIS delay metric.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'delay-metric'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_delay_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv4-internal-reachability', 'prefixes', 'prefix', 'delay-metric']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix/delay_metric/state (container)

    YANG Description: State parameters of delay-metric.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix/delay_metric/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 parameters of delay-metric.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_delay_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_delay_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_delay_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_expense_metric_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv4-internal-reachability/prefixes/prefix/expense-metric/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of expense-metric.
  """
  __slots__ = ('_path_helper', '_extmethods', '__metric','__flags',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}, 'UNSUPPORTED': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='isis-metric-flags', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv4-internal-reachability', 'prefixes', 'prefix', 'expense-metric', 'state']

  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix/expense_metric/state/metric (oc-isis-types:narrow-metric)

    YANG Description: ISIS expense metric value. This metric measures the
monetary cost of utilising the associated circuit. It is
an optional metric, which if assigned to a circuit shall
have a positive integral value1). Higher values indicate a
larger monetary expense.
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix/expense_metric/state/metric (oc-isis-types:narrow-metric)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: ISIS expense metric value. This metric measures the
monetary cost of utilising the associated circuit. It is
an optional metric, which if assigned to a circuit shall
have a positive integral value1). Higher values indicate a
larger monetary expense.
    """
    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': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric must be of a type compatible with oc-isis-types:narrow-metric""",
          'defined-type': "oc-isis-types:narrow-metric",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)


  def _get_flags(self):
    """
    Getter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix/expense_metric/state/flags (isis-metric-flags)

    YANG Description: ISIS Expense Metric Flags.
    """
    return self.__flags
      
  def _set_flags(self, v, load=False):
    """
    Setter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix/expense_metric/state/flags (isis-metric-flags)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flags() directly.

    YANG Description: ISIS Expense Metric Flags.
    """
    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={'INTERNAL': {}, 'UNSUPPORTED': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='isis-metric-flags', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flags must be of a type compatible with isis-metric-flags""",
          'defined-type': "openconfig-network-instance:isis-metric-flags",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}, 'UNSUPPORTED': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='isis-metric-flags', is_config=False)""",
        })

    self.__flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_flags(self):
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}, 'UNSUPPORTED': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='isis-metric-flags', is_config=False)

  metric = __builtin__.property(_get_metric)
  flags = __builtin__.property(_get_flags)


  _pyangbind_elements = OrderedDict([('metric', metric), ('flags', flags), ])


class yc_expense_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_expense_metric(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv4-internal-reachability/prefixes/prefix/expense-metric. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines the ISIS expense metric.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'expense-metric'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_expense_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv4-internal-reachability', 'prefixes', 'prefix', 'expense-metric']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix/expense_metric/state (container)

    YANG Description: State parameters of expense-metric.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix/expense_metric/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 parameters of expense-metric.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_expense_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_expense_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_expense_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_error_metric_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv4-internal-reachability/prefixes/prefix/error-metric/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of error-metric.
  """
  __slots__ = ('_path_helper', '_extmethods', '__metric','__flags',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}, 'UNSUPPORTED': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='isis-metric-flags', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv4-internal-reachability', 'prefixes', 'prefix', 'error-metric', 'state']

  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix/error_metric/state/metric (oc-isis-types:narrow-metric)

    YANG Description: ISIS error metric value. This metric measures the
residual error probability of the associated circuit. It
is an optional metric, which if assigned to a circuit
shall have a non-zero value. Higher values indicate a
larger probability of undetected errors on the circuit.
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix/error_metric/state/metric (oc-isis-types:narrow-metric)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: ISIS error metric value. This metric measures the
residual error probability of the associated circuit. It
is an optional metric, which if assigned to a circuit
shall have a non-zero value. Higher values indicate a
larger probability of undetected errors on the circuit.
    """
    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': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric must be of a type compatible with oc-isis-types:narrow-metric""",
          'defined-type': "oc-isis-types:narrow-metric",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)


  def _get_flags(self):
    """
    Getter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix/error_metric/state/flags (isis-metric-flags)

    YANG Description: IS-IS error metric flags.
    """
    return self.__flags
      
  def _set_flags(self, v, load=False):
    """
    Setter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix/error_metric/state/flags (isis-metric-flags)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flags() directly.

    YANG Description: IS-IS error metric flags.
    """
    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={'INTERNAL': {}, 'UNSUPPORTED': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='isis-metric-flags', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flags must be of a type compatible with isis-metric-flags""",
          'defined-type': "openconfig-network-instance:isis-metric-flags",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}, 'UNSUPPORTED': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='isis-metric-flags', is_config=False)""",
        })

    self.__flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_flags(self):
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}, 'UNSUPPORTED': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='isis-metric-flags', is_config=False)

  metric = __builtin__.property(_get_metric)
  flags = __builtin__.property(_get_flags)


  _pyangbind_elements = OrderedDict([('metric', metric), ('flags', flags), ])


class yc_error_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_error_metric(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv4-internal-reachability/prefixes/prefix/error-metric. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines the ISIS error metric.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'error-metric'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_error_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv4-internal-reachability', 'prefixes', 'prefix', 'error-metric']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix/error_metric/state (container)

    YANG Description: State parameters of error-metric.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix/error_metric/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 parameters of error-metric.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_error_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_error_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_error_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv4-internal-reachability/prefixes/prefix. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: IPv4 prefixes and internal reachability attributes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix','__state','__default_metric','__delay_metric','__expense_metric','__error_metric',)

  _yang_name = 'prefix'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__default_metric = YANGDynClass(base=yc_default_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_default_metric, is_container='container', yang_name="default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__delay_metric = YANGDynClass(base=yc_delay_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_delay_metric, is_container='container', yang_name="delay-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__expense_metric = YANGDynClass(base=yc_expense_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_expense_metric, is_container='container', yang_name="expense-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__error_metric = YANGDynClass(base=yc_error_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_error_metric, is_container='container', yang_name="error-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv4-internal-reachability', 'prefixes', 'prefix']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix/prefix (leafref)

    YANG Description: Reference to the IPv4 prefix
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix/prefix (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: Reference to the IPv4 prefix
    """
    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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix/state (container)

    YANG Description: State parameters of IPv4 standard prefix.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix/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 parameters of IPv4 standard prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_default_metric(self):
    """
    Getter method for default_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix/default_metric (container)

    YANG Description: This container defines ISIS Default Metric.
    """
    return self.__default_metric
      
  def _set_default_metric(self, v, load=False):
    """
    Setter method for default_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix/default_metric (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_default_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_default_metric() directly.

    YANG Description: This container defines ISIS Default Metric.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_default_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_default_metric, is_container='container', yang_name="default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """default_metric must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_default_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_default_metric, is_container='container', yang_name="default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__default_metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_default_metric(self):
    self.__default_metric = YANGDynClass(base=yc_default_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_default_metric, is_container='container', yang_name="default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_delay_metric(self):
    """
    Getter method for delay_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix/delay_metric (container)

    YANG Description: This container defines the ISIS delay metric.
    """
    return self.__delay_metric
      
  def _set_delay_metric(self, v, load=False):
    """
    Setter method for delay_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix/delay_metric (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_delay_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_delay_metric() directly.

    YANG Description: This container defines the ISIS delay metric.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_delay_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_delay_metric, is_container='container', yang_name="delay-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """delay_metric must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_delay_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_delay_metric, is_container='container', yang_name="delay-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__delay_metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_delay_metric(self):
    self.__delay_metric = YANGDynClass(base=yc_delay_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_delay_metric, is_container='container', yang_name="delay-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_expense_metric(self):
    """
    Getter method for expense_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix/expense_metric (container)

    YANG Description: This container defines the ISIS expense metric.
    """
    return self.__expense_metric
      
  def _set_expense_metric(self, v, load=False):
    """
    Setter method for expense_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix/expense_metric (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_expense_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_expense_metric() directly.

    YANG Description: This container defines the ISIS expense metric.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_expense_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_expense_metric, is_container='container', yang_name="expense-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """expense_metric must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_expense_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_expense_metric, is_container='container', yang_name="expense-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__expense_metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_expense_metric(self):
    self.__expense_metric = YANGDynClass(base=yc_expense_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_expense_metric, is_container='container', yang_name="expense-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_error_metric(self):
    """
    Getter method for error_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix/error_metric (container)

    YANG Description: This container defines the ISIS error metric.
    """
    return self.__error_metric
      
  def _set_error_metric(self, v, load=False):
    """
    Setter method for error_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix/error_metric (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_error_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_error_metric() directly.

    YANG Description: This container defines the ISIS error metric.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_error_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_error_metric, is_container='container', yang_name="error-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """error_metric must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_error_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_error_metric, is_container='container', yang_name="error-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__error_metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_error_metric(self):
    self.__error_metric = YANGDynClass(base=yc_error_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix_error_metric, is_container='container', yang_name="error-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  prefix = __builtin__.property(_get_prefix)
  state = __builtin__.property(_get_state)
  default_metric = __builtin__.property(_get_default_metric)
  delay_metric = __builtin__.property(_get_delay_metric)
  expense_metric = __builtin__.property(_get_expense_metric)
  error_metric = __builtin__.property(_get_error_metric)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ('state', state), ('default_metric', default_metric), ('delay_metric', delay_metric), ('expense_metric', expense_metric), ('error_metric', error_metric), ])


class yc_prefixes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv4-internal-reachability/prefixes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container describes IS prefixes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix',)

  _yang_name = 'prefixes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = YANGDynClass(base=YANGListType("prefix",yc_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix, yang_name="prefix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix', extensions=None), is_container='list', yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv4-internal-reachability', 'prefixes']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix (list)

    YANG Description: IPv4 prefixes and internal reachability attributes.
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefix (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: IPv4 prefixes and internal reachability attributes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("prefix",yc_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix, yang_name="prefix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix', extensions=None), is_container='list', yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("prefix",yc_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix, yang_name="prefix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix', extensions=None), is_container='list', yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = YANGDynClass(base=YANGListType("prefix",yc_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes_prefix, yang_name="prefix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix', extensions=None), is_container='list', yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  prefix = __builtin__.property(_get_prefix)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ])


class yc_ipv4_internal_reachability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv4-internal-reachability. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines list of IPv4 internal reachability
information.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefixes',)

  _yang_name = 'ipv4-internal-reachability'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefixes = YANGDynClass(base=yc_prefixes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes, is_container='container', yang_name="prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv4-internal-reachability']

  def _get_prefixes(self):
    """
    Getter method for prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes (container)

    YANG Description: This container describes IS prefixes.
    """
    return self.__prefixes
      
  def _set_prefixes(self, v, load=False):
    """
    Setter method for prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefixes() directly.

    YANG Description: This container describes IS prefixes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefixes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes, is_container='container', yang_name="prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefixes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefixes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes, is_container='container', yang_name="prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefixes(self):
    self.__prefixes = YANGDynClass(base=yc_prefixes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability_prefixes, is_container='container', yang_name="prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  prefixes = __builtin__.property(_get_prefixes)


  _pyangbind_elements = OrderedDict([('prefixes', prefixes), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv4-external-reachability/prefixes/prefix/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IPv4 standard prefix.
  """
  __slots__ = ('_path_helper', '_extmethods', '__up_down','__prefix',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__up_down = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="up-down", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__prefix = 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-prefix', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv4-external-reachability', 'prefixes', 'prefix', 'state']

  def _get_up_down(self):
    """
    Getter method for up_down, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix/state/up_down (boolean)

    YANG Description: The up/down bit. Set if a prefix is advertised from a
higher level to a lower level (e.g., level 2 to level 1),
indicating that the prefix has traveled down the hierarchy.
Prefixes that have the up/down bit set may only be
advertised down the hierarchy, i.e., to lower levels. When a
prefix is first injected into IS-IS, the bit is UNSET.
    """
    return self.__up_down
      
  def _set_up_down(self, v, load=False):
    """
    Setter method for up_down, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix/state/up_down (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_up_down is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_up_down() directly.

    YANG Description: The up/down bit. Set if a prefix is advertised from a
higher level to a lower level (e.g., level 2 to level 1),
indicating that the prefix has traveled down the hierarchy.
Prefixes that have the up/down bit set may only be
advertised down the hierarchy, i.e., to lower levels. When a
prefix is first injected into IS-IS, the bit is UNSET.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="up-down", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """up_down must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="up-down", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__up_down = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_up_down(self):
    self.__up_down = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="up-down", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix/state/prefix (inet:ipv4-prefix)

    YANG Description: IPv4 prefix contained within reachability TLVs.
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix/state/prefix (inet:ipv4-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: IPv4 prefix contained within reachability TLVs.
    """
    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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with inet:ipv4-prefix""",
          'defined-type': "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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-prefix', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-prefix', is_config=False)

  up_down = __builtin__.property(_get_up_down)
  prefix = __builtin__.property(_get_prefix)


  _pyangbind_elements = OrderedDict([('up_down', up_down), ('prefix', prefix), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_default_metric_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv4-external-reachability/prefixes/prefix/default-metric/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters for default-metric.
  """
  __slots__ = ('_path_helper', '_extmethods', '__flags','__metric',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__flags = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}},), is_leaf=True, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv4-external-reachability', 'prefixes', 'prefix', 'default-metric', 'state']

  def _get_flags(self):
    """
    Getter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix/default_metric/state/flags (enumeration)

    YANG Description: ISIS Default-Metric Flags.
    """
    return self.__flags
      
  def _set_flags(self, v, load=False):
    """
    Setter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix/default_metric/state/flags (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flags() directly.

    YANG Description: ISIS Default-Metric Flags.
    """
    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={'INTERNAL': {}},), is_leaf=True, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flags must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}},), is_leaf=True, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_flags(self):
    self.__flags = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}},), is_leaf=True, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix/default_metric/state/metric (oc-isis-types:narrow-metric)

    YANG Description: ISIS default metric value. This is a metric understood by
every Intermediate system in the domain. Each circuit
shall have a positive  integral value assigned for this
metric. The value may be associated with any  objective
function of the circuit, but by convention is intended to
measure the capacity of the circuit for handling traffic,
for example, its throughput in  bits-per-second. Higher
values indicate a lower capacity.
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix/default_metric/state/metric (oc-isis-types:narrow-metric)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: ISIS default metric value. This is a metric understood by
every Intermediate system in the domain. Each circuit
shall have a positive  integral value assigned for this
metric. The value may be associated with any  objective
function of the circuit, but by convention is intended to
measure the capacity of the circuit for handling traffic,
for example, its throughput in  bits-per-second. Higher
values indicate a lower capacity.
    """
    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': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric must be of a type compatible with oc-isis-types:narrow-metric""",
          'defined-type': "oc-isis-types:narrow-metric",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)

  flags = __builtin__.property(_get_flags)
  metric = __builtin__.property(_get_metric)


  _pyangbind_elements = OrderedDict([('flags', flags), ('metric', metric), ])


class yc_default_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_default_metric(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv4-external-reachability/prefixes/prefix/default-metric. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS Default Metric.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'default-metric'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_default_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv4-external-reachability', 'prefixes', 'prefix', 'default-metric']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix/default_metric/state (container)

    YANG Description: State parameters for default-metric.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix/default_metric/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 parameters for default-metric.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_default_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_default_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_default_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_delay_metric_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv4-external-reachability/prefixes/prefix/delay-metric/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of delay-metric.
  """
  __slots__ = ('_path_helper', '_extmethods', '__metric','__flags',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}, 'UNSUPPORTED': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='isis-metric-flags', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv4-external-reachability', 'prefixes', 'prefix', 'delay-metric', 'state']

  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix/delay_metric/state/metric (oc-isis-types:narrow-metric)

    YANG Description: ISIS delay metric value. This metric measures the transit
delay of the associated circuit. It is an optional metric,
which if assigned to a circuit shall have a positive
integral value. Higher values indicate a longer transit
delay.
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix/delay_metric/state/metric (oc-isis-types:narrow-metric)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: ISIS delay metric value. This metric measures the transit
delay of the associated circuit. It is an optional metric,
which if assigned to a circuit shall have a positive
integral value. Higher values indicate a longer transit
delay.
    """
    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': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric must be of a type compatible with oc-isis-types:narrow-metric""",
          'defined-type': "oc-isis-types:narrow-metric",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)


  def _get_flags(self):
    """
    Getter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix/delay_metric/state/flags (isis-metric-flags)

    YANG Description: ISIS Delay Metric Flags.
    """
    return self.__flags
      
  def _set_flags(self, v, load=False):
    """
    Setter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix/delay_metric/state/flags (isis-metric-flags)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flags() directly.

    YANG Description: ISIS Delay Metric Flags.
    """
    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={'INTERNAL': {}, 'UNSUPPORTED': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='isis-metric-flags', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flags must be of a type compatible with isis-metric-flags""",
          'defined-type': "openconfig-network-instance:isis-metric-flags",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}, 'UNSUPPORTED': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='isis-metric-flags', is_config=False)""",
        })

    self.__flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_flags(self):
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}, 'UNSUPPORTED': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='isis-metric-flags', is_config=False)

  metric = __builtin__.property(_get_metric)
  flags = __builtin__.property(_get_flags)


  _pyangbind_elements = OrderedDict([('metric', metric), ('flags', flags), ])


class yc_delay_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_delay_metric(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv4-external-reachability/prefixes/prefix/delay-metric. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines the ISIS delay metric.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'delay-metric'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_delay_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv4-external-reachability', 'prefixes', 'prefix', 'delay-metric']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix/delay_metric/state (container)

    YANG Description: State parameters of delay-metric.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix/delay_metric/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 parameters of delay-metric.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_delay_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_delay_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_delay_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_expense_metric_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv4-external-reachability/prefixes/prefix/expense-metric/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of expense-metric.
  """
  __slots__ = ('_path_helper', '_extmethods', '__metric','__flags',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}, 'UNSUPPORTED': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='isis-metric-flags', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv4-external-reachability', 'prefixes', 'prefix', 'expense-metric', 'state']

  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix/expense_metric/state/metric (oc-isis-types:narrow-metric)

    YANG Description: ISIS expense metric value. This metric measures the
monetary cost of utilising the associated circuit. It is
an optional metric, which if assigned to a circuit shall
have a positive integral value1). Higher values indicate a
larger monetary expense.
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix/expense_metric/state/metric (oc-isis-types:narrow-metric)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: ISIS expense metric value. This metric measures the
monetary cost of utilising the associated circuit. It is
an optional metric, which if assigned to a circuit shall
have a positive integral value1). Higher values indicate a
larger monetary expense.
    """
    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': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric must be of a type compatible with oc-isis-types:narrow-metric""",
          'defined-type': "oc-isis-types:narrow-metric",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)


  def _get_flags(self):
    """
    Getter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix/expense_metric/state/flags (isis-metric-flags)

    YANG Description: ISIS Expense Metric Flags.
    """
    return self.__flags
      
  def _set_flags(self, v, load=False):
    """
    Setter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix/expense_metric/state/flags (isis-metric-flags)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flags() directly.

    YANG Description: ISIS Expense Metric Flags.
    """
    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={'INTERNAL': {}, 'UNSUPPORTED': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='isis-metric-flags', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flags must be of a type compatible with isis-metric-flags""",
          'defined-type': "openconfig-network-instance:isis-metric-flags",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}, 'UNSUPPORTED': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='isis-metric-flags', is_config=False)""",
        })

    self.__flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_flags(self):
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}, 'UNSUPPORTED': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='isis-metric-flags', is_config=False)

  metric = __builtin__.property(_get_metric)
  flags = __builtin__.property(_get_flags)


  _pyangbind_elements = OrderedDict([('metric', metric), ('flags', flags), ])


class yc_expense_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_expense_metric(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv4-external-reachability/prefixes/prefix/expense-metric. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines the ISIS expense metric.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'expense-metric'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_expense_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv4-external-reachability', 'prefixes', 'prefix', 'expense-metric']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix/expense_metric/state (container)

    YANG Description: State parameters of expense-metric.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix/expense_metric/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 parameters of expense-metric.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_expense_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_expense_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_expense_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_error_metric_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv4-external-reachability/prefixes/prefix/error-metric/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of error-metric.
  """
  __slots__ = ('_path_helper', '_extmethods', '__metric','__flags',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}, 'UNSUPPORTED': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='isis-metric-flags', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv4-external-reachability', 'prefixes', 'prefix', 'error-metric', 'state']

  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix/error_metric/state/metric (oc-isis-types:narrow-metric)

    YANG Description: ISIS error metric value. This metric measures the
residual error probability of the associated circuit. It
is an optional metric, which if assigned to a circuit
shall have a non-zero value. Higher values indicate a
larger probability of undetected errors on the circuit.
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix/error_metric/state/metric (oc-isis-types:narrow-metric)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: ISIS error metric value. This metric measures the
residual error probability of the associated circuit. It
is an optional metric, which if assigned to a circuit
shall have a non-zero value. Higher values indicate a
larger probability of undetected errors on the circuit.
    """
    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': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric must be of a type compatible with oc-isis-types:narrow-metric""",
          'defined-type': "oc-isis-types:narrow-metric",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..63']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:narrow-metric', is_config=False)


  def _get_flags(self):
    """
    Getter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix/error_metric/state/flags (isis-metric-flags)

    YANG Description: IS-IS error metric flags.
    """
    return self.__flags
      
  def _set_flags(self, v, load=False):
    """
    Setter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix/error_metric/state/flags (isis-metric-flags)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flags() directly.

    YANG Description: IS-IS error metric flags.
    """
    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={'INTERNAL': {}, 'UNSUPPORTED': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='isis-metric-flags', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flags must be of a type compatible with isis-metric-flags""",
          'defined-type': "openconfig-network-instance:isis-metric-flags",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}, 'UNSUPPORTED': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='isis-metric-flags', is_config=False)""",
        })

    self.__flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_flags(self):
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'INTERNAL': {}, 'UNSUPPORTED': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='isis-metric-flags', is_config=False)

  metric = __builtin__.property(_get_metric)
  flags = __builtin__.property(_get_flags)


  _pyangbind_elements = OrderedDict([('metric', metric), ('flags', flags), ])


class yc_error_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_error_metric(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv4-external-reachability/prefixes/prefix/error-metric. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines the ISIS error metric.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'error-metric'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_error_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv4-external-reachability', 'prefixes', 'prefix', 'error-metric']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix/error_metric/state (container)

    YANG Description: State parameters of error-metric.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix/error_metric/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 parameters of error-metric.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_error_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_error_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_error_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv4-external-reachability/prefixes/prefix. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: IPv4 external prefixes and reachability attributes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix','__state','__default_metric','__delay_metric','__expense_metric','__error_metric',)

  _yang_name = 'prefix'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__default_metric = YANGDynClass(base=yc_default_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_default_metric, is_container='container', yang_name="default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__delay_metric = YANGDynClass(base=yc_delay_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_delay_metric, is_container='container', yang_name="delay-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__expense_metric = YANGDynClass(base=yc_expense_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_expense_metric, is_container='container', yang_name="expense-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__error_metric = YANGDynClass(base=yc_error_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_error_metric, is_container='container', yang_name="error-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv4-external-reachability', 'prefixes', 'prefix']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix/prefix (leafref)

    YANG Description: Reference to the IPv4 prefix.
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix/prefix (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: Reference to the IPv4 prefix.
    """
    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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix/state (container)

    YANG Description: State parameters of IPv4 standard prefix.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix/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 parameters of IPv4 standard prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_default_metric(self):
    """
    Getter method for default_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix/default_metric (container)

    YANG Description: This container defines ISIS Default Metric.
    """
    return self.__default_metric
      
  def _set_default_metric(self, v, load=False):
    """
    Setter method for default_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix/default_metric (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_default_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_default_metric() directly.

    YANG Description: This container defines ISIS Default Metric.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_default_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_default_metric, is_container='container', yang_name="default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """default_metric must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_default_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_default_metric, is_container='container', yang_name="default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__default_metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_default_metric(self):
    self.__default_metric = YANGDynClass(base=yc_default_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_default_metric, is_container='container', yang_name="default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_delay_metric(self):
    """
    Getter method for delay_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix/delay_metric (container)

    YANG Description: This container defines the ISIS delay metric.
    """
    return self.__delay_metric
      
  def _set_delay_metric(self, v, load=False):
    """
    Setter method for delay_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix/delay_metric (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_delay_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_delay_metric() directly.

    YANG Description: This container defines the ISIS delay metric.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_delay_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_delay_metric, is_container='container', yang_name="delay-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """delay_metric must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_delay_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_delay_metric, is_container='container', yang_name="delay-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__delay_metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_delay_metric(self):
    self.__delay_metric = YANGDynClass(base=yc_delay_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_delay_metric, is_container='container', yang_name="delay-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_expense_metric(self):
    """
    Getter method for expense_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix/expense_metric (container)

    YANG Description: This container defines the ISIS expense metric.
    """
    return self.__expense_metric
      
  def _set_expense_metric(self, v, load=False):
    """
    Setter method for expense_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix/expense_metric (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_expense_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_expense_metric() directly.

    YANG Description: This container defines the ISIS expense metric.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_expense_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_expense_metric, is_container='container', yang_name="expense-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """expense_metric must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_expense_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_expense_metric, is_container='container', yang_name="expense-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__expense_metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_expense_metric(self):
    self.__expense_metric = YANGDynClass(base=yc_expense_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_expense_metric, is_container='container', yang_name="expense-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_error_metric(self):
    """
    Getter method for error_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix/error_metric (container)

    YANG Description: This container defines the ISIS error metric.
    """
    return self.__error_metric
      
  def _set_error_metric(self, v, load=False):
    """
    Setter method for error_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix/error_metric (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_error_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_error_metric() directly.

    YANG Description: This container defines the ISIS error metric.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_error_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_error_metric, is_container='container', yang_name="error-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """error_metric must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_error_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_error_metric, is_container='container', yang_name="error-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__error_metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_error_metric(self):
    self.__error_metric = YANGDynClass(base=yc_error_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix_error_metric, is_container='container', yang_name="error-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  prefix = __builtin__.property(_get_prefix)
  state = __builtin__.property(_get_state)
  default_metric = __builtin__.property(_get_default_metric)
  delay_metric = __builtin__.property(_get_delay_metric)
  expense_metric = __builtin__.property(_get_expense_metric)
  error_metric = __builtin__.property(_get_error_metric)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ('state', state), ('default_metric', default_metric), ('delay_metric', delay_metric), ('expense_metric', expense_metric), ('error_metric', error_metric), ])


class yc_prefixes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv4-external-reachability/prefixes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container describes IS neighbors.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix',)

  _yang_name = 'prefixes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = YANGDynClass(base=YANGListType("prefix",yc_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix, yang_name="prefix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix', extensions=None), is_container='list', yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv4-external-reachability', 'prefixes']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix (list)

    YANG Description: IPv4 external prefixes and reachability attributes.
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes/prefix (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: IPv4 external prefixes and reachability attributes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("prefix",yc_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix, yang_name="prefix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix', extensions=None), is_container='list', yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("prefix",yc_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix, yang_name="prefix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix', extensions=None), is_container='list', yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = YANGDynClass(base=YANGListType("prefix",yc_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes_prefix, yang_name="prefix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix', extensions=None), is_container='list', yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  prefix = __builtin__.property(_get_prefix)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ])


class yc_ipv4_external_reachability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv4-external-reachability. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines list of IPv4 external reachability
information.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefixes',)

  _yang_name = 'ipv4-external-reachability'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefixes = YANGDynClass(base=yc_prefixes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes, is_container='container', yang_name="prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv4-external-reachability']

  def _get_prefixes(self):
    """
    Getter method for prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes (container)

    YANG Description: This container describes IS neighbors.
    """
    return self.__prefixes
      
  def _set_prefixes(self, v, load=False):
    """
    Setter method for prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/prefixes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefixes() directly.

    YANG Description: This container describes IS neighbors.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefixes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes, is_container='container', yang_name="prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefixes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefixes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes, is_container='container', yang_name="prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefixes(self):
    self.__prefixes = YANGDynClass(base=yc_prefixes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability_prefixes, is_container='container', yang_name="prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  prefixes = __builtin__.property(_get_prefixes)


  _pyangbind_elements = OrderedDict([('prefixes', prefixes), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_authentication_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/authentication/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of TLV 10.
  """
  __slots__ = ('_path_helper', '_extmethods', '__crypto_type','__authentication_key',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__crypto_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'HMAC_MD5': {}, 'CLEARTEXT': {}},), is_leaf=True, yang_name="crypto-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__authentication_key = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'authentication', 'state']

  def _get_crypto_type(self):
    """
    Getter method for crypto_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/authentication/state/crypto_type (enumeration)

    YANG Description: Authentication type to be used.
    """
    return self.__crypto_type
      
  def _set_crypto_type(self, v, load=False):
    """
    Setter method for crypto_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/authentication/state/crypto_type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_crypto_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_crypto_type() directly.

    YANG Description: Authentication type to be used.
    """
    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={'HMAC_MD5': {}, 'CLEARTEXT': {}},), is_leaf=True, yang_name="crypto-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """crypto_type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'HMAC_MD5': {}, 'CLEARTEXT': {}},), is_leaf=True, yang_name="crypto-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__crypto_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_crypto_type(self):
    self.__crypto_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'HMAC_MD5': {}, 'CLEARTEXT': {}},), is_leaf=True, yang_name="crypto-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_authentication_key(self):
    """
    Getter method for authentication_key, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/authentication/state/authentication_key (string)

    YANG Description: Authentication key to be used.
    """
    return self.__authentication_key
      
  def _set_authentication_key(self, v, load=False):
    """
    Setter method for authentication_key, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/authentication/state/authentication_key (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_authentication_key is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_authentication_key() directly.

    YANG Description: Authentication key to be used.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """authentication_key must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__authentication_key = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_authentication_key(self):
    self.__authentication_key = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)

  crypto_type = __builtin__.property(_get_crypto_type)
  authentication_key = __builtin__.property(_get_authentication_key)


  _pyangbind_elements = OrderedDict([('crypto_type', crypto_type), ('authentication_key', authentication_key), ])


class yc_authentication_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_authentication(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/authentication. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines authentication information of the
node.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'authentication'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'authentication']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/authentication/state (container)

    YANG Description: State parameters of TLV 10.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/authentication/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 parameters of TLV 10.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters corresponding to the extended
neighbour.
  """
  __slots__ = ('_path_helper', '_extmethods', '__system_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__system_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'state']

  def _get_system_id(self):
    """
    Getter method for system_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/state/system_id (oc-isis-types:system-id)

    YANG Description: System-id of the neighbor.
    """
    return self.__system_id
      
  def _set_system_id(self, v, load=False):
    """
    Setter method for system_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/state/system_id (oc-isis-types:system-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_system_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_system_id() directly.

    YANG Description: System-id of the neighbor.
    """
    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]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """system_id must be of a type compatible with oc-isis-types:system-id""",
          'defined-type': "oc-isis-types:system-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)""",
        })

    self.__system_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_system_id(self):
    self.__system_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)

  system_id = __builtin__.property(_get_system_id)


  _pyangbind_elements = OrderedDict([('system_id', system_id), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of extended neighbor
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__metric',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:wide-metric', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'state']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/state/id (uint64)

    YANG Description: Unique identifier for the instance of the
TLV for the IS neighbor. The instance
ID is not required to be consistent across
across readvertisements of the LSP.
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/state/id (uint64)
    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: Unique identifier for the instance of the
TLV for the IS neighbor. The instance
ID is not required to be consistent across
across readvertisements of the LSP.
    """
    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="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id 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="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_id(self):
    self.__id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/state/metric (oc-isis-types:wide-metric)

    YANG Description: Metric value.
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/state/metric (oc-isis-types:wide-metric)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: Metric value.
    """
    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': ['1..16777215']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:wide-metric', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric must be of a type compatible with oc-isis-types:wide-metric""",
          'defined-type': "oc-isis-types:wide-metric",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:wide-metric', is_config=False)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:wide-metric', is_config=False)

  id = __builtin__.property(_get_id)
  metric = __builtin__.property(_get_metric)


  _pyangbind_elements = OrderedDict([('id', id), ('metric', metric), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS neighbor state
  """
  __slots__ = ('_path_helper', '_extmethods', '__type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/state/type (identityref)

    YANG Description: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/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: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  type = __builtin__.property(_get_type)


  _pyangbind_elements = OrderedDict([('type', type), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_admin_group_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/admin-group/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 3.
  """
  __slots__ = ('_path_helper', '_extmethods', '__admin_group',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__admin_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'admin-group', 'state']

  def _get_admin_group(self):
    """
    Getter method for admin_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/admin_group/state/admin_group (uint32)

    YANG Description: The administrative group sub-TLV contains a 4-octet
bit mask assigned by the network administrator.  Each
set bit corresponds to one administrative group
assigned to the interface. By convention, the least
significant bit is referred to as group 0, and the
most significant bit is referred to as group 31.
    """
    return self.__admin_group
      
  def _set_admin_group(self, v, load=False):
    """
    Setter method for admin_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/admin_group/state/admin_group (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_admin_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_admin_group() directly.

    YANG Description: The administrative group sub-TLV contains a 4-octet
bit mask assigned by the network administrator.  Each
set bit corresponds to one administrative group
assigned to the interface. By convention, the least
significant bit is referred to as group 0, and the
most significant bit is referred to as group 31.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """admin_group must be of a type compatible with uint32""",
          'defined-type': "uint32",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__admin_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_admin_group(self):
    self.__admin_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  admin_group = __builtin__.property(_get_admin_group)


  _pyangbind_elements = OrderedDict([('admin_group', admin_group), ])


class yc_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_admin_group(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/admin-group. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 3.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'admin-group'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_admin_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'admin-group']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/admin_group/state (container)

    YANG Description: State parameters of sub-TLV 3.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/admin_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: State parameters of sub-TLV 3.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_admin_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_admin_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_admin_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_id_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-id/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 4.
  """
  __slots__ = ('_path_helper', '_extmethods', '__local_','__remote',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__local_ = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="local", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__remote = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="remote", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-id', 'state']

  def _get_local_(self):
    """
    Getter method for local_, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_id/state/local (uint32)

    YANG Description: The value field of this sub-TLV contains 4 octets of
Link Local Identifier followed by 4 octets of Link
Remote Identifier.
    """
    return self.__local_
      
  def _set_local_(self, v, load=False):
    """
    Setter method for local_, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_id/state/local (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_ is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_() directly.

    YANG Description: The value field of this sub-TLV contains 4 octets of
Link Local Identifier followed by 4 octets of Link
Remote Identifier.
    """
    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="local", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_ 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="local", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__local_ = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_(self):
    self.__local_ = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="local", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_remote(self):
    """
    Getter method for remote, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_id/state/remote (uint32)

    YANG Description: If the Link Remote Identifier is unknown, it is set
to 0.
    """
    return self.__remote
      
  def _set_remote(self, v, load=False):
    """
    Setter method for remote, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_id/state/remote (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_remote is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_remote() directly.

    YANG Description: If the Link Remote Identifier is unknown, it is set
to 0.
    """
    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="remote", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """remote 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="remote", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__remote = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_remote(self):
    self.__remote = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="remote", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  local_ = __builtin__.property(_get_local_)
  remote = __builtin__.property(_get_remote)


  _pyangbind_elements = OrderedDict([('local_', local_), ('remote', remote), ])


class yc_link_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_id(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-id. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 4.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'link-id'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-id']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_id/state (container)

    YANG Description: State parameters of sub-TLV 4.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_id/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 parameters of sub-TLV 4.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_interface_address_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4-interface-address/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 6.
  """
  __slots__ = ('_path_helper', '_extmethods', '__address',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__address = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'ipv4-interface-address', 'state']

  def _get_address(self):
    """
    Getter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_interface_address/state/address (inet:ipv4-address)

    YANG Description: A 4-octet IPv4 address for the interface described by
the (main) TLV. This sub-TLV can occur multiple
times.
    """
    return self.__address
      
  def _set_address(self, v, load=False):
    """
    Setter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_interface_address/state/address (inet:ipv4-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address() directly.

    YANG Description: A 4-octet IPv4 address for the interface described by
the (main) TLV. This sub-TLV can occur multiple
times.
    """
    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_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}'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address must be of a type compatible with inet:ipv4-address""",
          'defined-type': "inet:ipv4-address",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=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}'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)""",
        })

    self.__address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address(self):
    self.__address = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)

  address = __builtin__.property(_get_address)


  _pyangbind_elements = OrderedDict([('address', address), ])


class yc_ipv4_interface_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_interface_address(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4-interface-address. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 6.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'ipv4-interface-address'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_interface_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'ipv4-interface-address']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_interface_address/state (container)

    YANG Description: State parameters of sub-TLV 6.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_interface_address/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 parameters of sub-TLV 6.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_interface_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_interface_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_interface_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_neighbor_address_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4-neighbor-address/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 8.
  """
  __slots__ = ('_path_helper', '_extmethods', '__address',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__address = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'ipv4-neighbor-address', 'state']

  def _get_address(self):
    """
    Getter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_neighbor_address/state/address (inet:ipv4-address)

    YANG Description: A single IPv4 address for a neighboring router on
this link. This sub-TLV can occur multiple times.
    """
    return self.__address
      
  def _set_address(self, v, load=False):
    """
    Setter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_neighbor_address/state/address (inet:ipv4-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address() directly.

    YANG Description: A single IPv4 address for a neighboring router on
this link. This sub-TLV can occur multiple times.
    """
    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_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}'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address must be of a type compatible with inet:ipv4-address""",
          'defined-type': "inet:ipv4-address",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=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}'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)""",
        })

    self.__address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address(self):
    self.__address = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)

  address = __builtin__.property(_get_address)


  _pyangbind_elements = OrderedDict([('address', address), ])


class yc_ipv4_neighbor_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_neighbor_address(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4-neighbor-address. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 8.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'ipv4-neighbor-address'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_neighbor_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'ipv4-neighbor-address']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_neighbor_address/state (container)

    YANG Description: State parameters of sub-TLV 8.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_neighbor_address/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 parameters of sub-TLV 8.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_neighbor_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_neighbor_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_neighbor_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_link_bandwidth_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/max-link-bandwidth/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 9.
  """
  __slots__ = ('_path_helper', '_extmethods', '__bandwidth',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'max-link-bandwidth', 'state']

  def _get_bandwidth(self):
    """
    Getter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_link_bandwidth/state/bandwidth (oc-types:ieeefloat32)

    YANG Description: The maximum bandwidth that can be used on this link
in this direction (from the system originating the LSP
to its neighbors).  It is encoded in 32 bits in IEEE
floating point format.  The units are bytes (not
bits!) per second.
    """
    return self.__bandwidth
      
  def _set_bandwidth(self, v, load=False):
    """
    Setter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_link_bandwidth/state/bandwidth (oc-types:ieeefloat32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth() directly.

    YANG Description: The maximum bandwidth that can be used on this link
in this direction (from the system originating the LSP
to its neighbors).  It is encoded in 32 bits in IEEE
floating point format.  The units are bytes (not
bits!) per second.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth must be of a type compatible with oc-types:ieeefloat32""",
          'defined-type': "oc-types:ieeefloat32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)""",
        })

    self.__bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth(self):
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)

  bandwidth = __builtin__.property(_get_bandwidth)


  _pyangbind_elements = OrderedDict([('bandwidth', bandwidth), ])


class yc_max_link_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_link_bandwidth(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/max-link-bandwidth. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 9.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'max-link-bandwidth'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_link_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'max-link-bandwidth']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_link_bandwidth/state (container)

    YANG Description: State parameters of sub-TLV 9.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_link_bandwidth/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 parameters of sub-TLV 9.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_link_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_link_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_link_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_reservable_link_bandwidth_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/max-reservable-link-bandwidth/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 10.
  """
  __slots__ = ('_path_helper', '_extmethods', '__bandwidth',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'max-reservable-link-bandwidth', 'state']

  def _get_bandwidth(self):
    """
    Getter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_reservable_link_bandwidth/state/bandwidth (oc-types:ieeefloat32)

    YANG Description: The maximum amount of bandwidth that can be reserved
in this direction on this link.  Note that for
oversubscription purposes,  this can be greater than
the bandwidth of the link. It is encoded  in 32 bits
in IEEE floating point format.  The units are bytes
(not bits!) per second.
    """
    return self.__bandwidth
      
  def _set_bandwidth(self, v, load=False):
    """
    Setter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_reservable_link_bandwidth/state/bandwidth (oc-types:ieeefloat32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth() directly.

    YANG Description: The maximum amount of bandwidth that can be reserved
in this direction on this link.  Note that for
oversubscription purposes,  this can be greater than
the bandwidth of the link. It is encoded  in 32 bits
in IEEE floating point format.  The units are bytes
(not bits!) per second.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth must be of a type compatible with oc-types:ieeefloat32""",
          'defined-type': "oc-types:ieeefloat32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)""",
        })

    self.__bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth(self):
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)

  bandwidth = __builtin__.property(_get_bandwidth)


  _pyangbind_elements = OrderedDict([('bandwidth', bandwidth), ])


class yc_max_reservable_link_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_reservable_link_bandwidth(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/max-reservable-link-bandwidth. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 10.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'max-reservable-link-bandwidth'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_reservable_link_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'max-reservable-link-bandwidth']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_reservable_link_bandwidth/state (container)

    YANG Description: State parameters of sub-TLV 10.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_reservable_link_bandwidth/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 parameters of sub-TLV 10.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_reservable_link_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_reservable_link_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_reservable_link_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth_setup_priority_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved-bandwidth/setup-priority/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS Extended Reachability sub-TLV
11.
  """
  __slots__ = ('_path_helper', '_extmethods', '__priority','__bandwidth',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__priority = 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="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'unreserved-bandwidth', 'setup-priority', 'state']

  def _get_priority(self):
    """
    Getter method for priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth/setup_priority/state/priority (uint8)

    YANG Description: Setup priority level of 0 through 7 to be used by
Unreserved Bandwidth sub-TLV 11.
    """
    return self.__priority
      
  def _set_priority(self, v, load=False):
    """
    Setter method for priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth/setup_priority/state/priority (uint8)
    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: Setup priority level of 0 through 7 to be used by
Unreserved Bandwidth sub-TLV 11.
    """
    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="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """priority 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..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_priority(self):
    self.__priority = 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="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_bandwidth(self):
    """
    Getter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth/setup_priority/state/bandwidth (oc-types:ieeefloat32)

    YANG Description: The amount of bandwidth reservable in this
direction on this link. Note that for
oversubscription purposes, this can be greater than
the bandwidth of the link. It contains eight 32-bit
IEEE floating point numbers(one for each priority).
The units are bytes (not bits!) per second. The
values correspond to the bandwidth that can be
reserved with a setup priority of 0 through 7,
arranged in increasing order with priority 0
occurring at the start of the sub-TLV, and priority
7 at the end of the sub-TLV.
    """
    return self.__bandwidth
      
  def _set_bandwidth(self, v, load=False):
    """
    Setter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth/setup_priority/state/bandwidth (oc-types:ieeefloat32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth() directly.

    YANG Description: The amount of bandwidth reservable in this
direction on this link. Note that for
oversubscription purposes, this can be greater than
the bandwidth of the link. It contains eight 32-bit
IEEE floating point numbers(one for each priority).
The units are bytes (not bits!) per second. The
values correspond to the bandwidth that can be
reserved with a setup priority of 0 through 7,
arranged in increasing order with priority 0
occurring at the start of the sub-TLV, and priority
7 at the end of the sub-TLV.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth must be of a type compatible with oc-types:ieeefloat32""",
          'defined-type': "oc-types:ieeefloat32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)""",
        })

    self.__bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth(self):
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)

  priority = __builtin__.property(_get_priority)
  bandwidth = __builtin__.property(_get_bandwidth)


  _pyangbind_elements = OrderedDict([('priority', priority), ('bandwidth', bandwidth), ])


class yc_setup_priority_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth_setup_priority(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved-bandwidth/setup-priority. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Setup priority (0 through 7) for unreserved
bandwidth.
  """
  __slots__ = ('_path_helper', '_extmethods', '__priority','__state',)

  _yang_name = 'setup-priority'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__priority = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth_setup_priority_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'unreserved-bandwidth', 'setup-priority']

  def _get_priority(self):
    """
    Getter method for priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth/setup_priority/priority (leafref)

    YANG Description: Reference to the setup priority to which the
unreserved bandwidth corresponds.
    """
    return self.__priority
      
  def _set_priority(self, v, load=False):
    """
    Setter method for priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth/setup_priority/priority (leafref)
    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: Reference to the setup priority to which the
unreserved bandwidth corresponds.
    """
    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="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """priority must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_priority(self):
    self.__priority = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth/setup_priority/state (container)

    YANG Description: State parameters of IS Extended Reachability sub-TLV
11.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth/setup_priority/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 parameters of IS Extended Reachability sub-TLV
11.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth_setup_priority_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth_setup_priority_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth_setup_priority_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  priority = __builtin__.property(_get_priority)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('priority', priority), ('state', state), ])


class yc_unreserved_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved-bandwidth. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines unreserved-bandwidth. The units
are bytes per second.
  """
  __slots__ = ('_path_helper', '_extmethods', '__setup_priority',)

  _yang_name = 'unreserved-bandwidth'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__setup_priority = YANGDynClass(base=YANGListType("priority",yc_setup_priority_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth_setup_priority, yang_name="setup-priority", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'unreserved-bandwidth']

  def _get_setup_priority(self):
    """
    Getter method for setup_priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth/setup_priority (list)

    YANG Description: Setup priority (0 through 7) for unreserved
bandwidth.
    """
    return self.__setup_priority
      
  def _set_setup_priority(self, v, load=False):
    """
    Setter method for setup_priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth/setup_priority (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_setup_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_setup_priority() directly.

    YANG Description: Setup priority (0 through 7) for unreserved
bandwidth.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("priority",yc_setup_priority_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth_setup_priority, yang_name="setup-priority", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """setup_priority must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("priority",yc_setup_priority_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth_setup_priority, yang_name="setup-priority", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__setup_priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_setup_priority(self):
    self.__setup_priority = YANGDynClass(base=YANGListType("priority",yc_setup_priority_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth_setup_priority, yang_name="setup-priority", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  setup_priority = __builtin__.property(_get_setup_priority)


  _pyangbind_elements = OrderedDict([('setup_priority', setup_priority), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_interface_address_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6-interface-address/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 12.
  """
  __slots__ = ('_path_helper', '_extmethods', '__address',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__address = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}|:))'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'ipv6-interface-address', 'state']

  def _get_address(self):
    """
    Getter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_interface_address/state/address (inet:ipv6-address)

    YANG Description: Contains a 16-octet IPv6 address for the interface
described by the containing  Extended IS Reachability
TLV. This sub-TLV can occur multiple times.
    """
    return self.__address
      
  def _set_address(self, v, load=False):
    """
    Setter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_interface_address/state/address (inet:ipv6-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address() directly.

    YANG Description: Contains a 16-octet IPv6 address for the interface
described by the containing  Extended IS Reachability
TLV. This sub-TLV can occur multiple times.
    """
    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_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}|:))'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address must be of a type compatible with inet:ipv6-address""",
          'defined-type': "inet:ipv6-address",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=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}|:))'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)""",
        })

    self.__address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address(self):
    self.__address = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}|:))'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)

  address = __builtin__.property(_get_address)


  _pyangbind_elements = OrderedDict([('address', address), ])


class yc_ipv6_interface_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_interface_address(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6-interface-address. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 12.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'ipv6-interface-address'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_interface_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'ipv6-interface-address']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_interface_address/state (container)

    YANG Description: State parameters of sub-TLV 12.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_interface_address/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 parameters of sub-TLV 12.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_interface_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_interface_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_interface_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_neighbor_address_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6-neighbor-address/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 13.
  """
  __slots__ = ('_path_helper', '_extmethods', '__address',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__address = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}|:))'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'ipv6-neighbor-address', 'state']

  def _get_address(self):
    """
    Getter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_neighbor_address/state/address (inet:ipv6-address)

    YANG Description: Contains a 16-octet IPv6 address for a neighboring
router on the link described by the (main) TLV. This
sub-TLV can occur multiple times.
    """
    return self.__address
      
  def _set_address(self, v, load=False):
    """
    Setter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_neighbor_address/state/address (inet:ipv6-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address() directly.

    YANG Description: Contains a 16-octet IPv6 address for a neighboring
router on the link described by the (main) TLV. This
sub-TLV can occur multiple times.
    """
    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_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}|:))'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address must be of a type compatible with inet:ipv6-address""",
          'defined-type': "inet:ipv6-address",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=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}|:))'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)""",
        })

    self.__address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address(self):
    self.__address = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}|:))'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)

  address = __builtin__.property(_get_address)


  _pyangbind_elements = OrderedDict([('address', address), ])


class yc_ipv6_neighbor_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_neighbor_address(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6-neighbor-address. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 13.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'ipv6-neighbor-address'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_neighbor_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'ipv6-neighbor-address']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_neighbor_address/state (container)

    YANG Description: State parameters of sub-TLV 13.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_neighbor_address/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 parameters of sub-TLV 13.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_neighbor_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_neighbor_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_neighbor_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_extended_admin_group_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/extended-admin-group/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 14.
  """
  __slots__ = ('_path_helper', '_extmethods', '__extended_admin_group',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__extended_admin_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="extended-admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'extended-admin-group', 'state']

  def _get_extended_admin_group(self):
    """
    Getter method for extended_admin_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/extended_admin_group/state/extended_admin_group (uint32)

    YANG Description: The extended-admin-group sub-TLV is used in addition
to the Administrative Groups when it is desirable to
make more than 32 colors available for advertisement
in a network.
    """
    return self.__extended_admin_group
      
  def _set_extended_admin_group(self, v, load=False):
    """
    Setter method for extended_admin_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/extended_admin_group/state/extended_admin_group (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended_admin_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended_admin_group() directly.

    YANG Description: The extended-admin-group sub-TLV is used in addition
to the Administrative Groups when it is desirable to
make more than 32 colors available for advertisement
in a network.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="extended-admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended_admin_group must be of a type compatible with uint32""",
          'defined-type': "uint32",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="extended-admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__extended_admin_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended_admin_group(self):
    self.__extended_admin_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="extended-admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  extended_admin_group = __builtin__.property(_get_extended_admin_group)


  _pyangbind_elements = OrderedDict([('extended_admin_group', extended_admin_group), ])


class yc_extended_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_extended_admin_group(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/extended-admin-group. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 14.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'extended-admin-group'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_extended_admin_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'extended-admin-group']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/extended_admin_group/state (container)

    YANG Description: State parameters of sub-TLV 14.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/extended_admin_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: State parameters of sub-TLV 14.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_extended_admin_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_extended_admin_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_extended_admin_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_te_default_metric_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/te-default-metric/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 18.
  """
  __slots__ = ('_path_helper', '_extmethods', '__metric',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'te-default-metric', 'state']

  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/te_default_metric/state/metric (uint32)

    YANG Description: This metric is administratively assigned and can be
used to present a differently weighted topology to
traffic engineering SPF calculations. To preclude
overflow within a traffic engineering SPF
implementation, all metrics greater than or equal to
MAX_PATH_METRIC SHALL be considered to have a metric
of MAX_PATH_METRIC.
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/te_default_metric/state/metric (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: This metric is administratively assigned and can be
used to present a differently weighted topology to
traffic engineering SPF calculations. To preclude
overflow within a traffic engineering SPF
implementation, all metrics greater than or equal to
MAX_PATH_METRIC SHALL be considered to have a metric
of MAX_PATH_METRIC.
    """
    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="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric 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="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  metric = __builtin__.property(_get_metric)


  _pyangbind_elements = OrderedDict([('metric', metric), ])


class yc_te_default_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_te_default_metric(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/te-default-metric. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 18.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'te-default-metric'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_te_default_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'te-default-metric']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/te_default_metric/state (container)

    YANG Description: State parameters of sub-TLV 18.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/te_default_metric/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 parameters of sub-TLV 18.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_te_default_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_te_default_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_te_default_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_attributes_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-attributes/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS Extended Reachability sub-TLV
19.
  """
  __slots__ = ('_path_helper', '_extmethods', '__local_protection',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__local_protection = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LOCAL_PROTECTION': {}, 'LINK_EXCLUDED': {}},)), is_leaf=False, yang_name="local-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-attributes', 'state']

  def _get_local_protection(self):
    """
    Getter method for local_protection, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_attributes/state/local_protection (enumeration)

    YANG Description: Link local-protection attributes.
    """
    return self.__local_protection
      
  def _set_local_protection(self, v, load=False):
    """
    Setter method for local_protection, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_attributes/state/local_protection (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_protection is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_protection() directly.

    YANG Description: Link local-protection attributes.
    """
    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={'LOCAL_PROTECTION': {}, 'LINK_EXCLUDED': {}},)), is_leaf=False, yang_name="local-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_protection must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LOCAL_PROTECTION': {}, 'LINK_EXCLUDED': {}},)), is_leaf=False, yang_name="local-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__local_protection = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_protection(self):
    self.__local_protection = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LOCAL_PROTECTION': {}, 'LINK_EXCLUDED': {}},)), is_leaf=False, yang_name="local-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)

  local_protection = __builtin__.property(_get_local_protection)


  _pyangbind_elements = OrderedDict([('local_protection', local_protection), ])


class yc_link_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_attributes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-attributes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines link-attributes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'link-attributes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_attributes_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-attributes']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_attributes/state (container)

    YANG Description: State parameters of IS Extended Reachability sub-TLV
19.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_attributes/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 parameters of IS Extended Reachability sub-TLV
19.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_attributes_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_attributes_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_attributes_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_protection_type_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-protection-type/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 20.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXTRA_TRAFFIC': {}, 'UNPROTECTED': {}, 'SHARED': {}, 'ONE_ONE': {}, 'PLUS_ONE': {}, 'ENHANCED': {}},)), is_leaf=False, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-protection-type', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_protection_type/state/type (enumeration)

    YANG Description: Link protection capabilities.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_protection_type/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: Link protection capabilities.
    """
    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={'EXTRA_TRAFFIC': {}, 'UNPROTECTED': {}, 'SHARED': {}, 'ONE_ONE': {}, 'PLUS_ONE': {}, 'ENHANCED': {}},)), is_leaf=False, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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-network-instance:enumeration",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXTRA_TRAFFIC': {}, 'UNPROTECTED': {}, 'SHARED': {}, 'ONE_ONE': {}, 'PLUS_ONE': {}, 'ENHANCED': {}},)), is_leaf=False, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXTRA_TRAFFIC': {}, 'UNPROTECTED': {}, 'SHARED': {}, 'ONE_ONE': {}, 'PLUS_ONE': {}, 'ENHANCED': {}},)), is_leaf=False, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)

  type = __builtin__.property(_get_type)


  _pyangbind_elements = OrderedDict([('type', type), ])


class yc_link_protection_type_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_protection_type(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-protection-type. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: ISIS LSDB parameters relating to the type of link
protection offered.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'link-protection-type'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_protection_type_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-protection-type']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_protection_type/state (container)

    YANG Description: State parameters of sub-TLV 20.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_protection_type/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 parameters of sub-TLV 20.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_protection_type_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_protection_type_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_protection_type_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth-constraints/bandwidth-constraint/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS Extended Reachability sub-TLV
22.
  """
  __slots__ = ('_path_helper', '_extmethods', '__model_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__model_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="model-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'bandwidth-constraints', 'bandwidth-constraint', 'state']

  def _get_model_id(self):
    """
    Getter method for model_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/state/model_id (uint8)

    YANG Description: Identifier for the Bandwidth Constraints  Model
currently in use by the LSR initiating the IGP
advertisement.
    """
    return self.__model_id
      
  def _set_model_id(self, v, load=False):
    """
    Setter method for model_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/state/model_id (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_model_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_model_id() directly.

    YANG Description: Identifier for the Bandwidth Constraints  Model
currently in use by the LSR initiating the IGP
advertisement.
    """
    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="model-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """model_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="model-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__model_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_model_id(self):
    self.__model_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="model-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)

  model_id = __builtin__.property(_get_model_id)


  _pyangbind_elements = OrderedDict([('model_id', model_id), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints_constraint_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth-constraints/bandwidth-constraint/constraints/constraint/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters of the BCN level
  """
  __slots__ = ('_path_helper', '_extmethods', '__constraint_id','__bandwidth',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__constraint_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="constraint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'bandwidth-constraints', 'bandwidth-constraint', 'constraints', 'constraint', 'state']

  def _get_constraint_id(self):
    """
    Getter method for constraint_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints/constraint/state/constraint_id (uint32)

    YANG Description: Unique reference for the bandwidth constraint level. BC0
is indicated by this leaf being set to zero, with BCN
represented by this leaf being set to N.
    """
    return self.__constraint_id
      
  def _set_constraint_id(self, v, load=False):
    """
    Setter method for constraint_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints/constraint/state/constraint_id (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_constraint_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_constraint_id() directly.

    YANG Description: Unique reference for the bandwidth constraint level. BC0
is indicated by this leaf being set to zero, with BCN
represented by this leaf being set to N.
    """
    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="constraint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """constraint_id 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="constraint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__constraint_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_constraint_id(self):
    self.__constraint_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="constraint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_bandwidth(self):
    """
    Getter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints/constraint/state/bandwidth (oc-types:ieeefloat32)

    YANG Description: The bandwidth constraint, expressed as a 32-bit IEEE
floating point number expressed in bytes per second.
    """
    return self.__bandwidth
      
  def _set_bandwidth(self, v, load=False):
    """
    Setter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints/constraint/state/bandwidth (oc-types:ieeefloat32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth() directly.

    YANG Description: The bandwidth constraint, expressed as a 32-bit IEEE
floating point number expressed in bytes per second.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth must be of a type compatible with oc-types:ieeefloat32""",
          'defined-type': "oc-types:ieeefloat32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)""",
        })

    self.__bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth(self):
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)

  constraint_id = __builtin__.property(_get_constraint_id)
  bandwidth = __builtin__.property(_get_bandwidth)


  _pyangbind_elements = OrderedDict([('constraint_id', constraint_id), ('bandwidth', bandwidth), ])


class yc_constraint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints_constraint(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth-constraints/bandwidth-constraint/constraints/constraint. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of the constraints within the Bandwidth
Constraints sub-TLV. The BC0 level is indicated by
the constraint-id leaf being set to 0, with BCN
being indicated by constraint-id N.
  """
  __slots__ = ('_path_helper', '_extmethods', '__constraint_id','__state',)

  _yang_name = 'constraint'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__constraint_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="constraint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'bandwidth-constraints', 'bandwidth-constraint', 'constraints', 'constraint']

  def _get_constraint_id(self):
    """
    Getter method for constraint_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints/constraint/constraint_id (leafref)

    YANG Description: Reference to the unique ID for the BCN level.
    """
    return self.__constraint_id
      
  def _set_constraint_id(self, v, load=False):
    """
    Setter method for constraint_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints/constraint/constraint_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_constraint_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_constraint_id() directly.

    YANG Description: Reference to the unique ID for the BCN level.
    """
    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="constraint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """constraint_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="constraint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__constraint_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_constraint_id(self):
    self.__constraint_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="constraint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints/constraint/state (container)

    YANG Description: Operational state parameters of the BCN level
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints/constraint/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 of the BCN level
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  constraint_id = __builtin__.property(_get_constraint_id)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('constraint_id', constraint_id), ('state', state), ])


class yc_constraints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth-constraints/bandwidth-constraint/constraints. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Constraints contained within the Bandwidth
Constraints sub-TLV
  """
  __slots__ = ('_path_helper', '_extmethods', '__constraint',)

  _yang_name = 'constraints'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__constraint = YANGDynClass(base=YANGListType("constraint_id",yc_constraint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints_constraint, yang_name="constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='constraint-id', extensions=None), is_container='list', yang_name="constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'bandwidth-constraints', 'bandwidth-constraint', 'constraints']

  def _get_constraint(self):
    """
    Getter method for constraint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints/constraint (list)

    YANG Description: List of the constraints within the Bandwidth
Constraints sub-TLV. The BC0 level is indicated by
the constraint-id leaf being set to 0, with BCN
being indicated by constraint-id N.
    """
    return self.__constraint
      
  def _set_constraint(self, v, load=False):
    """
    Setter method for constraint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints/constraint (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_constraint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_constraint() directly.

    YANG Description: List of the constraints within the Bandwidth
Constraints sub-TLV. The BC0 level is indicated by
the constraint-id leaf being set to 0, with BCN
being indicated by constraint-id N.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("constraint_id",yc_constraint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints_constraint, yang_name="constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='constraint-id', extensions=None), is_container='list', yang_name="constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """constraint must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("constraint_id",yc_constraint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints_constraint, yang_name="constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='constraint-id', extensions=None), is_container='list', yang_name="constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__constraint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_constraint(self):
    self.__constraint = YANGDynClass(base=YANGListType("constraint_id",yc_constraint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints_constraint, yang_name="constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='constraint-id', extensions=None), is_container='list', yang_name="constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  constraint = __builtin__.property(_get_constraint)


  _pyangbind_elements = OrderedDict([('constraint', constraint), ])


class yc_bandwidth_constraint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth-constraints/bandwidth-constraint. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of the Bandwidth Constraints sub-TLV instances
present in the TLV.
  """
  __slots__ = ('_path_helper', '_extmethods', '__model_id','__state','__constraints',)

  _yang_name = 'bandwidth-constraint'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__model_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="model-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__constraints = YANGDynClass(base=yc_constraints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints, is_container='container', yang_name="constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'bandwidth-constraints', 'bandwidth-constraint']

  def _get_model_id(self):
    """
    Getter method for model_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/model_id (leafref)

    YANG Description: Reference to the model ID associated with the
instance of the Bandwidth Constraints sub-TLV.
    """
    return self.__model_id
      
  def _set_model_id(self, v, load=False):
    """
    Setter method for model_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/model_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_model_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_model_id() directly.

    YANG Description: Reference to the model ID associated with the
instance of the Bandwidth Constraints sub-TLV.
    """
    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="model-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """model_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="model-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__model_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_model_id(self):
    self.__model_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="model-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/state (container)

    YANG Description: State parameters of IS Extended Reachability sub-TLV
22.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/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 parameters of IS Extended Reachability sub-TLV
22.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_constraints(self):
    """
    Getter method for constraints, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints (container)

    YANG Description: Constraints contained within the Bandwidth
Constraints sub-TLV
    """
    return self.__constraints
      
  def _set_constraints(self, v, load=False):
    """
    Setter method for constraints, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_constraints is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_constraints() directly.

    YANG Description: Constraints contained within the Bandwidth
Constraints sub-TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_constraints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints, is_container='container', yang_name="constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """constraints must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_constraints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints, is_container='container', yang_name="constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__constraints = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_constraints(self):
    self.__constraints = YANGDynClass(base=yc_constraints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints, is_container='container', yang_name="constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  model_id = __builtin__.property(_get_model_id)
  state = __builtin__.property(_get_state)
  constraints = __builtin__.property(_get_constraints)


  _pyangbind_elements = OrderedDict([('model_id', model_id), ('state', state), ('constraints', constraints), ])


class yc_bandwidth_constraints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth-constraints. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines bandwidth-constraints. For DS-TE,
the existing Maximum Reservable link bandwidth parameter
is retained, but its semantics is generalized and
interpreted as the aggregate bandwidth constraint across
all Class-Types
  """
  __slots__ = ('_path_helper', '_extmethods', '__bandwidth_constraint',)

  _yang_name = 'bandwidth-constraints'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__bandwidth_constraint = YANGDynClass(base=YANGListType("model_id",yc_bandwidth_constraint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint, yang_name="bandwidth-constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='model-id', extensions=None), is_container='list', yang_name="bandwidth-constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'bandwidth-constraints']

  def _get_bandwidth_constraint(self):
    """
    Getter method for bandwidth_constraint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint (list)

    YANG Description: List of the Bandwidth Constraints sub-TLV instances
present in the TLV.
    """
    return self.__bandwidth_constraint
      
  def _set_bandwidth_constraint(self, v, load=False):
    """
    Setter method for bandwidth_constraint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth_constraint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth_constraint() directly.

    YANG Description: List of the Bandwidth Constraints sub-TLV instances
present in the TLV.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("model_id",yc_bandwidth_constraint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint, yang_name="bandwidth-constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='model-id', extensions=None), is_container='list', yang_name="bandwidth-constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth_constraint must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("model_id",yc_bandwidth_constraint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint, yang_name="bandwidth-constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='model-id', extensions=None), is_container='list', yang_name="bandwidth-constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__bandwidth_constraint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth_constraint(self):
    self.__bandwidth_constraint = YANGDynClass(base=YANGListType("model_id",yc_bandwidth_constraint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint, yang_name="bandwidth-constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='model-id', extensions=None), is_container='list', yang_name="bandwidth-constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  bandwidth_constraint = __builtin__.property(_get_bandwidth_constraint)


  _pyangbind_elements = OrderedDict([('bandwidth_constraint', bandwidth_constraint), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_unconstrained_lsp_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/unconstrained-lsp/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 23.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__count',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__count = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'unconstrained-lsp', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/unconstrained_lsp/state/type (identityref)

    YANG Description: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/unconstrained_lsp/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: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_count(self):
    """
    Getter method for count, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/unconstrained_lsp/state/count (uint16)

    YANG Description: Unconstrained TE LSP count(TE Label Switched Paths
(LSPs) signalled with zero bandwidth).
    """
    return self.__count
      
  def _set_count(self, v, load=False):
    """
    Setter method for count, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/unconstrained_lsp/state/count (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_count is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_count() directly.

    YANG Description: Unconstrained TE LSP count(TE Label Switched Paths
(LSPs) signalled with zero bandwidth).
    """
    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="count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """count 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="count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__count = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_count(self):
    self.__count = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  type = __builtin__.property(_get_type)
  count = __builtin__.property(_get_count)


  _pyangbind_elements = OrderedDict([('type', type), ('count', count), ])


class yc_unconstrained_lsp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_unconstrained_lsp(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/unconstrained-lsp. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 23.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'unconstrained-lsp'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_unconstrained_lsp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'unconstrained-lsp']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/unconstrained_lsp/state (container)

    YANG Description: State parameters of sub-TLV 23.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/unconstrained_lsp/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 parameters of sub-TLV 23.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_unconstrained_lsp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_unconstrained_lsp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_unconstrained_lsp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency-sids/adjacency-sid/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of Adjacency-SID.
  """
  __slots__ = ('_path_helper', '_extmethods', '__value','__flags','__weight',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ADDRESS_FAMILY': {}, 'BACKUP': {}, 'VALUE': {}, 'LOCAL': {}, 'SET': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'adjacency-sids', 'adjacency-sid', 'state']

  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid/state/value (uint32)

    YANG Description: Adjacency-SID value.
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid/state/value (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: Adjacency-SID value.
    """
    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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value 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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_flags(self):
    """
    Getter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid/state/flags (enumeration)

    YANG Description: Flags associated with Adj-Segment-ID.
    """
    return self.__flags
      
  def _set_flags(self, v, load=False):
    """
    Setter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid/state/flags (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flags() directly.

    YANG Description: Flags associated with Adj-Segment-ID.
    """
    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={'ADDRESS_FAMILY': {}, 'BACKUP': {}, 'VALUE': {}, 'LOCAL': {}, 'SET': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flags must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ADDRESS_FAMILY': {}, 'BACKUP': {}, 'VALUE': {}, 'LOCAL': {}, 'SET': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_flags(self):
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ADDRESS_FAMILY': {}, 'BACKUP': {}, 'VALUE': {}, 'LOCAL': {}, 'SET': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_weight(self):
    """
    Getter method for weight, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid/state/weight (uint8)

    YANG Description: Value that represents the weight of the Adj-SID for
the purpose of load balancing.
    """
    return self.__weight
      
  def _set_weight(self, v, load=False):
    """
    Setter method for weight, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid/state/weight (uint8)
    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: Value that represents the weight of the Adj-SID for
the purpose of load balancing.
    """
    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="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """weight 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="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__weight = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_weight(self):
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)

  value = __builtin__.property(_get_value)
  flags = __builtin__.property(_get_flags)
  weight = __builtin__.property(_get_weight)


  _pyangbind_elements = OrderedDict([('value', value), ('flags', flags), ('weight', weight), ])


class yc_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency-sids/adjacency-sid. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Adjacency Segment-IDs List. An IGP-Adjacency Segment is
an IGP segment attached to a unidirectional adjacency or
a set of unidirectional adjacencies. By default, an IGP-
Adjacency Segment is local to the node which advertises
it.
  """
  __slots__ = ('_path_helper', '_extmethods', '__value','__state',)

  _yang_name = 'adjacency-sid'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__value = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'adjacency-sids', 'adjacency-sid']

  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid/value (leafref)

    YANG Description: Reference to the value of the Adjacency-SID.
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid/value (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: Reference to the value of the Adjacency-SID.
    """
    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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid/state (container)

    YANG Description: State parameters of Adjacency-SID.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid/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 parameters of Adjacency-SID.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  value = __builtin__.property(_get_value)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('value', value), ('state', state), ])


class yc_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency-sids. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines segment routing adjacency SIDs.
  """
  __slots__ = ('_path_helper', '_extmethods', '__adjacency_sid',)

  _yang_name = 'adjacency-sids'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__adjacency_sid = YANGDynClass(base=YANGListType("value",yc_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid, yang_name="adjacency-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="adjacency-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'adjacency-sids']

  def _get_adjacency_sid(self):
    """
    Getter method for adjacency_sid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid (list)

    YANG Description: Adjacency Segment-IDs List. An IGP-Adjacency Segment is
an IGP segment attached to a unidirectional adjacency or
a set of unidirectional adjacencies. By default, an IGP-
Adjacency Segment is local to the node which advertises
it.
    """
    return self.__adjacency_sid
      
  def _set_adjacency_sid(self, v, load=False):
    """
    Setter method for adjacency_sid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adjacency_sid is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adjacency_sid() directly.

    YANG Description: Adjacency Segment-IDs List. An IGP-Adjacency Segment is
an IGP segment attached to a unidirectional adjacency or
a set of unidirectional adjacencies. By default, an IGP-
Adjacency Segment is local to the node which advertises
it.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("value",yc_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid, yang_name="adjacency-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="adjacency-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adjacency_sid must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("value",yc_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid, yang_name="adjacency-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="adjacency-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__adjacency_sid = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adjacency_sid(self):
    self.__adjacency_sid = YANGDynClass(base=YANGListType("value",yc_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid, yang_name="adjacency-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="adjacency-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  adjacency_sid = __builtin__.property(_get_adjacency_sid)


  _pyangbind_elements = OrderedDict([('adjacency_sid', adjacency_sid), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids_lan_adjacency_sid_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan-adjacency-sids/lan-adjacency-sid/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of LAN Adjacency-SID.
  """
  __slots__ = ('_path_helper', '_extmethods', '__value','__flags','__weight','__neighbor_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ADDRESS_FAMILY': {}, 'BACKUP': {}, 'VALUE': {}, 'LOCAL': {}, 'SET': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__neighbor_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="neighbor-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'lan-adjacency-sids', 'lan-adjacency-sid', 'state']

  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/state/value (uint32)

    YANG Description: LAN Adjacency-SID value.
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/state/value (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: LAN Adjacency-SID value.
    """
    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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value 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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_flags(self):
    """
    Getter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/state/flags (enumeration)

    YANG Description: Flags associated with LAN-Adj-Segment-ID.
    """
    return self.__flags
      
  def _set_flags(self, v, load=False):
    """
    Setter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/state/flags (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flags() directly.

    YANG Description: Flags associated with LAN-Adj-Segment-ID.
    """
    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={'ADDRESS_FAMILY': {}, 'BACKUP': {}, 'VALUE': {}, 'LOCAL': {}, 'SET': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flags must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ADDRESS_FAMILY': {}, 'BACKUP': {}, 'VALUE': {}, 'LOCAL': {}, 'SET': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_flags(self):
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ADDRESS_FAMILY': {}, 'BACKUP': {}, 'VALUE': {}, 'LOCAL': {}, 'SET': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_weight(self):
    """
    Getter method for weight, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/state/weight (uint8)

    YANG Description: Value that represents the weight of the Adj-SID
for the purpose of load balancing.
    """
    return self.__weight
      
  def _set_weight(self, v, load=False):
    """
    Setter method for weight, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/state/weight (uint8)
    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: Value that represents the weight of the Adj-SID
for the purpose of load balancing.
    """
    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="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """weight 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="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__weight = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_weight(self):
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_neighbor_id(self):
    """
    Getter method for neighbor_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/state/neighbor_id (oc-isis-types:system-id)

    YANG Description: System ID of the neighbor associated with the LAN-
Adj-Segment-ID value.
    """
    return self.__neighbor_id
      
  def _set_neighbor_id(self, v, load=False):
    """
    Setter method for neighbor_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/state/neighbor_id (oc-isis-types:system-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor_id() directly.

    YANG Description: System ID of the neighbor associated with the LAN-
Adj-Segment-ID value.
    """
    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]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="neighbor-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor_id must be of a type compatible with oc-isis-types:system-id""",
          'defined-type': "oc-isis-types:system-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="neighbor-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)""",
        })

    self.__neighbor_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor_id(self):
    self.__neighbor_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="neighbor-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)

  value = __builtin__.property(_get_value)
  flags = __builtin__.property(_get_flags)
  weight = __builtin__.property(_get_weight)
  neighbor_id = __builtin__.property(_get_neighbor_id)


  _pyangbind_elements = OrderedDict([('value', value), ('flags', flags), ('weight', weight), ('neighbor_id', neighbor_id), ])


class yc_lan_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids_lan_adjacency_sid(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan-adjacency-sids/lan-adjacency-sid. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Adjacency Segment-IDs List. An IGP-Adjacency Segment is
an IGP segment attached to a unidirectional adjacency or
a set of unidirectional adjacencies. By default, an IGP-
Adjacency Segment is local to the node which advertises
it.
  """
  __slots__ = ('_path_helper', '_extmethods', '__value','__state',)

  _yang_name = 'lan-adjacency-sid'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__value = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids_lan_adjacency_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'lan-adjacency-sids', 'lan-adjacency-sid']

  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/value (leafref)

    YANG Description: Reference to the value of the LAN Adjacency-SID.
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/value (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: Reference to the value of the LAN Adjacency-SID.
    """
    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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/state (container)

    YANG Description: State parameters of LAN Adjacency-SID.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/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 parameters of LAN Adjacency-SID.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids_lan_adjacency_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids_lan_adjacency_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids_lan_adjacency_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  value = __builtin__.property(_get_value)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('value', value), ('state', state), ])


class yc_lan_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan-adjacency-sids. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines segment routing LAN adjacency
SIDs
  """
  __slots__ = ('_path_helper', '_extmethods', '__lan_adjacency_sid',)

  _yang_name = 'lan-adjacency-sids'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__lan_adjacency_sid = YANGDynClass(base=YANGListType("value",yc_lan_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids_lan_adjacency_sid, yang_name="lan-adjacency-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="lan-adjacency-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'lan-adjacency-sids']

  def _get_lan_adjacency_sid(self):
    """
    Getter method for lan_adjacency_sid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid (list)

    YANG Description: Adjacency Segment-IDs List. An IGP-Adjacency Segment is
an IGP segment attached to a unidirectional adjacency or
a set of unidirectional adjacencies. By default, an IGP-
Adjacency Segment is local to the node which advertises
it.
    """
    return self.__lan_adjacency_sid
      
  def _set_lan_adjacency_sid(self, v, load=False):
    """
    Setter method for lan_adjacency_sid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lan_adjacency_sid is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lan_adjacency_sid() directly.

    YANG Description: Adjacency Segment-IDs List. An IGP-Adjacency Segment is
an IGP segment attached to a unidirectional adjacency or
a set of unidirectional adjacencies. By default, an IGP-
Adjacency Segment is local to the node which advertises
it.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("value",yc_lan_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids_lan_adjacency_sid, yang_name="lan-adjacency-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="lan-adjacency-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lan_adjacency_sid must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("value",yc_lan_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids_lan_adjacency_sid, yang_name="lan-adjacency-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="lan-adjacency-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__lan_adjacency_sid = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lan_adjacency_sid(self):
    self.__lan_adjacency_sid = YANGDynClass(base=YANGListType("value",yc_lan_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids_lan_adjacency_sid, yang_name="lan-adjacency-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="lan-adjacency-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  lan_adjacency_sid = __builtin__.property(_get_lan_adjacency_sid)


  _pyangbind_elements = OrderedDict([('lan_adjacency_sid', lan_adjacency_sid), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-delay/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS Extended Reachability sub-TLV
33.
  """
  __slots__ = ('_path_helper', '_extmethods', '__a_bit','__delay',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__a_bit = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-delay', 'state']

  def _get_a_bit(self):
    """
    Getter method for a_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay/state/a_bit (boolean)

    YANG Description: The A bit is set when the measured value of this parameter
exceeds its configured maximum threshold. The A bit is cleared
when the measured value falls below its configured reuse
threshold.
    """
    return self.__a_bit
      
  def _set_a_bit(self, v, load=False):
    """
    Setter method for a_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay/state/a_bit (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_a_bit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_a_bit() directly.

    YANG Description: The A bit is set when the measured value of this parameter
exceeds its configured maximum threshold. The A bit is cleared
when the measured value falls below its configured reuse
threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """a_bit must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__a_bit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_a_bit(self):
    self.__a_bit = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_delay(self):
    """
    Getter method for delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay/state/delay (uint32)

    YANG Description: Average link delay value (in microseconds) between
two directly connected IS-IS neighbors over a
configurable interval.
    """
    return self.__delay
      
  def _set_delay(self, v, load=False):
    """
    Setter method for delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay/state/delay (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_delay() directly.

    YANG Description: Average link delay value (in microseconds) between
two directly connected IS-IS neighbors over a
configurable interval.
    """
    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="delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """delay 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="delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_delay(self):
    self.__delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  a_bit = __builtin__.property(_get_a_bit)
  delay = __builtin__.property(_get_delay)


  _pyangbind_elements = OrderedDict([('a_bit', a_bit), ('delay', delay), ])


class yc_link_delay_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-delay. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines unidirectional link delay.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'link-delay'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-delay']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay/state (container)

    YANG Description: State parameters of IS Extended Reachability sub-TLV
33.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay/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 parameters of IS Extended Reachability sub-TLV
33.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_min_max_link_delay_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/min-max-link-delay/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS Extended Reachability sub-TLV
34.
  """
  __slots__ = ('_path_helper', '_extmethods', '__a_bit','__min_delay','__max_delay',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__a_bit = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__min_delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="min-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__max_delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'min-max-link-delay', 'state']

  def _get_a_bit(self):
    """
    Getter method for a_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/min_max_link_delay/state/a_bit (boolean)

    YANG Description: The A bit is set when the measured value of this parameter
exceeds its configured maximum threshold. The A bit is cleared
when the measured value falls below its configured reuse
threshold.
    """
    return self.__a_bit
      
  def _set_a_bit(self, v, load=False):
    """
    Setter method for a_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/min_max_link_delay/state/a_bit (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_a_bit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_a_bit() directly.

    YANG Description: The A bit is set when the measured value of this parameter
exceeds its configured maximum threshold. The A bit is cleared
when the measured value falls below its configured reuse
threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """a_bit must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__a_bit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_a_bit(self):
    self.__a_bit = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_min_delay(self):
    """
    Getter method for min_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/min_max_link_delay/state/min_delay (uint32)

    YANG Description: Minimum measured link delay value(in microseconds)
between two directly connected IS-IS neighbors over a
configurable interval.
    """
    return self.__min_delay
      
  def _set_min_delay(self, v, load=False):
    """
    Setter method for min_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/min_max_link_delay/state/min_delay (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_delay() directly.

    YANG Description: Minimum measured link delay value(in microseconds)
between two directly connected IS-IS neighbors over a
configurable interval.
    """
    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="min-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_delay 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="min-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__min_delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_min_delay(self):
    self.__min_delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="min-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_max_delay(self):
    """
    Getter method for max_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/min_max_link_delay/state/max_delay (uint32)

    YANG Description: Maximum measured link delay value(in microseconds)
between two directly connected IS-IS neighbors over a
configurable interval.
    """
    return self.__max_delay
      
  def _set_max_delay(self, v, load=False):
    """
    Setter method for max_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/min_max_link_delay/state/max_delay (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_delay() directly.

    YANG Description: Maximum measured link delay value(in microseconds)
between two directly connected IS-IS neighbors over a
configurable interval.
    """
    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-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_delay 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-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_delay(self):
    self.__max_delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  a_bit = __builtin__.property(_get_a_bit)
  min_delay = __builtin__.property(_get_min_delay)
  max_delay = __builtin__.property(_get_max_delay)


  _pyangbind_elements = OrderedDict([('a_bit', a_bit), ('min_delay', min_delay), ('max_delay', max_delay), ])


class yc_min_max_link_delay_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_min_max_link_delay(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/min-max-link-delay. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines min/max link delay.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'min-max-link-delay'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_min_max_link_delay_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'min-max-link-delay']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/min_max_link_delay/state (container)

    YANG Description: State parameters of IS Extended Reachability sub-TLV
34.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/min_max_link_delay/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 parameters of IS Extended Reachability sub-TLV
34.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_min_max_link_delay_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_min_max_link_delay_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_min_max_link_delay_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_variation_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-delay-variation/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS Extended Reachability sub-TLV
35.
  """
  __slots__ = ('_path_helper', '_extmethods', '__delay',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-delay-variation', 'state']

  def _get_delay(self):
    """
    Getter method for delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay_variation/state/delay (uint32)

    YANG Description: Average link delay between two directly connected IS-
IS neighbors over a configurable interval.
    """
    return self.__delay
      
  def _set_delay(self, v, load=False):
    """
    Setter method for delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay_variation/state/delay (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_delay() directly.

    YANG Description: Average link delay between two directly connected IS-
IS neighbors over a configurable interval.
    """
    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="delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """delay 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="delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_delay(self):
    self.__delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  delay = __builtin__.property(_get_delay)


  _pyangbind_elements = OrderedDict([('delay', delay), ])


class yc_link_delay_variation_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_variation(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-delay-variation. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines unidirectional link delay
variation.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'link-delay-variation'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_variation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-delay-variation']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay_variation/state (container)

    YANG Description: State parameters of IS Extended Reachability sub-TLV
35.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay_variation/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 parameters of IS Extended Reachability sub-TLV
35.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_variation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_variation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_variation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_loss_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-loss/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS Extended Reachability sub-TLV
36.
  """
  __slots__ = ('_path_helper', '_extmethods', '__a_bit','__link_loss',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__a_bit = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__link_loss = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="link-loss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-loss', 'state']

  def _get_a_bit(self):
    """
    Getter method for a_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_loss/state/a_bit (boolean)

    YANG Description: The A bit is set when the measured value of this parameter
exceeds its configured maximum threshold. The A bit is cleared
when the measured value falls below its configured reuse
threshold.
    """
    return self.__a_bit
      
  def _set_a_bit(self, v, load=False):
    """
    Setter method for a_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_loss/state/a_bit (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_a_bit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_a_bit() directly.

    YANG Description: The A bit is set when the measured value of this parameter
exceeds its configured maximum threshold. The A bit is cleared
when the measured value falls below its configured reuse
threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """a_bit must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__a_bit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_a_bit(self):
    self.__a_bit = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_link_loss(self):
    """
    Getter method for link_loss, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_loss/state/link_loss (uint32)

    YANG Description: Link packet loss as a percentage of the total traffic
sent over a configurable interval. The basic unit is
0.000003%, where (2^24 - 2) is 50.331642%. This value
is the highest packet-loss percentage that can be
expressed (the assumption being that precision is more
important on high-speed links than the ability to
advertise loss rates greater than this, and that high-
speed links with over 50% loss are unusable).
Therefore, measured values that are larger than the
field maximum SHOULD be encoded as the maximum
value.
    """
    return self.__link_loss
      
  def _set_link_loss(self, v, load=False):
    """
    Setter method for link_loss, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_loss/state/link_loss (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_loss is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_loss() directly.

    YANG Description: Link packet loss as a percentage of the total traffic
sent over a configurable interval. The basic unit is
0.000003%, where (2^24 - 2) is 50.331642%. This value
is the highest packet-loss percentage that can be
expressed (the assumption being that precision is more
important on high-speed links than the ability to
advertise loss rates greater than this, and that high-
speed links with over 50% loss are unusable).
Therefore, measured values that are larger than the
field maximum SHOULD be encoded as the maximum
value.
    """
    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="link-loss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_loss 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="link-loss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__link_loss = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_loss(self):
    self.__link_loss = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="link-loss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  a_bit = __builtin__.property(_get_a_bit)
  link_loss = __builtin__.property(_get_link_loss)


  _pyangbind_elements = OrderedDict([('a_bit', a_bit), ('link_loss', link_loss), ])


class yc_link_loss_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_loss(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-loss. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines unidirectional link loss delay.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'link-loss'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_loss_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-loss']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_loss/state (container)

    YANG Description: State parameters of IS Extended Reachability sub-TLV
36.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_loss/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 parameters of IS Extended Reachability sub-TLV
36.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_loss_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_loss_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_loss_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_residual_bandwidth_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/residual-bandwidth/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS Extended Reachability sub-TLV
37.
  """
  __slots__ = ('_path_helper', '_extmethods', '__bandwidth',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'residual-bandwidth', 'state']

  def _get_bandwidth(self):
    """
    Getter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/residual_bandwidth/state/bandwidth (oc-types:ieeefloat32)

    YANG Description: Residual bandwidth on a link,forwarding adjacency
[RFC4206], or bundled link in IEEE floating-point
format with units of bytes per second. For a link or
forwarding adjacency, residual bandwidth is defined to
be the Maximum Bandwidth [RFC5305] minus the bandwidth
currently allocated to RSVP-TE label switched paths.
For a bundled link, residual bandwidth is defined to
be the sum of the component link residual
bandwidths.
    """
    return self.__bandwidth
      
  def _set_bandwidth(self, v, load=False):
    """
    Setter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/residual_bandwidth/state/bandwidth (oc-types:ieeefloat32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth() directly.

    YANG Description: Residual bandwidth on a link,forwarding adjacency
[RFC4206], or bundled link in IEEE floating-point
format with units of bytes per second. For a link or
forwarding adjacency, residual bandwidth is defined to
be the Maximum Bandwidth [RFC5305] minus the bandwidth
currently allocated to RSVP-TE label switched paths.
For a bundled link, residual bandwidth is defined to
be the sum of the component link residual
bandwidths.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth must be of a type compatible with oc-types:ieeefloat32""",
          'defined-type': "oc-types:ieeefloat32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)""",
        })

    self.__bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth(self):
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)

  bandwidth = __builtin__.property(_get_bandwidth)


  _pyangbind_elements = OrderedDict([('bandwidth', bandwidth), ])


class yc_residual_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_residual_bandwidth(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/residual-bandwidth. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines unidirectional residual
bandwidth.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'residual-bandwidth'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_residual_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'residual-bandwidth']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/residual_bandwidth/state (container)

    YANG Description: State parameters of IS Extended Reachability sub-TLV
37.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/residual_bandwidth/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 parameters of IS Extended Reachability sub-TLV
37.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_residual_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_residual_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_residual_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_available_bandwidth_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/available-bandwidth/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS Extended Reachability sub-TLV
38.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__bandwidth',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'available-bandwidth', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/available_bandwidth/state/type (identityref)

    YANG Description: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/available_bandwidth/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: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_bandwidth(self):
    """
    Getter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/available_bandwidth/state/bandwidth (oc-types:ieeefloat32)

    YANG Description: The available bandwidth on a link, forwarding
adjacency, or bundled link in IEEE floating-point
format with units of bytes per second. For a link or
forwarding adjacency, available bandwidth is defined
to be residual bandwidth minus the measured bandwidth
used for the actual forwarding of non-RSVP-TE label
switched path packets.  For a bundled link, available
bandwidth is defined to be the sum of the component
link available bandwidths minus the measured bandwidth
used for the actual forwarding of non-RSVP-TE label
switched path packets.  For a bundled link, available
bandwidth is defined to be the sum of the component
link available bandwidths.
    """
    return self.__bandwidth
      
  def _set_bandwidth(self, v, load=False):
    """
    Setter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/available_bandwidth/state/bandwidth (oc-types:ieeefloat32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth() directly.

    YANG Description: The available bandwidth on a link, forwarding
adjacency, or bundled link in IEEE floating-point
format with units of bytes per second. For a link or
forwarding adjacency, available bandwidth is defined
to be residual bandwidth minus the measured bandwidth
used for the actual forwarding of non-RSVP-TE label
switched path packets.  For a bundled link, available
bandwidth is defined to be the sum of the component
link available bandwidths minus the measured bandwidth
used for the actual forwarding of non-RSVP-TE label
switched path packets.  For a bundled link, available
bandwidth is defined to be the sum of the component
link available bandwidths.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth must be of a type compatible with oc-types:ieeefloat32""",
          'defined-type': "oc-types:ieeefloat32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)""",
        })

    self.__bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth(self):
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)

  type = __builtin__.property(_get_type)
  bandwidth = __builtin__.property(_get_bandwidth)


  _pyangbind_elements = OrderedDict([('type', type), ('bandwidth', bandwidth), ])


class yc_available_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_available_bandwidth(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/available-bandwidth. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines unidirectional lavailable
bandwidth.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'available-bandwidth'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_available_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'available-bandwidth']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/available_bandwidth/state (container)

    YANG Description: State parameters of IS Extended Reachability sub-TLV
38.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/available_bandwidth/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 parameters of IS Extended Reachability sub-TLV
38.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_available_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_available_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_available_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_utilized_bandwidth_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/utilized-bandwidth/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS Extended Reachability sub-TLV
39.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__bandwidth',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'utilized-bandwidth', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/utilized_bandwidth/state/type (identityref)

    YANG Description: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/utilized_bandwidth/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: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_bandwidth(self):
    """
    Getter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/utilized_bandwidth/state/bandwidth (oc-types:ieeefloat32)

    YANG Description: The bandwidth utilization on a link, forwarding
adjacency, or bundled link in IEEE floating-point
format with units of bytes per second.  For a link or
forwarding adjacency, bandwidth utilization represents
the actual utilization of the link (i.e., as measured
by the advertising node).  For a bundled link,
bandwidth utilization is defined to be the sum of the
component link bandwidth utilizations.
    """
    return self.__bandwidth
      
  def _set_bandwidth(self, v, load=False):
    """
    Setter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/utilized_bandwidth/state/bandwidth (oc-types:ieeefloat32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth() directly.

    YANG Description: The bandwidth utilization on a link, forwarding
adjacency, or bundled link in IEEE floating-point
format with units of bytes per second.  For a link or
forwarding adjacency, bandwidth utilization represents
the actual utilization of the link (i.e., as measured
by the advertising node).  For a bundled link,
bandwidth utilization is defined to be the sum of the
component link bandwidth utilizations.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth must be of a type compatible with oc-types:ieeefloat32""",
          'defined-type': "oc-types:ieeefloat32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)""",
        })

    self.__bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth(self):
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)

  type = __builtin__.property(_get_type)
  bandwidth = __builtin__.property(_get_bandwidth)


  _pyangbind_elements = OrderedDict([('type', type), ('bandwidth', bandwidth), ])


class yc_utilized_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_utilized_bandwidth(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/utilized-bandwidth. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines unidirectional utilized
bandwidth.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'utilized-bandwidth'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_utilized_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'utilized-bandwidth']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/utilized_bandwidth/state (container)

    YANG Description: State parameters of IS Extended Reachability sub-TLV
39.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/utilized_bandwidth/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 parameters of IS Extended Reachability sub-TLV
39.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_utilized_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_utilized_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_utilized_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of subTLV types in the LSDB for the specified TLV.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__state','__admin_group','__link_id','__ipv4_interface_address','__ipv4_neighbor_address','__max_link_bandwidth','__max_reservable_link_bandwidth','__unreserved_bandwidth','__ipv6_interface_address','__ipv6_neighbor_address','__extended_admin_group','__te_default_metric','__link_attributes','__link_protection_type','__bandwidth_constraints','__unconstrained_lsp','__adjacency_sids','__lan_adjacency_sids','__link_delay','__min_max_link_delay','__link_delay_variation','__link_loss','__residual_bandwidth','__available_bandwidth','__utilized_bandwidth',)

  _yang_name = 'subtlv'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__admin_group = YANGDynClass(base=yc_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_admin_group, is_container='container', yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__link_id = YANGDynClass(base=yc_link_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_id, is_container='container', yang_name="link-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ipv4_interface_address = YANGDynClass(base=yc_ipv4_interface_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_interface_address, is_container='container', yang_name="ipv4-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ipv4_neighbor_address = YANGDynClass(base=yc_ipv4_neighbor_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_neighbor_address, is_container='container', yang_name="ipv4-neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__max_link_bandwidth = YANGDynClass(base=yc_max_link_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_link_bandwidth, is_container='container', yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__max_reservable_link_bandwidth = YANGDynClass(base=yc_max_reservable_link_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_reservable_link_bandwidth, is_container='container', yang_name="max-reservable-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unreserved_bandwidth = YANGDynClass(base=yc_unreserved_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth, is_container='container', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ipv6_interface_address = YANGDynClass(base=yc_ipv6_interface_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_interface_address, is_container='container', yang_name="ipv6-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ipv6_neighbor_address = YANGDynClass(base=yc_ipv6_neighbor_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_neighbor_address, is_container='container', yang_name="ipv6-neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__extended_admin_group = YANGDynClass(base=yc_extended_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_extended_admin_group, is_container='container', yang_name="extended-admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__te_default_metric = YANGDynClass(base=yc_te_default_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_te_default_metric, is_container='container', yang_name="te-default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__link_attributes = YANGDynClass(base=yc_link_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_attributes, is_container='container', yang_name="link-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__link_protection_type = YANGDynClass(base=yc_link_protection_type_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_protection_type, is_container='container', yang_name="link-protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__bandwidth_constraints = YANGDynClass(base=yc_bandwidth_constraints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints, is_container='container', yang_name="bandwidth-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unconstrained_lsp = YANGDynClass(base=yc_unconstrained_lsp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_unconstrained_lsp, is_container='container', yang_name="unconstrained-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__adjacency_sids = YANGDynClass(base=yc_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids, is_container='container', yang_name="adjacency-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__lan_adjacency_sids = YANGDynClass(base=yc_lan_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids, is_container='container', yang_name="lan-adjacency-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__link_delay = YANGDynClass(base=yc_link_delay_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay, is_container='container', yang_name="link-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__min_max_link_delay = YANGDynClass(base=yc_min_max_link_delay_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_min_max_link_delay, is_container='container', yang_name="min-max-link-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__link_delay_variation = YANGDynClass(base=yc_link_delay_variation_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_variation, is_container='container', yang_name="link-delay-variation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__link_loss = YANGDynClass(base=yc_link_loss_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_loss, is_container='container', yang_name="link-loss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__residual_bandwidth = YANGDynClass(base=yc_residual_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_residual_bandwidth, is_container='container', yang_name="residual-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__available_bandwidth = YANGDynClass(base=yc_available_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_available_bandwidth, is_container='container', yang_name="available-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__utilized_bandwidth = YANGDynClass(base=yc_utilized_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_utilized_bandwidth, is_container='container', yang_name="utilized-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/type (leafref)

    YANG Description: Reference to the sub-TLV type.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/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 sub-TLV type.
    """
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/state (container)

    YANG Description: State parameters of IS neighbor state
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/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 parameters of IS neighbor state
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_admin_group(self):
    """
    Getter method for admin_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/admin_group (container)

    YANG Description: This container defines sub-TLV 3.
    """
    return self.__admin_group
      
  def _set_admin_group(self, v, load=False):
    """
    Setter method for admin_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/admin_group (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_admin_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_admin_group() directly.

    YANG Description: This container defines sub-TLV 3.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_admin_group, is_container='container', yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """admin_group must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_admin_group, is_container='container', yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__admin_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_admin_group(self):
    self.__admin_group = YANGDynClass(base=yc_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_admin_group, is_container='container', yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_link_id(self):
    """
    Getter method for link_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_id (container)

    YANG Description: This container defines sub-TLV 4.
    """
    return self.__link_id
      
  def _set_link_id(self, v, load=False):
    """
    Setter method for link_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_id (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_id() directly.

    YANG Description: This container defines sub-TLV 4.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_link_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_id, is_container='container', yang_name="link-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_id must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_link_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_id, is_container='container', yang_name="link-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__link_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_id(self):
    self.__link_id = YANGDynClass(base=yc_link_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_id, is_container='container', yang_name="link-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ipv4_interface_address(self):
    """
    Getter method for ipv4_interface_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_interface_address (container)

    YANG Description: This container defines sub-TLV 6.
    """
    return self.__ipv4_interface_address
      
  def _set_ipv4_interface_address(self, v, load=False):
    """
    Setter method for ipv4_interface_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_interface_address (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv4_interface_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv4_interface_address() directly.

    YANG Description: This container defines sub-TLV 6.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv4_interface_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_interface_address, is_container='container', yang_name="ipv4-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv4_interface_address must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv4_interface_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_interface_address, is_container='container', yang_name="ipv4-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ipv4_interface_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv4_interface_address(self):
    self.__ipv4_interface_address = YANGDynClass(base=yc_ipv4_interface_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_interface_address, is_container='container', yang_name="ipv4-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ipv4_neighbor_address(self):
    """
    Getter method for ipv4_neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_neighbor_address (container)

    YANG Description: This container defines sub-TLV 8.
    """
    return self.__ipv4_neighbor_address
      
  def _set_ipv4_neighbor_address(self, v, load=False):
    """
    Setter method for ipv4_neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_neighbor_address (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv4_neighbor_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv4_neighbor_address() directly.

    YANG Description: This container defines sub-TLV 8.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv4_neighbor_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_neighbor_address, is_container='container', yang_name="ipv4-neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv4_neighbor_address must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv4_neighbor_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_neighbor_address, is_container='container', yang_name="ipv4-neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ipv4_neighbor_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv4_neighbor_address(self):
    self.__ipv4_neighbor_address = YANGDynClass(base=yc_ipv4_neighbor_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_neighbor_address, is_container='container', yang_name="ipv4-neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_max_link_bandwidth(self):
    """
    Getter method for max_link_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_link_bandwidth (container)

    YANG Description: This container defines sub-TLV 9.
    """
    return self.__max_link_bandwidth
      
  def _set_max_link_bandwidth(self, v, load=False):
    """
    Setter method for max_link_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_link_bandwidth (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_link_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_link_bandwidth() directly.

    YANG Description: This container defines sub-TLV 9.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_max_link_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_link_bandwidth, is_container='container', yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_link_bandwidth must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_max_link_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_link_bandwidth, is_container='container', yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__max_link_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_link_bandwidth(self):
    self.__max_link_bandwidth = YANGDynClass(base=yc_max_link_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_link_bandwidth, is_container='container', yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_max_reservable_link_bandwidth(self):
    """
    Getter method for max_reservable_link_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_reservable_link_bandwidth (container)

    YANG Description: This container defines sub-TLV 10.
    """
    return self.__max_reservable_link_bandwidth
      
  def _set_max_reservable_link_bandwidth(self, v, load=False):
    """
    Setter method for max_reservable_link_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_reservable_link_bandwidth (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_reservable_link_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_reservable_link_bandwidth() directly.

    YANG Description: This container defines sub-TLV 10.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_max_reservable_link_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_reservable_link_bandwidth, is_container='container', yang_name="max-reservable-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_reservable_link_bandwidth must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_max_reservable_link_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_reservable_link_bandwidth, is_container='container', yang_name="max-reservable-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__max_reservable_link_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_reservable_link_bandwidth(self):
    self.__max_reservable_link_bandwidth = YANGDynClass(base=yc_max_reservable_link_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_reservable_link_bandwidth, is_container='container', yang_name="max-reservable-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unreserved_bandwidth(self):
    """
    Getter method for unreserved_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth (container)

    YANG Description: This container defines unreserved-bandwidth. The units
are bytes per second.
    """
    return self.__unreserved_bandwidth
      
  def _set_unreserved_bandwidth(self, v, load=False):
    """
    Setter method for unreserved_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unreserved_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unreserved_bandwidth() directly.

    YANG Description: This container defines unreserved-bandwidth. The units
are bytes per second.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unreserved_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth, is_container='container', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unreserved_bandwidth must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unreserved_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth, is_container='container', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unreserved_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unreserved_bandwidth(self):
    self.__unreserved_bandwidth = YANGDynClass(base=yc_unreserved_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth, is_container='container', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ipv6_interface_address(self):
    """
    Getter method for ipv6_interface_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_interface_address (container)

    YANG Description: This container defines sub-TLV 12.
    """
    return self.__ipv6_interface_address
      
  def _set_ipv6_interface_address(self, v, load=False):
    """
    Setter method for ipv6_interface_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_interface_address (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6_interface_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6_interface_address() directly.

    YANG Description: This container defines sub-TLV 12.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv6_interface_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_interface_address, is_container='container', yang_name="ipv6-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6_interface_address must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv6_interface_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_interface_address, is_container='container', yang_name="ipv6-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ipv6_interface_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6_interface_address(self):
    self.__ipv6_interface_address = YANGDynClass(base=yc_ipv6_interface_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_interface_address, is_container='container', yang_name="ipv6-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ipv6_neighbor_address(self):
    """
    Getter method for ipv6_neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_neighbor_address (container)

    YANG Description: This container defines sub-TLV 13.
    """
    return self.__ipv6_neighbor_address
      
  def _set_ipv6_neighbor_address(self, v, load=False):
    """
    Setter method for ipv6_neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_neighbor_address (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6_neighbor_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6_neighbor_address() directly.

    YANG Description: This container defines sub-TLV 13.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv6_neighbor_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_neighbor_address, is_container='container', yang_name="ipv6-neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6_neighbor_address must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv6_neighbor_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_neighbor_address, is_container='container', yang_name="ipv6-neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ipv6_neighbor_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6_neighbor_address(self):
    self.__ipv6_neighbor_address = YANGDynClass(base=yc_ipv6_neighbor_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_neighbor_address, is_container='container', yang_name="ipv6-neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_extended_admin_group(self):
    """
    Getter method for extended_admin_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/extended_admin_group (container)

    YANG Description: This container defines sub-TLV 14.
    """
    return self.__extended_admin_group
      
  def _set_extended_admin_group(self, v, load=False):
    """
    Setter method for extended_admin_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/extended_admin_group (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended_admin_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended_admin_group() directly.

    YANG Description: This container defines sub-TLV 14.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_extended_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_extended_admin_group, is_container='container', yang_name="extended-admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended_admin_group must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_extended_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_extended_admin_group, is_container='container', yang_name="extended-admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__extended_admin_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended_admin_group(self):
    self.__extended_admin_group = YANGDynClass(base=yc_extended_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_extended_admin_group, is_container='container', yang_name="extended-admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_te_default_metric(self):
    """
    Getter method for te_default_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/te_default_metric (container)

    YANG Description: This container defines sub-TLV 18.
    """
    return self.__te_default_metric
      
  def _set_te_default_metric(self, v, load=False):
    """
    Setter method for te_default_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/te_default_metric (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_te_default_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_te_default_metric() directly.

    YANG Description: This container defines sub-TLV 18.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_te_default_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_te_default_metric, is_container='container', yang_name="te-default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """te_default_metric must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_te_default_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_te_default_metric, is_container='container', yang_name="te-default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__te_default_metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_te_default_metric(self):
    self.__te_default_metric = YANGDynClass(base=yc_te_default_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_te_default_metric, is_container='container', yang_name="te-default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_link_attributes(self):
    """
    Getter method for link_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_attributes (container)

    YANG Description: This container defines link-attributes.
    """
    return self.__link_attributes
      
  def _set_link_attributes(self, v, load=False):
    """
    Setter method for link_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_attributes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_attributes() directly.

    YANG Description: This container defines link-attributes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_link_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_attributes, is_container='container', yang_name="link-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_attributes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_link_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_attributes, is_container='container', yang_name="link-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__link_attributes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_attributes(self):
    self.__link_attributes = YANGDynClass(base=yc_link_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_attributes, is_container='container', yang_name="link-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_link_protection_type(self):
    """
    Getter method for link_protection_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_protection_type (container)

    YANG Description: ISIS LSDB parameters relating to the type of link
protection offered.
    """
    return self.__link_protection_type
      
  def _set_link_protection_type(self, v, load=False):
    """
    Setter method for link_protection_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_protection_type (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_protection_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_protection_type() directly.

    YANG Description: ISIS LSDB parameters relating to the type of link
protection offered.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_link_protection_type_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_protection_type, is_container='container', yang_name="link-protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_protection_type must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_link_protection_type_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_protection_type, is_container='container', yang_name="link-protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__link_protection_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_protection_type(self):
    self.__link_protection_type = YANGDynClass(base=yc_link_protection_type_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_protection_type, is_container='container', yang_name="link-protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_bandwidth_constraints(self):
    """
    Getter method for bandwidth_constraints, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints (container)

    YANG Description: This container defines bandwidth-constraints. For DS-TE,
the existing Maximum Reservable link bandwidth parameter
is retained, but its semantics is generalized and
interpreted as the aggregate bandwidth constraint across
all Class-Types
    """
    return self.__bandwidth_constraints
      
  def _set_bandwidth_constraints(self, v, load=False):
    """
    Setter method for bandwidth_constraints, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth_constraints is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth_constraints() directly.

    YANG Description: This container defines bandwidth-constraints. For DS-TE,
the existing Maximum Reservable link bandwidth parameter
is retained, but its semantics is generalized and
interpreted as the aggregate bandwidth constraint across
all Class-Types
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_bandwidth_constraints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints, is_container='container', yang_name="bandwidth-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth_constraints must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_bandwidth_constraints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints, is_container='container', yang_name="bandwidth-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__bandwidth_constraints = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth_constraints(self):
    self.__bandwidth_constraints = YANGDynClass(base=yc_bandwidth_constraints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints, is_container='container', yang_name="bandwidth-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unconstrained_lsp(self):
    """
    Getter method for unconstrained_lsp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/unconstrained_lsp (container)

    YANG Description: This container defines sub-TLV 23.
    """
    return self.__unconstrained_lsp
      
  def _set_unconstrained_lsp(self, v, load=False):
    """
    Setter method for unconstrained_lsp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/unconstrained_lsp (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unconstrained_lsp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unconstrained_lsp() directly.

    YANG Description: This container defines sub-TLV 23.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unconstrained_lsp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_unconstrained_lsp, is_container='container', yang_name="unconstrained-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unconstrained_lsp must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unconstrained_lsp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_unconstrained_lsp, is_container='container', yang_name="unconstrained-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unconstrained_lsp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unconstrained_lsp(self):
    self.__unconstrained_lsp = YANGDynClass(base=yc_unconstrained_lsp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_unconstrained_lsp, is_container='container', yang_name="unconstrained-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_adjacency_sids(self):
    """
    Getter method for adjacency_sids, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids (container)

    YANG Description: This container defines segment routing adjacency SIDs.
    """
    return self.__adjacency_sids
      
  def _set_adjacency_sids(self, v, load=False):
    """
    Setter method for adjacency_sids, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adjacency_sids is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adjacency_sids() directly.

    YANG Description: This container defines segment routing adjacency SIDs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids, is_container='container', yang_name="adjacency-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adjacency_sids must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids, is_container='container', yang_name="adjacency-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__adjacency_sids = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adjacency_sids(self):
    self.__adjacency_sids = YANGDynClass(base=yc_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids, is_container='container', yang_name="adjacency-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_lan_adjacency_sids(self):
    """
    Getter method for lan_adjacency_sids, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids (container)

    YANG Description: This container defines segment routing LAN adjacency
SIDs
    """
    return self.__lan_adjacency_sids
      
  def _set_lan_adjacency_sids(self, v, load=False):
    """
    Setter method for lan_adjacency_sids, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lan_adjacency_sids is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lan_adjacency_sids() directly.

    YANG Description: This container defines segment routing LAN adjacency
SIDs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_lan_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids, is_container='container', yang_name="lan-adjacency-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lan_adjacency_sids must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_lan_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids, is_container='container', yang_name="lan-adjacency-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__lan_adjacency_sids = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lan_adjacency_sids(self):
    self.__lan_adjacency_sids = YANGDynClass(base=yc_lan_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids, is_container='container', yang_name="lan-adjacency-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_link_delay(self):
    """
    Getter method for link_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay (container)

    YANG Description: This container defines unidirectional link delay.
    """
    return self.__link_delay
      
  def _set_link_delay(self, v, load=False):
    """
    Setter method for link_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_delay() directly.

    YANG Description: This container defines unidirectional link delay.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_link_delay_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay, is_container='container', yang_name="link-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_delay must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_link_delay_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay, is_container='container', yang_name="link-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__link_delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_delay(self):
    self.__link_delay = YANGDynClass(base=yc_link_delay_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay, is_container='container', yang_name="link-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_min_max_link_delay(self):
    """
    Getter method for min_max_link_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/min_max_link_delay (container)

    YANG Description: This container defines min/max link delay.
    """
    return self.__min_max_link_delay
      
  def _set_min_max_link_delay(self, v, load=False):
    """
    Setter method for min_max_link_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/min_max_link_delay (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_max_link_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_max_link_delay() directly.

    YANG Description: This container defines min/max link delay.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_min_max_link_delay_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_min_max_link_delay, is_container='container', yang_name="min-max-link-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_max_link_delay must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_min_max_link_delay_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_min_max_link_delay, is_container='container', yang_name="min-max-link-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__min_max_link_delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_min_max_link_delay(self):
    self.__min_max_link_delay = YANGDynClass(base=yc_min_max_link_delay_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_min_max_link_delay, is_container='container', yang_name="min-max-link-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_link_delay_variation(self):
    """
    Getter method for link_delay_variation, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay_variation (container)

    YANG Description: This container defines unidirectional link delay
variation.
    """
    return self.__link_delay_variation
      
  def _set_link_delay_variation(self, v, load=False):
    """
    Setter method for link_delay_variation, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay_variation (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_delay_variation is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_delay_variation() directly.

    YANG Description: This container defines unidirectional link delay
variation.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_link_delay_variation_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_variation, is_container='container', yang_name="link-delay-variation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_delay_variation must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_link_delay_variation_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_variation, is_container='container', yang_name="link-delay-variation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__link_delay_variation = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_delay_variation(self):
    self.__link_delay_variation = YANGDynClass(base=yc_link_delay_variation_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_variation, is_container='container', yang_name="link-delay-variation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_link_loss(self):
    """
    Getter method for link_loss, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_loss (container)

    YANG Description: This container defines unidirectional link loss delay.
    """
    return self.__link_loss
      
  def _set_link_loss(self, v, load=False):
    """
    Setter method for link_loss, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_loss (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_loss is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_loss() directly.

    YANG Description: This container defines unidirectional link loss delay.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_link_loss_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_loss, is_container='container', yang_name="link-loss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_loss must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_link_loss_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_loss, is_container='container', yang_name="link-loss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__link_loss = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_loss(self):
    self.__link_loss = YANGDynClass(base=yc_link_loss_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_loss, is_container='container', yang_name="link-loss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_residual_bandwidth(self):
    """
    Getter method for residual_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/residual_bandwidth (container)

    YANG Description: This container defines unidirectional residual
bandwidth.
    """
    return self.__residual_bandwidth
      
  def _set_residual_bandwidth(self, v, load=False):
    """
    Setter method for residual_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/residual_bandwidth (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_residual_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_residual_bandwidth() directly.

    YANG Description: This container defines unidirectional residual
bandwidth.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_residual_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_residual_bandwidth, is_container='container', yang_name="residual-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """residual_bandwidth must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_residual_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_residual_bandwidth, is_container='container', yang_name="residual-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__residual_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_residual_bandwidth(self):
    self.__residual_bandwidth = YANGDynClass(base=yc_residual_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_residual_bandwidth, is_container='container', yang_name="residual-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_available_bandwidth(self):
    """
    Getter method for available_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/available_bandwidth (container)

    YANG Description: This container defines unidirectional lavailable
bandwidth.
    """
    return self.__available_bandwidth
      
  def _set_available_bandwidth(self, v, load=False):
    """
    Setter method for available_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/available_bandwidth (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_available_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_available_bandwidth() directly.

    YANG Description: This container defines unidirectional lavailable
bandwidth.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_available_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_available_bandwidth, is_container='container', yang_name="available-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """available_bandwidth must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_available_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_available_bandwidth, is_container='container', yang_name="available-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__available_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_available_bandwidth(self):
    self.__available_bandwidth = YANGDynClass(base=yc_available_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_available_bandwidth, is_container='container', yang_name="available-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_utilized_bandwidth(self):
    """
    Getter method for utilized_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/utilized_bandwidth (container)

    YANG Description: This container defines unidirectional utilized
bandwidth.
    """
    return self.__utilized_bandwidth
      
  def _set_utilized_bandwidth(self, v, load=False):
    """
    Setter method for utilized_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv/utilized_bandwidth (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_utilized_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_utilized_bandwidth() directly.

    YANG Description: This container defines unidirectional utilized
bandwidth.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_utilized_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_utilized_bandwidth, is_container='container', yang_name="utilized-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """utilized_bandwidth must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_utilized_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_utilized_bandwidth, is_container='container', yang_name="utilized-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__utilized_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_utilized_bandwidth(self):
    self.__utilized_bandwidth = YANGDynClass(base=yc_utilized_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv_utilized_bandwidth, is_container='container', yang_name="utilized-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  type = __builtin__.property(_get_type)
  state = __builtin__.property(_get_state)
  admin_group = __builtin__.property(_get_admin_group)
  link_id = __builtin__.property(_get_link_id)
  ipv4_interface_address = __builtin__.property(_get_ipv4_interface_address)
  ipv4_neighbor_address = __builtin__.property(_get_ipv4_neighbor_address)
  max_link_bandwidth = __builtin__.property(_get_max_link_bandwidth)
  max_reservable_link_bandwidth = __builtin__.property(_get_max_reservable_link_bandwidth)
  unreserved_bandwidth = __builtin__.property(_get_unreserved_bandwidth)
  ipv6_interface_address = __builtin__.property(_get_ipv6_interface_address)
  ipv6_neighbor_address = __builtin__.property(_get_ipv6_neighbor_address)
  extended_admin_group = __builtin__.property(_get_extended_admin_group)
  te_default_metric = __builtin__.property(_get_te_default_metric)
  link_attributes = __builtin__.property(_get_link_attributes)
  link_protection_type = __builtin__.property(_get_link_protection_type)
  bandwidth_constraints = __builtin__.property(_get_bandwidth_constraints)
  unconstrained_lsp = __builtin__.property(_get_unconstrained_lsp)
  adjacency_sids = __builtin__.property(_get_adjacency_sids)
  lan_adjacency_sids = __builtin__.property(_get_lan_adjacency_sids)
  link_delay = __builtin__.property(_get_link_delay)
  min_max_link_delay = __builtin__.property(_get_min_max_link_delay)
  link_delay_variation = __builtin__.property(_get_link_delay_variation)
  link_loss = __builtin__.property(_get_link_loss)
  residual_bandwidth = __builtin__.property(_get_residual_bandwidth)
  available_bandwidth = __builtin__.property(_get_available_bandwidth)
  utilized_bandwidth = __builtin__.property(_get_utilized_bandwidth)


  _pyangbind_elements = OrderedDict([('type', type), ('state', state), ('admin_group', admin_group), ('link_id', link_id), ('ipv4_interface_address', ipv4_interface_address), ('ipv4_neighbor_address', ipv4_neighbor_address), ('max_link_bandwidth', max_link_bandwidth), ('max_reservable_link_bandwidth', max_reservable_link_bandwidth), ('unreserved_bandwidth', unreserved_bandwidth), ('ipv6_interface_address', ipv6_interface_address), ('ipv6_neighbor_address', ipv6_neighbor_address), ('extended_admin_group', extended_admin_group), ('te_default_metric', te_default_metric), ('link_attributes', link_attributes), ('link_protection_type', link_protection_type), ('bandwidth_constraints', bandwidth_constraints), ('unconstrained_lsp', unconstrained_lsp), ('adjacency_sids', adjacency_sids), ('lan_adjacency_sids', lan_adjacency_sids), ('link_delay', link_delay), ('min_max_link_delay', min_max_link_delay), ('link_delay_variation', link_delay_variation), ('link_loss', link_loss), ('residual_bandwidth', residual_bandwidth), ('available_bandwidth', available_bandwidth), ('utilized_bandwidth', utilized_bandwidth), ])


class yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/subtlvs. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container describes IS Neighbor sub-TLVs.
  """
  __slots__ = ('_path_helper', '_extmethods', '__subtlv',)

  _yang_name = 'subtlvs'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__subtlv = YANGDynClass(base=YANGListType("type",yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv, yang_name="subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs']

  def _get_subtlv(self):
    """
    Getter method for subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv (list)

    YANG Description: List of subTLV types in the LSDB for the specified TLV.
    """
    return self.__subtlv
      
  def _set_subtlv(self, v, load=False):
    """
    Setter method for subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs/subtlv (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_subtlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_subtlv() directly.

    YANG Description: List of subTLV types in the LSDB for the specified TLV.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("type",yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv, yang_name="subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """subtlv must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("type",yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv, yang_name="subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__subtlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_subtlv(self):
    self.__subtlv = YANGDynClass(base=YANGListType("type",yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs_subtlv, yang_name="subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  subtlv = __builtin__.property(_get_subtlv)


  _pyangbind_elements = OrderedDict([('subtlv', subtlv), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_undefined_subtlvs_undefined_subtlv_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/undefined-subtlvs/undefined-subtlv/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of the undefined sub-TLV.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__length','__value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__value = YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'undefined-subtlvs', 'undefined-subtlv', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv/state/type (uint8)

    YANG Description: TLV Type.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv/state/type (uint8)
    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: TLV Type.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with uint8""",
          'defined-type': "uint8",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_length(self):
    """
    Getter method for length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv/state/length (uint8)

    YANG Description: TLV length.
    """
    return self.__length
      
  def _set_length(self, v, load=False):
    """
    Setter method for length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv/state/length (uint8)
    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: TLV length.
    """
    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="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """length 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="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', 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..255']}, int_size=8), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv/state/value (binary)

    YANG Description: TLV value.
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv/state/value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: TLV value.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  type = __builtin__.property(_get_type)
  length = __builtin__.property(_get_length)
  value = __builtin__.property(_get_value)


  _pyangbind_elements = OrderedDict([('type', type), ('length', length), ('value', value), ])


class yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_undefined_subtlvs_undefined_subtlv(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/undefined-subtlvs/undefined-subtlv. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Sub-TLVs that are not defined in the model or not
recognised by system.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__state',)

  _yang_name = 'undefined-subtlv'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_undefined_subtlvs_undefined_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'undefined-subtlvs', 'undefined-subtlv']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv/type (leafref)

    YANG Description: Reference to the type of the undefined sub-TLV
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv/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 type of the undefined sub-TLV
    """
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv/state (container)

    YANG Description: State parameters of the undefined sub-TLV.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv/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 parameters of the undefined sub-TLV.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_undefined_subtlvs_undefined_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_undefined_subtlvs_undefined_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_undefined_subtlvs_undefined_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  type = __builtin__.property(_get_type)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('type', type), ('state', state), ])


class yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_undefined_subtlvs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance/undefined-subtlvs. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container describes undefined ISIS TLVs.
  """
  __slots__ = ('_path_helper', '_extmethods', '__undefined_subtlv',)

  _yang_name = 'undefined-subtlvs'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__undefined_subtlv = YANGDynClass(base=YANGListType("type",yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_undefined_subtlvs_undefined_subtlv, yang_name="undefined-subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="undefined-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance', 'undefined-subtlvs']

  def _get_undefined_subtlv(self):
    """
    Getter method for undefined_subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv (list)

    YANG Description: Sub-TLVs that are not defined in the model or not
recognised by system.
    """
    return self.__undefined_subtlv
      
  def _set_undefined_subtlv(self, v, load=False):
    """
    Setter method for undefined_subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_undefined_subtlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_undefined_subtlv() directly.

    YANG Description: Sub-TLVs that are not defined in the model or not
recognised by system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("type",yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_undefined_subtlvs_undefined_subtlv, yang_name="undefined-subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="undefined-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """undefined_subtlv must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("type",yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_undefined_subtlvs_undefined_subtlv, yang_name="undefined-subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="undefined-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__undefined_subtlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_undefined_subtlv(self):
    self.__undefined_subtlv = YANGDynClass(base=YANGListType("type",yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_undefined_subtlvs_undefined_subtlv, yang_name="undefined-subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="undefined-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  undefined_subtlv = __builtin__.property(_get_undefined_subtlv)


  _pyangbind_elements = OrderedDict([('undefined_subtlv', undefined_subtlv), ])


class yc_instance_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances/instance. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Instance of the TLV to the remote IS neighbor.
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__state','__subtlvs','__undefined_subtlvs',)

  _yang_name = 'instance'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__subtlvs = YANGDynClass(base=yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs, is_container='container', yang_name="subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__undefined_subtlvs = YANGDynClass(base=yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_undefined_subtlvs, is_container='container', yang_name="undefined-subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances', 'instance']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/id (leafref)

    YANG Description: Reference to the unique identifier for
the instance of the extended IS
reachability sub-TLV.
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/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 the unique identifier for
the instance of the extended IS
reachability sub-TLV.
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/state (container)

    YANG Description: State parameters of extended neighbor
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/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 parameters of extended neighbor
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_subtlvs(self):
    """
    Getter method for subtlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs (container)

    YANG Description: This container describes IS Neighbor sub-TLVs.
    """
    return self.__subtlvs
      
  def _set_subtlvs(self, v, load=False):
    """
    Setter method for subtlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/subtlvs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_subtlvs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_subtlvs() directly.

    YANG Description: This container describes IS Neighbor sub-TLVs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs, is_container='container', yang_name="subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """subtlvs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs, is_container='container', yang_name="subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__subtlvs = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_subtlvs(self):
    self.__subtlvs = YANGDynClass(base=yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_subtlvs, is_container='container', yang_name="subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_undefined_subtlvs(self):
    """
    Getter method for undefined_subtlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/undefined_subtlvs (container)

    YANG Description: This container describes undefined ISIS TLVs.
    """
    return self.__undefined_subtlvs
      
  def _set_undefined_subtlvs(self, v, load=False):
    """
    Setter method for undefined_subtlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance/undefined_subtlvs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_undefined_subtlvs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_undefined_subtlvs() directly.

    YANG Description: This container describes undefined ISIS TLVs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_undefined_subtlvs, is_container='container', yang_name="undefined-subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """undefined_subtlvs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_undefined_subtlvs, is_container='container', yang_name="undefined-subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__undefined_subtlvs = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_undefined_subtlvs(self):
    self.__undefined_subtlvs = YANGDynClass(base=yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance_undefined_subtlvs, is_container='container', yang_name="undefined-subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  id = __builtin__.property(_get_id)
  state = __builtin__.property(_get_state)
  subtlvs = __builtin__.property(_get_subtlvs)
  undefined_subtlvs = __builtin__.property(_get_undefined_subtlvs)


  _pyangbind_elements = OrderedDict([('id', id), ('state', state), ('subtlvs', subtlvs), ('undefined_subtlvs', undefined_subtlvs), ])


class yc_instances_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor/instances. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This list contains all instances of an adjacency
between the originating IS and the remote IS.
Multiple instances are used where there are
parallel adjacencies between two systems.
  """
  __slots__ = ('_path_helper', '_extmethods', '__instance',)

  _yang_name = 'instances'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__instance = YANGDynClass(base=YANGListType("id",yc_instance_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance, yang_name="instance", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor', 'instances']

  def _get_instance(self):
    """
    Getter method for instance, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance (list)

    YANG Description: Instance of the TLV to the remote IS neighbor.
    """
    return self.__instance
      
  def _set_instance(self, v, load=False):
    """
    Setter method for instance, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances/instance (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_instance is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_instance() directly.

    YANG Description: Instance of the TLV to the remote IS neighbor.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("id",yc_instance_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance, yang_name="instance", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """instance must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("id",yc_instance_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance, yang_name="instance", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__instance = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_instance(self):
    self.__instance = YANGDynClass(base=YANGListType("id",yc_instance_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances_instance, yang_name="instance", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  instance = __builtin__.property(_get_instance)


  _pyangbind_elements = OrderedDict([('instance', instance), ])


class yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors/neighbor. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This list describes ISIS extended neighbors and
reachability attributes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__system_id','__state','__instances',)

  _yang_name = 'neighbor'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__system_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__instances = YANGDynClass(base=yc_instances_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances, is_container='container', yang_name="instances", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors', 'neighbor']

  def _get_system_id(self):
    """
    Getter method for system_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/system_id (leafref)

    YANG Description: Reference to the neighboring system's system ID.
    """
    return self.__system_id
      
  def _set_system_id(self, v, load=False):
    """
    Setter method for system_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/system_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_system_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_system_id() directly.

    YANG Description: Reference to the neighboring system's system ID.
    """
    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="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """system_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__system_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_system_id(self):
    self.__system_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/state (container)

    YANG Description: State parameters corresponding to the extended
neighbour.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/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 parameters corresponding to the extended
neighbour.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_instances(self):
    """
    Getter method for instances, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances (container)

    YANG Description: This list contains all instances of an adjacency
between the originating IS and the remote IS.
Multiple instances are used where there are
parallel adjacencies between two systems.
    """
    return self.__instances
      
  def _set_instances(self, v, load=False):
    """
    Setter method for instances, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor/instances (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_instances is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_instances() directly.

    YANG Description: This list contains all instances of an adjacency
between the originating IS and the remote IS.
Multiple instances are used where there are
parallel adjacencies between two systems.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_instances_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances, is_container='container', yang_name="instances", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """instances must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_instances_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances, is_container='container', yang_name="instances", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__instances = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_instances(self):
    self.__instances = YANGDynClass(base=yc_instances_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor_instances, is_container='container', yang_name="instances", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  system_id = __builtin__.property(_get_system_id)
  state = __builtin__.property(_get_state)
  instances = __builtin__.property(_get_instances)


  _pyangbind_elements = OrderedDict([('system_id', system_id), ('state', state), ('instances', instances), ])


class yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability/neighbors. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container describes IS neighbors.
  """
  __slots__ = ('_path_helper', '_extmethods', '__neighbor',)

  _yang_name = 'neighbors'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__neighbor = YANGDynClass(base=YANGListType("system_id",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='system-id', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability', 'neighbors']

  def _get_neighbor(self):
    """
    Getter method for neighbor, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor (list)

    YANG Description: This list describes ISIS extended neighbors and
reachability attributes.
    """
    return self.__neighbor
      
  def _set_neighbor(self, v, load=False):
    """
    Setter method for neighbor, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors/neighbor (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor() directly.

    YANG Description: This list describes ISIS extended neighbors and
reachability attributes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("system_id",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='system-id', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("system_id",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='system-id', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__neighbor = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor(self):
    self.__neighbor = YANGDynClass(base=YANGListType("system_id",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='system-id', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  neighbor = __builtin__.property(_get_neighbor)


  _pyangbind_elements = OrderedDict([('neighbor', neighbor), ])


class yc_extended_is_reachability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-is-reachability. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines list of ISIS extended reachability
neighbors.
  """
  __slots__ = ('_path_helper', '_extmethods', '__neighbors',)

  _yang_name = 'extended-is-reachability'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__neighbors = YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-is-reachability']

  def _get_neighbors(self):
    """
    Getter method for neighbors, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors (container)

    YANG Description: This container describes IS neighbors.
    """
    return self.__neighbors
      
  def _set_neighbors(self, v, load=False):
    """
    Setter method for neighbors, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability/neighbors (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbors is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbors() directly.

    YANG Description: This container describes IS neighbors.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbors must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__neighbors = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbors(self):
    self.__neighbors = YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  neighbors = __builtin__.property(_get_neighbors)


  _pyangbind_elements = OrderedDict([('neighbors', neighbors), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-ipv4-reachability/prefixes/prefix/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of an IPv4 extended prefix.
  """
  __slots__ = ('_path_helper', '_extmethods', '__up_down','__s_bit','__prefix','__metric',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__up_down = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="up-down", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__s_bit = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="s-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__prefix = 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-prefix', is_config=False)
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:wide-metric', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-ipv4-reachability', 'prefixes', 'prefix', 'state']

  def _get_up_down(self):
    """
    Getter method for up_down, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/state/up_down (boolean)

    YANG Description: The up/down bit. Set if a prefix is advertised from a
higher level to a lower level (e.g., level 2 to level 1),
indicating that the prefix has traveled down the hierarchy.
Prefixes that have the up/down bit set may only be
advertised down the hierarchy, i.e., to lower levels. When a
prefix is first injected into IS-IS, the bit is UNSET.
    """
    return self.__up_down
      
  def _set_up_down(self, v, load=False):
    """
    Setter method for up_down, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/state/up_down (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_up_down is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_up_down() directly.

    YANG Description: The up/down bit. Set if a prefix is advertised from a
higher level to a lower level (e.g., level 2 to level 1),
indicating that the prefix has traveled down the hierarchy.
Prefixes that have the up/down bit set may only be
advertised down the hierarchy, i.e., to lower levels. When a
prefix is first injected into IS-IS, the bit is UNSET.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="up-down", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """up_down must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="up-down", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__up_down = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_up_down(self):
    self.__up_down = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="up-down", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_s_bit(self):
    """
    Getter method for s_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/state/s_bit (boolean)

    YANG Description: The Sub-TLV present bit. If UNSET, the octets of Sub-TLVs
are not present. Otherwise, the bit is set and the octet
following the prefix will contain the length of the Sub-TLV
portion of the structure.
    """
    return self.__s_bit
      
  def _set_s_bit(self, v, load=False):
    """
    Setter method for s_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/state/s_bit (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_s_bit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_s_bit() directly.

    YANG Description: The Sub-TLV present bit. If UNSET, the octets of Sub-TLVs
are not present. Otherwise, the bit is set and the octet
following the prefix will contain the length of the Sub-TLV
portion of the structure.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="s-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """s_bit must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="s-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__s_bit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_s_bit(self):
    self.__s_bit = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="s-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/state/prefix (inet:ipv4-prefix)

    YANG Description: IPv4 prefix contained within extended reachability TLVs.
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/state/prefix (inet:ipv4-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: IPv4 prefix contained within extended reachability TLVs.
    """
    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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with inet:ipv4-prefix""",
          'defined-type': "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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-prefix', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-prefix', is_config=False)


  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/state/metric (oc-isis-types:wide-metric)

    YANG Description: ISIS metric value.
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/state/metric (oc-isis-types:wide-metric)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: ISIS metric value.
    """
    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': ['1..16777215']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:wide-metric', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric must be of a type compatible with oc-isis-types:wide-metric""",
          'defined-type': "oc-isis-types:wide-metric",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:wide-metric', is_config=False)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:wide-metric', is_config=False)

  up_down = __builtin__.property(_get_up_down)
  s_bit = __builtin__.property(_get_s_bit)
  prefix = __builtin__.property(_get_prefix)
  metric = __builtin__.property(_get_metric)


  _pyangbind_elements = OrderedDict([('up_down', up_down), ('s_bit', s_bit), ('prefix', prefix), ('metric', metric), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-ipv4-reachability/prefixes/prefix/subtlvs/subtlv/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters for a prefix.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-ipv4-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/state/type (identityref)

    YANG Description: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/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: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  type = __builtin__.property(_get_type)


  _pyangbind_elements = OrderedDict([('type', type), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_tag_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-ipv4-reachability/prefixes/prefix/subtlvs/subtlv/tag/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 1.
  """
  __slots__ = ('_path_helper', '_extmethods', '__tag32',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__tag32 = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="tag32", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-ipv4-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'tag', 'state']

  def _get_tag32(self):
    """
    Getter method for tag32, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/tag/state/tag32 (uint32)

    YANG Description: List of 32-bit tags associated with the prefix. Example
uses of these tags include carrying BGP standard (or
extended) communities and controlling redistribution
between levels and areas, different routing protocols,
or multiple instances of IS-IS running on the same
router.
    """
    return self.__tag32
      
  def _set_tag32(self, v, load=False):
    """
    Setter method for tag32, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/tag/state/tag32 (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tag32 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tag32() directly.

    YANG Description: List of 32-bit tags associated with the prefix. Example
uses of these tags include carrying BGP standard (or
extended) communities and controlling redistribution
between levels and areas, different routing protocols,
or multiple instances of IS-IS running on the same
router.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="tag32", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tag32 must be of a type compatible with uint32""",
          'defined-type': "uint32",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="tag32", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__tag32 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tag32(self):
    self.__tag32 = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="tag32", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  tag32 = __builtin__.property(_get_tag32)


  _pyangbind_elements = OrderedDict([('tag32', tag32), ])


class yc_tag_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_tag(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-ipv4-reachability/prefixes/prefix/subtlvs/subtlv/tag. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 1.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'tag'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_tag_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-ipv4-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'tag']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/tag/state (container)

    YANG Description: State parameters of sub-TLV 1.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/tag/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 parameters of sub-TLV 1.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_tag_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_tag_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_tag_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_tag64_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-ipv4-reachability/prefixes/prefix/subtlvs/subtlv/tag64/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 2.
  """
  __slots__ = ('_path_helper', '_extmethods', '__tag64',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__tag64 = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)), is_leaf=False, yang_name="tag64", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-ipv4-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'tag64', 'state']

  def _get_tag64(self):
    """
    Getter method for tag64, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/tag64/state/tag64 (uint64)

    YANG Description: List of 64-bit tags associated with the prefix. Example
uses of these tags include carrying BGP standard (or
extended) communities and controlling redistribution
between levels and areas, different routing protocols,
or multiple instances of IS-IS running on the same
router.
    """
    return self.__tag64
      
  def _set_tag64(self, v, load=False):
    """
    Setter method for tag64, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/tag64/state/tag64 (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tag64 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tag64() directly.

    YANG Description: List of 64-bit tags associated with the prefix. Example
uses of these tags include carrying BGP standard (or
extended) communities and controlling redistribution
between levels and areas, different routing protocols,
or multiple instances of IS-IS running on the same
router.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)), is_leaf=False, yang_name="tag64", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tag64 must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)), is_leaf=False, yang_name="tag64", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__tag64 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tag64(self):
    self.__tag64 = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)), is_leaf=False, yang_name="tag64", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)

  tag64 = __builtin__.property(_get_tag64)


  _pyangbind_elements = OrderedDict([('tag64', tag64), ])


class yc_tag64_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_tag64(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-ipv4-reachability/prefixes/prefix/subtlvs/subtlv/tag64. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 2.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'tag64'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_tag64_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-ipv4-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'tag64']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/tag64/state (container)

    YANG Description: State parameters of sub-TLV 2.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/tag64/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 parameters of sub-TLV 2.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_tag64_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_tag64_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_tag64_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_flags_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-ipv4-reachability/prefixes/prefix/subtlvs/subtlv/flags/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 4.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__flags',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXTERNAL_FLAG': {}, 'READVERTISEMENT_FLAG': {}, 'NODE_FLAG': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-ipv4-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'flags', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/flags/state/type (identityref)

    YANG Description: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/flags/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: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_flags(self):
    """
    Getter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/flags/state/flags (enumeration)

    YANG Description: Additional prefix reachability flags.
    """
    return self.__flags
      
  def _set_flags(self, v, load=False):
    """
    Setter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/flags/state/flags (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flags() directly.

    YANG Description: Additional prefix reachability flags.
    """
    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={'EXTERNAL_FLAG': {}, 'READVERTISEMENT_FLAG': {}, 'NODE_FLAG': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flags must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXTERNAL_FLAG': {}, 'READVERTISEMENT_FLAG': {}, 'NODE_FLAG': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_flags(self):
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXTERNAL_FLAG': {}, 'READVERTISEMENT_FLAG': {}, 'NODE_FLAG': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)

  type = __builtin__.property(_get_type)
  flags = __builtin__.property(_get_flags)


  _pyangbind_elements = OrderedDict([('type', type), ('flags', flags), ])


class yc_flags_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_flags(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-ipv4-reachability/prefixes/prefix/subtlvs/subtlv/flags. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 4.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'flags'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_flags_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-ipv4-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'flags']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/flags/state (container)

    YANG Description: State parameters of sub-TLV 4.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/flags/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 parameters of sub-TLV 4.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_flags_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_flags_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_flags_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_ipv4_source_router_id_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-ipv4-reachability/prefixes/prefix/subtlvs/subtlv/ipv4-source-router-id/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 11.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__router_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__router_id = 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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-ipv4-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'ipv4-source-router-id', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/ipv4_source_router_id/state/type (identityref)

    YANG Description: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/ipv4_source_router_id/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: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_router_id(self):
    """
    Getter method for router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/ipv4_source_router_id/state/router_id (inet:ipv4-address)

    YANG Description: IPv4 Source router ID address. In cases where the
advertisement is an identifier for the advertising
router (e.g., with the N-flag set in the Prefix
Attribute Flags sub-TLV), it may be useful for other
routers to know the source of the advertisement. When
reachability advertisement is leaked from one level to
another, Router ID advertised is always the Router ID
of the IS-IS instance that originated the
advertisement. This would be true even if the prefix
had been learned from another protocol.
    """
    return self.__router_id
      
  def _set_router_id(self, v, load=False):
    """
    Setter method for router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/ipv4_source_router_id/state/router_id (inet:ipv4-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_router_id() directly.

    YANG Description: IPv4 Source router ID address. In cases where the
advertisement is an identifier for the advertising
router (e.g., with the N-flag set in the Prefix
Attribute Flags sub-TLV), it may be useful for other
routers to know the source of the advertisement. When
reachability advertisement is leaked from one level to
another, Router ID advertised is always the Router ID
of the IS-IS instance that originated the
advertisement. This would be true even if the prefix
had been learned from another protocol.
    """
    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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """router_id must be of a type compatible with inet:ipv4-address""",
          'defined-type': "inet:ipv4-address",
          '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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)""",
        })

    self.__router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_router_id(self):
    self.__router_id = 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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)

  type = __builtin__.property(_get_type)
  router_id = __builtin__.property(_get_router_id)


  _pyangbind_elements = OrderedDict([('type', type), ('router_id', router_id), ])


class yc_ipv4_source_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_ipv4_source_router_id(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-ipv4-reachability/prefixes/prefix/subtlvs/subtlv/ipv4-source-router-id. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 11.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'ipv4-source-router-id'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_ipv4_source_router_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-ipv4-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'ipv4-source-router-id']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/ipv4_source_router_id/state (container)

    YANG Description: State parameters of sub-TLV 11.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/ipv4_source_router_id/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 parameters of sub-TLV 11.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_ipv4_source_router_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_ipv4_source_router_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_ipv4_source_router_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_ipv6_source_router_id_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-ipv4-reachability/prefixes/prefix/subtlvs/subtlv/ipv6-source-router-id/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 12.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__router_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__router_id = 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}|:))'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-ipv4-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'ipv6-source-router-id', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/ipv6_source_router_id/state/type (identityref)

    YANG Description: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/ipv6_source_router_id/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: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_router_id(self):
    """
    Getter method for router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/ipv6_source_router_id/state/router_id (inet:ipv6-address)

    YANG Description: IPv6 Source router ID address. In cases where the
advertisement is an identifier for the advertising
router (e.g., with the N-flag set in the Prefix
Attribute Flags sub-TLV), it may be useful for other
routers to know the source of the advertisement. When
reachability advertisement is leaked from one level to
another, Router ID advertised is always the Router ID
of the IS-IS instance that originated the
advertisement. This would be true even if the prefix
had been learned from another protocol.
    """
    return self.__router_id
      
  def _set_router_id(self, v, load=False):
    """
    Setter method for router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/ipv6_source_router_id/state/router_id (inet:ipv6-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_router_id() directly.

    YANG Description: IPv6 Source router ID address. In cases where the
advertisement is an identifier for the advertising
router (e.g., with the N-flag set in the Prefix
Attribute Flags sub-TLV), it may be useful for other
routers to know the source of the advertisement. When
reachability advertisement is leaked from one level to
another, Router ID advertised is always the Router ID
of the IS-IS instance that originated the
advertisement. This would be true even if the prefix
had been learned from another protocol.
    """
    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}|:))'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """router_id must be of a type compatible with inet:ipv6-address""",
          'defined-type': "inet:ipv6-address",
          '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}|:))'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)""",
        })

    self.__router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_router_id(self):
    self.__router_id = 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}|:))'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)

  type = __builtin__.property(_get_type)
  router_id = __builtin__.property(_get_router_id)


  _pyangbind_elements = OrderedDict([('type', type), ('router_id', router_id), ])


class yc_ipv6_source_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_ipv6_source_router_id(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-ipv4-reachability/prefixes/prefix/subtlvs/subtlv/ipv6-source-router-id. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 12.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'ipv6-source-router-id'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_ipv6_source_router_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-ipv4-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'ipv6-source-router-id']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/ipv6_source_router_id/state (container)

    YANG Description: State parameters of sub-TLV 12.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/ipv6_source_router_id/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 parameters of sub-TLV 12.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_ipv6_source_router_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_ipv6_source_router_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_ipv6_source_router_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids_prefix_sid_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-ipv4-reachability/prefixes/prefix/subtlvs/subtlv/prefix-sids/prefix-sid/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters for Prefix-SID.
  """
  __slots__ = ('_path_helper', '_extmethods', '__value','__flags','__algorithm',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'READVERTISEMENT': {}, 'NODE': {}, 'NO_PHP': {}, 'EXPLICIT_NULL': {}, 'VALUE': {}, 'LOCAL': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__algorithm = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="algorithm", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-ipv4-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'prefix-sids', 'prefix-sid', 'state']

  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid/state/value (uint32)

    YANG Description: IGP Prefix-SID value.
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid/state/value (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: IGP Prefix-SID value.
    """
    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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value 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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_flags(self):
    """
    Getter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid/state/flags (enumeration)

    YANG Description: Flags associated with Prefix Segment-ID.
    """
    return self.__flags
      
  def _set_flags(self, v, load=False):
    """
    Setter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid/state/flags (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flags() directly.

    YANG Description: Flags associated with Prefix Segment-ID.
    """
    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={'READVERTISEMENT': {}, 'NODE': {}, 'NO_PHP': {}, 'EXPLICIT_NULL': {}, 'VALUE': {}, 'LOCAL': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flags must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'READVERTISEMENT': {}, 'NODE': {}, 'NO_PHP': {}, 'EXPLICIT_NULL': {}, 'VALUE': {}, 'LOCAL': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_flags(self):
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'READVERTISEMENT': {}, 'NODE': {}, 'NO_PHP': {}, 'EXPLICIT_NULL': {}, 'VALUE': {}, 'LOCAL': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_algorithm(self):
    """
    Getter method for algorithm, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid/state/algorithm (uint8)

    YANG Description: Prefix-SID algorithm to be used for path computation.
    """
    return self.__algorithm
      
  def _set_algorithm(self, v, load=False):
    """
    Setter method for algorithm, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid/state/algorithm (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_algorithm is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_algorithm() directly.

    YANG Description: Prefix-SID algorithm to be used for path computation.
    """
    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="algorithm", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """algorithm 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="algorithm", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__algorithm = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_algorithm(self):
    self.__algorithm = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="algorithm", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)

  value = __builtin__.property(_get_value)
  flags = __builtin__.property(_get_flags)
  algorithm = __builtin__.property(_get_algorithm)


  _pyangbind_elements = OrderedDict([('value', value), ('flags', flags), ('algorithm', algorithm), ])


class yc_prefix_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids_prefix_sid(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-ipv4-reachability/prefixes/prefix/subtlvs/subtlv/prefix-sids/prefix-sid. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Prefix Segment-ID list. IGP-Prefix Segment is an IGP segment
attached to an IGP prefix. An IGP-Prefix Segment is global
(unless explicitly advertised otherwise) within the SR/IGP
domain.
  """
  __slots__ = ('_path_helper', '_extmethods', '__value','__state',)

  _yang_name = 'prefix-sid'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__value = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids_prefix_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-ipv4-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'prefix-sids', 'prefix-sid']

  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid/value (leafref)

    YANG Description: Reference to the value of the prefix SID.
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid/value (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: Reference to the value of the prefix SID.
    """
    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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid/state (container)

    YANG Description: State parameters for Prefix-SID.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid/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 parameters for Prefix-SID.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids_prefix_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids_prefix_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids_prefix_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  value = __builtin__.property(_get_value)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('value', value), ('state', state), ])


class yc_prefix_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-ipv4-reachability/prefixes/prefix/subtlvs/subtlv/prefix-sids. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines segment routing extensions for
prefixes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_sid',)

  _yang_name = 'prefix-sids'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_sid = YANGDynClass(base=YANGListType("value",yc_prefix_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids_prefix_sid, yang_name="prefix-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="prefix-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-ipv4-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'prefix-sids']

  def _get_prefix_sid(self):
    """
    Getter method for prefix_sid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid (list)

    YANG Description: Prefix Segment-ID list. IGP-Prefix Segment is an IGP segment
attached to an IGP prefix. An IGP-Prefix Segment is global
(unless explicitly advertised otherwise) within the SR/IGP
domain.
    """
    return self.__prefix_sid
      
  def _set_prefix_sid(self, v, load=False):
    """
    Setter method for prefix_sid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_sid is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_sid() directly.

    YANG Description: Prefix Segment-ID list. IGP-Prefix Segment is an IGP segment
attached to an IGP prefix. An IGP-Prefix Segment is global
(unless explicitly advertised otherwise) within the SR/IGP
domain.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("value",yc_prefix_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids_prefix_sid, yang_name="prefix-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="prefix-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_sid must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("value",yc_prefix_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids_prefix_sid, yang_name="prefix-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="prefix-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__prefix_sid = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_sid(self):
    self.__prefix_sid = YANGDynClass(base=YANGListType("value",yc_prefix_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids_prefix_sid, yang_name="prefix-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="prefix-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  prefix_sid = __builtin__.property(_get_prefix_sid)


  _pyangbind_elements = OrderedDict([('prefix_sid', prefix_sid), ])


class yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-ipv4-reachability/prefixes/prefix/subtlvs/subtlv. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of subTLV types in the LSDB for the specified TLV.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__state','__tag','__tag64','__flags','__ipv4_source_router_id','__ipv6_source_router_id','__prefix_sids',)

  _yang_name = 'subtlv'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__tag = YANGDynClass(base=yc_tag_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_tag, is_container='container', yang_name="tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__tag64 = YANGDynClass(base=yc_tag64_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_tag64, is_container='container', yang_name="tag64", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__flags = YANGDynClass(base=yc_flags_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_flags, is_container='container', yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ipv4_source_router_id = YANGDynClass(base=yc_ipv4_source_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_ipv4_source_router_id, is_container='container', yang_name="ipv4-source-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ipv6_source_router_id = YANGDynClass(base=yc_ipv6_source_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_ipv6_source_router_id, is_container='container', yang_name="ipv6-source-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__prefix_sids = YANGDynClass(base=yc_prefix_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids, is_container='container', yang_name="prefix-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-ipv4-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/type (leafref)

    YANG Description: Reference to the sub-TLV type
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/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 sub-TLV type
    """
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/state (container)

    YANG Description: State parameters for a prefix.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/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 parameters for a prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_tag(self):
    """
    Getter method for tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/tag (container)

    YANG Description: This container defines sub-TLV 1.
    """
    return self.__tag
      
  def _set_tag(self, v, load=False):
    """
    Setter method for tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/tag (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tag is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tag() directly.

    YANG Description: This container defines sub-TLV 1.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_tag_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_tag, is_container='container', yang_name="tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tag must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_tag_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_tag, is_container='container', yang_name="tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__tag = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tag(self):
    self.__tag = YANGDynClass(base=yc_tag_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_tag, is_container='container', yang_name="tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_tag64(self):
    """
    Getter method for tag64, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/tag64 (container)

    YANG Description: This container defines sub-TLV 2.
    """
    return self.__tag64
      
  def _set_tag64(self, v, load=False):
    """
    Setter method for tag64, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/tag64 (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tag64 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tag64() directly.

    YANG Description: This container defines sub-TLV 2.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_tag64_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_tag64, is_container='container', yang_name="tag64", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tag64 must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_tag64_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_tag64, is_container='container', yang_name="tag64", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__tag64 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tag64(self):
    self.__tag64 = YANGDynClass(base=yc_tag64_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_tag64, is_container='container', yang_name="tag64", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_flags(self):
    """
    Getter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/flags (container)

    YANG Description: This container defines sub-TLV 4.
    """
    return self.__flags
      
  def _set_flags(self, v, load=False):
    """
    Setter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/flags (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flags() directly.

    YANG Description: This container defines sub-TLV 4.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_flags_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_flags, is_container='container', yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flags must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_flags_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_flags, is_container='container', yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_flags(self):
    self.__flags = YANGDynClass(base=yc_flags_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_flags, is_container='container', yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ipv4_source_router_id(self):
    """
    Getter method for ipv4_source_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/ipv4_source_router_id (container)

    YANG Description: This container defines sub-TLV 11.
    """
    return self.__ipv4_source_router_id
      
  def _set_ipv4_source_router_id(self, v, load=False):
    """
    Setter method for ipv4_source_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/ipv4_source_router_id (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv4_source_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv4_source_router_id() directly.

    YANG Description: This container defines sub-TLV 11.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv4_source_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_ipv4_source_router_id, is_container='container', yang_name="ipv4-source-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv4_source_router_id must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv4_source_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_ipv4_source_router_id, is_container='container', yang_name="ipv4-source-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ipv4_source_router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv4_source_router_id(self):
    self.__ipv4_source_router_id = YANGDynClass(base=yc_ipv4_source_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_ipv4_source_router_id, is_container='container', yang_name="ipv4-source-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ipv6_source_router_id(self):
    """
    Getter method for ipv6_source_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/ipv6_source_router_id (container)

    YANG Description: This container defines sub-TLV 12.
    """
    return self.__ipv6_source_router_id
      
  def _set_ipv6_source_router_id(self, v, load=False):
    """
    Setter method for ipv6_source_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/ipv6_source_router_id (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6_source_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6_source_router_id() directly.

    YANG Description: This container defines sub-TLV 12.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv6_source_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_ipv6_source_router_id, is_container='container', yang_name="ipv6-source-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6_source_router_id must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv6_source_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_ipv6_source_router_id, is_container='container', yang_name="ipv6-source-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ipv6_source_router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6_source_router_id(self):
    self.__ipv6_source_router_id = YANGDynClass(base=yc_ipv6_source_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_ipv6_source_router_id, is_container='container', yang_name="ipv6-source-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_prefix_sids(self):
    """
    Getter method for prefix_sids, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids (container)

    YANG Description: This container defines segment routing extensions for
prefixes.
    """
    return self.__prefix_sids
      
  def _set_prefix_sids(self, v, load=False):
    """
    Setter method for prefix_sids, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_sids is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_sids() directly.

    YANG Description: This container defines segment routing extensions for
prefixes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids, is_container='container', yang_name="prefix-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_sids must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids, is_container='container', yang_name="prefix-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__prefix_sids = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_sids(self):
    self.__prefix_sids = YANGDynClass(base=yc_prefix_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids, is_container='container', yang_name="prefix-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  type = __builtin__.property(_get_type)
  state = __builtin__.property(_get_state)
  tag = __builtin__.property(_get_tag)
  tag64 = __builtin__.property(_get_tag64)
  flags = __builtin__.property(_get_flags)
  ipv4_source_router_id = __builtin__.property(_get_ipv4_source_router_id)
  ipv6_source_router_id = __builtin__.property(_get_ipv6_source_router_id)
  prefix_sids = __builtin__.property(_get_prefix_sids)


  _pyangbind_elements = OrderedDict([('type', type), ('state', state), ('tag', tag), ('tag64', tag64), ('flags', flags), ('ipv4_source_router_id', ipv4_source_router_id), ('ipv6_source_router_id', ipv6_source_router_id), ('prefix_sids', prefix_sids), ])


class yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-ipv4-reachability/prefixes/prefix/subtlvs. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container describes IS prefix sub-TLVs.
  """
  __slots__ = ('_path_helper', '_extmethods', '__subtlv',)

  _yang_name = 'subtlvs'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__subtlv = YANGDynClass(base=YANGListType("type",yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv, yang_name="subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-ipv4-reachability', 'prefixes', 'prefix', 'subtlvs']

  def _get_subtlv(self):
    """
    Getter method for subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv (list)

    YANG Description: List of subTLV types in the LSDB for the specified TLV.
    """
    return self.__subtlv
      
  def _set_subtlv(self, v, load=False):
    """
    Setter method for subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs/subtlv (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_subtlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_subtlv() directly.

    YANG Description: List of subTLV types in the LSDB for the specified TLV.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("type",yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv, yang_name="subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """subtlv must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("type",yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv, yang_name="subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__subtlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_subtlv(self):
    self.__subtlv = YANGDynClass(base=YANGListType("type",yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs_subtlv, yang_name="subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  subtlv = __builtin__.property(_get_subtlv)


  _pyangbind_elements = OrderedDict([('subtlv', subtlv), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_undefined_subtlvs_undefined_subtlv_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-ipv4-reachability/prefixes/prefix/undefined-subtlvs/undefined-subtlv/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of the undefined sub-TLV.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__length','__value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__value = YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-ipv4-reachability', 'prefixes', 'prefix', 'undefined-subtlvs', 'undefined-subtlv', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv/state/type (uint8)

    YANG Description: TLV Type.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv/state/type (uint8)
    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: TLV Type.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with uint8""",
          'defined-type': "uint8",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_length(self):
    """
    Getter method for length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv/state/length (uint8)

    YANG Description: TLV length.
    """
    return self.__length
      
  def _set_length(self, v, load=False):
    """
    Setter method for length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv/state/length (uint8)
    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: TLV length.
    """
    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="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """length 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="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', 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..255']}, int_size=8), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv/state/value (binary)

    YANG Description: TLV value.
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv/state/value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: TLV value.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  type = __builtin__.property(_get_type)
  length = __builtin__.property(_get_length)
  value = __builtin__.property(_get_value)


  _pyangbind_elements = OrderedDict([('type', type), ('length', length), ('value', value), ])


class yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_undefined_subtlvs_undefined_subtlv(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-ipv4-reachability/prefixes/prefix/undefined-subtlvs/undefined-subtlv. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Sub-TLVs that are not defined in the model or not
recognised by system.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__state',)

  _yang_name = 'undefined-subtlv'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_undefined_subtlvs_undefined_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-ipv4-reachability', 'prefixes', 'prefix', 'undefined-subtlvs', 'undefined-subtlv']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv/type (leafref)

    YANG Description: Reference to the type of the undefined sub-TLV
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv/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 type of the undefined sub-TLV
    """
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv/state (container)

    YANG Description: State parameters of the undefined sub-TLV.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv/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 parameters of the undefined sub-TLV.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_undefined_subtlvs_undefined_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_undefined_subtlvs_undefined_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_undefined_subtlvs_undefined_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  type = __builtin__.property(_get_type)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('type', type), ('state', state), ])


class yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_undefined_subtlvs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-ipv4-reachability/prefixes/prefix/undefined-subtlvs. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container describes undefined ISIS TLVs.
  """
  __slots__ = ('_path_helper', '_extmethods', '__undefined_subtlv',)

  _yang_name = 'undefined-subtlvs'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__undefined_subtlv = YANGDynClass(base=YANGListType("type",yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_undefined_subtlvs_undefined_subtlv, yang_name="undefined-subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="undefined-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-ipv4-reachability', 'prefixes', 'prefix', 'undefined-subtlvs']

  def _get_undefined_subtlv(self):
    """
    Getter method for undefined_subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv (list)

    YANG Description: Sub-TLVs that are not defined in the model or not
recognised by system.
    """
    return self.__undefined_subtlv
      
  def _set_undefined_subtlv(self, v, load=False):
    """
    Setter method for undefined_subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_undefined_subtlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_undefined_subtlv() directly.

    YANG Description: Sub-TLVs that are not defined in the model or not
recognised by system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("type",yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_undefined_subtlvs_undefined_subtlv, yang_name="undefined-subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="undefined-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """undefined_subtlv must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("type",yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_undefined_subtlvs_undefined_subtlv, yang_name="undefined-subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="undefined-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__undefined_subtlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_undefined_subtlv(self):
    self.__undefined_subtlv = YANGDynClass(base=YANGListType("type",yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_undefined_subtlvs_undefined_subtlv, yang_name="undefined-subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="undefined-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  undefined_subtlv = __builtin__.property(_get_undefined_subtlv)


  _pyangbind_elements = OrderedDict([('undefined_subtlv', undefined_subtlv), ])


class yc_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-ipv4-reachability/prefixes/prefix. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This list describes IPv4 extended prefixes and
attributes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix','__state','__subtlvs','__undefined_subtlvs',)

  _yang_name = 'prefix'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__subtlvs = YANGDynClass(base=yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs, is_container='container', yang_name="subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__undefined_subtlvs = YANGDynClass(base=yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_undefined_subtlvs, is_container='container', yang_name="undefined-subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-ipv4-reachability', 'prefixes', 'prefix']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/prefix (leafref)

    YANG Description: Reference to the IPv4 prefix that the TLV describes
the attributes of.
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/prefix (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: Reference to the IPv4 prefix that the TLV describes
the attributes of.
    """
    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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/state (container)

    YANG Description: State parameters of an IPv4 extended prefix.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/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 parameters of an IPv4 extended prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_subtlvs(self):
    """
    Getter method for subtlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs (container)

    YANG Description: This container describes IS prefix sub-TLVs.
    """
    return self.__subtlvs
      
  def _set_subtlvs(self, v, load=False):
    """
    Setter method for subtlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/subtlvs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_subtlvs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_subtlvs() directly.

    YANG Description: This container describes IS prefix sub-TLVs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs, is_container='container', yang_name="subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """subtlvs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs, is_container='container', yang_name="subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__subtlvs = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_subtlvs(self):
    self.__subtlvs = YANGDynClass(base=yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_subtlvs, is_container='container', yang_name="subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_undefined_subtlvs(self):
    """
    Getter method for undefined_subtlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/undefined_subtlvs (container)

    YANG Description: This container describes undefined ISIS TLVs.
    """
    return self.__undefined_subtlvs
      
  def _set_undefined_subtlvs(self, v, load=False):
    """
    Setter method for undefined_subtlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix/undefined_subtlvs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_undefined_subtlvs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_undefined_subtlvs() directly.

    YANG Description: This container describes undefined ISIS TLVs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_undefined_subtlvs, is_container='container', yang_name="undefined-subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """undefined_subtlvs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_undefined_subtlvs, is_container='container', yang_name="undefined-subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__undefined_subtlvs = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_undefined_subtlvs(self):
    self.__undefined_subtlvs = YANGDynClass(base=yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix_undefined_subtlvs, is_container='container', yang_name="undefined-subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  prefix = __builtin__.property(_get_prefix)
  state = __builtin__.property(_get_state)
  subtlvs = __builtin__.property(_get_subtlvs)
  undefined_subtlvs = __builtin__.property(_get_undefined_subtlvs)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ('state', state), ('subtlvs', subtlvs), ('undefined_subtlvs', undefined_subtlvs), ])


class yc_prefixes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-ipv4-reachability/prefixes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container describes IS prefixes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix',)

  _yang_name = 'prefixes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = YANGDynClass(base=YANGListType("prefix",yc_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix, yang_name="prefix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix', extensions=None), is_container='list', yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-ipv4-reachability', 'prefixes']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix (list)

    YANG Description: This list describes IPv4 extended prefixes and
attributes.
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes/prefix (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: This list describes IPv4 extended prefixes and
attributes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("prefix",yc_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix, yang_name="prefix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix', extensions=None), is_container='list', yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("prefix",yc_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix, yang_name="prefix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix', extensions=None), is_container='list', yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = YANGDynClass(base=YANGListType("prefix",yc_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes_prefix, yang_name="prefix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix', extensions=None), is_container='list', yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  prefix = __builtin__.property(_get_prefix)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ])


class yc_extended_ipv4_reachability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-ipv4-reachability. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines list of IPv4 extended reachability
information.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefixes',)

  _yang_name = 'extended-ipv4-reachability'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefixes = YANGDynClass(base=yc_prefixes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes, is_container='container', yang_name="prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'extended-ipv4-reachability']

  def _get_prefixes(self):
    """
    Getter method for prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes (container)

    YANG Description: This container describes IS prefixes.
    """
    return self.__prefixes
      
  def _set_prefixes(self, v, load=False):
    """
    Setter method for prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability/prefixes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefixes() directly.

    YANG Description: This container describes IS prefixes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefixes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes, is_container='container', yang_name="prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefixes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefixes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes, is_container='container', yang_name="prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefixes(self):
    self.__prefixes = YANGDynClass(base=yc_prefixes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability_prefixes, is_container='container', yang_name="prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  prefixes = __builtin__.property(_get_prefixes)


  _pyangbind_elements = OrderedDict([('prefixes', prefixes), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv6-reachability/prefixes/prefix/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IPv6 prefix attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__up_down','__x_bit','__s_bit','__prefix','__metric',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__up_down = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="up-down", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__x_bit = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="x-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__s_bit = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="s-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__prefix = 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', is_config=False)
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:wide-metric', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv6-reachability', 'prefixes', 'prefix', 'state']

  def _get_up_down(self):
    """
    Getter method for up_down, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/state/up_down (boolean)

    YANG Description: The up/down bit. Set if a prefix is advertised from a
higher level to a lower level (e.g., level 2 to level 1),
indicating that the prefix has traveled down the hierarchy.
Prefixes that have the up/down bit set may only be
advertised down the hierarchy, i.e., to lower levels. When a
prefix is first injected into IS-IS, the bit is UNSET.
    """
    return self.__up_down
      
  def _set_up_down(self, v, load=False):
    """
    Setter method for up_down, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/state/up_down (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_up_down is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_up_down() directly.

    YANG Description: The up/down bit. Set if a prefix is advertised from a
higher level to a lower level (e.g., level 2 to level 1),
indicating that the prefix has traveled down the hierarchy.
Prefixes that have the up/down bit set may only be
advertised down the hierarchy, i.e., to lower levels. When a
prefix is first injected into IS-IS, the bit is UNSET.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="up-down", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """up_down must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="up-down", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__up_down = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_up_down(self):
    self.__up_down = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="up-down", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_x_bit(self):
    """
    Getter method for x_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/state/x_bit (boolean)

    YANG Description: The external bit. Set when the prefix was distributed into
IS-IS from another routing protocol.
    """
    return self.__x_bit
      
  def _set_x_bit(self, v, load=False):
    """
    Setter method for x_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/state/x_bit (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_x_bit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_x_bit() directly.

    YANG Description: The external bit. Set when the prefix was distributed into
IS-IS from another routing protocol.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="x-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """x_bit must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="x-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__x_bit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_x_bit(self):
    self.__x_bit = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="x-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_s_bit(self):
    """
    Getter method for s_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/state/s_bit (boolean)

    YANG Description: The sub-tlv present bit. If UNSET, the octets of Sub-TLVs
are not present. Otherwise, the bit is set and the octet
following the prefix will contain the length of the Sub-TLV
portion of the structure.
    """
    return self.__s_bit
      
  def _set_s_bit(self, v, load=False):
    """
    Setter method for s_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/state/s_bit (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_s_bit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_s_bit() directly.

    YANG Description: The sub-tlv present bit. If UNSET, the octets of Sub-TLVs
are not present. Otherwise, the bit is set and the octet
following the prefix will contain the length of the Sub-TLV
portion of the structure.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="s-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """s_bit must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="s-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__s_bit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_s_bit(self):
    self.__s_bit = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="s-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/state/prefix (inet:ipv6-prefix)

    YANG Description: IPv6 prefix contained within extended reachability TLVs.
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/state/prefix (inet:ipv6-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: IPv6 prefix contained within extended reachability TLVs.
    """
    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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with inet:ipv6-prefix""",
          'defined-type': "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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', is_config=False)


  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/state/metric (oc-isis-types:wide-metric)

    YANG Description: ISIS metric value.
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/state/metric (oc-isis-types:wide-metric)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: ISIS metric value.
    """
    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': ['1..16777215']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:wide-metric', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric must be of a type compatible with oc-isis-types:wide-metric""",
          'defined-type': "oc-isis-types:wide-metric",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:wide-metric', is_config=False)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:wide-metric', is_config=False)

  up_down = __builtin__.property(_get_up_down)
  x_bit = __builtin__.property(_get_x_bit)
  s_bit = __builtin__.property(_get_s_bit)
  prefix = __builtin__.property(_get_prefix)
  metric = __builtin__.property(_get_metric)


  _pyangbind_elements = OrderedDict([('up_down', up_down), ('x_bit', x_bit), ('s_bit', s_bit), ('prefix', prefix), ('metric', metric), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv6-reachability/prefixes/prefix/subtlvs/subtlv/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters for a prefix.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv6-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/state/type (identityref)

    YANG Description: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/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: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  type = __builtin__.property(_get_type)


  _pyangbind_elements = OrderedDict([('type', type), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_tag_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv6-reachability/prefixes/prefix/subtlvs/subtlv/tag/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 1.
  """
  __slots__ = ('_path_helper', '_extmethods', '__tag32',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__tag32 = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="tag32", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv6-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'tag', 'state']

  def _get_tag32(self):
    """
    Getter method for tag32, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/tag/state/tag32 (uint32)

    YANG Description: List of 32-bit tags associated with the prefix. Example
uses of these tags include carrying BGP standard (or
extended) communities and controlling redistribution
between levels and areas, different routing protocols,
or multiple instances of IS-IS running on the same
router.
    """
    return self.__tag32
      
  def _set_tag32(self, v, load=False):
    """
    Setter method for tag32, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/tag/state/tag32 (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tag32 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tag32() directly.

    YANG Description: List of 32-bit tags associated with the prefix. Example
uses of these tags include carrying BGP standard (or
extended) communities and controlling redistribution
between levels and areas, different routing protocols,
or multiple instances of IS-IS running on the same
router.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="tag32", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tag32 must be of a type compatible with uint32""",
          'defined-type': "uint32",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="tag32", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__tag32 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tag32(self):
    self.__tag32 = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="tag32", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  tag32 = __builtin__.property(_get_tag32)


  _pyangbind_elements = OrderedDict([('tag32', tag32), ])


class yc_tag_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_tag(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv6-reachability/prefixes/prefix/subtlvs/subtlv/tag. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 1.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'tag'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_tag_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv6-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'tag']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/tag/state (container)

    YANG Description: State parameters of sub-TLV 1.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/tag/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 parameters of sub-TLV 1.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_tag_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_tag_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_tag_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_tag64_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv6-reachability/prefixes/prefix/subtlvs/subtlv/tag64/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 2.
  """
  __slots__ = ('_path_helper', '_extmethods', '__tag64',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__tag64 = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)), is_leaf=False, yang_name="tag64", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv6-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'tag64', 'state']

  def _get_tag64(self):
    """
    Getter method for tag64, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/tag64/state/tag64 (uint64)

    YANG Description: List of 64-bit tags associated with the prefix. Example
uses of these tags include carrying BGP standard (or
extended) communities and controlling redistribution
between levels and areas, different routing protocols,
or multiple instances of IS-IS running on the same
router.
    """
    return self.__tag64
      
  def _set_tag64(self, v, load=False):
    """
    Setter method for tag64, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/tag64/state/tag64 (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tag64 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tag64() directly.

    YANG Description: List of 64-bit tags associated with the prefix. Example
uses of these tags include carrying BGP standard (or
extended) communities and controlling redistribution
between levels and areas, different routing protocols,
or multiple instances of IS-IS running on the same
router.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)), is_leaf=False, yang_name="tag64", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tag64 must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)), is_leaf=False, yang_name="tag64", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__tag64 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tag64(self):
    self.__tag64 = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)), is_leaf=False, yang_name="tag64", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)

  tag64 = __builtin__.property(_get_tag64)


  _pyangbind_elements = OrderedDict([('tag64', tag64), ])


class yc_tag64_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_tag64(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv6-reachability/prefixes/prefix/subtlvs/subtlv/tag64. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 2.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'tag64'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_tag64_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv6-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'tag64']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/tag64/state (container)

    YANG Description: State parameters of sub-TLV 2.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/tag64/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 parameters of sub-TLV 2.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_tag64_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_tag64_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_tag64_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_flags_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv6-reachability/prefixes/prefix/subtlvs/subtlv/flags/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 4.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__flags',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXTERNAL_FLAG': {}, 'READVERTISEMENT_FLAG': {}, 'NODE_FLAG': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv6-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'flags', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/flags/state/type (identityref)

    YANG Description: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/flags/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: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_flags(self):
    """
    Getter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/flags/state/flags (enumeration)

    YANG Description: Additional prefix reachability flags.
    """
    return self.__flags
      
  def _set_flags(self, v, load=False):
    """
    Setter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/flags/state/flags (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flags() directly.

    YANG Description: Additional prefix reachability flags.
    """
    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={'EXTERNAL_FLAG': {}, 'READVERTISEMENT_FLAG': {}, 'NODE_FLAG': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flags must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXTERNAL_FLAG': {}, 'READVERTISEMENT_FLAG': {}, 'NODE_FLAG': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_flags(self):
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXTERNAL_FLAG': {}, 'READVERTISEMENT_FLAG': {}, 'NODE_FLAG': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)

  type = __builtin__.property(_get_type)
  flags = __builtin__.property(_get_flags)


  _pyangbind_elements = OrderedDict([('type', type), ('flags', flags), ])


class yc_flags_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_flags(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv6-reachability/prefixes/prefix/subtlvs/subtlv/flags. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 4.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'flags'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_flags_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv6-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'flags']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/flags/state (container)

    YANG Description: State parameters of sub-TLV 4.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/flags/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 parameters of sub-TLV 4.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_flags_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_flags_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_flags_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_ipv4_source_router_id_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv6-reachability/prefixes/prefix/subtlvs/subtlv/ipv4-source-router-id/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 11.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__router_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__router_id = 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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv6-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'ipv4-source-router-id', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/ipv4_source_router_id/state/type (identityref)

    YANG Description: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/ipv4_source_router_id/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: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_router_id(self):
    """
    Getter method for router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/ipv4_source_router_id/state/router_id (inet:ipv4-address)

    YANG Description: IPv4 Source router ID address. In cases where the
advertisement is an identifier for the advertising
router (e.g., with the N-flag set in the Prefix
Attribute Flags sub-TLV), it may be useful for other
routers to know the source of the advertisement. When
reachability advertisement is leaked from one level to
another, Router ID advertised is always the Router ID
of the IS-IS instance that originated the
advertisement. This would be true even if the prefix
had been learned from another protocol.
    """
    return self.__router_id
      
  def _set_router_id(self, v, load=False):
    """
    Setter method for router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/ipv4_source_router_id/state/router_id (inet:ipv4-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_router_id() directly.

    YANG Description: IPv4 Source router ID address. In cases where the
advertisement is an identifier for the advertising
router (e.g., with the N-flag set in the Prefix
Attribute Flags sub-TLV), it may be useful for other
routers to know the source of the advertisement. When
reachability advertisement is leaked from one level to
another, Router ID advertised is always the Router ID
of the IS-IS instance that originated the
advertisement. This would be true even if the prefix
had been learned from another protocol.
    """
    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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """router_id must be of a type compatible with inet:ipv4-address""",
          'defined-type': "inet:ipv4-address",
          '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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)""",
        })

    self.__router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_router_id(self):
    self.__router_id = 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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)

  type = __builtin__.property(_get_type)
  router_id = __builtin__.property(_get_router_id)


  _pyangbind_elements = OrderedDict([('type', type), ('router_id', router_id), ])


class yc_ipv4_source_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_ipv4_source_router_id(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv6-reachability/prefixes/prefix/subtlvs/subtlv/ipv4-source-router-id. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 11.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'ipv4-source-router-id'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_ipv4_source_router_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv6-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'ipv4-source-router-id']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/ipv4_source_router_id/state (container)

    YANG Description: State parameters of sub-TLV 11.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/ipv4_source_router_id/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 parameters of sub-TLV 11.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_ipv4_source_router_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_ipv4_source_router_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_ipv4_source_router_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_ipv6_source_router_id_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv6-reachability/prefixes/prefix/subtlvs/subtlv/ipv6-source-router-id/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 12.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__router_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__router_id = 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}|:))'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv6-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'ipv6-source-router-id', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/ipv6_source_router_id/state/type (identityref)

    YANG Description: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/ipv6_source_router_id/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: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_router_id(self):
    """
    Getter method for router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/ipv6_source_router_id/state/router_id (inet:ipv6-address)

    YANG Description: IPv6 Source router ID address. In cases where the
advertisement is an identifier for the advertising
router (e.g., with the N-flag set in the Prefix
Attribute Flags sub-TLV), it may be useful for other
routers to know the source of the advertisement. When
reachability advertisement is leaked from one level to
another, Router ID advertised is always the Router ID
of the IS-IS instance that originated the
advertisement. This would be true even if the prefix
had been learned from another protocol.
    """
    return self.__router_id
      
  def _set_router_id(self, v, load=False):
    """
    Setter method for router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/ipv6_source_router_id/state/router_id (inet:ipv6-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_router_id() directly.

    YANG Description: IPv6 Source router ID address. In cases where the
advertisement is an identifier for the advertising
router (e.g., with the N-flag set in the Prefix
Attribute Flags sub-TLV), it may be useful for other
routers to know the source of the advertisement. When
reachability advertisement is leaked from one level to
another, Router ID advertised is always the Router ID
of the IS-IS instance that originated the
advertisement. This would be true even if the prefix
had been learned from another protocol.
    """
    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}|:))'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """router_id must be of a type compatible with inet:ipv6-address""",
          'defined-type': "inet:ipv6-address",
          '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}|:))'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)""",
        })

    self.__router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_router_id(self):
    self.__router_id = 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}|:))'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)

  type = __builtin__.property(_get_type)
  router_id = __builtin__.property(_get_router_id)


  _pyangbind_elements = OrderedDict([('type', type), ('router_id', router_id), ])


class yc_ipv6_source_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_ipv6_source_router_id(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv6-reachability/prefixes/prefix/subtlvs/subtlv/ipv6-source-router-id. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 12.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'ipv6-source-router-id'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_ipv6_source_router_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv6-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'ipv6-source-router-id']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/ipv6_source_router_id/state (container)

    YANG Description: State parameters of sub-TLV 12.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/ipv6_source_router_id/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 parameters of sub-TLV 12.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_ipv6_source_router_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_ipv6_source_router_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_ipv6_source_router_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids_prefix_sid_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv6-reachability/prefixes/prefix/subtlvs/subtlv/prefix-sids/prefix-sid/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters for Prefix-SID.
  """
  __slots__ = ('_path_helper', '_extmethods', '__value','__flags','__algorithm',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'READVERTISEMENT': {}, 'NODE': {}, 'NO_PHP': {}, 'EXPLICIT_NULL': {}, 'VALUE': {}, 'LOCAL': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__algorithm = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="algorithm", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv6-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'prefix-sids', 'prefix-sid', 'state']

  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid/state/value (uint32)

    YANG Description: IGP Prefix-SID value.
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid/state/value (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: IGP Prefix-SID value.
    """
    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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value 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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_flags(self):
    """
    Getter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid/state/flags (enumeration)

    YANG Description: Flags associated with Prefix Segment-ID.
    """
    return self.__flags
      
  def _set_flags(self, v, load=False):
    """
    Setter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid/state/flags (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flags() directly.

    YANG Description: Flags associated with Prefix Segment-ID.
    """
    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={'READVERTISEMENT': {}, 'NODE': {}, 'NO_PHP': {}, 'EXPLICIT_NULL': {}, 'VALUE': {}, 'LOCAL': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flags must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'READVERTISEMENT': {}, 'NODE': {}, 'NO_PHP': {}, 'EXPLICIT_NULL': {}, 'VALUE': {}, 'LOCAL': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_flags(self):
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'READVERTISEMENT': {}, 'NODE': {}, 'NO_PHP': {}, 'EXPLICIT_NULL': {}, 'VALUE': {}, 'LOCAL': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_algorithm(self):
    """
    Getter method for algorithm, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid/state/algorithm (uint8)

    YANG Description: Prefix-SID algorithm to be used for path computation.
    """
    return self.__algorithm
      
  def _set_algorithm(self, v, load=False):
    """
    Setter method for algorithm, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid/state/algorithm (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_algorithm is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_algorithm() directly.

    YANG Description: Prefix-SID algorithm to be used for path computation.
    """
    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="algorithm", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """algorithm 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="algorithm", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__algorithm = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_algorithm(self):
    self.__algorithm = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="algorithm", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)

  value = __builtin__.property(_get_value)
  flags = __builtin__.property(_get_flags)
  algorithm = __builtin__.property(_get_algorithm)


  _pyangbind_elements = OrderedDict([('value', value), ('flags', flags), ('algorithm', algorithm), ])


class yc_prefix_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids_prefix_sid(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv6-reachability/prefixes/prefix/subtlvs/subtlv/prefix-sids/prefix-sid. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Prefix Segment-ID list. IGP-Prefix Segment is an IGP segment
attached to an IGP prefix. An IGP-Prefix Segment is global
(unless explicitly advertised otherwise) within the SR/IGP
domain.
  """
  __slots__ = ('_path_helper', '_extmethods', '__value','__state',)

  _yang_name = 'prefix-sid'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__value = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids_prefix_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv6-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'prefix-sids', 'prefix-sid']

  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid/value (leafref)

    YANG Description: Reference to the value of the prefix SID.
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid/value (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: Reference to the value of the prefix SID.
    """
    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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid/state (container)

    YANG Description: State parameters for Prefix-SID.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid/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 parameters for Prefix-SID.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids_prefix_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids_prefix_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids_prefix_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  value = __builtin__.property(_get_value)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('value', value), ('state', state), ])


class yc_prefix_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv6-reachability/prefixes/prefix/subtlvs/subtlv/prefix-sids. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines segment routing extensions for
prefixes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_sid',)

  _yang_name = 'prefix-sids'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_sid = YANGDynClass(base=YANGListType("value",yc_prefix_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids_prefix_sid, yang_name="prefix-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="prefix-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv6-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'prefix-sids']

  def _get_prefix_sid(self):
    """
    Getter method for prefix_sid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid (list)

    YANG Description: Prefix Segment-ID list. IGP-Prefix Segment is an IGP segment
attached to an IGP prefix. An IGP-Prefix Segment is global
(unless explicitly advertised otherwise) within the SR/IGP
domain.
    """
    return self.__prefix_sid
      
  def _set_prefix_sid(self, v, load=False):
    """
    Setter method for prefix_sid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_sid is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_sid() directly.

    YANG Description: Prefix Segment-ID list. IGP-Prefix Segment is an IGP segment
attached to an IGP prefix. An IGP-Prefix Segment is global
(unless explicitly advertised otherwise) within the SR/IGP
domain.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("value",yc_prefix_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids_prefix_sid, yang_name="prefix-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="prefix-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_sid must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("value",yc_prefix_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids_prefix_sid, yang_name="prefix-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="prefix-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__prefix_sid = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_sid(self):
    self.__prefix_sid = YANGDynClass(base=YANGListType("value",yc_prefix_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids_prefix_sid, yang_name="prefix-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="prefix-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  prefix_sid = __builtin__.property(_get_prefix_sid)


  _pyangbind_elements = OrderedDict([('prefix_sid', prefix_sid), ])


class yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv6-reachability/prefixes/prefix/subtlvs/subtlv. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of subTLV types in the LSDB for the specified TLV.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__state','__tag','__tag64','__flags','__ipv4_source_router_id','__ipv6_source_router_id','__prefix_sids',)

  _yang_name = 'subtlv'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__tag = YANGDynClass(base=yc_tag_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_tag, is_container='container', yang_name="tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__tag64 = YANGDynClass(base=yc_tag64_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_tag64, is_container='container', yang_name="tag64", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__flags = YANGDynClass(base=yc_flags_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_flags, is_container='container', yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ipv4_source_router_id = YANGDynClass(base=yc_ipv4_source_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_ipv4_source_router_id, is_container='container', yang_name="ipv4-source-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ipv6_source_router_id = YANGDynClass(base=yc_ipv6_source_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_ipv6_source_router_id, is_container='container', yang_name="ipv6-source-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__prefix_sids = YANGDynClass(base=yc_prefix_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids, is_container='container', yang_name="prefix-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv6-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/type (leafref)

    YANG Description: Reference to the sub-TLV type
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/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 sub-TLV type
    """
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/state (container)

    YANG Description: State parameters for a prefix.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/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 parameters for a prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_tag(self):
    """
    Getter method for tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/tag (container)

    YANG Description: This container defines sub-TLV 1.
    """
    return self.__tag
      
  def _set_tag(self, v, load=False):
    """
    Setter method for tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/tag (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tag is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tag() directly.

    YANG Description: This container defines sub-TLV 1.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_tag_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_tag, is_container='container', yang_name="tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tag must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_tag_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_tag, is_container='container', yang_name="tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__tag = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tag(self):
    self.__tag = YANGDynClass(base=yc_tag_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_tag, is_container='container', yang_name="tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_tag64(self):
    """
    Getter method for tag64, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/tag64 (container)

    YANG Description: This container defines sub-TLV 2.
    """
    return self.__tag64
      
  def _set_tag64(self, v, load=False):
    """
    Setter method for tag64, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/tag64 (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tag64 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tag64() directly.

    YANG Description: This container defines sub-TLV 2.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_tag64_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_tag64, is_container='container', yang_name="tag64", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tag64 must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_tag64_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_tag64, is_container='container', yang_name="tag64", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__tag64 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tag64(self):
    self.__tag64 = YANGDynClass(base=yc_tag64_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_tag64, is_container='container', yang_name="tag64", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_flags(self):
    """
    Getter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/flags (container)

    YANG Description: This container defines sub-TLV 4.
    """
    return self.__flags
      
  def _set_flags(self, v, load=False):
    """
    Setter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/flags (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flags() directly.

    YANG Description: This container defines sub-TLV 4.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_flags_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_flags, is_container='container', yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flags must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_flags_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_flags, is_container='container', yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_flags(self):
    self.__flags = YANGDynClass(base=yc_flags_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_flags, is_container='container', yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ipv4_source_router_id(self):
    """
    Getter method for ipv4_source_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/ipv4_source_router_id (container)

    YANG Description: This container defines sub-TLV 11.
    """
    return self.__ipv4_source_router_id
      
  def _set_ipv4_source_router_id(self, v, load=False):
    """
    Setter method for ipv4_source_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/ipv4_source_router_id (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv4_source_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv4_source_router_id() directly.

    YANG Description: This container defines sub-TLV 11.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv4_source_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_ipv4_source_router_id, is_container='container', yang_name="ipv4-source-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv4_source_router_id must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv4_source_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_ipv4_source_router_id, is_container='container', yang_name="ipv4-source-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ipv4_source_router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv4_source_router_id(self):
    self.__ipv4_source_router_id = YANGDynClass(base=yc_ipv4_source_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_ipv4_source_router_id, is_container='container', yang_name="ipv4-source-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ipv6_source_router_id(self):
    """
    Getter method for ipv6_source_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/ipv6_source_router_id (container)

    YANG Description: This container defines sub-TLV 12.
    """
    return self.__ipv6_source_router_id
      
  def _set_ipv6_source_router_id(self, v, load=False):
    """
    Setter method for ipv6_source_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/ipv6_source_router_id (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6_source_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6_source_router_id() directly.

    YANG Description: This container defines sub-TLV 12.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv6_source_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_ipv6_source_router_id, is_container='container', yang_name="ipv6-source-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6_source_router_id must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv6_source_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_ipv6_source_router_id, is_container='container', yang_name="ipv6-source-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ipv6_source_router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6_source_router_id(self):
    self.__ipv6_source_router_id = YANGDynClass(base=yc_ipv6_source_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_ipv6_source_router_id, is_container='container', yang_name="ipv6-source-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_prefix_sids(self):
    """
    Getter method for prefix_sids, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids (container)

    YANG Description: This container defines segment routing extensions for
prefixes.
    """
    return self.__prefix_sids
      
  def _set_prefix_sids(self, v, load=False):
    """
    Setter method for prefix_sids, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_sids is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_sids() directly.

    YANG Description: This container defines segment routing extensions for
prefixes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids, is_container='container', yang_name="prefix-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_sids must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids, is_container='container', yang_name="prefix-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__prefix_sids = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_sids(self):
    self.__prefix_sids = YANGDynClass(base=yc_prefix_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids, is_container='container', yang_name="prefix-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  type = __builtin__.property(_get_type)
  state = __builtin__.property(_get_state)
  tag = __builtin__.property(_get_tag)
  tag64 = __builtin__.property(_get_tag64)
  flags = __builtin__.property(_get_flags)
  ipv4_source_router_id = __builtin__.property(_get_ipv4_source_router_id)
  ipv6_source_router_id = __builtin__.property(_get_ipv6_source_router_id)
  prefix_sids = __builtin__.property(_get_prefix_sids)


  _pyangbind_elements = OrderedDict([('type', type), ('state', state), ('tag', tag), ('tag64', tag64), ('flags', flags), ('ipv4_source_router_id', ipv4_source_router_id), ('ipv6_source_router_id', ipv6_source_router_id), ('prefix_sids', prefix_sids), ])


class yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv6-reachability/prefixes/prefix/subtlvs. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container describes IS prefix sub-TLVs.
  """
  __slots__ = ('_path_helper', '_extmethods', '__subtlv',)

  _yang_name = 'subtlvs'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__subtlv = YANGDynClass(base=YANGListType("type",yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv, yang_name="subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv6-reachability', 'prefixes', 'prefix', 'subtlvs']

  def _get_subtlv(self):
    """
    Getter method for subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv (list)

    YANG Description: List of subTLV types in the LSDB for the specified TLV.
    """
    return self.__subtlv
      
  def _set_subtlv(self, v, load=False):
    """
    Setter method for subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs/subtlv (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_subtlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_subtlv() directly.

    YANG Description: List of subTLV types in the LSDB for the specified TLV.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("type",yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv, yang_name="subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """subtlv must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("type",yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv, yang_name="subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__subtlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_subtlv(self):
    self.__subtlv = YANGDynClass(base=YANGListType("type",yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs_subtlv, yang_name="subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  subtlv = __builtin__.property(_get_subtlv)


  _pyangbind_elements = OrderedDict([('subtlv', subtlv), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_undefined_subtlvs_undefined_subtlv_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv6-reachability/prefixes/prefix/undefined-subtlvs/undefined-subtlv/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of the undefined sub-TLV.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__length','__value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__value = YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv6-reachability', 'prefixes', 'prefix', 'undefined-subtlvs', 'undefined-subtlv', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv/state/type (uint8)

    YANG Description: TLV Type.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv/state/type (uint8)
    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: TLV Type.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with uint8""",
          'defined-type': "uint8",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_length(self):
    """
    Getter method for length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv/state/length (uint8)

    YANG Description: TLV length.
    """
    return self.__length
      
  def _set_length(self, v, load=False):
    """
    Setter method for length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv/state/length (uint8)
    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: TLV length.
    """
    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="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """length 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="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', 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..255']}, int_size=8), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv/state/value (binary)

    YANG Description: TLV value.
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv/state/value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: TLV value.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  type = __builtin__.property(_get_type)
  length = __builtin__.property(_get_length)
  value = __builtin__.property(_get_value)


  _pyangbind_elements = OrderedDict([('type', type), ('length', length), ('value', value), ])


class yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_undefined_subtlvs_undefined_subtlv(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv6-reachability/prefixes/prefix/undefined-subtlvs/undefined-subtlv. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Sub-TLVs that are not defined in the model or not
recognised by system.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__state',)

  _yang_name = 'undefined-subtlv'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_undefined_subtlvs_undefined_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv6-reachability', 'prefixes', 'prefix', 'undefined-subtlvs', 'undefined-subtlv']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv/type (leafref)

    YANG Description: Reference to the type of the undefined sub-TLV
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv/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 type of the undefined sub-TLV
    """
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv/state (container)

    YANG Description: State parameters of the undefined sub-TLV.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv/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 parameters of the undefined sub-TLV.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_undefined_subtlvs_undefined_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_undefined_subtlvs_undefined_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_undefined_subtlvs_undefined_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  type = __builtin__.property(_get_type)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('type', type), ('state', state), ])


class yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_undefined_subtlvs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv6-reachability/prefixes/prefix/undefined-subtlvs. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container describes undefined ISIS TLVs.
  """
  __slots__ = ('_path_helper', '_extmethods', '__undefined_subtlv',)

  _yang_name = 'undefined-subtlvs'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__undefined_subtlv = YANGDynClass(base=YANGListType("type",yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_undefined_subtlvs_undefined_subtlv, yang_name="undefined-subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="undefined-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv6-reachability', 'prefixes', 'prefix', 'undefined-subtlvs']

  def _get_undefined_subtlv(self):
    """
    Getter method for undefined_subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv (list)

    YANG Description: Sub-TLVs that are not defined in the model or not
recognised by system.
    """
    return self.__undefined_subtlv
      
  def _set_undefined_subtlv(self, v, load=False):
    """
    Setter method for undefined_subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_undefined_subtlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_undefined_subtlv() directly.

    YANG Description: Sub-TLVs that are not defined in the model or not
recognised by system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("type",yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_undefined_subtlvs_undefined_subtlv, yang_name="undefined-subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="undefined-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """undefined_subtlv must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("type",yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_undefined_subtlvs_undefined_subtlv, yang_name="undefined-subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="undefined-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__undefined_subtlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_undefined_subtlv(self):
    self.__undefined_subtlv = YANGDynClass(base=YANGListType("type",yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_undefined_subtlvs_undefined_subtlv, yang_name="undefined-subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="undefined-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  undefined_subtlv = __builtin__.property(_get_undefined_subtlv)


  _pyangbind_elements = OrderedDict([('undefined_subtlv', undefined_subtlv), ])


class yc_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv6-reachability/prefixes/prefix. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This list defines IPv6 extended prefix attributes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix','__state','__subtlvs','__undefined_subtlvs',)

  _yang_name = 'prefix'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__subtlvs = YANGDynClass(base=yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs, is_container='container', yang_name="subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__undefined_subtlvs = YANGDynClass(base=yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_undefined_subtlvs, is_container='container', yang_name="undefined-subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv6-reachability', 'prefixes', 'prefix']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/prefix (leafref)

    YANG Description: Reference to the IPv6 prefix that the TLV
corresponds to.
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/prefix (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: Reference to the IPv6 prefix that the TLV
corresponds to.
    """
    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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/state (container)

    YANG Description: State parameters of IPv6 prefix attributes
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/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 parameters of IPv6 prefix attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_subtlvs(self):
    """
    Getter method for subtlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs (container)

    YANG Description: This container describes IS prefix sub-TLVs.
    """
    return self.__subtlvs
      
  def _set_subtlvs(self, v, load=False):
    """
    Setter method for subtlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/subtlvs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_subtlvs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_subtlvs() directly.

    YANG Description: This container describes IS prefix sub-TLVs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs, is_container='container', yang_name="subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """subtlvs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs, is_container='container', yang_name="subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__subtlvs = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_subtlvs(self):
    self.__subtlvs = YANGDynClass(base=yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_subtlvs, is_container='container', yang_name="subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_undefined_subtlvs(self):
    """
    Getter method for undefined_subtlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/undefined_subtlvs (container)

    YANG Description: This container describes undefined ISIS TLVs.
    """
    return self.__undefined_subtlvs
      
  def _set_undefined_subtlvs(self, v, load=False):
    """
    Setter method for undefined_subtlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix/undefined_subtlvs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_undefined_subtlvs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_undefined_subtlvs() directly.

    YANG Description: This container describes undefined ISIS TLVs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_undefined_subtlvs, is_container='container', yang_name="undefined-subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """undefined_subtlvs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_undefined_subtlvs, is_container='container', yang_name="undefined-subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__undefined_subtlvs = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_undefined_subtlvs(self):
    self.__undefined_subtlvs = YANGDynClass(base=yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix_undefined_subtlvs, is_container='container', yang_name="undefined-subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  prefix = __builtin__.property(_get_prefix)
  state = __builtin__.property(_get_state)
  subtlvs = __builtin__.property(_get_subtlvs)
  undefined_subtlvs = __builtin__.property(_get_undefined_subtlvs)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ('state', state), ('subtlvs', subtlvs), ('undefined_subtlvs', undefined_subtlvs), ])


class yc_prefixes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv6-reachability/prefixes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container describes IS prefixes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix',)

  _yang_name = 'prefixes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = YANGDynClass(base=YANGListType("prefix",yc_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix, yang_name="prefix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix', extensions=None), is_container='list', yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv6-reachability', 'prefixes']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix (list)

    YANG Description: This list defines IPv6 extended prefix attributes.
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefix (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: This list defines IPv6 extended prefix attributes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("prefix",yc_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix, yang_name="prefix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix', extensions=None), is_container='list', yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("prefix",yc_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix, yang_name="prefix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix', extensions=None), is_container='list', yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = YANGDynClass(base=YANGListType("prefix",yc_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes_prefix, yang_name="prefix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix', extensions=None), is_container='list', yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  prefix = __builtin__.property(_get_prefix)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ])


class yc_ipv6_reachability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv6-reachability. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines list of IPv6 reachability
information.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefixes',)

  _yang_name = 'ipv6-reachability'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefixes = YANGDynClass(base=yc_prefixes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes, is_container='container', yang_name="prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'ipv6-reachability']

  def _get_prefixes(self):
    """
    Getter method for prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes (container)

    YANG Description: This container describes IS prefixes.
    """
    return self.__prefixes
      
  def _set_prefixes(self, v, load=False):
    """
    Setter method for prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefixes() directly.

    YANG Description: This container describes IS prefixes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefixes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes, is_container='container', yang_name="prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefixes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefixes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes, is_container='container', yang_name="prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefixes(self):
    self.__prefixes = YANGDynClass(base=yc_prefixes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability_prefixes, is_container='container', yang_name="prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  prefixes = __builtin__.property(_get_prefixes)


  _pyangbind_elements = OrderedDict([('prefixes', prefixes), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_multi_topology_topologies_topology_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/multi-topology/topologies/topology/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS multi-topology TLV 229.
  """
  __slots__ = ('_path_helper', '_extmethods', '__mt_id','__attributes',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__mt_id = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0 .. 4095']}), is_leaf=True, yang_name="mt-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__attributes = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'OVERLOAD': {}, 'ATTACHED': {}},), is_leaf=True, yang_name="attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'multi-topology', 'topologies', 'topology', 'state']

  def _get_mt_id(self):
    """
    Getter method for mt_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/multi_topology/topologies/topology/state/mt_id (uint16)

    YANG Description: Multi-topology ID.
    """
    return self.__mt_id
      
  def _set_mt_id(self, v, load=False):
    """
    Setter method for mt_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/multi_topology/topologies/topology/state/mt_id (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mt_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mt_id() directly.

    YANG Description: Multi-topology ID.
    """
    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': ['0 .. 4095']}), is_leaf=True, yang_name="mt-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mt_id must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0 .. 4095']}), is_leaf=True, yang_name="mt-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__mt_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mt_id(self):
    self.__mt_id = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0 .. 4095']}), is_leaf=True, yang_name="mt-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_attributes(self):
    """
    Getter method for attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/multi_topology/topologies/topology/state/attributes (enumeration)

    YANG Description: Attributes of the LSP for the associated
topology.
    """
    return self.__attributes
      
  def _set_attributes(self, v, load=False):
    """
    Setter method for attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/multi_topology/topologies/topology/state/attributes (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_attributes() directly.

    YANG Description: Attributes of the LSP for the associated
topology.
    """
    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={'OVERLOAD': {}, 'ATTACHED': {}},), is_leaf=True, yang_name="attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """attributes must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'OVERLOAD': {}, 'ATTACHED': {}},), is_leaf=True, yang_name="attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__attributes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_attributes(self):
    self.__attributes = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'OVERLOAD': {}, 'ATTACHED': {}},), is_leaf=True, yang_name="attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)

  mt_id = __builtin__.property(_get_mt_id)
  attributes = __builtin__.property(_get_attributes)


  _pyangbind_elements = OrderedDict([('mt_id', mt_id), ('attributes', attributes), ])


class yc_topology_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_multi_topology_topologies_topology(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/multi-topology/topologies/topology. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This list describes a topology.
  """
  __slots__ = ('_path_helper', '_extmethods', '__mt_id','__state',)

  _yang_name = 'topology'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__mt_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mt-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_multi_topology_topologies_topology_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'multi-topology', 'topologies', 'topology']

  def _get_mt_id(self):
    """
    Getter method for mt_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/multi_topology/topologies/topology/mt_id (leafref)

    YANG Description: Reference to the multi-topology ID being described
by the list entry.
    """
    return self.__mt_id
      
  def _set_mt_id(self, v, load=False):
    """
    Setter method for mt_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/multi_topology/topologies/topology/mt_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mt_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mt_id() directly.

    YANG Description: Reference to the multi-topology ID being described
by the list entry.
    """
    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="mt-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mt_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mt-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__mt_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mt_id(self):
    self.__mt_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mt-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/multi_topology/topologies/topology/state (container)

    YANG Description: State parameters of IS multi-topology TLV 229.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/multi_topology/topologies/topology/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 parameters of IS multi-topology TLV 229.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_multi_topology_topologies_topology_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_multi_topology_topologies_topology_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_multi_topology_topologies_topology_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  mt_id = __builtin__.property(_get_mt_id)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('mt_id', mt_id), ('state', state), ])


class yc_topologies_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_multi_topology_topologies(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/multi-topology/topologies. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container describes IS topologies.
  """
  __slots__ = ('_path_helper', '_extmethods', '__topology',)

  _yang_name = 'topologies'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__topology = YANGDynClass(base=YANGListType("mt_id",yc_topology_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_multi_topology_topologies_topology, yang_name="topology", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mt-id', extensions=None), is_container='list', yang_name="topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'multi-topology', 'topologies']

  def _get_topology(self):
    """
    Getter method for topology, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/multi_topology/topologies/topology (list)

    YANG Description: This list describes a topology.
    """
    return self.__topology
      
  def _set_topology(self, v, load=False):
    """
    Setter method for topology, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/multi_topology/topologies/topology (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_topology is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_topology() directly.

    YANG Description: This list describes a topology.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("mt_id",yc_topology_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_multi_topology_topologies_topology, yang_name="topology", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mt-id', extensions=None), is_container='list', yang_name="topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """topology must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("mt_id",yc_topology_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_multi_topology_topologies_topology, yang_name="topology", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mt-id', extensions=None), is_container='list', yang_name="topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__topology = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_topology(self):
    self.__topology = YANGDynClass(base=YANGListType("mt_id",yc_topology_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_multi_topology_topologies_topology, yang_name="topology", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mt-id', extensions=None), is_container='list', yang_name="topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  topology = __builtin__.property(_get_topology)


  _pyangbind_elements = OrderedDict([('topology', topology), ])


class yc_multi_topology_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_multi_topology(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/multi-topology. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines the topology supported.
  """
  __slots__ = ('_path_helper', '_extmethods', '__topologies',)

  _yang_name = 'multi-topology'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__topologies = YANGDynClass(base=yc_topologies_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_multi_topology_topologies, is_container='container', yang_name="topologies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'multi-topology']

  def _get_topologies(self):
    """
    Getter method for topologies, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/multi_topology/topologies (container)

    YANG Description: This container describes IS topologies.
    """
    return self.__topologies
      
  def _set_topologies(self, v, load=False):
    """
    Setter method for topologies, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/multi_topology/topologies (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_topologies is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_topologies() directly.

    YANG Description: This container describes IS topologies.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_topologies_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_multi_topology_topologies, is_container='container', yang_name="topologies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """topologies must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_topologies_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_multi_topology_topologies, is_container='container', yang_name="topologies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__topologies = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_topologies(self):
    self.__topologies = YANGDynClass(base=yc_topologies_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_multi_topology_topologies, is_container='container', yang_name="topologies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  topologies = __builtin__.property(_get_topologies)


  _pyangbind_elements = OrderedDict([('topologies', topologies), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters corresponding to the extended
neighbour.
  """
  __slots__ = ('_path_helper', '_extmethods', '__system_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__system_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'state']

  def _get_system_id(self):
    """
    Getter method for system_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/state/system_id (oc-isis-types:system-id)

    YANG Description: System-id of the neighbor.
    """
    return self.__system_id
      
  def _set_system_id(self, v, load=False):
    """
    Setter method for system_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/state/system_id (oc-isis-types:system-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_system_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_system_id() directly.

    YANG Description: System-id of the neighbor.
    """
    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]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """system_id must be of a type compatible with oc-isis-types:system-id""",
          'defined-type': "oc-isis-types:system-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)""",
        })

    self.__system_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_system_id(self):
    self.__system_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)

  system_id = __builtin__.property(_get_system_id)


  _pyangbind_elements = OrderedDict([('system_id', system_id), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of extended neighbor
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__metric',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:wide-metric', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'state']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/state/id (uint64)

    YANG Description: Unique identifier for the instance of the
TLV for the IS neighbor. The instance
ID is not required to be consistent across
across readvertisements of the LSP.
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/state/id (uint64)
    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: Unique identifier for the instance of the
TLV for the IS neighbor. The instance
ID is not required to be consistent across
across readvertisements of the LSP.
    """
    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="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id 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="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_id(self):
    self.__id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/state/metric (oc-isis-types:wide-metric)

    YANG Description: Metric value.
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/state/metric (oc-isis-types:wide-metric)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: Metric value.
    """
    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': ['1..16777215']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:wide-metric', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric must be of a type compatible with oc-isis-types:wide-metric""",
          'defined-type': "oc-isis-types:wide-metric",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:wide-metric', is_config=False)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:wide-metric', is_config=False)

  id = __builtin__.property(_get_id)
  metric = __builtin__.property(_get_metric)


  _pyangbind_elements = OrderedDict([('id', id), ('metric', metric), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS neighbor state
  """
  __slots__ = ('_path_helper', '_extmethods', '__type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/state/type (identityref)

    YANG Description: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/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: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  type = __builtin__.property(_get_type)


  _pyangbind_elements = OrderedDict([('type', type), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_admin_group_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/admin-group/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 3.
  """
  __slots__ = ('_path_helper', '_extmethods', '__admin_group',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__admin_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'admin-group', 'state']

  def _get_admin_group(self):
    """
    Getter method for admin_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/admin_group/state/admin_group (uint32)

    YANG Description: The administrative group sub-TLV contains a 4-octet
bit mask assigned by the network administrator.  Each
set bit corresponds to one administrative group
assigned to the interface. By convention, the least
significant bit is referred to as group 0, and the
most significant bit is referred to as group 31.
    """
    return self.__admin_group
      
  def _set_admin_group(self, v, load=False):
    """
    Setter method for admin_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/admin_group/state/admin_group (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_admin_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_admin_group() directly.

    YANG Description: The administrative group sub-TLV contains a 4-octet
bit mask assigned by the network administrator.  Each
set bit corresponds to one administrative group
assigned to the interface. By convention, the least
significant bit is referred to as group 0, and the
most significant bit is referred to as group 31.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """admin_group must be of a type compatible with uint32""",
          'defined-type': "uint32",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__admin_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_admin_group(self):
    self.__admin_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  admin_group = __builtin__.property(_get_admin_group)


  _pyangbind_elements = OrderedDict([('admin_group', admin_group), ])


class yc_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_admin_group(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/admin-group. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 3.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'admin-group'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_admin_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'admin-group']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/admin_group/state (container)

    YANG Description: State parameters of sub-TLV 3.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/admin_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: State parameters of sub-TLV 3.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_admin_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_admin_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_admin_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_id_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-id/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 4.
  """
  __slots__ = ('_path_helper', '_extmethods', '__local_','__remote',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__local_ = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="local", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__remote = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="remote", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-id', 'state']

  def _get_local_(self):
    """
    Getter method for local_, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_id/state/local (uint32)

    YANG Description: The value field of this sub-TLV contains 4 octets of
Link Local Identifier followed by 4 octets of Link
Remote Identifier.
    """
    return self.__local_
      
  def _set_local_(self, v, load=False):
    """
    Setter method for local_, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_id/state/local (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_ is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_() directly.

    YANG Description: The value field of this sub-TLV contains 4 octets of
Link Local Identifier followed by 4 octets of Link
Remote Identifier.
    """
    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="local", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_ 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="local", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__local_ = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_(self):
    self.__local_ = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="local", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_remote(self):
    """
    Getter method for remote, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_id/state/remote (uint32)

    YANG Description: If the Link Remote Identifier is unknown, it is set
to 0.
    """
    return self.__remote
      
  def _set_remote(self, v, load=False):
    """
    Setter method for remote, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_id/state/remote (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_remote is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_remote() directly.

    YANG Description: If the Link Remote Identifier is unknown, it is set
to 0.
    """
    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="remote", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """remote 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="remote", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__remote = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_remote(self):
    self.__remote = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="remote", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  local_ = __builtin__.property(_get_local_)
  remote = __builtin__.property(_get_remote)


  _pyangbind_elements = OrderedDict([('local_', local_), ('remote', remote), ])


class yc_link_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_id(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-id. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 4.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'link-id'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-id']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_id/state (container)

    YANG Description: State parameters of sub-TLV 4.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_id/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 parameters of sub-TLV 4.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_interface_address_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4-interface-address/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 6.
  """
  __slots__ = ('_path_helper', '_extmethods', '__address',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__address = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'ipv4-interface-address', 'state']

  def _get_address(self):
    """
    Getter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_interface_address/state/address (inet:ipv4-address)

    YANG Description: A 4-octet IPv4 address for the interface described by
the (main) TLV. This sub-TLV can occur multiple
times.
    """
    return self.__address
      
  def _set_address(self, v, load=False):
    """
    Setter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_interface_address/state/address (inet:ipv4-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address() directly.

    YANG Description: A 4-octet IPv4 address for the interface described by
the (main) TLV. This sub-TLV can occur multiple
times.
    """
    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_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}'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address must be of a type compatible with inet:ipv4-address""",
          'defined-type': "inet:ipv4-address",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=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}'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)""",
        })

    self.__address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address(self):
    self.__address = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)

  address = __builtin__.property(_get_address)


  _pyangbind_elements = OrderedDict([('address', address), ])


class yc_ipv4_interface_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_interface_address(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4-interface-address. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 6.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'ipv4-interface-address'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_interface_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'ipv4-interface-address']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_interface_address/state (container)

    YANG Description: State parameters of sub-TLV 6.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_interface_address/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 parameters of sub-TLV 6.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_interface_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_interface_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_interface_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_neighbor_address_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4-neighbor-address/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 8.
  """
  __slots__ = ('_path_helper', '_extmethods', '__address',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__address = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'ipv4-neighbor-address', 'state']

  def _get_address(self):
    """
    Getter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_neighbor_address/state/address (inet:ipv4-address)

    YANG Description: A single IPv4 address for a neighboring router on
this link. This sub-TLV can occur multiple times.
    """
    return self.__address
      
  def _set_address(self, v, load=False):
    """
    Setter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_neighbor_address/state/address (inet:ipv4-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address() directly.

    YANG Description: A single IPv4 address for a neighboring router on
this link. This sub-TLV can occur multiple times.
    """
    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_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}'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address must be of a type compatible with inet:ipv4-address""",
          'defined-type': "inet:ipv4-address",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=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}'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)""",
        })

    self.__address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address(self):
    self.__address = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)

  address = __builtin__.property(_get_address)


  _pyangbind_elements = OrderedDict([('address', address), ])


class yc_ipv4_neighbor_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_neighbor_address(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4-neighbor-address. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 8.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'ipv4-neighbor-address'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_neighbor_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'ipv4-neighbor-address']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_neighbor_address/state (container)

    YANG Description: State parameters of sub-TLV 8.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_neighbor_address/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 parameters of sub-TLV 8.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_neighbor_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_neighbor_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_neighbor_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_link_bandwidth_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/max-link-bandwidth/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 9.
  """
  __slots__ = ('_path_helper', '_extmethods', '__bandwidth',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'max-link-bandwidth', 'state']

  def _get_bandwidth(self):
    """
    Getter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_link_bandwidth/state/bandwidth (oc-types:ieeefloat32)

    YANG Description: The maximum bandwidth that can be used on this link
in this direction (from the system originating the LSP
to its neighbors).  It is encoded in 32 bits in IEEE
floating point format.  The units are bytes (not
bits!) per second.
    """
    return self.__bandwidth
      
  def _set_bandwidth(self, v, load=False):
    """
    Setter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_link_bandwidth/state/bandwidth (oc-types:ieeefloat32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth() directly.

    YANG Description: The maximum bandwidth that can be used on this link
in this direction (from the system originating the LSP
to its neighbors).  It is encoded in 32 bits in IEEE
floating point format.  The units are bytes (not
bits!) per second.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth must be of a type compatible with oc-types:ieeefloat32""",
          'defined-type': "oc-types:ieeefloat32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)""",
        })

    self.__bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth(self):
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)

  bandwidth = __builtin__.property(_get_bandwidth)


  _pyangbind_elements = OrderedDict([('bandwidth', bandwidth), ])


class yc_max_link_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_link_bandwidth(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/max-link-bandwidth. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 9.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'max-link-bandwidth'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_link_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'max-link-bandwidth']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_link_bandwidth/state (container)

    YANG Description: State parameters of sub-TLV 9.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_link_bandwidth/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 parameters of sub-TLV 9.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_link_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_link_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_link_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_reservable_link_bandwidth_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/max-reservable-link-bandwidth/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 10.
  """
  __slots__ = ('_path_helper', '_extmethods', '__bandwidth',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'max-reservable-link-bandwidth', 'state']

  def _get_bandwidth(self):
    """
    Getter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_reservable_link_bandwidth/state/bandwidth (oc-types:ieeefloat32)

    YANG Description: The maximum amount of bandwidth that can be reserved
in this direction on this link.  Note that for
oversubscription purposes,  this can be greater than
the bandwidth of the link. It is encoded  in 32 bits
in IEEE floating point format.  The units are bytes
(not bits!) per second.
    """
    return self.__bandwidth
      
  def _set_bandwidth(self, v, load=False):
    """
    Setter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_reservable_link_bandwidth/state/bandwidth (oc-types:ieeefloat32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth() directly.

    YANG Description: The maximum amount of bandwidth that can be reserved
in this direction on this link.  Note that for
oversubscription purposes,  this can be greater than
the bandwidth of the link. It is encoded  in 32 bits
in IEEE floating point format.  The units are bytes
(not bits!) per second.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth must be of a type compatible with oc-types:ieeefloat32""",
          'defined-type': "oc-types:ieeefloat32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)""",
        })

    self.__bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth(self):
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)

  bandwidth = __builtin__.property(_get_bandwidth)


  _pyangbind_elements = OrderedDict([('bandwidth', bandwidth), ])


class yc_max_reservable_link_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_reservable_link_bandwidth(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/max-reservable-link-bandwidth. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 10.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'max-reservable-link-bandwidth'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_reservable_link_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'max-reservable-link-bandwidth']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_reservable_link_bandwidth/state (container)

    YANG Description: State parameters of sub-TLV 10.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_reservable_link_bandwidth/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 parameters of sub-TLV 10.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_reservable_link_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_reservable_link_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_reservable_link_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth_setup_priority_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved-bandwidth/setup-priority/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS Extended Reachability sub-TLV
11.
  """
  __slots__ = ('_path_helper', '_extmethods', '__priority','__bandwidth',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__priority = 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="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'unreserved-bandwidth', 'setup-priority', 'state']

  def _get_priority(self):
    """
    Getter method for priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth/setup_priority/state/priority (uint8)

    YANG Description: Setup priority level of 0 through 7 to be used by
Unreserved Bandwidth sub-TLV 11.
    """
    return self.__priority
      
  def _set_priority(self, v, load=False):
    """
    Setter method for priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth/setup_priority/state/priority (uint8)
    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: Setup priority level of 0 through 7 to be used by
Unreserved Bandwidth sub-TLV 11.
    """
    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="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """priority 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..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_priority(self):
    self.__priority = 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="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_bandwidth(self):
    """
    Getter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth/setup_priority/state/bandwidth (oc-types:ieeefloat32)

    YANG Description: The amount of bandwidth reservable in this
direction on this link. Note that for
oversubscription purposes, this can be greater than
the bandwidth of the link. It contains eight 32-bit
IEEE floating point numbers(one for each priority).
The units are bytes (not bits!) per second. The
values correspond to the bandwidth that can be
reserved with a setup priority of 0 through 7,
arranged in increasing order with priority 0
occurring at the start of the sub-TLV, and priority
7 at the end of the sub-TLV.
    """
    return self.__bandwidth
      
  def _set_bandwidth(self, v, load=False):
    """
    Setter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth/setup_priority/state/bandwidth (oc-types:ieeefloat32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth() directly.

    YANG Description: The amount of bandwidth reservable in this
direction on this link. Note that for
oversubscription purposes, this can be greater than
the bandwidth of the link. It contains eight 32-bit
IEEE floating point numbers(one for each priority).
The units are bytes (not bits!) per second. The
values correspond to the bandwidth that can be
reserved with a setup priority of 0 through 7,
arranged in increasing order with priority 0
occurring at the start of the sub-TLV, and priority
7 at the end of the sub-TLV.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth must be of a type compatible with oc-types:ieeefloat32""",
          'defined-type': "oc-types:ieeefloat32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)""",
        })

    self.__bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth(self):
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)

  priority = __builtin__.property(_get_priority)
  bandwidth = __builtin__.property(_get_bandwidth)


  _pyangbind_elements = OrderedDict([('priority', priority), ('bandwidth', bandwidth), ])


class yc_setup_priority_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth_setup_priority(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved-bandwidth/setup-priority. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Setup priority (0 through 7) for unreserved
bandwidth.
  """
  __slots__ = ('_path_helper', '_extmethods', '__priority','__state',)

  _yang_name = 'setup-priority'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__priority = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth_setup_priority_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'unreserved-bandwidth', 'setup-priority']

  def _get_priority(self):
    """
    Getter method for priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth/setup_priority/priority (leafref)

    YANG Description: Reference to the setup priority to which the
unreserved bandwidth corresponds.
    """
    return self.__priority
      
  def _set_priority(self, v, load=False):
    """
    Setter method for priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth/setup_priority/priority (leafref)
    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: Reference to the setup priority to which the
unreserved bandwidth corresponds.
    """
    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="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """priority must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_priority(self):
    self.__priority = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth/setup_priority/state (container)

    YANG Description: State parameters of IS Extended Reachability sub-TLV
11.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth/setup_priority/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 parameters of IS Extended Reachability sub-TLV
11.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth_setup_priority_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth_setup_priority_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth_setup_priority_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  priority = __builtin__.property(_get_priority)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('priority', priority), ('state', state), ])


class yc_unreserved_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved-bandwidth. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines unreserved-bandwidth. The units
are bytes per second.
  """
  __slots__ = ('_path_helper', '_extmethods', '__setup_priority',)

  _yang_name = 'unreserved-bandwidth'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__setup_priority = YANGDynClass(base=YANGListType("priority",yc_setup_priority_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth_setup_priority, yang_name="setup-priority", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'unreserved-bandwidth']

  def _get_setup_priority(self):
    """
    Getter method for setup_priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth/setup_priority (list)

    YANG Description: Setup priority (0 through 7) for unreserved
bandwidth.
    """
    return self.__setup_priority
      
  def _set_setup_priority(self, v, load=False):
    """
    Setter method for setup_priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth/setup_priority (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_setup_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_setup_priority() directly.

    YANG Description: Setup priority (0 through 7) for unreserved
bandwidth.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("priority",yc_setup_priority_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth_setup_priority, yang_name="setup-priority", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """setup_priority must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("priority",yc_setup_priority_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth_setup_priority, yang_name="setup-priority", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__setup_priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_setup_priority(self):
    self.__setup_priority = YANGDynClass(base=YANGListType("priority",yc_setup_priority_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth_setup_priority, yang_name="setup-priority", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  setup_priority = __builtin__.property(_get_setup_priority)


  _pyangbind_elements = OrderedDict([('setup_priority', setup_priority), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_interface_address_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6-interface-address/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 12.
  """
  __slots__ = ('_path_helper', '_extmethods', '__address',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__address = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}|:))'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'ipv6-interface-address', 'state']

  def _get_address(self):
    """
    Getter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_interface_address/state/address (inet:ipv6-address)

    YANG Description: Contains a 16-octet IPv6 address for the interface
described by the containing  Extended IS Reachability
TLV. This sub-TLV can occur multiple times.
    """
    return self.__address
      
  def _set_address(self, v, load=False):
    """
    Setter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_interface_address/state/address (inet:ipv6-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address() directly.

    YANG Description: Contains a 16-octet IPv6 address for the interface
described by the containing  Extended IS Reachability
TLV. This sub-TLV can occur multiple times.
    """
    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_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}|:))'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address must be of a type compatible with inet:ipv6-address""",
          'defined-type': "inet:ipv6-address",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=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}|:))'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)""",
        })

    self.__address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address(self):
    self.__address = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}|:))'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)

  address = __builtin__.property(_get_address)


  _pyangbind_elements = OrderedDict([('address', address), ])


class yc_ipv6_interface_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_interface_address(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6-interface-address. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 12.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'ipv6-interface-address'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_interface_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'ipv6-interface-address']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_interface_address/state (container)

    YANG Description: State parameters of sub-TLV 12.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_interface_address/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 parameters of sub-TLV 12.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_interface_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_interface_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_interface_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_neighbor_address_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6-neighbor-address/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 13.
  """
  __slots__ = ('_path_helper', '_extmethods', '__address',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__address = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}|:))'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'ipv6-neighbor-address', 'state']

  def _get_address(self):
    """
    Getter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_neighbor_address/state/address (inet:ipv6-address)

    YANG Description: Contains a 16-octet IPv6 address for a neighboring
router on the link described by the (main) TLV. This
sub-TLV can occur multiple times.
    """
    return self.__address
      
  def _set_address(self, v, load=False):
    """
    Setter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_neighbor_address/state/address (inet:ipv6-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address() directly.

    YANG Description: Contains a 16-octet IPv6 address for a neighboring
router on the link described by the (main) TLV. This
sub-TLV can occur multiple times.
    """
    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_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}|:))'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address must be of a type compatible with inet:ipv6-address""",
          'defined-type': "inet:ipv6-address",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=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}|:))'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)""",
        })

    self.__address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address(self):
    self.__address = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}|:))'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)

  address = __builtin__.property(_get_address)


  _pyangbind_elements = OrderedDict([('address', address), ])


class yc_ipv6_neighbor_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_neighbor_address(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6-neighbor-address. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 13.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'ipv6-neighbor-address'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_neighbor_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'ipv6-neighbor-address']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_neighbor_address/state (container)

    YANG Description: State parameters of sub-TLV 13.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_neighbor_address/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 parameters of sub-TLV 13.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_neighbor_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_neighbor_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_neighbor_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_extended_admin_group_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/extended-admin-group/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 14.
  """
  __slots__ = ('_path_helper', '_extmethods', '__extended_admin_group',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__extended_admin_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="extended-admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'extended-admin-group', 'state']

  def _get_extended_admin_group(self):
    """
    Getter method for extended_admin_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/extended_admin_group/state/extended_admin_group (uint32)

    YANG Description: The extended-admin-group sub-TLV is used in addition
to the Administrative Groups when it is desirable to
make more than 32 colors available for advertisement
in a network.
    """
    return self.__extended_admin_group
      
  def _set_extended_admin_group(self, v, load=False):
    """
    Setter method for extended_admin_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/extended_admin_group/state/extended_admin_group (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended_admin_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended_admin_group() directly.

    YANG Description: The extended-admin-group sub-TLV is used in addition
to the Administrative Groups when it is desirable to
make more than 32 colors available for advertisement
in a network.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="extended-admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended_admin_group must be of a type compatible with uint32""",
          'defined-type': "uint32",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="extended-admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__extended_admin_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended_admin_group(self):
    self.__extended_admin_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="extended-admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  extended_admin_group = __builtin__.property(_get_extended_admin_group)


  _pyangbind_elements = OrderedDict([('extended_admin_group', extended_admin_group), ])


class yc_extended_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_extended_admin_group(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/extended-admin-group. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 14.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'extended-admin-group'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_extended_admin_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'extended-admin-group']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/extended_admin_group/state (container)

    YANG Description: State parameters of sub-TLV 14.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/extended_admin_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: State parameters of sub-TLV 14.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_extended_admin_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_extended_admin_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_extended_admin_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_te_default_metric_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/te-default-metric/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 18.
  """
  __slots__ = ('_path_helper', '_extmethods', '__metric',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'te-default-metric', 'state']

  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/te_default_metric/state/metric (uint32)

    YANG Description: This metric is administratively assigned and can be
used to present a differently weighted topology to
traffic engineering SPF calculations. To preclude
overflow within a traffic engineering SPF
implementation, all metrics greater than or equal to
MAX_PATH_METRIC SHALL be considered to have a metric
of MAX_PATH_METRIC.
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/te_default_metric/state/metric (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: This metric is administratively assigned and can be
used to present a differently weighted topology to
traffic engineering SPF calculations. To preclude
overflow within a traffic engineering SPF
implementation, all metrics greater than or equal to
MAX_PATH_METRIC SHALL be considered to have a metric
of MAX_PATH_METRIC.
    """
    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="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric 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="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  metric = __builtin__.property(_get_metric)


  _pyangbind_elements = OrderedDict([('metric', metric), ])


class yc_te_default_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_te_default_metric(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/te-default-metric. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 18.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'te-default-metric'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_te_default_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'te-default-metric']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/te_default_metric/state (container)

    YANG Description: State parameters of sub-TLV 18.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/te_default_metric/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 parameters of sub-TLV 18.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_te_default_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_te_default_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_te_default_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_attributes_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-attributes/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS Extended Reachability sub-TLV
19.
  """
  __slots__ = ('_path_helper', '_extmethods', '__local_protection',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__local_protection = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LOCAL_PROTECTION': {}, 'LINK_EXCLUDED': {}},)), is_leaf=False, yang_name="local-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-attributes', 'state']

  def _get_local_protection(self):
    """
    Getter method for local_protection, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_attributes/state/local_protection (enumeration)

    YANG Description: Link local-protection attributes.
    """
    return self.__local_protection
      
  def _set_local_protection(self, v, load=False):
    """
    Setter method for local_protection, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_attributes/state/local_protection (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_protection is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_protection() directly.

    YANG Description: Link local-protection attributes.
    """
    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={'LOCAL_PROTECTION': {}, 'LINK_EXCLUDED': {}},)), is_leaf=False, yang_name="local-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_protection must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LOCAL_PROTECTION': {}, 'LINK_EXCLUDED': {}},)), is_leaf=False, yang_name="local-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__local_protection = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_protection(self):
    self.__local_protection = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LOCAL_PROTECTION': {}, 'LINK_EXCLUDED': {}},)), is_leaf=False, yang_name="local-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)

  local_protection = __builtin__.property(_get_local_protection)


  _pyangbind_elements = OrderedDict([('local_protection', local_protection), ])


class yc_link_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_attributes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-attributes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines link-attributes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'link-attributes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_attributes_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-attributes']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_attributes/state (container)

    YANG Description: State parameters of IS Extended Reachability sub-TLV
19.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_attributes/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 parameters of IS Extended Reachability sub-TLV
19.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_attributes_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_attributes_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_attributes_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_protection_type_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-protection-type/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 20.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXTRA_TRAFFIC': {}, 'UNPROTECTED': {}, 'SHARED': {}, 'ONE_ONE': {}, 'PLUS_ONE': {}, 'ENHANCED': {}},)), is_leaf=False, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-protection-type', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_protection_type/state/type (enumeration)

    YANG Description: Link protection capabilities.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_protection_type/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: Link protection capabilities.
    """
    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={'EXTRA_TRAFFIC': {}, 'UNPROTECTED': {}, 'SHARED': {}, 'ONE_ONE': {}, 'PLUS_ONE': {}, 'ENHANCED': {}},)), is_leaf=False, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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-network-instance:enumeration",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXTRA_TRAFFIC': {}, 'UNPROTECTED': {}, 'SHARED': {}, 'ONE_ONE': {}, 'PLUS_ONE': {}, 'ENHANCED': {}},)), is_leaf=False, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXTRA_TRAFFIC': {}, 'UNPROTECTED': {}, 'SHARED': {}, 'ONE_ONE': {}, 'PLUS_ONE': {}, 'ENHANCED': {}},)), is_leaf=False, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)

  type = __builtin__.property(_get_type)


  _pyangbind_elements = OrderedDict([('type', type), ])


class yc_link_protection_type_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_protection_type(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-protection-type. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: ISIS LSDB parameters relating to the type of link
protection offered.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'link-protection-type'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_protection_type_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-protection-type']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_protection_type/state (container)

    YANG Description: State parameters of sub-TLV 20.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_protection_type/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 parameters of sub-TLV 20.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_protection_type_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_protection_type_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_protection_type_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth-constraints/bandwidth-constraint/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS Extended Reachability sub-TLV
22.
  """
  __slots__ = ('_path_helper', '_extmethods', '__model_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__model_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="model-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'bandwidth-constraints', 'bandwidth-constraint', 'state']

  def _get_model_id(self):
    """
    Getter method for model_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/state/model_id (uint8)

    YANG Description: Identifier for the Bandwidth Constraints  Model
currently in use by the LSR initiating the IGP
advertisement.
    """
    return self.__model_id
      
  def _set_model_id(self, v, load=False):
    """
    Setter method for model_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/state/model_id (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_model_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_model_id() directly.

    YANG Description: Identifier for the Bandwidth Constraints  Model
currently in use by the LSR initiating the IGP
advertisement.
    """
    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="model-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """model_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="model-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__model_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_model_id(self):
    self.__model_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="model-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)

  model_id = __builtin__.property(_get_model_id)


  _pyangbind_elements = OrderedDict([('model_id', model_id), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints_constraint_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth-constraints/bandwidth-constraint/constraints/constraint/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters of the BCN level
  """
  __slots__ = ('_path_helper', '_extmethods', '__constraint_id','__bandwidth',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__constraint_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="constraint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'bandwidth-constraints', 'bandwidth-constraint', 'constraints', 'constraint', 'state']

  def _get_constraint_id(self):
    """
    Getter method for constraint_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints/constraint/state/constraint_id (uint32)

    YANG Description: Unique reference for the bandwidth constraint level. BC0
is indicated by this leaf being set to zero, with BCN
represented by this leaf being set to N.
    """
    return self.__constraint_id
      
  def _set_constraint_id(self, v, load=False):
    """
    Setter method for constraint_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints/constraint/state/constraint_id (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_constraint_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_constraint_id() directly.

    YANG Description: Unique reference for the bandwidth constraint level. BC0
is indicated by this leaf being set to zero, with BCN
represented by this leaf being set to N.
    """
    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="constraint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """constraint_id 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="constraint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__constraint_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_constraint_id(self):
    self.__constraint_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="constraint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_bandwidth(self):
    """
    Getter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints/constraint/state/bandwidth (oc-types:ieeefloat32)

    YANG Description: The bandwidth constraint, expressed as a 32-bit IEEE
floating point number expressed in bytes per second.
    """
    return self.__bandwidth
      
  def _set_bandwidth(self, v, load=False):
    """
    Setter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints/constraint/state/bandwidth (oc-types:ieeefloat32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth() directly.

    YANG Description: The bandwidth constraint, expressed as a 32-bit IEEE
floating point number expressed in bytes per second.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth must be of a type compatible with oc-types:ieeefloat32""",
          'defined-type': "oc-types:ieeefloat32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)""",
        })

    self.__bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth(self):
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)

  constraint_id = __builtin__.property(_get_constraint_id)
  bandwidth = __builtin__.property(_get_bandwidth)


  _pyangbind_elements = OrderedDict([('constraint_id', constraint_id), ('bandwidth', bandwidth), ])


class yc_constraint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints_constraint(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth-constraints/bandwidth-constraint/constraints/constraint. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of the constraints within the Bandwidth
Constraints sub-TLV. The BC0 level is indicated by
the constraint-id leaf being set to 0, with BCN
being indicated by constraint-id N.
  """
  __slots__ = ('_path_helper', '_extmethods', '__constraint_id','__state',)

  _yang_name = 'constraint'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__constraint_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="constraint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'bandwidth-constraints', 'bandwidth-constraint', 'constraints', 'constraint']

  def _get_constraint_id(self):
    """
    Getter method for constraint_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints/constraint/constraint_id (leafref)

    YANG Description: Reference to the unique ID for the BCN level.
    """
    return self.__constraint_id
      
  def _set_constraint_id(self, v, load=False):
    """
    Setter method for constraint_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints/constraint/constraint_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_constraint_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_constraint_id() directly.

    YANG Description: Reference to the unique ID for the BCN level.
    """
    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="constraint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """constraint_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="constraint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__constraint_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_constraint_id(self):
    self.__constraint_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="constraint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints/constraint/state (container)

    YANG Description: Operational state parameters of the BCN level
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints/constraint/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 of the BCN level
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  constraint_id = __builtin__.property(_get_constraint_id)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('constraint_id', constraint_id), ('state', state), ])


class yc_constraints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth-constraints/bandwidth-constraint/constraints. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Constraints contained within the Bandwidth
Constraints sub-TLV
  """
  __slots__ = ('_path_helper', '_extmethods', '__constraint',)

  _yang_name = 'constraints'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__constraint = YANGDynClass(base=YANGListType("constraint_id",yc_constraint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints_constraint, yang_name="constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='constraint-id', extensions=None), is_container='list', yang_name="constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'bandwidth-constraints', 'bandwidth-constraint', 'constraints']

  def _get_constraint(self):
    """
    Getter method for constraint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints/constraint (list)

    YANG Description: List of the constraints within the Bandwidth
Constraints sub-TLV. The BC0 level is indicated by
the constraint-id leaf being set to 0, with BCN
being indicated by constraint-id N.
    """
    return self.__constraint
      
  def _set_constraint(self, v, load=False):
    """
    Setter method for constraint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints/constraint (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_constraint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_constraint() directly.

    YANG Description: List of the constraints within the Bandwidth
Constraints sub-TLV. The BC0 level is indicated by
the constraint-id leaf being set to 0, with BCN
being indicated by constraint-id N.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("constraint_id",yc_constraint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints_constraint, yang_name="constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='constraint-id', extensions=None), is_container='list', yang_name="constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """constraint must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("constraint_id",yc_constraint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints_constraint, yang_name="constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='constraint-id', extensions=None), is_container='list', yang_name="constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__constraint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_constraint(self):
    self.__constraint = YANGDynClass(base=YANGListType("constraint_id",yc_constraint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints_constraint, yang_name="constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='constraint-id', extensions=None), is_container='list', yang_name="constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  constraint = __builtin__.property(_get_constraint)


  _pyangbind_elements = OrderedDict([('constraint', constraint), ])


class yc_bandwidth_constraint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth-constraints/bandwidth-constraint. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of the Bandwidth Constraints sub-TLV instances
present in the TLV.
  """
  __slots__ = ('_path_helper', '_extmethods', '__model_id','__state','__constraints',)

  _yang_name = 'bandwidth-constraint'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__model_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="model-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__constraints = YANGDynClass(base=yc_constraints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints, is_container='container', yang_name="constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'bandwidth-constraints', 'bandwidth-constraint']

  def _get_model_id(self):
    """
    Getter method for model_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/model_id (leafref)

    YANG Description: Reference to the model ID associated with the
instance of the Bandwidth Constraints sub-TLV.
    """
    return self.__model_id
      
  def _set_model_id(self, v, load=False):
    """
    Setter method for model_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/model_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_model_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_model_id() directly.

    YANG Description: Reference to the model ID associated with the
instance of the Bandwidth Constraints sub-TLV.
    """
    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="model-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """model_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="model-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__model_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_model_id(self):
    self.__model_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="model-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/state (container)

    YANG Description: State parameters of IS Extended Reachability sub-TLV
22.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/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 parameters of IS Extended Reachability sub-TLV
22.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_constraints(self):
    """
    Getter method for constraints, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints (container)

    YANG Description: Constraints contained within the Bandwidth
Constraints sub-TLV
    """
    return self.__constraints
      
  def _set_constraints(self, v, load=False):
    """
    Setter method for constraints, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_constraints is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_constraints() directly.

    YANG Description: Constraints contained within the Bandwidth
Constraints sub-TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_constraints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints, is_container='container', yang_name="constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """constraints must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_constraints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints, is_container='container', yang_name="constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__constraints = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_constraints(self):
    self.__constraints = YANGDynClass(base=yc_constraints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints, is_container='container', yang_name="constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  model_id = __builtin__.property(_get_model_id)
  state = __builtin__.property(_get_state)
  constraints = __builtin__.property(_get_constraints)


  _pyangbind_elements = OrderedDict([('model_id', model_id), ('state', state), ('constraints', constraints), ])


class yc_bandwidth_constraints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth-constraints. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines bandwidth-constraints. For DS-TE,
the existing Maximum Reservable link bandwidth parameter
is retained, but its semantics is generalized and
interpreted as the aggregate bandwidth constraint across
all Class-Types
  """
  __slots__ = ('_path_helper', '_extmethods', '__bandwidth_constraint',)

  _yang_name = 'bandwidth-constraints'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__bandwidth_constraint = YANGDynClass(base=YANGListType("model_id",yc_bandwidth_constraint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint, yang_name="bandwidth-constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='model-id', extensions=None), is_container='list', yang_name="bandwidth-constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'bandwidth-constraints']

  def _get_bandwidth_constraint(self):
    """
    Getter method for bandwidth_constraint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint (list)

    YANG Description: List of the Bandwidth Constraints sub-TLV instances
present in the TLV.
    """
    return self.__bandwidth_constraint
      
  def _set_bandwidth_constraint(self, v, load=False):
    """
    Setter method for bandwidth_constraint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth_constraint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth_constraint() directly.

    YANG Description: List of the Bandwidth Constraints sub-TLV instances
present in the TLV.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("model_id",yc_bandwidth_constraint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint, yang_name="bandwidth-constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='model-id', extensions=None), is_container='list', yang_name="bandwidth-constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth_constraint must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("model_id",yc_bandwidth_constraint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint, yang_name="bandwidth-constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='model-id', extensions=None), is_container='list', yang_name="bandwidth-constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__bandwidth_constraint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth_constraint(self):
    self.__bandwidth_constraint = YANGDynClass(base=YANGListType("model_id",yc_bandwidth_constraint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint, yang_name="bandwidth-constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='model-id', extensions=None), is_container='list', yang_name="bandwidth-constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  bandwidth_constraint = __builtin__.property(_get_bandwidth_constraint)


  _pyangbind_elements = OrderedDict([('bandwidth_constraint', bandwidth_constraint), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unconstrained_lsp_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unconstrained-lsp/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 23.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__count',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__count = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'unconstrained-lsp', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unconstrained_lsp/state/type (identityref)

    YANG Description: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unconstrained_lsp/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: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_count(self):
    """
    Getter method for count, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unconstrained_lsp/state/count (uint16)

    YANG Description: Unconstrained TE LSP count(TE Label Switched Paths
(LSPs) signalled with zero bandwidth).
    """
    return self.__count
      
  def _set_count(self, v, load=False):
    """
    Setter method for count, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unconstrained_lsp/state/count (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_count is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_count() directly.

    YANG Description: Unconstrained TE LSP count(TE Label Switched Paths
(LSPs) signalled with zero bandwidth).
    """
    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="count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """count 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="count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__count = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_count(self):
    self.__count = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  type = __builtin__.property(_get_type)
  count = __builtin__.property(_get_count)


  _pyangbind_elements = OrderedDict([('type', type), ('count', count), ])


class yc_unconstrained_lsp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unconstrained_lsp(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unconstrained-lsp. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 23.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'unconstrained-lsp'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unconstrained_lsp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'unconstrained-lsp']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unconstrained_lsp/state (container)

    YANG Description: State parameters of sub-TLV 23.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unconstrained_lsp/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 parameters of sub-TLV 23.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unconstrained_lsp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unconstrained_lsp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unconstrained_lsp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency-sids/adjacency-sid/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of Adjacency-SID.
  """
  __slots__ = ('_path_helper', '_extmethods', '__value','__flags','__weight',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ADDRESS_FAMILY': {}, 'BACKUP': {}, 'VALUE': {}, 'LOCAL': {}, 'SET': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'adjacency-sids', 'adjacency-sid', 'state']

  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid/state/value (uint32)

    YANG Description: Adjacency-SID value.
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid/state/value (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: Adjacency-SID value.
    """
    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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value 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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_flags(self):
    """
    Getter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid/state/flags (enumeration)

    YANG Description: Flags associated with Adj-Segment-ID.
    """
    return self.__flags
      
  def _set_flags(self, v, load=False):
    """
    Setter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid/state/flags (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flags() directly.

    YANG Description: Flags associated with Adj-Segment-ID.
    """
    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={'ADDRESS_FAMILY': {}, 'BACKUP': {}, 'VALUE': {}, 'LOCAL': {}, 'SET': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flags must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ADDRESS_FAMILY': {}, 'BACKUP': {}, 'VALUE': {}, 'LOCAL': {}, 'SET': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_flags(self):
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ADDRESS_FAMILY': {}, 'BACKUP': {}, 'VALUE': {}, 'LOCAL': {}, 'SET': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_weight(self):
    """
    Getter method for weight, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid/state/weight (uint8)

    YANG Description: Value that represents the weight of the Adj-SID for
the purpose of load balancing.
    """
    return self.__weight
      
  def _set_weight(self, v, load=False):
    """
    Setter method for weight, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid/state/weight (uint8)
    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: Value that represents the weight of the Adj-SID for
the purpose of load balancing.
    """
    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="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """weight 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="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__weight = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_weight(self):
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)

  value = __builtin__.property(_get_value)
  flags = __builtin__.property(_get_flags)
  weight = __builtin__.property(_get_weight)


  _pyangbind_elements = OrderedDict([('value', value), ('flags', flags), ('weight', weight), ])


class yc_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency-sids/adjacency-sid. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Adjacency Segment-IDs List. An IGP-Adjacency Segment is
an IGP segment attached to a unidirectional adjacency or
a set of unidirectional adjacencies. By default, an IGP-
Adjacency Segment is local to the node which advertises
it.
  """
  __slots__ = ('_path_helper', '_extmethods', '__value','__state',)

  _yang_name = 'adjacency-sid'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__value = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'adjacency-sids', 'adjacency-sid']

  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid/value (leafref)

    YANG Description: Reference to the value of the Adjacency-SID.
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid/value (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: Reference to the value of the Adjacency-SID.
    """
    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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid/state (container)

    YANG Description: State parameters of Adjacency-SID.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid/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 parameters of Adjacency-SID.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  value = __builtin__.property(_get_value)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('value', value), ('state', state), ])


class yc_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency-sids. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines segment routing adjacency SIDs.
  """
  __slots__ = ('_path_helper', '_extmethods', '__adjacency_sid',)

  _yang_name = 'adjacency-sids'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__adjacency_sid = YANGDynClass(base=YANGListType("value",yc_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid, yang_name="adjacency-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="adjacency-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'adjacency-sids']

  def _get_adjacency_sid(self):
    """
    Getter method for adjacency_sid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid (list)

    YANG Description: Adjacency Segment-IDs List. An IGP-Adjacency Segment is
an IGP segment attached to a unidirectional adjacency or
a set of unidirectional adjacencies. By default, an IGP-
Adjacency Segment is local to the node which advertises
it.
    """
    return self.__adjacency_sid
      
  def _set_adjacency_sid(self, v, load=False):
    """
    Setter method for adjacency_sid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adjacency_sid is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adjacency_sid() directly.

    YANG Description: Adjacency Segment-IDs List. An IGP-Adjacency Segment is
an IGP segment attached to a unidirectional adjacency or
a set of unidirectional adjacencies. By default, an IGP-
Adjacency Segment is local to the node which advertises
it.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("value",yc_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid, yang_name="adjacency-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="adjacency-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adjacency_sid must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("value",yc_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid, yang_name="adjacency-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="adjacency-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__adjacency_sid = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adjacency_sid(self):
    self.__adjacency_sid = YANGDynClass(base=YANGListType("value",yc_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid, yang_name="adjacency-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="adjacency-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  adjacency_sid = __builtin__.property(_get_adjacency_sid)


  _pyangbind_elements = OrderedDict([('adjacency_sid', adjacency_sid), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids_lan_adjacency_sid_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan-adjacency-sids/lan-adjacency-sid/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of LAN Adjacency-SID.
  """
  __slots__ = ('_path_helper', '_extmethods', '__value','__flags','__weight','__neighbor_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ADDRESS_FAMILY': {}, 'BACKUP': {}, 'VALUE': {}, 'LOCAL': {}, 'SET': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__neighbor_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="neighbor-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'lan-adjacency-sids', 'lan-adjacency-sid', 'state']

  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/state/value (uint32)

    YANG Description: LAN Adjacency-SID value.
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/state/value (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: LAN Adjacency-SID value.
    """
    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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value 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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_flags(self):
    """
    Getter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/state/flags (enumeration)

    YANG Description: Flags associated with LAN-Adj-Segment-ID.
    """
    return self.__flags
      
  def _set_flags(self, v, load=False):
    """
    Setter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/state/flags (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flags() directly.

    YANG Description: Flags associated with LAN-Adj-Segment-ID.
    """
    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={'ADDRESS_FAMILY': {}, 'BACKUP': {}, 'VALUE': {}, 'LOCAL': {}, 'SET': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flags must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ADDRESS_FAMILY': {}, 'BACKUP': {}, 'VALUE': {}, 'LOCAL': {}, 'SET': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_flags(self):
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ADDRESS_FAMILY': {}, 'BACKUP': {}, 'VALUE': {}, 'LOCAL': {}, 'SET': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_weight(self):
    """
    Getter method for weight, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/state/weight (uint8)

    YANG Description: Value that represents the weight of the Adj-SID
for the purpose of load balancing.
    """
    return self.__weight
      
  def _set_weight(self, v, load=False):
    """
    Setter method for weight, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/state/weight (uint8)
    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: Value that represents the weight of the Adj-SID
for the purpose of load balancing.
    """
    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="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """weight 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="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__weight = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_weight(self):
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_neighbor_id(self):
    """
    Getter method for neighbor_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/state/neighbor_id (oc-isis-types:system-id)

    YANG Description: System ID of the neighbor associated with the LAN-
Adj-Segment-ID value.
    """
    return self.__neighbor_id
      
  def _set_neighbor_id(self, v, load=False):
    """
    Setter method for neighbor_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/state/neighbor_id (oc-isis-types:system-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor_id() directly.

    YANG Description: System ID of the neighbor associated with the LAN-
Adj-Segment-ID value.
    """
    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]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="neighbor-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor_id must be of a type compatible with oc-isis-types:system-id""",
          'defined-type': "oc-isis-types:system-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="neighbor-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)""",
        })

    self.__neighbor_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor_id(self):
    self.__neighbor_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="neighbor-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)

  value = __builtin__.property(_get_value)
  flags = __builtin__.property(_get_flags)
  weight = __builtin__.property(_get_weight)
  neighbor_id = __builtin__.property(_get_neighbor_id)


  _pyangbind_elements = OrderedDict([('value', value), ('flags', flags), ('weight', weight), ('neighbor_id', neighbor_id), ])


class yc_lan_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids_lan_adjacency_sid(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan-adjacency-sids/lan-adjacency-sid. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Adjacency Segment-IDs List. An IGP-Adjacency Segment is
an IGP segment attached to a unidirectional adjacency or
a set of unidirectional adjacencies. By default, an IGP-
Adjacency Segment is local to the node which advertises
it.
  """
  __slots__ = ('_path_helper', '_extmethods', '__value','__state',)

  _yang_name = 'lan-adjacency-sid'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__value = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids_lan_adjacency_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'lan-adjacency-sids', 'lan-adjacency-sid']

  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/value (leafref)

    YANG Description: Reference to the value of the LAN Adjacency-SID.
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/value (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: Reference to the value of the LAN Adjacency-SID.
    """
    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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/state (container)

    YANG Description: State parameters of LAN Adjacency-SID.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/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 parameters of LAN Adjacency-SID.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids_lan_adjacency_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids_lan_adjacency_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids_lan_adjacency_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  value = __builtin__.property(_get_value)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('value', value), ('state', state), ])


class yc_lan_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan-adjacency-sids. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines segment routing LAN adjacency
SIDs
  """
  __slots__ = ('_path_helper', '_extmethods', '__lan_adjacency_sid',)

  _yang_name = 'lan-adjacency-sids'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__lan_adjacency_sid = YANGDynClass(base=YANGListType("value",yc_lan_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids_lan_adjacency_sid, yang_name="lan-adjacency-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="lan-adjacency-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'lan-adjacency-sids']

  def _get_lan_adjacency_sid(self):
    """
    Getter method for lan_adjacency_sid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid (list)

    YANG Description: Adjacency Segment-IDs List. An IGP-Adjacency Segment is
an IGP segment attached to a unidirectional adjacency or
a set of unidirectional adjacencies. By default, an IGP-
Adjacency Segment is local to the node which advertises
it.
    """
    return self.__lan_adjacency_sid
      
  def _set_lan_adjacency_sid(self, v, load=False):
    """
    Setter method for lan_adjacency_sid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lan_adjacency_sid is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lan_adjacency_sid() directly.

    YANG Description: Adjacency Segment-IDs List. An IGP-Adjacency Segment is
an IGP segment attached to a unidirectional adjacency or
a set of unidirectional adjacencies. By default, an IGP-
Adjacency Segment is local to the node which advertises
it.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("value",yc_lan_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids_lan_adjacency_sid, yang_name="lan-adjacency-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="lan-adjacency-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lan_adjacency_sid must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("value",yc_lan_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids_lan_adjacency_sid, yang_name="lan-adjacency-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="lan-adjacency-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__lan_adjacency_sid = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lan_adjacency_sid(self):
    self.__lan_adjacency_sid = YANGDynClass(base=YANGListType("value",yc_lan_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids_lan_adjacency_sid, yang_name="lan-adjacency-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="lan-adjacency-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  lan_adjacency_sid = __builtin__.property(_get_lan_adjacency_sid)


  _pyangbind_elements = OrderedDict([('lan_adjacency_sid', lan_adjacency_sid), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-delay/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS Extended Reachability sub-TLV
33.
  """
  __slots__ = ('_path_helper', '_extmethods', '__a_bit','__delay',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__a_bit = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-delay', 'state']

  def _get_a_bit(self):
    """
    Getter method for a_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay/state/a_bit (boolean)

    YANG Description: The A bit is set when the measured value of this parameter
exceeds its configured maximum threshold. The A bit is cleared
when the measured value falls below its configured reuse
threshold.
    """
    return self.__a_bit
      
  def _set_a_bit(self, v, load=False):
    """
    Setter method for a_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay/state/a_bit (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_a_bit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_a_bit() directly.

    YANG Description: The A bit is set when the measured value of this parameter
exceeds its configured maximum threshold. The A bit is cleared
when the measured value falls below its configured reuse
threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """a_bit must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__a_bit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_a_bit(self):
    self.__a_bit = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_delay(self):
    """
    Getter method for delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay/state/delay (uint32)

    YANG Description: Average link delay value (in microseconds) between
two directly connected IS-IS neighbors over a
configurable interval.
    """
    return self.__delay
      
  def _set_delay(self, v, load=False):
    """
    Setter method for delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay/state/delay (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_delay() directly.

    YANG Description: Average link delay value (in microseconds) between
two directly connected IS-IS neighbors over a
configurable interval.
    """
    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="delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """delay 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="delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_delay(self):
    self.__delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  a_bit = __builtin__.property(_get_a_bit)
  delay = __builtin__.property(_get_delay)


  _pyangbind_elements = OrderedDict([('a_bit', a_bit), ('delay', delay), ])


class yc_link_delay_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-delay. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines unidirectional link delay.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'link-delay'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-delay']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay/state (container)

    YANG Description: State parameters of IS Extended Reachability sub-TLV
33.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay/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 parameters of IS Extended Reachability sub-TLV
33.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_min_max_link_delay_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/min-max-link-delay/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS Extended Reachability sub-TLV
34.
  """
  __slots__ = ('_path_helper', '_extmethods', '__a_bit','__min_delay','__max_delay',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__a_bit = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__min_delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="min-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__max_delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'min-max-link-delay', 'state']

  def _get_a_bit(self):
    """
    Getter method for a_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/min_max_link_delay/state/a_bit (boolean)

    YANG Description: The A bit is set when the measured value of this parameter
exceeds its configured maximum threshold. The A bit is cleared
when the measured value falls below its configured reuse
threshold.
    """
    return self.__a_bit
      
  def _set_a_bit(self, v, load=False):
    """
    Setter method for a_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/min_max_link_delay/state/a_bit (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_a_bit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_a_bit() directly.

    YANG Description: The A bit is set when the measured value of this parameter
exceeds its configured maximum threshold. The A bit is cleared
when the measured value falls below its configured reuse
threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """a_bit must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__a_bit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_a_bit(self):
    self.__a_bit = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_min_delay(self):
    """
    Getter method for min_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/min_max_link_delay/state/min_delay (uint32)

    YANG Description: Minimum measured link delay value(in microseconds)
between two directly connected IS-IS neighbors over a
configurable interval.
    """
    return self.__min_delay
      
  def _set_min_delay(self, v, load=False):
    """
    Setter method for min_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/min_max_link_delay/state/min_delay (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_delay() directly.

    YANG Description: Minimum measured link delay value(in microseconds)
between two directly connected IS-IS neighbors over a
configurable interval.
    """
    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="min-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_delay 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="min-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__min_delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_min_delay(self):
    self.__min_delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="min-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_max_delay(self):
    """
    Getter method for max_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/min_max_link_delay/state/max_delay (uint32)

    YANG Description: Maximum measured link delay value(in microseconds)
between two directly connected IS-IS neighbors over a
configurable interval.
    """
    return self.__max_delay
      
  def _set_max_delay(self, v, load=False):
    """
    Setter method for max_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/min_max_link_delay/state/max_delay (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_delay() directly.

    YANG Description: Maximum measured link delay value(in microseconds)
between two directly connected IS-IS neighbors over a
configurable interval.
    """
    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-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_delay 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-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_delay(self):
    self.__max_delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  a_bit = __builtin__.property(_get_a_bit)
  min_delay = __builtin__.property(_get_min_delay)
  max_delay = __builtin__.property(_get_max_delay)


  _pyangbind_elements = OrderedDict([('a_bit', a_bit), ('min_delay', min_delay), ('max_delay', max_delay), ])


class yc_min_max_link_delay_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_min_max_link_delay(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/min-max-link-delay. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines min/max link delay.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'min-max-link-delay'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_min_max_link_delay_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'min-max-link-delay']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/min_max_link_delay/state (container)

    YANG Description: State parameters of IS Extended Reachability sub-TLV
34.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/min_max_link_delay/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 parameters of IS Extended Reachability sub-TLV
34.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_min_max_link_delay_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_min_max_link_delay_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_min_max_link_delay_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_variation_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-delay-variation/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS Extended Reachability sub-TLV
35.
  """
  __slots__ = ('_path_helper', '_extmethods', '__delay',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-delay-variation', 'state']

  def _get_delay(self):
    """
    Getter method for delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay_variation/state/delay (uint32)

    YANG Description: Average link delay between two directly connected IS-
IS neighbors over a configurable interval.
    """
    return self.__delay
      
  def _set_delay(self, v, load=False):
    """
    Setter method for delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay_variation/state/delay (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_delay() directly.

    YANG Description: Average link delay between two directly connected IS-
IS neighbors over a configurable interval.
    """
    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="delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """delay 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="delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_delay(self):
    self.__delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  delay = __builtin__.property(_get_delay)


  _pyangbind_elements = OrderedDict([('delay', delay), ])


class yc_link_delay_variation_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_variation(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-delay-variation. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines unidirectional link delay
variation.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'link-delay-variation'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_variation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-delay-variation']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay_variation/state (container)

    YANG Description: State parameters of IS Extended Reachability sub-TLV
35.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay_variation/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 parameters of IS Extended Reachability sub-TLV
35.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_variation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_variation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_variation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_loss_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-loss/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS Extended Reachability sub-TLV
36.
  """
  __slots__ = ('_path_helper', '_extmethods', '__a_bit','__link_loss',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__a_bit = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__link_loss = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="link-loss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-loss', 'state']

  def _get_a_bit(self):
    """
    Getter method for a_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_loss/state/a_bit (boolean)

    YANG Description: The A bit is set when the measured value of this parameter
exceeds its configured maximum threshold. The A bit is cleared
when the measured value falls below its configured reuse
threshold.
    """
    return self.__a_bit
      
  def _set_a_bit(self, v, load=False):
    """
    Setter method for a_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_loss/state/a_bit (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_a_bit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_a_bit() directly.

    YANG Description: The A bit is set when the measured value of this parameter
exceeds its configured maximum threshold. The A bit is cleared
when the measured value falls below its configured reuse
threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """a_bit must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__a_bit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_a_bit(self):
    self.__a_bit = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_link_loss(self):
    """
    Getter method for link_loss, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_loss/state/link_loss (uint32)

    YANG Description: Link packet loss as a percentage of the total traffic
sent over a configurable interval. The basic unit is
0.000003%, where (2^24 - 2) is 50.331642%. This value
is the highest packet-loss percentage that can be
expressed (the assumption being that precision is more
important on high-speed links than the ability to
advertise loss rates greater than this, and that high-
speed links with over 50% loss are unusable).
Therefore, measured values that are larger than the
field maximum SHOULD be encoded as the maximum
value.
    """
    return self.__link_loss
      
  def _set_link_loss(self, v, load=False):
    """
    Setter method for link_loss, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_loss/state/link_loss (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_loss is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_loss() directly.

    YANG Description: Link packet loss as a percentage of the total traffic
sent over a configurable interval. The basic unit is
0.000003%, where (2^24 - 2) is 50.331642%. This value
is the highest packet-loss percentage that can be
expressed (the assumption being that precision is more
important on high-speed links than the ability to
advertise loss rates greater than this, and that high-
speed links with over 50% loss are unusable).
Therefore, measured values that are larger than the
field maximum SHOULD be encoded as the maximum
value.
    """
    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="link-loss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_loss 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="link-loss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__link_loss = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_loss(self):
    self.__link_loss = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="link-loss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  a_bit = __builtin__.property(_get_a_bit)
  link_loss = __builtin__.property(_get_link_loss)


  _pyangbind_elements = OrderedDict([('a_bit', a_bit), ('link_loss', link_loss), ])


class yc_link_loss_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_loss(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-loss. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines unidirectional link loss delay.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'link-loss'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_loss_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-loss']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_loss/state (container)

    YANG Description: State parameters of IS Extended Reachability sub-TLV
36.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_loss/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 parameters of IS Extended Reachability sub-TLV
36.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_loss_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_loss_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_loss_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_residual_bandwidth_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/residual-bandwidth/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS Extended Reachability sub-TLV
37.
  """
  __slots__ = ('_path_helper', '_extmethods', '__bandwidth',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'residual-bandwidth', 'state']

  def _get_bandwidth(self):
    """
    Getter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/residual_bandwidth/state/bandwidth (oc-types:ieeefloat32)

    YANG Description: Residual bandwidth on a link,forwarding adjacency
[RFC4206], or bundled link in IEEE floating-point
format with units of bytes per second. For a link or
forwarding adjacency, residual bandwidth is defined to
be the Maximum Bandwidth [RFC5305] minus the bandwidth
currently allocated to RSVP-TE label switched paths.
For a bundled link, residual bandwidth is defined to
be the sum of the component link residual
bandwidths.
    """
    return self.__bandwidth
      
  def _set_bandwidth(self, v, load=False):
    """
    Setter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/residual_bandwidth/state/bandwidth (oc-types:ieeefloat32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth() directly.

    YANG Description: Residual bandwidth on a link,forwarding adjacency
[RFC4206], or bundled link in IEEE floating-point
format with units of bytes per second. For a link or
forwarding adjacency, residual bandwidth is defined to
be the Maximum Bandwidth [RFC5305] minus the bandwidth
currently allocated to RSVP-TE label switched paths.
For a bundled link, residual bandwidth is defined to
be the sum of the component link residual
bandwidths.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth must be of a type compatible with oc-types:ieeefloat32""",
          'defined-type': "oc-types:ieeefloat32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)""",
        })

    self.__bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth(self):
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)

  bandwidth = __builtin__.property(_get_bandwidth)


  _pyangbind_elements = OrderedDict([('bandwidth', bandwidth), ])


class yc_residual_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_residual_bandwidth(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/residual-bandwidth. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines unidirectional residual
bandwidth.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'residual-bandwidth'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_residual_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'residual-bandwidth']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/residual_bandwidth/state (container)

    YANG Description: State parameters of IS Extended Reachability sub-TLV
37.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/residual_bandwidth/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 parameters of IS Extended Reachability sub-TLV
37.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_residual_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_residual_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_residual_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_available_bandwidth_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/available-bandwidth/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS Extended Reachability sub-TLV
38.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__bandwidth',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'available-bandwidth', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/available_bandwidth/state/type (identityref)

    YANG Description: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/available_bandwidth/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: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_bandwidth(self):
    """
    Getter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/available_bandwidth/state/bandwidth (oc-types:ieeefloat32)

    YANG Description: The available bandwidth on a link, forwarding
adjacency, or bundled link in IEEE floating-point
format with units of bytes per second. For a link or
forwarding adjacency, available bandwidth is defined
to be residual bandwidth minus the measured bandwidth
used for the actual forwarding of non-RSVP-TE label
switched path packets.  For a bundled link, available
bandwidth is defined to be the sum of the component
link available bandwidths minus the measured bandwidth
used for the actual forwarding of non-RSVP-TE label
switched path packets.  For a bundled link, available
bandwidth is defined to be the sum of the component
link available bandwidths.
    """
    return self.__bandwidth
      
  def _set_bandwidth(self, v, load=False):
    """
    Setter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/available_bandwidth/state/bandwidth (oc-types:ieeefloat32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth() directly.

    YANG Description: The available bandwidth on a link, forwarding
adjacency, or bundled link in IEEE floating-point
format with units of bytes per second. For a link or
forwarding adjacency, available bandwidth is defined
to be residual bandwidth minus the measured bandwidth
used for the actual forwarding of non-RSVP-TE label
switched path packets.  For a bundled link, available
bandwidth is defined to be the sum of the component
link available bandwidths minus the measured bandwidth
used for the actual forwarding of non-RSVP-TE label
switched path packets.  For a bundled link, available
bandwidth is defined to be the sum of the component
link available bandwidths.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth must be of a type compatible with oc-types:ieeefloat32""",
          'defined-type': "oc-types:ieeefloat32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)""",
        })

    self.__bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth(self):
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)

  type = __builtin__.property(_get_type)
  bandwidth = __builtin__.property(_get_bandwidth)


  _pyangbind_elements = OrderedDict([('type', type), ('bandwidth', bandwidth), ])


class yc_available_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_available_bandwidth(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/available-bandwidth. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines unidirectional lavailable
bandwidth.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'available-bandwidth'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_available_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'available-bandwidth']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/available_bandwidth/state (container)

    YANG Description: State parameters of IS Extended Reachability sub-TLV
38.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/available_bandwidth/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 parameters of IS Extended Reachability sub-TLV
38.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_available_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_available_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_available_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_utilized_bandwidth_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/utilized-bandwidth/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS Extended Reachability sub-TLV
39.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__bandwidth',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'utilized-bandwidth', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/utilized_bandwidth/state/type (identityref)

    YANG Description: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/utilized_bandwidth/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: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_bandwidth(self):
    """
    Getter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/utilized_bandwidth/state/bandwidth (oc-types:ieeefloat32)

    YANG Description: The bandwidth utilization on a link, forwarding
adjacency, or bundled link in IEEE floating-point
format with units of bytes per second.  For a link or
forwarding adjacency, bandwidth utilization represents
the actual utilization of the link (i.e., as measured
by the advertising node).  For a bundled link,
bandwidth utilization is defined to be the sum of the
component link bandwidth utilizations.
    """
    return self.__bandwidth
      
  def _set_bandwidth(self, v, load=False):
    """
    Setter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/utilized_bandwidth/state/bandwidth (oc-types:ieeefloat32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth() directly.

    YANG Description: The bandwidth utilization on a link, forwarding
adjacency, or bundled link in IEEE floating-point
format with units of bytes per second.  For a link or
forwarding adjacency, bandwidth utilization represents
the actual utilization of the link (i.e., as measured
by the advertising node).  For a bundled link,
bandwidth utilization is defined to be the sum of the
component link bandwidth utilizations.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth must be of a type compatible with oc-types:ieeefloat32""",
          'defined-type': "oc-types:ieeefloat32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)""",
        })

    self.__bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth(self):
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)

  type = __builtin__.property(_get_type)
  bandwidth = __builtin__.property(_get_bandwidth)


  _pyangbind_elements = OrderedDict([('type', type), ('bandwidth', bandwidth), ])


class yc_utilized_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_utilized_bandwidth(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/utilized-bandwidth. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines unidirectional utilized
bandwidth.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'utilized-bandwidth'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_utilized_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'utilized-bandwidth']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/utilized_bandwidth/state (container)

    YANG Description: State parameters of IS Extended Reachability sub-TLV
39.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/utilized_bandwidth/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 parameters of IS Extended Reachability sub-TLV
39.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_utilized_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_utilized_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_utilized_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of subTLV types in the LSDB for the specified TLV.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__state','__admin_group','__link_id','__ipv4_interface_address','__ipv4_neighbor_address','__max_link_bandwidth','__max_reservable_link_bandwidth','__unreserved_bandwidth','__ipv6_interface_address','__ipv6_neighbor_address','__extended_admin_group','__te_default_metric','__link_attributes','__link_protection_type','__bandwidth_constraints','__unconstrained_lsp','__adjacency_sids','__lan_adjacency_sids','__link_delay','__min_max_link_delay','__link_delay_variation','__link_loss','__residual_bandwidth','__available_bandwidth','__utilized_bandwidth',)

  _yang_name = 'subtlv'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__admin_group = YANGDynClass(base=yc_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_admin_group, is_container='container', yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__link_id = YANGDynClass(base=yc_link_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_id, is_container='container', yang_name="link-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ipv4_interface_address = YANGDynClass(base=yc_ipv4_interface_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_interface_address, is_container='container', yang_name="ipv4-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ipv4_neighbor_address = YANGDynClass(base=yc_ipv4_neighbor_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_neighbor_address, is_container='container', yang_name="ipv4-neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__max_link_bandwidth = YANGDynClass(base=yc_max_link_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_link_bandwidth, is_container='container', yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__max_reservable_link_bandwidth = YANGDynClass(base=yc_max_reservable_link_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_reservable_link_bandwidth, is_container='container', yang_name="max-reservable-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unreserved_bandwidth = YANGDynClass(base=yc_unreserved_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth, is_container='container', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ipv6_interface_address = YANGDynClass(base=yc_ipv6_interface_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_interface_address, is_container='container', yang_name="ipv6-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ipv6_neighbor_address = YANGDynClass(base=yc_ipv6_neighbor_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_neighbor_address, is_container='container', yang_name="ipv6-neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__extended_admin_group = YANGDynClass(base=yc_extended_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_extended_admin_group, is_container='container', yang_name="extended-admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__te_default_metric = YANGDynClass(base=yc_te_default_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_te_default_metric, is_container='container', yang_name="te-default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__link_attributes = YANGDynClass(base=yc_link_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_attributes, is_container='container', yang_name="link-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__link_protection_type = YANGDynClass(base=yc_link_protection_type_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_protection_type, is_container='container', yang_name="link-protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__bandwidth_constraints = YANGDynClass(base=yc_bandwidth_constraints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints, is_container='container', yang_name="bandwidth-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unconstrained_lsp = YANGDynClass(base=yc_unconstrained_lsp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unconstrained_lsp, is_container='container', yang_name="unconstrained-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__adjacency_sids = YANGDynClass(base=yc_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids, is_container='container', yang_name="adjacency-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__lan_adjacency_sids = YANGDynClass(base=yc_lan_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids, is_container='container', yang_name="lan-adjacency-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__link_delay = YANGDynClass(base=yc_link_delay_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay, is_container='container', yang_name="link-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__min_max_link_delay = YANGDynClass(base=yc_min_max_link_delay_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_min_max_link_delay, is_container='container', yang_name="min-max-link-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__link_delay_variation = YANGDynClass(base=yc_link_delay_variation_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_variation, is_container='container', yang_name="link-delay-variation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__link_loss = YANGDynClass(base=yc_link_loss_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_loss, is_container='container', yang_name="link-loss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__residual_bandwidth = YANGDynClass(base=yc_residual_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_residual_bandwidth, is_container='container', yang_name="residual-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__available_bandwidth = YANGDynClass(base=yc_available_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_available_bandwidth, is_container='container', yang_name="available-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__utilized_bandwidth = YANGDynClass(base=yc_utilized_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_utilized_bandwidth, is_container='container', yang_name="utilized-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/type (leafref)

    YANG Description: Reference to the sub-TLV type.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/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 sub-TLV type.
    """
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/state (container)

    YANG Description: State parameters of IS neighbor state
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/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 parameters of IS neighbor state
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_admin_group(self):
    """
    Getter method for admin_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/admin_group (container)

    YANG Description: This container defines sub-TLV 3.
    """
    return self.__admin_group
      
  def _set_admin_group(self, v, load=False):
    """
    Setter method for admin_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/admin_group (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_admin_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_admin_group() directly.

    YANG Description: This container defines sub-TLV 3.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_admin_group, is_container='container', yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """admin_group must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_admin_group, is_container='container', yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__admin_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_admin_group(self):
    self.__admin_group = YANGDynClass(base=yc_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_admin_group, is_container='container', yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_link_id(self):
    """
    Getter method for link_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_id (container)

    YANG Description: This container defines sub-TLV 4.
    """
    return self.__link_id
      
  def _set_link_id(self, v, load=False):
    """
    Setter method for link_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_id (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_id() directly.

    YANG Description: This container defines sub-TLV 4.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_link_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_id, is_container='container', yang_name="link-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_id must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_link_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_id, is_container='container', yang_name="link-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__link_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_id(self):
    self.__link_id = YANGDynClass(base=yc_link_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_id, is_container='container', yang_name="link-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ipv4_interface_address(self):
    """
    Getter method for ipv4_interface_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_interface_address (container)

    YANG Description: This container defines sub-TLV 6.
    """
    return self.__ipv4_interface_address
      
  def _set_ipv4_interface_address(self, v, load=False):
    """
    Setter method for ipv4_interface_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_interface_address (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv4_interface_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv4_interface_address() directly.

    YANG Description: This container defines sub-TLV 6.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv4_interface_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_interface_address, is_container='container', yang_name="ipv4-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv4_interface_address must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv4_interface_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_interface_address, is_container='container', yang_name="ipv4-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ipv4_interface_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv4_interface_address(self):
    self.__ipv4_interface_address = YANGDynClass(base=yc_ipv4_interface_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_interface_address, is_container='container', yang_name="ipv4-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ipv4_neighbor_address(self):
    """
    Getter method for ipv4_neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_neighbor_address (container)

    YANG Description: This container defines sub-TLV 8.
    """
    return self.__ipv4_neighbor_address
      
  def _set_ipv4_neighbor_address(self, v, load=False):
    """
    Setter method for ipv4_neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_neighbor_address (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv4_neighbor_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv4_neighbor_address() directly.

    YANG Description: This container defines sub-TLV 8.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv4_neighbor_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_neighbor_address, is_container='container', yang_name="ipv4-neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv4_neighbor_address must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv4_neighbor_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_neighbor_address, is_container='container', yang_name="ipv4-neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ipv4_neighbor_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv4_neighbor_address(self):
    self.__ipv4_neighbor_address = YANGDynClass(base=yc_ipv4_neighbor_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_neighbor_address, is_container='container', yang_name="ipv4-neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_max_link_bandwidth(self):
    """
    Getter method for max_link_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_link_bandwidth (container)

    YANG Description: This container defines sub-TLV 9.
    """
    return self.__max_link_bandwidth
      
  def _set_max_link_bandwidth(self, v, load=False):
    """
    Setter method for max_link_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_link_bandwidth (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_link_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_link_bandwidth() directly.

    YANG Description: This container defines sub-TLV 9.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_max_link_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_link_bandwidth, is_container='container', yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_link_bandwidth must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_max_link_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_link_bandwidth, is_container='container', yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__max_link_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_link_bandwidth(self):
    self.__max_link_bandwidth = YANGDynClass(base=yc_max_link_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_link_bandwidth, is_container='container', yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_max_reservable_link_bandwidth(self):
    """
    Getter method for max_reservable_link_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_reservable_link_bandwidth (container)

    YANG Description: This container defines sub-TLV 10.
    """
    return self.__max_reservable_link_bandwidth
      
  def _set_max_reservable_link_bandwidth(self, v, load=False):
    """
    Setter method for max_reservable_link_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_reservable_link_bandwidth (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_reservable_link_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_reservable_link_bandwidth() directly.

    YANG Description: This container defines sub-TLV 10.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_max_reservable_link_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_reservable_link_bandwidth, is_container='container', yang_name="max-reservable-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_reservable_link_bandwidth must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_max_reservable_link_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_reservable_link_bandwidth, is_container='container', yang_name="max-reservable-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__max_reservable_link_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_reservable_link_bandwidth(self):
    self.__max_reservable_link_bandwidth = YANGDynClass(base=yc_max_reservable_link_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_reservable_link_bandwidth, is_container='container', yang_name="max-reservable-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unreserved_bandwidth(self):
    """
    Getter method for unreserved_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth (container)

    YANG Description: This container defines unreserved-bandwidth. The units
are bytes per second.
    """
    return self.__unreserved_bandwidth
      
  def _set_unreserved_bandwidth(self, v, load=False):
    """
    Setter method for unreserved_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unreserved_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unreserved_bandwidth() directly.

    YANG Description: This container defines unreserved-bandwidth. The units
are bytes per second.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unreserved_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth, is_container='container', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unreserved_bandwidth must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unreserved_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth, is_container='container', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unreserved_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unreserved_bandwidth(self):
    self.__unreserved_bandwidth = YANGDynClass(base=yc_unreserved_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth, is_container='container', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ipv6_interface_address(self):
    """
    Getter method for ipv6_interface_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_interface_address (container)

    YANG Description: This container defines sub-TLV 12.
    """
    return self.__ipv6_interface_address
      
  def _set_ipv6_interface_address(self, v, load=False):
    """
    Setter method for ipv6_interface_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_interface_address (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6_interface_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6_interface_address() directly.

    YANG Description: This container defines sub-TLV 12.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv6_interface_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_interface_address, is_container='container', yang_name="ipv6-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6_interface_address must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv6_interface_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_interface_address, is_container='container', yang_name="ipv6-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ipv6_interface_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6_interface_address(self):
    self.__ipv6_interface_address = YANGDynClass(base=yc_ipv6_interface_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_interface_address, is_container='container', yang_name="ipv6-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ipv6_neighbor_address(self):
    """
    Getter method for ipv6_neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_neighbor_address (container)

    YANG Description: This container defines sub-TLV 13.
    """
    return self.__ipv6_neighbor_address
      
  def _set_ipv6_neighbor_address(self, v, load=False):
    """
    Setter method for ipv6_neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_neighbor_address (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6_neighbor_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6_neighbor_address() directly.

    YANG Description: This container defines sub-TLV 13.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv6_neighbor_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_neighbor_address, is_container='container', yang_name="ipv6-neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6_neighbor_address must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv6_neighbor_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_neighbor_address, is_container='container', yang_name="ipv6-neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ipv6_neighbor_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6_neighbor_address(self):
    self.__ipv6_neighbor_address = YANGDynClass(base=yc_ipv6_neighbor_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_neighbor_address, is_container='container', yang_name="ipv6-neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_extended_admin_group(self):
    """
    Getter method for extended_admin_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/extended_admin_group (container)

    YANG Description: This container defines sub-TLV 14.
    """
    return self.__extended_admin_group
      
  def _set_extended_admin_group(self, v, load=False):
    """
    Setter method for extended_admin_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/extended_admin_group (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended_admin_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended_admin_group() directly.

    YANG Description: This container defines sub-TLV 14.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_extended_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_extended_admin_group, is_container='container', yang_name="extended-admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended_admin_group must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_extended_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_extended_admin_group, is_container='container', yang_name="extended-admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__extended_admin_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended_admin_group(self):
    self.__extended_admin_group = YANGDynClass(base=yc_extended_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_extended_admin_group, is_container='container', yang_name="extended-admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_te_default_metric(self):
    """
    Getter method for te_default_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/te_default_metric (container)

    YANG Description: This container defines sub-TLV 18.
    """
    return self.__te_default_metric
      
  def _set_te_default_metric(self, v, load=False):
    """
    Setter method for te_default_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/te_default_metric (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_te_default_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_te_default_metric() directly.

    YANG Description: This container defines sub-TLV 18.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_te_default_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_te_default_metric, is_container='container', yang_name="te-default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """te_default_metric must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_te_default_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_te_default_metric, is_container='container', yang_name="te-default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__te_default_metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_te_default_metric(self):
    self.__te_default_metric = YANGDynClass(base=yc_te_default_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_te_default_metric, is_container='container', yang_name="te-default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_link_attributes(self):
    """
    Getter method for link_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_attributes (container)

    YANG Description: This container defines link-attributes.
    """
    return self.__link_attributes
      
  def _set_link_attributes(self, v, load=False):
    """
    Setter method for link_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_attributes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_attributes() directly.

    YANG Description: This container defines link-attributes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_link_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_attributes, is_container='container', yang_name="link-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_attributes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_link_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_attributes, is_container='container', yang_name="link-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__link_attributes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_attributes(self):
    self.__link_attributes = YANGDynClass(base=yc_link_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_attributes, is_container='container', yang_name="link-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_link_protection_type(self):
    """
    Getter method for link_protection_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_protection_type (container)

    YANG Description: ISIS LSDB parameters relating to the type of link
protection offered.
    """
    return self.__link_protection_type
      
  def _set_link_protection_type(self, v, load=False):
    """
    Setter method for link_protection_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_protection_type (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_protection_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_protection_type() directly.

    YANG Description: ISIS LSDB parameters relating to the type of link
protection offered.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_link_protection_type_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_protection_type, is_container='container', yang_name="link-protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_protection_type must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_link_protection_type_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_protection_type, is_container='container', yang_name="link-protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__link_protection_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_protection_type(self):
    self.__link_protection_type = YANGDynClass(base=yc_link_protection_type_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_protection_type, is_container='container', yang_name="link-protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_bandwidth_constraints(self):
    """
    Getter method for bandwidth_constraints, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints (container)

    YANG Description: This container defines bandwidth-constraints. For DS-TE,
the existing Maximum Reservable link bandwidth parameter
is retained, but its semantics is generalized and
interpreted as the aggregate bandwidth constraint across
all Class-Types
    """
    return self.__bandwidth_constraints
      
  def _set_bandwidth_constraints(self, v, load=False):
    """
    Setter method for bandwidth_constraints, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth_constraints is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth_constraints() directly.

    YANG Description: This container defines bandwidth-constraints. For DS-TE,
the existing Maximum Reservable link bandwidth parameter
is retained, but its semantics is generalized and
interpreted as the aggregate bandwidth constraint across
all Class-Types
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_bandwidth_constraints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints, is_container='container', yang_name="bandwidth-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth_constraints must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_bandwidth_constraints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints, is_container='container', yang_name="bandwidth-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__bandwidth_constraints = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth_constraints(self):
    self.__bandwidth_constraints = YANGDynClass(base=yc_bandwidth_constraints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints, is_container='container', yang_name="bandwidth-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unconstrained_lsp(self):
    """
    Getter method for unconstrained_lsp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unconstrained_lsp (container)

    YANG Description: This container defines sub-TLV 23.
    """
    return self.__unconstrained_lsp
      
  def _set_unconstrained_lsp(self, v, load=False):
    """
    Setter method for unconstrained_lsp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unconstrained_lsp (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unconstrained_lsp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unconstrained_lsp() directly.

    YANG Description: This container defines sub-TLV 23.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unconstrained_lsp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unconstrained_lsp, is_container='container', yang_name="unconstrained-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unconstrained_lsp must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unconstrained_lsp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unconstrained_lsp, is_container='container', yang_name="unconstrained-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unconstrained_lsp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unconstrained_lsp(self):
    self.__unconstrained_lsp = YANGDynClass(base=yc_unconstrained_lsp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unconstrained_lsp, is_container='container', yang_name="unconstrained-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_adjacency_sids(self):
    """
    Getter method for adjacency_sids, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids (container)

    YANG Description: This container defines segment routing adjacency SIDs.
    """
    return self.__adjacency_sids
      
  def _set_adjacency_sids(self, v, load=False):
    """
    Setter method for adjacency_sids, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adjacency_sids is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adjacency_sids() directly.

    YANG Description: This container defines segment routing adjacency SIDs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids, is_container='container', yang_name="adjacency-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adjacency_sids must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids, is_container='container', yang_name="adjacency-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__adjacency_sids = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adjacency_sids(self):
    self.__adjacency_sids = YANGDynClass(base=yc_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids, is_container='container', yang_name="adjacency-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_lan_adjacency_sids(self):
    """
    Getter method for lan_adjacency_sids, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids (container)

    YANG Description: This container defines segment routing LAN adjacency
SIDs
    """
    return self.__lan_adjacency_sids
      
  def _set_lan_adjacency_sids(self, v, load=False):
    """
    Setter method for lan_adjacency_sids, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lan_adjacency_sids is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lan_adjacency_sids() directly.

    YANG Description: This container defines segment routing LAN adjacency
SIDs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_lan_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids, is_container='container', yang_name="lan-adjacency-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lan_adjacency_sids must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_lan_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids, is_container='container', yang_name="lan-adjacency-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__lan_adjacency_sids = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lan_adjacency_sids(self):
    self.__lan_adjacency_sids = YANGDynClass(base=yc_lan_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids, is_container='container', yang_name="lan-adjacency-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_link_delay(self):
    """
    Getter method for link_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay (container)

    YANG Description: This container defines unidirectional link delay.
    """
    return self.__link_delay
      
  def _set_link_delay(self, v, load=False):
    """
    Setter method for link_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_delay() directly.

    YANG Description: This container defines unidirectional link delay.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_link_delay_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay, is_container='container', yang_name="link-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_delay must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_link_delay_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay, is_container='container', yang_name="link-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__link_delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_delay(self):
    self.__link_delay = YANGDynClass(base=yc_link_delay_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay, is_container='container', yang_name="link-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_min_max_link_delay(self):
    """
    Getter method for min_max_link_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/min_max_link_delay (container)

    YANG Description: This container defines min/max link delay.
    """
    return self.__min_max_link_delay
      
  def _set_min_max_link_delay(self, v, load=False):
    """
    Setter method for min_max_link_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/min_max_link_delay (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_max_link_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_max_link_delay() directly.

    YANG Description: This container defines min/max link delay.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_min_max_link_delay_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_min_max_link_delay, is_container='container', yang_name="min-max-link-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_max_link_delay must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_min_max_link_delay_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_min_max_link_delay, is_container='container', yang_name="min-max-link-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__min_max_link_delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_min_max_link_delay(self):
    self.__min_max_link_delay = YANGDynClass(base=yc_min_max_link_delay_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_min_max_link_delay, is_container='container', yang_name="min-max-link-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_link_delay_variation(self):
    """
    Getter method for link_delay_variation, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay_variation (container)

    YANG Description: This container defines unidirectional link delay
variation.
    """
    return self.__link_delay_variation
      
  def _set_link_delay_variation(self, v, load=False):
    """
    Setter method for link_delay_variation, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay_variation (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_delay_variation is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_delay_variation() directly.

    YANG Description: This container defines unidirectional link delay
variation.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_link_delay_variation_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_variation, is_container='container', yang_name="link-delay-variation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_delay_variation must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_link_delay_variation_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_variation, is_container='container', yang_name="link-delay-variation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__link_delay_variation = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_delay_variation(self):
    self.__link_delay_variation = YANGDynClass(base=yc_link_delay_variation_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_variation, is_container='container', yang_name="link-delay-variation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_link_loss(self):
    """
    Getter method for link_loss, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_loss (container)

    YANG Description: This container defines unidirectional link loss delay.
    """
    return self.__link_loss
      
  def _set_link_loss(self, v, load=False):
    """
    Setter method for link_loss, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_loss (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_loss is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_loss() directly.

    YANG Description: This container defines unidirectional link loss delay.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_link_loss_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_loss, is_container='container', yang_name="link-loss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_loss must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_link_loss_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_loss, is_container='container', yang_name="link-loss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__link_loss = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_loss(self):
    self.__link_loss = YANGDynClass(base=yc_link_loss_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_loss, is_container='container', yang_name="link-loss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_residual_bandwidth(self):
    """
    Getter method for residual_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/residual_bandwidth (container)

    YANG Description: This container defines unidirectional residual
bandwidth.
    """
    return self.__residual_bandwidth
      
  def _set_residual_bandwidth(self, v, load=False):
    """
    Setter method for residual_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/residual_bandwidth (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_residual_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_residual_bandwidth() directly.

    YANG Description: This container defines unidirectional residual
bandwidth.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_residual_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_residual_bandwidth, is_container='container', yang_name="residual-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """residual_bandwidth must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_residual_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_residual_bandwidth, is_container='container', yang_name="residual-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__residual_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_residual_bandwidth(self):
    self.__residual_bandwidth = YANGDynClass(base=yc_residual_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_residual_bandwidth, is_container='container', yang_name="residual-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_available_bandwidth(self):
    """
    Getter method for available_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/available_bandwidth (container)

    YANG Description: This container defines unidirectional lavailable
bandwidth.
    """
    return self.__available_bandwidth
      
  def _set_available_bandwidth(self, v, load=False):
    """
    Setter method for available_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/available_bandwidth (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_available_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_available_bandwidth() directly.

    YANG Description: This container defines unidirectional lavailable
bandwidth.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_available_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_available_bandwidth, is_container='container', yang_name="available-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """available_bandwidth must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_available_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_available_bandwidth, is_container='container', yang_name="available-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__available_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_available_bandwidth(self):
    self.__available_bandwidth = YANGDynClass(base=yc_available_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_available_bandwidth, is_container='container', yang_name="available-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_utilized_bandwidth(self):
    """
    Getter method for utilized_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/utilized_bandwidth (container)

    YANG Description: This container defines unidirectional utilized
bandwidth.
    """
    return self.__utilized_bandwidth
      
  def _set_utilized_bandwidth(self, v, load=False):
    """
    Setter method for utilized_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/utilized_bandwidth (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_utilized_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_utilized_bandwidth() directly.

    YANG Description: This container defines unidirectional utilized
bandwidth.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_utilized_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_utilized_bandwidth, is_container='container', yang_name="utilized-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """utilized_bandwidth must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_utilized_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_utilized_bandwidth, is_container='container', yang_name="utilized-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__utilized_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_utilized_bandwidth(self):
    self.__utilized_bandwidth = YANGDynClass(base=yc_utilized_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_utilized_bandwidth, is_container='container', yang_name="utilized-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  type = __builtin__.property(_get_type)
  state = __builtin__.property(_get_state)
  admin_group = __builtin__.property(_get_admin_group)
  link_id = __builtin__.property(_get_link_id)
  ipv4_interface_address = __builtin__.property(_get_ipv4_interface_address)
  ipv4_neighbor_address = __builtin__.property(_get_ipv4_neighbor_address)
  max_link_bandwidth = __builtin__.property(_get_max_link_bandwidth)
  max_reservable_link_bandwidth = __builtin__.property(_get_max_reservable_link_bandwidth)
  unreserved_bandwidth = __builtin__.property(_get_unreserved_bandwidth)
  ipv6_interface_address = __builtin__.property(_get_ipv6_interface_address)
  ipv6_neighbor_address = __builtin__.property(_get_ipv6_neighbor_address)
  extended_admin_group = __builtin__.property(_get_extended_admin_group)
  te_default_metric = __builtin__.property(_get_te_default_metric)
  link_attributes = __builtin__.property(_get_link_attributes)
  link_protection_type = __builtin__.property(_get_link_protection_type)
  bandwidth_constraints = __builtin__.property(_get_bandwidth_constraints)
  unconstrained_lsp = __builtin__.property(_get_unconstrained_lsp)
  adjacency_sids = __builtin__.property(_get_adjacency_sids)
  lan_adjacency_sids = __builtin__.property(_get_lan_adjacency_sids)
  link_delay = __builtin__.property(_get_link_delay)
  min_max_link_delay = __builtin__.property(_get_min_max_link_delay)
  link_delay_variation = __builtin__.property(_get_link_delay_variation)
  link_loss = __builtin__.property(_get_link_loss)
  residual_bandwidth = __builtin__.property(_get_residual_bandwidth)
  available_bandwidth = __builtin__.property(_get_available_bandwidth)
  utilized_bandwidth = __builtin__.property(_get_utilized_bandwidth)


  _pyangbind_elements = OrderedDict([('type', type), ('state', state), ('admin_group', admin_group), ('link_id', link_id), ('ipv4_interface_address', ipv4_interface_address), ('ipv4_neighbor_address', ipv4_neighbor_address), ('max_link_bandwidth', max_link_bandwidth), ('max_reservable_link_bandwidth', max_reservable_link_bandwidth), ('unreserved_bandwidth', unreserved_bandwidth), ('ipv6_interface_address', ipv6_interface_address), ('ipv6_neighbor_address', ipv6_neighbor_address), ('extended_admin_group', extended_admin_group), ('te_default_metric', te_default_metric), ('link_attributes', link_attributes), ('link_protection_type', link_protection_type), ('bandwidth_constraints', bandwidth_constraints), ('unconstrained_lsp', unconstrained_lsp), ('adjacency_sids', adjacency_sids), ('lan_adjacency_sids', lan_adjacency_sids), ('link_delay', link_delay), ('min_max_link_delay', min_max_link_delay), ('link_delay_variation', link_delay_variation), ('link_loss', link_loss), ('residual_bandwidth', residual_bandwidth), ('available_bandwidth', available_bandwidth), ('utilized_bandwidth', utilized_bandwidth), ])


class yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container describes IS Neighbor sub-TLVs.
  """
  __slots__ = ('_path_helper', '_extmethods', '__subtlv',)

  _yang_name = 'subtlvs'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__subtlv = YANGDynClass(base=YANGListType("type",yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv, yang_name="subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs']

  def _get_subtlv(self):
    """
    Getter method for subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv (list)

    YANG Description: List of subTLV types in the LSDB for the specified TLV.
    """
    return self.__subtlv
      
  def _set_subtlv(self, v, load=False):
    """
    Setter method for subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_subtlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_subtlv() directly.

    YANG Description: List of subTLV types in the LSDB for the specified TLV.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("type",yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv, yang_name="subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """subtlv must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("type",yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv, yang_name="subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__subtlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_subtlv(self):
    self.__subtlv = YANGDynClass(base=YANGListType("type",yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv, yang_name="subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  subtlv = __builtin__.property(_get_subtlv)


  _pyangbind_elements = OrderedDict([('subtlv', subtlv), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_undefined_subtlvs_undefined_subtlv_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/undefined-subtlvs/undefined-subtlv/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of the undefined sub-TLV.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__length','__value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__value = YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'undefined-subtlvs', 'undefined-subtlv', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv/state/type (uint8)

    YANG Description: TLV Type.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv/state/type (uint8)
    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: TLV Type.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with uint8""",
          'defined-type': "uint8",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_length(self):
    """
    Getter method for length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv/state/length (uint8)

    YANG Description: TLV length.
    """
    return self.__length
      
  def _set_length(self, v, load=False):
    """
    Setter method for length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv/state/length (uint8)
    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: TLV length.
    """
    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="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """length 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="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', 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..255']}, int_size=8), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv/state/value (binary)

    YANG Description: TLV value.
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv/state/value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: TLV value.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  type = __builtin__.property(_get_type)
  length = __builtin__.property(_get_length)
  value = __builtin__.property(_get_value)


  _pyangbind_elements = OrderedDict([('type', type), ('length', length), ('value', value), ])


class yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_undefined_subtlvs_undefined_subtlv(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/undefined-subtlvs/undefined-subtlv. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Sub-TLVs that are not defined in the model or not
recognised by system.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__state',)

  _yang_name = 'undefined-subtlv'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_undefined_subtlvs_undefined_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'undefined-subtlvs', 'undefined-subtlv']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv/type (leafref)

    YANG Description: Reference to the type of the undefined sub-TLV
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv/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 type of the undefined sub-TLV
    """
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv/state (container)

    YANG Description: State parameters of the undefined sub-TLV.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv/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 parameters of the undefined sub-TLV.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_undefined_subtlvs_undefined_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_undefined_subtlvs_undefined_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_undefined_subtlvs_undefined_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  type = __builtin__.property(_get_type)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('type', type), ('state', state), ])


class yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_undefined_subtlvs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance/undefined-subtlvs. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container describes undefined ISIS TLVs.
  """
  __slots__ = ('_path_helper', '_extmethods', '__undefined_subtlv',)

  _yang_name = 'undefined-subtlvs'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__undefined_subtlv = YANGDynClass(base=YANGListType("type",yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_undefined_subtlvs_undefined_subtlv, yang_name="undefined-subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="undefined-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'undefined-subtlvs']

  def _get_undefined_subtlv(self):
    """
    Getter method for undefined_subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv (list)

    YANG Description: Sub-TLVs that are not defined in the model or not
recognised by system.
    """
    return self.__undefined_subtlv
      
  def _set_undefined_subtlv(self, v, load=False):
    """
    Setter method for undefined_subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_undefined_subtlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_undefined_subtlv() directly.

    YANG Description: Sub-TLVs that are not defined in the model or not
recognised by system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("type",yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_undefined_subtlvs_undefined_subtlv, yang_name="undefined-subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="undefined-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """undefined_subtlv must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("type",yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_undefined_subtlvs_undefined_subtlv, yang_name="undefined-subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="undefined-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__undefined_subtlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_undefined_subtlv(self):
    self.__undefined_subtlv = YANGDynClass(base=YANGListType("type",yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_undefined_subtlvs_undefined_subtlv, yang_name="undefined-subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="undefined-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  undefined_subtlv = __builtin__.property(_get_undefined_subtlv)


  _pyangbind_elements = OrderedDict([('undefined_subtlv', undefined_subtlv), ])


class yc_instance_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances/instance. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Instance of the TLV to the remote IS neighbor.
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__state','__subtlvs','__undefined_subtlvs',)

  _yang_name = 'instance'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__subtlvs = YANGDynClass(base=yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs, is_container='container', yang_name="subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__undefined_subtlvs = YANGDynClass(base=yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_undefined_subtlvs, is_container='container', yang_name="undefined-subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/id (leafref)

    YANG Description: Reference to the unique identifier for
the instance of the extended IS
reachability sub-TLV.
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/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 the unique identifier for
the instance of the extended IS
reachability sub-TLV.
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/state (container)

    YANG Description: State parameters of extended neighbor
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/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 parameters of extended neighbor
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_subtlvs(self):
    """
    Getter method for subtlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs (container)

    YANG Description: This container describes IS Neighbor sub-TLVs.
    """
    return self.__subtlvs
      
  def _set_subtlvs(self, v, load=False):
    """
    Setter method for subtlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_subtlvs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_subtlvs() directly.

    YANG Description: This container describes IS Neighbor sub-TLVs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs, is_container='container', yang_name="subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """subtlvs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs, is_container='container', yang_name="subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__subtlvs = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_subtlvs(self):
    self.__subtlvs = YANGDynClass(base=yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs, is_container='container', yang_name="subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_undefined_subtlvs(self):
    """
    Getter method for undefined_subtlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/undefined_subtlvs (container)

    YANG Description: This container describes undefined ISIS TLVs.
    """
    return self.__undefined_subtlvs
      
  def _set_undefined_subtlvs(self, v, load=False):
    """
    Setter method for undefined_subtlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance/undefined_subtlvs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_undefined_subtlvs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_undefined_subtlvs() directly.

    YANG Description: This container describes undefined ISIS TLVs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_undefined_subtlvs, is_container='container', yang_name="undefined-subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """undefined_subtlvs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_undefined_subtlvs, is_container='container', yang_name="undefined-subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__undefined_subtlvs = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_undefined_subtlvs(self):
    self.__undefined_subtlvs = YANGDynClass(base=yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance_undefined_subtlvs, is_container='container', yang_name="undefined-subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  id = __builtin__.property(_get_id)
  state = __builtin__.property(_get_state)
  subtlvs = __builtin__.property(_get_subtlvs)
  undefined_subtlvs = __builtin__.property(_get_undefined_subtlvs)


  _pyangbind_elements = OrderedDict([('id', id), ('state', state), ('subtlvs', subtlvs), ('undefined_subtlvs', undefined_subtlvs), ])


class yc_instances_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor/instances. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This list contains all instances of an adjacency
between the originating IS and the remote IS.
Multiple instances are used where there are
parallel adjacencies between two systems.
  """
  __slots__ = ('_path_helper', '_extmethods', '__instance',)

  _yang_name = 'instances'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__instance = YANGDynClass(base=YANGListType("id",yc_instance_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance, yang_name="instance", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances']

  def _get_instance(self):
    """
    Getter method for instance, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance (list)

    YANG Description: Instance of the TLV to the remote IS neighbor.
    """
    return self.__instance
      
  def _set_instance(self, v, load=False):
    """
    Setter method for instance, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances/instance (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_instance is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_instance() directly.

    YANG Description: Instance of the TLV to the remote IS neighbor.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("id",yc_instance_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance, yang_name="instance", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """instance must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("id",yc_instance_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance, yang_name="instance", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__instance = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_instance(self):
    self.__instance = YANGDynClass(base=YANGListType("id",yc_instance_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances_instance, yang_name="instance", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  instance = __builtin__.property(_get_instance)


  _pyangbind_elements = OrderedDict([('instance', instance), ])


class yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors/neighbor. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This list describes ISIS extended neighbors and
reachability attributes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__system_id','__state','__instances',)

  _yang_name = 'neighbor'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__system_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__instances = YANGDynClass(base=yc_instances_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances, is_container='container', yang_name="instances", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors', 'neighbor']

  def _get_system_id(self):
    """
    Getter method for system_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/system_id (leafref)

    YANG Description: Reference to the neighboring system's system ID.
    """
    return self.__system_id
      
  def _set_system_id(self, v, load=False):
    """
    Setter method for system_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/system_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_system_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_system_id() directly.

    YANG Description: Reference to the neighboring system's system ID.
    """
    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="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """system_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__system_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_system_id(self):
    self.__system_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/state (container)

    YANG Description: State parameters corresponding to the extended
neighbour.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/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 parameters corresponding to the extended
neighbour.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_instances(self):
    """
    Getter method for instances, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances (container)

    YANG Description: This list contains all instances of an adjacency
between the originating IS and the remote IS.
Multiple instances are used where there are
parallel adjacencies between two systems.
    """
    return self.__instances
      
  def _set_instances(self, v, load=False):
    """
    Setter method for instances, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor/instances (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_instances is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_instances() directly.

    YANG Description: This list contains all instances of an adjacency
between the originating IS and the remote IS.
Multiple instances are used where there are
parallel adjacencies between two systems.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_instances_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances, is_container='container', yang_name="instances", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """instances must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_instances_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances, is_container='container', yang_name="instances", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__instances = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_instances(self):
    self.__instances = YANGDynClass(base=yc_instances_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor_instances, is_container='container', yang_name="instances", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  system_id = __builtin__.property(_get_system_id)
  state = __builtin__.property(_get_state)
  instances = __builtin__.property(_get_instances)


  _pyangbind_elements = OrderedDict([('system_id', system_id), ('state', state), ('instances', instances), ])


class yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute/neighbors. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container describes IS neighbors.
  """
  __slots__ = ('_path_helper', '_extmethods', '__neighbor',)

  _yang_name = 'neighbors'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__neighbor = YANGDynClass(base=YANGListType("system_id",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='system-id', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute', 'neighbors']

  def _get_neighbor(self):
    """
    Getter method for neighbor, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor (list)

    YANG Description: This list describes ISIS extended neighbors and
reachability attributes.
    """
    return self.__neighbor
      
  def _set_neighbor(self, v, load=False):
    """
    Setter method for neighbor, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors/neighbor (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor() directly.

    YANG Description: This list describes ISIS extended neighbors and
reachability attributes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("system_id",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='system-id', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("system_id",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='system-id', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__neighbor = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor(self):
    self.__neighbor = YANGDynClass(base=YANGListType("system_id",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='system-id', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  neighbor = __builtin__.property(_get_neighbor)


  _pyangbind_elements = OrderedDict([('neighbor', neighbor), ])


class yc_isis_neighbor_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/isis-neighbor-attribute. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines list of ISIS topology neighbors
for extended ISIS LSP (multiple system IDs). 
  """
  __slots__ = ('_path_helper', '_extmethods', '__neighbors',)

  _yang_name = 'isis-neighbor-attribute'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__neighbors = YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'isis-neighbor-attribute']

  def _get_neighbors(self):
    """
    Getter method for neighbors, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors (container)

    YANG Description: This container describes IS neighbors.
    """
    return self.__neighbors
      
  def _set_neighbors(self, v, load=False):
    """
    Setter method for neighbors, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute/neighbors (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbors is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbors() directly.

    YANG Description: This container describes IS neighbors.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbors must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__neighbors = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbors(self):
    self.__neighbors = YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  neighbors = __builtin__.property(_get_neighbors)


  _pyangbind_elements = OrderedDict([('neighbors', neighbors), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_alias_id_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/is-alias-id/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of alias ID.
  """
  __slots__ = ('_path_helper', '_extmethods', '__alias_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__alias_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="alias-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'is-alias-id', 'state']

  def _get_alias_id(self):
    """
    Getter method for alias_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_alias_id/state/alias_id (oc-isis-types:system-id)

    YANG Description: List of alias ID(s).
    """
    return self.__alias_id
      
  def _set_alias_id(self, v, load=False):
    """
    Setter method for alias_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_alias_id/state/alias_id (oc-isis-types:system-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_alias_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_alias_id() directly.

    YANG Description: List of alias ID(s).
    """
    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]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="alias-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """alias_id must be of a type compatible with oc-isis-types:system-id""",
          'defined-type': "oc-isis-types:system-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="alias-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)""",
        })

    self.__alias_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_alias_id(self):
    self.__alias_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="alias-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)

  alias_id = __builtin__.property(_get_alias_id)


  _pyangbind_elements = OrderedDict([('alias_id', alias_id), ])


class yc_is_alias_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_alias_id(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/is-alias-id. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines the IS-Alias TLV which allows
extension-capable ISs to recognize the Originating System
of an Extended LSP set. It identifies the Normal system-
id of the Originating System.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'is-alias-id'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_alias_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'is-alias-id']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_alias_id/state (container)

    YANG Description: State parameters of alias ID.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_alias_id/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 parameters of alias ID.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_alias_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_alias_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_alias_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters related to the
MT ISN TLV.
  """
  __slots__ = ('_path_helper', '_extmethods', '__mt_id','__system_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__mt_id = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..4095']}), is_leaf=True, yang_name="mt-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__system_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'state']

  def _get_mt_id(self):
    """
    Getter method for mt_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/state/mt_id (uint16)

    YANG Description: Identifier of a topology being announced.
    """
    return self.__mt_id
      
  def _set_mt_id(self, v, load=False):
    """
    Setter method for mt_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/state/mt_id (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mt_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mt_id() directly.

    YANG Description: Identifier of a topology being announced.
    """
    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': ['0..4095']}), is_leaf=True, yang_name="mt-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mt_id must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..4095']}), is_leaf=True, yang_name="mt-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__mt_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mt_id(self):
    self.__mt_id = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..4095']}), is_leaf=True, yang_name="mt-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_system_id(self):
    """
    Getter method for system_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/state/system_id (oc-isis-types:system-id)

    YANG Description: System-id of the IS neighbor.
    """
    return self.__system_id
      
  def _set_system_id(self, v, load=False):
    """
    Setter method for system_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/state/system_id (oc-isis-types:system-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_system_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_system_id() directly.

    YANG Description: System-id of the IS neighbor.
    """
    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]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """system_id must be of a type compatible with oc-isis-types:system-id""",
          'defined-type': "oc-isis-types:system-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)""",
        })

    self.__system_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_system_id(self):
    self.__system_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)

  mt_id = __builtin__.property(_get_mt_id)
  system_id = __builtin__.property(_get_system_id)


  _pyangbind_elements = OrderedDict([('mt_id', mt_id), ('system_id', system_id), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of MT neighbor.
  """
  __slots__ = ('_path_helper', '_extmethods', '__metric','__id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:wide-metric', is_config=False)
    self.__id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'state']

  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/state/metric (oc-isis-types:wide-metric)

    YANG Description: ISIS metric value.
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/state/metric (oc-isis-types:wide-metric)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: ISIS metric value.
    """
    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': ['1..16777215']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:wide-metric', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric must be of a type compatible with oc-isis-types:wide-metric""",
          'defined-type': "oc-isis-types:wide-metric",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:wide-metric', is_config=False)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:wide-metric', is_config=False)


  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/state/id (uint64)

    YANG Description: Unique identifier for the TLV instance for the
neighbor. The ID is not required to be consistent
across readvertisements of the LSP.
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/state/id (uint64)
    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: Unique identifier for the TLV instance for the
neighbor. The ID is not required to be consistent
across readvertisements of the LSP.
    """
    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="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id 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="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_id(self):
    self.__id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)

  metric = __builtin__.property(_get_metric)
  id = __builtin__.property(_get_id)


  _pyangbind_elements = OrderedDict([('metric', metric), ('id', id), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS neighbor state
  """
  __slots__ = ('_path_helper', '_extmethods', '__type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/state/type (identityref)

    YANG Description: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/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: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  type = __builtin__.property(_get_type)


  _pyangbind_elements = OrderedDict([('type', type), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_admin_group_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/admin-group/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 3.
  """
  __slots__ = ('_path_helper', '_extmethods', '__admin_group',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__admin_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'admin-group', 'state']

  def _get_admin_group(self):
    """
    Getter method for admin_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/admin_group/state/admin_group (uint32)

    YANG Description: The administrative group sub-TLV contains a 4-octet
bit mask assigned by the network administrator.  Each
set bit corresponds to one administrative group
assigned to the interface. By convention, the least
significant bit is referred to as group 0, and the
most significant bit is referred to as group 31.
    """
    return self.__admin_group
      
  def _set_admin_group(self, v, load=False):
    """
    Setter method for admin_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/admin_group/state/admin_group (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_admin_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_admin_group() directly.

    YANG Description: The administrative group sub-TLV contains a 4-octet
bit mask assigned by the network administrator.  Each
set bit corresponds to one administrative group
assigned to the interface. By convention, the least
significant bit is referred to as group 0, and the
most significant bit is referred to as group 31.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """admin_group must be of a type compatible with uint32""",
          'defined-type': "uint32",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__admin_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_admin_group(self):
    self.__admin_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  admin_group = __builtin__.property(_get_admin_group)


  _pyangbind_elements = OrderedDict([('admin_group', admin_group), ])


class yc_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_admin_group(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/admin-group. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 3.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'admin-group'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_admin_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'admin-group']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/admin_group/state (container)

    YANG Description: State parameters of sub-TLV 3.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/admin_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: State parameters of sub-TLV 3.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_admin_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_admin_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_admin_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_id_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-id/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 4.
  """
  __slots__ = ('_path_helper', '_extmethods', '__local_','__remote',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__local_ = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="local", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__remote = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="remote", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-id', 'state']

  def _get_local_(self):
    """
    Getter method for local_, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_id/state/local (uint32)

    YANG Description: The value field of this sub-TLV contains 4 octets of
Link Local Identifier followed by 4 octets of Link
Remote Identifier.
    """
    return self.__local_
      
  def _set_local_(self, v, load=False):
    """
    Setter method for local_, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_id/state/local (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_ is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_() directly.

    YANG Description: The value field of this sub-TLV contains 4 octets of
Link Local Identifier followed by 4 octets of Link
Remote Identifier.
    """
    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="local", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_ 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="local", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__local_ = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_(self):
    self.__local_ = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="local", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_remote(self):
    """
    Getter method for remote, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_id/state/remote (uint32)

    YANG Description: If the Link Remote Identifier is unknown, it is set
to 0.
    """
    return self.__remote
      
  def _set_remote(self, v, load=False):
    """
    Setter method for remote, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_id/state/remote (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_remote is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_remote() directly.

    YANG Description: If the Link Remote Identifier is unknown, it is set
to 0.
    """
    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="remote", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """remote 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="remote", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__remote = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_remote(self):
    self.__remote = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="remote", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  local_ = __builtin__.property(_get_local_)
  remote = __builtin__.property(_get_remote)


  _pyangbind_elements = OrderedDict([('local_', local_), ('remote', remote), ])


class yc_link_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_id(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-id. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 4.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'link-id'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-id']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_id/state (container)

    YANG Description: State parameters of sub-TLV 4.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_id/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 parameters of sub-TLV 4.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_interface_address_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4-interface-address/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 6.
  """
  __slots__ = ('_path_helper', '_extmethods', '__address',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__address = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'ipv4-interface-address', 'state']

  def _get_address(self):
    """
    Getter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_interface_address/state/address (inet:ipv4-address)

    YANG Description: A 4-octet IPv4 address for the interface described by
the (main) TLV. This sub-TLV can occur multiple
times.
    """
    return self.__address
      
  def _set_address(self, v, load=False):
    """
    Setter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_interface_address/state/address (inet:ipv4-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address() directly.

    YANG Description: A 4-octet IPv4 address for the interface described by
the (main) TLV. This sub-TLV can occur multiple
times.
    """
    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_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}'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address must be of a type compatible with inet:ipv4-address""",
          'defined-type': "inet:ipv4-address",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=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}'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)""",
        })

    self.__address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address(self):
    self.__address = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)

  address = __builtin__.property(_get_address)


  _pyangbind_elements = OrderedDict([('address', address), ])


class yc_ipv4_interface_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_interface_address(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4-interface-address. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 6.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'ipv4-interface-address'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_interface_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'ipv4-interface-address']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_interface_address/state (container)

    YANG Description: State parameters of sub-TLV 6.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_interface_address/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 parameters of sub-TLV 6.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_interface_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_interface_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_interface_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_neighbor_address_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4-neighbor-address/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 8.
  """
  __slots__ = ('_path_helper', '_extmethods', '__address',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__address = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'ipv4-neighbor-address', 'state']

  def _get_address(self):
    """
    Getter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_neighbor_address/state/address (inet:ipv4-address)

    YANG Description: A single IPv4 address for a neighboring router on
this link. This sub-TLV can occur multiple times.
    """
    return self.__address
      
  def _set_address(self, v, load=False):
    """
    Setter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_neighbor_address/state/address (inet:ipv4-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address() directly.

    YANG Description: A single IPv4 address for a neighboring router on
this link. This sub-TLV can occur multiple times.
    """
    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_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}'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address must be of a type compatible with inet:ipv4-address""",
          'defined-type': "inet:ipv4-address",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=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}'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)""",
        })

    self.__address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address(self):
    self.__address = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)

  address = __builtin__.property(_get_address)


  _pyangbind_elements = OrderedDict([('address', address), ])


class yc_ipv4_neighbor_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_neighbor_address(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4-neighbor-address. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 8.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'ipv4-neighbor-address'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_neighbor_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'ipv4-neighbor-address']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_neighbor_address/state (container)

    YANG Description: State parameters of sub-TLV 8.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_neighbor_address/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 parameters of sub-TLV 8.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_neighbor_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_neighbor_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_neighbor_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_link_bandwidth_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/max-link-bandwidth/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 9.
  """
  __slots__ = ('_path_helper', '_extmethods', '__bandwidth',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'max-link-bandwidth', 'state']

  def _get_bandwidth(self):
    """
    Getter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_link_bandwidth/state/bandwidth (oc-types:ieeefloat32)

    YANG Description: The maximum bandwidth that can be used on this link
in this direction (from the system originating the LSP
to its neighbors).  It is encoded in 32 bits in IEEE
floating point format.  The units are bytes (not
bits!) per second.
    """
    return self.__bandwidth
      
  def _set_bandwidth(self, v, load=False):
    """
    Setter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_link_bandwidth/state/bandwidth (oc-types:ieeefloat32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth() directly.

    YANG Description: The maximum bandwidth that can be used on this link
in this direction (from the system originating the LSP
to its neighbors).  It is encoded in 32 bits in IEEE
floating point format.  The units are bytes (not
bits!) per second.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth must be of a type compatible with oc-types:ieeefloat32""",
          'defined-type': "oc-types:ieeefloat32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)""",
        })

    self.__bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth(self):
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)

  bandwidth = __builtin__.property(_get_bandwidth)


  _pyangbind_elements = OrderedDict([('bandwidth', bandwidth), ])


class yc_max_link_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_link_bandwidth(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/max-link-bandwidth. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 9.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'max-link-bandwidth'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_link_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'max-link-bandwidth']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_link_bandwidth/state (container)

    YANG Description: State parameters of sub-TLV 9.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_link_bandwidth/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 parameters of sub-TLV 9.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_link_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_link_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_link_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_reservable_link_bandwidth_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/max-reservable-link-bandwidth/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 10.
  """
  __slots__ = ('_path_helper', '_extmethods', '__bandwidth',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'max-reservable-link-bandwidth', 'state']

  def _get_bandwidth(self):
    """
    Getter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_reservable_link_bandwidth/state/bandwidth (oc-types:ieeefloat32)

    YANG Description: The maximum amount of bandwidth that can be reserved
in this direction on this link.  Note that for
oversubscription purposes,  this can be greater than
the bandwidth of the link. It is encoded  in 32 bits
in IEEE floating point format.  The units are bytes
(not bits!) per second.
    """
    return self.__bandwidth
      
  def _set_bandwidth(self, v, load=False):
    """
    Setter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_reservable_link_bandwidth/state/bandwidth (oc-types:ieeefloat32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth() directly.

    YANG Description: The maximum amount of bandwidth that can be reserved
in this direction on this link.  Note that for
oversubscription purposes,  this can be greater than
the bandwidth of the link. It is encoded  in 32 bits
in IEEE floating point format.  The units are bytes
(not bits!) per second.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth must be of a type compatible with oc-types:ieeefloat32""",
          'defined-type': "oc-types:ieeefloat32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)""",
        })

    self.__bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth(self):
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)

  bandwidth = __builtin__.property(_get_bandwidth)


  _pyangbind_elements = OrderedDict([('bandwidth', bandwidth), ])


class yc_max_reservable_link_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_reservable_link_bandwidth(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/max-reservable-link-bandwidth. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 10.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'max-reservable-link-bandwidth'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_reservable_link_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'max-reservable-link-bandwidth']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_reservable_link_bandwidth/state (container)

    YANG Description: State parameters of sub-TLV 10.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_reservable_link_bandwidth/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 parameters of sub-TLV 10.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_reservable_link_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_reservable_link_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_reservable_link_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth_setup_priority_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved-bandwidth/setup-priority/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS Extended Reachability sub-TLV
11.
  """
  __slots__ = ('_path_helper', '_extmethods', '__priority','__bandwidth',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__priority = 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="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'unreserved-bandwidth', 'setup-priority', 'state']

  def _get_priority(self):
    """
    Getter method for priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth/setup_priority/state/priority (uint8)

    YANG Description: Setup priority level of 0 through 7 to be used by
Unreserved Bandwidth sub-TLV 11.
    """
    return self.__priority
      
  def _set_priority(self, v, load=False):
    """
    Setter method for priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth/setup_priority/state/priority (uint8)
    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: Setup priority level of 0 through 7 to be used by
Unreserved Bandwidth sub-TLV 11.
    """
    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="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """priority 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..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_priority(self):
    self.__priority = 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="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_bandwidth(self):
    """
    Getter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth/setup_priority/state/bandwidth (oc-types:ieeefloat32)

    YANG Description: The amount of bandwidth reservable in this
direction on this link. Note that for
oversubscription purposes, this can be greater than
the bandwidth of the link. It contains eight 32-bit
IEEE floating point numbers(one for each priority).
The units are bytes (not bits!) per second. The
values correspond to the bandwidth that can be
reserved with a setup priority of 0 through 7,
arranged in increasing order with priority 0
occurring at the start of the sub-TLV, and priority
7 at the end of the sub-TLV.
    """
    return self.__bandwidth
      
  def _set_bandwidth(self, v, load=False):
    """
    Setter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth/setup_priority/state/bandwidth (oc-types:ieeefloat32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth() directly.

    YANG Description: The amount of bandwidth reservable in this
direction on this link. Note that for
oversubscription purposes, this can be greater than
the bandwidth of the link. It contains eight 32-bit
IEEE floating point numbers(one for each priority).
The units are bytes (not bits!) per second. The
values correspond to the bandwidth that can be
reserved with a setup priority of 0 through 7,
arranged in increasing order with priority 0
occurring at the start of the sub-TLV, and priority
7 at the end of the sub-TLV.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth must be of a type compatible with oc-types:ieeefloat32""",
          'defined-type': "oc-types:ieeefloat32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)""",
        })

    self.__bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth(self):
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)

  priority = __builtin__.property(_get_priority)
  bandwidth = __builtin__.property(_get_bandwidth)


  _pyangbind_elements = OrderedDict([('priority', priority), ('bandwidth', bandwidth), ])


class yc_setup_priority_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth_setup_priority(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved-bandwidth/setup-priority. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Setup priority (0 through 7) for unreserved
bandwidth.
  """
  __slots__ = ('_path_helper', '_extmethods', '__priority','__state',)

  _yang_name = 'setup-priority'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__priority = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth_setup_priority_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'unreserved-bandwidth', 'setup-priority']

  def _get_priority(self):
    """
    Getter method for priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth/setup_priority/priority (leafref)

    YANG Description: Reference to the setup priority to which the
unreserved bandwidth corresponds.
    """
    return self.__priority
      
  def _set_priority(self, v, load=False):
    """
    Setter method for priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth/setup_priority/priority (leafref)
    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: Reference to the setup priority to which the
unreserved bandwidth corresponds.
    """
    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="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """priority must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_priority(self):
    self.__priority = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth/setup_priority/state (container)

    YANG Description: State parameters of IS Extended Reachability sub-TLV
11.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth/setup_priority/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 parameters of IS Extended Reachability sub-TLV
11.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth_setup_priority_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth_setup_priority_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth_setup_priority_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  priority = __builtin__.property(_get_priority)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('priority', priority), ('state', state), ])


class yc_unreserved_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved-bandwidth. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines unreserved-bandwidth. The units
are bytes per second.
  """
  __slots__ = ('_path_helper', '_extmethods', '__setup_priority',)

  _yang_name = 'unreserved-bandwidth'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__setup_priority = YANGDynClass(base=YANGListType("priority",yc_setup_priority_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth_setup_priority, yang_name="setup-priority", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'unreserved-bandwidth']

  def _get_setup_priority(self):
    """
    Getter method for setup_priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth/setup_priority (list)

    YANG Description: Setup priority (0 through 7) for unreserved
bandwidth.
    """
    return self.__setup_priority
      
  def _set_setup_priority(self, v, load=False):
    """
    Setter method for setup_priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth/setup_priority (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_setup_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_setup_priority() directly.

    YANG Description: Setup priority (0 through 7) for unreserved
bandwidth.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("priority",yc_setup_priority_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth_setup_priority, yang_name="setup-priority", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """setup_priority must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("priority",yc_setup_priority_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth_setup_priority, yang_name="setup-priority", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__setup_priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_setup_priority(self):
    self.__setup_priority = YANGDynClass(base=YANGListType("priority",yc_setup_priority_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth_setup_priority, yang_name="setup-priority", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  setup_priority = __builtin__.property(_get_setup_priority)


  _pyangbind_elements = OrderedDict([('setup_priority', setup_priority), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_interface_address_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6-interface-address/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 12.
  """
  __slots__ = ('_path_helper', '_extmethods', '__address',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__address = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}|:))'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'ipv6-interface-address', 'state']

  def _get_address(self):
    """
    Getter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_interface_address/state/address (inet:ipv6-address)

    YANG Description: Contains a 16-octet IPv6 address for the interface
described by the containing  Extended IS Reachability
TLV. This sub-TLV can occur multiple times.
    """
    return self.__address
      
  def _set_address(self, v, load=False):
    """
    Setter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_interface_address/state/address (inet:ipv6-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address() directly.

    YANG Description: Contains a 16-octet IPv6 address for the interface
described by the containing  Extended IS Reachability
TLV. This sub-TLV can occur multiple times.
    """
    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_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}|:))'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address must be of a type compatible with inet:ipv6-address""",
          'defined-type': "inet:ipv6-address",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=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}|:))'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)""",
        })

    self.__address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address(self):
    self.__address = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}|:))'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)

  address = __builtin__.property(_get_address)


  _pyangbind_elements = OrderedDict([('address', address), ])


class yc_ipv6_interface_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_interface_address(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6-interface-address. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 12.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'ipv6-interface-address'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_interface_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'ipv6-interface-address']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_interface_address/state (container)

    YANG Description: State parameters of sub-TLV 12.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_interface_address/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 parameters of sub-TLV 12.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_interface_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_interface_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_interface_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_neighbor_address_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6-neighbor-address/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 13.
  """
  __slots__ = ('_path_helper', '_extmethods', '__address',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__address = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}|:))'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'ipv6-neighbor-address', 'state']

  def _get_address(self):
    """
    Getter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_neighbor_address/state/address (inet:ipv6-address)

    YANG Description: Contains a 16-octet IPv6 address for a neighboring
router on the link described by the (main) TLV. This
sub-TLV can occur multiple times.
    """
    return self.__address
      
  def _set_address(self, v, load=False):
    """
    Setter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_neighbor_address/state/address (inet:ipv6-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address() directly.

    YANG Description: Contains a 16-octet IPv6 address for a neighboring
router on the link described by the (main) TLV. This
sub-TLV can occur multiple times.
    """
    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_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}|:))'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address must be of a type compatible with inet:ipv6-address""",
          'defined-type': "inet:ipv6-address",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=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}|:))'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)""",
        })

    self.__address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address(self):
    self.__address = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}|:))'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)

  address = __builtin__.property(_get_address)


  _pyangbind_elements = OrderedDict([('address', address), ])


class yc_ipv6_neighbor_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_neighbor_address(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6-neighbor-address. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 13.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'ipv6-neighbor-address'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_neighbor_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'ipv6-neighbor-address']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_neighbor_address/state (container)

    YANG Description: State parameters of sub-TLV 13.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_neighbor_address/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 parameters of sub-TLV 13.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_neighbor_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_neighbor_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_neighbor_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_extended_admin_group_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/extended-admin-group/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 14.
  """
  __slots__ = ('_path_helper', '_extmethods', '__extended_admin_group',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__extended_admin_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="extended-admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'extended-admin-group', 'state']

  def _get_extended_admin_group(self):
    """
    Getter method for extended_admin_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/extended_admin_group/state/extended_admin_group (uint32)

    YANG Description: The extended-admin-group sub-TLV is used in addition
to the Administrative Groups when it is desirable to
make more than 32 colors available for advertisement
in a network.
    """
    return self.__extended_admin_group
      
  def _set_extended_admin_group(self, v, load=False):
    """
    Setter method for extended_admin_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/extended_admin_group/state/extended_admin_group (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended_admin_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended_admin_group() directly.

    YANG Description: The extended-admin-group sub-TLV is used in addition
to the Administrative Groups when it is desirable to
make more than 32 colors available for advertisement
in a network.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="extended-admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended_admin_group must be of a type compatible with uint32""",
          'defined-type': "uint32",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="extended-admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__extended_admin_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended_admin_group(self):
    self.__extended_admin_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="extended-admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  extended_admin_group = __builtin__.property(_get_extended_admin_group)


  _pyangbind_elements = OrderedDict([('extended_admin_group', extended_admin_group), ])


class yc_extended_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_extended_admin_group(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/extended-admin-group. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 14.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'extended-admin-group'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_extended_admin_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'extended-admin-group']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/extended_admin_group/state (container)

    YANG Description: State parameters of sub-TLV 14.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/extended_admin_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: State parameters of sub-TLV 14.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_extended_admin_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_extended_admin_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_extended_admin_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_te_default_metric_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/te-default-metric/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 18.
  """
  __slots__ = ('_path_helper', '_extmethods', '__metric',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'te-default-metric', 'state']

  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/te_default_metric/state/metric (uint32)

    YANG Description: This metric is administratively assigned and can be
used to present a differently weighted topology to
traffic engineering SPF calculations. To preclude
overflow within a traffic engineering SPF
implementation, all metrics greater than or equal to
MAX_PATH_METRIC SHALL be considered to have a metric
of MAX_PATH_METRIC.
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/te_default_metric/state/metric (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: This metric is administratively assigned and can be
used to present a differently weighted topology to
traffic engineering SPF calculations. To preclude
overflow within a traffic engineering SPF
implementation, all metrics greater than or equal to
MAX_PATH_METRIC SHALL be considered to have a metric
of MAX_PATH_METRIC.
    """
    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="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric 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="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  metric = __builtin__.property(_get_metric)


  _pyangbind_elements = OrderedDict([('metric', metric), ])


class yc_te_default_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_te_default_metric(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/te-default-metric. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 18.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'te-default-metric'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_te_default_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'te-default-metric']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/te_default_metric/state (container)

    YANG Description: State parameters of sub-TLV 18.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/te_default_metric/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 parameters of sub-TLV 18.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_te_default_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_te_default_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_te_default_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_attributes_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-attributes/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS Extended Reachability sub-TLV
19.
  """
  __slots__ = ('_path_helper', '_extmethods', '__local_protection',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__local_protection = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LOCAL_PROTECTION': {}, 'LINK_EXCLUDED': {}},)), is_leaf=False, yang_name="local-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-attributes', 'state']

  def _get_local_protection(self):
    """
    Getter method for local_protection, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_attributes/state/local_protection (enumeration)

    YANG Description: Link local-protection attributes.
    """
    return self.__local_protection
      
  def _set_local_protection(self, v, load=False):
    """
    Setter method for local_protection, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_attributes/state/local_protection (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_protection is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_protection() directly.

    YANG Description: Link local-protection attributes.
    """
    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={'LOCAL_PROTECTION': {}, 'LINK_EXCLUDED': {}},)), is_leaf=False, yang_name="local-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_protection must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LOCAL_PROTECTION': {}, 'LINK_EXCLUDED': {}},)), is_leaf=False, yang_name="local-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__local_protection = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_protection(self):
    self.__local_protection = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LOCAL_PROTECTION': {}, 'LINK_EXCLUDED': {}},)), is_leaf=False, yang_name="local-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)

  local_protection = __builtin__.property(_get_local_protection)


  _pyangbind_elements = OrderedDict([('local_protection', local_protection), ])


class yc_link_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_attributes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-attributes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines link-attributes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'link-attributes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_attributes_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-attributes']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_attributes/state (container)

    YANG Description: State parameters of IS Extended Reachability sub-TLV
19.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_attributes/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 parameters of IS Extended Reachability sub-TLV
19.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_attributes_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_attributes_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_attributes_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_protection_type_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-protection-type/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 20.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXTRA_TRAFFIC': {}, 'UNPROTECTED': {}, 'SHARED': {}, 'ONE_ONE': {}, 'PLUS_ONE': {}, 'ENHANCED': {}},)), is_leaf=False, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-protection-type', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_protection_type/state/type (enumeration)

    YANG Description: Link protection capabilities.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_protection_type/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: Link protection capabilities.
    """
    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={'EXTRA_TRAFFIC': {}, 'UNPROTECTED': {}, 'SHARED': {}, 'ONE_ONE': {}, 'PLUS_ONE': {}, 'ENHANCED': {}},)), is_leaf=False, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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-network-instance:enumeration",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXTRA_TRAFFIC': {}, 'UNPROTECTED': {}, 'SHARED': {}, 'ONE_ONE': {}, 'PLUS_ONE': {}, 'ENHANCED': {}},)), is_leaf=False, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXTRA_TRAFFIC': {}, 'UNPROTECTED': {}, 'SHARED': {}, 'ONE_ONE': {}, 'PLUS_ONE': {}, 'ENHANCED': {}},)), is_leaf=False, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)

  type = __builtin__.property(_get_type)


  _pyangbind_elements = OrderedDict([('type', type), ])


class yc_link_protection_type_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_protection_type(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-protection-type. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: ISIS LSDB parameters relating to the type of link
protection offered.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'link-protection-type'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_protection_type_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-protection-type']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_protection_type/state (container)

    YANG Description: State parameters of sub-TLV 20.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_protection_type/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 parameters of sub-TLV 20.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_protection_type_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_protection_type_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_protection_type_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth-constraints/bandwidth-constraint/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS Extended Reachability sub-TLV
22.
  """
  __slots__ = ('_path_helper', '_extmethods', '__model_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__model_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="model-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'bandwidth-constraints', 'bandwidth-constraint', 'state']

  def _get_model_id(self):
    """
    Getter method for model_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/state/model_id (uint8)

    YANG Description: Identifier for the Bandwidth Constraints  Model
currently in use by the LSR initiating the IGP
advertisement.
    """
    return self.__model_id
      
  def _set_model_id(self, v, load=False):
    """
    Setter method for model_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/state/model_id (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_model_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_model_id() directly.

    YANG Description: Identifier for the Bandwidth Constraints  Model
currently in use by the LSR initiating the IGP
advertisement.
    """
    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="model-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """model_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="model-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__model_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_model_id(self):
    self.__model_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="model-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)

  model_id = __builtin__.property(_get_model_id)


  _pyangbind_elements = OrderedDict([('model_id', model_id), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints_constraint_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth-constraints/bandwidth-constraint/constraints/constraint/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters of the BCN level
  """
  __slots__ = ('_path_helper', '_extmethods', '__constraint_id','__bandwidth',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__constraint_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="constraint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'bandwidth-constraints', 'bandwidth-constraint', 'constraints', 'constraint', 'state']

  def _get_constraint_id(self):
    """
    Getter method for constraint_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints/constraint/state/constraint_id (uint32)

    YANG Description: Unique reference for the bandwidth constraint level. BC0
is indicated by this leaf being set to zero, with BCN
represented by this leaf being set to N.
    """
    return self.__constraint_id
      
  def _set_constraint_id(self, v, load=False):
    """
    Setter method for constraint_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints/constraint/state/constraint_id (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_constraint_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_constraint_id() directly.

    YANG Description: Unique reference for the bandwidth constraint level. BC0
is indicated by this leaf being set to zero, with BCN
represented by this leaf being set to N.
    """
    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="constraint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """constraint_id 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="constraint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__constraint_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_constraint_id(self):
    self.__constraint_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="constraint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_bandwidth(self):
    """
    Getter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints/constraint/state/bandwidth (oc-types:ieeefloat32)

    YANG Description: The bandwidth constraint, expressed as a 32-bit IEEE
floating point number expressed in bytes per second.
    """
    return self.__bandwidth
      
  def _set_bandwidth(self, v, load=False):
    """
    Setter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints/constraint/state/bandwidth (oc-types:ieeefloat32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth() directly.

    YANG Description: The bandwidth constraint, expressed as a 32-bit IEEE
floating point number expressed in bytes per second.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth must be of a type compatible with oc-types:ieeefloat32""",
          'defined-type': "oc-types:ieeefloat32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)""",
        })

    self.__bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth(self):
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)

  constraint_id = __builtin__.property(_get_constraint_id)
  bandwidth = __builtin__.property(_get_bandwidth)


  _pyangbind_elements = OrderedDict([('constraint_id', constraint_id), ('bandwidth', bandwidth), ])


class yc_constraint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints_constraint(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth-constraints/bandwidth-constraint/constraints/constraint. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of the constraints within the Bandwidth
Constraints sub-TLV. The BC0 level is indicated by
the constraint-id leaf being set to 0, with BCN
being indicated by constraint-id N.
  """
  __slots__ = ('_path_helper', '_extmethods', '__constraint_id','__state',)

  _yang_name = 'constraint'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__constraint_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="constraint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'bandwidth-constraints', 'bandwidth-constraint', 'constraints', 'constraint']

  def _get_constraint_id(self):
    """
    Getter method for constraint_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints/constraint/constraint_id (leafref)

    YANG Description: Reference to the unique ID for the BCN level.
    """
    return self.__constraint_id
      
  def _set_constraint_id(self, v, load=False):
    """
    Setter method for constraint_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints/constraint/constraint_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_constraint_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_constraint_id() directly.

    YANG Description: Reference to the unique ID for the BCN level.
    """
    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="constraint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """constraint_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="constraint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__constraint_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_constraint_id(self):
    self.__constraint_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="constraint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints/constraint/state (container)

    YANG Description: Operational state parameters of the BCN level
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints/constraint/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 of the BCN level
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  constraint_id = __builtin__.property(_get_constraint_id)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('constraint_id', constraint_id), ('state', state), ])


class yc_constraints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth-constraints/bandwidth-constraint/constraints. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Constraints contained within the Bandwidth
Constraints sub-TLV
  """
  __slots__ = ('_path_helper', '_extmethods', '__constraint',)

  _yang_name = 'constraints'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__constraint = YANGDynClass(base=YANGListType("constraint_id",yc_constraint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints_constraint, yang_name="constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='constraint-id', extensions=None), is_container='list', yang_name="constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'bandwidth-constraints', 'bandwidth-constraint', 'constraints']

  def _get_constraint(self):
    """
    Getter method for constraint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints/constraint (list)

    YANG Description: List of the constraints within the Bandwidth
Constraints sub-TLV. The BC0 level is indicated by
the constraint-id leaf being set to 0, with BCN
being indicated by constraint-id N.
    """
    return self.__constraint
      
  def _set_constraint(self, v, load=False):
    """
    Setter method for constraint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints/constraint (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_constraint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_constraint() directly.

    YANG Description: List of the constraints within the Bandwidth
Constraints sub-TLV. The BC0 level is indicated by
the constraint-id leaf being set to 0, with BCN
being indicated by constraint-id N.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("constraint_id",yc_constraint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints_constraint, yang_name="constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='constraint-id', extensions=None), is_container='list', yang_name="constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """constraint must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("constraint_id",yc_constraint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints_constraint, yang_name="constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='constraint-id', extensions=None), is_container='list', yang_name="constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__constraint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_constraint(self):
    self.__constraint = YANGDynClass(base=YANGListType("constraint_id",yc_constraint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints_constraint, yang_name="constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='constraint-id', extensions=None), is_container='list', yang_name="constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  constraint = __builtin__.property(_get_constraint)


  _pyangbind_elements = OrderedDict([('constraint', constraint), ])


class yc_bandwidth_constraint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth-constraints/bandwidth-constraint. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of the Bandwidth Constraints sub-TLV instances
present in the TLV.
  """
  __slots__ = ('_path_helper', '_extmethods', '__model_id','__state','__constraints',)

  _yang_name = 'bandwidth-constraint'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__model_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="model-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__constraints = YANGDynClass(base=yc_constraints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints, is_container='container', yang_name="constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'bandwidth-constraints', 'bandwidth-constraint']

  def _get_model_id(self):
    """
    Getter method for model_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/model_id (leafref)

    YANG Description: Reference to the model ID associated with the
instance of the Bandwidth Constraints sub-TLV.
    """
    return self.__model_id
      
  def _set_model_id(self, v, load=False):
    """
    Setter method for model_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/model_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_model_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_model_id() directly.

    YANG Description: Reference to the model ID associated with the
instance of the Bandwidth Constraints sub-TLV.
    """
    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="model-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """model_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="model-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__model_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_model_id(self):
    self.__model_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="model-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/state (container)

    YANG Description: State parameters of IS Extended Reachability sub-TLV
22.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/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 parameters of IS Extended Reachability sub-TLV
22.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_constraints(self):
    """
    Getter method for constraints, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints (container)

    YANG Description: Constraints contained within the Bandwidth
Constraints sub-TLV
    """
    return self.__constraints
      
  def _set_constraints(self, v, load=False):
    """
    Setter method for constraints, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_constraints is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_constraints() directly.

    YANG Description: Constraints contained within the Bandwidth
Constraints sub-TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_constraints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints, is_container='container', yang_name="constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """constraints must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_constraints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints, is_container='container', yang_name="constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__constraints = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_constraints(self):
    self.__constraints = YANGDynClass(base=yc_constraints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints, is_container='container', yang_name="constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  model_id = __builtin__.property(_get_model_id)
  state = __builtin__.property(_get_state)
  constraints = __builtin__.property(_get_constraints)


  _pyangbind_elements = OrderedDict([('model_id', model_id), ('state', state), ('constraints', constraints), ])


class yc_bandwidth_constraints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth-constraints. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines bandwidth-constraints. For DS-TE,
the existing Maximum Reservable link bandwidth parameter
is retained, but its semantics is generalized and
interpreted as the aggregate bandwidth constraint across
all Class-Types
  """
  __slots__ = ('_path_helper', '_extmethods', '__bandwidth_constraint',)

  _yang_name = 'bandwidth-constraints'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__bandwidth_constraint = YANGDynClass(base=YANGListType("model_id",yc_bandwidth_constraint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint, yang_name="bandwidth-constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='model-id', extensions=None), is_container='list', yang_name="bandwidth-constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'bandwidth-constraints']

  def _get_bandwidth_constraint(self):
    """
    Getter method for bandwidth_constraint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint (list)

    YANG Description: List of the Bandwidth Constraints sub-TLV instances
present in the TLV.
    """
    return self.__bandwidth_constraint
      
  def _set_bandwidth_constraint(self, v, load=False):
    """
    Setter method for bandwidth_constraint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth_constraint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth_constraint() directly.

    YANG Description: List of the Bandwidth Constraints sub-TLV instances
present in the TLV.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("model_id",yc_bandwidth_constraint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint, yang_name="bandwidth-constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='model-id', extensions=None), is_container='list', yang_name="bandwidth-constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth_constraint must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("model_id",yc_bandwidth_constraint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint, yang_name="bandwidth-constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='model-id', extensions=None), is_container='list', yang_name="bandwidth-constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__bandwidth_constraint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth_constraint(self):
    self.__bandwidth_constraint = YANGDynClass(base=YANGListType("model_id",yc_bandwidth_constraint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint, yang_name="bandwidth-constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='model-id', extensions=None), is_container='list', yang_name="bandwidth-constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  bandwidth_constraint = __builtin__.property(_get_bandwidth_constraint)


  _pyangbind_elements = OrderedDict([('bandwidth_constraint', bandwidth_constraint), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_unconstrained_lsp_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/unconstrained-lsp/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 23.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__count',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__count = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'unconstrained-lsp', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/unconstrained_lsp/state/type (identityref)

    YANG Description: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/unconstrained_lsp/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: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_count(self):
    """
    Getter method for count, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/unconstrained_lsp/state/count (uint16)

    YANG Description: Unconstrained TE LSP count(TE Label Switched Paths
(LSPs) signalled with zero bandwidth).
    """
    return self.__count
      
  def _set_count(self, v, load=False):
    """
    Setter method for count, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/unconstrained_lsp/state/count (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_count is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_count() directly.

    YANG Description: Unconstrained TE LSP count(TE Label Switched Paths
(LSPs) signalled with zero bandwidth).
    """
    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="count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """count 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="count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__count = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_count(self):
    self.__count = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  type = __builtin__.property(_get_type)
  count = __builtin__.property(_get_count)


  _pyangbind_elements = OrderedDict([('type', type), ('count', count), ])


class yc_unconstrained_lsp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_unconstrained_lsp(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/unconstrained-lsp. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 23.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'unconstrained-lsp'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_unconstrained_lsp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'unconstrained-lsp']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/unconstrained_lsp/state (container)

    YANG Description: State parameters of sub-TLV 23.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/unconstrained_lsp/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 parameters of sub-TLV 23.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_unconstrained_lsp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_unconstrained_lsp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_unconstrained_lsp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency-sids/adjacency-sid/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of Adjacency-SID.
  """
  __slots__ = ('_path_helper', '_extmethods', '__value','__flags','__weight',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ADDRESS_FAMILY': {}, 'BACKUP': {}, 'VALUE': {}, 'LOCAL': {}, 'SET': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'adjacency-sids', 'adjacency-sid', 'state']

  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid/state/value (uint32)

    YANG Description: Adjacency-SID value.
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid/state/value (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: Adjacency-SID value.
    """
    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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value 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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_flags(self):
    """
    Getter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid/state/flags (enumeration)

    YANG Description: Flags associated with Adj-Segment-ID.
    """
    return self.__flags
      
  def _set_flags(self, v, load=False):
    """
    Setter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid/state/flags (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flags() directly.

    YANG Description: Flags associated with Adj-Segment-ID.
    """
    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={'ADDRESS_FAMILY': {}, 'BACKUP': {}, 'VALUE': {}, 'LOCAL': {}, 'SET': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flags must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ADDRESS_FAMILY': {}, 'BACKUP': {}, 'VALUE': {}, 'LOCAL': {}, 'SET': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_flags(self):
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ADDRESS_FAMILY': {}, 'BACKUP': {}, 'VALUE': {}, 'LOCAL': {}, 'SET': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_weight(self):
    """
    Getter method for weight, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid/state/weight (uint8)

    YANG Description: Value that represents the weight of the Adj-SID for
the purpose of load balancing.
    """
    return self.__weight
      
  def _set_weight(self, v, load=False):
    """
    Setter method for weight, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid/state/weight (uint8)
    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: Value that represents the weight of the Adj-SID for
the purpose of load balancing.
    """
    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="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """weight 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="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__weight = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_weight(self):
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)

  value = __builtin__.property(_get_value)
  flags = __builtin__.property(_get_flags)
  weight = __builtin__.property(_get_weight)


  _pyangbind_elements = OrderedDict([('value', value), ('flags', flags), ('weight', weight), ])


class yc_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency-sids/adjacency-sid. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Adjacency Segment-IDs List. An IGP-Adjacency Segment is
an IGP segment attached to a unidirectional adjacency or
a set of unidirectional adjacencies. By default, an IGP-
Adjacency Segment is local to the node which advertises
it.
  """
  __slots__ = ('_path_helper', '_extmethods', '__value','__state',)

  _yang_name = 'adjacency-sid'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__value = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'adjacency-sids', 'adjacency-sid']

  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid/value (leafref)

    YANG Description: Reference to the value of the Adjacency-SID.
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid/value (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: Reference to the value of the Adjacency-SID.
    """
    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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid/state (container)

    YANG Description: State parameters of Adjacency-SID.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid/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 parameters of Adjacency-SID.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  value = __builtin__.property(_get_value)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('value', value), ('state', state), ])


class yc_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency-sids. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines segment routing adjacency SIDs.
  """
  __slots__ = ('_path_helper', '_extmethods', '__adjacency_sid',)

  _yang_name = 'adjacency-sids'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__adjacency_sid = YANGDynClass(base=YANGListType("value",yc_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid, yang_name="adjacency-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="adjacency-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'adjacency-sids']

  def _get_adjacency_sid(self):
    """
    Getter method for adjacency_sid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid (list)

    YANG Description: Adjacency Segment-IDs List. An IGP-Adjacency Segment is
an IGP segment attached to a unidirectional adjacency or
a set of unidirectional adjacencies. By default, an IGP-
Adjacency Segment is local to the node which advertises
it.
    """
    return self.__adjacency_sid
      
  def _set_adjacency_sid(self, v, load=False):
    """
    Setter method for adjacency_sid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adjacency_sid is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adjacency_sid() directly.

    YANG Description: Adjacency Segment-IDs List. An IGP-Adjacency Segment is
an IGP segment attached to a unidirectional adjacency or
a set of unidirectional adjacencies. By default, an IGP-
Adjacency Segment is local to the node which advertises
it.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("value",yc_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid, yang_name="adjacency-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="adjacency-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adjacency_sid must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("value",yc_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid, yang_name="adjacency-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="adjacency-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__adjacency_sid = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adjacency_sid(self):
    self.__adjacency_sid = YANGDynClass(base=YANGListType("value",yc_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid, yang_name="adjacency-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="adjacency-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  adjacency_sid = __builtin__.property(_get_adjacency_sid)


  _pyangbind_elements = OrderedDict([('adjacency_sid', adjacency_sid), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids_lan_adjacency_sid_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan-adjacency-sids/lan-adjacency-sid/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of LAN Adjacency-SID.
  """
  __slots__ = ('_path_helper', '_extmethods', '__value','__flags','__weight','__neighbor_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ADDRESS_FAMILY': {}, 'BACKUP': {}, 'VALUE': {}, 'LOCAL': {}, 'SET': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__neighbor_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="neighbor-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'lan-adjacency-sids', 'lan-adjacency-sid', 'state']

  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/state/value (uint32)

    YANG Description: LAN Adjacency-SID value.
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/state/value (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: LAN Adjacency-SID value.
    """
    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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value 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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_flags(self):
    """
    Getter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/state/flags (enumeration)

    YANG Description: Flags associated with LAN-Adj-Segment-ID.
    """
    return self.__flags
      
  def _set_flags(self, v, load=False):
    """
    Setter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/state/flags (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flags() directly.

    YANG Description: Flags associated with LAN-Adj-Segment-ID.
    """
    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={'ADDRESS_FAMILY': {}, 'BACKUP': {}, 'VALUE': {}, 'LOCAL': {}, 'SET': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flags must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ADDRESS_FAMILY': {}, 'BACKUP': {}, 'VALUE': {}, 'LOCAL': {}, 'SET': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_flags(self):
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ADDRESS_FAMILY': {}, 'BACKUP': {}, 'VALUE': {}, 'LOCAL': {}, 'SET': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_weight(self):
    """
    Getter method for weight, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/state/weight (uint8)

    YANG Description: Value that represents the weight of the Adj-SID
for the purpose of load balancing.
    """
    return self.__weight
      
  def _set_weight(self, v, load=False):
    """
    Setter method for weight, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/state/weight (uint8)
    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: Value that represents the weight of the Adj-SID
for the purpose of load balancing.
    """
    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="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """weight 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="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__weight = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_weight(self):
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_neighbor_id(self):
    """
    Getter method for neighbor_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/state/neighbor_id (oc-isis-types:system-id)

    YANG Description: System ID of the neighbor associated with the LAN-
Adj-Segment-ID value.
    """
    return self.__neighbor_id
      
  def _set_neighbor_id(self, v, load=False):
    """
    Setter method for neighbor_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/state/neighbor_id (oc-isis-types:system-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor_id() directly.

    YANG Description: System ID of the neighbor associated with the LAN-
Adj-Segment-ID value.
    """
    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]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="neighbor-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor_id must be of a type compatible with oc-isis-types:system-id""",
          'defined-type': "oc-isis-types:system-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="neighbor-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)""",
        })

    self.__neighbor_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor_id(self):
    self.__neighbor_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="neighbor-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)

  value = __builtin__.property(_get_value)
  flags = __builtin__.property(_get_flags)
  weight = __builtin__.property(_get_weight)
  neighbor_id = __builtin__.property(_get_neighbor_id)


  _pyangbind_elements = OrderedDict([('value', value), ('flags', flags), ('weight', weight), ('neighbor_id', neighbor_id), ])


class yc_lan_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids_lan_adjacency_sid(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan-adjacency-sids/lan-adjacency-sid. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Adjacency Segment-IDs List. An IGP-Adjacency Segment is
an IGP segment attached to a unidirectional adjacency or
a set of unidirectional adjacencies. By default, an IGP-
Adjacency Segment is local to the node which advertises
it.
  """
  __slots__ = ('_path_helper', '_extmethods', '__value','__state',)

  _yang_name = 'lan-adjacency-sid'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__value = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids_lan_adjacency_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'lan-adjacency-sids', 'lan-adjacency-sid']

  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/value (leafref)

    YANG Description: Reference to the value of the LAN Adjacency-SID.
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/value (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: Reference to the value of the LAN Adjacency-SID.
    """
    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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/state (container)

    YANG Description: State parameters of LAN Adjacency-SID.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/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 parameters of LAN Adjacency-SID.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids_lan_adjacency_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids_lan_adjacency_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids_lan_adjacency_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  value = __builtin__.property(_get_value)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('value', value), ('state', state), ])


class yc_lan_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan-adjacency-sids. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines segment routing LAN adjacency
SIDs
  """
  __slots__ = ('_path_helper', '_extmethods', '__lan_adjacency_sid',)

  _yang_name = 'lan-adjacency-sids'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__lan_adjacency_sid = YANGDynClass(base=YANGListType("value",yc_lan_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids_lan_adjacency_sid, yang_name="lan-adjacency-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="lan-adjacency-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'lan-adjacency-sids']

  def _get_lan_adjacency_sid(self):
    """
    Getter method for lan_adjacency_sid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid (list)

    YANG Description: Adjacency Segment-IDs List. An IGP-Adjacency Segment is
an IGP segment attached to a unidirectional adjacency or
a set of unidirectional adjacencies. By default, an IGP-
Adjacency Segment is local to the node which advertises
it.
    """
    return self.__lan_adjacency_sid
      
  def _set_lan_adjacency_sid(self, v, load=False):
    """
    Setter method for lan_adjacency_sid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lan_adjacency_sid is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lan_adjacency_sid() directly.

    YANG Description: Adjacency Segment-IDs List. An IGP-Adjacency Segment is
an IGP segment attached to a unidirectional adjacency or
a set of unidirectional adjacencies. By default, an IGP-
Adjacency Segment is local to the node which advertises
it.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("value",yc_lan_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids_lan_adjacency_sid, yang_name="lan-adjacency-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="lan-adjacency-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lan_adjacency_sid must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("value",yc_lan_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids_lan_adjacency_sid, yang_name="lan-adjacency-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="lan-adjacency-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__lan_adjacency_sid = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lan_adjacency_sid(self):
    self.__lan_adjacency_sid = YANGDynClass(base=YANGListType("value",yc_lan_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids_lan_adjacency_sid, yang_name="lan-adjacency-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="lan-adjacency-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  lan_adjacency_sid = __builtin__.property(_get_lan_adjacency_sid)


  _pyangbind_elements = OrderedDict([('lan_adjacency_sid', lan_adjacency_sid), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-delay/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS Extended Reachability sub-TLV
33.
  """
  __slots__ = ('_path_helper', '_extmethods', '__a_bit','__delay',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__a_bit = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-delay', 'state']

  def _get_a_bit(self):
    """
    Getter method for a_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay/state/a_bit (boolean)

    YANG Description: The A bit is set when the measured value of this parameter
exceeds its configured maximum threshold. The A bit is cleared
when the measured value falls below its configured reuse
threshold.
    """
    return self.__a_bit
      
  def _set_a_bit(self, v, load=False):
    """
    Setter method for a_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay/state/a_bit (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_a_bit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_a_bit() directly.

    YANG Description: The A bit is set when the measured value of this parameter
exceeds its configured maximum threshold. The A bit is cleared
when the measured value falls below its configured reuse
threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """a_bit must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__a_bit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_a_bit(self):
    self.__a_bit = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_delay(self):
    """
    Getter method for delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay/state/delay (uint32)

    YANG Description: Average link delay value (in microseconds) between
two directly connected IS-IS neighbors over a
configurable interval.
    """
    return self.__delay
      
  def _set_delay(self, v, load=False):
    """
    Setter method for delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay/state/delay (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_delay() directly.

    YANG Description: Average link delay value (in microseconds) between
two directly connected IS-IS neighbors over a
configurable interval.
    """
    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="delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """delay 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="delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_delay(self):
    self.__delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  a_bit = __builtin__.property(_get_a_bit)
  delay = __builtin__.property(_get_delay)


  _pyangbind_elements = OrderedDict([('a_bit', a_bit), ('delay', delay), ])


class yc_link_delay_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-delay. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines unidirectional link delay.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'link-delay'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-delay']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay/state (container)

    YANG Description: State parameters of IS Extended Reachability sub-TLV
33.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay/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 parameters of IS Extended Reachability sub-TLV
33.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_min_max_link_delay_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/min-max-link-delay/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS Extended Reachability sub-TLV
34.
  """
  __slots__ = ('_path_helper', '_extmethods', '__a_bit','__min_delay','__max_delay',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__a_bit = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__min_delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="min-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__max_delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'min-max-link-delay', 'state']

  def _get_a_bit(self):
    """
    Getter method for a_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/min_max_link_delay/state/a_bit (boolean)

    YANG Description: The A bit is set when the measured value of this parameter
exceeds its configured maximum threshold. The A bit is cleared
when the measured value falls below its configured reuse
threshold.
    """
    return self.__a_bit
      
  def _set_a_bit(self, v, load=False):
    """
    Setter method for a_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/min_max_link_delay/state/a_bit (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_a_bit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_a_bit() directly.

    YANG Description: The A bit is set when the measured value of this parameter
exceeds its configured maximum threshold. The A bit is cleared
when the measured value falls below its configured reuse
threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """a_bit must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__a_bit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_a_bit(self):
    self.__a_bit = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_min_delay(self):
    """
    Getter method for min_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/min_max_link_delay/state/min_delay (uint32)

    YANG Description: Minimum measured link delay value(in microseconds)
between two directly connected IS-IS neighbors over a
configurable interval.
    """
    return self.__min_delay
      
  def _set_min_delay(self, v, load=False):
    """
    Setter method for min_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/min_max_link_delay/state/min_delay (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_delay() directly.

    YANG Description: Minimum measured link delay value(in microseconds)
between two directly connected IS-IS neighbors over a
configurable interval.
    """
    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="min-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_delay 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="min-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__min_delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_min_delay(self):
    self.__min_delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="min-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_max_delay(self):
    """
    Getter method for max_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/min_max_link_delay/state/max_delay (uint32)

    YANG Description: Maximum measured link delay value(in microseconds)
between two directly connected IS-IS neighbors over a
configurable interval.
    """
    return self.__max_delay
      
  def _set_max_delay(self, v, load=False):
    """
    Setter method for max_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/min_max_link_delay/state/max_delay (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_delay() directly.

    YANG Description: Maximum measured link delay value(in microseconds)
between two directly connected IS-IS neighbors over a
configurable interval.
    """
    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-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_delay 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-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_delay(self):
    self.__max_delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  a_bit = __builtin__.property(_get_a_bit)
  min_delay = __builtin__.property(_get_min_delay)
  max_delay = __builtin__.property(_get_max_delay)


  _pyangbind_elements = OrderedDict([('a_bit', a_bit), ('min_delay', min_delay), ('max_delay', max_delay), ])


class yc_min_max_link_delay_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_min_max_link_delay(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/min-max-link-delay. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines min/max link delay.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'min-max-link-delay'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_min_max_link_delay_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'min-max-link-delay']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/min_max_link_delay/state (container)

    YANG Description: State parameters of IS Extended Reachability sub-TLV
34.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/min_max_link_delay/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 parameters of IS Extended Reachability sub-TLV
34.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_min_max_link_delay_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_min_max_link_delay_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_min_max_link_delay_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_variation_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-delay-variation/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS Extended Reachability sub-TLV
35.
  """
  __slots__ = ('_path_helper', '_extmethods', '__delay',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-delay-variation', 'state']

  def _get_delay(self):
    """
    Getter method for delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay_variation/state/delay (uint32)

    YANG Description: Average link delay between two directly connected IS-
IS neighbors over a configurable interval.
    """
    return self.__delay
      
  def _set_delay(self, v, load=False):
    """
    Setter method for delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay_variation/state/delay (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_delay() directly.

    YANG Description: Average link delay between two directly connected IS-
IS neighbors over a configurable interval.
    """
    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="delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """delay 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="delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_delay(self):
    self.__delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  delay = __builtin__.property(_get_delay)


  _pyangbind_elements = OrderedDict([('delay', delay), ])


class yc_link_delay_variation_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_variation(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-delay-variation. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines unidirectional link delay
variation.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'link-delay-variation'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_variation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-delay-variation']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay_variation/state (container)

    YANG Description: State parameters of IS Extended Reachability sub-TLV
35.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay_variation/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 parameters of IS Extended Reachability sub-TLV
35.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_variation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_variation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_variation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_loss_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-loss/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS Extended Reachability sub-TLV
36.
  """
  __slots__ = ('_path_helper', '_extmethods', '__a_bit','__link_loss',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__a_bit = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__link_loss = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="link-loss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-loss', 'state']

  def _get_a_bit(self):
    """
    Getter method for a_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_loss/state/a_bit (boolean)

    YANG Description: The A bit is set when the measured value of this parameter
exceeds its configured maximum threshold. The A bit is cleared
when the measured value falls below its configured reuse
threshold.
    """
    return self.__a_bit
      
  def _set_a_bit(self, v, load=False):
    """
    Setter method for a_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_loss/state/a_bit (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_a_bit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_a_bit() directly.

    YANG Description: The A bit is set when the measured value of this parameter
exceeds its configured maximum threshold. The A bit is cleared
when the measured value falls below its configured reuse
threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """a_bit must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__a_bit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_a_bit(self):
    self.__a_bit = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_link_loss(self):
    """
    Getter method for link_loss, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_loss/state/link_loss (uint32)

    YANG Description: Link packet loss as a percentage of the total traffic
sent over a configurable interval. The basic unit is
0.000003%, where (2^24 - 2) is 50.331642%. This value
is the highest packet-loss percentage that can be
expressed (the assumption being that precision is more
important on high-speed links than the ability to
advertise loss rates greater than this, and that high-
speed links with over 50% loss are unusable).
Therefore, measured values that are larger than the
field maximum SHOULD be encoded as the maximum
value.
    """
    return self.__link_loss
      
  def _set_link_loss(self, v, load=False):
    """
    Setter method for link_loss, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_loss/state/link_loss (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_loss is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_loss() directly.

    YANG Description: Link packet loss as a percentage of the total traffic
sent over a configurable interval. The basic unit is
0.000003%, where (2^24 - 2) is 50.331642%. This value
is the highest packet-loss percentage that can be
expressed (the assumption being that precision is more
important on high-speed links than the ability to
advertise loss rates greater than this, and that high-
speed links with over 50% loss are unusable).
Therefore, measured values that are larger than the
field maximum SHOULD be encoded as the maximum
value.
    """
    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="link-loss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_loss 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="link-loss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__link_loss = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_loss(self):
    self.__link_loss = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="link-loss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  a_bit = __builtin__.property(_get_a_bit)
  link_loss = __builtin__.property(_get_link_loss)


  _pyangbind_elements = OrderedDict([('a_bit', a_bit), ('link_loss', link_loss), ])


class yc_link_loss_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_loss(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-loss. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines unidirectional link loss delay.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'link-loss'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_loss_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-loss']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_loss/state (container)

    YANG Description: State parameters of IS Extended Reachability sub-TLV
36.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_loss/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 parameters of IS Extended Reachability sub-TLV
36.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_loss_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_loss_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_loss_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_residual_bandwidth_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/residual-bandwidth/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS Extended Reachability sub-TLV
37.
  """
  __slots__ = ('_path_helper', '_extmethods', '__bandwidth',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'residual-bandwidth', 'state']

  def _get_bandwidth(self):
    """
    Getter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/residual_bandwidth/state/bandwidth (oc-types:ieeefloat32)

    YANG Description: Residual bandwidth on a link,forwarding adjacency
[RFC4206], or bundled link in IEEE floating-point
format with units of bytes per second. For a link or
forwarding adjacency, residual bandwidth is defined to
be the Maximum Bandwidth [RFC5305] minus the bandwidth
currently allocated to RSVP-TE label switched paths.
For a bundled link, residual bandwidth is defined to
be the sum of the component link residual
bandwidths.
    """
    return self.__bandwidth
      
  def _set_bandwidth(self, v, load=False):
    """
    Setter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/residual_bandwidth/state/bandwidth (oc-types:ieeefloat32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth() directly.

    YANG Description: Residual bandwidth on a link,forwarding adjacency
[RFC4206], or bundled link in IEEE floating-point
format with units of bytes per second. For a link or
forwarding adjacency, residual bandwidth is defined to
be the Maximum Bandwidth [RFC5305] minus the bandwidth
currently allocated to RSVP-TE label switched paths.
For a bundled link, residual bandwidth is defined to
be the sum of the component link residual
bandwidths.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth must be of a type compatible with oc-types:ieeefloat32""",
          'defined-type': "oc-types:ieeefloat32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)""",
        })

    self.__bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth(self):
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)

  bandwidth = __builtin__.property(_get_bandwidth)


  _pyangbind_elements = OrderedDict([('bandwidth', bandwidth), ])


class yc_residual_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_residual_bandwidth(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/residual-bandwidth. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines unidirectional residual
bandwidth.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'residual-bandwidth'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_residual_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'residual-bandwidth']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/residual_bandwidth/state (container)

    YANG Description: State parameters of IS Extended Reachability sub-TLV
37.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/residual_bandwidth/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 parameters of IS Extended Reachability sub-TLV
37.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_residual_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_residual_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_residual_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_available_bandwidth_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/available-bandwidth/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS Extended Reachability sub-TLV
38.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__bandwidth',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'available-bandwidth', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/available_bandwidth/state/type (identityref)

    YANG Description: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/available_bandwidth/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: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_bandwidth(self):
    """
    Getter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/available_bandwidth/state/bandwidth (oc-types:ieeefloat32)

    YANG Description: The available bandwidth on a link, forwarding
adjacency, or bundled link in IEEE floating-point
format with units of bytes per second. For a link or
forwarding adjacency, available bandwidth is defined
to be residual bandwidth minus the measured bandwidth
used for the actual forwarding of non-RSVP-TE label
switched path packets.  For a bundled link, available
bandwidth is defined to be the sum of the component
link available bandwidths minus the measured bandwidth
used for the actual forwarding of non-RSVP-TE label
switched path packets.  For a bundled link, available
bandwidth is defined to be the sum of the component
link available bandwidths.
    """
    return self.__bandwidth
      
  def _set_bandwidth(self, v, load=False):
    """
    Setter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/available_bandwidth/state/bandwidth (oc-types:ieeefloat32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth() directly.

    YANG Description: The available bandwidth on a link, forwarding
adjacency, or bundled link in IEEE floating-point
format with units of bytes per second. For a link or
forwarding adjacency, available bandwidth is defined
to be residual bandwidth minus the measured bandwidth
used for the actual forwarding of non-RSVP-TE label
switched path packets.  For a bundled link, available
bandwidth is defined to be the sum of the component
link available bandwidths minus the measured bandwidth
used for the actual forwarding of non-RSVP-TE label
switched path packets.  For a bundled link, available
bandwidth is defined to be the sum of the component
link available bandwidths.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth must be of a type compatible with oc-types:ieeefloat32""",
          'defined-type': "oc-types:ieeefloat32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)""",
        })

    self.__bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth(self):
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)

  type = __builtin__.property(_get_type)
  bandwidth = __builtin__.property(_get_bandwidth)


  _pyangbind_elements = OrderedDict([('type', type), ('bandwidth', bandwidth), ])


class yc_available_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_available_bandwidth(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/available-bandwidth. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines unidirectional lavailable
bandwidth.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'available-bandwidth'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_available_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'available-bandwidth']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/available_bandwidth/state (container)

    YANG Description: State parameters of IS Extended Reachability sub-TLV
38.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/available_bandwidth/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 parameters of IS Extended Reachability sub-TLV
38.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_available_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_available_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_available_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_utilized_bandwidth_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/utilized-bandwidth/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS Extended Reachability sub-TLV
39.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__bandwidth',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'utilized-bandwidth', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/utilized_bandwidth/state/type (identityref)

    YANG Description: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/utilized_bandwidth/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: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_bandwidth(self):
    """
    Getter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/utilized_bandwidth/state/bandwidth (oc-types:ieeefloat32)

    YANG Description: The bandwidth utilization on a link, forwarding
adjacency, or bundled link in IEEE floating-point
format with units of bytes per second.  For a link or
forwarding adjacency, bandwidth utilization represents
the actual utilization of the link (i.e., as measured
by the advertising node).  For a bundled link,
bandwidth utilization is defined to be the sum of the
component link bandwidth utilizations.
    """
    return self.__bandwidth
      
  def _set_bandwidth(self, v, load=False):
    """
    Setter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/utilized_bandwidth/state/bandwidth (oc-types:ieeefloat32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth() directly.

    YANG Description: The bandwidth utilization on a link, forwarding
adjacency, or bundled link in IEEE floating-point
format with units of bytes per second.  For a link or
forwarding adjacency, bandwidth utilization represents
the actual utilization of the link (i.e., as measured
by the advertising node).  For a bundled link,
bandwidth utilization is defined to be the sum of the
component link bandwidth utilizations.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth must be of a type compatible with oc-types:ieeefloat32""",
          'defined-type': "oc-types:ieeefloat32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)""",
        })

    self.__bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth(self):
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)

  type = __builtin__.property(_get_type)
  bandwidth = __builtin__.property(_get_bandwidth)


  _pyangbind_elements = OrderedDict([('type', type), ('bandwidth', bandwidth), ])


class yc_utilized_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_utilized_bandwidth(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/utilized-bandwidth. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines unidirectional utilized
bandwidth.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'utilized-bandwidth'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_utilized_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'utilized-bandwidth']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/utilized_bandwidth/state (container)

    YANG Description: State parameters of IS Extended Reachability sub-TLV
39.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/utilized_bandwidth/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 parameters of IS Extended Reachability sub-TLV
39.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_utilized_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_utilized_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_utilized_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs/subtlv. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of subTLV types in the LSDB for the specified TLV.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__state','__admin_group','__link_id','__ipv4_interface_address','__ipv4_neighbor_address','__max_link_bandwidth','__max_reservable_link_bandwidth','__unreserved_bandwidth','__ipv6_interface_address','__ipv6_neighbor_address','__extended_admin_group','__te_default_metric','__link_attributes','__link_protection_type','__bandwidth_constraints','__unconstrained_lsp','__adjacency_sids','__lan_adjacency_sids','__link_delay','__min_max_link_delay','__link_delay_variation','__link_loss','__residual_bandwidth','__available_bandwidth','__utilized_bandwidth',)

  _yang_name = 'subtlv'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__admin_group = YANGDynClass(base=yc_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_admin_group, is_container='container', yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__link_id = YANGDynClass(base=yc_link_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_id, is_container='container', yang_name="link-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ipv4_interface_address = YANGDynClass(base=yc_ipv4_interface_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_interface_address, is_container='container', yang_name="ipv4-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ipv4_neighbor_address = YANGDynClass(base=yc_ipv4_neighbor_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_neighbor_address, is_container='container', yang_name="ipv4-neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__max_link_bandwidth = YANGDynClass(base=yc_max_link_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_link_bandwidth, is_container='container', yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__max_reservable_link_bandwidth = YANGDynClass(base=yc_max_reservable_link_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_reservable_link_bandwidth, is_container='container', yang_name="max-reservable-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unreserved_bandwidth = YANGDynClass(base=yc_unreserved_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth, is_container='container', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ipv6_interface_address = YANGDynClass(base=yc_ipv6_interface_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_interface_address, is_container='container', yang_name="ipv6-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ipv6_neighbor_address = YANGDynClass(base=yc_ipv6_neighbor_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_neighbor_address, is_container='container', yang_name="ipv6-neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__extended_admin_group = YANGDynClass(base=yc_extended_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_extended_admin_group, is_container='container', yang_name="extended-admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__te_default_metric = YANGDynClass(base=yc_te_default_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_te_default_metric, is_container='container', yang_name="te-default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__link_attributes = YANGDynClass(base=yc_link_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_attributes, is_container='container', yang_name="link-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__link_protection_type = YANGDynClass(base=yc_link_protection_type_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_protection_type, is_container='container', yang_name="link-protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__bandwidth_constraints = YANGDynClass(base=yc_bandwidth_constraints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints, is_container='container', yang_name="bandwidth-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unconstrained_lsp = YANGDynClass(base=yc_unconstrained_lsp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_unconstrained_lsp, is_container='container', yang_name="unconstrained-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__adjacency_sids = YANGDynClass(base=yc_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids, is_container='container', yang_name="adjacency-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__lan_adjacency_sids = YANGDynClass(base=yc_lan_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids, is_container='container', yang_name="lan-adjacency-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__link_delay = YANGDynClass(base=yc_link_delay_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay, is_container='container', yang_name="link-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__min_max_link_delay = YANGDynClass(base=yc_min_max_link_delay_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_min_max_link_delay, is_container='container', yang_name="min-max-link-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__link_delay_variation = YANGDynClass(base=yc_link_delay_variation_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_variation, is_container='container', yang_name="link-delay-variation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__link_loss = YANGDynClass(base=yc_link_loss_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_loss, is_container='container', yang_name="link-loss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__residual_bandwidth = YANGDynClass(base=yc_residual_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_residual_bandwidth, is_container='container', yang_name="residual-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__available_bandwidth = YANGDynClass(base=yc_available_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_available_bandwidth, is_container='container', yang_name="available-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__utilized_bandwidth = YANGDynClass(base=yc_utilized_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_utilized_bandwidth, is_container='container', yang_name="utilized-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/type (leafref)

    YANG Description: Reference to the sub-TLV type.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/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 sub-TLV type.
    """
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/state (container)

    YANG Description: State parameters of IS neighbor state
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/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 parameters of IS neighbor state
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_admin_group(self):
    """
    Getter method for admin_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/admin_group (container)

    YANG Description: This container defines sub-TLV 3.
    """
    return self.__admin_group
      
  def _set_admin_group(self, v, load=False):
    """
    Setter method for admin_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/admin_group (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_admin_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_admin_group() directly.

    YANG Description: This container defines sub-TLV 3.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_admin_group, is_container='container', yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """admin_group must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_admin_group, is_container='container', yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__admin_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_admin_group(self):
    self.__admin_group = YANGDynClass(base=yc_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_admin_group, is_container='container', yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_link_id(self):
    """
    Getter method for link_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_id (container)

    YANG Description: This container defines sub-TLV 4.
    """
    return self.__link_id
      
  def _set_link_id(self, v, load=False):
    """
    Setter method for link_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_id (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_id() directly.

    YANG Description: This container defines sub-TLV 4.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_link_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_id, is_container='container', yang_name="link-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_id must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_link_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_id, is_container='container', yang_name="link-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__link_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_id(self):
    self.__link_id = YANGDynClass(base=yc_link_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_id, is_container='container', yang_name="link-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ipv4_interface_address(self):
    """
    Getter method for ipv4_interface_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_interface_address (container)

    YANG Description: This container defines sub-TLV 6.
    """
    return self.__ipv4_interface_address
      
  def _set_ipv4_interface_address(self, v, load=False):
    """
    Setter method for ipv4_interface_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_interface_address (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv4_interface_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv4_interface_address() directly.

    YANG Description: This container defines sub-TLV 6.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv4_interface_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_interface_address, is_container='container', yang_name="ipv4-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv4_interface_address must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv4_interface_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_interface_address, is_container='container', yang_name="ipv4-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ipv4_interface_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv4_interface_address(self):
    self.__ipv4_interface_address = YANGDynClass(base=yc_ipv4_interface_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_interface_address, is_container='container', yang_name="ipv4-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ipv4_neighbor_address(self):
    """
    Getter method for ipv4_neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_neighbor_address (container)

    YANG Description: This container defines sub-TLV 8.
    """
    return self.__ipv4_neighbor_address
      
  def _set_ipv4_neighbor_address(self, v, load=False):
    """
    Setter method for ipv4_neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_neighbor_address (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv4_neighbor_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv4_neighbor_address() directly.

    YANG Description: This container defines sub-TLV 8.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv4_neighbor_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_neighbor_address, is_container='container', yang_name="ipv4-neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv4_neighbor_address must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv4_neighbor_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_neighbor_address, is_container='container', yang_name="ipv4-neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ipv4_neighbor_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv4_neighbor_address(self):
    self.__ipv4_neighbor_address = YANGDynClass(base=yc_ipv4_neighbor_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_neighbor_address, is_container='container', yang_name="ipv4-neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_max_link_bandwidth(self):
    """
    Getter method for max_link_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_link_bandwidth (container)

    YANG Description: This container defines sub-TLV 9.
    """
    return self.__max_link_bandwidth
      
  def _set_max_link_bandwidth(self, v, load=False):
    """
    Setter method for max_link_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_link_bandwidth (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_link_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_link_bandwidth() directly.

    YANG Description: This container defines sub-TLV 9.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_max_link_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_link_bandwidth, is_container='container', yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_link_bandwidth must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_max_link_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_link_bandwidth, is_container='container', yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__max_link_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_link_bandwidth(self):
    self.__max_link_bandwidth = YANGDynClass(base=yc_max_link_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_link_bandwidth, is_container='container', yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_max_reservable_link_bandwidth(self):
    """
    Getter method for max_reservable_link_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_reservable_link_bandwidth (container)

    YANG Description: This container defines sub-TLV 10.
    """
    return self.__max_reservable_link_bandwidth
      
  def _set_max_reservable_link_bandwidth(self, v, load=False):
    """
    Setter method for max_reservable_link_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_reservable_link_bandwidth (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_reservable_link_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_reservable_link_bandwidth() directly.

    YANG Description: This container defines sub-TLV 10.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_max_reservable_link_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_reservable_link_bandwidth, is_container='container', yang_name="max-reservable-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_reservable_link_bandwidth must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_max_reservable_link_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_reservable_link_bandwidth, is_container='container', yang_name="max-reservable-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__max_reservable_link_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_reservable_link_bandwidth(self):
    self.__max_reservable_link_bandwidth = YANGDynClass(base=yc_max_reservable_link_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_reservable_link_bandwidth, is_container='container', yang_name="max-reservable-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unreserved_bandwidth(self):
    """
    Getter method for unreserved_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth (container)

    YANG Description: This container defines unreserved-bandwidth. The units
are bytes per second.
    """
    return self.__unreserved_bandwidth
      
  def _set_unreserved_bandwidth(self, v, load=False):
    """
    Setter method for unreserved_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unreserved_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unreserved_bandwidth() directly.

    YANG Description: This container defines unreserved-bandwidth. The units
are bytes per second.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unreserved_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth, is_container='container', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unreserved_bandwidth must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unreserved_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth, is_container='container', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unreserved_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unreserved_bandwidth(self):
    self.__unreserved_bandwidth = YANGDynClass(base=yc_unreserved_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth, is_container='container', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ipv6_interface_address(self):
    """
    Getter method for ipv6_interface_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_interface_address (container)

    YANG Description: This container defines sub-TLV 12.
    """
    return self.__ipv6_interface_address
      
  def _set_ipv6_interface_address(self, v, load=False):
    """
    Setter method for ipv6_interface_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_interface_address (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6_interface_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6_interface_address() directly.

    YANG Description: This container defines sub-TLV 12.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv6_interface_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_interface_address, is_container='container', yang_name="ipv6-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6_interface_address must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv6_interface_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_interface_address, is_container='container', yang_name="ipv6-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ipv6_interface_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6_interface_address(self):
    self.__ipv6_interface_address = YANGDynClass(base=yc_ipv6_interface_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_interface_address, is_container='container', yang_name="ipv6-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ipv6_neighbor_address(self):
    """
    Getter method for ipv6_neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_neighbor_address (container)

    YANG Description: This container defines sub-TLV 13.
    """
    return self.__ipv6_neighbor_address
      
  def _set_ipv6_neighbor_address(self, v, load=False):
    """
    Setter method for ipv6_neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_neighbor_address (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6_neighbor_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6_neighbor_address() directly.

    YANG Description: This container defines sub-TLV 13.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv6_neighbor_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_neighbor_address, is_container='container', yang_name="ipv6-neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6_neighbor_address must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv6_neighbor_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_neighbor_address, is_container='container', yang_name="ipv6-neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ipv6_neighbor_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6_neighbor_address(self):
    self.__ipv6_neighbor_address = YANGDynClass(base=yc_ipv6_neighbor_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_neighbor_address, is_container='container', yang_name="ipv6-neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_extended_admin_group(self):
    """
    Getter method for extended_admin_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/extended_admin_group (container)

    YANG Description: This container defines sub-TLV 14.
    """
    return self.__extended_admin_group
      
  def _set_extended_admin_group(self, v, load=False):
    """
    Setter method for extended_admin_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/extended_admin_group (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended_admin_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended_admin_group() directly.

    YANG Description: This container defines sub-TLV 14.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_extended_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_extended_admin_group, is_container='container', yang_name="extended-admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended_admin_group must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_extended_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_extended_admin_group, is_container='container', yang_name="extended-admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__extended_admin_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended_admin_group(self):
    self.__extended_admin_group = YANGDynClass(base=yc_extended_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_extended_admin_group, is_container='container', yang_name="extended-admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_te_default_metric(self):
    """
    Getter method for te_default_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/te_default_metric (container)

    YANG Description: This container defines sub-TLV 18.
    """
    return self.__te_default_metric
      
  def _set_te_default_metric(self, v, load=False):
    """
    Setter method for te_default_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/te_default_metric (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_te_default_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_te_default_metric() directly.

    YANG Description: This container defines sub-TLV 18.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_te_default_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_te_default_metric, is_container='container', yang_name="te-default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """te_default_metric must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_te_default_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_te_default_metric, is_container='container', yang_name="te-default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__te_default_metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_te_default_metric(self):
    self.__te_default_metric = YANGDynClass(base=yc_te_default_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_te_default_metric, is_container='container', yang_name="te-default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_link_attributes(self):
    """
    Getter method for link_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_attributes (container)

    YANG Description: This container defines link-attributes.
    """
    return self.__link_attributes
      
  def _set_link_attributes(self, v, load=False):
    """
    Setter method for link_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_attributes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_attributes() directly.

    YANG Description: This container defines link-attributes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_link_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_attributes, is_container='container', yang_name="link-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_attributes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_link_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_attributes, is_container='container', yang_name="link-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__link_attributes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_attributes(self):
    self.__link_attributes = YANGDynClass(base=yc_link_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_attributes, is_container='container', yang_name="link-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_link_protection_type(self):
    """
    Getter method for link_protection_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_protection_type (container)

    YANG Description: ISIS LSDB parameters relating to the type of link
protection offered.
    """
    return self.__link_protection_type
      
  def _set_link_protection_type(self, v, load=False):
    """
    Setter method for link_protection_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_protection_type (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_protection_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_protection_type() directly.

    YANG Description: ISIS LSDB parameters relating to the type of link
protection offered.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_link_protection_type_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_protection_type, is_container='container', yang_name="link-protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_protection_type must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_link_protection_type_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_protection_type, is_container='container', yang_name="link-protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__link_protection_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_protection_type(self):
    self.__link_protection_type = YANGDynClass(base=yc_link_protection_type_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_protection_type, is_container='container', yang_name="link-protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_bandwidth_constraints(self):
    """
    Getter method for bandwidth_constraints, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints (container)

    YANG Description: This container defines bandwidth-constraints. For DS-TE,
the existing Maximum Reservable link bandwidth parameter
is retained, but its semantics is generalized and
interpreted as the aggregate bandwidth constraint across
all Class-Types
    """
    return self.__bandwidth_constraints
      
  def _set_bandwidth_constraints(self, v, load=False):
    """
    Setter method for bandwidth_constraints, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth_constraints is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth_constraints() directly.

    YANG Description: This container defines bandwidth-constraints. For DS-TE,
the existing Maximum Reservable link bandwidth parameter
is retained, but its semantics is generalized and
interpreted as the aggregate bandwidth constraint across
all Class-Types
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_bandwidth_constraints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints, is_container='container', yang_name="bandwidth-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth_constraints must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_bandwidth_constraints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints, is_container='container', yang_name="bandwidth-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__bandwidth_constraints = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth_constraints(self):
    self.__bandwidth_constraints = YANGDynClass(base=yc_bandwidth_constraints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints, is_container='container', yang_name="bandwidth-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unconstrained_lsp(self):
    """
    Getter method for unconstrained_lsp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/unconstrained_lsp (container)

    YANG Description: This container defines sub-TLV 23.
    """
    return self.__unconstrained_lsp
      
  def _set_unconstrained_lsp(self, v, load=False):
    """
    Setter method for unconstrained_lsp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/unconstrained_lsp (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unconstrained_lsp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unconstrained_lsp() directly.

    YANG Description: This container defines sub-TLV 23.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unconstrained_lsp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_unconstrained_lsp, is_container='container', yang_name="unconstrained-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unconstrained_lsp must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unconstrained_lsp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_unconstrained_lsp, is_container='container', yang_name="unconstrained-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unconstrained_lsp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unconstrained_lsp(self):
    self.__unconstrained_lsp = YANGDynClass(base=yc_unconstrained_lsp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_unconstrained_lsp, is_container='container', yang_name="unconstrained-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_adjacency_sids(self):
    """
    Getter method for adjacency_sids, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids (container)

    YANG Description: This container defines segment routing adjacency SIDs.
    """
    return self.__adjacency_sids
      
  def _set_adjacency_sids(self, v, load=False):
    """
    Setter method for adjacency_sids, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adjacency_sids is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adjacency_sids() directly.

    YANG Description: This container defines segment routing adjacency SIDs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids, is_container='container', yang_name="adjacency-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adjacency_sids must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids, is_container='container', yang_name="adjacency-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__adjacency_sids = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adjacency_sids(self):
    self.__adjacency_sids = YANGDynClass(base=yc_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids, is_container='container', yang_name="adjacency-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_lan_adjacency_sids(self):
    """
    Getter method for lan_adjacency_sids, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids (container)

    YANG Description: This container defines segment routing LAN adjacency
SIDs
    """
    return self.__lan_adjacency_sids
      
  def _set_lan_adjacency_sids(self, v, load=False):
    """
    Setter method for lan_adjacency_sids, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lan_adjacency_sids is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lan_adjacency_sids() directly.

    YANG Description: This container defines segment routing LAN adjacency
SIDs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_lan_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids, is_container='container', yang_name="lan-adjacency-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lan_adjacency_sids must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_lan_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids, is_container='container', yang_name="lan-adjacency-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__lan_adjacency_sids = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lan_adjacency_sids(self):
    self.__lan_adjacency_sids = YANGDynClass(base=yc_lan_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids, is_container='container', yang_name="lan-adjacency-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_link_delay(self):
    """
    Getter method for link_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay (container)

    YANG Description: This container defines unidirectional link delay.
    """
    return self.__link_delay
      
  def _set_link_delay(self, v, load=False):
    """
    Setter method for link_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_delay() directly.

    YANG Description: This container defines unidirectional link delay.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_link_delay_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay, is_container='container', yang_name="link-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_delay must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_link_delay_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay, is_container='container', yang_name="link-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__link_delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_delay(self):
    self.__link_delay = YANGDynClass(base=yc_link_delay_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay, is_container='container', yang_name="link-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_min_max_link_delay(self):
    """
    Getter method for min_max_link_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/min_max_link_delay (container)

    YANG Description: This container defines min/max link delay.
    """
    return self.__min_max_link_delay
      
  def _set_min_max_link_delay(self, v, load=False):
    """
    Setter method for min_max_link_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/min_max_link_delay (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_max_link_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_max_link_delay() directly.

    YANG Description: This container defines min/max link delay.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_min_max_link_delay_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_min_max_link_delay, is_container='container', yang_name="min-max-link-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_max_link_delay must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_min_max_link_delay_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_min_max_link_delay, is_container='container', yang_name="min-max-link-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__min_max_link_delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_min_max_link_delay(self):
    self.__min_max_link_delay = YANGDynClass(base=yc_min_max_link_delay_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_min_max_link_delay, is_container='container', yang_name="min-max-link-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_link_delay_variation(self):
    """
    Getter method for link_delay_variation, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay_variation (container)

    YANG Description: This container defines unidirectional link delay
variation.
    """
    return self.__link_delay_variation
      
  def _set_link_delay_variation(self, v, load=False):
    """
    Setter method for link_delay_variation, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay_variation (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_delay_variation is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_delay_variation() directly.

    YANG Description: This container defines unidirectional link delay
variation.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_link_delay_variation_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_variation, is_container='container', yang_name="link-delay-variation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_delay_variation must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_link_delay_variation_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_variation, is_container='container', yang_name="link-delay-variation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__link_delay_variation = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_delay_variation(self):
    self.__link_delay_variation = YANGDynClass(base=yc_link_delay_variation_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_variation, is_container='container', yang_name="link-delay-variation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_link_loss(self):
    """
    Getter method for link_loss, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_loss (container)

    YANG Description: This container defines unidirectional link loss delay.
    """
    return self.__link_loss
      
  def _set_link_loss(self, v, load=False):
    """
    Setter method for link_loss, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_loss (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_loss is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_loss() directly.

    YANG Description: This container defines unidirectional link loss delay.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_link_loss_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_loss, is_container='container', yang_name="link-loss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_loss must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_link_loss_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_loss, is_container='container', yang_name="link-loss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__link_loss = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_loss(self):
    self.__link_loss = YANGDynClass(base=yc_link_loss_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_loss, is_container='container', yang_name="link-loss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_residual_bandwidth(self):
    """
    Getter method for residual_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/residual_bandwidth (container)

    YANG Description: This container defines unidirectional residual
bandwidth.
    """
    return self.__residual_bandwidth
      
  def _set_residual_bandwidth(self, v, load=False):
    """
    Setter method for residual_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/residual_bandwidth (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_residual_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_residual_bandwidth() directly.

    YANG Description: This container defines unidirectional residual
bandwidth.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_residual_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_residual_bandwidth, is_container='container', yang_name="residual-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """residual_bandwidth must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_residual_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_residual_bandwidth, is_container='container', yang_name="residual-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__residual_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_residual_bandwidth(self):
    self.__residual_bandwidth = YANGDynClass(base=yc_residual_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_residual_bandwidth, is_container='container', yang_name="residual-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_available_bandwidth(self):
    """
    Getter method for available_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/available_bandwidth (container)

    YANG Description: This container defines unidirectional lavailable
bandwidth.
    """
    return self.__available_bandwidth
      
  def _set_available_bandwidth(self, v, load=False):
    """
    Setter method for available_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/available_bandwidth (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_available_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_available_bandwidth() directly.

    YANG Description: This container defines unidirectional lavailable
bandwidth.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_available_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_available_bandwidth, is_container='container', yang_name="available-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """available_bandwidth must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_available_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_available_bandwidth, is_container='container', yang_name="available-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__available_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_available_bandwidth(self):
    self.__available_bandwidth = YANGDynClass(base=yc_available_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_available_bandwidth, is_container='container', yang_name="available-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_utilized_bandwidth(self):
    """
    Getter method for utilized_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/utilized_bandwidth (container)

    YANG Description: This container defines unidirectional utilized
bandwidth.
    """
    return self.__utilized_bandwidth
      
  def _set_utilized_bandwidth(self, v, load=False):
    """
    Setter method for utilized_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv/utilized_bandwidth (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_utilized_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_utilized_bandwidth() directly.

    YANG Description: This container defines unidirectional utilized
bandwidth.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_utilized_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_utilized_bandwidth, is_container='container', yang_name="utilized-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """utilized_bandwidth must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_utilized_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_utilized_bandwidth, is_container='container', yang_name="utilized-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__utilized_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_utilized_bandwidth(self):
    self.__utilized_bandwidth = YANGDynClass(base=yc_utilized_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv_utilized_bandwidth, is_container='container', yang_name="utilized-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  type = __builtin__.property(_get_type)
  state = __builtin__.property(_get_state)
  admin_group = __builtin__.property(_get_admin_group)
  link_id = __builtin__.property(_get_link_id)
  ipv4_interface_address = __builtin__.property(_get_ipv4_interface_address)
  ipv4_neighbor_address = __builtin__.property(_get_ipv4_neighbor_address)
  max_link_bandwidth = __builtin__.property(_get_max_link_bandwidth)
  max_reservable_link_bandwidth = __builtin__.property(_get_max_reservable_link_bandwidth)
  unreserved_bandwidth = __builtin__.property(_get_unreserved_bandwidth)
  ipv6_interface_address = __builtin__.property(_get_ipv6_interface_address)
  ipv6_neighbor_address = __builtin__.property(_get_ipv6_neighbor_address)
  extended_admin_group = __builtin__.property(_get_extended_admin_group)
  te_default_metric = __builtin__.property(_get_te_default_metric)
  link_attributes = __builtin__.property(_get_link_attributes)
  link_protection_type = __builtin__.property(_get_link_protection_type)
  bandwidth_constraints = __builtin__.property(_get_bandwidth_constraints)
  unconstrained_lsp = __builtin__.property(_get_unconstrained_lsp)
  adjacency_sids = __builtin__.property(_get_adjacency_sids)
  lan_adjacency_sids = __builtin__.property(_get_lan_adjacency_sids)
  link_delay = __builtin__.property(_get_link_delay)
  min_max_link_delay = __builtin__.property(_get_min_max_link_delay)
  link_delay_variation = __builtin__.property(_get_link_delay_variation)
  link_loss = __builtin__.property(_get_link_loss)
  residual_bandwidth = __builtin__.property(_get_residual_bandwidth)
  available_bandwidth = __builtin__.property(_get_available_bandwidth)
  utilized_bandwidth = __builtin__.property(_get_utilized_bandwidth)


  _pyangbind_elements = OrderedDict([('type', type), ('state', state), ('admin_group', admin_group), ('link_id', link_id), ('ipv4_interface_address', ipv4_interface_address), ('ipv4_neighbor_address', ipv4_neighbor_address), ('max_link_bandwidth', max_link_bandwidth), ('max_reservable_link_bandwidth', max_reservable_link_bandwidth), ('unreserved_bandwidth', unreserved_bandwidth), ('ipv6_interface_address', ipv6_interface_address), ('ipv6_neighbor_address', ipv6_neighbor_address), ('extended_admin_group', extended_admin_group), ('te_default_metric', te_default_metric), ('link_attributes', link_attributes), ('link_protection_type', link_protection_type), ('bandwidth_constraints', bandwidth_constraints), ('unconstrained_lsp', unconstrained_lsp), ('adjacency_sids', adjacency_sids), ('lan_adjacency_sids', lan_adjacency_sids), ('link_delay', link_delay), ('min_max_link_delay', min_max_link_delay), ('link_delay_variation', link_delay_variation), ('link_loss', link_loss), ('residual_bandwidth', residual_bandwidth), ('available_bandwidth', available_bandwidth), ('utilized_bandwidth', utilized_bandwidth), ])


class yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/subtlvs. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container describes IS Neighbor sub-TLVs.
  """
  __slots__ = ('_path_helper', '_extmethods', '__subtlv',)

  _yang_name = 'subtlvs'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__subtlv = YANGDynClass(base=YANGListType("type",yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv, yang_name="subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs']

  def _get_subtlv(self):
    """
    Getter method for subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv (list)

    YANG Description: List of subTLV types in the LSDB for the specified TLV.
    """
    return self.__subtlv
      
  def _set_subtlv(self, v, load=False):
    """
    Setter method for subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs/subtlv (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_subtlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_subtlv() directly.

    YANG Description: List of subTLV types in the LSDB for the specified TLV.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("type",yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv, yang_name="subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """subtlv must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("type",yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv, yang_name="subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__subtlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_subtlv(self):
    self.__subtlv = YANGDynClass(base=YANGListType("type",yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs_subtlv, yang_name="subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  subtlv = __builtin__.property(_get_subtlv)


  _pyangbind_elements = OrderedDict([('subtlv', subtlv), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_undefined_subtlvs_undefined_subtlv_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/undefined-subtlvs/undefined-subtlv/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of the undefined sub-TLV.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__length','__value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__value = YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'undefined-subtlvs', 'undefined-subtlv', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv/state/type (uint8)

    YANG Description: TLV Type.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv/state/type (uint8)
    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: TLV Type.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with uint8""",
          'defined-type': "uint8",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_length(self):
    """
    Getter method for length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv/state/length (uint8)

    YANG Description: TLV length.
    """
    return self.__length
      
  def _set_length(self, v, load=False):
    """
    Setter method for length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv/state/length (uint8)
    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: TLV length.
    """
    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="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """length 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="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', 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..255']}, int_size=8), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv/state/value (binary)

    YANG Description: TLV value.
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv/state/value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: TLV value.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  type = __builtin__.property(_get_type)
  length = __builtin__.property(_get_length)
  value = __builtin__.property(_get_value)


  _pyangbind_elements = OrderedDict([('type', type), ('length', length), ('value', value), ])


class yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_undefined_subtlvs_undefined_subtlv(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/undefined-subtlvs/undefined-subtlv. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Sub-TLVs that are not defined in the model or not
recognised by system.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__state',)

  _yang_name = 'undefined-subtlv'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_undefined_subtlvs_undefined_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'undefined-subtlvs', 'undefined-subtlv']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv/type (leafref)

    YANG Description: Reference to the type of the undefined sub-TLV
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv/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 type of the undefined sub-TLV
    """
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv/state (container)

    YANG Description: State parameters of the undefined sub-TLV.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv/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 parameters of the undefined sub-TLV.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_undefined_subtlvs_undefined_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_undefined_subtlvs_undefined_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_undefined_subtlvs_undefined_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  type = __builtin__.property(_get_type)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('type', type), ('state', state), ])


class yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_undefined_subtlvs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance/undefined-subtlvs. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container describes undefined ISIS TLVs.
  """
  __slots__ = ('_path_helper', '_extmethods', '__undefined_subtlv',)

  _yang_name = 'undefined-subtlvs'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__undefined_subtlv = YANGDynClass(base=YANGListType("type",yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_undefined_subtlvs_undefined_subtlv, yang_name="undefined-subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="undefined-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance', 'undefined-subtlvs']

  def _get_undefined_subtlv(self):
    """
    Getter method for undefined_subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv (list)

    YANG Description: Sub-TLVs that are not defined in the model or not
recognised by system.
    """
    return self.__undefined_subtlv
      
  def _set_undefined_subtlv(self, v, load=False):
    """
    Setter method for undefined_subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_undefined_subtlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_undefined_subtlv() directly.

    YANG Description: Sub-TLVs that are not defined in the model or not
recognised by system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("type",yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_undefined_subtlvs_undefined_subtlv, yang_name="undefined-subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="undefined-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """undefined_subtlv must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("type",yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_undefined_subtlvs_undefined_subtlv, yang_name="undefined-subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="undefined-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__undefined_subtlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_undefined_subtlv(self):
    self.__undefined_subtlv = YANGDynClass(base=YANGListType("type",yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_undefined_subtlvs_undefined_subtlv, yang_name="undefined-subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="undefined-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  undefined_subtlv = __builtin__.property(_get_undefined_subtlv)


  _pyangbind_elements = OrderedDict([('undefined_subtlv', undefined_subtlv), ])


class yc_instance_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances/instance. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Instance of TLV-222 between the originating
and remote IS.
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__state','__subtlvs','__undefined_subtlvs',)

  _yang_name = 'instance'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__subtlvs = YANGDynClass(base=yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs, is_container='container', yang_name="subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__undefined_subtlvs = YANGDynClass(base=yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_undefined_subtlvs, is_container='container', yang_name="undefined-subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances', 'instance']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/id (leafref)

    YANG Description: Reference to the unique identifier for the
instance of the multi-topology IS neighbor
TLV instance.
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/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 the unique identifier for the
instance of the multi-topology IS neighbor
TLV instance.
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/state (container)

    YANG Description: State parameters of MT neighbor.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/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 parameters of MT neighbor.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_subtlvs(self):
    """
    Getter method for subtlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs (container)

    YANG Description: This container describes IS Neighbor sub-TLVs.
    """
    return self.__subtlvs
      
  def _set_subtlvs(self, v, load=False):
    """
    Setter method for subtlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/subtlvs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_subtlvs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_subtlvs() directly.

    YANG Description: This container describes IS Neighbor sub-TLVs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs, is_container='container', yang_name="subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """subtlvs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs, is_container='container', yang_name="subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__subtlvs = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_subtlvs(self):
    self.__subtlvs = YANGDynClass(base=yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_subtlvs, is_container='container', yang_name="subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_undefined_subtlvs(self):
    """
    Getter method for undefined_subtlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/undefined_subtlvs (container)

    YANG Description: This container describes undefined ISIS TLVs.
    """
    return self.__undefined_subtlvs
      
  def _set_undefined_subtlvs(self, v, load=False):
    """
    Setter method for undefined_subtlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance/undefined_subtlvs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_undefined_subtlvs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_undefined_subtlvs() directly.

    YANG Description: This container describes undefined ISIS TLVs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_undefined_subtlvs, is_container='container', yang_name="undefined-subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """undefined_subtlvs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_undefined_subtlvs, is_container='container', yang_name="undefined-subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__undefined_subtlvs = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_undefined_subtlvs(self):
    self.__undefined_subtlvs = YANGDynClass(base=yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance_undefined_subtlvs, is_container='container', yang_name="undefined-subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  id = __builtin__.property(_get_id)
  state = __builtin__.property(_get_state)
  subtlvs = __builtin__.property(_get_subtlvs)
  undefined_subtlvs = __builtin__.property(_get_undefined_subtlvs)


  _pyangbind_elements = OrderedDict([('id', id), ('state', state), ('subtlvs', subtlvs), ('undefined_subtlvs', undefined_subtlvs), ])


class yc_instances_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor/instances. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This list contains all instances of an adjacency
between the originating and remote IS. Multiple
instances are used to indicate where there are
parallel adjacencies between systems.
  """
  __slots__ = ('_path_helper', '_extmethods', '__instance',)

  _yang_name = 'instances'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__instance = YANGDynClass(base=YANGListType("id",yc_instance_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance, yang_name="instance", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor', 'instances']

  def _get_instance(self):
    """
    Getter method for instance, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance (list)

    YANG Description: Instance of TLV-222 between the originating
and remote IS.
    """
    return self.__instance
      
  def _set_instance(self, v, load=False):
    """
    Setter method for instance, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances/instance (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_instance is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_instance() directly.

    YANG Description: Instance of TLV-222 between the originating
and remote IS.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("id",yc_instance_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance, yang_name="instance", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """instance must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("id",yc_instance_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance, yang_name="instance", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__instance = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_instance(self):
    self.__instance = YANGDynClass(base=YANGListType("id",yc_instance_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances_instance, yang_name="instance", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  instance = __builtin__.property(_get_instance)


  _pyangbind_elements = OrderedDict([('instance', instance), ])


class yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors/neighbor. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container describes IS neighbors.
  """
  __slots__ = ('_path_helper', '_extmethods', '__mt_id','__system_id','__state','__instances',)

  _yang_name = 'neighbor'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__mt_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mt-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__system_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__instances = YANGDynClass(base=yc_instances_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances, is_container='container', yang_name="instances", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors', 'neighbor']

  def _get_mt_id(self):
    """
    Getter method for mt_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/mt_id (leafref)

    YANG Description: Reference to the topology that the neighbor is
within.
    """
    return self.__mt_id
      
  def _set_mt_id(self, v, load=False):
    """
    Setter method for mt_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/mt_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mt_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mt_id() directly.

    YANG Description: Reference to the topology that the neighbor is
within.
    """
    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="mt-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mt_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mt-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__mt_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mt_id(self):
    self.__mt_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mt-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_system_id(self):
    """
    Getter method for system_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/system_id (leafref)

    YANG Description: Reference to the System ID of the neighbor.
    """
    return self.__system_id
      
  def _set_system_id(self, v, load=False):
    """
    Setter method for system_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/system_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_system_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_system_id() directly.

    YANG Description: Reference to the System ID of the neighbor.
    """
    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="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """system_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__system_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_system_id(self):
    self.__system_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/state (container)

    YANG Description: Operational state parameters related to the
MT ISN TLV.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/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 related to the
MT ISN TLV.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_instances(self):
    """
    Getter method for instances, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances (container)

    YANG Description: This list contains all instances of an adjacency
between the originating and remote IS. Multiple
instances are used to indicate where there are
parallel adjacencies between systems.
    """
    return self.__instances
      
  def _set_instances(self, v, load=False):
    """
    Setter method for instances, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/instances (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_instances is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_instances() directly.

    YANG Description: This list contains all instances of an adjacency
between the originating and remote IS. Multiple
instances are used to indicate where there are
parallel adjacencies between systems.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_instances_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances, is_container='container', yang_name="instances", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """instances must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_instances_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances, is_container='container', yang_name="instances", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__instances = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_instances(self):
    self.__instances = YANGDynClass(base=yc_instances_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor_instances, is_container='container', yang_name="instances", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  mt_id = __builtin__.property(_get_mt_id)
  system_id = __builtin__.property(_get_system_id)
  state = __builtin__.property(_get_state)
  instances = __builtin__.property(_get_instances)


  _pyangbind_elements = OrderedDict([('mt_id', mt_id), ('system_id', system_id), ('state', state), ('instances', instances), ])


class yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn/neighbors. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: MT-IS neigbor attributes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__neighbor',)

  _yang_name = 'neighbors'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__neighbor = YANGDynClass(base=YANGListType("mt_id system_id",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mt-id system-id', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn', 'neighbors']

  def _get_neighbor(self):
    """
    Getter method for neighbor, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor (list)

    YANG Description: This container describes IS neighbors.
    """
    return self.__neighbor
      
  def _set_neighbor(self, v, load=False):
    """
    Setter method for neighbor, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor() directly.

    YANG Description: This container describes IS neighbors.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("mt_id system_id",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mt-id system-id', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("mt_id system_id",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mt-id system-id', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__neighbor = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor(self):
    self.__neighbor = YANGDynClass(base=YANGListType("mt_id system_id",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mt-id system-id', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  neighbor = __builtin__.property(_get_neighbor)


  _pyangbind_elements = OrderedDict([('neighbor', neighbor), ])


class yc_mt_isn_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isn. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines list of ISIS multi-topology
neighbors.
  """
  __slots__ = ('_path_helper', '_extmethods', '__neighbors',)

  _yang_name = 'mt-isn'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__neighbors = YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isn']

  def _get_neighbors(self):
    """
    Getter method for neighbors, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors (container)

    YANG Description: MT-IS neigbor attributes.
    """
    return self.__neighbors
      
  def _set_neighbors(self, v, load=False):
    """
    Setter method for neighbors, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbors is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbors() directly.

    YANG Description: MT-IS neigbor attributes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbors must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__neighbors = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbors(self):
    self.__neighbors = YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  neighbors = __builtin__.property(_get_neighbors)


  _pyangbind_elements = OrderedDict([('neighbors', neighbors), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters related to the
MT ISN TLV.
  """
  __slots__ = ('_path_helper', '_extmethods', '__mt_id','__system_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__mt_id = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..4095']}), is_leaf=True, yang_name="mt-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__system_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'state']

  def _get_mt_id(self):
    """
    Getter method for mt_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/state/mt_id (uint16)

    YANG Description: Identifier of a topology being announced.
    """
    return self.__mt_id
      
  def _set_mt_id(self, v, load=False):
    """
    Setter method for mt_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/state/mt_id (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mt_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mt_id() directly.

    YANG Description: Identifier of a topology being announced.
    """
    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': ['0..4095']}), is_leaf=True, yang_name="mt-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mt_id must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..4095']}), is_leaf=True, yang_name="mt-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__mt_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mt_id(self):
    self.__mt_id = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..4095']}), is_leaf=True, yang_name="mt-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_system_id(self):
    """
    Getter method for system_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/state/system_id (oc-isis-types:system-id)

    YANG Description: System-id of the IS neighbor.
    """
    return self.__system_id
      
  def _set_system_id(self, v, load=False):
    """
    Setter method for system_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/state/system_id (oc-isis-types:system-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_system_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_system_id() directly.

    YANG Description: System-id of the IS neighbor.
    """
    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]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """system_id must be of a type compatible with oc-isis-types:system-id""",
          'defined-type': "oc-isis-types:system-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)""",
        })

    self.__system_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_system_id(self):
    self.__system_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)

  mt_id = __builtin__.property(_get_mt_id)
  system_id = __builtin__.property(_get_system_id)


  _pyangbind_elements = OrderedDict([('mt_id', mt_id), ('system_id', system_id), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of MT neighbor.
  """
  __slots__ = ('_path_helper', '_extmethods', '__metric','__id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:wide-metric', is_config=False)
    self.__id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'state']

  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/state/metric (oc-isis-types:wide-metric)

    YANG Description: ISIS metric value.
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/state/metric (oc-isis-types:wide-metric)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: ISIS metric value.
    """
    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': ['1..16777215']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:wide-metric', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric must be of a type compatible with oc-isis-types:wide-metric""",
          'defined-type': "oc-isis-types:wide-metric",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:wide-metric', is_config=False)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:wide-metric', is_config=False)


  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/state/id (uint64)

    YANG Description: Unique identifier for the TLV instance for the
neighbor. The ID is not required to be consistent
across readvertisements of the LSP.
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/state/id (uint64)
    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: Unique identifier for the TLV instance for the
neighbor. The ID is not required to be consistent
across readvertisements of the LSP.
    """
    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="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id 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="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_id(self):
    self.__id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)

  metric = __builtin__.property(_get_metric)
  id = __builtin__.property(_get_id)


  _pyangbind_elements = OrderedDict([('metric', metric), ('id', id), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS neighbor state
  """
  __slots__ = ('_path_helper', '_extmethods', '__type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/state/type (identityref)

    YANG Description: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/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: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  type = __builtin__.property(_get_type)


  _pyangbind_elements = OrderedDict([('type', type), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_admin_group_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/admin-group/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 3.
  """
  __slots__ = ('_path_helper', '_extmethods', '__admin_group',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__admin_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'admin-group', 'state']

  def _get_admin_group(self):
    """
    Getter method for admin_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/admin_group/state/admin_group (uint32)

    YANG Description: The administrative group sub-TLV contains a 4-octet
bit mask assigned by the network administrator.  Each
set bit corresponds to one administrative group
assigned to the interface. By convention, the least
significant bit is referred to as group 0, and the
most significant bit is referred to as group 31.
    """
    return self.__admin_group
      
  def _set_admin_group(self, v, load=False):
    """
    Setter method for admin_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/admin_group/state/admin_group (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_admin_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_admin_group() directly.

    YANG Description: The administrative group sub-TLV contains a 4-octet
bit mask assigned by the network administrator.  Each
set bit corresponds to one administrative group
assigned to the interface. By convention, the least
significant bit is referred to as group 0, and the
most significant bit is referred to as group 31.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """admin_group must be of a type compatible with uint32""",
          'defined-type': "uint32",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__admin_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_admin_group(self):
    self.__admin_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  admin_group = __builtin__.property(_get_admin_group)


  _pyangbind_elements = OrderedDict([('admin_group', admin_group), ])


class yc_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_admin_group(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/admin-group. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 3.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'admin-group'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_admin_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'admin-group']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/admin_group/state (container)

    YANG Description: State parameters of sub-TLV 3.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/admin_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: State parameters of sub-TLV 3.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_admin_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_admin_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_admin_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_id_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-id/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 4.
  """
  __slots__ = ('_path_helper', '_extmethods', '__local_','__remote',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__local_ = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="local", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__remote = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="remote", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-id', 'state']

  def _get_local_(self):
    """
    Getter method for local_, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_id/state/local (uint32)

    YANG Description: The value field of this sub-TLV contains 4 octets of
Link Local Identifier followed by 4 octets of Link
Remote Identifier.
    """
    return self.__local_
      
  def _set_local_(self, v, load=False):
    """
    Setter method for local_, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_id/state/local (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_ is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_() directly.

    YANG Description: The value field of this sub-TLV contains 4 octets of
Link Local Identifier followed by 4 octets of Link
Remote Identifier.
    """
    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="local", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_ 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="local", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__local_ = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_(self):
    self.__local_ = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="local", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_remote(self):
    """
    Getter method for remote, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_id/state/remote (uint32)

    YANG Description: If the Link Remote Identifier is unknown, it is set
to 0.
    """
    return self.__remote
      
  def _set_remote(self, v, load=False):
    """
    Setter method for remote, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_id/state/remote (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_remote is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_remote() directly.

    YANG Description: If the Link Remote Identifier is unknown, it is set
to 0.
    """
    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="remote", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """remote 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="remote", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__remote = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_remote(self):
    self.__remote = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="remote", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  local_ = __builtin__.property(_get_local_)
  remote = __builtin__.property(_get_remote)


  _pyangbind_elements = OrderedDict([('local_', local_), ('remote', remote), ])


class yc_link_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_id(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-id. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 4.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'link-id'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-id']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_id/state (container)

    YANG Description: State parameters of sub-TLV 4.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_id/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 parameters of sub-TLV 4.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_interface_address_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4-interface-address/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 6.
  """
  __slots__ = ('_path_helper', '_extmethods', '__address',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__address = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'ipv4-interface-address', 'state']

  def _get_address(self):
    """
    Getter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_interface_address/state/address (inet:ipv4-address)

    YANG Description: A 4-octet IPv4 address for the interface described by
the (main) TLV. This sub-TLV can occur multiple
times.
    """
    return self.__address
      
  def _set_address(self, v, load=False):
    """
    Setter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_interface_address/state/address (inet:ipv4-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address() directly.

    YANG Description: A 4-octet IPv4 address for the interface described by
the (main) TLV. This sub-TLV can occur multiple
times.
    """
    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_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}'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address must be of a type compatible with inet:ipv4-address""",
          'defined-type': "inet:ipv4-address",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=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}'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)""",
        })

    self.__address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address(self):
    self.__address = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)

  address = __builtin__.property(_get_address)


  _pyangbind_elements = OrderedDict([('address', address), ])


class yc_ipv4_interface_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_interface_address(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4-interface-address. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 6.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'ipv4-interface-address'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_interface_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'ipv4-interface-address']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_interface_address/state (container)

    YANG Description: State parameters of sub-TLV 6.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_interface_address/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 parameters of sub-TLV 6.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_interface_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_interface_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_interface_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_neighbor_address_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4-neighbor-address/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 8.
  """
  __slots__ = ('_path_helper', '_extmethods', '__address',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__address = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'ipv4-neighbor-address', 'state']

  def _get_address(self):
    """
    Getter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_neighbor_address/state/address (inet:ipv4-address)

    YANG Description: A single IPv4 address for a neighboring router on
this link. This sub-TLV can occur multiple times.
    """
    return self.__address
      
  def _set_address(self, v, load=False):
    """
    Setter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_neighbor_address/state/address (inet:ipv4-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address() directly.

    YANG Description: A single IPv4 address for a neighboring router on
this link. This sub-TLV can occur multiple times.
    """
    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_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}'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address must be of a type compatible with inet:ipv4-address""",
          'defined-type': "inet:ipv4-address",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=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}'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)""",
        })

    self.__address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address(self):
    self.__address = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)

  address = __builtin__.property(_get_address)


  _pyangbind_elements = OrderedDict([('address', address), ])


class yc_ipv4_neighbor_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_neighbor_address(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4-neighbor-address. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 8.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'ipv4-neighbor-address'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_neighbor_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'ipv4-neighbor-address']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_neighbor_address/state (container)

    YANG Description: State parameters of sub-TLV 8.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_neighbor_address/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 parameters of sub-TLV 8.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_neighbor_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_neighbor_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_neighbor_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_link_bandwidth_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/max-link-bandwidth/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 9.
  """
  __slots__ = ('_path_helper', '_extmethods', '__bandwidth',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'max-link-bandwidth', 'state']

  def _get_bandwidth(self):
    """
    Getter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_link_bandwidth/state/bandwidth (oc-types:ieeefloat32)

    YANG Description: The maximum bandwidth that can be used on this link
in this direction (from the system originating the LSP
to its neighbors).  It is encoded in 32 bits in IEEE
floating point format.  The units are bytes (not
bits!) per second.
    """
    return self.__bandwidth
      
  def _set_bandwidth(self, v, load=False):
    """
    Setter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_link_bandwidth/state/bandwidth (oc-types:ieeefloat32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth() directly.

    YANG Description: The maximum bandwidth that can be used on this link
in this direction (from the system originating the LSP
to its neighbors).  It is encoded in 32 bits in IEEE
floating point format.  The units are bytes (not
bits!) per second.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth must be of a type compatible with oc-types:ieeefloat32""",
          'defined-type': "oc-types:ieeefloat32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)""",
        })

    self.__bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth(self):
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)

  bandwidth = __builtin__.property(_get_bandwidth)


  _pyangbind_elements = OrderedDict([('bandwidth', bandwidth), ])


class yc_max_link_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_link_bandwidth(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/max-link-bandwidth. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 9.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'max-link-bandwidth'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_link_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'max-link-bandwidth']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_link_bandwidth/state (container)

    YANG Description: State parameters of sub-TLV 9.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_link_bandwidth/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 parameters of sub-TLV 9.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_link_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_link_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_link_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_reservable_link_bandwidth_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/max-reservable-link-bandwidth/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 10.
  """
  __slots__ = ('_path_helper', '_extmethods', '__bandwidth',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'max-reservable-link-bandwidth', 'state']

  def _get_bandwidth(self):
    """
    Getter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_reservable_link_bandwidth/state/bandwidth (oc-types:ieeefloat32)

    YANG Description: The maximum amount of bandwidth that can be reserved
in this direction on this link.  Note that for
oversubscription purposes,  this can be greater than
the bandwidth of the link. It is encoded  in 32 bits
in IEEE floating point format.  The units are bytes
(not bits!) per second.
    """
    return self.__bandwidth
      
  def _set_bandwidth(self, v, load=False):
    """
    Setter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_reservable_link_bandwidth/state/bandwidth (oc-types:ieeefloat32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth() directly.

    YANG Description: The maximum amount of bandwidth that can be reserved
in this direction on this link.  Note that for
oversubscription purposes,  this can be greater than
the bandwidth of the link. It is encoded  in 32 bits
in IEEE floating point format.  The units are bytes
(not bits!) per second.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth must be of a type compatible with oc-types:ieeefloat32""",
          'defined-type': "oc-types:ieeefloat32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)""",
        })

    self.__bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth(self):
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)

  bandwidth = __builtin__.property(_get_bandwidth)


  _pyangbind_elements = OrderedDict([('bandwidth', bandwidth), ])


class yc_max_reservable_link_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_reservable_link_bandwidth(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/max-reservable-link-bandwidth. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 10.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'max-reservable-link-bandwidth'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_reservable_link_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'max-reservable-link-bandwidth']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_reservable_link_bandwidth/state (container)

    YANG Description: State parameters of sub-TLV 10.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_reservable_link_bandwidth/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 parameters of sub-TLV 10.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_reservable_link_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_reservable_link_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_reservable_link_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth_setup_priority_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved-bandwidth/setup-priority/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS Extended Reachability sub-TLV
11.
  """
  __slots__ = ('_path_helper', '_extmethods', '__priority','__bandwidth',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__priority = 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="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'unreserved-bandwidth', 'setup-priority', 'state']

  def _get_priority(self):
    """
    Getter method for priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth/setup_priority/state/priority (uint8)

    YANG Description: Setup priority level of 0 through 7 to be used by
Unreserved Bandwidth sub-TLV 11.
    """
    return self.__priority
      
  def _set_priority(self, v, load=False):
    """
    Setter method for priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth/setup_priority/state/priority (uint8)
    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: Setup priority level of 0 through 7 to be used by
Unreserved Bandwidth sub-TLV 11.
    """
    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="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """priority 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..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_priority(self):
    self.__priority = 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="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_bandwidth(self):
    """
    Getter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth/setup_priority/state/bandwidth (oc-types:ieeefloat32)

    YANG Description: The amount of bandwidth reservable in this
direction on this link. Note that for
oversubscription purposes, this can be greater than
the bandwidth of the link. It contains eight 32-bit
IEEE floating point numbers(one for each priority).
The units are bytes (not bits!) per second. The
values correspond to the bandwidth that can be
reserved with a setup priority of 0 through 7,
arranged in increasing order with priority 0
occurring at the start of the sub-TLV, and priority
7 at the end of the sub-TLV.
    """
    return self.__bandwidth
      
  def _set_bandwidth(self, v, load=False):
    """
    Setter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth/setup_priority/state/bandwidth (oc-types:ieeefloat32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth() directly.

    YANG Description: The amount of bandwidth reservable in this
direction on this link. Note that for
oversubscription purposes, this can be greater than
the bandwidth of the link. It contains eight 32-bit
IEEE floating point numbers(one for each priority).
The units are bytes (not bits!) per second. The
values correspond to the bandwidth that can be
reserved with a setup priority of 0 through 7,
arranged in increasing order with priority 0
occurring at the start of the sub-TLV, and priority
7 at the end of the sub-TLV.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth must be of a type compatible with oc-types:ieeefloat32""",
          'defined-type': "oc-types:ieeefloat32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)""",
        })

    self.__bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth(self):
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)

  priority = __builtin__.property(_get_priority)
  bandwidth = __builtin__.property(_get_bandwidth)


  _pyangbind_elements = OrderedDict([('priority', priority), ('bandwidth', bandwidth), ])


class yc_setup_priority_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth_setup_priority(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved-bandwidth/setup-priority. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Setup priority (0 through 7) for unreserved
bandwidth.
  """
  __slots__ = ('_path_helper', '_extmethods', '__priority','__state',)

  _yang_name = 'setup-priority'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__priority = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth_setup_priority_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'unreserved-bandwidth', 'setup-priority']

  def _get_priority(self):
    """
    Getter method for priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth/setup_priority/priority (leafref)

    YANG Description: Reference to the setup priority to which the
unreserved bandwidth corresponds.
    """
    return self.__priority
      
  def _set_priority(self, v, load=False):
    """
    Setter method for priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth/setup_priority/priority (leafref)
    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: Reference to the setup priority to which the
unreserved bandwidth corresponds.
    """
    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="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """priority must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_priority(self):
    self.__priority = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth/setup_priority/state (container)

    YANG Description: State parameters of IS Extended Reachability sub-TLV
11.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth/setup_priority/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 parameters of IS Extended Reachability sub-TLV
11.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth_setup_priority_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth_setup_priority_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth_setup_priority_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  priority = __builtin__.property(_get_priority)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('priority', priority), ('state', state), ])


class yc_unreserved_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved-bandwidth. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines unreserved-bandwidth. The units
are bytes per second.
  """
  __slots__ = ('_path_helper', '_extmethods', '__setup_priority',)

  _yang_name = 'unreserved-bandwidth'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__setup_priority = YANGDynClass(base=YANGListType("priority",yc_setup_priority_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth_setup_priority, yang_name="setup-priority", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'unreserved-bandwidth']

  def _get_setup_priority(self):
    """
    Getter method for setup_priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth/setup_priority (list)

    YANG Description: Setup priority (0 through 7) for unreserved
bandwidth.
    """
    return self.__setup_priority
      
  def _set_setup_priority(self, v, load=False):
    """
    Setter method for setup_priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth/setup_priority (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_setup_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_setup_priority() directly.

    YANG Description: Setup priority (0 through 7) for unreserved
bandwidth.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("priority",yc_setup_priority_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth_setup_priority, yang_name="setup-priority", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """setup_priority must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("priority",yc_setup_priority_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth_setup_priority, yang_name="setup-priority", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__setup_priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_setup_priority(self):
    self.__setup_priority = YANGDynClass(base=YANGListType("priority",yc_setup_priority_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth_setup_priority, yang_name="setup-priority", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  setup_priority = __builtin__.property(_get_setup_priority)


  _pyangbind_elements = OrderedDict([('setup_priority', setup_priority), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_interface_address_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6-interface-address/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 12.
  """
  __slots__ = ('_path_helper', '_extmethods', '__address',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__address = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}|:))'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'ipv6-interface-address', 'state']

  def _get_address(self):
    """
    Getter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_interface_address/state/address (inet:ipv6-address)

    YANG Description: Contains a 16-octet IPv6 address for the interface
described by the containing  Extended IS Reachability
TLV. This sub-TLV can occur multiple times.
    """
    return self.__address
      
  def _set_address(self, v, load=False):
    """
    Setter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_interface_address/state/address (inet:ipv6-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address() directly.

    YANG Description: Contains a 16-octet IPv6 address for the interface
described by the containing  Extended IS Reachability
TLV. This sub-TLV can occur multiple times.
    """
    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_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}|:))'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address must be of a type compatible with inet:ipv6-address""",
          'defined-type': "inet:ipv6-address",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=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}|:))'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)""",
        })

    self.__address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address(self):
    self.__address = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}|:))'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)

  address = __builtin__.property(_get_address)


  _pyangbind_elements = OrderedDict([('address', address), ])


class yc_ipv6_interface_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_interface_address(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6-interface-address. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 12.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'ipv6-interface-address'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_interface_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'ipv6-interface-address']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_interface_address/state (container)

    YANG Description: State parameters of sub-TLV 12.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_interface_address/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 parameters of sub-TLV 12.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_interface_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_interface_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_interface_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_neighbor_address_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6-neighbor-address/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 13.
  """
  __slots__ = ('_path_helper', '_extmethods', '__address',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__address = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}|:))'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'ipv6-neighbor-address', 'state']

  def _get_address(self):
    """
    Getter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_neighbor_address/state/address (inet:ipv6-address)

    YANG Description: Contains a 16-octet IPv6 address for a neighboring
router on the link described by the (main) TLV. This
sub-TLV can occur multiple times.
    """
    return self.__address
      
  def _set_address(self, v, load=False):
    """
    Setter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_neighbor_address/state/address (inet:ipv6-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address() directly.

    YANG Description: Contains a 16-octet IPv6 address for a neighboring
router on the link described by the (main) TLV. This
sub-TLV can occur multiple times.
    """
    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_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}|:))'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address must be of a type compatible with inet:ipv6-address""",
          'defined-type': "inet:ipv6-address",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=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}|:))'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)""",
        })

    self.__address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address(self):
    self.__address = YANGDynClass(unique=True, base=TypedListType(allowed_type=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}|:))'})), is_leaf=False, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)

  address = __builtin__.property(_get_address)


  _pyangbind_elements = OrderedDict([('address', address), ])


class yc_ipv6_neighbor_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_neighbor_address(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6-neighbor-address. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 13.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'ipv6-neighbor-address'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_neighbor_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'ipv6-neighbor-address']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_neighbor_address/state (container)

    YANG Description: State parameters of sub-TLV 13.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_neighbor_address/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 parameters of sub-TLV 13.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_neighbor_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_neighbor_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_neighbor_address_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_extended_admin_group_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/extended-admin-group/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 14.
  """
  __slots__ = ('_path_helper', '_extmethods', '__extended_admin_group',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__extended_admin_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="extended-admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'extended-admin-group', 'state']

  def _get_extended_admin_group(self):
    """
    Getter method for extended_admin_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/extended_admin_group/state/extended_admin_group (uint32)

    YANG Description: The extended-admin-group sub-TLV is used in addition
to the Administrative Groups when it is desirable to
make more than 32 colors available for advertisement
in a network.
    """
    return self.__extended_admin_group
      
  def _set_extended_admin_group(self, v, load=False):
    """
    Setter method for extended_admin_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/extended_admin_group/state/extended_admin_group (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended_admin_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended_admin_group() directly.

    YANG Description: The extended-admin-group sub-TLV is used in addition
to the Administrative Groups when it is desirable to
make more than 32 colors available for advertisement
in a network.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="extended-admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended_admin_group must be of a type compatible with uint32""",
          'defined-type': "uint32",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="extended-admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__extended_admin_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended_admin_group(self):
    self.__extended_admin_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="extended-admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  extended_admin_group = __builtin__.property(_get_extended_admin_group)


  _pyangbind_elements = OrderedDict([('extended_admin_group', extended_admin_group), ])


class yc_extended_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_extended_admin_group(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/extended-admin-group. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 14.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'extended-admin-group'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_extended_admin_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'extended-admin-group']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/extended_admin_group/state (container)

    YANG Description: State parameters of sub-TLV 14.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/extended_admin_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: State parameters of sub-TLV 14.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_extended_admin_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_extended_admin_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_extended_admin_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_te_default_metric_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/te-default-metric/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 18.
  """
  __slots__ = ('_path_helper', '_extmethods', '__metric',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'te-default-metric', 'state']

  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/te_default_metric/state/metric (uint32)

    YANG Description: This metric is administratively assigned and can be
used to present a differently weighted topology to
traffic engineering SPF calculations. To preclude
overflow within a traffic engineering SPF
implementation, all metrics greater than or equal to
MAX_PATH_METRIC SHALL be considered to have a metric
of MAX_PATH_METRIC.
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/te_default_metric/state/metric (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: This metric is administratively assigned and can be
used to present a differently weighted topology to
traffic engineering SPF calculations. To preclude
overflow within a traffic engineering SPF
implementation, all metrics greater than or equal to
MAX_PATH_METRIC SHALL be considered to have a metric
of MAX_PATH_METRIC.
    """
    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="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric 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="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  metric = __builtin__.property(_get_metric)


  _pyangbind_elements = OrderedDict([('metric', metric), ])


class yc_te_default_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_te_default_metric(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/te-default-metric. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 18.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'te-default-metric'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_te_default_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'te-default-metric']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/te_default_metric/state (container)

    YANG Description: State parameters of sub-TLV 18.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/te_default_metric/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 parameters of sub-TLV 18.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_te_default_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_te_default_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_te_default_metric_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_attributes_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-attributes/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS Extended Reachability sub-TLV
19.
  """
  __slots__ = ('_path_helper', '_extmethods', '__local_protection',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__local_protection = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LOCAL_PROTECTION': {}, 'LINK_EXCLUDED': {}},)), is_leaf=False, yang_name="local-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-attributes', 'state']

  def _get_local_protection(self):
    """
    Getter method for local_protection, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_attributes/state/local_protection (enumeration)

    YANG Description: Link local-protection attributes.
    """
    return self.__local_protection
      
  def _set_local_protection(self, v, load=False):
    """
    Setter method for local_protection, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_attributes/state/local_protection (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_protection is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_protection() directly.

    YANG Description: Link local-protection attributes.
    """
    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={'LOCAL_PROTECTION': {}, 'LINK_EXCLUDED': {}},)), is_leaf=False, yang_name="local-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_protection must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LOCAL_PROTECTION': {}, 'LINK_EXCLUDED': {}},)), is_leaf=False, yang_name="local-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__local_protection = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_protection(self):
    self.__local_protection = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LOCAL_PROTECTION': {}, 'LINK_EXCLUDED': {}},)), is_leaf=False, yang_name="local-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)

  local_protection = __builtin__.property(_get_local_protection)


  _pyangbind_elements = OrderedDict([('local_protection', local_protection), ])


class yc_link_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_attributes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-attributes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines link-attributes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'link-attributes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_attributes_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-attributes']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_attributes/state (container)

    YANG Description: State parameters of IS Extended Reachability sub-TLV
19.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_attributes/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 parameters of IS Extended Reachability sub-TLV
19.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_attributes_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_attributes_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_attributes_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_protection_type_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-protection-type/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 20.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXTRA_TRAFFIC': {}, 'UNPROTECTED': {}, 'SHARED': {}, 'ONE_ONE': {}, 'PLUS_ONE': {}, 'ENHANCED': {}},)), is_leaf=False, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-protection-type', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_protection_type/state/type (enumeration)

    YANG Description: Link protection capabilities.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_protection_type/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: Link protection capabilities.
    """
    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={'EXTRA_TRAFFIC': {}, 'UNPROTECTED': {}, 'SHARED': {}, 'ONE_ONE': {}, 'PLUS_ONE': {}, 'ENHANCED': {}},)), is_leaf=False, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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-network-instance:enumeration",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXTRA_TRAFFIC': {}, 'UNPROTECTED': {}, 'SHARED': {}, 'ONE_ONE': {}, 'PLUS_ONE': {}, 'ENHANCED': {}},)), is_leaf=False, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXTRA_TRAFFIC': {}, 'UNPROTECTED': {}, 'SHARED': {}, 'ONE_ONE': {}, 'PLUS_ONE': {}, 'ENHANCED': {}},)), is_leaf=False, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)

  type = __builtin__.property(_get_type)


  _pyangbind_elements = OrderedDict([('type', type), ])


class yc_link_protection_type_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_protection_type(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-protection-type. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: ISIS LSDB parameters relating to the type of link
protection offered.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'link-protection-type'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_protection_type_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-protection-type']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_protection_type/state (container)

    YANG Description: State parameters of sub-TLV 20.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_protection_type/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 parameters of sub-TLV 20.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_protection_type_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_protection_type_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_protection_type_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth-constraints/bandwidth-constraint/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS Extended Reachability sub-TLV
22.
  """
  __slots__ = ('_path_helper', '_extmethods', '__model_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__model_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="model-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'bandwidth-constraints', 'bandwidth-constraint', 'state']

  def _get_model_id(self):
    """
    Getter method for model_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/state/model_id (uint8)

    YANG Description: Identifier for the Bandwidth Constraints  Model
currently in use by the LSR initiating the IGP
advertisement.
    """
    return self.__model_id
      
  def _set_model_id(self, v, load=False):
    """
    Setter method for model_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/state/model_id (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_model_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_model_id() directly.

    YANG Description: Identifier for the Bandwidth Constraints  Model
currently in use by the LSR initiating the IGP
advertisement.
    """
    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="model-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """model_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="model-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__model_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_model_id(self):
    self.__model_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="model-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)

  model_id = __builtin__.property(_get_model_id)


  _pyangbind_elements = OrderedDict([('model_id', model_id), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints_constraint_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth-constraints/bandwidth-constraint/constraints/constraint/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters of the BCN level
  """
  __slots__ = ('_path_helper', '_extmethods', '__constraint_id','__bandwidth',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__constraint_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="constraint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'bandwidth-constraints', 'bandwidth-constraint', 'constraints', 'constraint', 'state']

  def _get_constraint_id(self):
    """
    Getter method for constraint_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints/constraint/state/constraint_id (uint32)

    YANG Description: Unique reference for the bandwidth constraint level. BC0
is indicated by this leaf being set to zero, with BCN
represented by this leaf being set to N.
    """
    return self.__constraint_id
      
  def _set_constraint_id(self, v, load=False):
    """
    Setter method for constraint_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints/constraint/state/constraint_id (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_constraint_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_constraint_id() directly.

    YANG Description: Unique reference for the bandwidth constraint level. BC0
is indicated by this leaf being set to zero, with BCN
represented by this leaf being set to N.
    """
    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="constraint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """constraint_id 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="constraint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__constraint_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_constraint_id(self):
    self.__constraint_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="constraint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_bandwidth(self):
    """
    Getter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints/constraint/state/bandwidth (oc-types:ieeefloat32)

    YANG Description: The bandwidth constraint, expressed as a 32-bit IEEE
floating point number expressed in bytes per second.
    """
    return self.__bandwidth
      
  def _set_bandwidth(self, v, load=False):
    """
    Setter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints/constraint/state/bandwidth (oc-types:ieeefloat32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth() directly.

    YANG Description: The bandwidth constraint, expressed as a 32-bit IEEE
floating point number expressed in bytes per second.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth must be of a type compatible with oc-types:ieeefloat32""",
          'defined-type': "oc-types:ieeefloat32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)""",
        })

    self.__bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth(self):
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)

  constraint_id = __builtin__.property(_get_constraint_id)
  bandwidth = __builtin__.property(_get_bandwidth)


  _pyangbind_elements = OrderedDict([('constraint_id', constraint_id), ('bandwidth', bandwidth), ])


class yc_constraint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints_constraint(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth-constraints/bandwidth-constraint/constraints/constraint. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of the constraints within the Bandwidth
Constraints sub-TLV. The BC0 level is indicated by
the constraint-id leaf being set to 0, with BCN
being indicated by constraint-id N.
  """
  __slots__ = ('_path_helper', '_extmethods', '__constraint_id','__state',)

  _yang_name = 'constraint'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__constraint_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="constraint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'bandwidth-constraints', 'bandwidth-constraint', 'constraints', 'constraint']

  def _get_constraint_id(self):
    """
    Getter method for constraint_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints/constraint/constraint_id (leafref)

    YANG Description: Reference to the unique ID for the BCN level.
    """
    return self.__constraint_id
      
  def _set_constraint_id(self, v, load=False):
    """
    Setter method for constraint_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints/constraint/constraint_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_constraint_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_constraint_id() directly.

    YANG Description: Reference to the unique ID for the BCN level.
    """
    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="constraint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """constraint_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="constraint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__constraint_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_constraint_id(self):
    self.__constraint_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="constraint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints/constraint/state (container)

    YANG Description: Operational state parameters of the BCN level
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints/constraint/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 of the BCN level
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  constraint_id = __builtin__.property(_get_constraint_id)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('constraint_id', constraint_id), ('state', state), ])


class yc_constraints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth-constraints/bandwidth-constraint/constraints. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Constraints contained within the Bandwidth
Constraints sub-TLV
  """
  __slots__ = ('_path_helper', '_extmethods', '__constraint',)

  _yang_name = 'constraints'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__constraint = YANGDynClass(base=YANGListType("constraint_id",yc_constraint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints_constraint, yang_name="constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='constraint-id', extensions=None), is_container='list', yang_name="constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'bandwidth-constraints', 'bandwidth-constraint', 'constraints']

  def _get_constraint(self):
    """
    Getter method for constraint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints/constraint (list)

    YANG Description: List of the constraints within the Bandwidth
Constraints sub-TLV. The BC0 level is indicated by
the constraint-id leaf being set to 0, with BCN
being indicated by constraint-id N.
    """
    return self.__constraint
      
  def _set_constraint(self, v, load=False):
    """
    Setter method for constraint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints/constraint (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_constraint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_constraint() directly.

    YANG Description: List of the constraints within the Bandwidth
Constraints sub-TLV. The BC0 level is indicated by
the constraint-id leaf being set to 0, with BCN
being indicated by constraint-id N.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("constraint_id",yc_constraint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints_constraint, yang_name="constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='constraint-id', extensions=None), is_container='list', yang_name="constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """constraint must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("constraint_id",yc_constraint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints_constraint, yang_name="constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='constraint-id', extensions=None), is_container='list', yang_name="constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__constraint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_constraint(self):
    self.__constraint = YANGDynClass(base=YANGListType("constraint_id",yc_constraint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints_constraint, yang_name="constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='constraint-id', extensions=None), is_container='list', yang_name="constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  constraint = __builtin__.property(_get_constraint)


  _pyangbind_elements = OrderedDict([('constraint', constraint), ])


class yc_bandwidth_constraint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth-constraints/bandwidth-constraint. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of the Bandwidth Constraints sub-TLV instances
present in the TLV.
  """
  __slots__ = ('_path_helper', '_extmethods', '__model_id','__state','__constraints',)

  _yang_name = 'bandwidth-constraint'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__model_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="model-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__constraints = YANGDynClass(base=yc_constraints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints, is_container='container', yang_name="constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'bandwidth-constraints', 'bandwidth-constraint']

  def _get_model_id(self):
    """
    Getter method for model_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/model_id (leafref)

    YANG Description: Reference to the model ID associated with the
instance of the Bandwidth Constraints sub-TLV.
    """
    return self.__model_id
      
  def _set_model_id(self, v, load=False):
    """
    Setter method for model_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/model_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_model_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_model_id() directly.

    YANG Description: Reference to the model ID associated with the
instance of the Bandwidth Constraints sub-TLV.
    """
    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="model-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """model_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="model-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__model_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_model_id(self):
    self.__model_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="model-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/state (container)

    YANG Description: State parameters of IS Extended Reachability sub-TLV
22.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/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 parameters of IS Extended Reachability sub-TLV
22.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_constraints(self):
    """
    Getter method for constraints, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints (container)

    YANG Description: Constraints contained within the Bandwidth
Constraints sub-TLV
    """
    return self.__constraints
      
  def _set_constraints(self, v, load=False):
    """
    Setter method for constraints, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint/constraints (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_constraints is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_constraints() directly.

    YANG Description: Constraints contained within the Bandwidth
Constraints sub-TLV
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_constraints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints, is_container='container', yang_name="constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """constraints must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_constraints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints, is_container='container', yang_name="constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__constraints = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_constraints(self):
    self.__constraints = YANGDynClass(base=yc_constraints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint_constraints, is_container='container', yang_name="constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  model_id = __builtin__.property(_get_model_id)
  state = __builtin__.property(_get_state)
  constraints = __builtin__.property(_get_constraints)


  _pyangbind_elements = OrderedDict([('model_id', model_id), ('state', state), ('constraints', constraints), ])


class yc_bandwidth_constraints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth-constraints. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines bandwidth-constraints. For DS-TE,
the existing Maximum Reservable link bandwidth parameter
is retained, but its semantics is generalized and
interpreted as the aggregate bandwidth constraint across
all Class-Types
  """
  __slots__ = ('_path_helper', '_extmethods', '__bandwidth_constraint',)

  _yang_name = 'bandwidth-constraints'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__bandwidth_constraint = YANGDynClass(base=YANGListType("model_id",yc_bandwidth_constraint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint, yang_name="bandwidth-constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='model-id', extensions=None), is_container='list', yang_name="bandwidth-constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'bandwidth-constraints']

  def _get_bandwidth_constraint(self):
    """
    Getter method for bandwidth_constraint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint (list)

    YANG Description: List of the Bandwidth Constraints sub-TLV instances
present in the TLV.
    """
    return self.__bandwidth_constraint
      
  def _set_bandwidth_constraint(self, v, load=False):
    """
    Setter method for bandwidth_constraint, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints/bandwidth_constraint (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth_constraint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth_constraint() directly.

    YANG Description: List of the Bandwidth Constraints sub-TLV instances
present in the TLV.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("model_id",yc_bandwidth_constraint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint, yang_name="bandwidth-constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='model-id', extensions=None), is_container='list', yang_name="bandwidth-constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth_constraint must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("model_id",yc_bandwidth_constraint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint, yang_name="bandwidth-constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='model-id', extensions=None), is_container='list', yang_name="bandwidth-constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__bandwidth_constraint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth_constraint(self):
    self.__bandwidth_constraint = YANGDynClass(base=YANGListType("model_id",yc_bandwidth_constraint_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints_bandwidth_constraint, yang_name="bandwidth-constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='model-id', extensions=None), is_container='list', yang_name="bandwidth-constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  bandwidth_constraint = __builtin__.property(_get_bandwidth_constraint)


  _pyangbind_elements = OrderedDict([('bandwidth_constraint', bandwidth_constraint), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unconstrained_lsp_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unconstrained-lsp/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 23.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__count',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__count = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'unconstrained-lsp', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unconstrained_lsp/state/type (identityref)

    YANG Description: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unconstrained_lsp/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: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_count(self):
    """
    Getter method for count, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unconstrained_lsp/state/count (uint16)

    YANG Description: Unconstrained TE LSP count(TE Label Switched Paths
(LSPs) signalled with zero bandwidth).
    """
    return self.__count
      
  def _set_count(self, v, load=False):
    """
    Setter method for count, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unconstrained_lsp/state/count (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_count is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_count() directly.

    YANG Description: Unconstrained TE LSP count(TE Label Switched Paths
(LSPs) signalled with zero bandwidth).
    """
    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="count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """count 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="count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__count = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_count(self):
    self.__count = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  type = __builtin__.property(_get_type)
  count = __builtin__.property(_get_count)


  _pyangbind_elements = OrderedDict([('type', type), ('count', count), ])


class yc_unconstrained_lsp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unconstrained_lsp(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unconstrained-lsp. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 23.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'unconstrained-lsp'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unconstrained_lsp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'unconstrained-lsp']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unconstrained_lsp/state (container)

    YANG Description: State parameters of sub-TLV 23.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unconstrained_lsp/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 parameters of sub-TLV 23.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unconstrained_lsp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unconstrained_lsp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unconstrained_lsp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency-sids/adjacency-sid/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of Adjacency-SID.
  """
  __slots__ = ('_path_helper', '_extmethods', '__value','__flags','__weight',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ADDRESS_FAMILY': {}, 'BACKUP': {}, 'VALUE': {}, 'LOCAL': {}, 'SET': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'adjacency-sids', 'adjacency-sid', 'state']

  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid/state/value (uint32)

    YANG Description: Adjacency-SID value.
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid/state/value (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: Adjacency-SID value.
    """
    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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value 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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_flags(self):
    """
    Getter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid/state/flags (enumeration)

    YANG Description: Flags associated with Adj-Segment-ID.
    """
    return self.__flags
      
  def _set_flags(self, v, load=False):
    """
    Setter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid/state/flags (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flags() directly.

    YANG Description: Flags associated with Adj-Segment-ID.
    """
    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={'ADDRESS_FAMILY': {}, 'BACKUP': {}, 'VALUE': {}, 'LOCAL': {}, 'SET': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flags must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ADDRESS_FAMILY': {}, 'BACKUP': {}, 'VALUE': {}, 'LOCAL': {}, 'SET': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_flags(self):
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ADDRESS_FAMILY': {}, 'BACKUP': {}, 'VALUE': {}, 'LOCAL': {}, 'SET': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_weight(self):
    """
    Getter method for weight, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid/state/weight (uint8)

    YANG Description: Value that represents the weight of the Adj-SID for
the purpose of load balancing.
    """
    return self.__weight
      
  def _set_weight(self, v, load=False):
    """
    Setter method for weight, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid/state/weight (uint8)
    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: Value that represents the weight of the Adj-SID for
the purpose of load balancing.
    """
    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="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """weight 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="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__weight = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_weight(self):
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)

  value = __builtin__.property(_get_value)
  flags = __builtin__.property(_get_flags)
  weight = __builtin__.property(_get_weight)


  _pyangbind_elements = OrderedDict([('value', value), ('flags', flags), ('weight', weight), ])


class yc_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency-sids/adjacency-sid. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Adjacency Segment-IDs List. An IGP-Adjacency Segment is
an IGP segment attached to a unidirectional adjacency or
a set of unidirectional adjacencies. By default, an IGP-
Adjacency Segment is local to the node which advertises
it.
  """
  __slots__ = ('_path_helper', '_extmethods', '__value','__state',)

  _yang_name = 'adjacency-sid'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__value = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'adjacency-sids', 'adjacency-sid']

  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid/value (leafref)

    YANG Description: Reference to the value of the Adjacency-SID.
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid/value (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: Reference to the value of the Adjacency-SID.
    """
    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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid/state (container)

    YANG Description: State parameters of Adjacency-SID.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid/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 parameters of Adjacency-SID.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  value = __builtin__.property(_get_value)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('value', value), ('state', state), ])


class yc_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency-sids. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines segment routing adjacency SIDs.
  """
  __slots__ = ('_path_helper', '_extmethods', '__adjacency_sid',)

  _yang_name = 'adjacency-sids'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__adjacency_sid = YANGDynClass(base=YANGListType("value",yc_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid, yang_name="adjacency-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="adjacency-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'adjacency-sids']

  def _get_adjacency_sid(self):
    """
    Getter method for adjacency_sid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid (list)

    YANG Description: Adjacency Segment-IDs List. An IGP-Adjacency Segment is
an IGP segment attached to a unidirectional adjacency or
a set of unidirectional adjacencies. By default, an IGP-
Adjacency Segment is local to the node which advertises
it.
    """
    return self.__adjacency_sid
      
  def _set_adjacency_sid(self, v, load=False):
    """
    Setter method for adjacency_sid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids/adjacency_sid (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adjacency_sid is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adjacency_sid() directly.

    YANG Description: Adjacency Segment-IDs List. An IGP-Adjacency Segment is
an IGP segment attached to a unidirectional adjacency or
a set of unidirectional adjacencies. By default, an IGP-
Adjacency Segment is local to the node which advertises
it.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("value",yc_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid, yang_name="adjacency-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="adjacency-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adjacency_sid must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("value",yc_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid, yang_name="adjacency-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="adjacency-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__adjacency_sid = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adjacency_sid(self):
    self.__adjacency_sid = YANGDynClass(base=YANGListType("value",yc_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids_adjacency_sid, yang_name="adjacency-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="adjacency-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  adjacency_sid = __builtin__.property(_get_adjacency_sid)


  _pyangbind_elements = OrderedDict([('adjacency_sid', adjacency_sid), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids_lan_adjacency_sid_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan-adjacency-sids/lan-adjacency-sid/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of LAN Adjacency-SID.
  """
  __slots__ = ('_path_helper', '_extmethods', '__value','__flags','__weight','__neighbor_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ADDRESS_FAMILY': {}, 'BACKUP': {}, 'VALUE': {}, 'LOCAL': {}, 'SET': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__neighbor_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="neighbor-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'lan-adjacency-sids', 'lan-adjacency-sid', 'state']

  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/state/value (uint32)

    YANG Description: LAN Adjacency-SID value.
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/state/value (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: LAN Adjacency-SID value.
    """
    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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value 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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_flags(self):
    """
    Getter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/state/flags (enumeration)

    YANG Description: Flags associated with LAN-Adj-Segment-ID.
    """
    return self.__flags
      
  def _set_flags(self, v, load=False):
    """
    Setter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/state/flags (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flags() directly.

    YANG Description: Flags associated with LAN-Adj-Segment-ID.
    """
    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={'ADDRESS_FAMILY': {}, 'BACKUP': {}, 'VALUE': {}, 'LOCAL': {}, 'SET': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flags must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ADDRESS_FAMILY': {}, 'BACKUP': {}, 'VALUE': {}, 'LOCAL': {}, 'SET': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_flags(self):
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ADDRESS_FAMILY': {}, 'BACKUP': {}, 'VALUE': {}, 'LOCAL': {}, 'SET': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_weight(self):
    """
    Getter method for weight, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/state/weight (uint8)

    YANG Description: Value that represents the weight of the Adj-SID
for the purpose of load balancing.
    """
    return self.__weight
      
  def _set_weight(self, v, load=False):
    """
    Setter method for weight, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/state/weight (uint8)
    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: Value that represents the weight of the Adj-SID
for the purpose of load balancing.
    """
    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="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """weight 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="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__weight = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_weight(self):
    self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="weight", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_neighbor_id(self):
    """
    Getter method for neighbor_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/state/neighbor_id (oc-isis-types:system-id)

    YANG Description: System ID of the neighbor associated with the LAN-
Adj-Segment-ID value.
    """
    return self.__neighbor_id
      
  def _set_neighbor_id(self, v, load=False):
    """
    Setter method for neighbor_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/state/neighbor_id (oc-isis-types:system-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor_id() directly.

    YANG Description: System ID of the neighbor associated with the LAN-
Adj-Segment-ID value.
    """
    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]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="neighbor-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor_id must be of a type compatible with oc-isis-types:system-id""",
          'defined-type': "oc-isis-types:system-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="neighbor-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)""",
        })

    self.__neighbor_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor_id(self):
    self.__neighbor_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="neighbor-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)

  value = __builtin__.property(_get_value)
  flags = __builtin__.property(_get_flags)
  weight = __builtin__.property(_get_weight)
  neighbor_id = __builtin__.property(_get_neighbor_id)


  _pyangbind_elements = OrderedDict([('value', value), ('flags', flags), ('weight', weight), ('neighbor_id', neighbor_id), ])


class yc_lan_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids_lan_adjacency_sid(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan-adjacency-sids/lan-adjacency-sid. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Adjacency Segment-IDs List. An IGP-Adjacency Segment is
an IGP segment attached to a unidirectional adjacency or
a set of unidirectional adjacencies. By default, an IGP-
Adjacency Segment is local to the node which advertises
it.
  """
  __slots__ = ('_path_helper', '_extmethods', '__value','__state',)

  _yang_name = 'lan-adjacency-sid'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__value = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids_lan_adjacency_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'lan-adjacency-sids', 'lan-adjacency-sid']

  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/value (leafref)

    YANG Description: Reference to the value of the LAN Adjacency-SID.
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/value (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: Reference to the value of the LAN Adjacency-SID.
    """
    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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/state (container)

    YANG Description: State parameters of LAN Adjacency-SID.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid/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 parameters of LAN Adjacency-SID.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids_lan_adjacency_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids_lan_adjacency_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids_lan_adjacency_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  value = __builtin__.property(_get_value)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('value', value), ('state', state), ])


class yc_lan_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan-adjacency-sids. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines segment routing LAN adjacency
SIDs
  """
  __slots__ = ('_path_helper', '_extmethods', '__lan_adjacency_sid',)

  _yang_name = 'lan-adjacency-sids'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__lan_adjacency_sid = YANGDynClass(base=YANGListType("value",yc_lan_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids_lan_adjacency_sid, yang_name="lan-adjacency-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="lan-adjacency-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'lan-adjacency-sids']

  def _get_lan_adjacency_sid(self):
    """
    Getter method for lan_adjacency_sid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid (list)

    YANG Description: Adjacency Segment-IDs List. An IGP-Adjacency Segment is
an IGP segment attached to a unidirectional adjacency or
a set of unidirectional adjacencies. By default, an IGP-
Adjacency Segment is local to the node which advertises
it.
    """
    return self.__lan_adjacency_sid
      
  def _set_lan_adjacency_sid(self, v, load=False):
    """
    Setter method for lan_adjacency_sid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids/lan_adjacency_sid (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lan_adjacency_sid is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lan_adjacency_sid() directly.

    YANG Description: Adjacency Segment-IDs List. An IGP-Adjacency Segment is
an IGP segment attached to a unidirectional adjacency or
a set of unidirectional adjacencies. By default, an IGP-
Adjacency Segment is local to the node which advertises
it.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("value",yc_lan_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids_lan_adjacency_sid, yang_name="lan-adjacency-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="lan-adjacency-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lan_adjacency_sid must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("value",yc_lan_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids_lan_adjacency_sid, yang_name="lan-adjacency-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="lan-adjacency-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__lan_adjacency_sid = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lan_adjacency_sid(self):
    self.__lan_adjacency_sid = YANGDynClass(base=YANGListType("value",yc_lan_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids_lan_adjacency_sid, yang_name="lan-adjacency-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="lan-adjacency-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  lan_adjacency_sid = __builtin__.property(_get_lan_adjacency_sid)


  _pyangbind_elements = OrderedDict([('lan_adjacency_sid', lan_adjacency_sid), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-delay/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS Extended Reachability sub-TLV
33.
  """
  __slots__ = ('_path_helper', '_extmethods', '__a_bit','__delay',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__a_bit = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-delay', 'state']

  def _get_a_bit(self):
    """
    Getter method for a_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay/state/a_bit (boolean)

    YANG Description: The A bit is set when the measured value of this parameter
exceeds its configured maximum threshold. The A bit is cleared
when the measured value falls below its configured reuse
threshold.
    """
    return self.__a_bit
      
  def _set_a_bit(self, v, load=False):
    """
    Setter method for a_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay/state/a_bit (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_a_bit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_a_bit() directly.

    YANG Description: The A bit is set when the measured value of this parameter
exceeds its configured maximum threshold. The A bit is cleared
when the measured value falls below its configured reuse
threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """a_bit must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__a_bit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_a_bit(self):
    self.__a_bit = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_delay(self):
    """
    Getter method for delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay/state/delay (uint32)

    YANG Description: Average link delay value (in microseconds) between
two directly connected IS-IS neighbors over a
configurable interval.
    """
    return self.__delay
      
  def _set_delay(self, v, load=False):
    """
    Setter method for delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay/state/delay (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_delay() directly.

    YANG Description: Average link delay value (in microseconds) between
two directly connected IS-IS neighbors over a
configurable interval.
    """
    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="delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """delay 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="delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_delay(self):
    self.__delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  a_bit = __builtin__.property(_get_a_bit)
  delay = __builtin__.property(_get_delay)


  _pyangbind_elements = OrderedDict([('a_bit', a_bit), ('delay', delay), ])


class yc_link_delay_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-delay. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines unidirectional link delay.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'link-delay'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-delay']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay/state (container)

    YANG Description: State parameters of IS Extended Reachability sub-TLV
33.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay/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 parameters of IS Extended Reachability sub-TLV
33.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_min_max_link_delay_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/min-max-link-delay/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS Extended Reachability sub-TLV
34.
  """
  __slots__ = ('_path_helper', '_extmethods', '__a_bit','__min_delay','__max_delay',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__a_bit = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__min_delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="min-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__max_delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'min-max-link-delay', 'state']

  def _get_a_bit(self):
    """
    Getter method for a_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/min_max_link_delay/state/a_bit (boolean)

    YANG Description: The A bit is set when the measured value of this parameter
exceeds its configured maximum threshold. The A bit is cleared
when the measured value falls below its configured reuse
threshold.
    """
    return self.__a_bit
      
  def _set_a_bit(self, v, load=False):
    """
    Setter method for a_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/min_max_link_delay/state/a_bit (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_a_bit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_a_bit() directly.

    YANG Description: The A bit is set when the measured value of this parameter
exceeds its configured maximum threshold. The A bit is cleared
when the measured value falls below its configured reuse
threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """a_bit must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__a_bit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_a_bit(self):
    self.__a_bit = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_min_delay(self):
    """
    Getter method for min_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/min_max_link_delay/state/min_delay (uint32)

    YANG Description: Minimum measured link delay value(in microseconds)
between two directly connected IS-IS neighbors over a
configurable interval.
    """
    return self.__min_delay
      
  def _set_min_delay(self, v, load=False):
    """
    Setter method for min_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/min_max_link_delay/state/min_delay (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_delay() directly.

    YANG Description: Minimum measured link delay value(in microseconds)
between two directly connected IS-IS neighbors over a
configurable interval.
    """
    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="min-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_delay 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="min-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__min_delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_min_delay(self):
    self.__min_delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="min-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_max_delay(self):
    """
    Getter method for max_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/min_max_link_delay/state/max_delay (uint32)

    YANG Description: Maximum measured link delay value(in microseconds)
between two directly connected IS-IS neighbors over a
configurable interval.
    """
    return self.__max_delay
      
  def _set_max_delay(self, v, load=False):
    """
    Setter method for max_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/min_max_link_delay/state/max_delay (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_delay() directly.

    YANG Description: Maximum measured link delay value(in microseconds)
between two directly connected IS-IS neighbors over a
configurable interval.
    """
    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-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_delay 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-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__max_delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_delay(self):
    self.__max_delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  a_bit = __builtin__.property(_get_a_bit)
  min_delay = __builtin__.property(_get_min_delay)
  max_delay = __builtin__.property(_get_max_delay)


  _pyangbind_elements = OrderedDict([('a_bit', a_bit), ('min_delay', min_delay), ('max_delay', max_delay), ])


class yc_min_max_link_delay_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_min_max_link_delay(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/min-max-link-delay. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines min/max link delay.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'min-max-link-delay'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_min_max_link_delay_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'min-max-link-delay']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/min_max_link_delay/state (container)

    YANG Description: State parameters of IS Extended Reachability sub-TLV
34.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/min_max_link_delay/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 parameters of IS Extended Reachability sub-TLV
34.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_min_max_link_delay_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_min_max_link_delay_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_min_max_link_delay_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_variation_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-delay-variation/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS Extended Reachability sub-TLV
35.
  """
  __slots__ = ('_path_helper', '_extmethods', '__delay',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-delay-variation', 'state']

  def _get_delay(self):
    """
    Getter method for delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay_variation/state/delay (uint32)

    YANG Description: Average link delay between two directly connected IS-
IS neighbors over a configurable interval.
    """
    return self.__delay
      
  def _set_delay(self, v, load=False):
    """
    Setter method for delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay_variation/state/delay (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_delay() directly.

    YANG Description: Average link delay between two directly connected IS-
IS neighbors over a configurable interval.
    """
    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="delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """delay 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="delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_delay(self):
    self.__delay = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  delay = __builtin__.property(_get_delay)


  _pyangbind_elements = OrderedDict([('delay', delay), ])


class yc_link_delay_variation_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_variation(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-delay-variation. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines unidirectional link delay
variation.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'link-delay-variation'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_variation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-delay-variation']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay_variation/state (container)

    YANG Description: State parameters of IS Extended Reachability sub-TLV
35.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay_variation/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 parameters of IS Extended Reachability sub-TLV
35.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_variation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_variation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_variation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_loss_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-loss/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS Extended Reachability sub-TLV
36.
  """
  __slots__ = ('_path_helper', '_extmethods', '__a_bit','__link_loss',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__a_bit = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__link_loss = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="link-loss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-loss', 'state']

  def _get_a_bit(self):
    """
    Getter method for a_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_loss/state/a_bit (boolean)

    YANG Description: The A bit is set when the measured value of this parameter
exceeds its configured maximum threshold. The A bit is cleared
when the measured value falls below its configured reuse
threshold.
    """
    return self.__a_bit
      
  def _set_a_bit(self, v, load=False):
    """
    Setter method for a_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_loss/state/a_bit (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_a_bit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_a_bit() directly.

    YANG Description: The A bit is set when the measured value of this parameter
exceeds its configured maximum threshold. The A bit is cleared
when the measured value falls below its configured reuse
threshold.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """a_bit must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__a_bit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_a_bit(self):
    self.__a_bit = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="a-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_link_loss(self):
    """
    Getter method for link_loss, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_loss/state/link_loss (uint32)

    YANG Description: Link packet loss as a percentage of the total traffic
sent over a configurable interval. The basic unit is
0.000003%, where (2^24 - 2) is 50.331642%. This value
is the highest packet-loss percentage that can be
expressed (the assumption being that precision is more
important on high-speed links than the ability to
advertise loss rates greater than this, and that high-
speed links with over 50% loss are unusable).
Therefore, measured values that are larger than the
field maximum SHOULD be encoded as the maximum
value.
    """
    return self.__link_loss
      
  def _set_link_loss(self, v, load=False):
    """
    Setter method for link_loss, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_loss/state/link_loss (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_loss is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_loss() directly.

    YANG Description: Link packet loss as a percentage of the total traffic
sent over a configurable interval. The basic unit is
0.000003%, where (2^24 - 2) is 50.331642%. This value
is the highest packet-loss percentage that can be
expressed (the assumption being that precision is more
important on high-speed links than the ability to
advertise loss rates greater than this, and that high-
speed links with over 50% loss are unusable).
Therefore, measured values that are larger than the
field maximum SHOULD be encoded as the maximum
value.
    """
    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="link-loss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_loss 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="link-loss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__link_loss = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_loss(self):
    self.__link_loss = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="link-loss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  a_bit = __builtin__.property(_get_a_bit)
  link_loss = __builtin__.property(_get_link_loss)


  _pyangbind_elements = OrderedDict([('a_bit', a_bit), ('link_loss', link_loss), ])


class yc_link_loss_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_loss(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link-loss. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines unidirectional link loss delay.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'link-loss'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_loss_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'link-loss']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_loss/state (container)

    YANG Description: State parameters of IS Extended Reachability sub-TLV
36.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_loss/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 parameters of IS Extended Reachability sub-TLV
36.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_loss_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_loss_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_loss_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_residual_bandwidth_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/residual-bandwidth/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS Extended Reachability sub-TLV
37.
  """
  __slots__ = ('_path_helper', '_extmethods', '__bandwidth',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'residual-bandwidth', 'state']

  def _get_bandwidth(self):
    """
    Getter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/residual_bandwidth/state/bandwidth (oc-types:ieeefloat32)

    YANG Description: Residual bandwidth on a link,forwarding adjacency
[RFC4206], or bundled link in IEEE floating-point
format with units of bytes per second. For a link or
forwarding adjacency, residual bandwidth is defined to
be the Maximum Bandwidth [RFC5305] minus the bandwidth
currently allocated to RSVP-TE label switched paths.
For a bundled link, residual bandwidth is defined to
be the sum of the component link residual
bandwidths.
    """
    return self.__bandwidth
      
  def _set_bandwidth(self, v, load=False):
    """
    Setter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/residual_bandwidth/state/bandwidth (oc-types:ieeefloat32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth() directly.

    YANG Description: Residual bandwidth on a link,forwarding adjacency
[RFC4206], or bundled link in IEEE floating-point
format with units of bytes per second. For a link or
forwarding adjacency, residual bandwidth is defined to
be the Maximum Bandwidth [RFC5305] minus the bandwidth
currently allocated to RSVP-TE label switched paths.
For a bundled link, residual bandwidth is defined to
be the sum of the component link residual
bandwidths.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth must be of a type compatible with oc-types:ieeefloat32""",
          'defined-type': "oc-types:ieeefloat32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)""",
        })

    self.__bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth(self):
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)

  bandwidth = __builtin__.property(_get_bandwidth)


  _pyangbind_elements = OrderedDict([('bandwidth', bandwidth), ])


class yc_residual_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_residual_bandwidth(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/residual-bandwidth. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines unidirectional residual
bandwidth.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'residual-bandwidth'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_residual_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'residual-bandwidth']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/residual_bandwidth/state (container)

    YANG Description: State parameters of IS Extended Reachability sub-TLV
37.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/residual_bandwidth/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 parameters of IS Extended Reachability sub-TLV
37.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_residual_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_residual_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_residual_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_available_bandwidth_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/available-bandwidth/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS Extended Reachability sub-TLV
38.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__bandwidth',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'available-bandwidth', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/available_bandwidth/state/type (identityref)

    YANG Description: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/available_bandwidth/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: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_bandwidth(self):
    """
    Getter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/available_bandwidth/state/bandwidth (oc-types:ieeefloat32)

    YANG Description: The available bandwidth on a link, forwarding
adjacency, or bundled link in IEEE floating-point
format with units of bytes per second. For a link or
forwarding adjacency, available bandwidth is defined
to be residual bandwidth minus the measured bandwidth
used for the actual forwarding of non-RSVP-TE label
switched path packets.  For a bundled link, available
bandwidth is defined to be the sum of the component
link available bandwidths minus the measured bandwidth
used for the actual forwarding of non-RSVP-TE label
switched path packets.  For a bundled link, available
bandwidth is defined to be the sum of the component
link available bandwidths.
    """
    return self.__bandwidth
      
  def _set_bandwidth(self, v, load=False):
    """
    Setter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/available_bandwidth/state/bandwidth (oc-types:ieeefloat32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth() directly.

    YANG Description: The available bandwidth on a link, forwarding
adjacency, or bundled link in IEEE floating-point
format with units of bytes per second. For a link or
forwarding adjacency, available bandwidth is defined
to be residual bandwidth minus the measured bandwidth
used for the actual forwarding of non-RSVP-TE label
switched path packets.  For a bundled link, available
bandwidth is defined to be the sum of the component
link available bandwidths minus the measured bandwidth
used for the actual forwarding of non-RSVP-TE label
switched path packets.  For a bundled link, available
bandwidth is defined to be the sum of the component
link available bandwidths.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth must be of a type compatible with oc-types:ieeefloat32""",
          'defined-type': "oc-types:ieeefloat32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)""",
        })

    self.__bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth(self):
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)

  type = __builtin__.property(_get_type)
  bandwidth = __builtin__.property(_get_bandwidth)


  _pyangbind_elements = OrderedDict([('type', type), ('bandwidth', bandwidth), ])


class yc_available_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_available_bandwidth(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/available-bandwidth. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines unidirectional lavailable
bandwidth.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'available-bandwidth'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_available_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'available-bandwidth']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/available_bandwidth/state (container)

    YANG Description: State parameters of IS Extended Reachability sub-TLV
38.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/available_bandwidth/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 parameters of IS Extended Reachability sub-TLV
38.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_available_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_available_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_available_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_utilized_bandwidth_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/utilized-bandwidth/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of IS Extended Reachability sub-TLV
39.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__bandwidth',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'utilized-bandwidth', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/utilized_bandwidth/state/type (identityref)

    YANG Description: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/utilized_bandwidth/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: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_bandwidth(self):
    """
    Getter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/utilized_bandwidth/state/bandwidth (oc-types:ieeefloat32)

    YANG Description: The bandwidth utilization on a link, forwarding
adjacency, or bundled link in IEEE floating-point
format with units of bytes per second.  For a link or
forwarding adjacency, bandwidth utilization represents
the actual utilization of the link (i.e., as measured
by the advertising node).  For a bundled link,
bandwidth utilization is defined to be the sum of the
component link bandwidth utilizations.
    """
    return self.__bandwidth
      
  def _set_bandwidth(self, v, load=False):
    """
    Setter method for bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/utilized_bandwidth/state/bandwidth (oc-types:ieeefloat32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth() directly.

    YANG Description: The bandwidth utilization on a link, forwarding
adjacency, or bundled link in IEEE floating-point
format with units of bytes per second.  For a link or
forwarding adjacency, bandwidth utilization represents
the actual utilization of the link (i.e., as measured
by the advertising node).  For a bundled link,
bandwidth utilization is defined to be the sum of the
component link bandwidth utilizations.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth must be of a type compatible with oc-types:ieeefloat32""",
          'defined-type': "oc-types:ieeefloat32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)""",
        })

    self.__bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth(self):
    self.__bandwidth = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)

  type = __builtin__.property(_get_type)
  bandwidth = __builtin__.property(_get_bandwidth)


  _pyangbind_elements = OrderedDict([('type', type), ('bandwidth', bandwidth), ])


class yc_utilized_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_utilized_bandwidth(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/utilized-bandwidth. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines unidirectional utilized
bandwidth.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'utilized-bandwidth'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_utilized_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv', 'utilized-bandwidth']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/utilized_bandwidth/state (container)

    YANG Description: State parameters of IS Extended Reachability sub-TLV
39.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/utilized_bandwidth/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 parameters of IS Extended Reachability sub-TLV
39.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_utilized_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_utilized_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_utilized_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of subTLV types in the LSDB for the specified TLV.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__state','__admin_group','__link_id','__ipv4_interface_address','__ipv4_neighbor_address','__max_link_bandwidth','__max_reservable_link_bandwidth','__unreserved_bandwidth','__ipv6_interface_address','__ipv6_neighbor_address','__extended_admin_group','__te_default_metric','__link_attributes','__link_protection_type','__bandwidth_constraints','__unconstrained_lsp','__adjacency_sids','__lan_adjacency_sids','__link_delay','__min_max_link_delay','__link_delay_variation','__link_loss','__residual_bandwidth','__available_bandwidth','__utilized_bandwidth',)

  _yang_name = 'subtlv'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__admin_group = YANGDynClass(base=yc_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_admin_group, is_container='container', yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__link_id = YANGDynClass(base=yc_link_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_id, is_container='container', yang_name="link-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ipv4_interface_address = YANGDynClass(base=yc_ipv4_interface_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_interface_address, is_container='container', yang_name="ipv4-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ipv4_neighbor_address = YANGDynClass(base=yc_ipv4_neighbor_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_neighbor_address, is_container='container', yang_name="ipv4-neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__max_link_bandwidth = YANGDynClass(base=yc_max_link_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_link_bandwidth, is_container='container', yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__max_reservable_link_bandwidth = YANGDynClass(base=yc_max_reservable_link_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_reservable_link_bandwidth, is_container='container', yang_name="max-reservable-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unreserved_bandwidth = YANGDynClass(base=yc_unreserved_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth, is_container='container', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ipv6_interface_address = YANGDynClass(base=yc_ipv6_interface_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_interface_address, is_container='container', yang_name="ipv6-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ipv6_neighbor_address = YANGDynClass(base=yc_ipv6_neighbor_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_neighbor_address, is_container='container', yang_name="ipv6-neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__extended_admin_group = YANGDynClass(base=yc_extended_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_extended_admin_group, is_container='container', yang_name="extended-admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__te_default_metric = YANGDynClass(base=yc_te_default_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_te_default_metric, is_container='container', yang_name="te-default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__link_attributes = YANGDynClass(base=yc_link_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_attributes, is_container='container', yang_name="link-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__link_protection_type = YANGDynClass(base=yc_link_protection_type_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_protection_type, is_container='container', yang_name="link-protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__bandwidth_constraints = YANGDynClass(base=yc_bandwidth_constraints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints, is_container='container', yang_name="bandwidth-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__unconstrained_lsp = YANGDynClass(base=yc_unconstrained_lsp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unconstrained_lsp, is_container='container', yang_name="unconstrained-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__adjacency_sids = YANGDynClass(base=yc_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids, is_container='container', yang_name="adjacency-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__lan_adjacency_sids = YANGDynClass(base=yc_lan_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids, is_container='container', yang_name="lan-adjacency-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__link_delay = YANGDynClass(base=yc_link_delay_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay, is_container='container', yang_name="link-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__min_max_link_delay = YANGDynClass(base=yc_min_max_link_delay_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_min_max_link_delay, is_container='container', yang_name="min-max-link-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__link_delay_variation = YANGDynClass(base=yc_link_delay_variation_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_variation, is_container='container', yang_name="link-delay-variation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__link_loss = YANGDynClass(base=yc_link_loss_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_loss, is_container='container', yang_name="link-loss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__residual_bandwidth = YANGDynClass(base=yc_residual_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_residual_bandwidth, is_container='container', yang_name="residual-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__available_bandwidth = YANGDynClass(base=yc_available_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_available_bandwidth, is_container='container', yang_name="available-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__utilized_bandwidth = YANGDynClass(base=yc_utilized_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_utilized_bandwidth, is_container='container', yang_name="utilized-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs', 'subtlv']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/type (leafref)

    YANG Description: Reference to the sub-TLV type.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/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 sub-TLV type.
    """
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/state (container)

    YANG Description: State parameters of IS neighbor state
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/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 parameters of IS neighbor state
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_admin_group(self):
    """
    Getter method for admin_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/admin_group (container)

    YANG Description: This container defines sub-TLV 3.
    """
    return self.__admin_group
      
  def _set_admin_group(self, v, load=False):
    """
    Setter method for admin_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/admin_group (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_admin_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_admin_group() directly.

    YANG Description: This container defines sub-TLV 3.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_admin_group, is_container='container', yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """admin_group must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_admin_group, is_container='container', yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__admin_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_admin_group(self):
    self.__admin_group = YANGDynClass(base=yc_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_admin_group, is_container='container', yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_link_id(self):
    """
    Getter method for link_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_id (container)

    YANG Description: This container defines sub-TLV 4.
    """
    return self.__link_id
      
  def _set_link_id(self, v, load=False):
    """
    Setter method for link_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_id (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_id() directly.

    YANG Description: This container defines sub-TLV 4.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_link_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_id, is_container='container', yang_name="link-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_id must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_link_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_id, is_container='container', yang_name="link-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__link_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_id(self):
    self.__link_id = YANGDynClass(base=yc_link_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_id, is_container='container', yang_name="link-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ipv4_interface_address(self):
    """
    Getter method for ipv4_interface_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_interface_address (container)

    YANG Description: This container defines sub-TLV 6.
    """
    return self.__ipv4_interface_address
      
  def _set_ipv4_interface_address(self, v, load=False):
    """
    Setter method for ipv4_interface_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_interface_address (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv4_interface_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv4_interface_address() directly.

    YANG Description: This container defines sub-TLV 6.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv4_interface_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_interface_address, is_container='container', yang_name="ipv4-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv4_interface_address must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv4_interface_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_interface_address, is_container='container', yang_name="ipv4-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ipv4_interface_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv4_interface_address(self):
    self.__ipv4_interface_address = YANGDynClass(base=yc_ipv4_interface_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_interface_address, is_container='container', yang_name="ipv4-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ipv4_neighbor_address(self):
    """
    Getter method for ipv4_neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_neighbor_address (container)

    YANG Description: This container defines sub-TLV 8.
    """
    return self.__ipv4_neighbor_address
      
  def _set_ipv4_neighbor_address(self, v, load=False):
    """
    Setter method for ipv4_neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv4_neighbor_address (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv4_neighbor_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv4_neighbor_address() directly.

    YANG Description: This container defines sub-TLV 8.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv4_neighbor_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_neighbor_address, is_container='container', yang_name="ipv4-neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv4_neighbor_address must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv4_neighbor_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_neighbor_address, is_container='container', yang_name="ipv4-neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ipv4_neighbor_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv4_neighbor_address(self):
    self.__ipv4_neighbor_address = YANGDynClass(base=yc_ipv4_neighbor_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv4_neighbor_address, is_container='container', yang_name="ipv4-neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_max_link_bandwidth(self):
    """
    Getter method for max_link_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_link_bandwidth (container)

    YANG Description: This container defines sub-TLV 9.
    """
    return self.__max_link_bandwidth
      
  def _set_max_link_bandwidth(self, v, load=False):
    """
    Setter method for max_link_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_link_bandwidth (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_link_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_link_bandwidth() directly.

    YANG Description: This container defines sub-TLV 9.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_max_link_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_link_bandwidth, is_container='container', yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_link_bandwidth must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_max_link_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_link_bandwidth, is_container='container', yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__max_link_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_link_bandwidth(self):
    self.__max_link_bandwidth = YANGDynClass(base=yc_max_link_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_link_bandwidth, is_container='container', yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_max_reservable_link_bandwidth(self):
    """
    Getter method for max_reservable_link_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_reservable_link_bandwidth (container)

    YANG Description: This container defines sub-TLV 10.
    """
    return self.__max_reservable_link_bandwidth
      
  def _set_max_reservable_link_bandwidth(self, v, load=False):
    """
    Setter method for max_reservable_link_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/max_reservable_link_bandwidth (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_reservable_link_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_reservable_link_bandwidth() directly.

    YANG Description: This container defines sub-TLV 10.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_max_reservable_link_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_reservable_link_bandwidth, is_container='container', yang_name="max-reservable-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_reservable_link_bandwidth must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_max_reservable_link_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_reservable_link_bandwidth, is_container='container', yang_name="max-reservable-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__max_reservable_link_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_reservable_link_bandwidth(self):
    self.__max_reservable_link_bandwidth = YANGDynClass(base=yc_max_reservable_link_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_max_reservable_link_bandwidth, is_container='container', yang_name="max-reservable-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unreserved_bandwidth(self):
    """
    Getter method for unreserved_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth (container)

    YANG Description: This container defines unreserved-bandwidth. The units
are bytes per second.
    """
    return self.__unreserved_bandwidth
      
  def _set_unreserved_bandwidth(self, v, load=False):
    """
    Setter method for unreserved_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unreserved_bandwidth (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unreserved_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unreserved_bandwidth() directly.

    YANG Description: This container defines unreserved-bandwidth. The units
are bytes per second.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unreserved_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth, is_container='container', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unreserved_bandwidth must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unreserved_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth, is_container='container', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unreserved_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unreserved_bandwidth(self):
    self.__unreserved_bandwidth = YANGDynClass(base=yc_unreserved_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unreserved_bandwidth, is_container='container', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ipv6_interface_address(self):
    """
    Getter method for ipv6_interface_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_interface_address (container)

    YANG Description: This container defines sub-TLV 12.
    """
    return self.__ipv6_interface_address
      
  def _set_ipv6_interface_address(self, v, load=False):
    """
    Setter method for ipv6_interface_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_interface_address (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6_interface_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6_interface_address() directly.

    YANG Description: This container defines sub-TLV 12.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv6_interface_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_interface_address, is_container='container', yang_name="ipv6-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6_interface_address must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv6_interface_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_interface_address, is_container='container', yang_name="ipv6-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ipv6_interface_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6_interface_address(self):
    self.__ipv6_interface_address = YANGDynClass(base=yc_ipv6_interface_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_interface_address, is_container='container', yang_name="ipv6-interface-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ipv6_neighbor_address(self):
    """
    Getter method for ipv6_neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_neighbor_address (container)

    YANG Description: This container defines sub-TLV 13.
    """
    return self.__ipv6_neighbor_address
      
  def _set_ipv6_neighbor_address(self, v, load=False):
    """
    Setter method for ipv6_neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/ipv6_neighbor_address (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6_neighbor_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6_neighbor_address() directly.

    YANG Description: This container defines sub-TLV 13.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv6_neighbor_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_neighbor_address, is_container='container', yang_name="ipv6-neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6_neighbor_address must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv6_neighbor_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_neighbor_address, is_container='container', yang_name="ipv6-neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ipv6_neighbor_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6_neighbor_address(self):
    self.__ipv6_neighbor_address = YANGDynClass(base=yc_ipv6_neighbor_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_ipv6_neighbor_address, is_container='container', yang_name="ipv6-neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_extended_admin_group(self):
    """
    Getter method for extended_admin_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/extended_admin_group (container)

    YANG Description: This container defines sub-TLV 14.
    """
    return self.__extended_admin_group
      
  def _set_extended_admin_group(self, v, load=False):
    """
    Setter method for extended_admin_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/extended_admin_group (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended_admin_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended_admin_group() directly.

    YANG Description: This container defines sub-TLV 14.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_extended_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_extended_admin_group, is_container='container', yang_name="extended-admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended_admin_group must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_extended_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_extended_admin_group, is_container='container', yang_name="extended-admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__extended_admin_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended_admin_group(self):
    self.__extended_admin_group = YANGDynClass(base=yc_extended_admin_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_extended_admin_group, is_container='container', yang_name="extended-admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_te_default_metric(self):
    """
    Getter method for te_default_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/te_default_metric (container)

    YANG Description: This container defines sub-TLV 18.
    """
    return self.__te_default_metric
      
  def _set_te_default_metric(self, v, load=False):
    """
    Setter method for te_default_metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/te_default_metric (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_te_default_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_te_default_metric() directly.

    YANG Description: This container defines sub-TLV 18.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_te_default_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_te_default_metric, is_container='container', yang_name="te-default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """te_default_metric must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_te_default_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_te_default_metric, is_container='container', yang_name="te-default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__te_default_metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_te_default_metric(self):
    self.__te_default_metric = YANGDynClass(base=yc_te_default_metric_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_te_default_metric, is_container='container', yang_name="te-default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_link_attributes(self):
    """
    Getter method for link_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_attributes (container)

    YANG Description: This container defines link-attributes.
    """
    return self.__link_attributes
      
  def _set_link_attributes(self, v, load=False):
    """
    Setter method for link_attributes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_attributes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_attributes() directly.

    YANG Description: This container defines link-attributes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_link_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_attributes, is_container='container', yang_name="link-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_attributes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_link_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_attributes, is_container='container', yang_name="link-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__link_attributes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_attributes(self):
    self.__link_attributes = YANGDynClass(base=yc_link_attributes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_attributes, is_container='container', yang_name="link-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_link_protection_type(self):
    """
    Getter method for link_protection_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_protection_type (container)

    YANG Description: ISIS LSDB parameters relating to the type of link
protection offered.
    """
    return self.__link_protection_type
      
  def _set_link_protection_type(self, v, load=False):
    """
    Setter method for link_protection_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_protection_type (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_protection_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_protection_type() directly.

    YANG Description: ISIS LSDB parameters relating to the type of link
protection offered.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_link_protection_type_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_protection_type, is_container='container', yang_name="link-protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_protection_type must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_link_protection_type_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_protection_type, is_container='container', yang_name="link-protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__link_protection_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_protection_type(self):
    self.__link_protection_type = YANGDynClass(base=yc_link_protection_type_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_protection_type, is_container='container', yang_name="link-protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_bandwidth_constraints(self):
    """
    Getter method for bandwidth_constraints, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints (container)

    YANG Description: This container defines bandwidth-constraints. For DS-TE,
the existing Maximum Reservable link bandwidth parameter
is retained, but its semantics is generalized and
interpreted as the aggregate bandwidth constraint across
all Class-Types
    """
    return self.__bandwidth_constraints
      
  def _set_bandwidth_constraints(self, v, load=False):
    """
    Setter method for bandwidth_constraints, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/bandwidth_constraints (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth_constraints is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth_constraints() directly.

    YANG Description: This container defines bandwidth-constraints. For DS-TE,
the existing Maximum Reservable link bandwidth parameter
is retained, but its semantics is generalized and
interpreted as the aggregate bandwidth constraint across
all Class-Types
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_bandwidth_constraints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints, is_container='container', yang_name="bandwidth-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth_constraints must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_bandwidth_constraints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints, is_container='container', yang_name="bandwidth-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__bandwidth_constraints = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth_constraints(self):
    self.__bandwidth_constraints = YANGDynClass(base=yc_bandwidth_constraints_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_bandwidth_constraints, is_container='container', yang_name="bandwidth-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_unconstrained_lsp(self):
    """
    Getter method for unconstrained_lsp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unconstrained_lsp (container)

    YANG Description: This container defines sub-TLV 23.
    """
    return self.__unconstrained_lsp
      
  def _set_unconstrained_lsp(self, v, load=False):
    """
    Setter method for unconstrained_lsp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/unconstrained_lsp (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unconstrained_lsp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unconstrained_lsp() directly.

    YANG Description: This container defines sub-TLV 23.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unconstrained_lsp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unconstrained_lsp, is_container='container', yang_name="unconstrained-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unconstrained_lsp must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unconstrained_lsp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unconstrained_lsp, is_container='container', yang_name="unconstrained-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__unconstrained_lsp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unconstrained_lsp(self):
    self.__unconstrained_lsp = YANGDynClass(base=yc_unconstrained_lsp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_unconstrained_lsp, is_container='container', yang_name="unconstrained-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_adjacency_sids(self):
    """
    Getter method for adjacency_sids, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids (container)

    YANG Description: This container defines segment routing adjacency SIDs.
    """
    return self.__adjacency_sids
      
  def _set_adjacency_sids(self, v, load=False):
    """
    Setter method for adjacency_sids, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/adjacency_sids (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adjacency_sids is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adjacency_sids() directly.

    YANG Description: This container defines segment routing adjacency SIDs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids, is_container='container', yang_name="adjacency-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adjacency_sids must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids, is_container='container', yang_name="adjacency-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__adjacency_sids = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adjacency_sids(self):
    self.__adjacency_sids = YANGDynClass(base=yc_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_adjacency_sids, is_container='container', yang_name="adjacency-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_lan_adjacency_sids(self):
    """
    Getter method for lan_adjacency_sids, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids (container)

    YANG Description: This container defines segment routing LAN adjacency
SIDs
    """
    return self.__lan_adjacency_sids
      
  def _set_lan_adjacency_sids(self, v, load=False):
    """
    Setter method for lan_adjacency_sids, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/lan_adjacency_sids (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lan_adjacency_sids is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lan_adjacency_sids() directly.

    YANG Description: This container defines segment routing LAN adjacency
SIDs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_lan_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids, is_container='container', yang_name="lan-adjacency-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lan_adjacency_sids must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_lan_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids, is_container='container', yang_name="lan-adjacency-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__lan_adjacency_sids = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lan_adjacency_sids(self):
    self.__lan_adjacency_sids = YANGDynClass(base=yc_lan_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_lan_adjacency_sids, is_container='container', yang_name="lan-adjacency-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_link_delay(self):
    """
    Getter method for link_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay (container)

    YANG Description: This container defines unidirectional link delay.
    """
    return self.__link_delay
      
  def _set_link_delay(self, v, load=False):
    """
    Setter method for link_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_delay() directly.

    YANG Description: This container defines unidirectional link delay.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_link_delay_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay, is_container='container', yang_name="link-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_delay must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_link_delay_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay, is_container='container', yang_name="link-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__link_delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_delay(self):
    self.__link_delay = YANGDynClass(base=yc_link_delay_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay, is_container='container', yang_name="link-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_min_max_link_delay(self):
    """
    Getter method for min_max_link_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/min_max_link_delay (container)

    YANG Description: This container defines min/max link delay.
    """
    return self.__min_max_link_delay
      
  def _set_min_max_link_delay(self, v, load=False):
    """
    Setter method for min_max_link_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/min_max_link_delay (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_max_link_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_max_link_delay() directly.

    YANG Description: This container defines min/max link delay.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_min_max_link_delay_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_min_max_link_delay, is_container='container', yang_name="min-max-link-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_max_link_delay must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_min_max_link_delay_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_min_max_link_delay, is_container='container', yang_name="min-max-link-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__min_max_link_delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_min_max_link_delay(self):
    self.__min_max_link_delay = YANGDynClass(base=yc_min_max_link_delay_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_min_max_link_delay, is_container='container', yang_name="min-max-link-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_link_delay_variation(self):
    """
    Getter method for link_delay_variation, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay_variation (container)

    YANG Description: This container defines unidirectional link delay
variation.
    """
    return self.__link_delay_variation
      
  def _set_link_delay_variation(self, v, load=False):
    """
    Setter method for link_delay_variation, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_delay_variation (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_delay_variation is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_delay_variation() directly.

    YANG Description: This container defines unidirectional link delay
variation.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_link_delay_variation_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_variation, is_container='container', yang_name="link-delay-variation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_delay_variation must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_link_delay_variation_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_variation, is_container='container', yang_name="link-delay-variation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__link_delay_variation = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_delay_variation(self):
    self.__link_delay_variation = YANGDynClass(base=yc_link_delay_variation_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_delay_variation, is_container='container', yang_name="link-delay-variation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_link_loss(self):
    """
    Getter method for link_loss, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_loss (container)

    YANG Description: This container defines unidirectional link loss delay.
    """
    return self.__link_loss
      
  def _set_link_loss(self, v, load=False):
    """
    Setter method for link_loss, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/link_loss (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_loss is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_loss() directly.

    YANG Description: This container defines unidirectional link loss delay.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_link_loss_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_loss, is_container='container', yang_name="link-loss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_loss must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_link_loss_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_loss, is_container='container', yang_name="link-loss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__link_loss = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_loss(self):
    self.__link_loss = YANGDynClass(base=yc_link_loss_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_link_loss, is_container='container', yang_name="link-loss", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_residual_bandwidth(self):
    """
    Getter method for residual_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/residual_bandwidth (container)

    YANG Description: This container defines unidirectional residual
bandwidth.
    """
    return self.__residual_bandwidth
      
  def _set_residual_bandwidth(self, v, load=False):
    """
    Setter method for residual_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/residual_bandwidth (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_residual_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_residual_bandwidth() directly.

    YANG Description: This container defines unidirectional residual
bandwidth.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_residual_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_residual_bandwidth, is_container='container', yang_name="residual-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """residual_bandwidth must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_residual_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_residual_bandwidth, is_container='container', yang_name="residual-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__residual_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_residual_bandwidth(self):
    self.__residual_bandwidth = YANGDynClass(base=yc_residual_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_residual_bandwidth, is_container='container', yang_name="residual-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_available_bandwidth(self):
    """
    Getter method for available_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/available_bandwidth (container)

    YANG Description: This container defines unidirectional lavailable
bandwidth.
    """
    return self.__available_bandwidth
      
  def _set_available_bandwidth(self, v, load=False):
    """
    Setter method for available_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/available_bandwidth (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_available_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_available_bandwidth() directly.

    YANG Description: This container defines unidirectional lavailable
bandwidth.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_available_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_available_bandwidth, is_container='container', yang_name="available-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """available_bandwidth must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_available_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_available_bandwidth, is_container='container', yang_name="available-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__available_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_available_bandwidth(self):
    self.__available_bandwidth = YANGDynClass(base=yc_available_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_available_bandwidth, is_container='container', yang_name="available-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_utilized_bandwidth(self):
    """
    Getter method for utilized_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/utilized_bandwidth (container)

    YANG Description: This container defines unidirectional utilized
bandwidth.
    """
    return self.__utilized_bandwidth
      
  def _set_utilized_bandwidth(self, v, load=False):
    """
    Setter method for utilized_bandwidth, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv/utilized_bandwidth (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_utilized_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_utilized_bandwidth() directly.

    YANG Description: This container defines unidirectional utilized
bandwidth.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_utilized_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_utilized_bandwidth, is_container='container', yang_name="utilized-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """utilized_bandwidth must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_utilized_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_utilized_bandwidth, is_container='container', yang_name="utilized-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__utilized_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_utilized_bandwidth(self):
    self.__utilized_bandwidth = YANGDynClass(base=yc_utilized_bandwidth_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv_utilized_bandwidth, is_container='container', yang_name="utilized-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  type = __builtin__.property(_get_type)
  state = __builtin__.property(_get_state)
  admin_group = __builtin__.property(_get_admin_group)
  link_id = __builtin__.property(_get_link_id)
  ipv4_interface_address = __builtin__.property(_get_ipv4_interface_address)
  ipv4_neighbor_address = __builtin__.property(_get_ipv4_neighbor_address)
  max_link_bandwidth = __builtin__.property(_get_max_link_bandwidth)
  max_reservable_link_bandwidth = __builtin__.property(_get_max_reservable_link_bandwidth)
  unreserved_bandwidth = __builtin__.property(_get_unreserved_bandwidth)
  ipv6_interface_address = __builtin__.property(_get_ipv6_interface_address)
  ipv6_neighbor_address = __builtin__.property(_get_ipv6_neighbor_address)
  extended_admin_group = __builtin__.property(_get_extended_admin_group)
  te_default_metric = __builtin__.property(_get_te_default_metric)
  link_attributes = __builtin__.property(_get_link_attributes)
  link_protection_type = __builtin__.property(_get_link_protection_type)
  bandwidth_constraints = __builtin__.property(_get_bandwidth_constraints)
  unconstrained_lsp = __builtin__.property(_get_unconstrained_lsp)
  adjacency_sids = __builtin__.property(_get_adjacency_sids)
  lan_adjacency_sids = __builtin__.property(_get_lan_adjacency_sids)
  link_delay = __builtin__.property(_get_link_delay)
  min_max_link_delay = __builtin__.property(_get_min_max_link_delay)
  link_delay_variation = __builtin__.property(_get_link_delay_variation)
  link_loss = __builtin__.property(_get_link_loss)
  residual_bandwidth = __builtin__.property(_get_residual_bandwidth)
  available_bandwidth = __builtin__.property(_get_available_bandwidth)
  utilized_bandwidth = __builtin__.property(_get_utilized_bandwidth)


  _pyangbind_elements = OrderedDict([('type', type), ('state', state), ('admin_group', admin_group), ('link_id', link_id), ('ipv4_interface_address', ipv4_interface_address), ('ipv4_neighbor_address', ipv4_neighbor_address), ('max_link_bandwidth', max_link_bandwidth), ('max_reservable_link_bandwidth', max_reservable_link_bandwidth), ('unreserved_bandwidth', unreserved_bandwidth), ('ipv6_interface_address', ipv6_interface_address), ('ipv6_neighbor_address', ipv6_neighbor_address), ('extended_admin_group', extended_admin_group), ('te_default_metric', te_default_metric), ('link_attributes', link_attributes), ('link_protection_type', link_protection_type), ('bandwidth_constraints', bandwidth_constraints), ('unconstrained_lsp', unconstrained_lsp), ('adjacency_sids', adjacency_sids), ('lan_adjacency_sids', lan_adjacency_sids), ('link_delay', link_delay), ('min_max_link_delay', min_max_link_delay), ('link_delay_variation', link_delay_variation), ('link_loss', link_loss), ('residual_bandwidth', residual_bandwidth), ('available_bandwidth', available_bandwidth), ('utilized_bandwidth', utilized_bandwidth), ])


class yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/subtlvs. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container describes IS Neighbor sub-TLVs.
  """
  __slots__ = ('_path_helper', '_extmethods', '__subtlv',)

  _yang_name = 'subtlvs'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__subtlv = YANGDynClass(base=YANGListType("type",yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv, yang_name="subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'subtlvs']

  def _get_subtlv(self):
    """
    Getter method for subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv (list)

    YANG Description: List of subTLV types in the LSDB for the specified TLV.
    """
    return self.__subtlv
      
  def _set_subtlv(self, v, load=False):
    """
    Setter method for subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs/subtlv (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_subtlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_subtlv() directly.

    YANG Description: List of subTLV types in the LSDB for the specified TLV.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("type",yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv, yang_name="subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """subtlv must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("type",yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv, yang_name="subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__subtlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_subtlv(self):
    self.__subtlv = YANGDynClass(base=YANGListType("type",yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs_subtlv, yang_name="subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  subtlv = __builtin__.property(_get_subtlv)


  _pyangbind_elements = OrderedDict([('subtlv', subtlv), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_undefined_subtlvs_undefined_subtlv_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/undefined-subtlvs/undefined-subtlv/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of the undefined sub-TLV.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__length','__value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__value = YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'undefined-subtlvs', 'undefined-subtlv', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv/state/type (uint8)

    YANG Description: TLV Type.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv/state/type (uint8)
    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: TLV Type.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with uint8""",
          'defined-type': "uint8",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_length(self):
    """
    Getter method for length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv/state/length (uint8)

    YANG Description: TLV length.
    """
    return self.__length
      
  def _set_length(self, v, load=False):
    """
    Setter method for length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv/state/length (uint8)
    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: TLV length.
    """
    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="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """length 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="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', 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..255']}, int_size=8), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv/state/value (binary)

    YANG Description: TLV value.
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv/state/value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: TLV value.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  type = __builtin__.property(_get_type)
  length = __builtin__.property(_get_length)
  value = __builtin__.property(_get_value)


  _pyangbind_elements = OrderedDict([('type', type), ('length', length), ('value', value), ])


class yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_undefined_subtlvs_undefined_subtlv(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/undefined-subtlvs/undefined-subtlv. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Sub-TLVs that are not defined in the model or not
recognised by system.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__state',)

  _yang_name = 'undefined-subtlv'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_undefined_subtlvs_undefined_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'undefined-subtlvs', 'undefined-subtlv']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv/type (leafref)

    YANG Description: Reference to the type of the undefined sub-TLV
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv/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 type of the undefined sub-TLV
    """
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv/state (container)

    YANG Description: State parameters of the undefined sub-TLV.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv/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 parameters of the undefined sub-TLV.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_undefined_subtlvs_undefined_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_undefined_subtlvs_undefined_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_undefined_subtlvs_undefined_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  type = __builtin__.property(_get_type)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('type', type), ('state', state), ])


class yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_undefined_subtlvs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance/undefined-subtlvs. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container describes undefined ISIS TLVs.
  """
  __slots__ = ('_path_helper', '_extmethods', '__undefined_subtlv',)

  _yang_name = 'undefined-subtlvs'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__undefined_subtlv = YANGDynClass(base=YANGListType("type",yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_undefined_subtlvs_undefined_subtlv, yang_name="undefined-subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="undefined-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance', 'undefined-subtlvs']

  def _get_undefined_subtlv(self):
    """
    Getter method for undefined_subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv (list)

    YANG Description: Sub-TLVs that are not defined in the model or not
recognised by system.
    """
    return self.__undefined_subtlv
      
  def _set_undefined_subtlv(self, v, load=False):
    """
    Setter method for undefined_subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/undefined_subtlvs/undefined_subtlv (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_undefined_subtlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_undefined_subtlv() directly.

    YANG Description: Sub-TLVs that are not defined in the model or not
recognised by system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("type",yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_undefined_subtlvs_undefined_subtlv, yang_name="undefined-subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="undefined-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """undefined_subtlv must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("type",yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_undefined_subtlvs_undefined_subtlv, yang_name="undefined-subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="undefined-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__undefined_subtlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_undefined_subtlv(self):
    self.__undefined_subtlv = YANGDynClass(base=YANGListType("type",yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_undefined_subtlvs_undefined_subtlv, yang_name="undefined-subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="undefined-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  undefined_subtlv = __builtin__.property(_get_undefined_subtlv)


  _pyangbind_elements = OrderedDict([('undefined_subtlv', undefined_subtlv), ])


class yc_instance_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances/instance. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Instance of TLV-222 between the originating
and remote IS.
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__state','__subtlvs','__undefined_subtlvs',)

  _yang_name = 'instance'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__subtlvs = YANGDynClass(base=yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs, is_container='container', yang_name="subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__undefined_subtlvs = YANGDynClass(base=yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_undefined_subtlvs, is_container='container', yang_name="undefined-subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances', 'instance']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/id (leafref)

    YANG Description: Reference to the unique identifier for the
instance of the multi-topology IS neighbor
TLV instance.
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/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 the unique identifier for the
instance of the multi-topology IS neighbor
TLV instance.
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/state (container)

    YANG Description: State parameters of MT neighbor.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/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 parameters of MT neighbor.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_subtlvs(self):
    """
    Getter method for subtlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs (container)

    YANG Description: This container describes IS Neighbor sub-TLVs.
    """
    return self.__subtlvs
      
  def _set_subtlvs(self, v, load=False):
    """
    Setter method for subtlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/subtlvs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_subtlvs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_subtlvs() directly.

    YANG Description: This container describes IS Neighbor sub-TLVs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs, is_container='container', yang_name="subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """subtlvs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs, is_container='container', yang_name="subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__subtlvs = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_subtlvs(self):
    self.__subtlvs = YANGDynClass(base=yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_subtlvs, is_container='container', yang_name="subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_undefined_subtlvs(self):
    """
    Getter method for undefined_subtlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/undefined_subtlvs (container)

    YANG Description: This container describes undefined ISIS TLVs.
    """
    return self.__undefined_subtlvs
      
  def _set_undefined_subtlvs(self, v, load=False):
    """
    Setter method for undefined_subtlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance/undefined_subtlvs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_undefined_subtlvs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_undefined_subtlvs() directly.

    YANG Description: This container describes undefined ISIS TLVs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_undefined_subtlvs, is_container='container', yang_name="undefined-subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """undefined_subtlvs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_undefined_subtlvs, is_container='container', yang_name="undefined-subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__undefined_subtlvs = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_undefined_subtlvs(self):
    self.__undefined_subtlvs = YANGDynClass(base=yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance_undefined_subtlvs, is_container='container', yang_name="undefined-subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  id = __builtin__.property(_get_id)
  state = __builtin__.property(_get_state)
  subtlvs = __builtin__.property(_get_subtlvs)
  undefined_subtlvs = __builtin__.property(_get_undefined_subtlvs)


  _pyangbind_elements = OrderedDict([('id', id), ('state', state), ('subtlvs', subtlvs), ('undefined_subtlvs', undefined_subtlvs), ])


class yc_instances_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor/instances. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This list contains all instances of an adjacency
between the originating and remote IS. Multiple
instances are used to indicate where there are
parallel adjacencies between systems.
  """
  __slots__ = ('_path_helper', '_extmethods', '__instance',)

  _yang_name = 'instances'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__instance = YANGDynClass(base=YANGListType("id",yc_instance_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance, yang_name="instance", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor', 'instances']

  def _get_instance(self):
    """
    Getter method for instance, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance (list)

    YANG Description: Instance of TLV-222 between the originating
and remote IS.
    """
    return self.__instance
      
  def _set_instance(self, v, load=False):
    """
    Setter method for instance, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances/instance (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_instance is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_instance() directly.

    YANG Description: Instance of TLV-222 between the originating
and remote IS.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("id",yc_instance_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance, yang_name="instance", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """instance must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("id",yc_instance_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance, yang_name="instance", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__instance = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_instance(self):
    self.__instance = YANGDynClass(base=YANGListType("id",yc_instance_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances_instance, yang_name="instance", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  instance = __builtin__.property(_get_instance)


  _pyangbind_elements = OrderedDict([('instance', instance), ])


class yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors/neighbor. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container describes IS neighbors.
  """
  __slots__ = ('_path_helper', '_extmethods', '__mt_id','__system_id','__state','__instances',)

  _yang_name = 'neighbor'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__mt_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mt-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__system_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__instances = YANGDynClass(base=yc_instances_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances, is_container='container', yang_name="instances", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors', 'neighbor']

  def _get_mt_id(self):
    """
    Getter method for mt_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/mt_id (leafref)

    YANG Description: Reference to the topology that the neighbor is
within.
    """
    return self.__mt_id
      
  def _set_mt_id(self, v, load=False):
    """
    Setter method for mt_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/mt_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mt_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mt_id() directly.

    YANG Description: Reference to the topology that the neighbor is
within.
    """
    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="mt-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mt_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mt-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__mt_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mt_id(self):
    self.__mt_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mt-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_system_id(self):
    """
    Getter method for system_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/system_id (leafref)

    YANG Description: Reference to the System ID of the neighbor.
    """
    return self.__system_id
      
  def _set_system_id(self, v, load=False):
    """
    Setter method for system_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/system_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_system_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_system_id() directly.

    YANG Description: Reference to the System ID of the neighbor.
    """
    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="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """system_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__system_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_system_id(self):
    self.__system_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/state (container)

    YANG Description: Operational state parameters related to the
MT ISN TLV.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/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 related to the
MT ISN TLV.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_instances(self):
    """
    Getter method for instances, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances (container)

    YANG Description: This list contains all instances of an adjacency
between the originating and remote IS. Multiple
instances are used to indicate where there are
parallel adjacencies between systems.
    """
    return self.__instances
      
  def _set_instances(self, v, load=False):
    """
    Setter method for instances, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/instances (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_instances is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_instances() directly.

    YANG Description: This list contains all instances of an adjacency
between the originating and remote IS. Multiple
instances are used to indicate where there are
parallel adjacencies between systems.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_instances_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances, is_container='container', yang_name="instances", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """instances must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_instances_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances, is_container='container', yang_name="instances", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__instances = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_instances(self):
    self.__instances = YANGDynClass(base=yc_instances_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor_instances, is_container='container', yang_name="instances", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  mt_id = __builtin__.property(_get_mt_id)
  system_id = __builtin__.property(_get_system_id)
  state = __builtin__.property(_get_state)
  instances = __builtin__.property(_get_instances)


  _pyangbind_elements = OrderedDict([('mt_id', mt_id), ('system_id', system_id), ('state', state), ('instances', instances), ])


class yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute/neighbors. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: MT-IS neigbor attributes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__neighbor',)

  _yang_name = 'neighbors'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__neighbor = YANGDynClass(base=YANGListType("mt_id system_id",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mt-id system-id', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute', 'neighbors']

  def _get_neighbor(self):
    """
    Getter method for neighbor, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor (list)

    YANG Description: This container describes IS neighbors.
    """
    return self.__neighbor
      
  def _set_neighbor(self, v, load=False):
    """
    Setter method for neighbor, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor() directly.

    YANG Description: This container describes IS neighbors.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("mt_id system_id",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mt-id system-id', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("mt_id system_id",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mt-id system-id', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__neighbor = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor(self):
    self.__neighbor = YANGDynClass(base=YANGListType("mt_id system_id",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mt-id system-id', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  neighbor = __builtin__.property(_get_neighbor)


  _pyangbind_elements = OrderedDict([('neighbor', neighbor), ])


class yc_mt_isis_neighbor_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-isis-neighbor-attribute. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines list of ISIS multi-topology
neighbors.
  """
  __slots__ = ('_path_helper', '_extmethods', '__neighbors',)

  _yang_name = 'mt-isis-neighbor-attribute'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__neighbors = YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-isis-neighbor-attribute']

  def _get_neighbors(self):
    """
    Getter method for neighbors, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors (container)

    YANG Description: MT-IS neigbor attributes.
    """
    return self.__neighbors
      
  def _set_neighbors(self, v, load=False):
    """
    Setter method for neighbors, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbors is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbors() directly.

    YANG Description: MT-IS neigbor attributes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbors must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__neighbors = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbors(self):
    self.__neighbors = YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  neighbors = __builtin__.property(_get_neighbors)


  _pyangbind_elements = OrderedDict([('neighbors', neighbors), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv4-reachability/prefixes/prefix/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of an IPv4 extended prefix.
  """
  __slots__ = ('_path_helper', '_extmethods', '__up_down','__s_bit','__prefix','__metric','__mt_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__up_down = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="up-down", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__s_bit = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="s-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__prefix = 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-prefix', is_config=False)
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:wide-metric', is_config=False)
    self.__mt_id = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..4095']}), is_leaf=True, yang_name="mt-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv4-reachability', 'prefixes', 'prefix', 'state']

  def _get_up_down(self):
    """
    Getter method for up_down, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/state/up_down (boolean)

    YANG Description: The up/down bit. Set if a prefix is advertised from a
higher level to a lower level (e.g., level 2 to level 1),
indicating that the prefix has traveled down the hierarchy.
Prefixes that have the up/down bit set may only be
advertised down the hierarchy, i.e., to lower levels. When a
prefix is first injected into IS-IS, the bit is UNSET.
    """
    return self.__up_down
      
  def _set_up_down(self, v, load=False):
    """
    Setter method for up_down, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/state/up_down (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_up_down is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_up_down() directly.

    YANG Description: The up/down bit. Set if a prefix is advertised from a
higher level to a lower level (e.g., level 2 to level 1),
indicating that the prefix has traveled down the hierarchy.
Prefixes that have the up/down bit set may only be
advertised down the hierarchy, i.e., to lower levels. When a
prefix is first injected into IS-IS, the bit is UNSET.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="up-down", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """up_down must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="up-down", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__up_down = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_up_down(self):
    self.__up_down = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="up-down", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_s_bit(self):
    """
    Getter method for s_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/state/s_bit (boolean)

    YANG Description: The Sub-TLV present bit. If UNSET, the octets of Sub-TLVs
are not present. Otherwise, the bit is set and the octet
following the prefix will contain the length of the Sub-TLV
portion of the structure.
    """
    return self.__s_bit
      
  def _set_s_bit(self, v, load=False):
    """
    Setter method for s_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/state/s_bit (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_s_bit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_s_bit() directly.

    YANG Description: The Sub-TLV present bit. If UNSET, the octets of Sub-TLVs
are not present. Otherwise, the bit is set and the octet
following the prefix will contain the length of the Sub-TLV
portion of the structure.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="s-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """s_bit must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="s-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__s_bit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_s_bit(self):
    self.__s_bit = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="s-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/state/prefix (inet:ipv4-prefix)

    YANG Description: IPv4 prefix contained within extended reachability TLVs.
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/state/prefix (inet:ipv4-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: IPv4 prefix contained within extended reachability TLVs.
    """
    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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with inet:ipv4-prefix""",
          'defined-type': "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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-prefix', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-prefix', is_config=False)


  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/state/metric (oc-isis-types:wide-metric)

    YANG Description: ISIS metric value.
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/state/metric (oc-isis-types:wide-metric)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: ISIS metric value.
    """
    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': ['1..16777215']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:wide-metric', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric must be of a type compatible with oc-isis-types:wide-metric""",
          'defined-type': "oc-isis-types:wide-metric",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:wide-metric', is_config=False)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:wide-metric', is_config=False)


  def _get_mt_id(self):
    """
    Getter method for mt_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/state/mt_id (uint16)

    YANG Description: Multi-topology ID
    """
    return self.__mt_id
      
  def _set_mt_id(self, v, load=False):
    """
    Setter method for mt_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/state/mt_id (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mt_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mt_id() directly.

    YANG Description: Multi-topology ID
    """
    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': ['0..4095']}), is_leaf=True, yang_name="mt-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mt_id must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..4095']}), is_leaf=True, yang_name="mt-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__mt_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mt_id(self):
    self.__mt_id = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..4095']}), is_leaf=True, yang_name="mt-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  up_down = __builtin__.property(_get_up_down)
  s_bit = __builtin__.property(_get_s_bit)
  prefix = __builtin__.property(_get_prefix)
  metric = __builtin__.property(_get_metric)
  mt_id = __builtin__.property(_get_mt_id)


  _pyangbind_elements = OrderedDict([('up_down', up_down), ('s_bit', s_bit), ('prefix', prefix), ('metric', metric), ('mt_id', mt_id), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv4-reachability/prefixes/prefix/subtlvs/subtlv/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters for a prefix.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv4-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/state/type (identityref)

    YANG Description: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/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: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  type = __builtin__.property(_get_type)


  _pyangbind_elements = OrderedDict([('type', type), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_tag_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv4-reachability/prefixes/prefix/subtlvs/subtlv/tag/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 1.
  """
  __slots__ = ('_path_helper', '_extmethods', '__tag32',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__tag32 = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="tag32", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv4-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'tag', 'state']

  def _get_tag32(self):
    """
    Getter method for tag32, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/tag/state/tag32 (uint32)

    YANG Description: List of 32-bit tags associated with the prefix. Example
uses of these tags include carrying BGP standard (or
extended) communities and controlling redistribution
between levels and areas, different routing protocols,
or multiple instances of IS-IS running on the same
router.
    """
    return self.__tag32
      
  def _set_tag32(self, v, load=False):
    """
    Setter method for tag32, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/tag/state/tag32 (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tag32 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tag32() directly.

    YANG Description: List of 32-bit tags associated with the prefix. Example
uses of these tags include carrying BGP standard (or
extended) communities and controlling redistribution
between levels and areas, different routing protocols,
or multiple instances of IS-IS running on the same
router.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="tag32", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tag32 must be of a type compatible with uint32""",
          'defined-type': "uint32",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="tag32", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__tag32 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tag32(self):
    self.__tag32 = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="tag32", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  tag32 = __builtin__.property(_get_tag32)


  _pyangbind_elements = OrderedDict([('tag32', tag32), ])


class yc_tag_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_tag(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv4-reachability/prefixes/prefix/subtlvs/subtlv/tag. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 1.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'tag'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_tag_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv4-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'tag']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/tag/state (container)

    YANG Description: State parameters of sub-TLV 1.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/tag/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 parameters of sub-TLV 1.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_tag_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_tag_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_tag_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_tag64_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv4-reachability/prefixes/prefix/subtlvs/subtlv/tag64/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 2.
  """
  __slots__ = ('_path_helper', '_extmethods', '__tag64',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__tag64 = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)), is_leaf=False, yang_name="tag64", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv4-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'tag64', 'state']

  def _get_tag64(self):
    """
    Getter method for tag64, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/tag64/state/tag64 (uint64)

    YANG Description: List of 64-bit tags associated with the prefix. Example
uses of these tags include carrying BGP standard (or
extended) communities and controlling redistribution
between levels and areas, different routing protocols,
or multiple instances of IS-IS running on the same
router.
    """
    return self.__tag64
      
  def _set_tag64(self, v, load=False):
    """
    Setter method for tag64, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/tag64/state/tag64 (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tag64 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tag64() directly.

    YANG Description: List of 64-bit tags associated with the prefix. Example
uses of these tags include carrying BGP standard (or
extended) communities and controlling redistribution
between levels and areas, different routing protocols,
or multiple instances of IS-IS running on the same
router.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)), is_leaf=False, yang_name="tag64", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tag64 must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)), is_leaf=False, yang_name="tag64", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__tag64 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tag64(self):
    self.__tag64 = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)), is_leaf=False, yang_name="tag64", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)

  tag64 = __builtin__.property(_get_tag64)


  _pyangbind_elements = OrderedDict([('tag64', tag64), ])


class yc_tag64_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_tag64(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv4-reachability/prefixes/prefix/subtlvs/subtlv/tag64. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 2.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'tag64'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_tag64_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv4-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'tag64']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/tag64/state (container)

    YANG Description: State parameters of sub-TLV 2.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/tag64/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 parameters of sub-TLV 2.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_tag64_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_tag64_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_tag64_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_flags_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv4-reachability/prefixes/prefix/subtlvs/subtlv/flags/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 4.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__flags',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXTERNAL_FLAG': {}, 'READVERTISEMENT_FLAG': {}, 'NODE_FLAG': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv4-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'flags', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/flags/state/type (identityref)

    YANG Description: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/flags/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: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_flags(self):
    """
    Getter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/flags/state/flags (enumeration)

    YANG Description: Additional prefix reachability flags.
    """
    return self.__flags
      
  def _set_flags(self, v, load=False):
    """
    Setter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/flags/state/flags (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flags() directly.

    YANG Description: Additional prefix reachability flags.
    """
    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={'EXTERNAL_FLAG': {}, 'READVERTISEMENT_FLAG': {}, 'NODE_FLAG': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flags must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXTERNAL_FLAG': {}, 'READVERTISEMENT_FLAG': {}, 'NODE_FLAG': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_flags(self):
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXTERNAL_FLAG': {}, 'READVERTISEMENT_FLAG': {}, 'NODE_FLAG': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)

  type = __builtin__.property(_get_type)
  flags = __builtin__.property(_get_flags)


  _pyangbind_elements = OrderedDict([('type', type), ('flags', flags), ])


class yc_flags_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_flags(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv4-reachability/prefixes/prefix/subtlvs/subtlv/flags. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 4.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'flags'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_flags_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv4-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'flags']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/flags/state (container)

    YANG Description: State parameters of sub-TLV 4.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/flags/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 parameters of sub-TLV 4.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_flags_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_flags_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_flags_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_ipv4_source_router_id_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv4-reachability/prefixes/prefix/subtlvs/subtlv/ipv4-source-router-id/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 11.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__router_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__router_id = 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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv4-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'ipv4-source-router-id', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/ipv4_source_router_id/state/type (identityref)

    YANG Description: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/ipv4_source_router_id/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: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_router_id(self):
    """
    Getter method for router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/ipv4_source_router_id/state/router_id (inet:ipv4-address)

    YANG Description: IPv4 Source router ID address. In cases where the
advertisement is an identifier for the advertising
router (e.g., with the N-flag set in the Prefix
Attribute Flags sub-TLV), it may be useful for other
routers to know the source of the advertisement. When
reachability advertisement is leaked from one level to
another, Router ID advertised is always the Router ID
of the IS-IS instance that originated the
advertisement. This would be true even if the prefix
had been learned from another protocol.
    """
    return self.__router_id
      
  def _set_router_id(self, v, load=False):
    """
    Setter method for router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/ipv4_source_router_id/state/router_id (inet:ipv4-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_router_id() directly.

    YANG Description: IPv4 Source router ID address. In cases where the
advertisement is an identifier for the advertising
router (e.g., with the N-flag set in the Prefix
Attribute Flags sub-TLV), it may be useful for other
routers to know the source of the advertisement. When
reachability advertisement is leaked from one level to
another, Router ID advertised is always the Router ID
of the IS-IS instance that originated the
advertisement. This would be true even if the prefix
had been learned from another protocol.
    """
    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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """router_id must be of a type compatible with inet:ipv4-address""",
          'defined-type': "inet:ipv4-address",
          '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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)""",
        })

    self.__router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_router_id(self):
    self.__router_id = 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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)

  type = __builtin__.property(_get_type)
  router_id = __builtin__.property(_get_router_id)


  _pyangbind_elements = OrderedDict([('type', type), ('router_id', router_id), ])


class yc_ipv4_source_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_ipv4_source_router_id(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv4-reachability/prefixes/prefix/subtlvs/subtlv/ipv4-source-router-id. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 11.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'ipv4-source-router-id'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_ipv4_source_router_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv4-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'ipv4-source-router-id']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/ipv4_source_router_id/state (container)

    YANG Description: State parameters of sub-TLV 11.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/ipv4_source_router_id/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 parameters of sub-TLV 11.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_ipv4_source_router_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_ipv4_source_router_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_ipv4_source_router_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_ipv6_source_router_id_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv4-reachability/prefixes/prefix/subtlvs/subtlv/ipv6-source-router-id/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 12.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__router_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__router_id = 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}|:))'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv4-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'ipv6-source-router-id', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/ipv6_source_router_id/state/type (identityref)

    YANG Description: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/ipv6_source_router_id/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: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_router_id(self):
    """
    Getter method for router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/ipv6_source_router_id/state/router_id (inet:ipv6-address)

    YANG Description: IPv6 Source router ID address. In cases where the
advertisement is an identifier for the advertising
router (e.g., with the N-flag set in the Prefix
Attribute Flags sub-TLV), it may be useful for other
routers to know the source of the advertisement. When
reachability advertisement is leaked from one level to
another, Router ID advertised is always the Router ID
of the IS-IS instance that originated the
advertisement. This would be true even if the prefix
had been learned from another protocol.
    """
    return self.__router_id
      
  def _set_router_id(self, v, load=False):
    """
    Setter method for router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/ipv6_source_router_id/state/router_id (inet:ipv6-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_router_id() directly.

    YANG Description: IPv6 Source router ID address. In cases where the
advertisement is an identifier for the advertising
router (e.g., with the N-flag set in the Prefix
Attribute Flags sub-TLV), it may be useful for other
routers to know the source of the advertisement. When
reachability advertisement is leaked from one level to
another, Router ID advertised is always the Router ID
of the IS-IS instance that originated the
advertisement. This would be true even if the prefix
had been learned from another protocol.
    """
    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}|:))'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """router_id must be of a type compatible with inet:ipv6-address""",
          'defined-type': "inet:ipv6-address",
          '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}|:))'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)""",
        })

    self.__router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_router_id(self):
    self.__router_id = 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}|:))'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)

  type = __builtin__.property(_get_type)
  router_id = __builtin__.property(_get_router_id)


  _pyangbind_elements = OrderedDict([('type', type), ('router_id', router_id), ])


class yc_ipv6_source_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_ipv6_source_router_id(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv4-reachability/prefixes/prefix/subtlvs/subtlv/ipv6-source-router-id. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 12.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'ipv6-source-router-id'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_ipv6_source_router_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv4-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'ipv6-source-router-id']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/ipv6_source_router_id/state (container)

    YANG Description: State parameters of sub-TLV 12.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/ipv6_source_router_id/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 parameters of sub-TLV 12.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_ipv6_source_router_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_ipv6_source_router_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_ipv6_source_router_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids_prefix_sid_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv4-reachability/prefixes/prefix/subtlvs/subtlv/prefix-sids/prefix-sid/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters for Prefix-SID.
  """
  __slots__ = ('_path_helper', '_extmethods', '__value','__flags','__algorithm',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'READVERTISEMENT': {}, 'NODE': {}, 'NO_PHP': {}, 'EXPLICIT_NULL': {}, 'VALUE': {}, 'LOCAL': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__algorithm = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="algorithm", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv4-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'prefix-sids', 'prefix-sid', 'state']

  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid/state/value (uint32)

    YANG Description: IGP Prefix-SID value.
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid/state/value (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: IGP Prefix-SID value.
    """
    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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value 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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_flags(self):
    """
    Getter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid/state/flags (enumeration)

    YANG Description: Flags associated with Prefix Segment-ID.
    """
    return self.__flags
      
  def _set_flags(self, v, load=False):
    """
    Setter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid/state/flags (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flags() directly.

    YANG Description: Flags associated with Prefix Segment-ID.
    """
    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={'READVERTISEMENT': {}, 'NODE': {}, 'NO_PHP': {}, 'EXPLICIT_NULL': {}, 'VALUE': {}, 'LOCAL': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flags must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'READVERTISEMENT': {}, 'NODE': {}, 'NO_PHP': {}, 'EXPLICIT_NULL': {}, 'VALUE': {}, 'LOCAL': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_flags(self):
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'READVERTISEMENT': {}, 'NODE': {}, 'NO_PHP': {}, 'EXPLICIT_NULL': {}, 'VALUE': {}, 'LOCAL': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_algorithm(self):
    """
    Getter method for algorithm, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid/state/algorithm (uint8)

    YANG Description: Prefix-SID algorithm to be used for path computation.
    """
    return self.__algorithm
      
  def _set_algorithm(self, v, load=False):
    """
    Setter method for algorithm, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid/state/algorithm (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_algorithm is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_algorithm() directly.

    YANG Description: Prefix-SID algorithm to be used for path computation.
    """
    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="algorithm", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """algorithm 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="algorithm", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__algorithm = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_algorithm(self):
    self.__algorithm = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="algorithm", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)

  value = __builtin__.property(_get_value)
  flags = __builtin__.property(_get_flags)
  algorithm = __builtin__.property(_get_algorithm)


  _pyangbind_elements = OrderedDict([('value', value), ('flags', flags), ('algorithm', algorithm), ])


class yc_prefix_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids_prefix_sid(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv4-reachability/prefixes/prefix/subtlvs/subtlv/prefix-sids/prefix-sid. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Prefix Segment-ID list. IGP-Prefix Segment is an IGP segment
attached to an IGP prefix. An IGP-Prefix Segment is global
(unless explicitly advertised otherwise) within the SR/IGP
domain.
  """
  __slots__ = ('_path_helper', '_extmethods', '__value','__state',)

  _yang_name = 'prefix-sid'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__value = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids_prefix_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv4-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'prefix-sids', 'prefix-sid']

  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid/value (leafref)

    YANG Description: Reference to the value of the prefix SID.
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid/value (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: Reference to the value of the prefix SID.
    """
    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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid/state (container)

    YANG Description: State parameters for Prefix-SID.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid/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 parameters for Prefix-SID.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids_prefix_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids_prefix_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids_prefix_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  value = __builtin__.property(_get_value)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('value', value), ('state', state), ])


class yc_prefix_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv4-reachability/prefixes/prefix/subtlvs/subtlv/prefix-sids. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines segment routing extensions for
prefixes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_sid',)

  _yang_name = 'prefix-sids'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_sid = YANGDynClass(base=YANGListType("value",yc_prefix_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids_prefix_sid, yang_name="prefix-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="prefix-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv4-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'prefix-sids']

  def _get_prefix_sid(self):
    """
    Getter method for prefix_sid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid (list)

    YANG Description: Prefix Segment-ID list. IGP-Prefix Segment is an IGP segment
attached to an IGP prefix. An IGP-Prefix Segment is global
(unless explicitly advertised otherwise) within the SR/IGP
domain.
    """
    return self.__prefix_sid
      
  def _set_prefix_sid(self, v, load=False):
    """
    Setter method for prefix_sid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_sid is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_sid() directly.

    YANG Description: Prefix Segment-ID list. IGP-Prefix Segment is an IGP segment
attached to an IGP prefix. An IGP-Prefix Segment is global
(unless explicitly advertised otherwise) within the SR/IGP
domain.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("value",yc_prefix_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids_prefix_sid, yang_name="prefix-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="prefix-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_sid must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("value",yc_prefix_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids_prefix_sid, yang_name="prefix-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="prefix-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__prefix_sid = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_sid(self):
    self.__prefix_sid = YANGDynClass(base=YANGListType("value",yc_prefix_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids_prefix_sid, yang_name="prefix-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="prefix-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  prefix_sid = __builtin__.property(_get_prefix_sid)


  _pyangbind_elements = OrderedDict([('prefix_sid', prefix_sid), ])


class yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv4-reachability/prefixes/prefix/subtlvs/subtlv. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of subTLV types in the LSDB for the specified TLV.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__state','__tag','__tag64','__flags','__ipv4_source_router_id','__ipv6_source_router_id','__prefix_sids',)

  _yang_name = 'subtlv'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__tag = YANGDynClass(base=yc_tag_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_tag, is_container='container', yang_name="tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__tag64 = YANGDynClass(base=yc_tag64_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_tag64, is_container='container', yang_name="tag64", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__flags = YANGDynClass(base=yc_flags_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_flags, is_container='container', yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ipv4_source_router_id = YANGDynClass(base=yc_ipv4_source_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_ipv4_source_router_id, is_container='container', yang_name="ipv4-source-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ipv6_source_router_id = YANGDynClass(base=yc_ipv6_source_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_ipv6_source_router_id, is_container='container', yang_name="ipv6-source-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__prefix_sids = YANGDynClass(base=yc_prefix_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids, is_container='container', yang_name="prefix-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv4-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/type (leafref)

    YANG Description: Reference to the sub-TLV type
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/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 sub-TLV type
    """
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/state (container)

    YANG Description: State parameters for a prefix.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/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 parameters for a prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_tag(self):
    """
    Getter method for tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/tag (container)

    YANG Description: This container defines sub-TLV 1.
    """
    return self.__tag
      
  def _set_tag(self, v, load=False):
    """
    Setter method for tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/tag (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tag is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tag() directly.

    YANG Description: This container defines sub-TLV 1.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_tag_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_tag, is_container='container', yang_name="tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tag must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_tag_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_tag, is_container='container', yang_name="tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__tag = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tag(self):
    self.__tag = YANGDynClass(base=yc_tag_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_tag, is_container='container', yang_name="tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_tag64(self):
    """
    Getter method for tag64, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/tag64 (container)

    YANG Description: This container defines sub-TLV 2.
    """
    return self.__tag64
      
  def _set_tag64(self, v, load=False):
    """
    Setter method for tag64, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/tag64 (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tag64 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tag64() directly.

    YANG Description: This container defines sub-TLV 2.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_tag64_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_tag64, is_container='container', yang_name="tag64", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tag64 must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_tag64_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_tag64, is_container='container', yang_name="tag64", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__tag64 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tag64(self):
    self.__tag64 = YANGDynClass(base=yc_tag64_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_tag64, is_container='container', yang_name="tag64", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_flags(self):
    """
    Getter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/flags (container)

    YANG Description: This container defines sub-TLV 4.
    """
    return self.__flags
      
  def _set_flags(self, v, load=False):
    """
    Setter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/flags (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flags() directly.

    YANG Description: This container defines sub-TLV 4.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_flags_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_flags, is_container='container', yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flags must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_flags_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_flags, is_container='container', yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_flags(self):
    self.__flags = YANGDynClass(base=yc_flags_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_flags, is_container='container', yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ipv4_source_router_id(self):
    """
    Getter method for ipv4_source_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/ipv4_source_router_id (container)

    YANG Description: This container defines sub-TLV 11.
    """
    return self.__ipv4_source_router_id
      
  def _set_ipv4_source_router_id(self, v, load=False):
    """
    Setter method for ipv4_source_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/ipv4_source_router_id (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv4_source_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv4_source_router_id() directly.

    YANG Description: This container defines sub-TLV 11.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv4_source_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_ipv4_source_router_id, is_container='container', yang_name="ipv4-source-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv4_source_router_id must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv4_source_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_ipv4_source_router_id, is_container='container', yang_name="ipv4-source-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ipv4_source_router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv4_source_router_id(self):
    self.__ipv4_source_router_id = YANGDynClass(base=yc_ipv4_source_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_ipv4_source_router_id, is_container='container', yang_name="ipv4-source-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ipv6_source_router_id(self):
    """
    Getter method for ipv6_source_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/ipv6_source_router_id (container)

    YANG Description: This container defines sub-TLV 12.
    """
    return self.__ipv6_source_router_id
      
  def _set_ipv6_source_router_id(self, v, load=False):
    """
    Setter method for ipv6_source_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/ipv6_source_router_id (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6_source_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6_source_router_id() directly.

    YANG Description: This container defines sub-TLV 12.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv6_source_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_ipv6_source_router_id, is_container='container', yang_name="ipv6-source-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6_source_router_id must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv6_source_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_ipv6_source_router_id, is_container='container', yang_name="ipv6-source-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ipv6_source_router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6_source_router_id(self):
    self.__ipv6_source_router_id = YANGDynClass(base=yc_ipv6_source_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_ipv6_source_router_id, is_container='container', yang_name="ipv6-source-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_prefix_sids(self):
    """
    Getter method for prefix_sids, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids (container)

    YANG Description: This container defines segment routing extensions for
prefixes.
    """
    return self.__prefix_sids
      
  def _set_prefix_sids(self, v, load=False):
    """
    Setter method for prefix_sids, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_sids is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_sids() directly.

    YANG Description: This container defines segment routing extensions for
prefixes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids, is_container='container', yang_name="prefix-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_sids must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids, is_container='container', yang_name="prefix-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__prefix_sids = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_sids(self):
    self.__prefix_sids = YANGDynClass(base=yc_prefix_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids, is_container='container', yang_name="prefix-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  type = __builtin__.property(_get_type)
  state = __builtin__.property(_get_state)
  tag = __builtin__.property(_get_tag)
  tag64 = __builtin__.property(_get_tag64)
  flags = __builtin__.property(_get_flags)
  ipv4_source_router_id = __builtin__.property(_get_ipv4_source_router_id)
  ipv6_source_router_id = __builtin__.property(_get_ipv6_source_router_id)
  prefix_sids = __builtin__.property(_get_prefix_sids)


  _pyangbind_elements = OrderedDict([('type', type), ('state', state), ('tag', tag), ('tag64', tag64), ('flags', flags), ('ipv4_source_router_id', ipv4_source_router_id), ('ipv6_source_router_id', ipv6_source_router_id), ('prefix_sids', prefix_sids), ])


class yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv4-reachability/prefixes/prefix/subtlvs. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container describes IS prefix sub-TLVs.
  """
  __slots__ = ('_path_helper', '_extmethods', '__subtlv',)

  _yang_name = 'subtlvs'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__subtlv = YANGDynClass(base=YANGListType("type",yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv, yang_name="subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv4-reachability', 'prefixes', 'prefix', 'subtlvs']

  def _get_subtlv(self):
    """
    Getter method for subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv (list)

    YANG Description: List of subTLV types in the LSDB for the specified TLV.
    """
    return self.__subtlv
      
  def _set_subtlv(self, v, load=False):
    """
    Setter method for subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs/subtlv (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_subtlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_subtlv() directly.

    YANG Description: List of subTLV types in the LSDB for the specified TLV.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("type",yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv, yang_name="subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """subtlv must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("type",yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv, yang_name="subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__subtlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_subtlv(self):
    self.__subtlv = YANGDynClass(base=YANGListType("type",yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs_subtlv, yang_name="subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  subtlv = __builtin__.property(_get_subtlv)


  _pyangbind_elements = OrderedDict([('subtlv', subtlv), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_undefined_subtlvs_undefined_subtlv_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv4-reachability/prefixes/prefix/undefined-subtlvs/undefined-subtlv/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of the undefined sub-TLV.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__length','__value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__value = YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv4-reachability', 'prefixes', 'prefix', 'undefined-subtlvs', 'undefined-subtlv', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv/state/type (uint8)

    YANG Description: TLV Type.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv/state/type (uint8)
    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: TLV Type.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with uint8""",
          'defined-type': "uint8",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_length(self):
    """
    Getter method for length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv/state/length (uint8)

    YANG Description: TLV length.
    """
    return self.__length
      
  def _set_length(self, v, load=False):
    """
    Setter method for length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv/state/length (uint8)
    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: TLV length.
    """
    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="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """length 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="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', 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..255']}, int_size=8), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv/state/value (binary)

    YANG Description: TLV value.
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv/state/value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: TLV value.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  type = __builtin__.property(_get_type)
  length = __builtin__.property(_get_length)
  value = __builtin__.property(_get_value)


  _pyangbind_elements = OrderedDict([('type', type), ('length', length), ('value', value), ])


class yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_undefined_subtlvs_undefined_subtlv(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv4-reachability/prefixes/prefix/undefined-subtlvs/undefined-subtlv. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Sub-TLVs that are not defined in the model or not
recognised by system.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__state',)

  _yang_name = 'undefined-subtlv'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_undefined_subtlvs_undefined_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv4-reachability', 'prefixes', 'prefix', 'undefined-subtlvs', 'undefined-subtlv']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv/type (leafref)

    YANG Description: Reference to the type of the undefined sub-TLV
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv/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 type of the undefined sub-TLV
    """
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv/state (container)

    YANG Description: State parameters of the undefined sub-TLV.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv/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 parameters of the undefined sub-TLV.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_undefined_subtlvs_undefined_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_undefined_subtlvs_undefined_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_undefined_subtlvs_undefined_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  type = __builtin__.property(_get_type)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('type', type), ('state', state), ])


class yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_undefined_subtlvs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv4-reachability/prefixes/prefix/undefined-subtlvs. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container describes undefined ISIS TLVs.
  """
  __slots__ = ('_path_helper', '_extmethods', '__undefined_subtlv',)

  _yang_name = 'undefined-subtlvs'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__undefined_subtlv = YANGDynClass(base=YANGListType("type",yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_undefined_subtlvs_undefined_subtlv, yang_name="undefined-subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="undefined-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv4-reachability', 'prefixes', 'prefix', 'undefined-subtlvs']

  def _get_undefined_subtlv(self):
    """
    Getter method for undefined_subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv (list)

    YANG Description: Sub-TLVs that are not defined in the model or not
recognised by system.
    """
    return self.__undefined_subtlv
      
  def _set_undefined_subtlv(self, v, load=False):
    """
    Setter method for undefined_subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_undefined_subtlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_undefined_subtlv() directly.

    YANG Description: Sub-TLVs that are not defined in the model or not
recognised by system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("type",yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_undefined_subtlvs_undefined_subtlv, yang_name="undefined-subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="undefined-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """undefined_subtlv must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("type",yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_undefined_subtlvs_undefined_subtlv, yang_name="undefined-subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="undefined-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__undefined_subtlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_undefined_subtlv(self):
    self.__undefined_subtlv = YANGDynClass(base=YANGListType("type",yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_undefined_subtlvs_undefined_subtlv, yang_name="undefined-subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="undefined-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  undefined_subtlv = __builtin__.property(_get_undefined_subtlv)


  _pyangbind_elements = OrderedDict([('undefined_subtlv', undefined_subtlv), ])


class yc_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv4-reachability/prefixes/prefix. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: IPv4 prefixes that are contained within MT
reachability TLV.
  """
  __slots__ = ('_path_helper', '_extmethods', '__mt_id','__prefix','__state','__subtlvs','__undefined_subtlvs',)

  _yang_name = 'prefix'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__mt_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mt-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__subtlvs = YANGDynClass(base=yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs, is_container='container', yang_name="subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__undefined_subtlvs = YANGDynClass(base=yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_undefined_subtlvs, is_container='container', yang_name="undefined-subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv4-reachability', 'prefixes', 'prefix']

  def _get_mt_id(self):
    """
    Getter method for mt_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/mt_id (leafref)

    YANG Description: Reference to the topology ID of the topology that
the prefix is within.
    """
    return self.__mt_id
      
  def _set_mt_id(self, v, load=False):
    """
    Setter method for mt_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/mt_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mt_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mt_id() directly.

    YANG Description: Reference to the topology ID of the topology that
the prefix is within.
    """
    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="mt-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mt_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mt-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__mt_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mt_id(self):
    self.__mt_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mt-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/prefix (leafref)

    YANG Description: Reference to the prefix to which reachability is
being advertised.
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/prefix (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: Reference to the prefix to which reachability is
being advertised.
    """
    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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/state (container)

    YANG Description: State parameters of an IPv4 extended prefix.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/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 parameters of an IPv4 extended prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_subtlvs(self):
    """
    Getter method for subtlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs (container)

    YANG Description: This container describes IS prefix sub-TLVs.
    """
    return self.__subtlvs
      
  def _set_subtlvs(self, v, load=False):
    """
    Setter method for subtlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/subtlvs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_subtlvs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_subtlvs() directly.

    YANG Description: This container describes IS prefix sub-TLVs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs, is_container='container', yang_name="subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """subtlvs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs, is_container='container', yang_name="subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__subtlvs = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_subtlvs(self):
    self.__subtlvs = YANGDynClass(base=yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_subtlvs, is_container='container', yang_name="subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_undefined_subtlvs(self):
    """
    Getter method for undefined_subtlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/undefined_subtlvs (container)

    YANG Description: This container describes undefined ISIS TLVs.
    """
    return self.__undefined_subtlvs
      
  def _set_undefined_subtlvs(self, v, load=False):
    """
    Setter method for undefined_subtlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix/undefined_subtlvs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_undefined_subtlvs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_undefined_subtlvs() directly.

    YANG Description: This container describes undefined ISIS TLVs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_undefined_subtlvs, is_container='container', yang_name="undefined-subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """undefined_subtlvs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_undefined_subtlvs, is_container='container', yang_name="undefined-subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__undefined_subtlvs = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_undefined_subtlvs(self):
    self.__undefined_subtlvs = YANGDynClass(base=yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix_undefined_subtlvs, is_container='container', yang_name="undefined-subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  mt_id = __builtin__.property(_get_mt_id)
  prefix = __builtin__.property(_get_prefix)
  state = __builtin__.property(_get_state)
  subtlvs = __builtin__.property(_get_subtlvs)
  undefined_subtlvs = __builtin__.property(_get_undefined_subtlvs)


  _pyangbind_elements = OrderedDict([('mt_id', mt_id), ('prefix', prefix), ('state', state), ('subtlvs', subtlvs), ('undefined_subtlvs', undefined_subtlvs), ])


class yc_prefixes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv4-reachability/prefixes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container describes IS prefixes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix',)

  _yang_name = 'prefixes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = YANGDynClass(base=YANGListType("mt_id prefix",yc_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix, yang_name="prefix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mt-id prefix', extensions=None), is_container='list', yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv4-reachability', 'prefixes']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix (list)

    YANG Description: IPv4 prefixes that are contained within MT
reachability TLV.
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes/prefix (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: IPv4 prefixes that are contained within MT
reachability TLV.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("mt_id prefix",yc_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix, yang_name="prefix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mt-id prefix', extensions=None), is_container='list', yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("mt_id prefix",yc_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix, yang_name="prefix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mt-id prefix', extensions=None), is_container='list', yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = YANGDynClass(base=YANGListType("mt_id prefix",yc_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes_prefix, yang_name="prefix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mt-id prefix', extensions=None), is_container='list', yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  prefix = __builtin__.property(_get_prefix)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ])


class yc_mt_ipv4_reachability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv4-reachability. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines list of IPv4 reachability
Information in multi-topology environment.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefixes',)

  _yang_name = 'mt-ipv4-reachability'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefixes = YANGDynClass(base=yc_prefixes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes, is_container='container', yang_name="prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv4-reachability']

  def _get_prefixes(self):
    """
    Getter method for prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes (container)

    YANG Description: This container describes IS prefixes.
    """
    return self.__prefixes
      
  def _set_prefixes(self, v, load=False):
    """
    Setter method for prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability/prefixes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefixes() directly.

    YANG Description: This container describes IS prefixes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefixes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes, is_container='container', yang_name="prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefixes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefixes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes, is_container='container', yang_name="prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefixes(self):
    self.__prefixes = YANGDynClass(base=yc_prefixes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability_prefixes, is_container='container', yang_name="prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  prefixes = __builtin__.property(_get_prefixes)


  _pyangbind_elements = OrderedDict([('prefixes', prefixes), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv6-reachability/prefixes/prefix/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating an IPv6 prefix attribute
  """
  __slots__ = ('_path_helper', '_extmethods', '__up_down','__x_bit','__s_bit','__prefix','__metric','__mt_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__up_down = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="up-down", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__x_bit = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="x-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__s_bit = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="s-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__prefix = 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', is_config=False)
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:wide-metric', is_config=False)
    self.__mt_id = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..4095']}), is_leaf=True, yang_name="mt-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv6-reachability', 'prefixes', 'prefix', 'state']

  def _get_up_down(self):
    """
    Getter method for up_down, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/state/up_down (boolean)

    YANG Description: The up/down bit. Set if a prefix is advertised from a
higher level to a lower level (e.g., level 2 to level 1),
indicating that the prefix has traveled down the hierarchy.
Prefixes that have the up/down bit set may only be
advertised down the hierarchy, i.e., to lower levels. When a
prefix is first injected into IS-IS, the bit is UNSET.
    """
    return self.__up_down
      
  def _set_up_down(self, v, load=False):
    """
    Setter method for up_down, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/state/up_down (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_up_down is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_up_down() directly.

    YANG Description: The up/down bit. Set if a prefix is advertised from a
higher level to a lower level (e.g., level 2 to level 1),
indicating that the prefix has traveled down the hierarchy.
Prefixes that have the up/down bit set may only be
advertised down the hierarchy, i.e., to lower levels. When a
prefix is first injected into IS-IS, the bit is UNSET.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="up-down", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """up_down must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="up-down", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__up_down = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_up_down(self):
    self.__up_down = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="up-down", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_x_bit(self):
    """
    Getter method for x_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/state/x_bit (boolean)

    YANG Description: The external bit. Set when the prefix was distributed into
IS-IS from another routing protocol.
    """
    return self.__x_bit
      
  def _set_x_bit(self, v, load=False):
    """
    Setter method for x_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/state/x_bit (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_x_bit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_x_bit() directly.

    YANG Description: The external bit. Set when the prefix was distributed into
IS-IS from another routing protocol.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="x-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """x_bit must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="x-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__x_bit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_x_bit(self):
    self.__x_bit = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="x-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_s_bit(self):
    """
    Getter method for s_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/state/s_bit (boolean)

    YANG Description: The sub-tlv present bit. If UNSET, the octets of Sub-TLVs
are not present. Otherwise, the bit is set and the octet
following the prefix will contain the length of the Sub-TLV
portion of the structure.
    """
    return self.__s_bit
      
  def _set_s_bit(self, v, load=False):
    """
    Setter method for s_bit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/state/s_bit (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_s_bit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_s_bit() directly.

    YANG Description: The sub-tlv present bit. If UNSET, the octets of Sub-TLVs
are not present. Otherwise, the bit is set and the octet
following the prefix will contain the length of the Sub-TLV
portion of the structure.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="s-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """s_bit must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="s-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__s_bit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_s_bit(self):
    self.__s_bit = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="s-bit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/state/prefix (inet:ipv6-prefix)

    YANG Description: IPv6 prefix contained within extended reachability TLVs.
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/state/prefix (inet:ipv6-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: IPv6 prefix contained within extended reachability TLVs.
    """
    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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with inet:ipv6-prefix""",
          'defined-type': "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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = 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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', is_config=False)


  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/state/metric (oc-isis-types:wide-metric)

    YANG Description: ISIS metric value.
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/state/metric (oc-isis-types:wide-metric)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: ISIS metric value.
    """
    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': ['1..16777215']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:wide-metric', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric must be of a type compatible with oc-isis-types:wide-metric""",
          'defined-type': "oc-isis-types:wide-metric",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:wide-metric', is_config=False)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:wide-metric', is_config=False)


  def _get_mt_id(self):
    """
    Getter method for mt_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/state/mt_id (uint16)

    YANG Description: Multi-topology ID
    """
    return self.__mt_id
      
  def _set_mt_id(self, v, load=False):
    """
    Setter method for mt_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/state/mt_id (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mt_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mt_id() directly.

    YANG Description: Multi-topology ID
    """
    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': ['0..4095']}), is_leaf=True, yang_name="mt-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mt_id must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..4095']}), is_leaf=True, yang_name="mt-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__mt_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mt_id(self):
    self.__mt_id = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..4095']}), is_leaf=True, yang_name="mt-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  up_down = __builtin__.property(_get_up_down)
  x_bit = __builtin__.property(_get_x_bit)
  s_bit = __builtin__.property(_get_s_bit)
  prefix = __builtin__.property(_get_prefix)
  metric = __builtin__.property(_get_metric)
  mt_id = __builtin__.property(_get_mt_id)


  _pyangbind_elements = OrderedDict([('up_down', up_down), ('x_bit', x_bit), ('s_bit', s_bit), ('prefix', prefix), ('metric', metric), ('mt_id', mt_id), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv6-reachability/prefixes/prefix/subtlvs/subtlv/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters for a prefix.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv6-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/state/type (identityref)

    YANG Description: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/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: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  type = __builtin__.property(_get_type)


  _pyangbind_elements = OrderedDict([('type', type), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_tag_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv6-reachability/prefixes/prefix/subtlvs/subtlv/tag/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 1.
  """
  __slots__ = ('_path_helper', '_extmethods', '__tag32',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__tag32 = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="tag32", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv6-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'tag', 'state']

  def _get_tag32(self):
    """
    Getter method for tag32, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/tag/state/tag32 (uint32)

    YANG Description: List of 32-bit tags associated with the prefix. Example
uses of these tags include carrying BGP standard (or
extended) communities and controlling redistribution
between levels and areas, different routing protocols,
or multiple instances of IS-IS running on the same
router.
    """
    return self.__tag32
      
  def _set_tag32(self, v, load=False):
    """
    Setter method for tag32, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/tag/state/tag32 (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tag32 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tag32() directly.

    YANG Description: List of 32-bit tags associated with the prefix. Example
uses of these tags include carrying BGP standard (or
extended) communities and controlling redistribution
between levels and areas, different routing protocols,
or multiple instances of IS-IS running on the same
router.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="tag32", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tag32 must be of a type compatible with uint32""",
          'defined-type': "uint32",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="tag32", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__tag32 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tag32(self):
    self.__tag32 = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="tag32", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  tag32 = __builtin__.property(_get_tag32)


  _pyangbind_elements = OrderedDict([('tag32', tag32), ])


class yc_tag_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_tag(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv6-reachability/prefixes/prefix/subtlvs/subtlv/tag. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 1.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'tag'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_tag_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv6-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'tag']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/tag/state (container)

    YANG Description: State parameters of sub-TLV 1.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/tag/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 parameters of sub-TLV 1.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_tag_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_tag_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_tag_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_tag64_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv6-reachability/prefixes/prefix/subtlvs/subtlv/tag64/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 2.
  """
  __slots__ = ('_path_helper', '_extmethods', '__tag64',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__tag64 = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)), is_leaf=False, yang_name="tag64", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv6-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'tag64', 'state']

  def _get_tag64(self):
    """
    Getter method for tag64, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/tag64/state/tag64 (uint64)

    YANG Description: List of 64-bit tags associated with the prefix. Example
uses of these tags include carrying BGP standard (or
extended) communities and controlling redistribution
between levels and areas, different routing protocols,
or multiple instances of IS-IS running on the same
router.
    """
    return self.__tag64
      
  def _set_tag64(self, v, load=False):
    """
    Setter method for tag64, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/tag64/state/tag64 (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tag64 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tag64() directly.

    YANG Description: List of 64-bit tags associated with the prefix. Example
uses of these tags include carrying BGP standard (or
extended) communities and controlling redistribution
between levels and areas, different routing protocols,
or multiple instances of IS-IS running on the same
router.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)), is_leaf=False, yang_name="tag64", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tag64 must be of a type compatible with uint64""",
          'defined-type': "uint64",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)), is_leaf=False, yang_name="tag64", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__tag64 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tag64(self):
    self.__tag64 = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)), is_leaf=False, yang_name="tag64", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)

  tag64 = __builtin__.property(_get_tag64)


  _pyangbind_elements = OrderedDict([('tag64', tag64), ])


class yc_tag64_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_tag64(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv6-reachability/prefixes/prefix/subtlvs/subtlv/tag64. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 2.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'tag64'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_tag64_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv6-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'tag64']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/tag64/state (container)

    YANG Description: State parameters of sub-TLV 2.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/tag64/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 parameters of sub-TLV 2.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_tag64_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_tag64_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_tag64_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_flags_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv6-reachability/prefixes/prefix/subtlvs/subtlv/flags/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 4.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__flags',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXTERNAL_FLAG': {}, 'READVERTISEMENT_FLAG': {}, 'NODE_FLAG': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv6-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'flags', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/flags/state/type (identityref)

    YANG Description: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/flags/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: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_flags(self):
    """
    Getter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/flags/state/flags (enumeration)

    YANG Description: Additional prefix reachability flags.
    """
    return self.__flags
      
  def _set_flags(self, v, load=False):
    """
    Setter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/flags/state/flags (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flags() directly.

    YANG Description: Additional prefix reachability flags.
    """
    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={'EXTERNAL_FLAG': {}, 'READVERTISEMENT_FLAG': {}, 'NODE_FLAG': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flags must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXTERNAL_FLAG': {}, 'READVERTISEMENT_FLAG': {}, 'NODE_FLAG': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_flags(self):
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EXTERNAL_FLAG': {}, 'READVERTISEMENT_FLAG': {}, 'NODE_FLAG': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)

  type = __builtin__.property(_get_type)
  flags = __builtin__.property(_get_flags)


  _pyangbind_elements = OrderedDict([('type', type), ('flags', flags), ])


class yc_flags_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_flags(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv6-reachability/prefixes/prefix/subtlvs/subtlv/flags. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 4.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'flags'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_flags_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv6-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'flags']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/flags/state (container)

    YANG Description: State parameters of sub-TLV 4.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/flags/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 parameters of sub-TLV 4.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_flags_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_flags_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_flags_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_ipv4_source_router_id_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv6-reachability/prefixes/prefix/subtlvs/subtlv/ipv4-source-router-id/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 11.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__router_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__router_id = 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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv6-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'ipv4-source-router-id', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/ipv4_source_router_id/state/type (identityref)

    YANG Description: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/ipv4_source_router_id/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: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_router_id(self):
    """
    Getter method for router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/ipv4_source_router_id/state/router_id (inet:ipv4-address)

    YANG Description: IPv4 Source router ID address. In cases where the
advertisement is an identifier for the advertising
router (e.g., with the N-flag set in the Prefix
Attribute Flags sub-TLV), it may be useful for other
routers to know the source of the advertisement. When
reachability advertisement is leaked from one level to
another, Router ID advertised is always the Router ID
of the IS-IS instance that originated the
advertisement. This would be true even if the prefix
had been learned from another protocol.
    """
    return self.__router_id
      
  def _set_router_id(self, v, load=False):
    """
    Setter method for router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/ipv4_source_router_id/state/router_id (inet:ipv4-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_router_id() directly.

    YANG Description: IPv4 Source router ID address. In cases where the
advertisement is an identifier for the advertising
router (e.g., with the N-flag set in the Prefix
Attribute Flags sub-TLV), it may be useful for other
routers to know the source of the advertisement. When
reachability advertisement is leaked from one level to
another, Router ID advertised is always the Router ID
of the IS-IS instance that originated the
advertisement. This would be true even if the prefix
had been learned from another protocol.
    """
    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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """router_id must be of a type compatible with inet:ipv4-address""",
          'defined-type': "inet:ipv4-address",
          '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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)""",
        })

    self.__router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_router_id(self):
    self.__router_id = 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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)

  type = __builtin__.property(_get_type)
  router_id = __builtin__.property(_get_router_id)


  _pyangbind_elements = OrderedDict([('type', type), ('router_id', router_id), ])


class yc_ipv4_source_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_ipv4_source_router_id(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv6-reachability/prefixes/prefix/subtlvs/subtlv/ipv4-source-router-id. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 11.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'ipv4-source-router-id'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_ipv4_source_router_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv6-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'ipv4-source-router-id']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/ipv4_source_router_id/state (container)

    YANG Description: State parameters of sub-TLV 11.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/ipv4_source_router_id/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 parameters of sub-TLV 11.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_ipv4_source_router_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_ipv4_source_router_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_ipv4_source_router_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_ipv6_source_router_id_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv6-reachability/prefixes/prefix/subtlvs/subtlv/ipv6-source-router-id/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of sub-TLV 12.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__router_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__router_id = 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}|:))'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv6-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'ipv6-source-router-id', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/ipv6_source_router_id/state/type (identityref)

    YANG Description: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/ipv6_source_router_id/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: The type of subTLV being described. The type of subTLV is
expressed as a canonical name.
    """
    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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', 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={'IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_TAG64': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SUBTLVS_TYPE': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-types'}, 'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM': {'@module': 'openconfig-isis-lsdb-types', '@namespace': 'http://openconfig.net/yang/isis-lsdb-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_router_id(self):
    """
    Getter method for router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/ipv6_source_router_id/state/router_id (inet:ipv6-address)

    YANG Description: IPv6 Source router ID address. In cases where the
advertisement is an identifier for the advertising
router (e.g., with the N-flag set in the Prefix
Attribute Flags sub-TLV), it may be useful for other
routers to know the source of the advertisement. When
reachability advertisement is leaked from one level to
another, Router ID advertised is always the Router ID
of the IS-IS instance that originated the
advertisement. This would be true even if the prefix
had been learned from another protocol.
    """
    return self.__router_id
      
  def _set_router_id(self, v, load=False):
    """
    Setter method for router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/ipv6_source_router_id/state/router_id (inet:ipv6-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_router_id() directly.

    YANG Description: IPv6 Source router ID address. In cases where the
advertisement is an identifier for the advertising
router (e.g., with the N-flag set in the Prefix
Attribute Flags sub-TLV), it may be useful for other
routers to know the source of the advertisement. When
reachability advertisement is leaked from one level to
another, Router ID advertised is always the Router ID
of the IS-IS instance that originated the
advertisement. This would be true even if the prefix
had been learned from another protocol.
    """
    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}|:))'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """router_id must be of a type compatible with inet:ipv6-address""",
          'defined-type': "inet:ipv6-address",
          '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}|:))'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)""",
        })

    self.__router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_router_id(self):
    self.__router_id = 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}|:))'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-address', is_config=False)

  type = __builtin__.property(_get_type)
  router_id = __builtin__.property(_get_router_id)


  _pyangbind_elements = OrderedDict([('type', type), ('router_id', router_id), ])


class yc_ipv6_source_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_ipv6_source_router_id(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv6-reachability/prefixes/prefix/subtlvs/subtlv/ipv6-source-router-id. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines sub-TLV 12.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'ipv6-source-router-id'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_ipv6_source_router_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv6-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'ipv6-source-router-id']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/ipv6_source_router_id/state (container)

    YANG Description: State parameters of sub-TLV 12.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/ipv6_source_router_id/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 parameters of sub-TLV 12.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_ipv6_source_router_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_ipv6_source_router_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_ipv6_source_router_id_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids_prefix_sid_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv6-reachability/prefixes/prefix/subtlvs/subtlv/prefix-sids/prefix-sid/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters for Prefix-SID.
  """
  __slots__ = ('_path_helper', '_extmethods', '__value','__flags','__algorithm',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'READVERTISEMENT': {}, 'NODE': {}, 'NO_PHP': {}, 'EXPLICIT_NULL': {}, 'VALUE': {}, 'LOCAL': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__algorithm = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="algorithm", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv6-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'prefix-sids', 'prefix-sid', 'state']

  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid/state/value (uint32)

    YANG Description: IGP Prefix-SID value.
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid/state/value (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: IGP Prefix-SID value.
    """
    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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value 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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_flags(self):
    """
    Getter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid/state/flags (enumeration)

    YANG Description: Flags associated with Prefix Segment-ID.
    """
    return self.__flags
      
  def _set_flags(self, v, load=False):
    """
    Setter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid/state/flags (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flags() directly.

    YANG Description: Flags associated with Prefix Segment-ID.
    """
    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={'READVERTISEMENT': {}, 'NODE': {}, 'NO_PHP': {}, 'EXPLICIT_NULL': {}, 'VALUE': {}, 'LOCAL': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flags must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'READVERTISEMENT': {}, 'NODE': {}, 'NO_PHP': {}, 'EXPLICIT_NULL': {}, 'VALUE': {}, 'LOCAL': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_flags(self):
    self.__flags = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'READVERTISEMENT': {}, 'NODE': {}, 'NO_PHP': {}, 'EXPLICIT_NULL': {}, 'VALUE': {}, 'LOCAL': {}},)), is_leaf=False, yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_algorithm(self):
    """
    Getter method for algorithm, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid/state/algorithm (uint8)

    YANG Description: Prefix-SID algorithm to be used for path computation.
    """
    return self.__algorithm
      
  def _set_algorithm(self, v, load=False):
    """
    Setter method for algorithm, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid/state/algorithm (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_algorithm is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_algorithm() directly.

    YANG Description: Prefix-SID algorithm to be used for path computation.
    """
    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="algorithm", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """algorithm 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="algorithm", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__algorithm = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_algorithm(self):
    self.__algorithm = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="algorithm", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)

  value = __builtin__.property(_get_value)
  flags = __builtin__.property(_get_flags)
  algorithm = __builtin__.property(_get_algorithm)


  _pyangbind_elements = OrderedDict([('value', value), ('flags', flags), ('algorithm', algorithm), ])


class yc_prefix_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids_prefix_sid(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv6-reachability/prefixes/prefix/subtlvs/subtlv/prefix-sids/prefix-sid. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Prefix Segment-ID list. IGP-Prefix Segment is an IGP segment
attached to an IGP prefix. An IGP-Prefix Segment is global
(unless explicitly advertised otherwise) within the SR/IGP
domain.
  """
  __slots__ = ('_path_helper', '_extmethods', '__value','__state',)

  _yang_name = 'prefix-sid'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__value = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids_prefix_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv6-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'prefix-sids', 'prefix-sid']

  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid/value (leafref)

    YANG Description: Reference to the value of the prefix SID.
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid/value (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: Reference to the value of the prefix SID.
    """
    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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid/state (container)

    YANG Description: State parameters for Prefix-SID.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid/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 parameters for Prefix-SID.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids_prefix_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids_prefix_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids_prefix_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  value = __builtin__.property(_get_value)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('value', value), ('state', state), ])


class yc_prefix_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv6-reachability/prefixes/prefix/subtlvs/subtlv/prefix-sids. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines segment routing extensions for
prefixes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_sid',)

  _yang_name = 'prefix-sids'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_sid = YANGDynClass(base=YANGListType("value",yc_prefix_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids_prefix_sid, yang_name="prefix-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="prefix-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv6-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv', 'prefix-sids']

  def _get_prefix_sid(self):
    """
    Getter method for prefix_sid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid (list)

    YANG Description: Prefix Segment-ID list. IGP-Prefix Segment is an IGP segment
attached to an IGP prefix. An IGP-Prefix Segment is global
(unless explicitly advertised otherwise) within the SR/IGP
domain.
    """
    return self.__prefix_sid
      
  def _set_prefix_sid(self, v, load=False):
    """
    Setter method for prefix_sid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids/prefix_sid (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_sid is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_sid() directly.

    YANG Description: Prefix Segment-ID list. IGP-Prefix Segment is an IGP segment
attached to an IGP prefix. An IGP-Prefix Segment is global
(unless explicitly advertised otherwise) within the SR/IGP
domain.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("value",yc_prefix_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids_prefix_sid, yang_name="prefix-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="prefix-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_sid must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("value",yc_prefix_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids_prefix_sid, yang_name="prefix-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="prefix-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__prefix_sid = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_sid(self):
    self.__prefix_sid = YANGDynClass(base=YANGListType("value",yc_prefix_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids_prefix_sid, yang_name="prefix-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='value', extensions=None), is_container='list', yang_name="prefix-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  prefix_sid = __builtin__.property(_get_prefix_sid)


  _pyangbind_elements = OrderedDict([('prefix_sid', prefix_sid), ])


class yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv6-reachability/prefixes/prefix/subtlvs/subtlv. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of subTLV types in the LSDB for the specified TLV.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__state','__tag','__tag64','__flags','__ipv4_source_router_id','__ipv6_source_router_id','__prefix_sids',)

  _yang_name = 'subtlv'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__tag = YANGDynClass(base=yc_tag_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_tag, is_container='container', yang_name="tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__tag64 = YANGDynClass(base=yc_tag64_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_tag64, is_container='container', yang_name="tag64", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__flags = YANGDynClass(base=yc_flags_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_flags, is_container='container', yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ipv4_source_router_id = YANGDynClass(base=yc_ipv4_source_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_ipv4_source_router_id, is_container='container', yang_name="ipv4-source-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ipv6_source_router_id = YANGDynClass(base=yc_ipv6_source_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_ipv6_source_router_id, is_container='container', yang_name="ipv6-source-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__prefix_sids = YANGDynClass(base=yc_prefix_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids, is_container='container', yang_name="prefix-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv6-reachability', 'prefixes', 'prefix', 'subtlvs', 'subtlv']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/type (leafref)

    YANG Description: Reference to the sub-TLV type
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/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 sub-TLV type
    """
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/state (container)

    YANG Description: State parameters for a prefix.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/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 parameters for a prefix.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_tag(self):
    """
    Getter method for tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/tag (container)

    YANG Description: This container defines sub-TLV 1.
    """
    return self.__tag
      
  def _set_tag(self, v, load=False):
    """
    Setter method for tag, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/tag (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tag is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tag() directly.

    YANG Description: This container defines sub-TLV 1.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_tag_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_tag, is_container='container', yang_name="tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tag must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_tag_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_tag, is_container='container', yang_name="tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__tag = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tag(self):
    self.__tag = YANGDynClass(base=yc_tag_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_tag, is_container='container', yang_name="tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_tag64(self):
    """
    Getter method for tag64, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/tag64 (container)

    YANG Description: This container defines sub-TLV 2.
    """
    return self.__tag64
      
  def _set_tag64(self, v, load=False):
    """
    Setter method for tag64, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/tag64 (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tag64 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tag64() directly.

    YANG Description: This container defines sub-TLV 2.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_tag64_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_tag64, is_container='container', yang_name="tag64", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tag64 must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_tag64_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_tag64, is_container='container', yang_name="tag64", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__tag64 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tag64(self):
    self.__tag64 = YANGDynClass(base=yc_tag64_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_tag64, is_container='container', yang_name="tag64", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_flags(self):
    """
    Getter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/flags (container)

    YANG Description: This container defines sub-TLV 4.
    """
    return self.__flags
      
  def _set_flags(self, v, load=False):
    """
    Setter method for flags, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/flags (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flags() directly.

    YANG Description: This container defines sub-TLV 4.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_flags_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_flags, is_container='container', yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flags must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_flags_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_flags, is_container='container', yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_flags(self):
    self.__flags = YANGDynClass(base=yc_flags_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_flags, is_container='container', yang_name="flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ipv4_source_router_id(self):
    """
    Getter method for ipv4_source_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/ipv4_source_router_id (container)

    YANG Description: This container defines sub-TLV 11.
    """
    return self.__ipv4_source_router_id
      
  def _set_ipv4_source_router_id(self, v, load=False):
    """
    Setter method for ipv4_source_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/ipv4_source_router_id (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv4_source_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv4_source_router_id() directly.

    YANG Description: This container defines sub-TLV 11.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv4_source_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_ipv4_source_router_id, is_container='container', yang_name="ipv4-source-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv4_source_router_id must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv4_source_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_ipv4_source_router_id, is_container='container', yang_name="ipv4-source-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ipv4_source_router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv4_source_router_id(self):
    self.__ipv4_source_router_id = YANGDynClass(base=yc_ipv4_source_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_ipv4_source_router_id, is_container='container', yang_name="ipv4-source-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ipv6_source_router_id(self):
    """
    Getter method for ipv6_source_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/ipv6_source_router_id (container)

    YANG Description: This container defines sub-TLV 12.
    """
    return self.__ipv6_source_router_id
      
  def _set_ipv6_source_router_id(self, v, load=False):
    """
    Setter method for ipv6_source_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/ipv6_source_router_id (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6_source_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6_source_router_id() directly.

    YANG Description: This container defines sub-TLV 12.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv6_source_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_ipv6_source_router_id, is_container='container', yang_name="ipv6-source-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6_source_router_id must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv6_source_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_ipv6_source_router_id, is_container='container', yang_name="ipv6-source-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ipv6_source_router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6_source_router_id(self):
    self.__ipv6_source_router_id = YANGDynClass(base=yc_ipv6_source_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_ipv6_source_router_id, is_container='container', yang_name="ipv6-source-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_prefix_sids(self):
    """
    Getter method for prefix_sids, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids (container)

    YANG Description: This container defines segment routing extensions for
prefixes.
    """
    return self.__prefix_sids
      
  def _set_prefix_sids(self, v, load=False):
    """
    Setter method for prefix_sids, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv/prefix_sids (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_sids is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_sids() directly.

    YANG Description: This container defines segment routing extensions for
prefixes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids, is_container='container', yang_name="prefix-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_sids must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids, is_container='container', yang_name="prefix-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__prefix_sids = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_sids(self):
    self.__prefix_sids = YANGDynClass(base=yc_prefix_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv_prefix_sids, is_container='container', yang_name="prefix-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  type = __builtin__.property(_get_type)
  state = __builtin__.property(_get_state)
  tag = __builtin__.property(_get_tag)
  tag64 = __builtin__.property(_get_tag64)
  flags = __builtin__.property(_get_flags)
  ipv4_source_router_id = __builtin__.property(_get_ipv4_source_router_id)
  ipv6_source_router_id = __builtin__.property(_get_ipv6_source_router_id)
  prefix_sids = __builtin__.property(_get_prefix_sids)


  _pyangbind_elements = OrderedDict([('type', type), ('state', state), ('tag', tag), ('tag64', tag64), ('flags', flags), ('ipv4_source_router_id', ipv4_source_router_id), ('ipv6_source_router_id', ipv6_source_router_id), ('prefix_sids', prefix_sids), ])


class yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv6-reachability/prefixes/prefix/subtlvs. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container describes IS prefix sub-TLVs.
  """
  __slots__ = ('_path_helper', '_extmethods', '__subtlv',)

  _yang_name = 'subtlvs'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__subtlv = YANGDynClass(base=YANGListType("type",yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv, yang_name="subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv6-reachability', 'prefixes', 'prefix', 'subtlvs']

  def _get_subtlv(self):
    """
    Getter method for subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv (list)

    YANG Description: List of subTLV types in the LSDB for the specified TLV.
    """
    return self.__subtlv
      
  def _set_subtlv(self, v, load=False):
    """
    Setter method for subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs/subtlv (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_subtlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_subtlv() directly.

    YANG Description: List of subTLV types in the LSDB for the specified TLV.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("type",yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv, yang_name="subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """subtlv must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("type",yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv, yang_name="subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__subtlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_subtlv(self):
    self.__subtlv = YANGDynClass(base=YANGListType("type",yc_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs_subtlv, yang_name="subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  subtlv = __builtin__.property(_get_subtlv)


  _pyangbind_elements = OrderedDict([('subtlv', subtlv), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_undefined_subtlvs_undefined_subtlv_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv6-reachability/prefixes/prefix/undefined-subtlvs/undefined-subtlv/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of the undefined sub-TLV.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__length','__value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__value = YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv6-reachability', 'prefixes', 'prefix', 'undefined-subtlvs', 'undefined-subtlv', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv/state/type (uint8)

    YANG Description: TLV Type.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv/state/type (uint8)
    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: TLV Type.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with uint8""",
          'defined-type': "uint8",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_length(self):
    """
    Getter method for length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv/state/length (uint8)

    YANG Description: TLV length.
    """
    return self.__length
      
  def _set_length(self, v, load=False):
    """
    Setter method for length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv/state/length (uint8)
    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: TLV length.
    """
    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="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """length 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="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', 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..255']}, int_size=8), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv/state/value (binary)

    YANG Description: TLV value.
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv/state/value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: TLV value.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  type = __builtin__.property(_get_type)
  length = __builtin__.property(_get_length)
  value = __builtin__.property(_get_value)


  _pyangbind_elements = OrderedDict([('type', type), ('length', length), ('value', value), ])


class yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_undefined_subtlvs_undefined_subtlv(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv6-reachability/prefixes/prefix/undefined-subtlvs/undefined-subtlv. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Sub-TLVs that are not defined in the model or not
recognised by system.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__state',)

  _yang_name = 'undefined-subtlv'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_undefined_subtlvs_undefined_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv6-reachability', 'prefixes', 'prefix', 'undefined-subtlvs', 'undefined-subtlv']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv/type (leafref)

    YANG Description: Reference to the type of the undefined sub-TLV
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv/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 type of the undefined sub-TLV
    """
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv/state (container)

    YANG Description: State parameters of the undefined sub-TLV.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv/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 parameters of the undefined sub-TLV.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_undefined_subtlvs_undefined_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_undefined_subtlvs_undefined_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_undefined_subtlvs_undefined_subtlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  type = __builtin__.property(_get_type)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('type', type), ('state', state), ])


class yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_undefined_subtlvs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv6-reachability/prefixes/prefix/undefined-subtlvs. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container describes undefined ISIS TLVs.
  """
  __slots__ = ('_path_helper', '_extmethods', '__undefined_subtlv',)

  _yang_name = 'undefined-subtlvs'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__undefined_subtlv = YANGDynClass(base=YANGListType("type",yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_undefined_subtlvs_undefined_subtlv, yang_name="undefined-subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="undefined-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv6-reachability', 'prefixes', 'prefix', 'undefined-subtlvs']

  def _get_undefined_subtlv(self):
    """
    Getter method for undefined_subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv (list)

    YANG Description: Sub-TLVs that are not defined in the model or not
recognised by system.
    """
    return self.__undefined_subtlv
      
  def _set_undefined_subtlv(self, v, load=False):
    """
    Setter method for undefined_subtlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/undefined_subtlvs/undefined_subtlv (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_undefined_subtlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_undefined_subtlv() directly.

    YANG Description: Sub-TLVs that are not defined in the model or not
recognised by system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("type",yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_undefined_subtlvs_undefined_subtlv, yang_name="undefined-subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="undefined-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """undefined_subtlv must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("type",yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_undefined_subtlvs_undefined_subtlv, yang_name="undefined-subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="undefined-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__undefined_subtlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_undefined_subtlv(self):
    self.__undefined_subtlv = YANGDynClass(base=YANGListType("type",yc_undefined_subtlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_undefined_subtlvs_undefined_subtlv, yang_name="undefined-subtlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="undefined-subtlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  undefined_subtlv = __builtin__.property(_get_undefined_subtlv)


  _pyangbind_elements = OrderedDict([('undefined_subtlv', undefined_subtlv), ])


class yc_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv6-reachability/prefixes/prefix. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of IPv6 prefixes contained within MT
reachability TLV.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix','__mt_id','__state','__subtlvs','__undefined_subtlvs',)

  _yang_name = 'prefix'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__mt_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mt-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__subtlvs = YANGDynClass(base=yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs, is_container='container', yang_name="subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__undefined_subtlvs = YANGDynClass(base=yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_undefined_subtlvs, is_container='container', yang_name="undefined-subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv6-reachability', 'prefixes', 'prefix']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/prefix (leafref)

    YANG Description: Reference to the IPv6 prefix described by the
TLV.
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/prefix (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: Reference to the IPv6 prefix described by the
TLV.
    """
    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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_mt_id(self):
    """
    Getter method for mt_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/mt_id (leafref)

    YANG Description: Reference to the multi-topology ID.
    """
    return self.__mt_id
      
  def _set_mt_id(self, v, load=False):
    """
    Setter method for mt_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/mt_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mt_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mt_id() directly.

    YANG Description: Reference to the multi-topology ID.
    """
    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="mt-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mt_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mt-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__mt_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mt_id(self):
    self.__mt_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mt-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/state (container)

    YANG Description: State parameters relating an IPv6 prefix attribute
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/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 parameters relating an IPv6 prefix attribute
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_subtlvs(self):
    """
    Getter method for subtlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs (container)

    YANG Description: This container describes IS prefix sub-TLVs.
    """
    return self.__subtlvs
      
  def _set_subtlvs(self, v, load=False):
    """
    Setter method for subtlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/subtlvs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_subtlvs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_subtlvs() directly.

    YANG Description: This container describes IS prefix sub-TLVs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs, is_container='container', yang_name="subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """subtlvs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs, is_container='container', yang_name="subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__subtlvs = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_subtlvs(self):
    self.__subtlvs = YANGDynClass(base=yc_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_subtlvs, is_container='container', yang_name="subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_undefined_subtlvs(self):
    """
    Getter method for undefined_subtlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/undefined_subtlvs (container)

    YANG Description: This container describes undefined ISIS TLVs.
    """
    return self.__undefined_subtlvs
      
  def _set_undefined_subtlvs(self, v, load=False):
    """
    Setter method for undefined_subtlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix/undefined_subtlvs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_undefined_subtlvs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_undefined_subtlvs() directly.

    YANG Description: This container describes undefined ISIS TLVs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_undefined_subtlvs, is_container='container', yang_name="undefined-subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """undefined_subtlvs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_undefined_subtlvs, is_container='container', yang_name="undefined-subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__undefined_subtlvs = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_undefined_subtlvs(self):
    self.__undefined_subtlvs = YANGDynClass(base=yc_undefined_subtlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix_undefined_subtlvs, is_container='container', yang_name="undefined-subtlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  prefix = __builtin__.property(_get_prefix)
  mt_id = __builtin__.property(_get_mt_id)
  state = __builtin__.property(_get_state)
  subtlvs = __builtin__.property(_get_subtlvs)
  undefined_subtlvs = __builtin__.property(_get_undefined_subtlvs)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ('mt_id', mt_id), ('state', state), ('subtlvs', subtlvs), ('undefined_subtlvs', undefined_subtlvs), ])


class yc_prefixes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv6-reachability/prefixes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container describes IS prefixes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix',)

  _yang_name = 'prefixes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = YANGDynClass(base=YANGListType("prefix mt_id",yc_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix, yang_name="prefix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix mt-id', extensions=None), is_container='list', yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv6-reachability', 'prefixes']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix (list)

    YANG Description: List of IPv6 prefixes contained within MT
reachability TLV.
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes/prefix (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: List of IPv6 prefixes contained within MT
reachability TLV.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("prefix mt_id",yc_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix, yang_name="prefix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix mt-id', extensions=None), is_container='list', yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("prefix mt_id",yc_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix, yang_name="prefix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix mt-id', extensions=None), is_container='list', yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = YANGDynClass(base=YANGListType("prefix mt_id",yc_prefix_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes_prefix, yang_name="prefix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix mt-id', extensions=None), is_container='list', yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  prefix = __builtin__.property(_get_prefix)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ])


class yc_mt_ipv6_reachability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/mt-ipv6-reachability. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines list of IPv6 reachability
information in multi - topology environment.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefixes',)

  _yang_name = 'mt-ipv6-reachability'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefixes = YANGDynClass(base=yc_prefixes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes, is_container='container', yang_name="prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv', 'mt-ipv6-reachability']

  def _get_prefixes(self):
    """
    Getter method for prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes (container)

    YANG Description: This container describes IS prefixes.
    """
    return self.__prefixes
      
  def _set_prefixes(self, v, load=False):
    """
    Setter method for prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability/prefixes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefixes() directly.

    YANG Description: This container describes IS prefixes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefixes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes, is_container='container', yang_name="prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefixes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefixes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes, is_container='container', yang_name="prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefixes(self):
    self.__prefixes = YANGDynClass(base=yc_prefixes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability_prefixes, is_container='container', yang_name="prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  prefixes = __builtin__.property(_get_prefixes)


  _pyangbind_elements = OrderedDict([('prefixes', prefixes), ])


class yc_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of TLV types in the LSDB for the specified LSP.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__state','__area_address','__lsp_buffer_size','__nlpid','__hostname','__ipv4_interface_addresses','__ipv6_interface_addresses','__ipv4_te_router_id','__ipv6_te_router_id','__instance_ids','__ipv4_srlgs','__ipv6_srlgs','__purge_oi','__router_capabilities','__is_reachability','__ipv4_internal_reachability','__ipv4_external_reachability','__authentication','__extended_is_reachability','__extended_ipv4_reachability','__ipv6_reachability','__multi_topology','__isis_neighbor_attribute','__is_alias_id','__mt_isn','__mt_isis_neighbor_attribute','__mt_ipv4_reachability','__mt_ipv6_reachability',)

  _yang_name = 'tlv'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__area_address = YANGDynClass(base=yc_area_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_area_address, is_container='container', yang_name="area-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__lsp_buffer_size = YANGDynClass(base=yc_lsp_buffer_size_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_lsp_buffer_size, is_container='container', yang_name="lsp-buffer-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__nlpid = YANGDynClass(base=yc_nlpid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_nlpid, is_container='container', yang_name="nlpid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__hostname = YANGDynClass(base=yc_hostname_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_hostname, is_container='container', yang_name="hostname", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ipv4_interface_addresses = YANGDynClass(base=yc_ipv4_interface_addresses_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_interface_addresses, is_container='container', yang_name="ipv4-interface-addresses", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ipv6_interface_addresses = YANGDynClass(base=yc_ipv6_interface_addresses_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_interface_addresses, is_container='container', yang_name="ipv6-interface-addresses", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ipv4_te_router_id = YANGDynClass(base=yc_ipv4_te_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_te_router_id, is_container='container', yang_name="ipv4-te-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ipv6_te_router_id = YANGDynClass(base=yc_ipv6_te_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_te_router_id, is_container='container', yang_name="ipv6-te-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__instance_ids = YANGDynClass(base=yc_instance_ids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_instance_ids, is_container='container', yang_name="instance-ids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ipv4_srlgs = YANGDynClass(base=yc_ipv4_srlgs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_srlgs, is_container='container', yang_name="ipv4-srlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ipv6_srlgs = YANGDynClass(base=yc_ipv6_srlgs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_srlgs, is_container='container', yang_name="ipv6-srlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__purge_oi = YANGDynClass(base=yc_purge_oi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_purge_oi, is_container='container', yang_name="purge-oi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__router_capabilities = YANGDynClass(base=yc_router_capabilities_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities, is_container='container', yang_name="router-capabilities", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__is_reachability = YANGDynClass(base=yc_is_reachability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability, is_container='container', yang_name="is-reachability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ipv4_internal_reachability = YANGDynClass(base=yc_ipv4_internal_reachability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability, is_container='container', yang_name="ipv4-internal-reachability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ipv4_external_reachability = YANGDynClass(base=yc_ipv4_external_reachability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability, is_container='container', yang_name="ipv4-external-reachability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__authentication = YANGDynClass(base=yc_authentication_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_authentication, is_container='container', yang_name="authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__extended_is_reachability = YANGDynClass(base=yc_extended_is_reachability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability, is_container='container', yang_name="extended-is-reachability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__extended_ipv4_reachability = YANGDynClass(base=yc_extended_ipv4_reachability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability, is_container='container', yang_name="extended-ipv4-reachability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__ipv6_reachability = YANGDynClass(base=yc_ipv6_reachability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability, is_container='container', yang_name="ipv6-reachability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__multi_topology = YANGDynClass(base=yc_multi_topology_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_multi_topology, is_container='container', yang_name="multi-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__isis_neighbor_attribute = YANGDynClass(base=yc_isis_neighbor_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute, is_container='container', yang_name="isis-neighbor-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__is_alias_id = YANGDynClass(base=yc_is_alias_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_alias_id, is_container='container', yang_name="is-alias-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__mt_isn = YANGDynClass(base=yc_mt_isn_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn, is_container='container', yang_name="mt-isn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__mt_isis_neighbor_attribute = YANGDynClass(base=yc_mt_isis_neighbor_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute, is_container='container', yang_name="mt-isis-neighbor-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__mt_ipv4_reachability = YANGDynClass(base=yc_mt_ipv4_reachability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability, is_container='container', yang_name="mt-ipv4-reachability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__mt_ipv6_reachability = YANGDynClass(base=yc_mt_ipv6_reachability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability, is_container='container', yang_name="mt-ipv6-reachability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs', 'tlv']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/type (leafref)

    YANG Description: Reference to the TLV's type.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/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 TLV's type.
    """
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/state (container)

    YANG Description: Operational state parameters relating to the specified
LSP
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/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 specified
LSP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_area_address(self):
    """
    Getter method for area_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/area_address (container)

    YANG Description: This container defines TLV 1.
    """
    return self.__area_address
      
  def _set_area_address(self, v, load=False):
    """
    Setter method for area_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/area_address (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_area_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_area_address() directly.

    YANG Description: This container defines TLV 1.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_area_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_area_address, is_container='container', yang_name="area-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """area_address must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_area_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_area_address, is_container='container', yang_name="area-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__area_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_area_address(self):
    self.__area_address = YANGDynClass(base=yc_area_address_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_area_address, is_container='container', yang_name="area-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_lsp_buffer_size(self):
    """
    Getter method for lsp_buffer_size, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/lsp_buffer_size (container)

    YANG Description: This container defines TLV 14 - the LSP Buffer Size
TLV.
    """
    return self.__lsp_buffer_size
      
  def _set_lsp_buffer_size(self, v, load=False):
    """
    Setter method for lsp_buffer_size, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/lsp_buffer_size (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsp_buffer_size is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsp_buffer_size() directly.

    YANG Description: This container defines TLV 14 - the LSP Buffer Size
TLV.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_lsp_buffer_size_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_lsp_buffer_size, is_container='container', yang_name="lsp-buffer-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsp_buffer_size must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_lsp_buffer_size_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_lsp_buffer_size, is_container='container', yang_name="lsp-buffer-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__lsp_buffer_size = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsp_buffer_size(self):
    self.__lsp_buffer_size = YANGDynClass(base=yc_lsp_buffer_size_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_lsp_buffer_size, is_container='container', yang_name="lsp-buffer-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_nlpid(self):
    """
    Getter method for nlpid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/nlpid (container)

    YANG Description: This container defines TLV 129.
    """
    return self.__nlpid
      
  def _set_nlpid(self, v, load=False):
    """
    Setter method for nlpid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/nlpid (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_nlpid is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_nlpid() directly.

    YANG Description: This container defines TLV 129.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_nlpid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_nlpid, is_container='container', yang_name="nlpid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """nlpid must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_nlpid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_nlpid, is_container='container', yang_name="nlpid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__nlpid = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_nlpid(self):
    self.__nlpid = YANGDynClass(base=yc_nlpid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_nlpid, is_container='container', yang_name="nlpid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_hostname(self):
    """
    Getter method for hostname, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/hostname (container)

    YANG Description: This container defines TLV 137.
    """
    return self.__hostname
      
  def _set_hostname(self, v, load=False):
    """
    Setter method for hostname, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/hostname (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hostname is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hostname() directly.

    YANG Description: This container defines TLV 137.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_hostname_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_hostname, is_container='container', yang_name="hostname", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hostname must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_hostname_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_hostname, is_container='container', yang_name="hostname", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__hostname = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hostname(self):
    self.__hostname = YANGDynClass(base=yc_hostname_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_hostname, is_container='container', yang_name="hostname", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ipv4_interface_addresses(self):
    """
    Getter method for ipv4_interface_addresses, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_interface_addresses (container)

    YANG Description: This container defines TLV 132.
    """
    return self.__ipv4_interface_addresses
      
  def _set_ipv4_interface_addresses(self, v, load=False):
    """
    Setter method for ipv4_interface_addresses, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_interface_addresses (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv4_interface_addresses is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv4_interface_addresses() directly.

    YANG Description: This container defines TLV 132.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv4_interface_addresses_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_interface_addresses, is_container='container', yang_name="ipv4-interface-addresses", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv4_interface_addresses must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv4_interface_addresses_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_interface_addresses, is_container='container', yang_name="ipv4-interface-addresses", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ipv4_interface_addresses = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv4_interface_addresses(self):
    self.__ipv4_interface_addresses = YANGDynClass(base=yc_ipv4_interface_addresses_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_interface_addresses, is_container='container', yang_name="ipv4-interface-addresses", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ipv6_interface_addresses(self):
    """
    Getter method for ipv6_interface_addresses, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_interface_addresses (container)

    YANG Description: This container defines TLV 232.
    """
    return self.__ipv6_interface_addresses
      
  def _set_ipv6_interface_addresses(self, v, load=False):
    """
    Setter method for ipv6_interface_addresses, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_interface_addresses (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6_interface_addresses is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6_interface_addresses() directly.

    YANG Description: This container defines TLV 232.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv6_interface_addresses_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_interface_addresses, is_container='container', yang_name="ipv6-interface-addresses", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6_interface_addresses must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv6_interface_addresses_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_interface_addresses, is_container='container', yang_name="ipv6-interface-addresses", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ipv6_interface_addresses = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6_interface_addresses(self):
    self.__ipv6_interface_addresses = YANGDynClass(base=yc_ipv6_interface_addresses_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_interface_addresses, is_container='container', yang_name="ipv6-interface-addresses", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ipv4_te_router_id(self):
    """
    Getter method for ipv4_te_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_te_router_id (container)

    YANG Description: This container defines TLV 134.
    """
    return self.__ipv4_te_router_id
      
  def _set_ipv4_te_router_id(self, v, load=False):
    """
    Setter method for ipv4_te_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_te_router_id (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv4_te_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv4_te_router_id() directly.

    YANG Description: This container defines TLV 134.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv4_te_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_te_router_id, is_container='container', yang_name="ipv4-te-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv4_te_router_id must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv4_te_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_te_router_id, is_container='container', yang_name="ipv4-te-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ipv4_te_router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv4_te_router_id(self):
    self.__ipv4_te_router_id = YANGDynClass(base=yc_ipv4_te_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_te_router_id, is_container='container', yang_name="ipv4-te-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ipv6_te_router_id(self):
    """
    Getter method for ipv6_te_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_te_router_id (container)

    YANG Description: This container defines TLV 140.
    """
    return self.__ipv6_te_router_id
      
  def _set_ipv6_te_router_id(self, v, load=False):
    """
    Setter method for ipv6_te_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_te_router_id (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6_te_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6_te_router_id() directly.

    YANG Description: This container defines TLV 140.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv6_te_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_te_router_id, is_container='container', yang_name="ipv6-te-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6_te_router_id must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv6_te_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_te_router_id, is_container='container', yang_name="ipv6-te-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ipv6_te_router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6_te_router_id(self):
    self.__ipv6_te_router_id = YANGDynClass(base=yc_ipv6_te_router_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_te_router_id, is_container='container', yang_name="ipv6-te-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_instance_ids(self):
    """
    Getter method for instance_ids, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/instance_ids (container)

    YANG Description: This container defines ISIS Instance Identifier TLV.
    """
    return self.__instance_ids
      
  def _set_instance_ids(self, v, load=False):
    """
    Setter method for instance_ids, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/instance_ids (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_instance_ids is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_instance_ids() directly.

    YANG Description: This container defines ISIS Instance Identifier TLV.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_instance_ids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_instance_ids, is_container='container', yang_name="instance-ids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """instance_ids must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_instance_ids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_instance_ids, is_container='container', yang_name="instance-ids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__instance_ids = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_instance_ids(self):
    self.__instance_ids = YANGDynClass(base=yc_instance_ids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_instance_ids, is_container='container', yang_name="instance-ids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ipv4_srlgs(self):
    """
    Getter method for ipv4_srlgs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_srlgs (container)

    YANG Description: This container defines ISIS SRLG TLV 138.
    """
    return self.__ipv4_srlgs
      
  def _set_ipv4_srlgs(self, v, load=False):
    """
    Setter method for ipv4_srlgs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_srlgs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv4_srlgs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv4_srlgs() directly.

    YANG Description: This container defines ISIS SRLG TLV 138.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv4_srlgs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_srlgs, is_container='container', yang_name="ipv4-srlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv4_srlgs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv4_srlgs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_srlgs, is_container='container', yang_name="ipv4-srlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ipv4_srlgs = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv4_srlgs(self):
    self.__ipv4_srlgs = YANGDynClass(base=yc_ipv4_srlgs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_srlgs, is_container='container', yang_name="ipv4-srlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ipv6_srlgs(self):
    """
    Getter method for ipv6_srlgs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_srlgs (container)

    YANG Description: This container defines ISIS SRLG TLV.
    """
    return self.__ipv6_srlgs
      
  def _set_ipv6_srlgs(self, v, load=False):
    """
    Setter method for ipv6_srlgs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_srlgs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6_srlgs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6_srlgs() directly.

    YANG Description: This container defines ISIS SRLG TLV.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv6_srlgs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_srlgs, is_container='container', yang_name="ipv6-srlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6_srlgs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv6_srlgs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_srlgs, is_container='container', yang_name="ipv6-srlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ipv6_srlgs = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6_srlgs(self):
    self.__ipv6_srlgs = YANGDynClass(base=yc_ipv6_srlgs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_srlgs, is_container='container', yang_name="ipv6-srlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_purge_oi(self):
    """
    Getter method for purge_oi, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/purge_oi (container)

    YANG Description: This container defines ISIS purge TLV.
    """
    return self.__purge_oi
      
  def _set_purge_oi(self, v, load=False):
    """
    Setter method for purge_oi, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/purge_oi (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_purge_oi is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_purge_oi() directly.

    YANG Description: This container defines ISIS purge TLV.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_purge_oi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_purge_oi, is_container='container', yang_name="purge-oi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """purge_oi must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_purge_oi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_purge_oi, is_container='container', yang_name="purge-oi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__purge_oi = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_purge_oi(self):
    self.__purge_oi = YANGDynClass(base=yc_purge_oi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_purge_oi, is_container='container', yang_name="purge-oi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_router_capabilities(self):
    """
    Getter method for router_capabilities, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities (container)

    YANG Description: This container defines router capabilities.
    """
    return self.__router_capabilities
      
  def _set_router_capabilities(self, v, load=False):
    """
    Setter method for router_capabilities, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/router_capabilities (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_router_capabilities is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_router_capabilities() directly.

    YANG Description: This container defines router capabilities.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_router_capabilities_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities, is_container='container', yang_name="router-capabilities", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """router_capabilities must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_router_capabilities_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities, is_container='container', yang_name="router-capabilities", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__router_capabilities = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_router_capabilities(self):
    self.__router_capabilities = YANGDynClass(base=yc_router_capabilities_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_router_capabilities, is_container='container', yang_name="router-capabilities", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_is_reachability(self):
    """
    Getter method for is_reachability, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability (container)

    YANG Description: This container describes list of ISIS neighbors and
attributes.
    """
    return self.__is_reachability
      
  def _set_is_reachability(self, v, load=False):
    """
    Setter method for is_reachability, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_reachability (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_is_reachability is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_is_reachability() directly.

    YANG Description: This container describes list of ISIS neighbors and
attributes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_is_reachability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability, is_container='container', yang_name="is-reachability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """is_reachability must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_is_reachability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability, is_container='container', yang_name="is-reachability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__is_reachability = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_is_reachability(self):
    self.__is_reachability = YANGDynClass(base=yc_is_reachability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_reachability, is_container='container', yang_name="is-reachability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ipv4_internal_reachability(self):
    """
    Getter method for ipv4_internal_reachability, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability (container)

    YANG Description: This container defines list of IPv4 internal reachability
information.
    """
    return self.__ipv4_internal_reachability
      
  def _set_ipv4_internal_reachability(self, v, load=False):
    """
    Setter method for ipv4_internal_reachability, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv4_internal_reachability is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv4_internal_reachability() directly.

    YANG Description: This container defines list of IPv4 internal reachability
information.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv4_internal_reachability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability, is_container='container', yang_name="ipv4-internal-reachability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv4_internal_reachability must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv4_internal_reachability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability, is_container='container', yang_name="ipv4-internal-reachability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ipv4_internal_reachability = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv4_internal_reachability(self):
    self.__ipv4_internal_reachability = YANGDynClass(base=yc_ipv4_internal_reachability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_internal_reachability, is_container='container', yang_name="ipv4-internal-reachability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ipv4_external_reachability(self):
    """
    Getter method for ipv4_external_reachability, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability (container)

    YANG Description: This container defines list of IPv4 external reachability
information.
    """
    return self.__ipv4_external_reachability
      
  def _set_ipv4_external_reachability(self, v, load=False):
    """
    Setter method for ipv4_external_reachability, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv4_external_reachability is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv4_external_reachability() directly.

    YANG Description: This container defines list of IPv4 external reachability
information.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv4_external_reachability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability, is_container='container', yang_name="ipv4-external-reachability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv4_external_reachability must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv4_external_reachability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability, is_container='container', yang_name="ipv4-external-reachability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ipv4_external_reachability = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv4_external_reachability(self):
    self.__ipv4_external_reachability = YANGDynClass(base=yc_ipv4_external_reachability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv4_external_reachability, is_container='container', yang_name="ipv4-external-reachability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_authentication(self):
    """
    Getter method for authentication, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/authentication (container)

    YANG Description: This container defines authentication information of the
node.
    """
    return self.__authentication
      
  def _set_authentication(self, v, load=False):
    """
    Setter method for authentication, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/authentication (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_authentication is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_authentication() directly.

    YANG Description: This container defines authentication information of the
node.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_authentication_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_authentication, is_container='container', yang_name="authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """authentication must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_authentication_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_authentication, is_container='container', yang_name="authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__authentication = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_authentication(self):
    self.__authentication = YANGDynClass(base=yc_authentication_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_authentication, is_container='container', yang_name="authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_extended_is_reachability(self):
    """
    Getter method for extended_is_reachability, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability (container)

    YANG Description: This container defines list of ISIS extended reachability
neighbors.
    """
    return self.__extended_is_reachability
      
  def _set_extended_is_reachability(self, v, load=False):
    """
    Setter method for extended_is_reachability, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_is_reachability (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended_is_reachability is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended_is_reachability() directly.

    YANG Description: This container defines list of ISIS extended reachability
neighbors.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_extended_is_reachability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability, is_container='container', yang_name="extended-is-reachability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended_is_reachability must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_extended_is_reachability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability, is_container='container', yang_name="extended-is-reachability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__extended_is_reachability = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended_is_reachability(self):
    self.__extended_is_reachability = YANGDynClass(base=yc_extended_is_reachability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_is_reachability, is_container='container', yang_name="extended-is-reachability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_extended_ipv4_reachability(self):
    """
    Getter method for extended_ipv4_reachability, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability (container)

    YANG Description: This container defines list of IPv4 extended reachability
information.
    """
    return self.__extended_ipv4_reachability
      
  def _set_extended_ipv4_reachability(self, v, load=False):
    """
    Setter method for extended_ipv4_reachability, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/extended_ipv4_reachability (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_extended_ipv4_reachability is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_extended_ipv4_reachability() directly.

    YANG Description: This container defines list of IPv4 extended reachability
information.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_extended_ipv4_reachability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability, is_container='container', yang_name="extended-ipv4-reachability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """extended_ipv4_reachability must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_extended_ipv4_reachability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability, is_container='container', yang_name="extended-ipv4-reachability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__extended_ipv4_reachability = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_extended_ipv4_reachability(self):
    self.__extended_ipv4_reachability = YANGDynClass(base=yc_extended_ipv4_reachability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_extended_ipv4_reachability, is_container='container', yang_name="extended-ipv4-reachability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_ipv6_reachability(self):
    """
    Getter method for ipv6_reachability, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability (container)

    YANG Description: This container defines list of IPv6 reachability
information.
    """
    return self.__ipv6_reachability
      
  def _set_ipv6_reachability(self, v, load=False):
    """
    Setter method for ipv6_reachability, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6_reachability is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6_reachability() directly.

    YANG Description: This container defines list of IPv6 reachability
information.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ipv6_reachability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability, is_container='container', yang_name="ipv6-reachability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6_reachability must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ipv6_reachability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability, is_container='container', yang_name="ipv6-reachability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__ipv6_reachability = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6_reachability(self):
    self.__ipv6_reachability = YANGDynClass(base=yc_ipv6_reachability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_ipv6_reachability, is_container='container', yang_name="ipv6-reachability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_multi_topology(self):
    """
    Getter method for multi_topology, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/multi_topology (container)

    YANG Description: This container defines the topology supported.
    """
    return self.__multi_topology
      
  def _set_multi_topology(self, v, load=False):
    """
    Setter method for multi_topology, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/multi_topology (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multi_topology is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multi_topology() directly.

    YANG Description: This container defines the topology supported.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_multi_topology_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_multi_topology, is_container='container', yang_name="multi-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multi_topology must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_multi_topology_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_multi_topology, is_container='container', yang_name="multi-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__multi_topology = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multi_topology(self):
    self.__multi_topology = YANGDynClass(base=yc_multi_topology_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_multi_topology, is_container='container', yang_name="multi-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_isis_neighbor_attribute(self):
    """
    Getter method for isis_neighbor_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute (container)

    YANG Description: This container defines list of ISIS topology neighbors
for extended ISIS LSP (multiple system IDs). 
    """
    return self.__isis_neighbor_attribute
      
  def _set_isis_neighbor_attribute(self, v, load=False):
    """
    Setter method for isis_neighbor_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/isis_neighbor_attribute (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_isis_neighbor_attribute is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_isis_neighbor_attribute() directly.

    YANG Description: This container defines list of ISIS topology neighbors
for extended ISIS LSP (multiple system IDs). 
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_isis_neighbor_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute, is_container='container', yang_name="isis-neighbor-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """isis_neighbor_attribute must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_isis_neighbor_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute, is_container='container', yang_name="isis-neighbor-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__isis_neighbor_attribute = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_isis_neighbor_attribute(self):
    self.__isis_neighbor_attribute = YANGDynClass(base=yc_isis_neighbor_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_isis_neighbor_attribute, is_container='container', yang_name="isis-neighbor-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_is_alias_id(self):
    """
    Getter method for is_alias_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_alias_id (container)

    YANG Description: This container defines the IS-Alias TLV which allows
extension-capable ISs to recognize the Originating System
of an Extended LSP set. It identifies the Normal system-
id of the Originating System.
    """
    return self.__is_alias_id
      
  def _set_is_alias_id(self, v, load=False):
    """
    Setter method for is_alias_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/is_alias_id (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_is_alias_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_is_alias_id() directly.

    YANG Description: This container defines the IS-Alias TLV which allows
extension-capable ISs to recognize the Originating System
of an Extended LSP set. It identifies the Normal system-
id of the Originating System.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_is_alias_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_alias_id, is_container='container', yang_name="is-alias-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """is_alias_id must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_is_alias_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_alias_id, is_container='container', yang_name="is-alias-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__is_alias_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_is_alias_id(self):
    self.__is_alias_id = YANGDynClass(base=yc_is_alias_id_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_is_alias_id, is_container='container', yang_name="is-alias-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_mt_isn(self):
    """
    Getter method for mt_isn, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn (container)

    YANG Description: This container defines list of ISIS multi-topology
neighbors.
    """
    return self.__mt_isn
      
  def _set_mt_isn(self, v, load=False):
    """
    Setter method for mt_isn, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mt_isn is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mt_isn() directly.

    YANG Description: This container defines list of ISIS multi-topology
neighbors.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_mt_isn_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn, is_container='container', yang_name="mt-isn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mt_isn must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_mt_isn_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn, is_container='container', yang_name="mt-isn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__mt_isn = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mt_isn(self):
    self.__mt_isn = YANGDynClass(base=yc_mt_isn_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isn, is_container='container', yang_name="mt-isn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_mt_isis_neighbor_attribute(self):
    """
    Getter method for mt_isis_neighbor_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute (container)

    YANG Description: This container defines list of ISIS multi-topology
neighbors.
    """
    return self.__mt_isis_neighbor_attribute
      
  def _set_mt_isis_neighbor_attribute(self, v, load=False):
    """
    Setter method for mt_isis_neighbor_attribute, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mt_isis_neighbor_attribute is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mt_isis_neighbor_attribute() directly.

    YANG Description: This container defines list of ISIS multi-topology
neighbors.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_mt_isis_neighbor_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute, is_container='container', yang_name="mt-isis-neighbor-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mt_isis_neighbor_attribute must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_mt_isis_neighbor_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute, is_container='container', yang_name="mt-isis-neighbor-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__mt_isis_neighbor_attribute = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mt_isis_neighbor_attribute(self):
    self.__mt_isis_neighbor_attribute = YANGDynClass(base=yc_mt_isis_neighbor_attribute_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_isis_neighbor_attribute, is_container='container', yang_name="mt-isis-neighbor-attribute", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_mt_ipv4_reachability(self):
    """
    Getter method for mt_ipv4_reachability, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability (container)

    YANG Description: This container defines list of IPv4 reachability
Information in multi-topology environment.
    """
    return self.__mt_ipv4_reachability
      
  def _set_mt_ipv4_reachability(self, v, load=False):
    """
    Setter method for mt_ipv4_reachability, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv4_reachability (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mt_ipv4_reachability is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mt_ipv4_reachability() directly.

    YANG Description: This container defines list of IPv4 reachability
Information in multi-topology environment.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_mt_ipv4_reachability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability, is_container='container', yang_name="mt-ipv4-reachability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mt_ipv4_reachability must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_mt_ipv4_reachability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability, is_container='container', yang_name="mt-ipv4-reachability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__mt_ipv4_reachability = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mt_ipv4_reachability(self):
    self.__mt_ipv4_reachability = YANGDynClass(base=yc_mt_ipv4_reachability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv4_reachability, is_container='container', yang_name="mt-ipv4-reachability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_mt_ipv6_reachability(self):
    """
    Getter method for mt_ipv6_reachability, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability (container)

    YANG Description: This container defines list of IPv6 reachability
information in multi - topology environment.
    """
    return self.__mt_ipv6_reachability
      
  def _set_mt_ipv6_reachability(self, v, load=False):
    """
    Setter method for mt_ipv6_reachability, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_ipv6_reachability (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mt_ipv6_reachability is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mt_ipv6_reachability() directly.

    YANG Description: This container defines list of IPv6 reachability
information in multi - topology environment.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_mt_ipv6_reachability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability, is_container='container', yang_name="mt-ipv6-reachability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mt_ipv6_reachability must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_mt_ipv6_reachability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability, is_container='container', yang_name="mt-ipv6-reachability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__mt_ipv6_reachability = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mt_ipv6_reachability(self):
    self.__mt_ipv6_reachability = YANGDynClass(base=yc_mt_ipv6_reachability_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv_mt_ipv6_reachability, is_container='container', yang_name="mt-ipv6-reachability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  type = __builtin__.property(_get_type)
  state = __builtin__.property(_get_state)
  area_address = __builtin__.property(_get_area_address)
  lsp_buffer_size = __builtin__.property(_get_lsp_buffer_size)
  nlpid = __builtin__.property(_get_nlpid)
  hostname = __builtin__.property(_get_hostname)
  ipv4_interface_addresses = __builtin__.property(_get_ipv4_interface_addresses)
  ipv6_interface_addresses = __builtin__.property(_get_ipv6_interface_addresses)
  ipv4_te_router_id = __builtin__.property(_get_ipv4_te_router_id)
  ipv6_te_router_id = __builtin__.property(_get_ipv6_te_router_id)
  instance_ids = __builtin__.property(_get_instance_ids)
  ipv4_srlgs = __builtin__.property(_get_ipv4_srlgs)
  ipv6_srlgs = __builtin__.property(_get_ipv6_srlgs)
  purge_oi = __builtin__.property(_get_purge_oi)
  router_capabilities = __builtin__.property(_get_router_capabilities)
  is_reachability = __builtin__.property(_get_is_reachability)
  ipv4_internal_reachability = __builtin__.property(_get_ipv4_internal_reachability)
  ipv4_external_reachability = __builtin__.property(_get_ipv4_external_reachability)
  authentication = __builtin__.property(_get_authentication)
  extended_is_reachability = __builtin__.property(_get_extended_is_reachability)
  extended_ipv4_reachability = __builtin__.property(_get_extended_ipv4_reachability)
  ipv6_reachability = __builtin__.property(_get_ipv6_reachability)
  multi_topology = __builtin__.property(_get_multi_topology)
  isis_neighbor_attribute = __builtin__.property(_get_isis_neighbor_attribute)
  is_alias_id = __builtin__.property(_get_is_alias_id)
  mt_isn = __builtin__.property(_get_mt_isn)
  mt_isis_neighbor_attribute = __builtin__.property(_get_mt_isis_neighbor_attribute)
  mt_ipv4_reachability = __builtin__.property(_get_mt_ipv4_reachability)
  mt_ipv6_reachability = __builtin__.property(_get_mt_ipv6_reachability)


  _pyangbind_elements = OrderedDict([('type', type), ('state', state), ('area_address', area_address), ('lsp_buffer_size', lsp_buffer_size), ('nlpid', nlpid), ('hostname', hostname), ('ipv4_interface_addresses', ipv4_interface_addresses), ('ipv6_interface_addresses', ipv6_interface_addresses), ('ipv4_te_router_id', ipv4_te_router_id), ('ipv6_te_router_id', ipv6_te_router_id), ('instance_ids', instance_ids), ('ipv4_srlgs', ipv4_srlgs), ('ipv6_srlgs', ipv6_srlgs), ('purge_oi', purge_oi), ('router_capabilities', router_capabilities), ('is_reachability', is_reachability), ('ipv4_internal_reachability', ipv4_internal_reachability), ('ipv4_external_reachability', ipv4_external_reachability), ('authentication', authentication), ('extended_is_reachability', extended_is_reachability), ('extended_ipv4_reachability', extended_ipv4_reachability), ('ipv6_reachability', ipv6_reachability), ('multi_topology', multi_topology), ('isis_neighbor_attribute', isis_neighbor_attribute), ('is_alias_id', is_alias_id), ('mt_isn', mt_isn), ('mt_isis_neighbor_attribute', mt_isis_neighbor_attribute), ('mt_ipv4_reachability', mt_ipv4_reachability), ('mt_ipv6_reachability', mt_ipv6_reachability), ])


class yc_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines Link State PDU State TLVs.
  """
  __slots__ = ('_path_helper', '_extmethods', '__tlv',)

  _yang_name = 'tlvs'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__tlv = YANGDynClass(base=YANGListType("type",yc_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv, yang_name="tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'tlvs']

  def _get_tlv(self):
    """
    Getter method for tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv (list)

    YANG Description: List of TLV types in the LSDB for the specified LSP.
    """
    return self.__tlv
      
  def _set_tlv(self, v, load=False):
    """
    Setter method for tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tlv() directly.

    YANG Description: List of TLV types in the LSDB for the specified LSP.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("type",yc_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv, yang_name="tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tlv must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("type",yc_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv, yang_name="tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__tlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tlv(self):
    self.__tlv = YANGDynClass(base=YANGListType("type",yc_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs_tlv, yang_name="tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  tlv = __builtin__.property(_get_tlv)


  _pyangbind_elements = OrderedDict([('tlv', tlv), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_undefined_tlvs_undefined_tlv_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/undefined-tlvs/undefined-tlv/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of the undefined TLV.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__length','__value',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__length = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__value = YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'undefined-tlvs', 'undefined-tlv', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/undefined_tlvs/undefined_tlv/state/type (uint8)

    YANG Description: TLV Type.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/undefined_tlvs/undefined_tlv/state/type (uint8)
    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: TLV Type.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """type must be of a type compatible with uint8""",
          'defined-type': "uint8",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_type(self):
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_length(self):
    """
    Getter method for length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/undefined_tlvs/undefined_tlv/state/length (uint8)

    YANG Description: TLV length.
    """
    return self.__length
      
  def _set_length(self, v, load=False):
    """
    Setter method for length, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/undefined_tlvs/undefined_tlv/state/length (uint8)
    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: TLV length.
    """
    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="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """length 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="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', 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..255']}, int_size=8), is_leaf=True, yang_name="length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/undefined_tlvs/undefined_tlv/state/value (binary)

    YANG Description: TLV value.
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/undefined_tlvs/undefined_tlv/state/value (binary)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: TLV value.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value must be of a type compatible with binary""",
          'defined-type': "binary",
          'generated-type': """YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=bitarray, is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='binary', is_config=False)

  type = __builtin__.property(_get_type)
  length = __builtin__.property(_get_length)
  value = __builtin__.property(_get_value)


  _pyangbind_elements = OrderedDict([('type', type), ('length', length), ('value', value), ])


class yc_undefined_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_undefined_tlvs_undefined_tlv(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/undefined-tlvs/undefined-tlv. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of TLVs that are not defined within the model, or are
not recognised by the system.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__state',)

  _yang_name = 'undefined-tlv'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_undefined_tlvs_undefined_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'undefined-tlvs', 'undefined-tlv']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/undefined_tlvs/undefined_tlv/type (leafref)

    YANG Description: Reference to the undefined TLV's type
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/undefined_tlvs/undefined_tlv/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 undefined TLV's type
    """
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/undefined_tlvs/undefined_tlv/state (container)

    YANG Description: State parameters of the undefined TLV.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/undefined_tlvs/undefined_tlv/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 parameters of the undefined TLV.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_undefined_tlvs_undefined_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_undefined_tlvs_undefined_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_undefined_tlvs_undefined_tlv_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  type = __builtin__.property(_get_type)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('type', type), ('state', state), ])


class yc_undefined_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_undefined_tlvs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/undefined-tlvs. 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 unknown TLVs.
  """
  __slots__ = ('_path_helper', '_extmethods', '__undefined_tlv',)

  _yang_name = 'undefined-tlvs'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__undefined_tlv = YANGDynClass(base=YANGListType("type",yc_undefined_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_undefined_tlvs_undefined_tlv, yang_name="undefined-tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="undefined-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp', 'undefined-tlvs']

  def _get_undefined_tlv(self):
    """
    Getter method for undefined_tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/undefined_tlvs/undefined_tlv (list)

    YANG Description: List of TLVs that are not defined within the model, or are
not recognised by the system.
    """
    return self.__undefined_tlv
      
  def _set_undefined_tlv(self, v, load=False):
    """
    Setter method for undefined_tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/undefined_tlvs/undefined_tlv (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_undefined_tlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_undefined_tlv() directly.

    YANG Description: List of TLVs that are not defined within the model, or are
not recognised by the system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("type",yc_undefined_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_undefined_tlvs_undefined_tlv, yang_name="undefined-tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="undefined-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """undefined_tlv must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("type",yc_undefined_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_undefined_tlvs_undefined_tlv, yang_name="undefined-tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="undefined-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__undefined_tlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_undefined_tlv(self):
    self.__undefined_tlv = YANGDynClass(base=YANGListType("type",yc_undefined_tlv_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_undefined_tlvs_undefined_tlv, yang_name="undefined-tlv", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="undefined-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  undefined_tlv = __builtin__.property(_get_undefined_tlv)


  _pyangbind_elements = OrderedDict([('undefined_tlv', undefined_tlv), ])


class yc_lsp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This list describes LSPs in the LSDB.
  """
  __slots__ = ('_path_helper', '_extmethods', '__lsp_id','__state','__tlvs','__undefined_tlvs',)

  _yang_name = 'lsp'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__lsp_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="lsp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__tlvs = YANGDynClass(base=yc_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs, is_container='container', yang_name="tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__undefined_tlvs = YANGDynClass(base=yc_undefined_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_undefined_tlvs, is_container='container', yang_name="undefined-tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database', 'lsp']

  def _get_lsp_id(self):
    """
    Getter method for lsp_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/lsp_id (leafref)

    YANG Description: A reference to the Link State PDU ID.
    """
    return self.__lsp_id
      
  def _set_lsp_id(self, v, load=False):
    """
    Setter method for lsp_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/lsp_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsp_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsp_id() directly.

    YANG Description: A reference to the Link State PDU ID.
    """
    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="lsp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsp_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="lsp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__lsp_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsp_id(self):
    self.__lsp_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="lsp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/state (container)

    YANG Description: State parameters of Link State PDU.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/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 parameters of Link State PDU.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_tlvs(self):
    """
    Getter method for tlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs (container)

    YANG Description: This container defines Link State PDU State TLVs.
    """
    return self.__tlvs
      
  def _set_tlvs(self, v, load=False):
    """
    Setter method for tlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tlvs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tlvs() directly.

    YANG Description: This container defines Link State PDU State TLVs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs, is_container='container', yang_name="tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tlvs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs, is_container='container', yang_name="tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__tlvs = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tlvs(self):
    self.__tlvs = YANGDynClass(base=yc_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_tlvs, is_container='container', yang_name="tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_undefined_tlvs(self):
    """
    Getter method for undefined_tlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/undefined_tlvs (container)

    YANG Description: Surrounding container for a list of unknown TLVs.
    """
    return self.__undefined_tlvs
      
  def _set_undefined_tlvs(self, v, load=False):
    """
    Setter method for undefined_tlvs, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/undefined_tlvs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_undefined_tlvs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_undefined_tlvs() directly.

    YANG Description: Surrounding container for a list of unknown TLVs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_undefined_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_undefined_tlvs, is_container='container', yang_name="undefined-tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """undefined_tlvs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_undefined_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_undefined_tlvs, is_container='container', yang_name="undefined-tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__undefined_tlvs = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_undefined_tlvs(self):
    self.__undefined_tlvs = YANGDynClass(base=yc_undefined_tlvs_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp_undefined_tlvs, is_container='container', yang_name="undefined-tlvs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  lsp_id = __builtin__.property(_get_lsp_id)
  state = __builtin__.property(_get_state)
  tlvs = __builtin__.property(_get_tlvs)
  undefined_tlvs = __builtin__.property(_get_undefined_tlvs)


  _pyangbind_elements = OrderedDict([('lsp_id', lsp_id), ('state', state), ('tlvs', tlvs), ('undefined_tlvs', undefined_tlvs), ])


class yc_link_state_database_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS LSDB.
  """
  __slots__ = ('_path_helper', '_extmethods', '__lsp',)

  _yang_name = 'link-state-database'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__lsp = YANGDynClass(base=YANGListType("lsp_id",yc_lsp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp, yang_name="lsp", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='lsp-id', extensions=None), is_container='list', yang_name="lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'link-state-database']

  def _get_lsp(self):
    """
    Getter method for lsp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp (list)

    YANG Description: This list describes LSPs in the LSDB.
    """
    return self.__lsp
      
  def _set_lsp(self, v, load=False):
    """
    Setter method for lsp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsp() directly.

    YANG Description: This list describes LSPs in the LSDB.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("lsp_id",yc_lsp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp, yang_name="lsp", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='lsp-id', extensions=None), is_container='list', yang_name="lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsp must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("lsp_id",yc_lsp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp, yang_name="lsp", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='lsp-id', extensions=None), is_container='list', yang_name="lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__lsp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsp(self):
    self.__lsp = YANGDynClass(base=YANGListType("lsp_id",yc_lsp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database_lsp, yang_name="lsp", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='lsp-id', extensions=None), is_container='list', yang_name="lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  lsp = __builtin__.property(_get_lsp)


  _pyangbind_elements = OrderedDict([('lsp', lsp), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_traffic_engineering_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/traffic-engineering/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS TE configuration.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__ipv4_router_id','__ipv6_router_id',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__ipv4_router_id = 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}'}), is_leaf=True, yang_name="ipv4-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-address', is_config=True)
    self.__ipv6_router_id = 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}|:))'}), is_leaf=True, yang_name="ipv6-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-address', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'traffic-engineering', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/traffic_engineering/config/enabled (boolean)

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/traffic_engineering/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_ipv4_router_id(self):
    """
    Getter method for ipv4_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/traffic_engineering/config/ipv4_router_id (oc-inet:ipv4-address)

    YANG Description: IPv4 MPLS Traffic Engineering Router-ID.
    """
    return self.__ipv4_router_id
      
  def _set_ipv4_router_id(self, v, load=False):
    """
    Setter method for ipv4_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/traffic_engineering/config/ipv4_router_id (oc-inet:ipv4-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv4_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv4_router_id() directly.

    YANG Description: IPv4 MPLS Traffic Engineering Router-ID.
    """
    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}'}), is_leaf=True, yang_name="ipv4-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv4_router_id must be of a type compatible with oc-inet:ipv4-address""",
          'defined-type': "oc-inet:ipv4-address",
          '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}'}), is_leaf=True, yang_name="ipv4-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-address', is_config=True)""",
        })

    self.__ipv4_router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv4_router_id(self):
    self.__ipv4_router_id = 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}'}), is_leaf=True, yang_name="ipv4-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-address', is_config=True)


  def _get_ipv6_router_id(self):
    """
    Getter method for ipv6_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/traffic_engineering/config/ipv6_router_id (oc-inet:ipv6-address)

    YANG Description: IPv6 MPLS Traffic Engineering Router-ID.
    """
    return self.__ipv6_router_id
      
  def _set_ipv6_router_id(self, v, load=False):
    """
    Setter method for ipv6_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/traffic_engineering/config/ipv6_router_id (oc-inet:ipv6-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6_router_id() directly.

    YANG Description: IPv6 MPLS Traffic Engineering Router-ID.
    """
    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}|:))'}), is_leaf=True, yang_name="ipv6-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6_router_id must be of a type compatible with oc-inet:ipv6-address""",
          'defined-type': "oc-inet:ipv6-address",
          '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}|:))'}), is_leaf=True, yang_name="ipv6-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-address', is_config=True)""",
        })

    self.__ipv6_router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6_router_id(self):
    self.__ipv6_router_id = 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}|:))'}), is_leaf=True, yang_name="ipv6-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-address', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)
  ipv4_router_id = __builtin__.property(_get_ipv4_router_id, _set_ipv4_router_id)
  ipv6_router_id = __builtin__.property(_get_ipv6_router_id, _set_ipv6_router_id)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('ipv4_router_id', ipv4_router_id), ('ipv6_router_id', ipv6_router_id), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_traffic_engineering_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/traffic-engineering/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS TE state information.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__ipv4_router_id','__ipv6_router_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__ipv4_router_id = 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}'}), is_leaf=True, yang_name="ipv4-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-address', is_config=False)
    self.__ipv6_router_id = 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}|:))'}), is_leaf=True, yang_name="ipv6-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-address', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'traffic-engineering', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/traffic_engineering/state/enabled (boolean)

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/traffic_engineering/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_ipv4_router_id(self):
    """
    Getter method for ipv4_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/traffic_engineering/state/ipv4_router_id (oc-inet:ipv4-address)

    YANG Description: IPv4 MPLS Traffic Engineering Router-ID.
    """
    return self.__ipv4_router_id
      
  def _set_ipv4_router_id(self, v, load=False):
    """
    Setter method for ipv4_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/traffic_engineering/state/ipv4_router_id (oc-inet:ipv4-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv4_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv4_router_id() directly.

    YANG Description: IPv4 MPLS Traffic Engineering Router-ID.
    """
    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}'}), is_leaf=True, yang_name="ipv4-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv4_router_id must be of a type compatible with oc-inet:ipv4-address""",
          'defined-type': "oc-inet:ipv4-address",
          '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}'}), is_leaf=True, yang_name="ipv4-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-address', is_config=False)""",
        })

    self.__ipv4_router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv4_router_id(self):
    self.__ipv4_router_id = 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}'}), is_leaf=True, yang_name="ipv4-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-address', is_config=False)


  def _get_ipv6_router_id(self):
    """
    Getter method for ipv6_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/traffic_engineering/state/ipv6_router_id (oc-inet:ipv6-address)

    YANG Description: IPv6 MPLS Traffic Engineering Router-ID.
    """
    return self.__ipv6_router_id
      
  def _set_ipv6_router_id(self, v, load=False):
    """
    Setter method for ipv6_router_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/traffic_engineering/state/ipv6_router_id (oc-inet:ipv6-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6_router_id() directly.

    YANG Description: IPv6 MPLS Traffic Engineering Router-ID.
    """
    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}|:))'}), is_leaf=True, yang_name="ipv6-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6_router_id must be of a type compatible with oc-inet:ipv6-address""",
          'defined-type': "oc-inet:ipv6-address",
          '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}|:))'}), is_leaf=True, yang_name="ipv6-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-address', is_config=False)""",
        })

    self.__ipv6_router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6_router_id(self):
    self.__ipv6_router_id = 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}|:))'}), is_leaf=True, yang_name="ipv6-router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-address', is_config=False)

  enabled = __builtin__.property(_get_enabled)
  ipv4_router_id = __builtin__.property(_get_ipv4_router_id)
  ipv6_router_id = __builtin__.property(_get_ipv6_router_id)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('ipv4_router_id', ipv4_router_id), ('ipv6_router_id', ipv6_router_id), ])


class yc_traffic_engineering_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_traffic_engineering(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/traffic-engineering. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS TE.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'traffic-engineering'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_traffic_engineering_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_traffic_engineering_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'traffic-engineering']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/traffic_engineering/config (container)

    YANG Description: This container defines ISIS TE configuration.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/traffic_engineering/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: This container defines ISIS TE configuration.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_traffic_engineering_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_traffic_engineering_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_traffic_engineering_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/traffic_engineering/state (container)

    YANG Description: This container defines ISIS TE state information.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/traffic_engineering/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: This container defines ISIS TE state information.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_traffic_engineering_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_traffic_engineering_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_traffic_engineering_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_route_preference_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/route-preference/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines route preference configuration.
  """
  __slots__ = ('_path_helper', '_extmethods', '__external_route_preference','__internal_route_preference',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__external_route_preference = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="external-route-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__internal_route_preference = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="internal-route-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'route-preference', 'config']

  def _get_external_route_preference(self):
    """
    Getter method for external_route_preference, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/route_preference/config/external_route_preference (uint32)

    YANG Description: Administrative Distance (preference) for external ISIS routes.
    """
    return self.__external_route_preference
      
  def _set_external_route_preference(self, v, load=False):
    """
    Setter method for external_route_preference, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/route_preference/config/external_route_preference (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_external_route_preference is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_external_route_preference() directly.

    YANG Description: Administrative Distance (preference) for external ISIS routes.
    """
    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="external-route-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """external_route_preference 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="external-route-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__external_route_preference = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_external_route_preference(self):
    self.__external_route_preference = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="external-route-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_internal_route_preference(self):
    """
    Getter method for internal_route_preference, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/route_preference/config/internal_route_preference (uint32)

    YANG Description: Administrative Distance (preference) for internal ISIS routes.
    """
    return self.__internal_route_preference
      
  def _set_internal_route_preference(self, v, load=False):
    """
    Setter method for internal_route_preference, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/route_preference/config/internal_route_preference (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_internal_route_preference is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_internal_route_preference() directly.

    YANG Description: Administrative Distance (preference) for internal ISIS routes.
    """
    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="internal-route-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """internal_route_preference 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="internal-route-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__internal_route_preference = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_internal_route_preference(self):
    self.__internal_route_preference = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="internal-route-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)

  external_route_preference = __builtin__.property(_get_external_route_preference, _set_external_route_preference)
  internal_route_preference = __builtin__.property(_get_internal_route_preference, _set_internal_route_preference)


  _pyangbind_elements = OrderedDict([('external_route_preference', external_route_preference), ('internal_route_preference', internal_route_preference), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_route_preference_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/route-preference/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS route preference state information.
  """
  __slots__ = ('_path_helper', '_extmethods', '__external_route_preference','__internal_route_preference',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__external_route_preference = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="external-route-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__internal_route_preference = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="internal-route-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'route-preference', 'state']

  def _get_external_route_preference(self):
    """
    Getter method for external_route_preference, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/route_preference/state/external_route_preference (uint32)

    YANG Description: Administrative Distance (preference) for external ISIS routes.
    """
    return self.__external_route_preference
      
  def _set_external_route_preference(self, v, load=False):
    """
    Setter method for external_route_preference, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/route_preference/state/external_route_preference (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_external_route_preference is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_external_route_preference() directly.

    YANG Description: Administrative Distance (preference) for external ISIS routes.
    """
    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="external-route-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """external_route_preference 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="external-route-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__external_route_preference = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_external_route_preference(self):
    self.__external_route_preference = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="external-route-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_internal_route_preference(self):
    """
    Getter method for internal_route_preference, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/route_preference/state/internal_route_preference (uint32)

    YANG Description: Administrative Distance (preference) for internal ISIS routes.
    """
    return self.__internal_route_preference
      
  def _set_internal_route_preference(self, v, load=False):
    """
    Setter method for internal_route_preference, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/route_preference/state/internal_route_preference (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_internal_route_preference is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_internal_route_preference() directly.

    YANG Description: Administrative Distance (preference) for internal ISIS routes.
    """
    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="internal-route-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """internal_route_preference 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="internal-route-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__internal_route_preference = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_internal_route_preference(self):
    self.__internal_route_preference = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="internal-route-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  external_route_preference = __builtin__.property(_get_external_route_preference)
  internal_route_preference = __builtin__.property(_get_internal_route_preference)


  _pyangbind_elements = OrderedDict([('external_route_preference', external_route_preference), ('internal_route_preference', internal_route_preference), ])


class yc_route_preference_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_route_preference(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/route-preference. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines Administrative Distance (or preference)
assigned to ISIS routes (level1 internal, level2 internal, level1
external, level2 external).
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'route-preference'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_route_preference_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_route_preference_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'route-preference']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/route_preference/config (container)

    YANG Description: This container defines route preference configuration.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/route_preference/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: This container defines route preference configuration.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_route_preference_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_route_preference_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_route_preference_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/route_preference/state (container)

    YANG Description: This container defines ISIS route preference state information.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/route_preference/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: This container defines ISIS route preference state information.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_route_preference_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_route_preference_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_route_preference_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_authentication_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/authentication/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to IS-IS authentication.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__disable_csnp','__disable_psnp','__disable_lsp','__keychain','__auth_type','__auth_mode','__auth_password',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__disable_csnp = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-csnp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__disable_psnp = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-psnp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__disable_lsp = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__keychain = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="keychain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-keychain:keychain-ref', is_config=True)
    self.__auth_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}},), is_leaf=True, yang_name="auth-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__auth_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="auth-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__auth_password = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="auth-password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'authentication', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/authentication/config/enabled (boolean)

    YANG Description: When this leaf is set to true, authentication of IS-IS PSNP, CSNP and
LSP packets is enabled using the specified authentication details in
the sibling leaves.

The sibling 'disable-<type>' leaves can be used to override the value
of this leaf and disable authentication for a specific packet type.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/authentication/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When this leaf is set to true, authentication of IS-IS PSNP, CSNP and
LSP packets is enabled using the specified authentication details in
the sibling leaves.

The sibling 'disable-<type>' leaves can be used to override the value
of this leaf and disable authentication for a specific packet type.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_disable_csnp(self):
    """
    Getter method for disable_csnp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/authentication/config/disable_csnp (boolean)

    YANG Description: When this leaf is set to true, authentication is disabled for CSNP
packets, overriding the value of the enabled leaf in this context.
    """
    return self.__disable_csnp
      
  def _set_disable_csnp(self, v, load=False):
    """
    Setter method for disable_csnp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/authentication/config/disable_csnp (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_disable_csnp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_disable_csnp() directly.

    YANG Description: When this leaf is set to true, authentication is disabled for CSNP
packets, overriding the value of the enabled leaf in this context.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-csnp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """disable_csnp must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-csnp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__disable_csnp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_disable_csnp(self):
    self.__disable_csnp = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-csnp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_disable_psnp(self):
    """
    Getter method for disable_psnp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/authentication/config/disable_psnp (boolean)

    YANG Description: When this leaf is set to true, authentication is disabled for PSNP
packets, overriding the value of the enabled leaf in this context.
    """
    return self.__disable_psnp
      
  def _set_disable_psnp(self, v, load=False):
    """
    Setter method for disable_psnp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/authentication/config/disable_psnp (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_disable_psnp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_disable_psnp() directly.

    YANG Description: When this leaf is set to true, authentication is disabled for PSNP
packets, overriding the value of the enabled leaf in this context.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-psnp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """disable_psnp must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-psnp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__disable_psnp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_disable_psnp(self):
    self.__disable_psnp = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-psnp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_disable_lsp(self):
    """
    Getter method for disable_lsp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/authentication/config/disable_lsp (boolean)

    YANG Description: When this leaf is set to true, authentication is disabled for LSP
packets, overriding the value of the enabled leaf in this context.
    """
    return self.__disable_lsp
      
  def _set_disable_lsp(self, v, load=False):
    """
    Setter method for disable_lsp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/authentication/config/disable_lsp (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_disable_lsp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_disable_lsp() directly.

    YANG Description: When this leaf is set to true, authentication is disabled for LSP
packets, overriding the value of the enabled leaf in this context.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """disable_lsp must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__disable_lsp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_disable_lsp(self):
    self.__disable_lsp = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_keychain(self):
    """
    Getter method for keychain, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/authentication/config/keychain (oc-keychain:keychain-ref)

    YANG Description: Reference to the keychain that should be used for authenticating IS-IS
packets - the keychain may contain either a simple password, or
HMAC-MD5 key that is used for authenticating CSNP, PSNP and LSP packets
within the specified IS-IS level.
    """
    return self.__keychain
      
  def _set_keychain(self, v, load=False):
    """
    Setter method for keychain, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/authentication/config/keychain (oc-keychain:keychain-ref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_keychain is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_keychain() directly.

    YANG Description: Reference to the keychain that should be used for authenticating IS-IS
packets - the keychain may contain either a simple password, or
HMAC-MD5 key that is used for authenticating CSNP, PSNP and LSP packets
within the specified IS-IS level.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="keychain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-keychain:keychain-ref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """keychain must be of a type compatible with oc-keychain:keychain-ref""",
          'defined-type': "oc-keychain:keychain-ref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="keychain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-keychain:keychain-ref', is_config=True)""",
        })

    self.__keychain = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_keychain(self):
    self.__keychain = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="keychain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-keychain:keychain-ref', is_config=True)


  def _get_auth_type(self):
    """
    Getter method for auth_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/authentication/config/auth_type (identityref)

    YANG Description: The type of authentication used in the applicable IS-IS PDUs
(simple_key, keychain).
    """
    return self.__auth_type
      
  def _set_auth_type(self, v, load=False):
    """
    Setter method for auth_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/authentication/config/auth_type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_auth_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_auth_type() directly.

    YANG Description: The type of authentication used in the applicable IS-IS PDUs
(simple_key, keychain).
    """
    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={'SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}},), is_leaf=True, yang_name="auth-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """auth_type must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}},), is_leaf=True, yang_name="auth-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__auth_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_auth_type(self):
    self.__auth_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}},), is_leaf=True, yang_name="auth-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_auth_mode(self):
    """
    Getter method for auth_mode, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/authentication/config/auth_mode (identityref)

    YANG Description: The type of authentication used in the applicable IS-IS PDUs.

This leaf along with the sibling leaf 'auth-password' can be used
to configure the simple key authentication.
    """
    return self.__auth_mode
      
  def _set_auth_mode(self, v, load=False):
    """
    Setter method for auth_mode, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/authentication/config/auth_mode (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_auth_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_auth_mode() directly.

    YANG Description: The type of authentication used in the applicable IS-IS PDUs.

This leaf along with the sibling leaf 'auth-password' can be used
to configure the simple key authentication.
    """
    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={'TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="auth-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """auth_mode must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="auth-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__auth_mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_auth_mode(self):
    self.__auth_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="auth-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_auth_password(self):
    """
    Getter method for auth_password, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/authentication/config/auth_password (oc-types:routing-password)

    YANG Description: The authentication key used in the applicable IS-IS PDUs. The key in the
packet may be encrypted according to the configured authentication type.
    """
    return self.__auth_password
      
  def _set_auth_password(self, v, load=False):
    """
    Setter method for auth_password, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/authentication/config/auth_password (oc-types:routing-password)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_auth_password is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_auth_password() directly.

    YANG Description: The authentication key used in the applicable IS-IS PDUs. The key in the
packet may be encrypted according to the configured authentication type.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="auth-password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """auth_password must be of a type compatible with oc-types:routing-password""",
          'defined-type': "oc-types:routing-password",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="auth-password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)""",
        })

    self.__auth_password = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_auth_password(self):
    self.__auth_password = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="auth-password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)
  disable_csnp = __builtin__.property(_get_disable_csnp, _set_disable_csnp)
  disable_psnp = __builtin__.property(_get_disable_psnp, _set_disable_psnp)
  disable_lsp = __builtin__.property(_get_disable_lsp, _set_disable_lsp)
  keychain = __builtin__.property(_get_keychain, _set_keychain)
  auth_type = __builtin__.property(_get_auth_type, _set_auth_type)
  auth_mode = __builtin__.property(_get_auth_mode, _set_auth_mode)
  auth_password = __builtin__.property(_get_auth_password, _set_auth_password)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('disable_csnp', disable_csnp), ('disable_psnp', disable_psnp), ('disable_lsp', disable_lsp), ('keychain', keychain), ('auth_type', auth_type), ('auth_mode', auth_mode), ('auth_password', auth_password), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_authentication_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/authentication/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 IS-IS authentication.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__disable_csnp','__disable_psnp','__disable_lsp','__keychain','__auth_type','__auth_mode','__auth_password',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__disable_csnp = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-csnp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__disable_psnp = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-psnp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__disable_lsp = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__keychain = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="keychain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-keychain:keychain-ref', is_config=False)
    self.__auth_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}},), is_leaf=True, yang_name="auth-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__auth_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="auth-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__auth_password = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="auth-password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'authentication', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/authentication/state/enabled (boolean)

    YANG Description: When this leaf is set to true, authentication of IS-IS PSNP, CSNP and
LSP packets is enabled using the specified authentication details in
the sibling leaves.

The sibling 'disable-<type>' leaves can be used to override the value
of this leaf and disable authentication for a specific packet type.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/authentication/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When this leaf is set to true, authentication of IS-IS PSNP, CSNP and
LSP packets is enabled using the specified authentication details in
the sibling leaves.

The sibling 'disable-<type>' leaves can be used to override the value
of this leaf and disable authentication for a specific packet type.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_disable_csnp(self):
    """
    Getter method for disable_csnp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/authentication/state/disable_csnp (boolean)

    YANG Description: When this leaf is set to true, authentication is disabled for CSNP
packets, overriding the value of the enabled leaf in this context.
    """
    return self.__disable_csnp
      
  def _set_disable_csnp(self, v, load=False):
    """
    Setter method for disable_csnp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/authentication/state/disable_csnp (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_disable_csnp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_disable_csnp() directly.

    YANG Description: When this leaf is set to true, authentication is disabled for CSNP
packets, overriding the value of the enabled leaf in this context.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-csnp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """disable_csnp must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-csnp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__disable_csnp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_disable_csnp(self):
    self.__disable_csnp = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-csnp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_disable_psnp(self):
    """
    Getter method for disable_psnp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/authentication/state/disable_psnp (boolean)

    YANG Description: When this leaf is set to true, authentication is disabled for PSNP
packets, overriding the value of the enabled leaf in this context.
    """
    return self.__disable_psnp
      
  def _set_disable_psnp(self, v, load=False):
    """
    Setter method for disable_psnp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/authentication/state/disable_psnp (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_disable_psnp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_disable_psnp() directly.

    YANG Description: When this leaf is set to true, authentication is disabled for PSNP
packets, overriding the value of the enabled leaf in this context.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-psnp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """disable_psnp must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-psnp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__disable_psnp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_disable_psnp(self):
    self.__disable_psnp = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-psnp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_disable_lsp(self):
    """
    Getter method for disable_lsp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/authentication/state/disable_lsp (boolean)

    YANG Description: When this leaf is set to true, authentication is disabled for LSP
packets, overriding the value of the enabled leaf in this context.
    """
    return self.__disable_lsp
      
  def _set_disable_lsp(self, v, load=False):
    """
    Setter method for disable_lsp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/authentication/state/disable_lsp (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_disable_lsp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_disable_lsp() directly.

    YANG Description: When this leaf is set to true, authentication is disabled for LSP
packets, overriding the value of the enabled leaf in this context.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """disable_lsp must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__disable_lsp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_disable_lsp(self):
    self.__disable_lsp = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_keychain(self):
    """
    Getter method for keychain, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/authentication/state/keychain (oc-keychain:keychain-ref)

    YANG Description: Reference to the keychain that should be used for authenticating IS-IS
packets - the keychain may contain either a simple password, or
HMAC-MD5 key that is used for authenticating CSNP, PSNP and LSP packets
within the specified IS-IS level.
    """
    return self.__keychain
      
  def _set_keychain(self, v, load=False):
    """
    Setter method for keychain, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/authentication/state/keychain (oc-keychain:keychain-ref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_keychain is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_keychain() directly.

    YANG Description: Reference to the keychain that should be used for authenticating IS-IS
packets - the keychain may contain either a simple password, or
HMAC-MD5 key that is used for authenticating CSNP, PSNP and LSP packets
within the specified IS-IS level.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="keychain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-keychain:keychain-ref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """keychain must be of a type compatible with oc-keychain:keychain-ref""",
          'defined-type': "oc-keychain:keychain-ref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="keychain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-keychain:keychain-ref', is_config=False)""",
        })

    self.__keychain = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_keychain(self):
    self.__keychain = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="keychain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-keychain:keychain-ref', is_config=False)


  def _get_auth_type(self):
    """
    Getter method for auth_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/authentication/state/auth_type (identityref)

    YANG Description: The type of authentication used in the applicable IS-IS PDUs
(simple_key, keychain).
    """
    return self.__auth_type
      
  def _set_auth_type(self, v, load=False):
    """
    Setter method for auth_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/authentication/state/auth_type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_auth_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_auth_type() directly.

    YANG Description: The type of authentication used in the applicable IS-IS PDUs
(simple_key, keychain).
    """
    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={'SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}},), is_leaf=True, yang_name="auth-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """auth_type must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}},), is_leaf=True, yang_name="auth-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__auth_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_auth_type(self):
    self.__auth_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}},), is_leaf=True, yang_name="auth-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_auth_mode(self):
    """
    Getter method for auth_mode, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/authentication/state/auth_mode (identityref)

    YANG Description: The type of authentication used in the applicable IS-IS PDUs.

This leaf along with the sibling leaf 'auth-password' can be used
to configure the simple key authentication.
    """
    return self.__auth_mode
      
  def _set_auth_mode(self, v, load=False):
    """
    Setter method for auth_mode, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/authentication/state/auth_mode (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_auth_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_auth_mode() directly.

    YANG Description: The type of authentication used in the applicable IS-IS PDUs.

This leaf along with the sibling leaf 'auth-password' can be used
to configure the simple key authentication.
    """
    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={'TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="auth-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """auth_mode must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="auth-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__auth_mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_auth_mode(self):
    self.__auth_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="auth-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_auth_password(self):
    """
    Getter method for auth_password, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/authentication/state/auth_password (oc-types:routing-password)

    YANG Description: The authentication key used in the applicable IS-IS PDUs. The key in the
packet may be encrypted according to the configured authentication type.
    """
    return self.__auth_password
      
  def _set_auth_password(self, v, load=False):
    """
    Setter method for auth_password, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/authentication/state/auth_password (oc-types:routing-password)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_auth_password is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_auth_password() directly.

    YANG Description: The authentication key used in the applicable IS-IS PDUs. The key in the
packet may be encrypted according to the configured authentication type.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="auth-password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """auth_password must be of a type compatible with oc-types:routing-password""",
          'defined-type': "oc-types:routing-password",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="auth-password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=False)""",
        })

    self.__auth_password = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_auth_password(self):
    self.__auth_password = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="auth-password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=False)

  enabled = __builtin__.property(_get_enabled)
  disable_csnp = __builtin__.property(_get_disable_csnp)
  disable_psnp = __builtin__.property(_get_disable_psnp)
  disable_lsp = __builtin__.property(_get_disable_lsp)
  keychain = __builtin__.property(_get_keychain)
  auth_type = __builtin__.property(_get_auth_type)
  auth_mode = __builtin__.property(_get_auth_mode)
  auth_password = __builtin__.property(_get_auth_password)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('disable_csnp', disable_csnp), ('disable_psnp', disable_psnp), ('disable_lsp', disable_lsp), ('keychain', keychain), ('auth_type', auth_type), ('auth_mode', auth_mode), ('auth_password', auth_password), ])


class yc_authentication_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_authentication(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level/authentication. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS authentication.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'authentication'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_authentication_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level', 'authentication']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/authentication/config (container)

    YANG Description: Configuration parameters relating to IS-IS authentication.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/authentication/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 IS-IS authentication.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_authentication_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_authentication_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_authentication_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/authentication/state (container)

    YANG Description: Operational state parameters relating to IS-IS authentication.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/authentication/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 IS-IS authentication.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_level_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels/level. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration and operational state parameters related to a
particular level within the IS-IS protocol instance
  """
  __slots__ = ('_path_helper', '_extmethods', '__level_number','__config','__state','__system_level_counters','__link_state_database','__traffic_engineering','__route_preference','__authentication',)

  _yang_name = 'level'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__level_number = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="level-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__system_level_counters = YANGDynClass(base=yc_system_level_counters_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_system_level_counters, is_container='container', yang_name="system-level-counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__link_state_database = YANGDynClass(base=yc_link_state_database_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database, is_container='container', yang_name="link-state-database", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__traffic_engineering = YANGDynClass(base=yc_traffic_engineering_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_traffic_engineering, is_container='container', yang_name="traffic-engineering", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__route_preference = YANGDynClass(base=yc_route_preference_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_route_preference, is_container='container', yang_name="route-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__authentication = YANGDynClass(base=yc_authentication_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_authentication, is_container='container', yang_name="authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels', 'level']

  def _get_level_number(self):
    """
    Getter method for level_number, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/level_number (leafref)

    YANG Description: Reference to ISIS level-number.
    """
    return self.__level_number
      
  def _set_level_number(self, v, load=False):
    """
    Setter method for level_number, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/level_number (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_level_number is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_level_number() directly.

    YANG Description: Reference to ISIS level-number.
    """
    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="level-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """level_number must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="level-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__level_number = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_level_number(self):
    self.__level_number = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="level-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/config (container)

    YANG Description: This container defines ISIS level based configuration.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/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: This container defines ISIS level based configuration.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/state (container)

    YANG Description: This container defines ISIS level state information.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/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: This container defines ISIS level state information.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_system_level_counters(self):
    """
    Getter method for system_level_counters, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/system_level_counters (container)

    YANG Description: This container defines ISIS system level counters.
    """
    return self.__system_level_counters
      
  def _set_system_level_counters(self, v, load=False):
    """
    Setter method for system_level_counters, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/system_level_counters (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_system_level_counters is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_system_level_counters() directly.

    YANG Description: This container defines ISIS system level counters.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_system_level_counters_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_system_level_counters, is_container='container', yang_name="system-level-counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """system_level_counters must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_system_level_counters_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_system_level_counters, is_container='container', yang_name="system-level-counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__system_level_counters = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_system_level_counters(self):
    self.__system_level_counters = YANGDynClass(base=yc_system_level_counters_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_system_level_counters, is_container='container', yang_name="system-level-counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_link_state_database(self):
    """
    Getter method for link_state_database, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database (container)

    YANG Description: This container defines ISIS LSDB.
    """
    return self.__link_state_database
      
  def _set_link_state_database(self, v, load=False):
    """
    Setter method for link_state_database, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_state_database is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_state_database() directly.

    YANG Description: This container defines ISIS LSDB.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_link_state_database_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database, is_container='container', yang_name="link-state-database", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_state_database must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_link_state_database_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database, is_container='container', yang_name="link-state-database", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__link_state_database = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_state_database(self):
    self.__link_state_database = YANGDynClass(base=yc_link_state_database_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_link_state_database, is_container='container', yang_name="link-state-database", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_traffic_engineering(self):
    """
    Getter method for traffic_engineering, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/traffic_engineering (container)

    YANG Description: This container defines ISIS TE.
    """
    return self.__traffic_engineering
      
  def _set_traffic_engineering(self, v, load=False):
    """
    Setter method for traffic_engineering, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/traffic_engineering (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_traffic_engineering is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_traffic_engineering() directly.

    YANG Description: This container defines ISIS TE.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_traffic_engineering_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_traffic_engineering, is_container='container', yang_name="traffic-engineering", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """traffic_engineering must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_traffic_engineering_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_traffic_engineering, is_container='container', yang_name="traffic-engineering", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__traffic_engineering = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_traffic_engineering(self):
    self.__traffic_engineering = YANGDynClass(base=yc_traffic_engineering_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_traffic_engineering, is_container='container', yang_name="traffic-engineering", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_route_preference(self):
    """
    Getter method for route_preference, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/route_preference (container)

    YANG Description: This container defines Administrative Distance (or preference)
assigned to ISIS routes (level1 internal, level2 internal, level1
external, level2 external).
    """
    return self.__route_preference
      
  def _set_route_preference(self, v, load=False):
    """
    Setter method for route_preference, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/route_preference (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route_preference is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route_preference() directly.

    YANG Description: This container defines Administrative Distance (or preference)
assigned to ISIS routes (level1 internal, level2 internal, level1
external, level2 external).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_route_preference_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_route_preference, is_container='container', yang_name="route-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route_preference must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_route_preference_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_route_preference, is_container='container', yang_name="route-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__route_preference = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route_preference(self):
    self.__route_preference = YANGDynClass(base=yc_route_preference_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_route_preference, is_container='container', yang_name="route-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_authentication(self):
    """
    Getter method for authentication, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/authentication (container)

    YANG Description: This container defines ISIS authentication.
    """
    return self.__authentication
      
  def _set_authentication(self, v, load=False):
    """
    Setter method for authentication, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/authentication (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_authentication is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_authentication() directly.

    YANG Description: This container defines ISIS authentication.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_authentication_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_authentication, is_container='container', yang_name="authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """authentication must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_authentication_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_authentication, is_container='container', yang_name="authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__authentication = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_authentication(self):
    self.__authentication = YANGDynClass(base=yc_authentication_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level_authentication, is_container='container', yang_name="authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  level_number = __builtin__.property(_get_level_number, _set_level_number)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  system_level_counters = __builtin__.property(_get_system_level_counters, _set_system_level_counters)
  link_state_database = __builtin__.property(_get_link_state_database, _set_link_state_database)
  traffic_engineering = __builtin__.property(_get_traffic_engineering, _set_traffic_engineering)
  route_preference = __builtin__.property(_get_route_preference, _set_route_preference)
  authentication = __builtin__.property(_get_authentication, _set_authentication)


  _pyangbind_elements = OrderedDict([('level_number', level_number), ('config', config), ('state', state), ('system_level_counters', system_level_counters), ('link_state_database', link_state_database), ('traffic_engineering', traffic_engineering), ('route_preference', route_preference), ('authentication', authentication), ])


class yc_levels_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/levels. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS level configuration and state
information.
  """
  __slots__ = ('_path_helper', '_extmethods', '__level',)

  _yang_name = 'levels'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__level = YANGDynClass(base=YANGListType("level_number",yc_level_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level, yang_name="level", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='level-number', extensions=None), is_container='list', yang_name="level", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'levels']

  def _get_level(self):
    """
    Getter method for level, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level (list)

    YANG Description: Configuration and operational state parameters related to a
particular level within the IS-IS protocol instance
    """
    return self.__level
      
  def _set_level(self, v, load=False):
    """
    Setter method for level, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_level is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_level() directly.

    YANG Description: Configuration and operational state parameters related to a
particular level within the IS-IS protocol instance
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("level_number",yc_level_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level, yang_name="level", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='level-number', extensions=None), is_container='list', yang_name="level", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """level must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("level_number",yc_level_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level, yang_name="level", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='level-number', extensions=None), is_container='list', yang_name="level", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__level = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_level(self):
    self.__level = YANGDynClass(base=YANGListType("level_number",yc_level_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels_level, yang_name="level", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='level-number', extensions=None), is_container='list', yang_name="level", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  level = __builtin__.property(_get_level, _set_level)


  _pyangbind_elements = OrderedDict([('level', level), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS interface configuration.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__interface_id','__passive','__hello_padding','__circuit_type',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=True)
    self.__passive = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="passive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__hello_padding = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}, 'LOOSE': {}, 'ADAPTIVE': {}, 'DISABLE': {}},), is_leaf=True, yang_name="hello-padding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:hello-padding-type', is_config=True)
    self.__circuit_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'POINT_TO_POINT': {}, 'BROADCAST': {}},), is_leaf=True, yang_name="circuit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:circuit-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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/config/enabled (boolean)

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/config/interface_id (oc-if:interface-id)

    YANG Description: Interface for which ISIS configuration is to be applied.
    """
    return self.__interface_id
      
  def _set_interface_id(self, v, load=False):
    """
    Setter method for interface_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/config/interface_id (oc-if:interface-id)
    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: Interface for which ISIS configuration is to be applied.
    """
    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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_id must be of a type compatible with oc-if:interface-id""",
          'defined-type': "oc-if:interface-id",
          '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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=True)


  def _get_passive(self):
    """
    Getter method for passive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/config/passive (boolean)

    YANG Description: When set to true, the referenced interface is a passive interface
such that it is not eligible to establish adjacencies with other
systems, but is advertised into the IS-IS topology.
    """
    return self.__passive
      
  def _set_passive(self, v, load=False):
    """
    Setter method for passive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/config/passive (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_passive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_passive() directly.

    YANG Description: When set to true, the referenced interface is a passive interface
such that it is not eligible to establish adjacencies with other
systems, but is advertised into the IS-IS topology.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="passive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """passive must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="passive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__passive = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_passive(self):
    self.__passive = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="passive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_hello_padding(self):
    """
    Getter method for hello_padding, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/config/hello_padding (oc-isis-types:hello-padding-type)

    YANG Description: Controls the padding type for IS-IS Hello PDUs.
    """
    return self.__hello_padding
      
  def _set_hello_padding(self, v, load=False):
    """
    Setter method for hello_padding, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/config/hello_padding (oc-isis-types:hello-padding-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_padding is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_padding() directly.

    YANG Description: Controls the padding type for IS-IS Hello PDUs.
    """
    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': {}, 'LOOSE': {}, 'ADAPTIVE': {}, 'DISABLE': {}},), is_leaf=True, yang_name="hello-padding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:hello-padding-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_padding must be of a type compatible with oc-isis-types:hello-padding-type""",
          'defined-type': "oc-isis-types:hello-padding-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}, 'LOOSE': {}, 'ADAPTIVE': {}, 'DISABLE': {}},), is_leaf=True, yang_name="hello-padding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:hello-padding-type', is_config=True)""",
        })

    self.__hello_padding = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_padding(self):
    self.__hello_padding = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}, 'LOOSE': {}, 'ADAPTIVE': {}, 'DISABLE': {}},), is_leaf=True, yang_name="hello-padding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:hello-padding-type', is_config=True)


  def _get_circuit_type(self):
    """
    Getter method for circuit_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/config/circuit_type (oc-isis-types:circuit-type)

    YANG Description: ISIS circuit type (p2p, broadcast).
    """
    return self.__circuit_type
      
  def _set_circuit_type(self, v, load=False):
    """
    Setter method for circuit_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/config/circuit_type (oc-isis-types:circuit-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_circuit_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_circuit_type() directly.

    YANG Description: ISIS circuit type (p2p, broadcast).
    """
    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={'POINT_TO_POINT': {}, 'BROADCAST': {}},), is_leaf=True, yang_name="circuit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:circuit-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """circuit_type must be of a type compatible with oc-isis-types:circuit-type""",
          'defined-type': "oc-isis-types:circuit-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'POINT_TO_POINT': {}, 'BROADCAST': {}},), is_leaf=True, yang_name="circuit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:circuit-type', is_config=True)""",
        })

    self.__circuit_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_circuit_type(self):
    self.__circuit_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'POINT_TO_POINT': {}, 'BROADCAST': {}},), is_leaf=True, yang_name="circuit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:circuit-type', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)
  interface_id = __builtin__.property(_get_interface_id, _set_interface_id)
  passive = __builtin__.property(_get_passive, _set_passive)
  hello_padding = __builtin__.property(_get_hello_padding, _set_hello_padding)
  circuit_type = __builtin__.property(_get_circuit_type, _set_circuit_type)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('interface_id', interface_id), ('passive', passive), ('hello_padding', hello_padding), ('circuit_type', circuit_type), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines state information for ISIS interfaces.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__interface_id','__passive','__hello_padding','__circuit_type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=False)
    self.__passive = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="passive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__hello_padding = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}, 'LOOSE': {}, 'ADAPTIVE': {}, 'DISABLE': {}},), is_leaf=True, yang_name="hello-padding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:hello-padding-type', is_config=False)
    self.__circuit_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'POINT_TO_POINT': {}, 'BROADCAST': {}},), is_leaf=True, yang_name="circuit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:circuit-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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/state/enabled (boolean)

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/state/interface_id (oc-if:interface-id)

    YANG Description: Interface for which ISIS configuration is to be applied.
    """
    return self.__interface_id
      
  def _set_interface_id(self, v, load=False):
    """
    Setter method for interface_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/state/interface_id (oc-if:interface-id)
    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: Interface for which ISIS configuration is to be applied.
    """
    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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_id must be of a type compatible with oc-if:interface-id""",
          'defined-type': "oc-if:interface-id",
          '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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=False)


  def _get_passive(self):
    """
    Getter method for passive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/state/passive (boolean)

    YANG Description: When set to true, the referenced interface is a passive interface
such that it is not eligible to establish adjacencies with other
systems, but is advertised into the IS-IS topology.
    """
    return self.__passive
      
  def _set_passive(self, v, load=False):
    """
    Setter method for passive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/state/passive (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_passive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_passive() directly.

    YANG Description: When set to true, the referenced interface is a passive interface
such that it is not eligible to establish adjacencies with other
systems, but is advertised into the IS-IS topology.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="passive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """passive must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="passive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__passive = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_passive(self):
    self.__passive = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="passive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_hello_padding(self):
    """
    Getter method for hello_padding, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/state/hello_padding (oc-isis-types:hello-padding-type)

    YANG Description: Controls the padding type for IS-IS Hello PDUs.
    """
    return self.__hello_padding
      
  def _set_hello_padding(self, v, load=False):
    """
    Setter method for hello_padding, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/state/hello_padding (oc-isis-types:hello-padding-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_padding is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_padding() directly.

    YANG Description: Controls the padding type for IS-IS Hello PDUs.
    """
    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': {}, 'LOOSE': {}, 'ADAPTIVE': {}, 'DISABLE': {}},), is_leaf=True, yang_name="hello-padding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:hello-padding-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_padding must be of a type compatible with oc-isis-types:hello-padding-type""",
          'defined-type': "oc-isis-types:hello-padding-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}, 'LOOSE': {}, 'ADAPTIVE': {}, 'DISABLE': {}},), is_leaf=True, yang_name="hello-padding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:hello-padding-type', is_config=False)""",
        })

    self.__hello_padding = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_padding(self):
    self.__hello_padding = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STRICT': {}, 'LOOSE': {}, 'ADAPTIVE': {}, 'DISABLE': {}},), is_leaf=True, yang_name="hello-padding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:hello-padding-type', is_config=False)


  def _get_circuit_type(self):
    """
    Getter method for circuit_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/state/circuit_type (oc-isis-types:circuit-type)

    YANG Description: ISIS circuit type (p2p, broadcast).
    """
    return self.__circuit_type
      
  def _set_circuit_type(self, v, load=False):
    """
    Setter method for circuit_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/state/circuit_type (oc-isis-types:circuit-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_circuit_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_circuit_type() directly.

    YANG Description: ISIS circuit type (p2p, broadcast).
    """
    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={'POINT_TO_POINT': {}, 'BROADCAST': {}},), is_leaf=True, yang_name="circuit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:circuit-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """circuit_type must be of a type compatible with oc-isis-types:circuit-type""",
          'defined-type': "oc-isis-types:circuit-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'POINT_TO_POINT': {}, 'BROADCAST': {}},), is_leaf=True, yang_name="circuit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:circuit-type', is_config=False)""",
        })

    self.__circuit_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_circuit_type(self):
    self.__circuit_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'POINT_TO_POINT': {}, 'BROADCAST': {}},), is_leaf=True, yang_name="circuit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:circuit-type', is_config=False)

  enabled = __builtin__.property(_get_enabled)
  interface_id = __builtin__.property(_get_interface_id)
  passive = __builtin__.property(_get_passive)
  hello_padding = __builtin__.property(_get_hello_padding)
  circuit_type = __builtin__.property(_get_circuit_type)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('interface_id', interface_id), ('passive', passive), ('hello_padding', hello_padding), ('circuit_type', circuit_type), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_circuit_counters_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/circuit-counters/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The container defines a list of counters for IS circuit.
  """
  __slots__ = ('_path_helper', '_extmethods', '__adj_changes','__init_fails','__rejected_adj','__id_field_len_mismatches','__max_area_address_mismatches','__auth_type_fails','__auth_fails','__lan_dis_changes','__adj_number',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__adj_changes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="adj-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__init_fails = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="init-fails", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__rejected_adj = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="rejected-adj", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__id_field_len_mismatches = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="id-field-len-mismatches", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__max_area_address_mismatches = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-area-address-mismatches", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__auth_type_fails = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="auth-type-fails", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__auth_fails = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="auth-fails", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__lan_dis_changes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="lan-dis-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__adj_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="adj-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'circuit-counters', 'state']

  def _get_adj_changes(self):
    """
    Getter method for adj_changes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/circuit_counters/state/adj_changes (oc-yang:counter32)

    YANG Description: Number of times an adjacency state change has occurred on this circuit.
MIB Entry: CircAdjChanges.
    """
    return self.__adj_changes
      
  def _set_adj_changes(self, v, load=False):
    """
    Setter method for adj_changes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/circuit_counters/state/adj_changes (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adj_changes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adj_changes() directly.

    YANG Description: Number of times an adjacency state change has occurred on this circuit.
MIB Entry: CircAdjChanges.
    """
    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="adj-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adj_changes must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="adj-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__adj_changes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adj_changes(self):
    self.__adj_changes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="adj-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_init_fails(self):
    """
    Getter method for init_fails, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/circuit_counters/state/init_fails (oc-yang:counter32)

    YANG Description: Number of times initialization of this circuit has failed. This counts
events such as PPP NCP failures. MIB Entry: CircInitFails.
    """
    return self.__init_fails
      
  def _set_init_fails(self, v, load=False):
    """
    Setter method for init_fails, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/circuit_counters/state/init_fails (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_init_fails is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_init_fails() directly.

    YANG Description: Number of times initialization of this circuit has failed. This counts
events such as PPP NCP failures. MIB Entry: CircInitFails.
    """
    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="init-fails", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """init_fails must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="init-fails", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__init_fails = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_init_fails(self):
    self.__init_fails = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="init-fails", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_rejected_adj(self):
    """
    Getter method for rejected_adj, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/circuit_counters/state/rejected_adj (oc-yang:counter32)

    YANG Description: Number of times an adjacency has been rejected on this circuit. MIB
Entry: CircRejAdjs.
    """
    return self.__rejected_adj
      
  def _set_rejected_adj(self, v, load=False):
    """
    Setter method for rejected_adj, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/circuit_counters/state/rejected_adj (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_rejected_adj is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_rejected_adj() directly.

    YANG Description: Number of times an adjacency has been rejected on this circuit. MIB
Entry: CircRejAdjs.
    """
    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="rejected-adj", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """rejected_adj must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="rejected-adj", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__rejected_adj = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_rejected_adj(self):
    self.__rejected_adj = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="rejected-adj", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_id_field_len_mismatches(self):
    """
    Getter method for id_field_len_mismatches, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/circuit_counters/state/id_field_len_mismatches (oc-yang:counter32)

    YANG Description: Number of times an IS-IS control PDU with an ID field length different
from that for this system has been received.
MIB Entry: CircIDFieldLenMismatches.
    """
    return self.__id_field_len_mismatches
      
  def _set_id_field_len_mismatches(self, v, load=False):
    """
    Setter method for id_field_len_mismatches, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/circuit_counters/state/id_field_len_mismatches (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_id_field_len_mismatches is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_id_field_len_mismatches() directly.

    YANG Description: Number of times an IS-IS control PDU with an ID field length different
from that for this system has been received.
MIB Entry: CircIDFieldLenMismatches.
    """
    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="id-field-len-mismatches", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id_field_len_mismatches must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="id-field-len-mismatches", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__id_field_len_mismatches = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_id_field_len_mismatches(self):
    self.__id_field_len_mismatches = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="id-field-len-mismatches", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_max_area_address_mismatches(self):
    """
    Getter method for max_area_address_mismatches, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/circuit_counters/state/max_area_address_mismatches (oc-yang:counter32)

    YANG Description: Number of times an IS-IS control PDU with a max area address field
different from that for this system has been received. MIB Entry:
CircMaxAreaAddrMismatches.
    """
    return self.__max_area_address_mismatches
      
  def _set_max_area_address_mismatches(self, v, load=False):
    """
    Setter method for max_area_address_mismatches, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/circuit_counters/state/max_area_address_mismatches (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_area_address_mismatches is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_area_address_mismatches() directly.

    YANG Description: Number of times an IS-IS control PDU with a max area address field
different from that for this system has been received. MIB Entry:
CircMaxAreaAddrMismatches.
    """
    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-area-address-mismatches", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_area_address_mismatches must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-area-address-mismatches", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__max_area_address_mismatches = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_area_address_mismatches(self):
    self.__max_area_address_mismatches = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="max-area-address-mismatches", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_auth_type_fails(self):
    """
    Getter method for auth_type_fails, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/circuit_counters/state/auth_type_fails (oc-yang:counter32)

    YANG Description: Number of times an IS-IS control PDU with an auth type field different
from that for this system has been received. MIB Entry:
CircAuthTypeFails.
    """
    return self.__auth_type_fails
      
  def _set_auth_type_fails(self, v, load=False):
    """
    Setter method for auth_type_fails, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/circuit_counters/state/auth_type_fails (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_auth_type_fails is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_auth_type_fails() directly.

    YANG Description: Number of times an IS-IS control PDU with an auth type field different
from that for this system has been received. MIB Entry:
CircAuthTypeFails.
    """
    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="auth-type-fails", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """auth_type_fails must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="auth-type-fails", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__auth_type_fails = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_auth_type_fails(self):
    self.__auth_type_fails = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="auth-type-fails", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_auth_fails(self):
    """
    Getter method for auth_fails, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/circuit_counters/state/auth_fails (oc-yang:counter32)

    YANG Description: Number of times an IS-IS control PDU with the correct auth type has
failed to pass authentication validation. MIB Entry: CircAuthFails.
    """
    return self.__auth_fails
      
  def _set_auth_fails(self, v, load=False):
    """
    Setter method for auth_fails, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/circuit_counters/state/auth_fails (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_auth_fails is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_auth_fails() directly.

    YANG Description: Number of times an IS-IS control PDU with the correct auth type has
failed to pass authentication validation. MIB Entry: CircAuthFails.
    """
    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="auth-fails", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """auth_fails must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="auth-fails", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__auth_fails = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_auth_fails(self):
    self.__auth_fails = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="auth-fails", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_lan_dis_changes(self):
    """
    Getter method for lan_dis_changes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/circuit_counters/state/lan_dis_changes (oc-yang:counter32)

    YANG Description: Number of times the Designated IS has changed on this circuit at this
level. If the circuit is point to point, this count is zero. MIB Entry:
CircLANDesISChanges.
    """
    return self.__lan_dis_changes
      
  def _set_lan_dis_changes(self, v, load=False):
    """
    Setter method for lan_dis_changes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/circuit_counters/state/lan_dis_changes (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lan_dis_changes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lan_dis_changes() directly.

    YANG Description: Number of times the Designated IS has changed on this circuit at this
level. If the circuit is point to point, this count is zero. MIB Entry:
CircLANDesISChanges.
    """
    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="lan-dis-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lan_dis_changes must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="lan-dis-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__lan_dis_changes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lan_dis_changes(self):
    self.__lan_dis_changes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="lan-dis-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_adj_number(self):
    """
    Getter method for adj_number, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/circuit_counters/state/adj_number (uint32)

    YANG Description: Number of adjacencies on this circuit.
MIB Entry: CircNumAdj.
    """
    return self.__adj_number
      
  def _set_adj_number(self, v, load=False):
    """
    Setter method for adj_number, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/circuit_counters/state/adj_number (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adj_number is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adj_number() directly.

    YANG Description: Number of adjacencies on this circuit.
MIB Entry: CircNumAdj.
    """
    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="adj-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adj_number 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="adj-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__adj_number = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adj_number(self):
    self.__adj_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="adj-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  adj_changes = __builtin__.property(_get_adj_changes)
  init_fails = __builtin__.property(_get_init_fails)
  rejected_adj = __builtin__.property(_get_rejected_adj)
  id_field_len_mismatches = __builtin__.property(_get_id_field_len_mismatches)
  max_area_address_mismatches = __builtin__.property(_get_max_area_address_mismatches)
  auth_type_fails = __builtin__.property(_get_auth_type_fails)
  auth_fails = __builtin__.property(_get_auth_fails)
  lan_dis_changes = __builtin__.property(_get_lan_dis_changes)
  adj_number = __builtin__.property(_get_adj_number)


  _pyangbind_elements = OrderedDict([('adj_changes', adj_changes), ('init_fails', init_fails), ('rejected_adj', rejected_adj), ('id_field_len_mismatches', id_field_len_mismatches), ('max_area_address_mismatches', max_area_address_mismatches), ('auth_type_fails', auth_type_fails), ('auth_fails', auth_fails), ('lan_dis_changes', lan_dis_changes), ('adj_number', adj_number), ])


class yc_circuit_counters_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_circuit_counters(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/circuit-counters. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines state information for ISIS circuit counters.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'circuit-counters'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_circuit_counters_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'circuit-counters']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/circuit_counters/state (container)

    YANG Description: The container defines a list of counters for IS circuit.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/circuit_counters/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: The container defines a list of counters for IS circuit.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_circuit_counters_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_circuit_counters_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_circuit_counters_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_authentication_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/authentication/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS authentication configuration.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__keychain','__auth_type','__auth_mode','__auth_password',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__keychain = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="keychain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-keychain:keychain-ref', is_config=True)
    self.__auth_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}},), is_leaf=True, yang_name="auth-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__auth_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="auth-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__auth_password = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="auth-password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'authentication', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/authentication/config/enabled (boolean)

    YANG Description: Enabled or disable ISIS Hello authentication. Hello authentication
is used on a per-interface basis to authenticate adjacencies on the
interface.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/authentication/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: Enabled or disable ISIS Hello authentication. Hello authentication
is used on a per-interface basis to authenticate adjacencies on the
interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_keychain(self):
    """
    Getter method for keychain, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/authentication/config/keychain (oc-keychain:keychain-ref)

    YANG Description: Reference to a keychain that should be used for hello authentication.
    """
    return self.__keychain
      
  def _set_keychain(self, v, load=False):
    """
    Setter method for keychain, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/authentication/config/keychain (oc-keychain:keychain-ref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_keychain is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_keychain() directly.

    YANG Description: Reference to a keychain that should be used for hello authentication.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="keychain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-keychain:keychain-ref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """keychain must be of a type compatible with oc-keychain:keychain-ref""",
          'defined-type': "oc-keychain:keychain-ref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="keychain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-keychain:keychain-ref', is_config=True)""",
        })

    self.__keychain = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_keychain(self):
    self.__keychain = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="keychain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-keychain:keychain-ref', is_config=True)


  def _get_auth_type(self):
    """
    Getter method for auth_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/authentication/config/auth_type (identityref)

    YANG Description: The type of authentication used in the applicable IS-IS PDUs
(simple_key, keychain).
    """
    return self.__auth_type
      
  def _set_auth_type(self, v, load=False):
    """
    Setter method for auth_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/authentication/config/auth_type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_auth_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_auth_type() directly.

    YANG Description: The type of authentication used in the applicable IS-IS PDUs
(simple_key, keychain).
    """
    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={'SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}},), is_leaf=True, yang_name="auth-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """auth_type must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}},), is_leaf=True, yang_name="auth-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__auth_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_auth_type(self):
    self.__auth_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}},), is_leaf=True, yang_name="auth-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_auth_mode(self):
    """
    Getter method for auth_mode, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/authentication/config/auth_mode (identityref)

    YANG Description: The type of authentication used in the applicable IS-IS PDUs.

This leaf along with the sibling leaf 'auth-password' can be used
to configure the simple key authentication.
    """
    return self.__auth_mode
      
  def _set_auth_mode(self, v, load=False):
    """
    Setter method for auth_mode, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/authentication/config/auth_mode (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_auth_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_auth_mode() directly.

    YANG Description: The type of authentication used in the applicable IS-IS PDUs.

This leaf along with the sibling leaf 'auth-password' can be used
to configure the simple key authentication.
    """
    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={'TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="auth-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """auth_mode must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="auth-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__auth_mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_auth_mode(self):
    self.__auth_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="auth-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_auth_password(self):
    """
    Getter method for auth_password, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/authentication/config/auth_password (oc-types:routing-password)

    YANG Description: The authentication key used in the applicable IS-IS PDUs. The key in the
packet may be encrypted according to the configured authentication type.
    """
    return self.__auth_password
      
  def _set_auth_password(self, v, load=False):
    """
    Setter method for auth_password, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/authentication/config/auth_password (oc-types:routing-password)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_auth_password is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_auth_password() directly.

    YANG Description: The authentication key used in the applicable IS-IS PDUs. The key in the
packet may be encrypted according to the configured authentication type.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="auth-password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """auth_password must be of a type compatible with oc-types:routing-password""",
          'defined-type': "oc-types:routing-password",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="auth-password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)""",
        })

    self.__auth_password = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_auth_password(self):
    self.__auth_password = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="auth-password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)
  keychain = __builtin__.property(_get_keychain, _set_keychain)
  auth_type = __builtin__.property(_get_auth_type, _set_auth_type)
  auth_mode = __builtin__.property(_get_auth_mode, _set_auth_mode)
  auth_password = __builtin__.property(_get_auth_password, _set_auth_password)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('keychain', keychain), ('auth_type', auth_type), ('auth_mode', auth_mode), ('auth_password', auth_password), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_authentication_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/authentication/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS authentication state.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__keychain','__auth_type','__auth_mode','__auth_password',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__keychain = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="keychain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-keychain:keychain-ref', is_config=False)
    self.__auth_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}},), is_leaf=True, yang_name="auth-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__auth_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="auth-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__auth_password = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="auth-password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'authentication', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/authentication/state/enabled (boolean)

    YANG Description: Enabled or disable ISIS Hello authentication. Hello authentication
is used on a per-interface basis to authenticate adjacencies on the
interface.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/authentication/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: Enabled or disable ISIS Hello authentication. Hello authentication
is used on a per-interface basis to authenticate adjacencies on the
interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_keychain(self):
    """
    Getter method for keychain, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/authentication/state/keychain (oc-keychain:keychain-ref)

    YANG Description: Reference to a keychain that should be used for hello authentication.
    """
    return self.__keychain
      
  def _set_keychain(self, v, load=False):
    """
    Setter method for keychain, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/authentication/state/keychain (oc-keychain:keychain-ref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_keychain is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_keychain() directly.

    YANG Description: Reference to a keychain that should be used for hello authentication.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="keychain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-keychain:keychain-ref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """keychain must be of a type compatible with oc-keychain:keychain-ref""",
          'defined-type': "oc-keychain:keychain-ref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="keychain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-keychain:keychain-ref', is_config=False)""",
        })

    self.__keychain = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_keychain(self):
    self.__keychain = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="keychain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-keychain:keychain-ref', is_config=False)


  def _get_auth_type(self):
    """
    Getter method for auth_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/authentication/state/auth_type (identityref)

    YANG Description: The type of authentication used in the applicable IS-IS PDUs
(simple_key, keychain).
    """
    return self.__auth_type
      
  def _set_auth_type(self, v, load=False):
    """
    Setter method for auth_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/authentication/state/auth_type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_auth_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_auth_type() directly.

    YANG Description: The type of authentication used in the applicable IS-IS PDUs
(simple_key, keychain).
    """
    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={'SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}},), is_leaf=True, yang_name="auth-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """auth_type must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}},), is_leaf=True, yang_name="auth-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__auth_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_auth_type(self):
    self.__auth_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}},), is_leaf=True, yang_name="auth-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_auth_mode(self):
    """
    Getter method for auth_mode, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/authentication/state/auth_mode (identityref)

    YANG Description: The type of authentication used in the applicable IS-IS PDUs.

This leaf along with the sibling leaf 'auth-password' can be used
to configure the simple key authentication.
    """
    return self.__auth_mode
      
  def _set_auth_mode(self, v, load=False):
    """
    Setter method for auth_mode, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/authentication/state/auth_mode (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_auth_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_auth_mode() directly.

    YANG Description: The type of authentication used in the applicable IS-IS PDUs.

This leaf along with the sibling leaf 'auth-password' can be used
to configure the simple key authentication.
    """
    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={'TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="auth-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """auth_mode must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="auth-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__auth_mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_auth_mode(self):
    self.__auth_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="auth-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_auth_password(self):
    """
    Getter method for auth_password, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/authentication/state/auth_password (oc-types:routing-password)

    YANG Description: The authentication key used in the applicable IS-IS PDUs. The key in the
packet may be encrypted according to the configured authentication type.
    """
    return self.__auth_password
      
  def _set_auth_password(self, v, load=False):
    """
    Setter method for auth_password, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/authentication/state/auth_password (oc-types:routing-password)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_auth_password is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_auth_password() directly.

    YANG Description: The authentication key used in the applicable IS-IS PDUs. The key in the
packet may be encrypted according to the configured authentication type.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="auth-password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """auth_password must be of a type compatible with oc-types:routing-password""",
          'defined-type': "oc-types:routing-password",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="auth-password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=False)""",
        })

    self.__auth_password = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_auth_password(self):
    self.__auth_password = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="auth-password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=False)

  enabled = __builtin__.property(_get_enabled)
  keychain = __builtin__.property(_get_keychain)
  auth_type = __builtin__.property(_get_auth_type)
  auth_mode = __builtin__.property(_get_auth_mode)
  auth_password = __builtin__.property(_get_auth_password)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('keychain', keychain), ('auth_type', auth_type), ('auth_mode', auth_mode), ('auth_password', auth_password), ])


class yc_authentication_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_authentication(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/authentication. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS authentication.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'authentication'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_authentication_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'authentication']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/authentication/config (container)

    YANG Description: This container defines ISIS authentication configuration.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/authentication/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: This container defines ISIS authentication configuration.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_authentication_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_authentication_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_authentication_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/authentication/state (container)

    YANG Description: This container defines ISIS authentication state.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/authentication/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: This container defines ISIS authentication state.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_afi_safi_af_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/afi-safi/af/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines AFI-SAFI configuration parameters. Single
topology is the default setting.
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi_name','__safi_name','__enabled',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__safi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'afi-safi', 'af', 'config']

  def _get_afi_name(self):
    """
    Getter method for afi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/afi_safi/af/config/afi_name (identityref)

    YANG Description: Address-family type.
    """
    return self.__afi_name
      
  def _set_afi_name(self, v, load=False):
    """
    Setter method for afi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/afi_safi/af/config/afi_name (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_name() directly.

    YANG Description: Address-family type.
    """
    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': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_name must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__afi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_name(self):
    self.__afi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_safi_name(self):
    """
    Getter method for safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/afi_safi/af/config/safi_name (identityref)

    YANG Description: Subsequent address-family type.
    """
    return self.__safi_name
      
  def _set_safi_name(self, v, load=False):
    """
    Setter method for safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/afi_safi/af/config/safi_name (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_safi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_safi_name() directly.

    YANG Description: Subsequent address-family type.
    """
    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={'UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """safi_name must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__safi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_safi_name(self):
    self.__safi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/afi_safi/af/config/enabled (boolean)

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/afi_safi/af/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  afi_name = __builtin__.property(_get_afi_name, _set_afi_name)
  safi_name = __builtin__.property(_get_safi_name, _set_safi_name)
  enabled = __builtin__.property(_get_enabled, _set_enabled)


  _pyangbind_elements = OrderedDict([('afi_name', afi_name), ('safi_name', safi_name), ('enabled', enabled), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_afi_safi_af_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/afi-safi/af/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines AFI-SAFI State information
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi_name','__safi_name','__enabled',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__safi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'afi-safi', 'af', 'state']

  def _get_afi_name(self):
    """
    Getter method for afi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/afi_safi/af/state/afi_name (identityref)

    YANG Description: Address-family type.
    """
    return self.__afi_name
      
  def _set_afi_name(self, v, load=False):
    """
    Setter method for afi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/afi_safi/af/state/afi_name (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_name() directly.

    YANG Description: Address-family type.
    """
    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': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_name must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__afi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_name(self):
    self.__afi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_safi_name(self):
    """
    Getter method for safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/afi_safi/af/state/safi_name (identityref)

    YANG Description: Subsequent address-family type.
    """
    return self.__safi_name
      
  def _set_safi_name(self, v, load=False):
    """
    Setter method for safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/afi_safi/af/state/safi_name (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_safi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_safi_name() directly.

    YANG Description: Subsequent address-family type.
    """
    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={'UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """safi_name must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__safi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_safi_name(self):
    self.__safi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/afi_safi/af/state/enabled (boolean)

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/afi_safi/af/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  afi_name = __builtin__.property(_get_afi_name)
  safi_name = __builtin__.property(_get_safi_name)
  enabled = __builtin__.property(_get_enabled)


  _pyangbind_elements = OrderedDict([('afi_name', afi_name), ('safi_name', safi_name), ('enabled', enabled), ])


class yc_af_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_afi_safi_af(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/afi-safi/af. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Address-family/Subsequent Address-family list.
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi_name','__safi_name','__config','__state',)

  _yang_name = 'af'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__safi_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_afi_safi_af_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_afi_safi_af_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'afi-safi', 'af']

  def _get_afi_name(self):
    """
    Getter method for afi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/afi_safi/af/afi_name (leafref)

    YANG Description: Reference to address-family type
    """
    return self.__afi_name
      
  def _set_afi_name(self, v, load=False):
    """
    Setter method for afi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/afi_safi/af/afi_name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_name() directly.

    YANG Description: Reference to address-family type
    """
    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="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__afi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_name(self):
    self.__afi_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_safi_name(self):
    """
    Getter method for safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/afi_safi/af/safi_name (leafref)

    YANG Description: Reference to subsequent address-family type
    """
    return self.__safi_name
      
  def _set_safi_name(self, v, load=False):
    """
    Setter method for safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/afi_safi/af/safi_name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_safi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_safi_name() directly.

    YANG Description: Reference to subsequent address-family type
    """
    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="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """safi_name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__safi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_safi_name(self):
    self.__safi_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/afi_safi/af/config (container)

    YANG Description: This container defines AFI-SAFI configuration parameters. Single
topology is the default setting.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/afi_safi/af/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: This container defines AFI-SAFI configuration parameters. Single
topology is the default setting.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_afi_safi_af_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_afi_safi_af_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_afi_safi_af_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/afi_safi/af/state (container)

    YANG Description: This container defines AFI-SAFI State information
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/afi_safi/af/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: This container defines AFI-SAFI State information
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_afi_safi_af_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_afi_safi_af_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_afi_safi_af_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  afi_name = __builtin__.property(_get_afi_name, _set_afi_name)
  safi_name = __builtin__.property(_get_safi_name, _set_safi_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('afi_name', afi_name), ('safi_name', safi_name), ('config', config), ('state', state), ])


class yc_afi_safi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_afi_safi(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/afi-safi. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines address-family specific configuration
and state information.
  """
  __slots__ = ('_path_helper', '_extmethods', '__af',)

  _yang_name = 'afi-safi'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__af = YANGDynClass(base=YANGListType("afi_name safi_name",yc_af_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_afi_safi_af, yang_name="af", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-name safi-name', extensions=None), is_container='list', yang_name="af", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'afi-safi']

  def _get_af(self):
    """
    Getter method for af, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/afi_safi/af (list)

    YANG Description: Address-family/Subsequent Address-family list.
    """
    return self.__af
      
  def _set_af(self, v, load=False):
    """
    Setter method for af, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/afi_safi/af (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_af is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_af() directly.

    YANG Description: Address-family/Subsequent Address-family list.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("afi_name safi_name",yc_af_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_afi_safi_af, yang_name="af", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-name safi-name', extensions=None), is_container='list', yang_name="af", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """af must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("afi_name safi_name",yc_af_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_afi_safi_af, yang_name="af", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-name safi-name', extensions=None), is_container='list', yang_name="af", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__af = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_af(self):
    self.__af = YANGDynClass(base=YANGListType("afi_name safi_name",yc_af_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_afi_safi_af, yang_name="af", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-name safi-name', extensions=None), is_container='list', yang_name="af", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  af = __builtin__.property(_get_af, _set_af)


  _pyangbind_elements = OrderedDict([('af', af), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines interface ISIS level configuration.
  """
  __slots__ = ('_path_helper', '_extmethods', '__level_number','__passive','__priority','__enabled',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__level_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..2']}), is_leaf=True, yang_name="level-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:level-number', is_config=True)
    self.__passive = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="passive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0 .. 127']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'levels', 'level', 'config']

  def _get_level_number(self):
    """
    Getter method for level_number, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/config/level_number (oc-isis-types:level-number)

    YANG Description: ISIS level number(level-1, level-2).
    """
    return self.__level_number
      
  def _set_level_number(self, v, load=False):
    """
    Setter method for level_number, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/config/level_number (oc-isis-types:level-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_level_number is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_level_number() directly.

    YANG Description: ISIS level number(level-1, level-2).
    """
    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': ['1..2']}), is_leaf=True, yang_name="level-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:level-number', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """level_number must be of a type compatible with oc-isis-types:level-number""",
          'defined-type': "oc-isis-types:level-number",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..2']}), is_leaf=True, yang_name="level-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:level-number', is_config=True)""",
        })

    self.__level_number = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_level_number(self):
    self.__level_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..2']}), is_leaf=True, yang_name="level-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:level-number', is_config=True)


  def _get_passive(self):
    """
    Getter method for passive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/config/passive (boolean)

    YANG Description: ISIS passive interface admin enable/disable function.
    """
    return self.__passive
      
  def _set_passive(self, v, load=False):
    """
    Setter method for passive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/config/passive (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_passive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_passive() directly.

    YANG Description: ISIS passive interface admin enable/disable function.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="passive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """passive must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="passive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__passive = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_passive(self):
    self.__passive = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="passive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_priority(self):
    """
    Getter method for priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/config/priority (uint8)

    YANG Description: ISIS neighbor priority(LAN hello PDU only).
    """
    return self.__priority
      
  def _set_priority(self, v, load=False):
    """
    Setter method for priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/config/priority (uint8)
    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: ISIS neighbor priority(LAN hello PDU only).
    """
    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 .. 127']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """priority 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 .. 127']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
        })

    self.__priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_priority(self):
    self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0 .. 127']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)


  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/config/enabled (boolean)

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  level_number = __builtin__.property(_get_level_number, _set_level_number)
  passive = __builtin__.property(_get_passive, _set_passive)
  priority = __builtin__.property(_get_priority, _set_priority)
  enabled = __builtin__.property(_get_enabled, _set_enabled)


  _pyangbind_elements = OrderedDict([('level_number', level_number), ('passive', passive), ('priority', priority), ('enabled', enabled), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines interface ISIS level state information.
  """
  __slots__ = ('_path_helper', '_extmethods', '__level_number','__passive','__priority','__enabled',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__level_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..2']}), is_leaf=True, yang_name="level-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:level-number', is_config=False)
    self.__passive = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="passive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0 .. 127']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'levels', 'level', 'state']

  def _get_level_number(self):
    """
    Getter method for level_number, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/state/level_number (oc-isis-types:level-number)

    YANG Description: ISIS level number(level-1, level-2).
    """
    return self.__level_number
      
  def _set_level_number(self, v, load=False):
    """
    Setter method for level_number, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/state/level_number (oc-isis-types:level-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_level_number is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_level_number() directly.

    YANG Description: ISIS level number(level-1, level-2).
    """
    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': ['1..2']}), is_leaf=True, yang_name="level-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:level-number', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """level_number must be of a type compatible with oc-isis-types:level-number""",
          'defined-type': "oc-isis-types:level-number",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..2']}), is_leaf=True, yang_name="level-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:level-number', is_config=False)""",
        })

    self.__level_number = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_level_number(self):
    self.__level_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..2']}), is_leaf=True, yang_name="level-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:level-number', is_config=False)


  def _get_passive(self):
    """
    Getter method for passive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/state/passive (boolean)

    YANG Description: ISIS passive interface admin enable/disable function.
    """
    return self.__passive
      
  def _set_passive(self, v, load=False):
    """
    Setter method for passive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/state/passive (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_passive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_passive() directly.

    YANG Description: ISIS passive interface admin enable/disable function.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="passive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """passive must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="passive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__passive = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_passive(self):
    self.__passive = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="passive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_priority(self):
    """
    Getter method for priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/state/priority (uint8)

    YANG Description: ISIS neighbor priority(LAN hello PDU only).
    """
    return self.__priority
      
  def _set_priority(self, v, load=False):
    """
    Setter method for priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/state/priority (uint8)
    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: ISIS neighbor priority(LAN hello PDU only).
    """
    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 .. 127']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """priority 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 .. 127']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_priority(self):
    self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0 .. 127']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/state/enabled (boolean)

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  level_number = __builtin__.property(_get_level_number)
  passive = __builtin__.property(_get_passive)
  priority = __builtin__.property(_get_priority)
  enabled = __builtin__.property(_get_enabled)


  _pyangbind_elements = OrderedDict([('level_number', level_number), ('passive', passive), ('priority', priority), ('enabled', enabled), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_lsp_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/packet-counters/lsp/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines LSP PDU counters.
  """
  __slots__ = ('_path_helper', '_extmethods', '__received','__processed','__dropped','__sent','__retransmit',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__received = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__processed = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="processed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__dropped = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="dropped", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__sent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__retransmit = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="retransmit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'levels', 'level', 'packet-counters', 'lsp', 'state']

  def _get_received(self):
    """
    Getter method for received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/lsp/state/received (oc-yang:counter32)

    YANG Description: The number of the specified type of PDU received on the interface.
    """
    return self.__received
      
  def _set_received(self, v, load=False):
    """
    Setter method for received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/lsp/state/received (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_received() directly.

    YANG Description: The number of the specified type of PDU received on the interface.
    """
    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="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """received must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_received(self):
    self.__received = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_processed(self):
    """
    Getter method for processed, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/lsp/state/processed (oc-yang:counter32)

    YANG Description: The number of the specified type of PDU received on the interface
that have been processed by the local system.
    """
    return self.__processed
      
  def _set_processed(self, v, load=False):
    """
    Setter method for processed, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/lsp/state/processed (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_processed is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_processed() directly.

    YANG Description: The number of the specified type of PDU received on the interface
that have been processed by the local system.
    """
    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="processed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """processed must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="processed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__processed = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_processed(self):
    self.__processed = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="processed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_dropped(self):
    """
    Getter method for dropped, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/lsp/state/dropped (oc-yang:counter32)

    YANG Description: The number of the specified type of PDU received on the interface
that have been dropped.
    """
    return self.__dropped
      
  def _set_dropped(self, v, load=False):
    """
    Setter method for dropped, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/lsp/state/dropped (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dropped is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dropped() directly.

    YANG Description: The number of the specified type of PDU received on the interface
that have been dropped.
    """
    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="dropped", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dropped must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="dropped", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__dropped = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dropped(self):
    self.__dropped = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="dropped", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_sent(self):
    """
    Getter method for sent, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/lsp/state/sent (oc-yang:counter32)

    YANG Description: The number of the specified type of PDU that have been sent by the
local system on the interface.
    """
    return self.__sent
      
  def _set_sent(self, v, load=False):
    """
    Setter method for sent, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/lsp/state/sent (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sent() directly.

    YANG Description: The number of the specified type of PDU that have been sent by the
local system on the interface.
    """
    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="sent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sent must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__sent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sent(self):
    self.__sent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_retransmit(self):
    """
    Getter method for retransmit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/lsp/state/retransmit (oc-yang:counter32)

    YANG Description: The number of the specified type of PDU that that have been
retransmitted by the local system on the interface.
    """
    return self.__retransmit
      
  def _set_retransmit(self, v, load=False):
    """
    Setter method for retransmit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/lsp/state/retransmit (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_retransmit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_retransmit() directly.

    YANG Description: The number of the specified type of PDU that that have been
retransmitted by the local system on the interface.
    """
    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="retransmit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """retransmit must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="retransmit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__retransmit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_retransmit(self):
    self.__retransmit = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="retransmit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)

  received = __builtin__.property(_get_received)
  processed = __builtin__.property(_get_processed)
  dropped = __builtin__.property(_get_dropped)
  sent = __builtin__.property(_get_sent)
  retransmit = __builtin__.property(_get_retransmit)


  _pyangbind_elements = OrderedDict([('received', received), ('processed', processed), ('dropped', dropped), ('sent', sent), ('retransmit', retransmit), ])


class yc_lsp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_lsp(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/packet-counters/lsp. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines LSP packet counters.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'lsp'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_lsp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'levels', 'level', 'packet-counters', 'lsp']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/lsp/state (container)

    YANG Description: This container defines LSP PDU counters.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/lsp/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: This container defines LSP PDU counters.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_lsp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_lsp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_lsp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_iih_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/packet-counters/iih/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational counters relating to IIH PDUs
  """
  __slots__ = ('_path_helper', '_extmethods', '__received','__processed','__dropped','__sent','__retransmit',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__received = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__processed = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="processed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__dropped = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="dropped", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__sent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__retransmit = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="retransmit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'levels', 'level', 'packet-counters', 'iih', 'state']

  def _get_received(self):
    """
    Getter method for received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/iih/state/received (oc-yang:counter32)

    YANG Description: The number of the specified type of PDU received on the interface.
    """
    return self.__received
      
  def _set_received(self, v, load=False):
    """
    Setter method for received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/iih/state/received (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_received() directly.

    YANG Description: The number of the specified type of PDU received on the interface.
    """
    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="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """received must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_received(self):
    self.__received = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_processed(self):
    """
    Getter method for processed, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/iih/state/processed (oc-yang:counter32)

    YANG Description: The number of the specified type of PDU received on the interface
that have been processed by the local system.
    """
    return self.__processed
      
  def _set_processed(self, v, load=False):
    """
    Setter method for processed, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/iih/state/processed (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_processed is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_processed() directly.

    YANG Description: The number of the specified type of PDU received on the interface
that have been processed by the local system.
    """
    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="processed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """processed must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="processed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__processed = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_processed(self):
    self.__processed = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="processed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_dropped(self):
    """
    Getter method for dropped, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/iih/state/dropped (oc-yang:counter32)

    YANG Description: The number of the specified type of PDU received on the interface
that have been dropped.
    """
    return self.__dropped
      
  def _set_dropped(self, v, load=False):
    """
    Setter method for dropped, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/iih/state/dropped (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dropped is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dropped() directly.

    YANG Description: The number of the specified type of PDU received on the interface
that have been dropped.
    """
    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="dropped", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dropped must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="dropped", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__dropped = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dropped(self):
    self.__dropped = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="dropped", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_sent(self):
    """
    Getter method for sent, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/iih/state/sent (oc-yang:counter32)

    YANG Description: The number of the specified type of PDU that have been sent by the
local system on the interface.
    """
    return self.__sent
      
  def _set_sent(self, v, load=False):
    """
    Setter method for sent, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/iih/state/sent (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sent() directly.

    YANG Description: The number of the specified type of PDU that have been sent by the
local system on the interface.
    """
    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="sent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sent must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__sent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sent(self):
    self.__sent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_retransmit(self):
    """
    Getter method for retransmit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/iih/state/retransmit (oc-yang:counter32)

    YANG Description: The number of the specified type of PDU that that have been
retransmitted by the local system on the interface.
    """
    return self.__retransmit
      
  def _set_retransmit(self, v, load=False):
    """
    Setter method for retransmit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/iih/state/retransmit (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_retransmit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_retransmit() directly.

    YANG Description: The number of the specified type of PDU that that have been
retransmitted by the local system on the interface.
    """
    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="retransmit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """retransmit must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="retransmit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__retransmit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_retransmit(self):
    self.__retransmit = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="retransmit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)

  received = __builtin__.property(_get_received)
  processed = __builtin__.property(_get_processed)
  dropped = __builtin__.property(_get_dropped)
  sent = __builtin__.property(_get_sent)
  retransmit = __builtin__.property(_get_retransmit)


  _pyangbind_elements = OrderedDict([('received', received), ('processed', processed), ('dropped', dropped), ('sent', sent), ('retransmit', retransmit), ])


class yc_iih_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_iih(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/packet-counters/iih. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines IIH packet counters.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'iih'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_iih_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'levels', 'level', 'packet-counters', 'iih']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/iih/state (container)

    YANG Description: Operational counters relating to IIH PDUs
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/iih/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 counters relating to IIH PDUs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_iih_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_iih_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_iih_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_ish_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/packet-counters/ish/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state relating to ISH PDUs.
  """
  __slots__ = ('_path_helper', '_extmethods', '__received','__processed','__dropped','__sent','__retransmit',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__received = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__processed = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="processed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__dropped = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="dropped", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__sent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__retransmit = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="retransmit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'levels', 'level', 'packet-counters', 'ish', 'state']

  def _get_received(self):
    """
    Getter method for received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/ish/state/received (oc-yang:counter32)

    YANG Description: The number of the specified type of PDU received on the interface.
    """
    return self.__received
      
  def _set_received(self, v, load=False):
    """
    Setter method for received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/ish/state/received (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_received() directly.

    YANG Description: The number of the specified type of PDU received on the interface.
    """
    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="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """received must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_received(self):
    self.__received = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_processed(self):
    """
    Getter method for processed, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/ish/state/processed (oc-yang:counter32)

    YANG Description: The number of the specified type of PDU received on the interface
that have been processed by the local system.
    """
    return self.__processed
      
  def _set_processed(self, v, load=False):
    """
    Setter method for processed, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/ish/state/processed (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_processed is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_processed() directly.

    YANG Description: The number of the specified type of PDU received on the interface
that have been processed by the local system.
    """
    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="processed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """processed must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="processed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__processed = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_processed(self):
    self.__processed = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="processed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_dropped(self):
    """
    Getter method for dropped, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/ish/state/dropped (oc-yang:counter32)

    YANG Description: The number of the specified type of PDU received on the interface
that have been dropped.
    """
    return self.__dropped
      
  def _set_dropped(self, v, load=False):
    """
    Setter method for dropped, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/ish/state/dropped (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dropped is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dropped() directly.

    YANG Description: The number of the specified type of PDU received on the interface
that have been dropped.
    """
    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="dropped", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dropped must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="dropped", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__dropped = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dropped(self):
    self.__dropped = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="dropped", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_sent(self):
    """
    Getter method for sent, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/ish/state/sent (oc-yang:counter32)

    YANG Description: The number of the specified type of PDU that have been sent by the
local system on the interface.
    """
    return self.__sent
      
  def _set_sent(self, v, load=False):
    """
    Setter method for sent, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/ish/state/sent (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sent() directly.

    YANG Description: The number of the specified type of PDU that have been sent by the
local system on the interface.
    """
    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="sent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sent must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__sent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sent(self):
    self.__sent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_retransmit(self):
    """
    Getter method for retransmit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/ish/state/retransmit (oc-yang:counter32)

    YANG Description: The number of the specified type of PDU that that have been
retransmitted by the local system on the interface.
    """
    return self.__retransmit
      
  def _set_retransmit(self, v, load=False):
    """
    Setter method for retransmit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/ish/state/retransmit (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_retransmit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_retransmit() directly.

    YANG Description: The number of the specified type of PDU that that have been
retransmitted by the local system on the interface.
    """
    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="retransmit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """retransmit must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="retransmit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__retransmit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_retransmit(self):
    self.__retransmit = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="retransmit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)

  received = __builtin__.property(_get_received)
  processed = __builtin__.property(_get_processed)
  dropped = __builtin__.property(_get_dropped)
  sent = __builtin__.property(_get_sent)
  retransmit = __builtin__.property(_get_retransmit)


  _pyangbind_elements = OrderedDict([('received', received), ('processed', processed), ('dropped', dropped), ('sent', sent), ('retransmit', retransmit), ])


class yc_ish_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_ish(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/packet-counters/ish. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISH packet counters.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'ish'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_ish_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'levels', 'level', 'packet-counters', 'ish']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/ish/state (container)

    YANG Description: Operational state relating to ISH PDUs.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/ish/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 relating to ISH PDUs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_ish_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_ish_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_ish_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_esh_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/packet-counters/esh/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state relating to ESH PDUs
  """
  __slots__ = ('_path_helper', '_extmethods', '__received','__processed','__dropped','__sent','__retransmit',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__received = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__processed = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="processed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__dropped = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="dropped", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__sent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__retransmit = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="retransmit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'levels', 'level', 'packet-counters', 'esh', 'state']

  def _get_received(self):
    """
    Getter method for received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/esh/state/received (oc-yang:counter32)

    YANG Description: The number of the specified type of PDU received on the interface.
    """
    return self.__received
      
  def _set_received(self, v, load=False):
    """
    Setter method for received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/esh/state/received (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_received() directly.

    YANG Description: The number of the specified type of PDU received on the interface.
    """
    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="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """received must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_received(self):
    self.__received = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_processed(self):
    """
    Getter method for processed, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/esh/state/processed (oc-yang:counter32)

    YANG Description: The number of the specified type of PDU received on the interface
that have been processed by the local system.
    """
    return self.__processed
      
  def _set_processed(self, v, load=False):
    """
    Setter method for processed, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/esh/state/processed (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_processed is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_processed() directly.

    YANG Description: The number of the specified type of PDU received on the interface
that have been processed by the local system.
    """
    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="processed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """processed must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="processed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__processed = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_processed(self):
    self.__processed = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="processed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_dropped(self):
    """
    Getter method for dropped, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/esh/state/dropped (oc-yang:counter32)

    YANG Description: The number of the specified type of PDU received on the interface
that have been dropped.
    """
    return self.__dropped
      
  def _set_dropped(self, v, load=False):
    """
    Setter method for dropped, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/esh/state/dropped (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dropped is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dropped() directly.

    YANG Description: The number of the specified type of PDU received on the interface
that have been dropped.
    """
    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="dropped", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dropped must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="dropped", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__dropped = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dropped(self):
    self.__dropped = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="dropped", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_sent(self):
    """
    Getter method for sent, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/esh/state/sent (oc-yang:counter32)

    YANG Description: The number of the specified type of PDU that have been sent by the
local system on the interface.
    """
    return self.__sent
      
  def _set_sent(self, v, load=False):
    """
    Setter method for sent, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/esh/state/sent (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sent() directly.

    YANG Description: The number of the specified type of PDU that have been sent by the
local system on the interface.
    """
    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="sent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sent must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__sent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sent(self):
    self.__sent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_retransmit(self):
    """
    Getter method for retransmit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/esh/state/retransmit (oc-yang:counter32)

    YANG Description: The number of the specified type of PDU that that have been
retransmitted by the local system on the interface.
    """
    return self.__retransmit
      
  def _set_retransmit(self, v, load=False):
    """
    Setter method for retransmit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/esh/state/retransmit (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_retransmit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_retransmit() directly.

    YANG Description: The number of the specified type of PDU that that have been
retransmitted by the local system on the interface.
    """
    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="retransmit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """retransmit must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="retransmit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__retransmit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_retransmit(self):
    self.__retransmit = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="retransmit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)

  received = __builtin__.property(_get_received)
  processed = __builtin__.property(_get_processed)
  dropped = __builtin__.property(_get_dropped)
  sent = __builtin__.property(_get_sent)
  retransmit = __builtin__.property(_get_retransmit)


  _pyangbind_elements = OrderedDict([('received', received), ('processed', processed), ('dropped', dropped), ('sent', sent), ('retransmit', retransmit), ])


class yc_esh_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_esh(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/packet-counters/esh. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ESH packet counters.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'esh'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_esh_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'levels', 'level', 'packet-counters', 'esh']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/esh/state (container)

    YANG Description: Operational state relating to ESH PDUs
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/esh/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 relating to ESH PDUs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_esh_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_esh_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_esh_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_psnp_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/packet-counters/psnp/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Packet counters relating to PSNPs.
  """
  __slots__ = ('_path_helper', '_extmethods', '__received','__processed','__dropped','__sent','__retransmit',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__received = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__processed = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="processed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__dropped = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="dropped", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__sent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__retransmit = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="retransmit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'levels', 'level', 'packet-counters', 'psnp', 'state']

  def _get_received(self):
    """
    Getter method for received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/psnp/state/received (oc-yang:counter32)

    YANG Description: The number of the specified type of PDU received on the interface.
    """
    return self.__received
      
  def _set_received(self, v, load=False):
    """
    Setter method for received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/psnp/state/received (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_received() directly.

    YANG Description: The number of the specified type of PDU received on the interface.
    """
    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="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """received must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_received(self):
    self.__received = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_processed(self):
    """
    Getter method for processed, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/psnp/state/processed (oc-yang:counter32)

    YANG Description: The number of the specified type of PDU received on the interface
that have been processed by the local system.
    """
    return self.__processed
      
  def _set_processed(self, v, load=False):
    """
    Setter method for processed, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/psnp/state/processed (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_processed is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_processed() directly.

    YANG Description: The number of the specified type of PDU received on the interface
that have been processed by the local system.
    """
    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="processed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """processed must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="processed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__processed = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_processed(self):
    self.__processed = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="processed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_dropped(self):
    """
    Getter method for dropped, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/psnp/state/dropped (oc-yang:counter32)

    YANG Description: The number of the specified type of PDU received on the interface
that have been dropped.
    """
    return self.__dropped
      
  def _set_dropped(self, v, load=False):
    """
    Setter method for dropped, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/psnp/state/dropped (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dropped is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dropped() directly.

    YANG Description: The number of the specified type of PDU received on the interface
that have been dropped.
    """
    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="dropped", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dropped must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="dropped", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__dropped = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dropped(self):
    self.__dropped = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="dropped", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_sent(self):
    """
    Getter method for sent, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/psnp/state/sent (oc-yang:counter32)

    YANG Description: The number of the specified type of PDU that have been sent by the
local system on the interface.
    """
    return self.__sent
      
  def _set_sent(self, v, load=False):
    """
    Setter method for sent, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/psnp/state/sent (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sent() directly.

    YANG Description: The number of the specified type of PDU that have been sent by the
local system on the interface.
    """
    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="sent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sent must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__sent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sent(self):
    self.__sent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_retransmit(self):
    """
    Getter method for retransmit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/psnp/state/retransmit (oc-yang:counter32)

    YANG Description: The number of the specified type of PDU that that have been
retransmitted by the local system on the interface.
    """
    return self.__retransmit
      
  def _set_retransmit(self, v, load=False):
    """
    Setter method for retransmit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/psnp/state/retransmit (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_retransmit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_retransmit() directly.

    YANG Description: The number of the specified type of PDU that that have been
retransmitted by the local system on the interface.
    """
    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="retransmit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """retransmit must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="retransmit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__retransmit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_retransmit(self):
    self.__retransmit = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="retransmit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)

  received = __builtin__.property(_get_received)
  processed = __builtin__.property(_get_processed)
  dropped = __builtin__.property(_get_dropped)
  sent = __builtin__.property(_get_sent)
  retransmit = __builtin__.property(_get_retransmit)


  _pyangbind_elements = OrderedDict([('received', received), ('processed', processed), ('dropped', dropped), ('sent', sent), ('retransmit', retransmit), ])


class yc_psnp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_psnp(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/packet-counters/psnp. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines PSNP packet counters.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'psnp'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_psnp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'levels', 'level', 'packet-counters', 'psnp']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/psnp/state (container)

    YANG Description: Packet counters relating to PSNPs.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/psnp/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: Packet counters relating to PSNPs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_psnp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_psnp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_psnp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_csnp_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/packet-counters/csnp/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Packet counters relating to CSNPs.
  """
  __slots__ = ('_path_helper', '_extmethods', '__received','__processed','__dropped','__sent','__retransmit',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__received = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__processed = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="processed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__dropped = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="dropped", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__sent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__retransmit = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="retransmit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'levels', 'level', 'packet-counters', 'csnp', 'state']

  def _get_received(self):
    """
    Getter method for received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/csnp/state/received (oc-yang:counter32)

    YANG Description: The number of the specified type of PDU received on the interface.
    """
    return self.__received
      
  def _set_received(self, v, load=False):
    """
    Setter method for received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/csnp/state/received (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_received() directly.

    YANG Description: The number of the specified type of PDU received on the interface.
    """
    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="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """received must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_received(self):
    self.__received = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_processed(self):
    """
    Getter method for processed, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/csnp/state/processed (oc-yang:counter32)

    YANG Description: The number of the specified type of PDU received on the interface
that have been processed by the local system.
    """
    return self.__processed
      
  def _set_processed(self, v, load=False):
    """
    Setter method for processed, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/csnp/state/processed (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_processed is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_processed() directly.

    YANG Description: The number of the specified type of PDU received on the interface
that have been processed by the local system.
    """
    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="processed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """processed must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="processed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__processed = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_processed(self):
    self.__processed = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="processed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_dropped(self):
    """
    Getter method for dropped, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/csnp/state/dropped (oc-yang:counter32)

    YANG Description: The number of the specified type of PDU received on the interface
that have been dropped.
    """
    return self.__dropped
      
  def _set_dropped(self, v, load=False):
    """
    Setter method for dropped, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/csnp/state/dropped (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dropped is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dropped() directly.

    YANG Description: The number of the specified type of PDU received on the interface
that have been dropped.
    """
    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="dropped", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dropped must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="dropped", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__dropped = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dropped(self):
    self.__dropped = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="dropped", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_sent(self):
    """
    Getter method for sent, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/csnp/state/sent (oc-yang:counter32)

    YANG Description: The number of the specified type of PDU that have been sent by the
local system on the interface.
    """
    return self.__sent
      
  def _set_sent(self, v, load=False):
    """
    Setter method for sent, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/csnp/state/sent (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sent() directly.

    YANG Description: The number of the specified type of PDU that have been sent by the
local system on the interface.
    """
    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="sent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sent must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__sent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sent(self):
    self.__sent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_retransmit(self):
    """
    Getter method for retransmit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/csnp/state/retransmit (oc-yang:counter32)

    YANG Description: The number of the specified type of PDU that that have been
retransmitted by the local system on the interface.
    """
    return self.__retransmit
      
  def _set_retransmit(self, v, load=False):
    """
    Setter method for retransmit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/csnp/state/retransmit (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_retransmit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_retransmit() directly.

    YANG Description: The number of the specified type of PDU that that have been
retransmitted by the local system on the interface.
    """
    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="retransmit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """retransmit must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="retransmit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__retransmit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_retransmit(self):
    self.__retransmit = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="retransmit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)

  received = __builtin__.property(_get_received)
  processed = __builtin__.property(_get_processed)
  dropped = __builtin__.property(_get_dropped)
  sent = __builtin__.property(_get_sent)
  retransmit = __builtin__.property(_get_retransmit)


  _pyangbind_elements = OrderedDict([('received', received), ('processed', processed), ('dropped', dropped), ('sent', sent), ('retransmit', retransmit), ])


class yc_csnp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_csnp(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/packet-counters/csnp. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to CSNPs.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'csnp'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_csnp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'levels', 'level', 'packet-counters', 'csnp']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/csnp/state (container)

    YANG Description: Packet counters relating to CSNPs.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/csnp/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: Packet counters relating to CSNPs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_csnp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_csnp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_csnp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_unknown_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/packet-counters/unknown/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Packet counters relating to unknown PDUs.
  """
  __slots__ = ('_path_helper', '_extmethods', '__received','__processed','__dropped','__sent','__retransmit',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__received = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__processed = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="processed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__dropped = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="dropped", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__sent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    self.__retransmit = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="retransmit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'levels', 'level', 'packet-counters', 'unknown', 'state']

  def _get_received(self):
    """
    Getter method for received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/unknown/state/received (oc-yang:counter32)

    YANG Description: The number of the specified type of PDU received on the interface.
    """
    return self.__received
      
  def _set_received(self, v, load=False):
    """
    Setter method for received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/unknown/state/received (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_received() directly.

    YANG Description: The number of the specified type of PDU received on the interface.
    """
    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="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """received must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_received(self):
    self.__received = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_processed(self):
    """
    Getter method for processed, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/unknown/state/processed (oc-yang:counter32)

    YANG Description: The number of the specified type of PDU received on the interface
that have been processed by the local system.
    """
    return self.__processed
      
  def _set_processed(self, v, load=False):
    """
    Setter method for processed, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/unknown/state/processed (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_processed is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_processed() directly.

    YANG Description: The number of the specified type of PDU received on the interface
that have been processed by the local system.
    """
    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="processed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """processed must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="processed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__processed = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_processed(self):
    self.__processed = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="processed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_dropped(self):
    """
    Getter method for dropped, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/unknown/state/dropped (oc-yang:counter32)

    YANG Description: The number of the specified type of PDU received on the interface
that have been dropped.
    """
    return self.__dropped
      
  def _set_dropped(self, v, load=False):
    """
    Setter method for dropped, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/unknown/state/dropped (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dropped is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dropped() directly.

    YANG Description: The number of the specified type of PDU received on the interface
that have been dropped.
    """
    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="dropped", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dropped must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="dropped", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__dropped = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dropped(self):
    self.__dropped = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="dropped", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_sent(self):
    """
    Getter method for sent, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/unknown/state/sent (oc-yang:counter32)

    YANG Description: The number of the specified type of PDU that have been sent by the
local system on the interface.
    """
    return self.__sent
      
  def _set_sent(self, v, load=False):
    """
    Setter method for sent, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/unknown/state/sent (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sent() directly.

    YANG Description: The number of the specified type of PDU that have been sent by the
local system on the interface.
    """
    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="sent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sent must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__sent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sent(self):
    self.__sent = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)


  def _get_retransmit(self):
    """
    Getter method for retransmit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/unknown/state/retransmit (oc-yang:counter32)

    YANG Description: The number of the specified type of PDU that that have been
retransmitted by the local system on the interface.
    """
    return self.__retransmit
      
  def _set_retransmit(self, v, load=False):
    """
    Setter method for retransmit, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/unknown/state/retransmit (oc-yang:counter32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_retransmit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_retransmit() directly.

    YANG Description: The number of the specified type of PDU that that have been
retransmitted by the local system on the interface.
    """
    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="retransmit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """retransmit must be of a type compatible with oc-yang:counter32""",
          'defined-type': "oc-yang:counter32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="retransmit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)""",
        })

    self.__retransmit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_retransmit(self):
    self.__retransmit = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="retransmit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter32', is_config=False)

  received = __builtin__.property(_get_received)
  processed = __builtin__.property(_get_processed)
  dropped = __builtin__.property(_get_dropped)
  sent = __builtin__.property(_get_sent)
  retransmit = __builtin__.property(_get_retransmit)


  _pyangbind_elements = OrderedDict([('received', received), ('processed', processed), ('dropped', dropped), ('sent', sent), ('retransmit', retransmit), ])


class yc_unknown_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_unknown(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/packet-counters/unknown. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parameters relating to IS-IS PDUs that are not
otherwise classified - referred to as Unknown PDUs.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'unknown'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_unknown_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'levels', 'level', 'packet-counters', 'unknown']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/unknown/state (container)

    YANG Description: Packet counters relating to unknown PDUs.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/unknown/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: Packet counters relating to unknown PDUs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_unknown_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_unknown_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_unknown_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_packet_counters_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/packet-counters. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS interface packet counters.
  """
  __slots__ = ('_path_helper', '_extmethods', '__lsp','__iih','__ish','__esh','__psnp','__csnp','__unknown',)

  _yang_name = 'packet-counters'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__lsp = YANGDynClass(base=yc_lsp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_lsp, is_container='container', yang_name="lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__iih = YANGDynClass(base=yc_iih_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_iih, is_container='container', yang_name="iih", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__ish = YANGDynClass(base=yc_ish_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_ish, is_container='container', yang_name="ish", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__esh = YANGDynClass(base=yc_esh_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_esh, is_container='container', yang_name="esh", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__psnp = YANGDynClass(base=yc_psnp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_psnp, is_container='container', yang_name="psnp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__csnp = YANGDynClass(base=yc_csnp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_csnp, is_container='container', yang_name="csnp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__unknown = YANGDynClass(base=yc_unknown_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_unknown, is_container='container', yang_name="unknown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'levels', 'level', 'packet-counters']

  def _get_lsp(self):
    """
    Getter method for lsp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/lsp (container)

    YANG Description: This container defines LSP packet counters.
    """
    return self.__lsp
      
  def _set_lsp(self, v, load=False):
    """
    Setter method for lsp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/lsp (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsp() directly.

    YANG Description: This container defines LSP packet counters.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_lsp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_lsp, is_container='container', yang_name="lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsp must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_lsp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_lsp, is_container='container', yang_name="lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__lsp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsp(self):
    self.__lsp = YANGDynClass(base=yc_lsp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_lsp, is_container='container', yang_name="lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_iih(self):
    """
    Getter method for iih, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/iih (container)

    YANG Description: This container defines IIH packet counters.
    """
    return self.__iih
      
  def _set_iih(self, v, load=False):
    """
    Setter method for iih, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/iih (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_iih is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_iih() directly.

    YANG Description: This container defines IIH packet counters.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_iih_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_iih, is_container='container', yang_name="iih", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """iih must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_iih_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_iih, is_container='container', yang_name="iih", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__iih = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_iih(self):
    self.__iih = YANGDynClass(base=yc_iih_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_iih, is_container='container', yang_name="iih", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_ish(self):
    """
    Getter method for ish, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/ish (container)

    YANG Description: This container defines ISH packet counters.
    """
    return self.__ish
      
  def _set_ish(self, v, load=False):
    """
    Setter method for ish, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/ish (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ish is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ish() directly.

    YANG Description: This container defines ISH packet counters.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ish_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_ish, is_container='container', yang_name="ish", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ish must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ish_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_ish, is_container='container', yang_name="ish", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__ish = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ish(self):
    self.__ish = YANGDynClass(base=yc_ish_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_ish, is_container='container', yang_name="ish", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_esh(self):
    """
    Getter method for esh, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/esh (container)

    YANG Description: This container defines ESH packet counters.
    """
    return self.__esh
      
  def _set_esh(self, v, load=False):
    """
    Setter method for esh, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/esh (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_esh is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_esh() directly.

    YANG Description: This container defines ESH packet counters.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_esh_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_esh, is_container='container', yang_name="esh", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """esh must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_esh_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_esh, is_container='container', yang_name="esh", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__esh = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_esh(self):
    self.__esh = YANGDynClass(base=yc_esh_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_esh, is_container='container', yang_name="esh", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_psnp(self):
    """
    Getter method for psnp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/psnp (container)

    YANG Description: This container defines PSNP packet counters.
    """
    return self.__psnp
      
  def _set_psnp(self, v, load=False):
    """
    Setter method for psnp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/psnp (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_psnp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_psnp() directly.

    YANG Description: This container defines PSNP packet counters.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_psnp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_psnp, is_container='container', yang_name="psnp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """psnp must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_psnp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_psnp, is_container='container', yang_name="psnp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__psnp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_psnp(self):
    self.__psnp = YANGDynClass(base=yc_psnp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_psnp, is_container='container', yang_name="psnp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_csnp(self):
    """
    Getter method for csnp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/csnp (container)

    YANG Description: Operational state parameters relating to CSNPs.
    """
    return self.__csnp
      
  def _set_csnp(self, v, load=False):
    """
    Setter method for csnp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/csnp (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_csnp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_csnp() directly.

    YANG Description: Operational state parameters relating to CSNPs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_csnp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_csnp, is_container='container', yang_name="csnp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """csnp must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_csnp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_csnp, is_container='container', yang_name="csnp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__csnp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_csnp(self):
    self.__csnp = YANGDynClass(base=yc_csnp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_csnp, is_container='container', yang_name="csnp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_unknown(self):
    """
    Getter method for unknown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/unknown (container)

    YANG Description: Operational state parameters relating to IS-IS PDUs that are not
otherwise classified - referred to as Unknown PDUs.
    """
    return self.__unknown
      
  def _set_unknown(self, v, load=False):
    """
    Setter method for unknown, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters/unknown (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown() directly.

    YANG Description: Operational state parameters relating to IS-IS PDUs that are not
otherwise classified - referred to as Unknown PDUs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unknown_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_unknown, is_container='container', yang_name="unknown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unknown_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_unknown, is_container='container', yang_name="unknown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__unknown = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown(self):
    self.__unknown = YANGDynClass(base=yc_unknown_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters_unknown, is_container='container', yang_name="unknown", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  lsp = __builtin__.property(_get_lsp, _set_lsp)
  iih = __builtin__.property(_get_iih, _set_iih)
  ish = __builtin__.property(_get_ish, _set_ish)
  esh = __builtin__.property(_get_esh, _set_esh)
  psnp = __builtin__.property(_get_psnp, _set_psnp)
  csnp = __builtin__.property(_get_csnp, _set_csnp)
  unknown = __builtin__.property(_get_unknown, _set_unknown)


  _pyangbind_elements = OrderedDict([('lsp', lsp), ('iih', iih), ('ish', ish), ('esh', esh), ('psnp', psnp), ('csnp', csnp), ('unknown', unknown), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_adjacencies_adjacency_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state relating to the IS-IS adjacency with the
remote system
  """
  __slots__ = ('_path_helper', '_extmethods', '__system_id','__neighbor_ipv4_address','__neighbor_ipv6_address','__neighbor_snpa','__local_extended_circuit_id','__neighbor_extended_circuit_id','__priority','__dis_system_id','__neighbor_circuit_type','__adjacency_type','__adjacency_state','__up_timestamp','__multi_topology','__topology','__restart_support','__restart_suppress','__restart_status','__area_address','__nlpid',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__system_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)
    self.__neighbor_ipv4_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}'}), is_leaf=True, yang_name="neighbor-ipv4-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-address', is_config=False)
    self.__neighbor_ipv6_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}|:))'}), is_leaf=True, yang_name="neighbor-ipv6-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-address', is_config=False)
    self.__neighbor_snpa = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'length': ['0 .. 20']}), is_leaf=True, yang_name="neighbor-snpa", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:snpa', is_config=False)
    self.__local_extended_circuit_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="local-extended-circuit-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:extended-circuit-id', is_config=False)
    self.__neighbor_extended_circuit_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="neighbor-extended-circuit-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:extended-circuit-id', is_config=False)
    self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..127']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__dis_system_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="dis-system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)
    self.__neighbor_circuit_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LEVEL_1': {}, 'LEVEL_2': {}, 'LEVEL_1_2': {}},), is_leaf=True, yang_name="neighbor-circuit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:level-type', is_config=False)
    self.__adjacency_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LEVEL_1': {}, 'LEVEL_2': {}, 'LEVEL_1_2': {}},), is_leaf=True, yang_name="adjacency-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:level-type', is_config=False)
    self.__adjacency_state = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UP': {}, 'DOWN': {}, 'INIT': {}, 'FAILED': {}},), is_leaf=True, yang_name="adjacency-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:isis-interface-adj-state', is_config=False)
    self.__up_timestamp = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="up-timestamp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__multi_topology = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="multi-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__topology = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4_UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6_MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6_MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV4_MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4_MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6_UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},)), is_leaf=False, yang_name="topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__restart_support = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="restart-support", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__restart_suppress = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="restart-suppress", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__restart_status = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="restart-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__area_address = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{2}(\\.[0-9A-Fa-f]{4}){0,3}'})), is_leaf=False, yang_name="area-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:area-address', is_config=False)
    self.__nlpid = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}},)), is_leaf=False, yang_name="nlpid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'levels', 'level', 'adjacencies', 'adjacency', 'state']

  def _get_system_id(self):
    """
    Getter method for system_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/system_id (oc-isis-types:system-id)

    YANG Description: ISIS neighbor system-id.
    """
    return self.__system_id
      
  def _set_system_id(self, v, load=False):
    """
    Setter method for system_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/system_id (oc-isis-types:system-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_system_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_system_id() directly.

    YANG Description: ISIS neighbor system-id.
    """
    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]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """system_id must be of a type compatible with oc-isis-types:system-id""",
          'defined-type': "oc-isis-types:system-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)""",
        })

    self.__system_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_system_id(self):
    self.__system_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)


  def _get_neighbor_ipv4_address(self):
    """
    Getter method for neighbor_ipv4_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/neighbor_ipv4_address (oc-inet:ipv4-address)

    YANG Description: ISIS Neighbor IPv4 address.
    """
    return self.__neighbor_ipv4_address
      
  def _set_neighbor_ipv4_address(self, v, load=False):
    """
    Setter method for neighbor_ipv4_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/neighbor_ipv4_address (oc-inet:ipv4-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor_ipv4_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor_ipv4_address() directly.

    YANG Description: ISIS Neighbor IPv4 address.
    """
    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}'}), is_leaf=True, yang_name="neighbor-ipv4-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor_ipv4_address must be of a type compatible with oc-inet:ipv4-address""",
          'defined-type': "oc-inet:ipv4-address",
          '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}'}), is_leaf=True, yang_name="neighbor-ipv4-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-address', is_config=False)""",
        })

    self.__neighbor_ipv4_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor_ipv4_address(self):
    self.__neighbor_ipv4_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}'}), is_leaf=True, yang_name="neighbor-ipv4-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv4-address', is_config=False)


  def _get_neighbor_ipv6_address(self):
    """
    Getter method for neighbor_ipv6_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/neighbor_ipv6_address (oc-inet:ipv6-address)

    YANG Description: ISIS Neighbor IPv6 address.
    """
    return self.__neighbor_ipv6_address
      
  def _set_neighbor_ipv6_address(self, v, load=False):
    """
    Setter method for neighbor_ipv6_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/neighbor_ipv6_address (oc-inet:ipv6-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor_ipv6_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor_ipv6_address() directly.

    YANG Description: ISIS Neighbor IPv6 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]{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}|:))'}), is_leaf=True, yang_name="neighbor-ipv6-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor_ipv6_address must be of a type compatible with oc-inet:ipv6-address""",
          'defined-type': "oc-inet:ipv6-address",
          '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}|:))'}), is_leaf=True, yang_name="neighbor-ipv6-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-address', is_config=False)""",
        })

    self.__neighbor_ipv6_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor_ipv6_address(self):
    self.__neighbor_ipv6_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}|:))'}), is_leaf=True, yang_name="neighbor-ipv6-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-address', is_config=False)


  def _get_neighbor_snpa(self):
    """
    Getter method for neighbor_snpa, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/neighbor_snpa (oc-isis-types:snpa)

    YANG Description: ISIS neighbor SNPA.
    """
    return self.__neighbor_snpa
      
  def _set_neighbor_snpa(self, v, load=False):
    """
    Setter method for neighbor_snpa, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/neighbor_snpa (oc-isis-types:snpa)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor_snpa is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor_snpa() directly.

    YANG Description: ISIS neighbor SNPA.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'length': ['0 .. 20']}), is_leaf=True, yang_name="neighbor-snpa", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:snpa', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor_snpa must be of a type compatible with oc-isis-types:snpa""",
          'defined-type': "oc-isis-types:snpa",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'length': ['0 .. 20']}), is_leaf=True, yang_name="neighbor-snpa", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:snpa', is_config=False)""",
        })

    self.__neighbor_snpa = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor_snpa(self):
    self.__neighbor_snpa = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'length': ['0 .. 20']}), is_leaf=True, yang_name="neighbor-snpa", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:snpa', is_config=False)


  def _get_local_extended_circuit_id(self):
    """
    Getter method for local_extended_circuit_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/local_extended_circuit_id (oc-isis-types:extended-circuit-id)

    YANG Description: Local extended circuit ID.
    """
    return self.__local_extended_circuit_id
      
  def _set_local_extended_circuit_id(self, v, load=False):
    """
    Setter method for local_extended_circuit_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/local_extended_circuit_id (oc-isis-types:extended-circuit-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_extended_circuit_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_extended_circuit_id() directly.

    YANG Description: Local extended circuit ID.
    """
    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="local-extended-circuit-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:extended-circuit-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_extended_circuit_id must be of a type compatible with oc-isis-types:extended-circuit-id""",
          'defined-type': "oc-isis-types:extended-circuit-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="local-extended-circuit-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:extended-circuit-id', is_config=False)""",
        })

    self.__local_extended_circuit_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_extended_circuit_id(self):
    self.__local_extended_circuit_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="local-extended-circuit-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:extended-circuit-id', is_config=False)


  def _get_neighbor_extended_circuit_id(self):
    """
    Getter method for neighbor_extended_circuit_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/neighbor_extended_circuit_id (oc-isis-types:extended-circuit-id)

    YANG Description: ISIS neighbor extended circuit ID.
    """
    return self.__neighbor_extended_circuit_id
      
  def _set_neighbor_extended_circuit_id(self, v, load=False):
    """
    Setter method for neighbor_extended_circuit_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/neighbor_extended_circuit_id (oc-isis-types:extended-circuit-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor_extended_circuit_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor_extended_circuit_id() directly.

    YANG Description: ISIS neighbor extended circuit ID.
    """
    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="neighbor-extended-circuit-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:extended-circuit-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor_extended_circuit_id must be of a type compatible with oc-isis-types:extended-circuit-id""",
          'defined-type': "oc-isis-types:extended-circuit-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="neighbor-extended-circuit-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:extended-circuit-id', is_config=False)""",
        })

    self.__neighbor_extended_circuit_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor_extended_circuit_id(self):
    self.__neighbor_extended_circuit_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="neighbor-extended-circuit-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:extended-circuit-id', is_config=False)


  def _get_priority(self):
    """
    Getter method for priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/priority (uint8)

    YANG Description: Priority of the neighboring IS(LAN Hello only).
    """
    return self.__priority
      
  def _set_priority(self, v, load=False):
    """
    Setter method for priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/priority (uint8)
    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 neighboring IS(LAN Hello only).
    """
    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..127']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """priority 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..127']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_priority(self):
    self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..127']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_dis_system_id(self):
    """
    Getter method for dis_system_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/dis_system_id (oc-isis-types:system-id)

    YANG Description: DIS System ID(LAN hello only).
    """
    return self.__dis_system_id
      
  def _set_dis_system_id(self, v, load=False):
    """
    Setter method for dis_system_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/dis_system_id (oc-isis-types:system-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dis_system_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dis_system_id() directly.

    YANG Description: DIS System ID(LAN hello only).
    """
    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]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="dis-system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dis_system_id must be of a type compatible with oc-isis-types:system-id""",
          'defined-type': "oc-isis-types:system-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="dis-system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)""",
        })

    self.__dis_system_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dis_system_id(self):
    self.__dis_system_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}'}), is_leaf=True, yang_name="dis-system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:system-id', is_config=False)


  def _get_neighbor_circuit_type(self):
    """
    Getter method for neighbor_circuit_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/neighbor_circuit_type (oc-isis-types:level-type)

    YANG Description: Received ISIS circuit type (level-1, level-2, level-1-2).
    """
    return self.__neighbor_circuit_type
      
  def _set_neighbor_circuit_type(self, v, load=False):
    """
    Setter method for neighbor_circuit_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/neighbor_circuit_type (oc-isis-types:level-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor_circuit_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor_circuit_type() directly.

    YANG Description: Received ISIS circuit type (level-1, level-2, level-1-2).
    """
    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={'LEVEL_1': {}, 'LEVEL_2': {}, 'LEVEL_1_2': {}},), is_leaf=True, yang_name="neighbor-circuit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:level-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor_circuit_type must be of a type compatible with oc-isis-types:level-type""",
          'defined-type': "oc-isis-types:level-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LEVEL_1': {}, 'LEVEL_2': {}, 'LEVEL_1_2': {}},), is_leaf=True, yang_name="neighbor-circuit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:level-type', is_config=False)""",
        })

    self.__neighbor_circuit_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor_circuit_type(self):
    self.__neighbor_circuit_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LEVEL_1': {}, 'LEVEL_2': {}, 'LEVEL_1_2': {}},), is_leaf=True, yang_name="neighbor-circuit-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:level-type', is_config=False)


  def _get_adjacency_type(self):
    """
    Getter method for adjacency_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/adjacency_type (oc-isis-types:level-type)

    YANG Description: Formed ISIS adjacency type(level-1, level-2, level-1-2).
    """
    return self.__adjacency_type
      
  def _set_adjacency_type(self, v, load=False):
    """
    Setter method for adjacency_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/adjacency_type (oc-isis-types:level-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adjacency_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adjacency_type() directly.

    YANG Description: Formed ISIS adjacency type(level-1, level-2, level-1-2).
    """
    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={'LEVEL_1': {}, 'LEVEL_2': {}, 'LEVEL_1_2': {}},), is_leaf=True, yang_name="adjacency-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:level-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adjacency_type must be of a type compatible with oc-isis-types:level-type""",
          'defined-type': "oc-isis-types:level-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LEVEL_1': {}, 'LEVEL_2': {}, 'LEVEL_1_2': {}},), is_leaf=True, yang_name="adjacency-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:level-type', is_config=False)""",
        })

    self.__adjacency_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adjacency_type(self):
    self.__adjacency_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LEVEL_1': {}, 'LEVEL_2': {}, 'LEVEL_1_2': {}},), is_leaf=True, yang_name="adjacency-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:level-type', is_config=False)


  def _get_adjacency_state(self):
    """
    Getter method for adjacency_state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/adjacency_state (oc-isis-types:isis-interface-adj-state)

    YANG Description: P2P 3-way ISIS adjacency state(up, down, init, failed).
    """
    return self.__adjacency_state
      
  def _set_adjacency_state(self, v, load=False):
    """
    Setter method for adjacency_state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/adjacency_state (oc-isis-types:isis-interface-adj-state)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adjacency_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adjacency_state() directly.

    YANG Description: P2P 3-way ISIS adjacency state(up, down, init, failed).
    """
    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={'UP': {}, 'DOWN': {}, 'INIT': {}, 'FAILED': {}},), is_leaf=True, yang_name="adjacency-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:isis-interface-adj-state', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adjacency_state must be of a type compatible with oc-isis-types:isis-interface-adj-state""",
          'defined-type': "oc-isis-types:isis-interface-adj-state",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UP': {}, 'DOWN': {}, 'INIT': {}, 'FAILED': {}},), is_leaf=True, yang_name="adjacency-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:isis-interface-adj-state', is_config=False)""",
        })

    self.__adjacency_state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adjacency_state(self):
    self.__adjacency_state = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UP': {}, 'DOWN': {}, 'INIT': {}, 'FAILED': {}},), is_leaf=True, yang_name="adjacency-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:isis-interface-adj-state', is_config=False)


  def _get_up_timestamp(self):
    """
    Getter method for up_timestamp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/up_timestamp (oc-types:timeticks64)

    YANG Description: Time at which the adjacency transitioned into the up state, expressed
as number of nanoseconds since the Unix epoch (Jan 1, 1970 00:00:00
UTC).
    """
    return self.__up_timestamp
      
  def _set_up_timestamp(self, v, load=False):
    """
    Setter method for up_timestamp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/up_timestamp (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_up_timestamp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_up_timestamp() directly.

    YANG Description: Time at which the adjacency transitioned into the up state, expressed
as number of nanoseconds since the Unix epoch (Jan 1, 1970 00:00:00
UTC).
    """
    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="up-timestamp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """up_timestamp must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="up-timestamp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__up_timestamp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_up_timestamp(self):
    self.__up_timestamp = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="up-timestamp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_multi_topology(self):
    """
    Getter method for multi_topology, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/multi_topology (boolean)

    YANG Description: When set to true, ISIS multi-topology is supported.
    """
    return self.__multi_topology
      
  def _set_multi_topology(self, v, load=False):
    """
    Setter method for multi_topology, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/multi_topology (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multi_topology is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multi_topology() directly.

    YANG Description: When set to true, ISIS multi-topology is supported.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="multi-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multi_topology must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="multi-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__multi_topology = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multi_topology(self):
    self.__multi_topology = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="multi-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_topology(self):
    """
    Getter method for topology, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/topology (identityref)

    YANG Description: ISIS topology type support(ipv4-unicast, ipv6-unicast,
ipv4-multicast, ipv6-multicast).
    """
    return self.__topology
      
  def _set_topology(self, v, load=False):
    """
    Setter method for topology, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/topology (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_topology is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_topology() directly.

    YANG Description: ISIS topology type support(ipv4-unicast, ipv6-unicast,
ipv4-multicast, ipv6-multicast).
    """
    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={'IPV4_UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4_UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6_MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6_MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV4_MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4_MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6_UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},)), is_leaf=False, yang_name="topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """topology must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4_UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6_MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6_MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV4_MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4_MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6_UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},)), is_leaf=False, yang_name="topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__topology = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_topology(self):
    self.__topology = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4_UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4_UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6_MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6_MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV4_MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4_MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6_UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6_UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},)), is_leaf=False, yang_name="topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_restart_support(self):
    """
    Getter method for restart_support, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/restart_support (boolean)

    YANG Description: When set to true, Graceful-restart signaling is supported.
    """
    return self.__restart_support
      
  def _set_restart_support(self, v, load=False):
    """
    Setter method for restart_support, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/restart_support (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_restart_support is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_restart_support() directly.

    YANG Description: When set to true, Graceful-restart signaling is supported.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="restart-support", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """restart_support must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="restart-support", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__restart_support = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_restart_support(self):
    self.__restart_support = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="restart-support", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_restart_suppress(self):
    """
    Getter method for restart_suppress, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/restart_suppress (boolean)

    YANG Description: When set to true, adjacency is not advertised. The SA bit is used by a
starting router to  request that its neighbor suppress advertisement of
the adjacency  to the starting router in the neighbor's LSPs.
    """
    return self.__restart_suppress
      
  def _set_restart_suppress(self, v, load=False):
    """
    Setter method for restart_suppress, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/restart_suppress (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_restart_suppress is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_restart_suppress() directly.

    YANG Description: When set to true, adjacency is not advertised. The SA bit is used by a
starting router to  request that its neighbor suppress advertisement of
the adjacency  to the starting router in the neighbor's LSPs.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="restart-suppress", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """restart_suppress must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="restart-suppress", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__restart_suppress = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_restart_suppress(self):
    self.__restart_suppress = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="restart-suppress", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_restart_status(self):
    """
    Getter method for restart_status, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/restart_status (boolean)

    YANG Description: When set to true, neighbor is being helped. The RR bit is used by a
(re)starting router to signal to its neighbors that a (re)start is in
progress.
    """
    return self.__restart_status
      
  def _set_restart_status(self, v, load=False):
    """
    Setter method for restart_status, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/restart_status (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_restart_status is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_restart_status() directly.

    YANG Description: When set to true, neighbor is being helped. The RR bit is used by a
(re)starting router to signal to its neighbors that a (re)start is in
progress.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="restart-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """restart_status must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="restart-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__restart_status = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_restart_status(self):
    self.__restart_status = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="restart-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_area_address(self):
    """
    Getter method for area_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/area_address (oc-isis-types:area-address)

    YANG Description: List of ISIS area-address(es).
    """
    return self.__area_address
      
  def _set_area_address(self, v, load=False):
    """
    Setter method for area_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/area_address (oc-isis-types:area-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_area_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_area_address() directly.

    YANG Description: List of ISIS area-address(es).
    """
    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_dict={'pattern': '[0-9A-Fa-f]{2}(\\.[0-9A-Fa-f]{4}){0,3}'})), is_leaf=False, yang_name="area-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:area-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """area_address must be of a type compatible with oc-isis-types:area-address""",
          'defined-type': "oc-isis-types:area-address",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{2}(\\.[0-9A-Fa-f]{4}){0,3}'})), is_leaf=False, yang_name="area-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:area-address', is_config=False)""",
        })

    self.__area_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_area_address(self):
    self.__area_address = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9A-Fa-f]{2}(\\.[0-9A-Fa-f]{4}){0,3}'})), is_leaf=False, yang_name="area-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-isis-types:area-address', is_config=False)


  def _get_nlpid(self):
    """
    Getter method for nlpid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/nlpid (enumeration)

    YANG Description: Supported Protocol. IPv4 is defined as (0xcc)
and IPv6 - (0x8e). ISIS reference is TLV 129.
    """
    return self.__nlpid
      
  def _set_nlpid(self, v, load=False):
    """
    Setter method for nlpid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/nlpid (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_nlpid is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_nlpid() directly.

    YANG Description: Supported Protocol. IPv4 is defined as (0xcc)
and IPv6 - (0x8e). ISIS reference is TLV 129.
    """
    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={'IPV4': {}, 'IPV6': {}},)), is_leaf=False, yang_name="nlpid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """nlpid must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}},)), is_leaf=False, yang_name="nlpid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__nlpid = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_nlpid(self):
    self.__nlpid = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}},)), is_leaf=False, yang_name="nlpid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)

  system_id = __builtin__.property(_get_system_id)
  neighbor_ipv4_address = __builtin__.property(_get_neighbor_ipv4_address)
  neighbor_ipv6_address = __builtin__.property(_get_neighbor_ipv6_address)
  neighbor_snpa = __builtin__.property(_get_neighbor_snpa)
  local_extended_circuit_id = __builtin__.property(_get_local_extended_circuit_id)
  neighbor_extended_circuit_id = __builtin__.property(_get_neighbor_extended_circuit_id)
  priority = __builtin__.property(_get_priority)
  dis_system_id = __builtin__.property(_get_dis_system_id)
  neighbor_circuit_type = __builtin__.property(_get_neighbor_circuit_type)
  adjacency_type = __builtin__.property(_get_adjacency_type)
  adjacency_state = __builtin__.property(_get_adjacency_state)
  up_timestamp = __builtin__.property(_get_up_timestamp)
  multi_topology = __builtin__.property(_get_multi_topology)
  topology = __builtin__.property(_get_topology)
  restart_support = __builtin__.property(_get_restart_support)
  restart_suppress = __builtin__.property(_get_restart_suppress)
  restart_status = __builtin__.property(_get_restart_status)
  area_address = __builtin__.property(_get_area_address)
  nlpid = __builtin__.property(_get_nlpid)


  _pyangbind_elements = OrderedDict([('system_id', system_id), ('neighbor_ipv4_address', neighbor_ipv4_address), ('neighbor_ipv6_address', neighbor_ipv6_address), ('neighbor_snpa', neighbor_snpa), ('local_extended_circuit_id', local_extended_circuit_id), ('neighbor_extended_circuit_id', neighbor_extended_circuit_id), ('priority', priority), ('dis_system_id', dis_system_id), ('neighbor_circuit_type', neighbor_circuit_type), ('adjacency_type', adjacency_type), ('adjacency_state', adjacency_state), ('up_timestamp', up_timestamp), ('multi_topology', multi_topology), ('topology', topology), ('restart_support', restart_support), ('restart_suppress', restart_suppress), ('restart_status', restart_status), ('area_address', area_address), ('nlpid', nlpid), ])


class yc_adjacency_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_adjacencies_adjacency(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of the local system's IS-IS adjacencies.
  """
  __slots__ = ('_path_helper', '_extmethods', '__system_id','__state',)

  _yang_name = 'adjacency'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__system_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_adjacencies_adjacency_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'levels', 'level', 'adjacencies', 'adjacency']

  def _get_system_id(self):
    """
    Getter method for system_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/system_id (leafref)

    YANG Description: Reference to the IS neighbor.
    """
    return self.__system_id
      
  def _set_system_id(self, v, load=False):
    """
    Setter method for system_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/system_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_system_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_system_id() directly.

    YANG Description: Reference to the IS neighbor.
    """
    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="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """system_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__system_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_system_id(self):
    self.__system_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="system-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state (container)

    YANG Description: Operational state relating to the IS-IS adjacency with the
remote system
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/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 relating to the IS-IS adjacency with the
remote system
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_adjacencies_adjacency_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_adjacencies_adjacency_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_adjacencies_adjacency_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  system_id = __builtin__.property(_get_system_id)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('system_id', system_id), ('state', state), ])


class yc_adjacencies_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_adjacencies(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS adjacencies.
  """
  __slots__ = ('_path_helper', '_extmethods', '__adjacency',)

  _yang_name = 'adjacencies'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__adjacency = YANGDynClass(base=YANGListType("system_id",yc_adjacency_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_adjacencies_adjacency, yang_name="adjacency", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='system-id', extensions=None), is_container='list', yang_name="adjacency", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'levels', 'level', 'adjacencies']

  def _get_adjacency(self):
    """
    Getter method for adjacency, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency (list)

    YANG Description: List of the local system's IS-IS adjacencies.
    """
    return self.__adjacency
      
  def _set_adjacency(self, v, load=False):
    """
    Setter method for adjacency, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adjacency is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adjacency() directly.

    YANG Description: List of the local system's IS-IS adjacencies.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("system_id",yc_adjacency_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_adjacencies_adjacency, yang_name="adjacency", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='system-id', extensions=None), is_container='list', yang_name="adjacency", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adjacency must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("system_id",yc_adjacency_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_adjacencies_adjacency, yang_name="adjacency", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='system-id', extensions=None), is_container='list', yang_name="adjacency", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__adjacency = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adjacency(self):
    self.__adjacency = YANGDynClass(base=YANGListType("system_id",yc_adjacency_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_adjacencies_adjacency, yang_name="adjacency", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='system-id', extensions=None), is_container='list', yang_name="adjacency", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  adjacency = __builtin__.property(_get_adjacency)


  _pyangbind_elements = OrderedDict([('adjacency', adjacency), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_timers_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/timers/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS interface hello-timers configuration.
  """
  __slots__ = ('_path_helper', '_extmethods', '__hello_interval','__hello_multiplier',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__hello_multiplier = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="hello-multiplier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'levels', 'level', 'timers', 'config']

  def _get_hello_interval(self):
    """
    Getter method for hello_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/timers/config/hello_interval (uint32)

    YANG Description: ISIS hello-interval value.
    """
    return self.__hello_interval
      
  def _set_hello_interval(self, v, load=False):
    """
    Setter method for hello_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/timers/config/hello_interval (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_interval() directly.

    YANG Description: ISIS hello-interval value.
    """
    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="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_interval 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="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__hello_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_interval(self):
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_hello_multiplier(self):
    """
    Getter method for hello_multiplier, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/timers/config/hello_multiplier (uint8)

    YANG Description: ISIS hello-multiplier value.
    """
    return self.__hello_multiplier
      
  def _set_hello_multiplier(self, v, load=False):
    """
    Setter method for hello_multiplier, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/timers/config/hello_multiplier (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_multiplier is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_multiplier() directly.

    YANG Description: ISIS hello-multiplier value.
    """
    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="hello-multiplier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_multiplier 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="hello-multiplier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
        })

    self.__hello_multiplier = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_multiplier(self):
    self.__hello_multiplier = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="hello-multiplier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)

  hello_interval = __builtin__.property(_get_hello_interval, _set_hello_interval)
  hello_multiplier = __builtin__.property(_get_hello_multiplier, _set_hello_multiplier)


  _pyangbind_elements = OrderedDict([('hello_interval', hello_interval), ('hello_multiplier', hello_multiplier), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_timers_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/timers/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS interface hello-timers state.
  """
  __slots__ = ('_path_helper', '_extmethods', '__hello_interval','__hello_multiplier',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__hello_multiplier = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="hello-multiplier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'levels', 'level', 'timers', 'state']

  def _get_hello_interval(self):
    """
    Getter method for hello_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/timers/state/hello_interval (uint32)

    YANG Description: ISIS hello-interval value.
    """
    return self.__hello_interval
      
  def _set_hello_interval(self, v, load=False):
    """
    Setter method for hello_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/timers/state/hello_interval (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_interval() directly.

    YANG Description: ISIS hello-interval value.
    """
    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="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_interval 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="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__hello_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_interval(self):
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_hello_multiplier(self):
    """
    Getter method for hello_multiplier, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/timers/state/hello_multiplier (uint8)

    YANG Description: ISIS hello-multiplier value.
    """
    return self.__hello_multiplier
      
  def _set_hello_multiplier(self, v, load=False):
    """
    Setter method for hello_multiplier, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/timers/state/hello_multiplier (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_multiplier is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_multiplier() directly.

    YANG Description: ISIS hello-multiplier value.
    """
    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="hello-multiplier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_multiplier 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="hello-multiplier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__hello_multiplier = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_multiplier(self):
    self.__hello_multiplier = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="hello-multiplier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)

  hello_interval = __builtin__.property(_get_hello_interval)
  hello_multiplier = __builtin__.property(_get_hello_multiplier)


  _pyangbind_elements = OrderedDict([('hello_interval', hello_interval), ('hello_multiplier', hello_multiplier), ])


class yc_timers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_timers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/timers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS timers.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'timers'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_timers_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_timers_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'levels', 'level', 'timers']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/timers/config (container)

    YANG Description: This container defines ISIS interface hello-timers configuration.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/timers/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: This container defines ISIS interface hello-timers configuration.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_timers_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_timers_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_timers_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/timers/state (container)

    YANG Description: This container defines ISIS interface hello-timers state.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/timers/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: This container defines ISIS interface hello-timers state.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_timers_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_timers_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_timers_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/afi-safi/af/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines AFI-SAFI configuration parameters. Single
topology is the default setting.
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi_name','__safi_name','__metric','__enabled',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__safi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(10), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'levels', 'level', 'afi-safi', 'af', 'config']

  def _get_afi_name(self):
    """
    Getter method for afi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/config/afi_name (identityref)

    YANG Description: Address-family type.
    """
    return self.__afi_name
      
  def _set_afi_name(self, v, load=False):
    """
    Setter method for afi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/config/afi_name (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_name() directly.

    YANG Description: Address-family type.
    """
    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': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_name must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__afi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_name(self):
    self.__afi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_safi_name(self):
    """
    Getter method for safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/config/safi_name (identityref)

    YANG Description: Subsequent address-family type.
    """
    return self.__safi_name
      
  def _set_safi_name(self, v, load=False):
    """
    Setter method for safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/config/safi_name (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_safi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_safi_name() directly.

    YANG Description: Subsequent address-family type.
    """
    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={'UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """safi_name must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__safi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_safi_name(self):
    self.__safi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/config/metric (uint32)

    YANG Description: ISIS metric value(default=10).
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/config/metric (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: ISIS metric value(default=10).
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(10), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric 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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(10), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(10), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/config/enabled (boolean)

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  afi_name = __builtin__.property(_get_afi_name, _set_afi_name)
  safi_name = __builtin__.property(_get_safi_name, _set_safi_name)
  metric = __builtin__.property(_get_metric, _set_metric)
  enabled = __builtin__.property(_get_enabled, _set_enabled)


  _pyangbind_elements = OrderedDict([('afi_name', afi_name), ('safi_name', safi_name), ('metric', metric), ('enabled', enabled), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/afi-safi/af/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines AFI-SAFI State information
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi_name','__safi_name','__metric','__enabled',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__safi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(10), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'levels', 'level', 'afi-safi', 'af', 'state']

  def _get_afi_name(self):
    """
    Getter method for afi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/state/afi_name (identityref)

    YANG Description: Address-family type.
    """
    return self.__afi_name
      
  def _set_afi_name(self, v, load=False):
    """
    Setter method for afi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/state/afi_name (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_name() directly.

    YANG Description: Address-family type.
    """
    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': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_name must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__afi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_name(self):
    self.__afi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV4': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:IPV6': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_safi_name(self):
    """
    Getter method for safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/state/safi_name (identityref)

    YANG Description: Subsequent address-family type.
    """
    return self.__safi_name
      
  def _set_safi_name(self, v, load=False):
    """
    Setter method for safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/state/safi_name (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_safi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_safi_name() directly.

    YANG Description: Subsequent address-family type.
    """
    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={'UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """safi_name must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__safi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_safi_name(self):
    self.__safi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:UNICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MULTICAST': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/state/metric (uint32)

    YANG Description: ISIS metric value(default=10).
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/state/metric (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: ISIS metric value(default=10).
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(10), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric 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), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(10), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(10), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/state/enabled (boolean)

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  afi_name = __builtin__.property(_get_afi_name)
  safi_name = __builtin__.property(_get_safi_name)
  metric = __builtin__.property(_get_metric)
  enabled = __builtin__.property(_get_enabled)


  _pyangbind_elements = OrderedDict([('afi_name', afi_name), ('safi_name', safi_name), ('metric', metric), ('enabled', enabled), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing_prefix_sids_prefix_sid_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/afi-safi/af/segment-routing/prefix-sids/prefix-sid/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for the IGP Prefix SID.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix','__sid_id','__label_options',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = 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])'}),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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-prefix', is_config=True)
    self.__sid_id = 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': {}},),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}|:))'}),], is_leaf=True, yang_name="sid-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-sid-type', is_config=True)
    self.__label_options = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'NO_PHP': {}, 'EXPLICIT_NULL': {}},), is_leaf=True, yang_name="label-options", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'levels', 'level', 'afi-safi', 'af', 'segment-routing', 'prefix-sids', 'prefix-sid', 'config']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/prefix_sids/prefix_sid/config/prefix (inet:ip-prefix)

    YANG Description: The IP prefix for which the IGP prefix SID should be advertised. The
value specified is a local prefix on the interface which is advertised
into the IGP.
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/prefix_sids/prefix_sid/config/prefix (inet:ip-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: The IP prefix for which the IGP prefix SID should be advertised. The
value specified is a local prefix on the interface which is advertised
into the IGP.
    """
    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])'}),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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-prefix', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with inet:ip-prefix""",
          'defined-type': "inet:ip-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])'}),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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-prefix', is_config=True)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = 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])'}),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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-prefix', is_config=True)


  def _get_sid_id(self):
    """
    Getter method for sid_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/prefix_sids/prefix_sid/config/sid_id (oc-srt:sr-sid-type)

    YANG Description: The Segment Identifier to be used when advertising the IGP Prefix SID.
    """
    return self.__sid_id
      
  def _set_sid_id(self, v, load=False):
    """
    Setter method for sid_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/prefix_sids/prefix_sid/config/sid_id (oc-srt:sr-sid-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sid_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sid_id() directly.

    YANG Description: The Segment Identifier to be used when advertising the IGP Prefix SID.
    """
    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': {}},),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}|:))'}),], is_leaf=True, yang_name="sid-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-sid-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sid_id must be of a type compatible with oc-srt:sr-sid-type""",
          'defined-type': "oc-srt:sr-sid-type",
          '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': {}},),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}|:))'}),], is_leaf=True, yang_name="sid-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-sid-type', is_config=True)""",
        })

    self.__sid_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sid_id(self):
    self.__sid_id = 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': {}},),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}|:))'}),], is_leaf=True, yang_name="sid-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-sid-type', is_config=True)


  def _get_label_options(self):
    """
    Getter method for label_options, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/prefix_sids/prefix_sid/config/label_options (enumeration)

    YANG Description: The options associated with the IGP prefix SID for MPLS. The value
of this leaf specifies the option that the SID should be advertised
into the IGP with.
    """
    return self.__label_options
      
  def _set_label_options(self, v, load=False):
    """
    Setter method for label_options, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/prefix_sids/prefix_sid/config/label_options (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_label_options is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_label_options() directly.

    YANG Description: The options associated with the IGP prefix SID for MPLS. The value
of this leaf specifies the option that the SID should be advertised
into the IGP with.
    """
    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={'NO_PHP': {}, 'EXPLICIT_NULL': {}},), is_leaf=True, yang_name="label-options", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """label_options must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'NO_PHP': {}, 'EXPLICIT_NULL': {}},), is_leaf=True, yang_name="label-options", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)""",
        })

    self.__label_options = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_label_options(self):
    self.__label_options = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'NO_PHP': {}, 'EXPLICIT_NULL': {}},), is_leaf=True, yang_name="label-options", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)

  prefix = __builtin__.property(_get_prefix, _set_prefix)
  sid_id = __builtin__.property(_get_sid_id, _set_sid_id)
  label_options = __builtin__.property(_get_label_options, _set_label_options)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ('sid_id', sid_id), ('label_options', label_options), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing_prefix_sids_prefix_sid_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/afi-safi/af/segment-routing/prefix-sids/prefix-sid/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 IGP-Prefix SID.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix','__sid_id','__label_options',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = 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])'}),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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-prefix', is_config=False)
    self.__sid_id = 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': {}},),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}|:))'}),], is_leaf=True, yang_name="sid-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-sid-type', is_config=False)
    self.__label_options = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'NO_PHP': {}, 'EXPLICIT_NULL': {}},), is_leaf=True, yang_name="label-options", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'levels', 'level', 'afi-safi', 'af', 'segment-routing', 'prefix-sids', 'prefix-sid', 'state']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/prefix_sids/prefix_sid/state/prefix (inet:ip-prefix)

    YANG Description: The IP prefix for which the IGP prefix SID should be advertised. The
value specified is a local prefix on the interface which is advertised
into the IGP.
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/prefix_sids/prefix_sid/state/prefix (inet:ip-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: The IP prefix for which the IGP prefix SID should be advertised. The
value specified is a local prefix on the interface which is advertised
into the IGP.
    """
    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])'}),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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with inet:ip-prefix""",
          'defined-type': "inet:ip-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])'}),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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-prefix', is_config=False)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = 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])'}),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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-prefix', is_config=False)


  def _get_sid_id(self):
    """
    Getter method for sid_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/prefix_sids/prefix_sid/state/sid_id (oc-srt:sr-sid-type)

    YANG Description: The Segment Identifier to be used when advertising the IGP Prefix SID.
    """
    return self.__sid_id
      
  def _set_sid_id(self, v, load=False):
    """
    Setter method for sid_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/prefix_sids/prefix_sid/state/sid_id (oc-srt:sr-sid-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sid_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sid_id() directly.

    YANG Description: The Segment Identifier to be used when advertising the IGP Prefix SID.
    """
    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': {}},),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}|:))'}),], is_leaf=True, yang_name="sid-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-sid-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sid_id must be of a type compatible with oc-srt:sr-sid-type""",
          'defined-type': "oc-srt:sr-sid-type",
          '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': {}},),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}|:))'}),], is_leaf=True, yang_name="sid-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-sid-type', is_config=False)""",
        })

    self.__sid_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sid_id(self):
    self.__sid_id = 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': {}},),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}|:))'}),], is_leaf=True, yang_name="sid-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-sid-type', is_config=False)


  def _get_label_options(self):
    """
    Getter method for label_options, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/prefix_sids/prefix_sid/state/label_options (enumeration)

    YANG Description: The options associated with the IGP prefix SID for MPLS. The value
of this leaf specifies the option that the SID should be advertised
into the IGP with.
    """
    return self.__label_options
      
  def _set_label_options(self, v, load=False):
    """
    Setter method for label_options, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/prefix_sids/prefix_sid/state/label_options (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_label_options is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_label_options() directly.

    YANG Description: The options associated with the IGP prefix SID for MPLS. The value
of this leaf specifies the option that the SID should be advertised
into the IGP with.
    """
    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={'NO_PHP': {}, 'EXPLICIT_NULL': {}},), is_leaf=True, yang_name="label-options", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """label_options must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'NO_PHP': {}, 'EXPLICIT_NULL': {}},), is_leaf=True, yang_name="label-options", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__label_options = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_label_options(self):
    self.__label_options = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'NO_PHP': {}, 'EXPLICIT_NULL': {}},), is_leaf=True, yang_name="label-options", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)

  prefix = __builtin__.property(_get_prefix)
  sid_id = __builtin__.property(_get_sid_id)
  label_options = __builtin__.property(_get_label_options)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ('sid_id', sid_id), ('label_options', label_options), ])


class yc_prefix_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing_prefix_sids_prefix_sid(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/afi-safi/af/segment-routing/prefix-sids/prefix-sid. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: An IGP prefix that should have a segment routing IGP-Prefix SID
allocated to it. The value of the SID is specified by the SID ID,
as an absolute value. If the absolute value falls within the SRGB,
the Global flag should be advertised by the system.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix','__config','__state',)

  _yang_name = 'prefix-sid'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing_prefix_sids_prefix_sid_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing_prefix_sids_prefix_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'levels', 'level', 'afi-safi', 'af', 'segment-routing', 'prefix-sids', 'prefix-sid']

  def _get_prefix(self):
    """
    Getter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/prefix_sids/prefix_sid/prefix (leafref)

    YANG Description: Reference to the prefix for which the IGP-Prefix SID is to be
advertised
    """
    return self.__prefix
      
  def _set_prefix(self, v, load=False):
    """
    Setter method for prefix, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/prefix_sids/prefix_sid/prefix (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix() directly.

    YANG Description: Reference to the prefix for which the IGP-Prefix SID is to be
advertised
    """
    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="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix(self):
    self.__prefix = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/prefix_sids/prefix_sid/config (container)

    YANG Description: Configuration parameters for the IGP Prefix SID.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/prefix_sids/prefix_sid/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 IGP Prefix SID.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing_prefix_sids_prefix_sid_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing_prefix_sids_prefix_sid_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing_prefix_sids_prefix_sid_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/prefix_sids/prefix_sid/state (container)

    YANG Description: Operational state parameters for the IGP-Prefix SID.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/prefix_sids/prefix_sid/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 IGP-Prefix SID.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing_prefix_sids_prefix_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing_prefix_sids_prefix_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing_prefix_sids_prefix_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  prefix = __builtin__.property(_get_prefix, _set_prefix)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('prefix', prefix), ('config', config), ('state', state), ])


class yc_prefix_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing_prefix_sids(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/afi-safi/af/segment-routing/prefix-sids. 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
the advertisement of a segment routing IGP-Prefix SID for this
interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_sid',)

  _yang_name = 'prefix-sids'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_sid = YANGDynClass(base=YANGListType("prefix",yc_prefix_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing_prefix_sids_prefix_sid, yang_name="prefix-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix', extensions=None), is_container='list', yang_name="prefix-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'levels', 'level', 'afi-safi', 'af', 'segment-routing', 'prefix-sids']

  def _get_prefix_sid(self):
    """
    Getter method for prefix_sid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/prefix_sids/prefix_sid (list)

    YANG Description: An IGP prefix that should have a segment routing IGP-Prefix SID
allocated to it. The value of the SID is specified by the SID ID,
as an absolute value. If the absolute value falls within the SRGB,
the Global flag should be advertised by the system.
    """
    return self.__prefix_sid
      
  def _set_prefix_sid(self, v, load=False):
    """
    Setter method for prefix_sid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/prefix_sids/prefix_sid (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_sid is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_sid() directly.

    YANG Description: An IGP prefix that should have a segment routing IGP-Prefix SID
allocated to it. The value of the SID is specified by the SID ID,
as an absolute value. If the absolute value falls within the SRGB,
the Global flag should be advertised by the system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("prefix",yc_prefix_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing_prefix_sids_prefix_sid, yang_name="prefix-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix', extensions=None), is_container='list', yang_name="prefix-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_sid must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("prefix",yc_prefix_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing_prefix_sids_prefix_sid, yang_name="prefix-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix', extensions=None), is_container='list', yang_name="prefix-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__prefix_sid = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_sid(self):
    self.__prefix_sid = YANGDynClass(base=YANGListType("prefix",yc_prefix_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing_prefix_sids_prefix_sid, yang_name="prefix-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='prefix', extensions=None), is_container='list', yang_name="prefix-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  prefix_sid = __builtin__.property(_get_prefix_sid, _set_prefix_sid)


  _pyangbind_elements = OrderedDict([('prefix_sid', prefix_sid), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing_adjacency_sids_adjacency_sid_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/afi-safi/af/segment-routing/adjacency-sids/adjacency-sid/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuraton parameters relating to the AdjSID.
  """
  __slots__ = ('_path_helper', '_extmethods', '__sid_id','__protection_eligible','__group','__neighbor',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__sid_id = 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': {}},),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}|:))'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DYNAMIC': {}},),], is_leaf=True, yang_name="sid-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)
    self.__protection_eligible = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="protection-eligible", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__group = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__neighbor = 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}'}),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}|:))'}),], is_leaf=True, yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'levels', 'level', 'afi-safi', 'af', 'segment-routing', 'adjacency-sids', 'adjacency-sid', 'config']

  def _get_sid_id(self):
    """
    Getter method for sid_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/config/sid_id (union)

    YANG Description: The value of the Adj-SID to be advertised. Where a static SID
identifier is specified, this should be advertised directly by the
system. Where the DYNAMIC value is specified, this should be treated
as a dynamically allocated value. When the MPLS data plane is in use
the dynamic value should not fall within a reserved-label-block.
    """
    return self.__sid_id
      
  def _set_sid_id(self, v, load=False):
    """
    Setter method for sid_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/config/sid_id (union)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sid_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sid_id() directly.

    YANG Description: The value of the Adj-SID to be advertised. Where a static SID
identifier is specified, this should be advertised directly by the
system. Where the DYNAMIC value is specified, this should be treated
as a dynamically allocated value. When the MPLS data plane is in use
the dynamic value should not fall within a reserved-label-block.
    """
    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': {}},),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}|:))'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DYNAMIC': {}},),], is_leaf=True, yang_name="sid-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sid_id must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          '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': {}},),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}|:))'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DYNAMIC': {}},),], is_leaf=True, yang_name="sid-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)""",
        })

    self.__sid_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sid_id(self):
    self.__sid_id = 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': {}},),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}|:))'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DYNAMIC': {}},),], is_leaf=True, yang_name="sid-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)


  def _get_protection_eligible(self):
    """
    Getter method for protection_eligible, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/config/protection_eligible (boolean)

    YANG Description: Whether the Adj-SID should be considered to be eligible for protection
using IP or MPLS FRR during a network failure. When this value is set to
true, the B-flag of the Adj-SID is set to 1, and the local system should
provide FRR paths for the associated label forwarding entry. When it is
set to false, the local system must not provide FRR for the specified
LFIB entry.
    """
    return self.__protection_eligible
      
  def _set_protection_eligible(self, v, load=False):
    """
    Setter method for protection_eligible, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/config/protection_eligible (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_protection_eligible is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_protection_eligible() directly.

    YANG Description: Whether the Adj-SID should be considered to be eligible for protection
using IP or MPLS FRR during a network failure. When this value is set to
true, the B-flag of the Adj-SID is set to 1, and the local system should
provide FRR paths for the associated label forwarding entry. When it is
set to false, the local system must not provide FRR for the specified
LFIB entry.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="protection-eligible", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """protection_eligible must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="protection-eligible", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__protection_eligible = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_protection_eligible(self):
    self.__protection_eligible = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="protection-eligible", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_group(self):
    """
    Getter method for group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/config/group (boolean)

    YANG Description: When set to true, the Adj-SID is indicated to be part of a group, and
the G flag is set to 1 in the corresponding advertisement in the IGP.
    """
    return self.__group
      
  def _set_group(self, v, load=False):
    """
    Setter method for group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/config/group (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_group() directly.

    YANG Description: When set to true, the Adj-SID is indicated to be part of a group, and
the G flag is set to 1 in the corresponding advertisement in the IGP.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """group must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_group(self):
    self.__group = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_neighbor(self):
    """
    Getter method for neighbor, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/config/neighbor (inet:ip-address)

    YANG Description: The remote system on the interface with which the Adj-SID is
associated.
    """
    return self.__neighbor
      
  def _set_neighbor(self, v, load=False):
    """
    Setter method for neighbor, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/config/neighbor (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor() directly.

    YANG Description: The remote system on the interface with which the Adj-SID is
associated.
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)""",
        })

    self.__neighbor = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor(self):
    self.__neighbor = 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}'}),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}|:))'}),], is_leaf=True, yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)

  sid_id = __builtin__.property(_get_sid_id, _set_sid_id)
  protection_eligible = __builtin__.property(_get_protection_eligible, _set_protection_eligible)
  group = __builtin__.property(_get_group, _set_group)
  neighbor = __builtin__.property(_get_neighbor, _set_neighbor)


  _pyangbind_elements = OrderedDict([('sid_id', sid_id), ('protection_eligible', protection_eligible), ('group', group), ('neighbor', neighbor), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing_adjacency_sids_adjacency_sid_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/afi-safi/af/segment-routing/adjacency-sids/adjacency-sid/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 AdjSID.
  """
  __slots__ = ('_path_helper', '_extmethods', '__sid_id','__protection_eligible','__group','__neighbor','__allocated_dynamic_local',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__sid_id = 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': {}},),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}|:))'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DYNAMIC': {}},),], is_leaf=True, yang_name="sid-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    self.__protection_eligible = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="protection-eligible", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__group = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__neighbor = 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}'}),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}|:))'}),], is_leaf=True, yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    self.__allocated_dynamic_local = 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': {}},),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}|:))'}),], is_leaf=True, yang_name="allocated-dynamic-local", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-sid-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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'levels', 'level', 'afi-safi', 'af', 'segment-routing', 'adjacency-sids', 'adjacency-sid', 'state']

  def _get_sid_id(self):
    """
    Getter method for sid_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/state/sid_id (union)

    YANG Description: The value of the Adj-SID to be advertised. Where a static SID
identifier is specified, this should be advertised directly by the
system. Where the DYNAMIC value is specified, this should be treated
as a dynamically allocated value. When the MPLS data plane is in use
the dynamic value should not fall within a reserved-label-block.
    """
    return self.__sid_id
      
  def _set_sid_id(self, v, load=False):
    """
    Setter method for sid_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/state/sid_id (union)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sid_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sid_id() directly.

    YANG Description: The value of the Adj-SID to be advertised. Where a static SID
identifier is specified, this should be advertised directly by the
system. Where the DYNAMIC value is specified, this should be treated
as a dynamically allocated value. When the MPLS data plane is in use
the dynamic value should not fall within a reserved-label-block.
    """
    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': {}},),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}|:))'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DYNAMIC': {}},),], is_leaf=True, yang_name="sid-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sid_id must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          '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': {}},),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}|:))'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DYNAMIC': {}},),], is_leaf=True, yang_name="sid-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)""",
        })

    self.__sid_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sid_id(self):
    self.__sid_id = 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': {}},),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}|:))'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DYNAMIC': {}},),], is_leaf=True, yang_name="sid-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)


  def _get_protection_eligible(self):
    """
    Getter method for protection_eligible, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/state/protection_eligible (boolean)

    YANG Description: Whether the Adj-SID should be considered to be eligible for protection
using IP or MPLS FRR during a network failure. When this value is set to
true, the B-flag of the Adj-SID is set to 1, and the local system should
provide FRR paths for the associated label forwarding entry. When it is
set to false, the local system must not provide FRR for the specified
LFIB entry.
    """
    return self.__protection_eligible
      
  def _set_protection_eligible(self, v, load=False):
    """
    Setter method for protection_eligible, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/state/protection_eligible (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_protection_eligible is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_protection_eligible() directly.

    YANG Description: Whether the Adj-SID should be considered to be eligible for protection
using IP or MPLS FRR during a network failure. When this value is set to
true, the B-flag of the Adj-SID is set to 1, and the local system should
provide FRR paths for the associated label forwarding entry. When it is
set to false, the local system must not provide FRR for the specified
LFIB entry.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="protection-eligible", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """protection_eligible must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="protection-eligible", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__protection_eligible = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_protection_eligible(self):
    self.__protection_eligible = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="protection-eligible", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_group(self):
    """
    Getter method for group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/state/group (boolean)

    YANG Description: When set to true, the Adj-SID is indicated to be part of a group, and
the G flag is set to 1 in the corresponding advertisement in the IGP.
    """
    return self.__group
      
  def _set_group(self, v, load=False):
    """
    Setter method for group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/state/group (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_group() directly.

    YANG Description: When set to true, the Adj-SID is indicated to be part of a group, and
the G flag is set to 1 in the corresponding advertisement in the IGP.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """group must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_group(self):
    self.__group = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_neighbor(self):
    """
    Getter method for neighbor, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/state/neighbor (inet:ip-address)

    YANG Description: The remote system on the interface with which the Adj-SID is
associated.
    """
    return self.__neighbor
      
  def _set_neighbor(self, v, load=False):
    """
    Setter method for neighbor, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/state/neighbor (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor() directly.

    YANG Description: The remote system on the interface with which the Adj-SID is
associated.
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)""",
        })

    self.__neighbor = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor(self):
    self.__neighbor = 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}'}),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}|:))'}),], is_leaf=True, yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)


  def _get_allocated_dynamic_local(self):
    """
    Getter method for allocated_dynamic_local, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/state/allocated_dynamic_local (oc-srt:sr-sid-type)

    YANG Description: Where an Adjacency SID with a dynamic value is to be allocated by
the system, this leaf reports to the value of the Adj-SID allocated
to this interface.
    """
    return self.__allocated_dynamic_local
      
  def _set_allocated_dynamic_local(self, v, load=False):
    """
    Setter method for allocated_dynamic_local, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/state/allocated_dynamic_local (oc-srt:sr-sid-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_allocated_dynamic_local is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_allocated_dynamic_local() directly.

    YANG Description: Where an Adjacency SID with a dynamic value is to be allocated by
the system, this leaf reports to the value of the Adj-SID allocated
to this interface.
    """
    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': {}},),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}|:))'}),], is_leaf=True, yang_name="allocated-dynamic-local", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-sid-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """allocated_dynamic_local must be of a type compatible with oc-srt:sr-sid-type""",
          'defined-type': "oc-srt:sr-sid-type",
          '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': {}},),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}|:))'}),], is_leaf=True, yang_name="allocated-dynamic-local", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-sid-type', is_config=False)""",
        })

    self.__allocated_dynamic_local = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_allocated_dynamic_local(self):
    self.__allocated_dynamic_local = 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': {}},),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}|:))'}),], is_leaf=True, yang_name="allocated-dynamic-local", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-sid-type', is_config=False)

  sid_id = __builtin__.property(_get_sid_id)
  protection_eligible = __builtin__.property(_get_protection_eligible)
  group = __builtin__.property(_get_group)
  neighbor = __builtin__.property(_get_neighbor)
  allocated_dynamic_local = __builtin__.property(_get_allocated_dynamic_local)


  _pyangbind_elements = OrderedDict([('sid_id', sid_id), ('protection_eligible', protection_eligible), ('group', group), ('neighbor', neighbor), ('allocated_dynamic_local', allocated_dynamic_local), ])


class yc_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing_adjacency_sids_adjacency_sid(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/afi-safi/af/segment-routing/adjacency-sids/adjacency-sid. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: An Adjacency SID to be advertised for the specified interface.
The Adj-SID's identifier (the SID ID) must be unique, with flags
specified indicating the parameters that should be set for the SID.
Where a SID value is specified that is allocated from the SRGB, the
global flag must be set by the system.
  """
  __slots__ = ('_path_helper', '_extmethods', '__sid_id','__neighbor','__config','__state',)

  _yang_name = 'adjacency-sid'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__sid_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sid-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__neighbor = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing_adjacency_sids_adjacency_sid_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing_adjacency_sids_adjacency_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'levels', 'level', 'afi-safi', 'af', 'segment-routing', 'adjacency-sids', 'adjacency-sid']

  def _get_sid_id(self):
    """
    Getter method for sid_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/sid_id (leafref)

    YANG Description: Reference to the segment identifier to be used by the local
system.
    """
    return self.__sid_id
      
  def _set_sid_id(self, v, load=False):
    """
    Setter method for sid_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/sid_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sid_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sid_id() directly.

    YANG Description: Reference to the segment identifier to be used by the local
system.
    """
    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="sid-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sid_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sid-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__sid_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sid_id(self):
    self.__sid_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="sid-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_neighbor(self):
    """
    Getter method for neighbor, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/neighbor (leafref)

    YANG Description: Reference to the neighbor with which the Adjacency SID is
associated.
    """
    return self.__neighbor
      
  def _set_neighbor(self, v, load=False):
    """
    Setter method for neighbor, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/neighbor (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor() directly.

    YANG Description: Reference to the neighbor with which the Adjacency SID is
associated.
    """
    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="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__neighbor = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor(self):
    self.__neighbor = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/config (container)

    YANG Description: Configuraton parameters relating to the AdjSID.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/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: Configuraton parameters relating to the AdjSID.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing_adjacency_sids_adjacency_sid_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing_adjacency_sids_adjacency_sid_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing_adjacency_sids_adjacency_sid_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/state (container)

    YANG Description: Operational state parameters relating to the AdjSID.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid/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 AdjSID.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing_adjacency_sids_adjacency_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing_adjacency_sids_adjacency_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing_adjacency_sids_adjacency_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  sid_id = __builtin__.property(_get_sid_id, _set_sid_id)
  neighbor = __builtin__.property(_get_neighbor, _set_neighbor)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('sid_id', sid_id), ('neighbor', neighbor), ('config', config), ('state', state), ])


class yc_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing_adjacency_sids(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/afi-safi/af/segment-routing/adjacency-sids. 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
the advertisement of a segment routing adjacency SID for this
interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__adjacency_sid',)

  _yang_name = 'adjacency-sids'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__adjacency_sid = YANGDynClass(base=YANGListType("neighbor sid_id",yc_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing_adjacency_sids_adjacency_sid, yang_name="adjacency-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='neighbor sid-id', extensions=None), is_container='list', yang_name="adjacency-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'levels', 'level', 'afi-safi', 'af', 'segment-routing', 'adjacency-sids']

  def _get_adjacency_sid(self):
    """
    Getter method for adjacency_sid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid (list)

    YANG Description: An Adjacency SID to be advertised for the specified interface.
The Adj-SID's identifier (the SID ID) must be unique, with flags
specified indicating the parameters that should be set for the SID.
Where a SID value is specified that is allocated from the SRGB, the
global flag must be set by the system.
    """
    return self.__adjacency_sid
      
  def _set_adjacency_sid(self, v, load=False):
    """
    Setter method for adjacency_sid, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids/adjacency_sid (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adjacency_sid is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adjacency_sid() directly.

    YANG Description: An Adjacency SID to be advertised for the specified interface.
The Adj-SID's identifier (the SID ID) must be unique, with flags
specified indicating the parameters that should be set for the SID.
Where a SID value is specified that is allocated from the SRGB, the
global flag must be set by the system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("neighbor sid_id",yc_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing_adjacency_sids_adjacency_sid, yang_name="adjacency-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='neighbor sid-id', extensions=None), is_container='list', yang_name="adjacency-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adjacency_sid must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("neighbor sid_id",yc_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing_adjacency_sids_adjacency_sid, yang_name="adjacency-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='neighbor sid-id', extensions=None), is_container='list', yang_name="adjacency-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__adjacency_sid = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adjacency_sid(self):
    self.__adjacency_sid = YANGDynClass(base=YANGListType("neighbor sid_id",yc_adjacency_sid_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing_adjacency_sids_adjacency_sid, yang_name="adjacency-sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='neighbor sid-id', extensions=None), is_container='list', yang_name="adjacency-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  adjacency_sid = __builtin__.property(_get_adjacency_sid, _set_adjacency_sid)


  _pyangbind_elements = OrderedDict([('adjacency_sid', adjacency_sid), ])


class yc_segment_routing_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/afi-safi/af/segment-routing. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration and operatioanl state parameters relating to segment
routing for an interface within the IGP.
  """
  __slots__ = ('_path_helper', '_extmethods', '__prefix_sids','__adjacency_sids',)

  _yang_name = 'segment-routing'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__prefix_sids = YANGDynClass(base=yc_prefix_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing_prefix_sids, is_container='container', yang_name="prefix-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__adjacency_sids = YANGDynClass(base=yc_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing_adjacency_sids, is_container='container', yang_name="adjacency-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'levels', 'level', 'afi-safi', 'af', 'segment-routing']

  def _get_prefix_sids(self):
    """
    Getter method for prefix_sids, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/prefix_sids (container)

    YANG Description: Configuration and operational state parameters relating to
the advertisement of a segment routing IGP-Prefix SID for this
interface.
    """
    return self.__prefix_sids
      
  def _set_prefix_sids(self, v, load=False):
    """
    Setter method for prefix_sids, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/prefix_sids (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_prefix_sids is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_prefix_sids() directly.

    YANG Description: Configuration and operational state parameters relating to
the advertisement of a segment routing IGP-Prefix SID for this
interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_prefix_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing_prefix_sids, is_container='container', yang_name="prefix-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """prefix_sids must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_prefix_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing_prefix_sids, is_container='container', yang_name="prefix-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__prefix_sids = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_prefix_sids(self):
    self.__prefix_sids = YANGDynClass(base=yc_prefix_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing_prefix_sids, is_container='container', yang_name="prefix-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_adjacency_sids(self):
    """
    Getter method for adjacency_sids, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids (container)

    YANG Description: Configuration and operational state parameters relating to
the advertisement of a segment routing adjacency SID for this
interface.
    """
    return self.__adjacency_sids
      
  def _set_adjacency_sids(self, v, load=False):
    """
    Setter method for adjacency_sids, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing/adjacency_sids (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adjacency_sids is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adjacency_sids() directly.

    YANG Description: Configuration and operational state parameters relating to
the advertisement of a segment routing adjacency SID for this
interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing_adjacency_sids, is_container='container', yang_name="adjacency-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adjacency_sids must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing_adjacency_sids, is_container='container', yang_name="adjacency-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__adjacency_sids = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adjacency_sids(self):
    self.__adjacency_sids = YANGDynClass(base=yc_adjacency_sids_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing_adjacency_sids, is_container='container', yang_name="adjacency-sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  prefix_sids = __builtin__.property(_get_prefix_sids, _set_prefix_sids)
  adjacency_sids = __builtin__.property(_get_adjacency_sids, _set_adjacency_sids)


  _pyangbind_elements = OrderedDict([('prefix_sids', prefix_sids), ('adjacency_sids', adjacency_sids), ])


class yc_af_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/afi-safi/af. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Address-family/Subsequent Address-family list.
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi_name','__safi_name','__config','__state','__segment_routing',)

  _yang_name = 'af'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__safi_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__segment_routing = YANGDynClass(base=yc_segment_routing_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing, is_container='container', yang_name="segment-routing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'levels', 'level', 'afi-safi', 'af']

  def _get_afi_name(self):
    """
    Getter method for afi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/afi_name (leafref)

    YANG Description: Reference to address-family type
    """
    return self.__afi_name
      
  def _set_afi_name(self, v, load=False):
    """
    Setter method for afi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/afi_name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_name() directly.

    YANG Description: Reference to address-family type
    """
    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="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__afi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_name(self):
    self.__afi_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_safi_name(self):
    """
    Getter method for safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/safi_name (leafref)

    YANG Description: Reference to subsequent address-family type
    """
    return self.__safi_name
      
  def _set_safi_name(self, v, load=False):
    """
    Setter method for safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/safi_name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_safi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_safi_name() directly.

    YANG Description: Reference to subsequent address-family type
    """
    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="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """safi_name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__safi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_safi_name(self):
    self.__safi_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/config (container)

    YANG Description: This container defines AFI-SAFI configuration parameters. Single
topology is the default setting.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/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: This container defines AFI-SAFI configuration parameters. Single
topology is the default setting.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/state (container)

    YANG Description: This container defines AFI-SAFI State information
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/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: This container defines AFI-SAFI State information
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_segment_routing(self):
    """
    Getter method for segment_routing, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing (container)

    YANG Description: Configuration and operatioanl state parameters relating to segment
routing for an interface within the IGP.
    """
    return self.__segment_routing
      
  def _set_segment_routing(self, v, load=False):
    """
    Setter method for segment_routing, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af/segment_routing (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_segment_routing is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_segment_routing() directly.

    YANG Description: Configuration and operatioanl state parameters relating to segment
routing for an interface within the IGP.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_segment_routing_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing, is_container='container', yang_name="segment-routing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """segment_routing must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_segment_routing_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing, is_container='container', yang_name="segment-routing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__segment_routing = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_segment_routing(self):
    self.__segment_routing = YANGDynClass(base=yc_segment_routing_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af_segment_routing, is_container='container', yang_name="segment-routing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  afi_name = __builtin__.property(_get_afi_name, _set_afi_name)
  safi_name = __builtin__.property(_get_safi_name, _set_safi_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  segment_routing = __builtin__.property(_get_segment_routing, _set_segment_routing)


  _pyangbind_elements = OrderedDict([('afi_name', afi_name), ('safi_name', safi_name), ('config', config), ('state', state), ('segment_routing', segment_routing), ])


class yc_afi_safi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/afi-safi. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines address-family specific configuration
and state information.
  """
  __slots__ = ('_path_helper', '_extmethods', '__af',)

  _yang_name = 'afi-safi'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__af = YANGDynClass(base=YANGListType("afi_name safi_name",yc_af_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af, yang_name="af", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-name safi-name', extensions=None), is_container='list', yang_name="af", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'levels', 'level', 'afi-safi']

  def _get_af(self):
    """
    Getter method for af, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af (list)

    YANG Description: Address-family/Subsequent Address-family list.
    """
    return self.__af
      
  def _set_af(self, v, load=False):
    """
    Setter method for af, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi/af (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_af is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_af() directly.

    YANG Description: Address-family/Subsequent Address-family list.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("afi_name safi_name",yc_af_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af, yang_name="af", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-name safi-name', extensions=None), is_container='list', yang_name="af", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """af must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("afi_name safi_name",yc_af_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af, yang_name="af", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-name safi-name', extensions=None), is_container='list', yang_name="af", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__af = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_af(self):
    self.__af = YANGDynClass(base=YANGListType("afi_name safi_name",yc_af_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi_af, yang_name="af", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-name safi-name', extensions=None), is_container='list', yang_name="af", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  af = __builtin__.property(_get_af, _set_af)


  _pyangbind_elements = OrderedDict([('af', af), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_hello_authentication_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/hello-authentication/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS authentication configuration.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__keychain','__auth_type','__auth_mode','__auth_password',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__keychain = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="keychain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-keychain:keychain-ref', is_config=True)
    self.__auth_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}},), is_leaf=True, yang_name="auth-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__auth_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="auth-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__auth_password = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="auth-password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'levels', 'level', 'hello-authentication', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/hello_authentication/config/enabled (boolean)

    YANG Description: Enabled or disable ISIS Hello authentication. Hello authentication
is used on a per-interface basis to authenticate adjacencies on the
interface.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/hello_authentication/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: Enabled or disable ISIS Hello authentication. Hello authentication
is used on a per-interface basis to authenticate adjacencies on the
interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_keychain(self):
    """
    Getter method for keychain, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/hello_authentication/config/keychain (oc-keychain:keychain-ref)

    YANG Description: Reference to a keychain that should be used for hello authentication.
    """
    return self.__keychain
      
  def _set_keychain(self, v, load=False):
    """
    Setter method for keychain, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/hello_authentication/config/keychain (oc-keychain:keychain-ref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_keychain is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_keychain() directly.

    YANG Description: Reference to a keychain that should be used for hello authentication.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="keychain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-keychain:keychain-ref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """keychain must be of a type compatible with oc-keychain:keychain-ref""",
          'defined-type': "oc-keychain:keychain-ref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="keychain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-keychain:keychain-ref', is_config=True)""",
        })

    self.__keychain = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_keychain(self):
    self.__keychain = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="keychain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-keychain:keychain-ref', is_config=True)


  def _get_auth_type(self):
    """
    Getter method for auth_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/hello_authentication/config/auth_type (identityref)

    YANG Description: The type of authentication used in the applicable IS-IS PDUs
(simple_key, keychain).
    """
    return self.__auth_type
      
  def _set_auth_type(self, v, load=False):
    """
    Setter method for auth_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/hello_authentication/config/auth_type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_auth_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_auth_type() directly.

    YANG Description: The type of authentication used in the applicable IS-IS PDUs
(simple_key, keychain).
    """
    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={'SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}},), is_leaf=True, yang_name="auth-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """auth_type must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}},), is_leaf=True, yang_name="auth-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__auth_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_auth_type(self):
    self.__auth_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}},), is_leaf=True, yang_name="auth-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_auth_mode(self):
    """
    Getter method for auth_mode, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/hello_authentication/config/auth_mode (identityref)

    YANG Description: The type of authentication used in the applicable IS-IS PDUs.

This leaf along with the sibling leaf 'auth-password' can be used
to configure the simple key authentication.
    """
    return self.__auth_mode
      
  def _set_auth_mode(self, v, load=False):
    """
    Setter method for auth_mode, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/hello_authentication/config/auth_mode (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_auth_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_auth_mode() directly.

    YANG Description: The type of authentication used in the applicable IS-IS PDUs.

This leaf along with the sibling leaf 'auth-password' can be used
to configure the simple key authentication.
    """
    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={'TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="auth-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """auth_mode must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="auth-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__auth_mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_auth_mode(self):
    self.__auth_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="auth-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_auth_password(self):
    """
    Getter method for auth_password, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/hello_authentication/config/auth_password (oc-types:routing-password)

    YANG Description: The authentication key used in the applicable IS-IS PDUs. The key in the
packet may be encrypted according to the configured authentication type.
    """
    return self.__auth_password
      
  def _set_auth_password(self, v, load=False):
    """
    Setter method for auth_password, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/hello_authentication/config/auth_password (oc-types:routing-password)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_auth_password is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_auth_password() directly.

    YANG Description: The authentication key used in the applicable IS-IS PDUs. The key in the
packet may be encrypted according to the configured authentication type.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="auth-password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """auth_password must be of a type compatible with oc-types:routing-password""",
          'defined-type': "oc-types:routing-password",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="auth-password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)""",
        })

    self.__auth_password = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_auth_password(self):
    self.__auth_password = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="auth-password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)
  keychain = __builtin__.property(_get_keychain, _set_keychain)
  auth_type = __builtin__.property(_get_auth_type, _set_auth_type)
  auth_mode = __builtin__.property(_get_auth_mode, _set_auth_mode)
  auth_password = __builtin__.property(_get_auth_password, _set_auth_password)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('keychain', keychain), ('auth_type', auth_type), ('auth_mode', auth_mode), ('auth_password', auth_password), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_hello_authentication_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/hello-authentication/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS authentication state.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__keychain','__auth_type','__auth_mode','__auth_password',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__keychain = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="keychain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-keychain:keychain-ref', is_config=False)
    self.__auth_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}},), is_leaf=True, yang_name="auth-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__auth_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="auth-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__auth_password = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="auth-password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'levels', 'level', 'hello-authentication', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/hello_authentication/state/enabled (boolean)

    YANG Description: Enabled or disable ISIS Hello authentication. Hello authentication
is used on a per-interface basis to authenticate adjacencies on the
interface.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/hello_authentication/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: Enabled or disable ISIS Hello authentication. Hello authentication
is used on a per-interface basis to authenticate adjacencies on the
interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_keychain(self):
    """
    Getter method for keychain, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/hello_authentication/state/keychain (oc-keychain:keychain-ref)

    YANG Description: Reference to a keychain that should be used for hello authentication.
    """
    return self.__keychain
      
  def _set_keychain(self, v, load=False):
    """
    Setter method for keychain, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/hello_authentication/state/keychain (oc-keychain:keychain-ref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_keychain is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_keychain() directly.

    YANG Description: Reference to a keychain that should be used for hello authentication.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="keychain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-keychain:keychain-ref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """keychain must be of a type compatible with oc-keychain:keychain-ref""",
          'defined-type': "oc-keychain:keychain-ref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="keychain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-keychain:keychain-ref', is_config=False)""",
        })

    self.__keychain = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_keychain(self):
    self.__keychain = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="keychain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-keychain:keychain-ref', is_config=False)


  def _get_auth_type(self):
    """
    Getter method for auth_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/hello_authentication/state/auth_type (identityref)

    YANG Description: The type of authentication used in the applicable IS-IS PDUs
(simple_key, keychain).
    """
    return self.__auth_type
      
  def _set_auth_type(self, v, load=False):
    """
    Setter method for auth_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/hello_authentication/state/auth_type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_auth_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_auth_type() directly.

    YANG Description: The type of authentication used in the applicable IS-IS PDUs
(simple_key, keychain).
    """
    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={'SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}},), is_leaf=True, yang_name="auth-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """auth_type must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}},), is_leaf=True, yang_name="auth-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__auth_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_auth_type(self):
    self.__auth_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:SIMPLE_KEY': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}, 'oc-keychain-types:KEYCHAIN': {'@module': 'openconfig-keychain-types', '@namespace': 'http://openconfig.net/yang/oc-keychain-types'}},), is_leaf=True, yang_name="auth-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_auth_mode(self):
    """
    Getter method for auth_mode, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/hello_authentication/state/auth_mode (identityref)

    YANG Description: The type of authentication used in the applicable IS-IS PDUs.

This leaf along with the sibling leaf 'auth-password' can be used
to configure the simple key authentication.
    """
    return self.__auth_mode
      
  def _set_auth_mode(self, v, load=False):
    """
    Setter method for auth_mode, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/hello_authentication/state/auth_mode (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_auth_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_auth_mode() directly.

    YANG Description: The type of authentication used in the applicable IS-IS PDUs.

This leaf along with the sibling leaf 'auth-password' can be used
to configure the simple key authentication.
    """
    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={'TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="auth-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """auth_mode must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="auth-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__auth_mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_auth_mode(self):
    self.__auth_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:TEXT': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}, 'oc-isis-types:MD5': {'@module': 'openconfig-isis-types', '@namespace': 'http://openconfig.net/yang/isis-types'}},), is_leaf=True, yang_name="auth-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_auth_password(self):
    """
    Getter method for auth_password, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/hello_authentication/state/auth_password (oc-types:routing-password)

    YANG Description: The authentication key used in the applicable IS-IS PDUs. The key in the
packet may be encrypted according to the configured authentication type.
    """
    return self.__auth_password
      
  def _set_auth_password(self, v, load=False):
    """
    Setter method for auth_password, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/hello_authentication/state/auth_password (oc-types:routing-password)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_auth_password is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_auth_password() directly.

    YANG Description: The authentication key used in the applicable IS-IS PDUs. The key in the
packet may be encrypted according to the configured authentication type.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="auth-password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """auth_password must be of a type compatible with oc-types:routing-password""",
          'defined-type': "oc-types:routing-password",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="auth-password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=False)""",
        })

    self.__auth_password = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_auth_password(self):
    self.__auth_password = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="auth-password", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=False)

  enabled = __builtin__.property(_get_enabled)
  keychain = __builtin__.property(_get_keychain)
  auth_type = __builtin__.property(_get_auth_type)
  auth_mode = __builtin__.property(_get_auth_mode)
  auth_password = __builtin__.property(_get_auth_password)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('keychain', keychain), ('auth_type', auth_type), ('auth_mode', auth_mode), ('auth_password', auth_password), ])


class yc_hello_authentication_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_hello_authentication(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/hello-authentication. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS authentication.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'hello-authentication'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_hello_authentication_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_hello_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'levels', 'level', 'hello-authentication']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/hello_authentication/config (container)

    YANG Description: This container defines ISIS authentication configuration.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/hello_authentication/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: This container defines ISIS authentication configuration.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_hello_authentication_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_hello_authentication_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_hello_authentication_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/hello_authentication/state (container)

    YANG Description: This container defines ISIS authentication state.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/hello_authentication/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: This container defines ISIS authentication state.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_hello_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_hello_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_hello_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_level_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration and operational state parameters related to a
particular level on an IS-IS enabled interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__level_number','__config','__state','__packet_counters','__adjacencies','__timers','__afi_safi','__hello_authentication',)

  _yang_name = 'level'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__level_number = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="level-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__packet_counters = YANGDynClass(base=yc_packet_counters_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters, is_container='container', yang_name="packet-counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__adjacencies = YANGDynClass(base=yc_adjacencies_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_adjacencies, is_container='container', yang_name="adjacencies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__timers = YANGDynClass(base=yc_timers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_timers, is_container='container', yang_name="timers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__afi_safi = YANGDynClass(base=yc_afi_safi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi, is_container='container', yang_name="afi-safi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__hello_authentication = YANGDynClass(base=yc_hello_authentication_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_hello_authentication, is_container='container', yang_name="hello-authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'levels', 'level']

  def _get_level_number(self):
    """
    Getter method for level_number, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/level_number (leafref)

    YANG Description: Reference to ISIS level-number.
    """
    return self.__level_number
      
  def _set_level_number(self, v, load=False):
    """
    Setter method for level_number, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/level_number (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_level_number is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_level_number() directly.

    YANG Description: Reference to ISIS level-number.
    """
    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="level-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """level_number must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="level-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__level_number = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_level_number(self):
    self.__level_number = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="level-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/config (container)

    YANG Description: This container defines interface ISIS level configuration.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/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: This container defines interface ISIS level configuration.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/state (container)

    YANG Description: This container defines interface ISIS level state information.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/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: This container defines interface ISIS level state information.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_packet_counters(self):
    """
    Getter method for packet_counters, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters (container)

    YANG Description: This container defines ISIS interface packet counters.
    """
    return self.__packet_counters
      
  def _set_packet_counters(self, v, load=False):
    """
    Setter method for packet_counters, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/packet_counters (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_packet_counters is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_packet_counters() directly.

    YANG Description: This container defines ISIS interface packet counters.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_packet_counters_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters, is_container='container', yang_name="packet-counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """packet_counters must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_packet_counters_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters, is_container='container', yang_name="packet-counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__packet_counters = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_packet_counters(self):
    self.__packet_counters = YANGDynClass(base=yc_packet_counters_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_packet_counters, is_container='container', yang_name="packet-counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_adjacencies(self):
    """
    Getter method for adjacencies, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies (container)

    YANG Description: This container defines ISIS adjacencies.
    """
    return self.__adjacencies
      
  def _set_adjacencies(self, v, load=False):
    """
    Setter method for adjacencies, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adjacencies is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adjacencies() directly.

    YANG Description: This container defines ISIS adjacencies.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_adjacencies_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_adjacencies, is_container='container', yang_name="adjacencies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adjacencies must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_adjacencies_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_adjacencies, is_container='container', yang_name="adjacencies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__adjacencies = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adjacencies(self):
    self.__adjacencies = YANGDynClass(base=yc_adjacencies_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_adjacencies, is_container='container', yang_name="adjacencies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_timers(self):
    """
    Getter method for timers, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/timers (container)

    YANG Description: This container defines ISIS timers.
    """
    return self.__timers
      
  def _set_timers(self, v, load=False):
    """
    Setter method for timers, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/timers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_timers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_timers() directly.

    YANG Description: This container defines ISIS timers.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_timers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_timers, is_container='container', yang_name="timers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """timers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_timers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_timers, is_container='container', yang_name="timers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__timers = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_timers(self):
    self.__timers = YANGDynClass(base=yc_timers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_timers, is_container='container', yang_name="timers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_afi_safi(self):
    """
    Getter method for afi_safi, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi (container)

    YANG Description: This container defines address-family specific configuration
and state information.
    """
    return self.__afi_safi
      
  def _set_afi_safi(self, v, load=False):
    """
    Setter method for afi_safi, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/afi_safi (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_safi is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_safi() directly.

    YANG Description: This container defines address-family specific configuration
and state information.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_afi_safi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi, is_container='container', yang_name="afi-safi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_safi must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_afi_safi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi, is_container='container', yang_name="afi-safi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__afi_safi = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_safi(self):
    self.__afi_safi = YANGDynClass(base=yc_afi_safi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_afi_safi, is_container='container', yang_name="afi-safi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_hello_authentication(self):
    """
    Getter method for hello_authentication, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/hello_authentication (container)

    YANG Description: This container defines ISIS authentication.
    """
    return self.__hello_authentication
      
  def _set_hello_authentication(self, v, load=False):
    """
    Setter method for hello_authentication, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level/hello_authentication (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_authentication is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_authentication() directly.

    YANG Description: This container defines ISIS authentication.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_hello_authentication_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_hello_authentication, is_container='container', yang_name="hello-authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_authentication must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_hello_authentication_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_hello_authentication, is_container='container', yang_name="hello-authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__hello_authentication = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_authentication(self):
    self.__hello_authentication = YANGDynClass(base=yc_hello_authentication_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level_hello_authentication, is_container='container', yang_name="hello-authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  level_number = __builtin__.property(_get_level_number, _set_level_number)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  packet_counters = __builtin__.property(_get_packet_counters, _set_packet_counters)
  adjacencies = __builtin__.property(_get_adjacencies, _set_adjacencies)
  timers = __builtin__.property(_get_timers, _set_timers)
  afi_safi = __builtin__.property(_get_afi_safi, _set_afi_safi)
  hello_authentication = __builtin__.property(_get_hello_authentication, _set_hello_authentication)


  _pyangbind_elements = OrderedDict([('level_number', level_number), ('config', config), ('state', state), ('packet_counters', packet_counters), ('adjacencies', adjacencies), ('timers', timers), ('afi_safi', afi_safi), ('hello_authentication', hello_authentication), ])


class yc_levels_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS level specific configuration and
state information.
  """
  __slots__ = ('_path_helper', '_extmethods', '__level',)

  _yang_name = 'levels'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__level = YANGDynClass(base=YANGListType("level_number",yc_level_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level, yang_name="level", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='level-number', extensions=None), is_container='list', yang_name="level", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'levels']

  def _get_level(self):
    """
    Getter method for level, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level (list)

    YANG Description: Configuration and operational state parameters related to a
particular level on an IS-IS enabled interface.
    """
    return self.__level
      
  def _set_level(self, v, load=False):
    """
    Setter method for level, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels/level (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_level is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_level() directly.

    YANG Description: Configuration and operational state parameters related to a
particular level on an IS-IS enabled interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("level_number",yc_level_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level, yang_name="level", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='level-number', extensions=None), is_container='list', yang_name="level", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """level must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("level_number",yc_level_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level, yang_name="level", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='level-number', extensions=None), is_container='list', yang_name="level", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__level = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_level(self):
    self.__level = YANGDynClass(base=YANGListType("level_number",yc_level_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels_level, yang_name="level", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='level-number', extensions=None), is_container='list', yang_name="level", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  level = __builtin__.property(_get_level, _set_level)


  _pyangbind_elements = OrderedDict([('level', level), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_timers_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/timers/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to interface
timers for IS-IS
  """
  __slots__ = ('_path_helper', '_extmethods', '__csnp_interval','__lsp_pacing_interval',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__csnp_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="csnp-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__lsp_pacing_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="lsp-pacing-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'timers', 'config']

  def _get_csnp_interval(self):
    """
    Getter method for csnp_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/timers/config/csnp_interval (uint16)

    YANG Description: The interval, specified in seconds, at which periodic CSNP packets
should be transmitted by the local IS.
    """
    return self.__csnp_interval
      
  def _set_csnp_interval(self, v, load=False):
    """
    Setter method for csnp_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/timers/config/csnp_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_csnp_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_csnp_interval() directly.

    YANG Description: The interval, specified in seconds, at which periodic CSNP packets
should be transmitted by the local IS.
    """
    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="csnp-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """csnp_interval 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="csnp-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__csnp_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_csnp_interval(self):
    self.__csnp_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="csnp-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_lsp_pacing_interval(self):
    """
    Getter method for lsp_pacing_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/timers/config/lsp_pacing_interval (uint64)

    YANG Description: The interval interval in milliseconds between the
detection of topology change and when the SPF algorithm runs.
    """
    return self.__lsp_pacing_interval
      
  def _set_lsp_pacing_interval(self, v, load=False):
    """
    Setter method for lsp_pacing_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/timers/config/lsp_pacing_interval (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsp_pacing_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsp_pacing_interval() directly.

    YANG Description: The interval interval in milliseconds between the
detection of topology change and when the SPF algorithm runs.
    """
    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="lsp-pacing-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsp_pacing_interval 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="lsp-pacing-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=True)""",
        })

    self.__lsp_pacing_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsp_pacing_interval(self):
    self.__lsp_pacing_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="lsp-pacing-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=True)

  csnp_interval = __builtin__.property(_get_csnp_interval, _set_csnp_interval)
  lsp_pacing_interval = __builtin__.property(_get_lsp_pacing_interval, _set_lsp_pacing_interval)


  _pyangbind_elements = OrderedDict([('csnp_interval', csnp_interval), ('lsp_pacing_interval', lsp_pacing_interval), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_timers_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/timers/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines state information for ISIS interface timers.
  """
  __slots__ = ('_path_helper', '_extmethods', '__csnp_interval','__lsp_pacing_interval',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__csnp_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="csnp-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__lsp_pacing_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="lsp-pacing-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'timers', 'state']

  def _get_csnp_interval(self):
    """
    Getter method for csnp_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/timers/state/csnp_interval (uint16)

    YANG Description: The interval, specified in seconds, at which periodic CSNP packets
should be transmitted by the local IS.
    """
    return self.__csnp_interval
      
  def _set_csnp_interval(self, v, load=False):
    """
    Setter method for csnp_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/timers/state/csnp_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_csnp_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_csnp_interval() directly.

    YANG Description: The interval, specified in seconds, at which periodic CSNP packets
should be transmitted by the local IS.
    """
    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="csnp-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """csnp_interval 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="csnp-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__csnp_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_csnp_interval(self):
    self.__csnp_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="csnp-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_lsp_pacing_interval(self):
    """
    Getter method for lsp_pacing_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/timers/state/lsp_pacing_interval (uint64)

    YANG Description: The interval interval in milliseconds between the
detection of topology change and when the SPF algorithm runs.
    """
    return self.__lsp_pacing_interval
      
  def _set_lsp_pacing_interval(self, v, load=False):
    """
    Setter method for lsp_pacing_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/timers/state/lsp_pacing_interval (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsp_pacing_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsp_pacing_interval() directly.

    YANG Description: The interval interval in milliseconds between the
detection of topology change and when the SPF algorithm runs.
    """
    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="lsp-pacing-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsp_pacing_interval 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="lsp-pacing-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__lsp_pacing_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsp_pacing_interval(self):
    self.__lsp_pacing_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="lsp-pacing-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)

  csnp_interval = __builtin__.property(_get_csnp_interval)
  lsp_pacing_interval = __builtin__.property(_get_lsp_pacing_interval)


  _pyangbind_elements = OrderedDict([('csnp_interval', csnp_interval), ('lsp_pacing_interval', lsp_pacing_interval), ])


class yc_timers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_timers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/timers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container describes ISIS interface timers configuration
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'timers'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_timers_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_timers_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'timers']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/timers/config (container)

    YANG Description: Configuration parameters relating to interface
timers for IS-IS
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/timers/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 interface
timers for IS-IS
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_timers_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_timers_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_timers_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/timers/state (container)

    YANG Description: This container defines state information for ISIS interface timers.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/timers/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: This container defines state information for ISIS interface timers.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_timers_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_timers_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_timers_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_enable_bfd_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/enable-bfd/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to enabling BFD.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'enable-bfd', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/enable_bfd/config/enabled (boolean)

    YANG Description: When this leaf is set to true, BFD is used to detect the
liveliness of the remote peer or next-hop.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/enable_bfd/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When this leaf is set to true, BFD is used to detect the
liveliness of the remote peer or next-hop.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_enable_bfd_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/enable-bfd/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 enabing BFD.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'enable-bfd', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/enable_bfd/state/enabled (boolean)

    YANG Description: When this leaf is set to true, BFD is used to detect the
liveliness of the remote peer or next-hop.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/enable_bfd/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When this leaf is set to true, BFD is used to detect the
liveliness of the remote peer or next-hop.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  enabled = __builtin__.property(_get_enabled)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ])


class yc_enable_bfd_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_enable_bfd(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/enable-bfd. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enable BFD for liveliness detection to the next-hop or
neighbour.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'enable-bfd'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_enable_bfd_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_enable_bfd_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'enable-bfd']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/enable_bfd/config (container)

    YANG Description: Configuration parameters relating to enabling BFD.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/enable_bfd/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 enabling BFD.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_enable_bfd_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_enable_bfd_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_enable_bfd_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/enable_bfd/state (container)

    YANG Description: Operational state parameters relating to enabing BFD.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/enable_bfd/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 enabing BFD.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_enable_bfd_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_enable_bfd_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_enable_bfd_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_bfd_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/bfd/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines BFD configuration parameters.
  """
  __slots__ = ('_path_helper', '_extmethods', '__bfd_tlv',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__bfd_tlv = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="bfd-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'bfd', 'config']

  def _get_bfd_tlv(self):
    """
    Getter method for bfd_tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/bfd/config/bfd_tlv (boolean)

    YANG Description: When set to true, BFD TLV is used. This enables support for the IS-IS
BFD TLV options, which specify that a BFD session must be established
before an IS-IS adjacency can transition to the established state.
This option should be enabled on all IS-IS neighbors on a shared
interface.
    """
    return self.__bfd_tlv
      
  def _set_bfd_tlv(self, v, load=False):
    """
    Setter method for bfd_tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/bfd/config/bfd_tlv (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bfd_tlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bfd_tlv() directly.

    YANG Description: When set to true, BFD TLV is used. This enables support for the IS-IS
BFD TLV options, which specify that a BFD session must be established
before an IS-IS adjacency can transition to the established state.
This option should be enabled on all IS-IS neighbors on a shared
interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="bfd-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bfd_tlv must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="bfd-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__bfd_tlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bfd_tlv(self):
    self.__bfd_tlv = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="bfd-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  bfd_tlv = __builtin__.property(_get_bfd_tlv, _set_bfd_tlv)


  _pyangbind_elements = OrderedDict([('bfd_tlv', bfd_tlv), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_bfd_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/bfd/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines BFD state information.
  """
  __slots__ = ('_path_helper', '_extmethods', '__bfd_tlv',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__bfd_tlv = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="bfd-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'bfd', 'state']

  def _get_bfd_tlv(self):
    """
    Getter method for bfd_tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/bfd/state/bfd_tlv (boolean)

    YANG Description: When set to true, BFD TLV is used. This enables support for the IS-IS
BFD TLV options, which specify that a BFD session must be established
before an IS-IS adjacency can transition to the established state.
This option should be enabled on all IS-IS neighbors on a shared
interface.
    """
    return self.__bfd_tlv
      
  def _set_bfd_tlv(self, v, load=False):
    """
    Setter method for bfd_tlv, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/bfd/state/bfd_tlv (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bfd_tlv is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bfd_tlv() directly.

    YANG Description: When set to true, BFD TLV is used. This enables support for the IS-IS
BFD TLV options, which specify that a BFD session must be established
before an IS-IS adjacency can transition to the established state.
This option should be enabled on all IS-IS neighbors on a shared
interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="bfd-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bfd_tlv must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="bfd-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__bfd_tlv = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bfd_tlv(self):
    self.__bfd_tlv = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="bfd-tlv", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  bfd_tlv = __builtin__.property(_get_bfd_tlv)


  _pyangbind_elements = OrderedDict([('bfd_tlv', bfd_tlv), ])


class yc_bfd_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_bfd(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/bfd. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines BFD.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'bfd'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_bfd_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_bfd_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'bfd']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/bfd/config (container)

    YANG Description: This container defines BFD configuration parameters.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/bfd/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: This container defines BFD configuration parameters.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_bfd_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_bfd_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_bfd_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/bfd/state (container)

    YANG Description: This container defines BFD state information.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/bfd/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: This container defines BFD state information.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_bfd_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_bfd_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_bfd_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_mpls_igp_ldp_sync_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/mpls/igp-ldp-sync/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines ISIS/IGP configuration.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__post_session_up_delay',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__post_session_up_delay = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="post-session-up-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'mpls', 'igp-ldp-sync', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/mpls/igp_ldp_sync/config/enabled (boolean)

    YANG Description: When set to true, rely on IGP/LDP synchronization. IGP cost for
link is maintained at max until LDP adjacencies are established 
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/mpls/igp_ldp_sync/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When set to true, rely on IGP/LDP synchronization. IGP cost for
link is maintained at max until LDP adjacencies are established 
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_post_session_up_delay(self):
    """
    Getter method for post_session_up_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/mpls/igp_ldp_sync/config/post_session_up_delay (uint16)

    YANG Description: Specifies a delay, expressed in units of seconds,
between the LDP session to the IGP neighbor being established, and
it being considered synchronized by the IGP.
    """
    return self.__post_session_up_delay
      
  def _set_post_session_up_delay(self, v, load=False):
    """
    Setter method for post_session_up_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/mpls/igp_ldp_sync/config/post_session_up_delay (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_post_session_up_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_post_session_up_delay() directly.

    YANG Description: Specifies a delay, expressed in units of seconds,
between the LDP session to the IGP neighbor being established, and
it being considered synchronized by the IGP.
    """
    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="post-session-up-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """post_session_up_delay 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="post-session-up-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__post_session_up_delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_post_session_up_delay(self):
    self.__post_session_up_delay = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="post-session-up-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)
  post_session_up_delay = __builtin__.property(_get_post_session_up_delay, _set_post_session_up_delay)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('post_session_up_delay', post_session_up_delay), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_mpls_igp_ldp_sync_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/mpls/igp-ldp-sync/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines state information for ISIS/LDP Sync.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__post_session_up_delay',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__post_session_up_delay = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="post-session-up-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'mpls', 'igp-ldp-sync', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/mpls/igp_ldp_sync/state/enabled (boolean)

    YANG Description: When set to true, rely on IGP/LDP synchronization. IGP cost for
link is maintained at max until LDP adjacencies are established 
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/mpls/igp_ldp_sync/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When set to true, rely on IGP/LDP synchronization. IGP cost for
link is maintained at max until LDP adjacencies are established 
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_post_session_up_delay(self):
    """
    Getter method for post_session_up_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/mpls/igp_ldp_sync/state/post_session_up_delay (uint16)

    YANG Description: Specifies a delay, expressed in units of seconds,
between the LDP session to the IGP neighbor being established, and
it being considered synchronized by the IGP.
    """
    return self.__post_session_up_delay
      
  def _set_post_session_up_delay(self, v, load=False):
    """
    Setter method for post_session_up_delay, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/mpls/igp_ldp_sync/state/post_session_up_delay (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_post_session_up_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_post_session_up_delay() directly.

    YANG Description: Specifies a delay, expressed in units of seconds,
between the LDP session to the IGP neighbor being established, and
it being considered synchronized by the IGP.
    """
    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="post-session-up-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """post_session_up_delay 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="post-session-up-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__post_session_up_delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_post_session_up_delay(self):
    self.__post_session_up_delay = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="post-session-up-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  enabled = __builtin__.property(_get_enabled)
  post_session_up_delay = __builtin__.property(_get_post_session_up_delay)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('post_session_up_delay', post_session_up_delay), ])


class yc_igp_ldp_sync_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_mpls_igp_ldp_sync(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/mpls/igp-ldp-sync. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration and operational state relating to synchronisation
between the LDP and IS-IS
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'igp-ldp-sync'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_mpls_igp_ldp_sync_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_mpls_igp_ldp_sync_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'mpls', 'igp-ldp-sync']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/mpls/igp_ldp_sync/config (container)

    YANG Description: This container defines ISIS/IGP configuration.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/mpls/igp_ldp_sync/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: This container defines ISIS/IGP configuration.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_mpls_igp_ldp_sync_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_mpls_igp_ldp_sync_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_mpls_igp_ldp_sync_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/mpls/igp_ldp_sync/state (container)

    YANG Description: This container defines state information for ISIS/LDP Sync.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/mpls/igp_ldp_sync/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: This container defines state information for ISIS/LDP Sync.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_mpls_igp_ldp_sync_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_mpls_igp_ldp_sync_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_mpls_igp_ldp_sync_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_mpls_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_mpls(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/mpls. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration and operational state relating to MPLS-related
features in IS-IS
  """
  __slots__ = ('_path_helper', '_extmethods', '__igp_ldp_sync',)

  _yang_name = 'mpls'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__igp_ldp_sync = YANGDynClass(base=yc_igp_ldp_sync_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_mpls_igp_ldp_sync, is_container='container', yang_name="igp-ldp-sync", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'mpls']

  def _get_igp_ldp_sync(self):
    """
    Getter method for igp_ldp_sync, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/mpls/igp_ldp_sync (container)

    YANG Description: Configuration and operational state relating to synchronisation
between the LDP and IS-IS
    """
    return self.__igp_ldp_sync
      
  def _set_igp_ldp_sync(self, v, load=False):
    """
    Setter method for igp_ldp_sync, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/mpls/igp_ldp_sync (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_igp_ldp_sync is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_igp_ldp_sync() directly.

    YANG Description: Configuration and operational state relating to synchronisation
between the LDP and IS-IS
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_igp_ldp_sync_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_mpls_igp_ldp_sync, is_container='container', yang_name="igp-ldp-sync", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """igp_ldp_sync must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_igp_ldp_sync_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_mpls_igp_ldp_sync, is_container='container', yang_name="igp-ldp-sync", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__igp_ldp_sync = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_igp_ldp_sync(self):
    self.__igp_ldp_sync = YANGDynClass(base=yc_igp_ldp_sync_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_mpls_igp_ldp_sync, is_container='container', yang_name="igp-ldp-sync", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  igp_ldp_sync = __builtin__.property(_get_igp_ldp_sync, _set_igp_ldp_sync)


  _pyangbind_elements = OrderedDict([('igp_ldp_sync', igp_ldp_sync), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_interface_ref_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'interface-ref', 'config']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/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 /network_instances/network_instance/protocols/protocol/isis/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/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 /network_instances/network_instance/protocols/protocol/isis/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_interface_ref_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'interface-ref', 'state']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/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 /network_instances/network_instance/protocols/protocol/isis/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/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 /network_instances/network_instance/protocols/protocol/isis/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_interface_ref(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/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
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'interface-ref'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface', 'interface-ref']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/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 /network_instances/network_instance/protocols/protocol/isis/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_network_instance__network_instances_network_instance_protocols_protocol_isis_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/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 /network_instances/network_instance/protocols/protocol/isis/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_network_instance__network_instances_network_instance_protocols_protocol_isis_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_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/network-instance', defining_module='openconfig-network-instance', 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_interface_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces/interface. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This list contains ISIS interfaces.
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id','__config','__state','__circuit_counters','__authentication','__afi_safi','__levels','__timers','__enable_bfd','__bfd','__mpls','__interface_ref',)

  _yang_name = 'interface'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__circuit_counters = YANGDynClass(base=yc_circuit_counters_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_circuit_counters, is_container='container', yang_name="circuit-counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__authentication = YANGDynClass(base=yc_authentication_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_authentication, is_container='container', yang_name="authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__afi_safi = YANGDynClass(base=yc_afi_safi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_afi_safi, is_container='container', yang_name="afi-safi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__levels = YANGDynClass(base=yc_levels_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels, is_container='container', yang_name="levels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__timers = YANGDynClass(base=yc_timers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_timers, is_container='container', yang_name="timers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__enable_bfd = YANGDynClass(base=yc_enable_bfd_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_enable_bfd, is_container='container', yang_name="enable-bfd", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__bfd = YANGDynClass(base=yc_bfd_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_bfd, is_container='container', yang_name="bfd", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__mpls = YANGDynClass(base=yc_mpls_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__interface_ref = YANGDynClass(base=yc_interface_ref_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces', 'interface']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/interface_id (leafref)

    YANG Description: Reference to interface-id
    """
    return self.__interface_id
      
  def _set_interface_id(self, v, load=False):
    """
    Setter method for interface_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/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 interface-id
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/config (container)

    YANG Description: This container defines ISIS interface configuration.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/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: This container defines ISIS interface configuration.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/state (container)

    YANG Description: This container defines state information for ISIS interfaces.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/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: This container defines state information for ISIS interfaces.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_circuit_counters(self):
    """
    Getter method for circuit_counters, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/circuit_counters (container)

    YANG Description: This container defines state information for ISIS circuit counters.
    """
    return self.__circuit_counters
      
  def _set_circuit_counters(self, v, load=False):
    """
    Setter method for circuit_counters, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/circuit_counters (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_circuit_counters is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_circuit_counters() directly.

    YANG Description: This container defines state information for ISIS circuit counters.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_circuit_counters_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_circuit_counters, is_container='container', yang_name="circuit-counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """circuit_counters must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_circuit_counters_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_circuit_counters, is_container='container', yang_name="circuit-counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__circuit_counters = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_circuit_counters(self):
    self.__circuit_counters = YANGDynClass(base=yc_circuit_counters_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_circuit_counters, is_container='container', yang_name="circuit-counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_authentication(self):
    """
    Getter method for authentication, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/authentication (container)

    YANG Description: This container defines ISIS authentication.
    """
    return self.__authentication
      
  def _set_authentication(self, v, load=False):
    """
    Setter method for authentication, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/authentication (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_authentication is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_authentication() directly.

    YANG Description: This container defines ISIS authentication.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_authentication_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_authentication, is_container='container', yang_name="authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """authentication must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_authentication_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_authentication, is_container='container', yang_name="authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__authentication = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_authentication(self):
    self.__authentication = YANGDynClass(base=yc_authentication_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_authentication, is_container='container', yang_name="authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_afi_safi(self):
    """
    Getter method for afi_safi, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/afi_safi (container)

    YANG Description: This container defines address-family specific configuration
and state information.
    """
    return self.__afi_safi
      
  def _set_afi_safi(self, v, load=False):
    """
    Setter method for afi_safi, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/afi_safi (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_safi is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_safi() directly.

    YANG Description: This container defines address-family specific configuration
and state information.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_afi_safi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_afi_safi, is_container='container', yang_name="afi-safi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_safi must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_afi_safi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_afi_safi, is_container='container', yang_name="afi-safi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__afi_safi = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_safi(self):
    self.__afi_safi = YANGDynClass(base=yc_afi_safi_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_afi_safi, is_container='container', yang_name="afi-safi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_levels(self):
    """
    Getter method for levels, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels (container)

    YANG Description: This container defines ISIS level specific configuration and
state information.
    """
    return self.__levels
      
  def _set_levels(self, v, load=False):
    """
    Setter method for levels, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/levels (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_levels is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_levels() directly.

    YANG Description: This container defines ISIS level specific configuration and
state information.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_levels_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels, is_container='container', yang_name="levels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """levels must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_levels_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels, is_container='container', yang_name="levels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__levels = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_levels(self):
    self.__levels = YANGDynClass(base=yc_levels_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_levels, is_container='container', yang_name="levels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_timers(self):
    """
    Getter method for timers, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/timers (container)

    YANG Description: This container describes ISIS interface timers configuration
    """
    return self.__timers
      
  def _set_timers(self, v, load=False):
    """
    Setter method for timers, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/timers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_timers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_timers() directly.

    YANG Description: This container describes ISIS interface timers configuration
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_timers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_timers, is_container='container', yang_name="timers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """timers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_timers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_timers, is_container='container', yang_name="timers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__timers = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_timers(self):
    self.__timers = YANGDynClass(base=yc_timers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_timers, is_container='container', yang_name="timers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_enable_bfd(self):
    """
    Getter method for enable_bfd, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/enable_bfd (container)

    YANG Description: Enable BFD for liveliness detection to the next-hop or
neighbour.
    """
    return self.__enable_bfd
      
  def _set_enable_bfd(self, v, load=False):
    """
    Setter method for enable_bfd, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/enable_bfd (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable_bfd is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable_bfd() directly.

    YANG Description: Enable BFD for liveliness detection to the next-hop or
neighbour.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_enable_bfd_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_enable_bfd, is_container='container', yang_name="enable-bfd", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable_bfd must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_enable_bfd_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_enable_bfd, is_container='container', yang_name="enable-bfd", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__enable_bfd = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable_bfd(self):
    self.__enable_bfd = YANGDynClass(base=yc_enable_bfd_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_enable_bfd, is_container='container', yang_name="enable-bfd", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_bfd(self):
    """
    Getter method for bfd, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/bfd (container)

    YANG Description: This container defines BFD.
    """
    return self.__bfd
      
  def _set_bfd(self, v, load=False):
    """
    Setter method for bfd, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/bfd (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bfd is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bfd() directly.

    YANG Description: This container defines BFD.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_bfd_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_bfd, is_container='container', yang_name="bfd", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bfd must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_bfd_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_bfd, is_container='container', yang_name="bfd", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__bfd = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bfd(self):
    self.__bfd = YANGDynClass(base=yc_bfd_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_bfd, is_container='container', yang_name="bfd", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_mpls(self):
    """
    Getter method for mpls, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/mpls (container)

    YANG Description: Configuration and operational state relating to MPLS-related
features in IS-IS
    """
    return self.__mpls
      
  def _set_mpls(self, v, load=False):
    """
    Setter method for mpls, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/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: Configuration and operational state relating to MPLS-related
features in IS-IS
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_mpls_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces_interface_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_interface_ref(self):
    """
    Getter method for interface_ref, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface/interface_ref (container)

    YANG Description: Reference to an interface or subinterface
    """
    return self.__interface_ref
      
  def _set_interface_ref(self, v, load=False):
    """
    Setter method for interface_ref, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/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
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interface_ref_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_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/network-instance', defining_module='openconfig-network-instance', 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)
  circuit_counters = __builtin__.property(_get_circuit_counters, _set_circuit_counters)
  authentication = __builtin__.property(_get_authentication, _set_authentication)
  afi_safi = __builtin__.property(_get_afi_safi, _set_afi_safi)
  levels = __builtin__.property(_get_levels, _set_levels)
  timers = __builtin__.property(_get_timers, _set_timers)
  enable_bfd = __builtin__.property(_get_enable_bfd, _set_enable_bfd)
  bfd = __builtin__.property(_get_bfd, _set_bfd)
  mpls = __builtin__.property(_get_mpls, _set_mpls)
  interface_ref = __builtin__.property(_get_interface_ref, _set_interface_ref)


  _pyangbind_elements = OrderedDict([('interface_id', interface_id), ('config', config), ('state', state), ('circuit_counters', circuit_counters), ('authentication', authentication), ('afi_safi', afi_safi), ('levels', levels), ('timers', timers), ('enable_bfd', enable_bfd), ('bfd', bfd), ('mpls', mpls), ('interface_ref', interface_ref), ])


class yc_interfaces_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_interfaces(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis/interfaces. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines global ISIS interface configuration and
state information.
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface',)

  _yang_name = 'interfaces'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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_network_instance__network_instances_network_instance_protocols_protocol_isis_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis', 'interfaces']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces/interface (list)

    YANG Description: This list contains ISIS interfaces.
    """
    return self.__interface
      
  def _set_interface(self, v, load=False):
    """
    Setter method for interface, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/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: This list contains ISIS interfaces.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("interface_id",yc_interface_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_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/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  interface = __builtin__.property(_get_interface, _set_interface)


  _pyangbind_elements = OrderedDict([('interface', interface), ])


class yc_isis_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/isis. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines top-level ISIS configuration and state
information.
  """
  __slots__ = ('_path_helper', '_extmethods', '__global_','__levels','__interfaces',)

  _yang_name = 'isis'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__global_ = YANGDynClass(base=yc_global__openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__levels = YANGDynClass(base=yc_levels_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels, is_container='container', yang_name="levels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__interfaces = YANGDynClass(base=yc_interfaces_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'isis']

  def _get_global_(self):
    """
    Getter method for global_, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global (container)

    YANG Description: This container defines global ISIS configuration and state
information.
    """
    return self.__global_
      
  def _set_global_(self, v, load=False):
    """
    Setter method for global_, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/global (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_global_ is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_global_() directly.

    YANG Description: This container defines global ISIS configuration and state
information.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_global__openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """global_ must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_global__openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__global_ = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_global_(self):
    self.__global_ = YANGDynClass(base=yc_global__openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_levels(self):
    """
    Getter method for levels, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels (container)

    YANG Description: This container defines ISIS level configuration and state
information.
    """
    return self.__levels
      
  def _set_levels(self, v, load=False):
    """
    Setter method for levels, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_levels is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_levels() directly.

    YANG Description: This container defines ISIS level configuration and state
information.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_levels_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels, is_container='container', yang_name="levels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """levels must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_levels_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels, is_container='container', yang_name="levels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__levels = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_levels(self):
    self.__levels = YANGDynClass(base=yc_levels_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_levels, is_container='container', yang_name="levels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_interfaces(self):
    """
    Getter method for interfaces, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/interfaces (container)

    YANG Description: This container defines global ISIS interface configuration and
state information.
    """
    return self.__interfaces
      
  def _set_interfaces(self, v, load=False):
    """
    Setter method for interfaces, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/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: This container defines global ISIS interface configuration and
state information.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interfaces_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_isis_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  global_ = __builtin__.property(_get_global_, _set_global_)
  levels = __builtin__.property(_get_levels, _set_levels)
  interfaces = __builtin__.property(_get_interfaces, _set_interfaces)


  _pyangbind_elements = OrderedDict([('global_', global_), ('levels', levels), ('interfaces', interfaces), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/pim/global/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration for global PIM parameters
  """
  __slots__ = ('_path_helper', '_extmethods', '__maximum_groups',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__maximum_groups = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maximum-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'pim', 'global', 'config']

  def _get_maximum_groups(self):
    """
    Getter method for maximum_groups, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/config/maximum_groups (uint32)

    YANG Description: Limit the number of accepted (S, G) and (*, G)
PIM join states on the network-instance.
    """
    return self.__maximum_groups
      
  def _set_maximum_groups(self, v, load=False):
    """
    Setter method for maximum_groups, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/config/maximum_groups (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_maximum_groups is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_maximum_groups() directly.

    YANG Description: Limit the number of accepted (S, G) and (*, G)
PIM join states on the network-instance.
    """
    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="maximum-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """maximum_groups 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="maximum-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__maximum_groups = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_maximum_groups(self):
    self.__maximum_groups = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maximum-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)

  maximum_groups = __builtin__.property(_get_maximum_groups, _set_maximum_groups)


  _pyangbind_elements = OrderedDict([('maximum_groups', maximum_groups), ])


class yc_counters_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_state_counters(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/pim/global/state/counters. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Global PIM counters.
  """
  __slots__ = ('_path_helper', '_extmethods', '__hello_messages','__join_prune_messages','__bootstrap_messages',)

  _yang_name = 'counters'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__hello_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="hello-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__join_prune_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="join-prune-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__bootstrap_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bootstrap-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'pim', 'global', 'state', 'counters']

  def _get_hello_messages(self):
    """
    Getter method for hello_messages, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/state/counters/hello_messages (uint32)

    YANG Description: Number of hello messages received.
    """
    return self.__hello_messages
      
  def _set_hello_messages(self, v, load=False):
    """
    Setter method for hello_messages, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/state/counters/hello_messages (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_messages() directly.

    YANG Description: Number of hello messages received.
    """
    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="hello-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_messages 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="hello-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__hello_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_messages(self):
    self.__hello_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="hello-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_join_prune_messages(self):
    """
    Getter method for join_prune_messages, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/state/counters/join_prune_messages (uint32)

    YANG Description: Number of join/prune messages received.
    """
    return self.__join_prune_messages
      
  def _set_join_prune_messages(self, v, load=False):
    """
    Setter method for join_prune_messages, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/state/counters/join_prune_messages (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_join_prune_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_join_prune_messages() directly.

    YANG Description: Number of join/prune messages received.
    """
    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="join-prune-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """join_prune_messages 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="join-prune-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__join_prune_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_join_prune_messages(self):
    self.__join_prune_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="join-prune-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_bootstrap_messages(self):
    """
    Getter method for bootstrap_messages, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/state/counters/bootstrap_messages (uint32)

    YANG Description: Number of bootstrap router messages received.
    """
    return self.__bootstrap_messages
      
  def _set_bootstrap_messages(self, v, load=False):
    """
    Setter method for bootstrap_messages, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/state/counters/bootstrap_messages (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bootstrap_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bootstrap_messages() directly.

    YANG Description: Number of bootstrap router messages received.
    """
    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="bootstrap-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bootstrap_messages 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="bootstrap-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__bootstrap_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bootstrap_messages(self):
    self.__bootstrap_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bootstrap-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  hello_messages = __builtin__.property(_get_hello_messages)
  join_prune_messages = __builtin__.property(_get_join_prune_messages)
  bootstrap_messages = __builtin__.property(_get_bootstrap_messages)


  _pyangbind_elements = OrderedDict([('hello_messages', hello_messages), ('join_prune_messages', join_prune_messages), ('bootstrap_messages', bootstrap_messages), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/pim/global/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Global PIM state.
  """
  __slots__ = ('_path_helper', '_extmethods', '__maximum_groups','__neighbor_count','__counters',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__maximum_groups = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maximum-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__neighbor_count = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="neighbor-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'pim', 'global', 'state']

  def _get_maximum_groups(self):
    """
    Getter method for maximum_groups, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/state/maximum_groups (uint32)

    YANG Description: Limit the number of accepted (S, G) and (*, G)
PIM join states on the network-instance.
    """
    return self.__maximum_groups
      
  def _set_maximum_groups(self, v, load=False):
    """
    Setter method for maximum_groups, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/state/maximum_groups (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_maximum_groups is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_maximum_groups() directly.

    YANG Description: Limit the number of accepted (S, G) and (*, G)
PIM join states on the network-instance.
    """
    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="maximum-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """maximum_groups 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="maximum-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__maximum_groups = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_maximum_groups(self):
    self.__maximum_groups = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maximum-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_neighbor_count(self):
    """
    Getter method for neighbor_count, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/state/neighbor_count (uint8)

    YANG Description: Number of adjacent PIM neighbors.
    """
    return self.__neighbor_count
      
  def _set_neighbor_count(self, v, load=False):
    """
    Setter method for neighbor_count, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/state/neighbor_count (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor_count is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor_count() directly.

    YANG Description: Number of adjacent PIM neighbors.
    """
    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="neighbor-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor_count 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="neighbor-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__neighbor_count = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor_count(self):
    self.__neighbor_count = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="neighbor-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_counters(self):
    """
    Getter method for counters, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/state/counters (container)

    YANG Description: Global PIM counters.
    """
    return self.__counters
      
  def _set_counters(self, v, load=False):
    """
    Setter method for counters, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/state/counters (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_counters is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_counters() directly.

    YANG Description: Global PIM counters.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_counters_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """counters must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__counters = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_counters(self):
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  maximum_groups = __builtin__.property(_get_maximum_groups)
  neighbor_count = __builtin__.property(_get_neighbor_count)
  counters = __builtin__.property(_get_counters)


  _pyangbind_elements = OrderedDict([('maximum_groups', maximum_groups), ('neighbor_count', neighbor_count), ('counters', counters), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_ssm_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/pim/global/ssm/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration for source specific multicast (SSM).
  """
  __slots__ = ('_path_helper', '_extmethods', '__ssm_ranges',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__ssm_ranges = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ssm-ranges", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'pim', 'global', 'ssm', 'config']

  def _get_ssm_ranges(self):
    """
    Getter method for ssm_ranges, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/ssm/config/ssm_ranges (leafref)

    YANG Description: List of accepted source specific multicast (SSM) address
ranges.
    """
    return self.__ssm_ranges
      
  def _set_ssm_ranges(self, v, load=False):
    """
    Setter method for ssm_ranges, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/ssm/config/ssm_ranges (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ssm_ranges is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ssm_ranges() directly.

    YANG Description: List of accepted source specific multicast (SSM) address
ranges.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="ssm-ranges", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ssm_ranges must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ssm-ranges", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__ssm_ranges = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ssm_ranges(self):
    self.__ssm_ranges = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ssm-ranges", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)

  ssm_ranges = __builtin__.property(_get_ssm_ranges, _set_ssm_ranges)


  _pyangbind_elements = OrderedDict([('ssm_ranges', ssm_ranges), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_ssm_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/pim/global/ssm/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State for source specific multicast (SSM).
  """
  __slots__ = ('_path_helper', '_extmethods', '__ssm_ranges',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__ssm_ranges = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ssm-ranges", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'pim', 'global', 'ssm', 'state']

  def _get_ssm_ranges(self):
    """
    Getter method for ssm_ranges, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/ssm/state/ssm_ranges (leafref)

    YANG Description: List of accepted source specific multicast (SSM) address
ranges.
    """
    return self.__ssm_ranges
      
  def _set_ssm_ranges(self, v, load=False):
    """
    Setter method for ssm_ranges, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/ssm/state/ssm_ranges (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ssm_ranges is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ssm_ranges() directly.

    YANG Description: List of accepted source specific multicast (SSM) address
ranges.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="ssm-ranges", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ssm_ranges must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ssm-ranges", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__ssm_ranges = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ssm_ranges(self):
    self.__ssm_ranges = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ssm-ranges", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)

  ssm_ranges = __builtin__.property(_get_ssm_ranges)


  _pyangbind_elements = OrderedDict([('ssm_ranges', ssm_ranges), ])


class yc_ssm_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_ssm(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/pim/global/ssm. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Source specific multicast (SSM).
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'ssm'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_ssm_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_ssm_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'pim', 'global', 'ssm']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/ssm/config (container)

    YANG Description: Configuration for source specific multicast (SSM).
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/ssm/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 for source specific multicast (SSM).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_ssm_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pim_global_ssm_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pim_global_ssm_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/ssm/state (container)

    YANG Description: State for source specific multicast (SSM).
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/ssm/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 for source specific multicast (SSM).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_ssm_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pim_global_ssm_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pim_global_ssm_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pim_global_rendezvous_points_rendezvous_point_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/pim/global/rendezvous-points/rendezvous-point/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Rendezvous point configuration.
  """
  __slots__ = ('_path_helper', '_extmethods', '__address','__multicast_groups',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__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}'}), is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=True)
    self.__multicast_groups = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'pim', 'global', 'rendezvous-points', 'rendezvous-point', 'config']

  def _get_address(self):
    """
    Getter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/rendezvous_points/rendezvous_point/config/address (inet:ipv4-address)

    YANG Description: IPv4 address of rendezvous point.
    """
    return self.__address
      
  def _set_address(self, v, load=False):
    """
    Setter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/rendezvous_points/rendezvous_point/config/address (inet:ipv4-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address() directly.

    YANG Description: IPv4 address of rendezvous point.
    """
    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}'}), is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address must be of a type compatible with inet:ipv4-address""",
          'defined-type': "inet:ipv4-address",
          '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}'}), is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=True)""",
        })

    self.__address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address(self):
    self.__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}'}), is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=True)


  def _get_multicast_groups(self):
    """
    Getter method for multicast_groups, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/rendezvous_points/rendezvous_point/config/multicast_groups (string)

    YANG Description: List of multicast groups (multicast IP address ranges) for which
this entry will be used as a rendezvous point. When not
present the default is equivalent to all valid IP multicast
addresses.
    """
    return self.__multicast_groups
      
  def _set_multicast_groups(self, v, load=False):
    """
    Setter method for multicast_groups, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/rendezvous_points/rendezvous_point/config/multicast_groups (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_groups is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_groups() directly.

    YANG Description: List of multicast groups (multicast IP address ranges) for which
this entry will be used as a rendezvous point. When not
present the default is equivalent to all valid IP multicast
addresses.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="multicast-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_groups must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)""",
        })

    self.__multicast_groups = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multicast_groups(self):
    self.__multicast_groups = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)

  address = __builtin__.property(_get_address, _set_address)
  multicast_groups = __builtin__.property(_get_multicast_groups, _set_multicast_groups)


  _pyangbind_elements = OrderedDict([('address', address), ('multicast_groups', multicast_groups), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_rendezvous_points_rendezvous_point_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/pim/global/rendezvous-points/rendezvous-point/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Rendezvous point state.
  """
  __slots__ = ('_path_helper', '_extmethods', '__address','__multicast_groups',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__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}'}), is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)
    self.__multicast_groups = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'pim', 'global', 'rendezvous-points', 'rendezvous-point', 'state']

  def _get_address(self):
    """
    Getter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/rendezvous_points/rendezvous_point/state/address (inet:ipv4-address)

    YANG Description: IPv4 address of rendezvous point.
    """
    return self.__address
      
  def _set_address(self, v, load=False):
    """
    Setter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/rendezvous_points/rendezvous_point/state/address (inet:ipv4-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address() directly.

    YANG Description: IPv4 address of rendezvous point.
    """
    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}'}), is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address must be of a type compatible with inet:ipv4-address""",
          'defined-type': "inet:ipv4-address",
          '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}'}), is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)""",
        })

    self.__address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address(self):
    self.__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}'}), is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)


  def _get_multicast_groups(self):
    """
    Getter method for multicast_groups, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/rendezvous_points/rendezvous_point/state/multicast_groups (string)

    YANG Description: List of multicast groups (multicast IP address ranges) for which
this entry will be used as a rendezvous point. When not
present the default is equivalent to all valid IP multicast
addresses.
    """
    return self.__multicast_groups
      
  def _set_multicast_groups(self, v, load=False):
    """
    Setter method for multicast_groups, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/rendezvous_points/rendezvous_point/state/multicast_groups (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_groups is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_groups() directly.

    YANG Description: List of multicast groups (multicast IP address ranges) for which
this entry will be used as a rendezvous point. When not
present the default is equivalent to all valid IP multicast
addresses.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="multicast-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_groups must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__multicast_groups = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multicast_groups(self):
    self.__multicast_groups = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="multicast-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)

  address = __builtin__.property(_get_address)
  multicast_groups = __builtin__.property(_get_multicast_groups)


  _pyangbind_elements = OrderedDict([('address', address), ('multicast_groups', multicast_groups), ])


class yc_rendezvous_point_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_rendezvous_points_rendezvous_point(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/pim/global/rendezvous-points/rendezvous-point. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Defines a rendezvous point (RP) for sparse mode multicast.
  """
  __slots__ = ('_path_helper', '_extmethods', '__address','__config','__state',)

  _yang_name = 'rendezvous-point'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_rendezvous_points_rendezvous_point_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_rendezvous_points_rendezvous_point_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'pim', 'global', 'rendezvous-points', 'rendezvous-point']

  def _get_address(self):
    """
    Getter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/rendezvous_points/rendezvous_point/address (leafref)

    YANG Description: IPv4 address of rendezvous point.
    """
    return self.__address
      
  def _set_address(self, v, load=False):
    """
    Setter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/rendezvous_points/rendezvous_point/address (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address() directly.

    YANG Description: IPv4 address of rendezvous point.
    """
    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="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address(self):
    self.__address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/rendezvous_points/rendezvous_point/config (container)

    YANG Description: Rendezvous point configuration.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/rendezvous_points/rendezvous_point/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: Rendezvous point configuration.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_rendezvous_points_rendezvous_point_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pim_global_rendezvous_points_rendezvous_point_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pim_global_rendezvous_points_rendezvous_point_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/rendezvous_points/rendezvous_point/state (container)

    YANG Description: Rendezvous point state.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/rendezvous_points/rendezvous_point/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: Rendezvous point state.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_rendezvous_points_rendezvous_point_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pim_global_rendezvous_points_rendezvous_point_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pim_global_rendezvous_points_rendezvous_point_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  address = __builtin__.property(_get_address, _set_address)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('address', address), ('config', config), ('state', state), ])


class yc_rendezvous_points_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_rendezvous_points(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/pim/global/rendezvous-points. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Defines rendezvous points for sparse mode multicast.
  """
  __slots__ = ('_path_helper', '_extmethods', '__rendezvous_point',)

  _yang_name = 'rendezvous-points'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__rendezvous_point = YANGDynClass(base=YANGListType("address",yc_rendezvous_point_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_rendezvous_points_rendezvous_point, yang_name="rendezvous-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='address', extensions=None), is_container='list', yang_name="rendezvous-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'pim', 'global', 'rendezvous-points']

  def _get_rendezvous_point(self):
    """
    Getter method for rendezvous_point, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/rendezvous_points/rendezvous_point (list)

    YANG Description: Defines a rendezvous point (RP) for sparse mode multicast.
    """
    return self.__rendezvous_point
      
  def _set_rendezvous_point(self, v, load=False):
    """
    Setter method for rendezvous_point, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/rendezvous_points/rendezvous_point (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_rendezvous_point is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_rendezvous_point() directly.

    YANG Description: Defines a rendezvous point (RP) for sparse mode multicast.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("address",yc_rendezvous_point_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_rendezvous_points_rendezvous_point, yang_name="rendezvous-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='address', extensions=None), is_container='list', yang_name="rendezvous-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """rendezvous_point must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("address",yc_rendezvous_point_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_rendezvous_points_rendezvous_point, yang_name="rendezvous-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='address', extensions=None), is_container='list', yang_name="rendezvous-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__rendezvous_point = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_rendezvous_point(self):
    self.__rendezvous_point = YANGDynClass(base=YANGListType("address",yc_rendezvous_point_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_rendezvous_points_rendezvous_point, yang_name="rendezvous-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='address', extensions=None), is_container='list', yang_name="rendezvous-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  rendezvous_point = __builtin__.property(_get_rendezvous_point, _set_rendezvous_point)


  _pyangbind_elements = OrderedDict([('rendezvous_point', rendezvous_point), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_sources_joined_source_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/pim/global/sources-joined/source/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State for a multicast source that has been joined.
  """
  __slots__ = ('_path_helper', '_extmethods', '__address','__group','__upstream_interface_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__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}'}), is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)
    self.__group = 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}'}), is_leaf=True, yang_name="group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)
    self.__upstream_interface_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="upstream-interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'pim', 'global', 'sources-joined', 'source', 'state']

  def _get_address(self):
    """
    Getter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/sources_joined/source/state/address (inet:ipv4-address)

    YANG Description: Source address of multicast.
    """
    return self.__address
      
  def _set_address(self, v, load=False):
    """
    Setter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/sources_joined/source/state/address (inet:ipv4-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address() directly.

    YANG Description: Source address of multicast.
    """
    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}'}), is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address must be of a type compatible with inet:ipv4-address""",
          'defined-type': "inet:ipv4-address",
          '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}'}), is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)""",
        })

    self.__address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address(self):
    self.__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}'}), is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)


  def _get_group(self):
    """
    Getter method for group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/sources_joined/source/state/group (inet:ipv4-address)

    YANG Description: Multicast address.
    """
    return self.__group
      
  def _set_group(self, v, load=False):
    """
    Setter method for group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/sources_joined/source/state/group (inet:ipv4-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_group() directly.

    YANG Description: Multicast address.
    """
    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}'}), is_leaf=True, yang_name="group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """group must be of a type compatible with inet:ipv4-address""",
          'defined-type': "inet:ipv4-address",
          '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}'}), is_leaf=True, yang_name="group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)""",
        })

    self.__group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_group(self):
    self.__group = 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}'}), is_leaf=True, yang_name="group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)


  def _get_upstream_interface_id(self):
    """
    Getter method for upstream_interface_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/sources_joined/source/state/upstream_interface_id (oc-if:interface-id)

    YANG Description: The upstream interface for this multicast source.
    """
    return self.__upstream_interface_id
      
  def _set_upstream_interface_id(self, v, load=False):
    """
    Setter method for upstream_interface_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/sources_joined/source/state/upstream_interface_id (oc-if:interface-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_upstream_interface_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_upstream_interface_id() directly.

    YANG Description: The upstream interface for this multicast source.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="upstream-interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """upstream_interface_id must be of a type compatible with oc-if:interface-id""",
          'defined-type': "oc-if:interface-id",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="upstream-interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=False)""",
        })

    self.__upstream_interface_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_upstream_interface_id(self):
    self.__upstream_interface_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="upstream-interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=False)

  address = __builtin__.property(_get_address)
  group = __builtin__.property(_get_group)
  upstream_interface_id = __builtin__.property(_get_upstream_interface_id)


  _pyangbind_elements = OrderedDict([('address', address), ('group', group), ('upstream_interface_id', upstream_interface_id), ])


class yc_source_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_sources_joined_source(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/pim/global/sources-joined/source. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A multicast source that has been joined.
  """
  __slots__ = ('_path_helper', '_extmethods', '__address','__state',)

  _yang_name = 'source'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_sources_joined_source_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'pim', 'global', 'sources-joined', 'source']

  def _get_address(self):
    """
    Getter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/sources_joined/source/address (leafref)

    YANG Description: Source address of multicast.
    """
    return self.__address
      
  def _set_address(self, v, load=False):
    """
    Setter method for address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/sources_joined/source/address (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address() directly.

    YANG Description: Source address of multicast.
    """
    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="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address(self):
    self.__address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/sources_joined/source/state (container)

    YANG Description: State for a multicast source that has been joined.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/sources_joined/source/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 for a multicast source that has been joined.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_sources_joined_source_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pim_global_sources_joined_source_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pim_global_sources_joined_source_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  address = __builtin__.property(_get_address)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('address', address), ('state', state), ])


class yc_sources_joined_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_sources_joined(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/pim/global/sources-joined. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of multicast sources joined.
  """
  __slots__ = ('_path_helper', '_extmethods', '__source',)

  _yang_name = 'sources-joined'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__source = YANGDynClass(base=YANGListType("address",yc_source_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_sources_joined_source, yang_name="source", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='address', extensions=None), is_container='list', yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'pim', 'global', 'sources-joined']

  def _get_source(self):
    """
    Getter method for source, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/sources_joined/source (list)

    YANG Description: A multicast source that has been joined.
    """
    return self.__source
      
  def _set_source(self, v, load=False):
    """
    Setter method for source, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/sources_joined/source (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source() directly.

    YANG Description: A multicast source that has been joined.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("address",yc_source_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_sources_joined_source, yang_name="source", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='address', extensions=None), is_container='list', yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("address",yc_source_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_sources_joined_source, yang_name="source", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='address', extensions=None), is_container='list', yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__source = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source(self):
    self.__source = YANGDynClass(base=YANGListType("address",yc_source_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_sources_joined_source, yang_name="source", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='address', extensions=None), is_container='list', yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  source = __builtin__.property(_get_source)


  _pyangbind_elements = OrderedDict([('source', source), ])


class yc_global__openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/pim/global. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines global PIM configuration and state
information.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__ssm','__rendezvous_points','__sources_joined',)

  _yang_name = 'global'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__ssm = YANGDynClass(base=yc_ssm_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_ssm, is_container='container', yang_name="ssm", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__rendezvous_points = YANGDynClass(base=yc_rendezvous_points_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_rendezvous_points, is_container='container', yang_name="rendezvous-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__sources_joined = YANGDynClass(base=yc_sources_joined_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_sources_joined, is_container='container', yang_name="sources-joined", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'pim', 'global']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/config (container)

    YANG Description: Configuration for global PIM parameters
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/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 for global PIM parameters
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pim_global_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pim_global_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/state (container)

    YANG Description: Global PIM state.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/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: Global PIM state.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pim_global_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pim_global_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_ssm(self):
    """
    Getter method for ssm, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/ssm (container)

    YANG Description: Source specific multicast (SSM).
    """
    return self.__ssm
      
  def _set_ssm(self, v, load=False):
    """
    Setter method for ssm, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/ssm (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ssm is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ssm() directly.

    YANG Description: Source specific multicast (SSM).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ssm_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_ssm, is_container='container', yang_name="ssm", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ssm must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ssm_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_ssm, is_container='container', yang_name="ssm", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__ssm = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ssm(self):
    self.__ssm = YANGDynClass(base=yc_ssm_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_ssm, is_container='container', yang_name="ssm", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_rendezvous_points(self):
    """
    Getter method for rendezvous_points, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/rendezvous_points (container)

    YANG Description: Defines rendezvous points for sparse mode multicast.
    """
    return self.__rendezvous_points
      
  def _set_rendezvous_points(self, v, load=False):
    """
    Setter method for rendezvous_points, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/rendezvous_points (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_rendezvous_points is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_rendezvous_points() directly.

    YANG Description: Defines rendezvous points for sparse mode multicast.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_rendezvous_points_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_rendezvous_points, is_container='container', yang_name="rendezvous-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """rendezvous_points must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_rendezvous_points_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_rendezvous_points, is_container='container', yang_name="rendezvous-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__rendezvous_points = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_rendezvous_points(self):
    self.__rendezvous_points = YANGDynClass(base=yc_rendezvous_points_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_rendezvous_points, is_container='container', yang_name="rendezvous-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_sources_joined(self):
    """
    Getter method for sources_joined, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/sources_joined (container)

    YANG Description: List of multicast sources joined.
    """
    return self.__sources_joined
      
  def _set_sources_joined(self, v, load=False):
    """
    Setter method for sources_joined, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global/sources_joined (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sources_joined is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sources_joined() directly.

    YANG Description: List of multicast sources joined.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_sources_joined_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_sources_joined, is_container='container', yang_name="sources-joined", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sources_joined must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_sources_joined_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_sources_joined, is_container='container', yang_name="sources-joined", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__sources_joined = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sources_joined(self):
    self.__sources_joined = YANGDynClass(base=yc_sources_joined_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global_sources_joined, is_container='container', yang_name="sources-joined", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  ssm = __builtin__.property(_get_ssm, _set_ssm)
  rendezvous_points = __builtin__.property(_get_rendezvous_points, _set_rendezvous_points)
  sources_joined = __builtin__.property(_get_sources_joined, _set_sources_joined)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('ssm', ssm), ('rendezvous_points', rendezvous_points), ('sources_joined', sources_joined), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces_interface_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/pim/interfaces/interface/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: PIM interface configuration.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__interface_id','__mode','__bsr_border','__border_router','__dr_priority','__join_prune_interval','__hello_interval','__dead_timer','__maximum_groups',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=True)
    self.__mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PIM_MODE_SPARSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}, 'oc-pim-types:PIM_MODE_SPARSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}, 'PIM_MODE_DENSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}, 'oc-pim-types:PIM_MODE_DENSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}},), is_leaf=True, yang_name="mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__bsr_border = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="bsr-border", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__border_router = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="border-router", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__dr_priority = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="dr-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pim-types:dr-priority-type', is_config=True)
    self.__join_prune_interval = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="join-prune-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pim-types:pim-interval-type', is_config=True)
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pim-types:pim-interval-type', is_config=True)
    self.__dead_timer = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..65535']}), is_leaf=True, yang_name="dead-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__maximum_groups = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maximum-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'pim', 'interfaces', 'interface', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/config/enabled (boolean)

    YANG Description: When set to true, the functionality within which this
leaf is defined is enabled, when set to false it is
explicitly disabled.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When set to true, the functionality within which this
leaf is defined is enabled, when set to false it is
explicitly disabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/config/interface_id (oc-if:interface-id)

    YANG Description: Reference to an interface on which PIM is enabled.
    """
    return self.__interface_id
      
  def _set_interface_id(self, v, load=False):
    """
    Setter method for interface_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/config/interface_id (oc-if:interface-id)
    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 an interface on which PIM is enabled.
    """
    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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_id must be of a type compatible with oc-if:interface-id""",
          'defined-type': "oc-if:interface-id",
          '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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=True)


  def _get_mode(self):
    """
    Getter method for mode, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/config/mode (identityref)

    YANG Description: PIM mode to use when delivering multicast traffic via this
interface.
    """
    return self.__mode
      
  def _set_mode(self, v, load=False):
    """
    Setter method for mode, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/config/mode (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mode() directly.

    YANG Description: PIM mode to use when delivering multicast traffic via this
interface.
    """
    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={'PIM_MODE_SPARSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}, 'oc-pim-types:PIM_MODE_SPARSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}, 'PIM_MODE_DENSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}, 'oc-pim-types:PIM_MODE_DENSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}},), is_leaf=True, yang_name="mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mode must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PIM_MODE_SPARSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}, 'oc-pim-types:PIM_MODE_SPARSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}, 'PIM_MODE_DENSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}, 'oc-pim-types:PIM_MODE_DENSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}},), is_leaf=True, yang_name="mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mode(self):
    self.__mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PIM_MODE_SPARSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}, 'oc-pim-types:PIM_MODE_SPARSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}, 'PIM_MODE_DENSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}, 'oc-pim-types:PIM_MODE_DENSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}},), is_leaf=True, yang_name="mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_bsr_border(self):
    """
    Getter method for bsr_border, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/config/bsr_border (boolean)

    YANG Description: When set to true the device will not send bootstrap router
messages over this interface. By default these are transmitted
over all PIM sparse mode (PIM-SM) enabled interfaces.
    """
    return self.__bsr_border
      
  def _set_bsr_border(self, v, load=False):
    """
    Setter method for bsr_border, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/config/bsr_border (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bsr_border is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bsr_border() directly.

    YANG Description: When set to true the device will not send bootstrap router
messages over this interface. By default these are transmitted
over all PIM sparse mode (PIM-SM) enabled interfaces.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="bsr-border", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bsr_border must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="bsr-border", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__bsr_border = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bsr_border(self):
    self.__bsr_border = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="bsr-border", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_border_router(self):
    """
    Getter method for border_router, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/config/border_router (boolean)

    YANG Description: When set to true the interface is set as MBR (multicast border
router) and allows multicast traffic from sources that are
outside of the PIM domain.
    """
    return self.__border_router
      
  def _set_border_router(self, v, load=False):
    """
    Setter method for border_router, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/config/border_router (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_border_router is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_border_router() directly.

    YANG Description: When set to true the interface is set as MBR (multicast border
router) and allows multicast traffic from sources that are
outside of the PIM domain.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="border-router", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """border_router must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="border-router", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__border_router = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_border_router(self):
    self.__border_router = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="border-router", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_dr_priority(self):
    """
    Getter method for dr_priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/config/dr_priority (oc-pim-types:dr-priority-type)

    YANG Description: The designated router priority of this interface. Larger always
preferred.
    """
    return self.__dr_priority
      
  def _set_dr_priority(self, v, load=False):
    """
    Setter method for dr_priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/config/dr_priority (oc-pim-types:dr-priority-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dr_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dr_priority() directly.

    YANG Description: The designated router priority of this interface. Larger always
preferred.
    """
    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="dr-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pim-types:dr-priority-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dr_priority must be of a type compatible with oc-pim-types:dr-priority-type""",
          'defined-type': "oc-pim-types:dr-priority-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="dr-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pim-types:dr-priority-type', is_config=True)""",
        })

    self.__dr_priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dr_priority(self):
    self.__dr_priority = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="dr-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pim-types:dr-priority-type', is_config=True)


  def _get_join_prune_interval(self):
    """
    Getter method for join_prune_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/config/join_prune_interval (oc-pim-types:pim-interval-type)

    YANG Description: Interval at which the router sends the PIM join/prune messages
toward the upstream RPF neighbor.
    """
    return self.__join_prune_interval
      
  def _set_join_prune_interval(self, v, load=False):
    """
    Setter method for join_prune_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/config/join_prune_interval (oc-pim-types:pim-interval-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_join_prune_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_join_prune_interval() directly.

    YANG Description: Interval at which the router sends the PIM join/prune messages
toward the upstream RPF neighbor.
    """
    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': ['1..255']}), is_leaf=True, yang_name="join-prune-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pim-types:pim-interval-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """join_prune_interval must be of a type compatible with oc-pim-types:pim-interval-type""",
          'defined-type': "oc-pim-types:pim-interval-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="join-prune-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pim-types:pim-interval-type', is_config=True)""",
        })

    self.__join_prune_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_join_prune_interval(self):
    self.__join_prune_interval = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="join-prune-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pim-types:pim-interval-type', is_config=True)


  def _get_hello_interval(self):
    """
    Getter method for hello_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/config/hello_interval (oc-pim-types:pim-interval-type)

    YANG Description: Interval at which the router sends the PIM hello messages.
    """
    return self.__hello_interval
      
  def _set_hello_interval(self, v, load=False):
    """
    Setter method for hello_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/config/hello_interval (oc-pim-types:pim-interval-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_interval() directly.

    YANG Description: Interval at which the router sends the PIM hello messages.
    """
    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': ['1..255']}), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pim-types:pim-interval-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_interval must be of a type compatible with oc-pim-types:pim-interval-type""",
          'defined-type': "oc-pim-types:pim-interval-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pim-types:pim-interval-type', is_config=True)""",
        })

    self.__hello_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_interval(self):
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pim-types:pim-interval-type', is_config=True)


  def _get_dead_timer(self):
    """
    Getter method for dead_timer, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/config/dead_timer (uint16)

    YANG Description: Number of missed hello messages after which a neighbor is
expired.
    """
    return self.__dead_timer
      
  def _set_dead_timer(self, v, load=False):
    """
    Setter method for dead_timer, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/config/dead_timer (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dead_timer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dead_timer() directly.

    YANG Description: Number of missed hello messages after which a neighbor is
expired.
    """
    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': ['1..65535']}), is_leaf=True, yang_name="dead-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dead_timer must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..65535']}), is_leaf=True, yang_name="dead-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__dead_timer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dead_timer(self):
    self.__dead_timer = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..65535']}), is_leaf=True, yang_name="dead-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_maximum_groups(self):
    """
    Getter method for maximum_groups, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/config/maximum_groups (uint32)

    YANG Description: Limit the number of (S, G) and (*, G) PIM
entries accepted on the interface.
This feature depends on hardware implementation.
    """
    return self.__maximum_groups
      
  def _set_maximum_groups(self, v, load=False):
    """
    Setter method for maximum_groups, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/config/maximum_groups (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_maximum_groups is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_maximum_groups() directly.

    YANG Description: Limit the number of (S, G) and (*, G) PIM
entries accepted on the interface.
This feature depends on hardware implementation.
    """
    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="maximum-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """maximum_groups 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="maximum-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__maximum_groups = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_maximum_groups(self):
    self.__maximum_groups = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maximum-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)
  interface_id = __builtin__.property(_get_interface_id, _set_interface_id)
  mode = __builtin__.property(_get_mode, _set_mode)
  bsr_border = __builtin__.property(_get_bsr_border, _set_bsr_border)
  border_router = __builtin__.property(_get_border_router, _set_border_router)
  dr_priority = __builtin__.property(_get_dr_priority, _set_dr_priority)
  join_prune_interval = __builtin__.property(_get_join_prune_interval, _set_join_prune_interval)
  hello_interval = __builtin__.property(_get_hello_interval, _set_hello_interval)
  dead_timer = __builtin__.property(_get_dead_timer, _set_dead_timer)
  maximum_groups = __builtin__.property(_get_maximum_groups, _set_maximum_groups)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('interface_id', interface_id), ('mode', mode), ('bsr_border', bsr_border), ('border_router', border_router), ('dr_priority', dr_priority), ('join_prune_interval', join_prune_interval), ('hello_interval', hello_interval), ('dead_timer', dead_timer), ('maximum_groups', maximum_groups), ])


class yc_counters_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces_interface_state_counters(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/pim/interfaces/interface/state/counters. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: PIM counters for each interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__hello_messages','__join_prune_messages','__bootstrap_messages',)

  _yang_name = 'counters'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__hello_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="hello-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__join_prune_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="join-prune-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__bootstrap_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bootstrap-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'pim', 'interfaces', 'interface', 'state', 'counters']

  def _get_hello_messages(self):
    """
    Getter method for hello_messages, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/state/counters/hello_messages (uint32)

    YANG Description: Number of hello messages received.
    """
    return self.__hello_messages
      
  def _set_hello_messages(self, v, load=False):
    """
    Setter method for hello_messages, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/state/counters/hello_messages (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_messages() directly.

    YANG Description: Number of hello messages received.
    """
    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="hello-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_messages 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="hello-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__hello_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_messages(self):
    self.__hello_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="hello-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_join_prune_messages(self):
    """
    Getter method for join_prune_messages, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/state/counters/join_prune_messages (uint32)

    YANG Description: Number of join/prune messages received.
    """
    return self.__join_prune_messages
      
  def _set_join_prune_messages(self, v, load=False):
    """
    Setter method for join_prune_messages, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/state/counters/join_prune_messages (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_join_prune_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_join_prune_messages() directly.

    YANG Description: Number of join/prune messages received.
    """
    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="join-prune-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """join_prune_messages 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="join-prune-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__join_prune_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_join_prune_messages(self):
    self.__join_prune_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="join-prune-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_bootstrap_messages(self):
    """
    Getter method for bootstrap_messages, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/state/counters/bootstrap_messages (uint32)

    YANG Description: Number of bootstrap router messages received.
    """
    return self.__bootstrap_messages
      
  def _set_bootstrap_messages(self, v, load=False):
    """
    Setter method for bootstrap_messages, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/state/counters/bootstrap_messages (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bootstrap_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bootstrap_messages() directly.

    YANG Description: Number of bootstrap router messages received.
    """
    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="bootstrap-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bootstrap_messages 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="bootstrap-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__bootstrap_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bootstrap_messages(self):
    self.__bootstrap_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bootstrap-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  hello_messages = __builtin__.property(_get_hello_messages)
  join_prune_messages = __builtin__.property(_get_join_prune_messages)
  bootstrap_messages = __builtin__.property(_get_bootstrap_messages)


  _pyangbind_elements = OrderedDict([('hello_messages', hello_messages), ('join_prune_messages', join_prune_messages), ('bootstrap_messages', bootstrap_messages), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces_interface_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/pim/interfaces/interface/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information for PIM interfaces.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__interface_id','__mode','__bsr_border','__border_router','__dr_priority','__join_prune_interval','__hello_interval','__dead_timer','__maximum_groups','__counters',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=False)
    self.__mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PIM_MODE_SPARSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}, 'oc-pim-types:PIM_MODE_SPARSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}, 'PIM_MODE_DENSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}, 'oc-pim-types:PIM_MODE_DENSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}},), is_leaf=True, yang_name="mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__bsr_border = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="bsr-border", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__border_router = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="border-router", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__dr_priority = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="dr-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pim-types:dr-priority-type', is_config=False)
    self.__join_prune_interval = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="join-prune-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pim-types:pim-interval-type', is_config=False)
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pim-types:pim-interval-type', is_config=False)
    self.__dead_timer = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..65535']}), is_leaf=True, yang_name="dead-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__maximum_groups = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maximum-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces_interface_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'pim', 'interfaces', 'interface', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/state/enabled (boolean)

    YANG Description: When set to true, the functionality within which this
leaf is defined is enabled, when set to false it is
explicitly disabled.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When set to true, the functionality within which this
leaf is defined is enabled, when set to false it is
explicitly disabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/state/interface_id (oc-if:interface-id)

    YANG Description: Reference to an interface on which PIM is enabled.
    """
    return self.__interface_id
      
  def _set_interface_id(self, v, load=False):
    """
    Setter method for interface_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/state/interface_id (oc-if:interface-id)
    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 an interface on which PIM is enabled.
    """
    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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_id must be of a type compatible with oc-if:interface-id""",
          'defined-type': "oc-if:interface-id",
          '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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=False)


  def _get_mode(self):
    """
    Getter method for mode, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/state/mode (identityref)

    YANG Description: PIM mode to use when delivering multicast traffic via this
interface.
    """
    return self.__mode
      
  def _set_mode(self, v, load=False):
    """
    Setter method for mode, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/state/mode (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mode() directly.

    YANG Description: PIM mode to use when delivering multicast traffic via this
interface.
    """
    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={'PIM_MODE_SPARSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}, 'oc-pim-types:PIM_MODE_SPARSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}, 'PIM_MODE_DENSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}, 'oc-pim-types:PIM_MODE_DENSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}},), is_leaf=True, yang_name="mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mode must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PIM_MODE_SPARSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}, 'oc-pim-types:PIM_MODE_SPARSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}, 'PIM_MODE_DENSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}, 'oc-pim-types:PIM_MODE_DENSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}},), is_leaf=True, yang_name="mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mode(self):
    self.__mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PIM_MODE_SPARSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}, 'oc-pim-types:PIM_MODE_SPARSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}, 'PIM_MODE_DENSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}, 'oc-pim-types:PIM_MODE_DENSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}},), is_leaf=True, yang_name="mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_bsr_border(self):
    """
    Getter method for bsr_border, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/state/bsr_border (boolean)

    YANG Description: When set to true the device will not send bootstrap router
messages over this interface. By default these are transmitted
over all PIM sparse mode (PIM-SM) enabled interfaces.
    """
    return self.__bsr_border
      
  def _set_bsr_border(self, v, load=False):
    """
    Setter method for bsr_border, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/state/bsr_border (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bsr_border is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bsr_border() directly.

    YANG Description: When set to true the device will not send bootstrap router
messages over this interface. By default these are transmitted
over all PIM sparse mode (PIM-SM) enabled interfaces.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="bsr-border", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bsr_border must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="bsr-border", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__bsr_border = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bsr_border(self):
    self.__bsr_border = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="bsr-border", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_border_router(self):
    """
    Getter method for border_router, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/state/border_router (boolean)

    YANG Description: When set to true the interface is set as MBR (multicast border
router) and allows multicast traffic from sources that are
outside of the PIM domain.
    """
    return self.__border_router
      
  def _set_border_router(self, v, load=False):
    """
    Setter method for border_router, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/state/border_router (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_border_router is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_border_router() directly.

    YANG Description: When set to true the interface is set as MBR (multicast border
router) and allows multicast traffic from sources that are
outside of the PIM domain.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="border-router", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """border_router must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="border-router", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__border_router = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_border_router(self):
    self.__border_router = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="border-router", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_dr_priority(self):
    """
    Getter method for dr_priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/state/dr_priority (oc-pim-types:dr-priority-type)

    YANG Description: The designated router priority of this interface. Larger always
preferred.
    """
    return self.__dr_priority
      
  def _set_dr_priority(self, v, load=False):
    """
    Setter method for dr_priority, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/state/dr_priority (oc-pim-types:dr-priority-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dr_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dr_priority() directly.

    YANG Description: The designated router priority of this interface. Larger always
preferred.
    """
    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="dr-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pim-types:dr-priority-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dr_priority must be of a type compatible with oc-pim-types:dr-priority-type""",
          'defined-type': "oc-pim-types:dr-priority-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="dr-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pim-types:dr-priority-type', is_config=False)""",
        })

    self.__dr_priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dr_priority(self):
    self.__dr_priority = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="dr-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pim-types:dr-priority-type', is_config=False)


  def _get_join_prune_interval(self):
    """
    Getter method for join_prune_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/state/join_prune_interval (oc-pim-types:pim-interval-type)

    YANG Description: Interval at which the router sends the PIM join/prune messages
toward the upstream RPF neighbor.
    """
    return self.__join_prune_interval
      
  def _set_join_prune_interval(self, v, load=False):
    """
    Setter method for join_prune_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/state/join_prune_interval (oc-pim-types:pim-interval-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_join_prune_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_join_prune_interval() directly.

    YANG Description: Interval at which the router sends the PIM join/prune messages
toward the upstream RPF neighbor.
    """
    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': ['1..255']}), is_leaf=True, yang_name="join-prune-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pim-types:pim-interval-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """join_prune_interval must be of a type compatible with oc-pim-types:pim-interval-type""",
          'defined-type': "oc-pim-types:pim-interval-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="join-prune-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pim-types:pim-interval-type', is_config=False)""",
        })

    self.__join_prune_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_join_prune_interval(self):
    self.__join_prune_interval = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="join-prune-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pim-types:pim-interval-type', is_config=False)


  def _get_hello_interval(self):
    """
    Getter method for hello_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/state/hello_interval (oc-pim-types:pim-interval-type)

    YANG Description: Interval at which the router sends the PIM hello messages.
    """
    return self.__hello_interval
      
  def _set_hello_interval(self, v, load=False):
    """
    Setter method for hello_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/state/hello_interval (oc-pim-types:pim-interval-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_interval() directly.

    YANG Description: Interval at which the router sends the PIM hello messages.
    """
    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': ['1..255']}), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pim-types:pim-interval-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_interval must be of a type compatible with oc-pim-types:pim-interval-type""",
          'defined-type': "oc-pim-types:pim-interval-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pim-types:pim-interval-type', is_config=False)""",
        })

    self.__hello_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_interval(self):
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pim-types:pim-interval-type', is_config=False)


  def _get_dead_timer(self):
    """
    Getter method for dead_timer, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/state/dead_timer (uint16)

    YANG Description: Number of missed hello messages after which a neighbor is
expired.
    """
    return self.__dead_timer
      
  def _set_dead_timer(self, v, load=False):
    """
    Setter method for dead_timer, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/state/dead_timer (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dead_timer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dead_timer() directly.

    YANG Description: Number of missed hello messages after which a neighbor is
expired.
    """
    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': ['1..65535']}), is_leaf=True, yang_name="dead-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dead_timer must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..65535']}), is_leaf=True, yang_name="dead-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__dead_timer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dead_timer(self):
    self.__dead_timer = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..65535']}), is_leaf=True, yang_name="dead-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_maximum_groups(self):
    """
    Getter method for maximum_groups, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/state/maximum_groups (uint32)

    YANG Description: Limit the number of (S, G) and (*, G) PIM
entries accepted on the interface.
This feature depends on hardware implementation.
    """
    return self.__maximum_groups
      
  def _set_maximum_groups(self, v, load=False):
    """
    Setter method for maximum_groups, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/state/maximum_groups (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_maximum_groups is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_maximum_groups() directly.

    YANG Description: Limit the number of (S, G) and (*, G) PIM
entries accepted on the interface.
This feature depends on hardware implementation.
    """
    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="maximum-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """maximum_groups 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="maximum-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__maximum_groups = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_maximum_groups(self):
    self.__maximum_groups = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maximum-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_counters(self):
    """
    Getter method for counters, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/state/counters (container)

    YANG Description: PIM counters for each interface.
    """
    return self.__counters
      
  def _set_counters(self, v, load=False):
    """
    Setter method for counters, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/state/counters (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_counters is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_counters() directly.

    YANG Description: PIM counters for each interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_counters_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces_interface_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """counters must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces_interface_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__counters = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_counters(self):
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces_interface_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  enabled = __builtin__.property(_get_enabled)
  interface_id = __builtin__.property(_get_interface_id)
  mode = __builtin__.property(_get_mode)
  bsr_border = __builtin__.property(_get_bsr_border)
  border_router = __builtin__.property(_get_border_router)
  dr_priority = __builtin__.property(_get_dr_priority)
  join_prune_interval = __builtin__.property(_get_join_prune_interval)
  hello_interval = __builtin__.property(_get_hello_interval)
  dead_timer = __builtin__.property(_get_dead_timer)
  maximum_groups = __builtin__.property(_get_maximum_groups)
  counters = __builtin__.property(_get_counters)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('interface_id', interface_id), ('mode', mode), ('bsr_border', bsr_border), ('border_router', border_router), ('dr_priority', dr_priority), ('join_prune_interval', join_prune_interval), ('hello_interval', hello_interval), ('dead_timer', dead_timer), ('maximum_groups', maximum_groups), ('counters', counters), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces_interface_neighbors_neighbor_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/pim/interfaces/interface/neighbors/neighbor/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Details about a specific PIM neighbor.
  """
  __slots__ = ('_path_helper', '_extmethods', '__neighbor_address','__dr_address','__neighbor_established','__neighbor_expires','__mode',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__neighbor_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}'}), is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)
    self.__dr_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}'}), is_leaf=True, yang_name="dr-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)
    self.__neighbor_established = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="neighbor-established", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__neighbor_expires = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="neighbor-expires", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PIM_MODE_SPARSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}, 'oc-pim-types:PIM_MODE_SPARSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}, 'PIM_MODE_DENSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}, 'oc-pim-types:PIM_MODE_DENSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}},), is_leaf=True, yang_name="mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'pim', 'interfaces', 'interface', 'neighbors', 'neighbor', 'state']

  def _get_neighbor_address(self):
    """
    Getter method for neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/neighbors/neighbor/state/neighbor_address (inet:ipv4-address)

    YANG Description: IPv4 address of neighbor router.
    """
    return self.__neighbor_address
      
  def _set_neighbor_address(self, v, load=False):
    """
    Setter method for neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/neighbors/neighbor/state/neighbor_address (inet:ipv4-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor_address() directly.

    YANG Description: IPv4 address of neighbor router.
    """
    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}'}), is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor_address must be of a type compatible with inet:ipv4-address""",
          'defined-type': "inet:ipv4-address",
          '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}'}), is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)""",
        })

    self.__neighbor_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor_address(self):
    self.__neighbor_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}'}), is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)


  def _get_dr_address(self):
    """
    Getter method for dr_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/neighbors/neighbor/state/dr_address (inet:ipv4-address)

    YANG Description: IPv4 address of designated router.
    """
    return self.__dr_address
      
  def _set_dr_address(self, v, load=False):
    """
    Setter method for dr_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/neighbors/neighbor/state/dr_address (inet:ipv4-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dr_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dr_address() directly.

    YANG Description: IPv4 address of designated router.
    """
    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}'}), is_leaf=True, yang_name="dr-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dr_address must be of a type compatible with inet:ipv4-address""",
          'defined-type': "inet:ipv4-address",
          '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}'}), is_leaf=True, yang_name="dr-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)""",
        })

    self.__dr_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dr_address(self):
    self.__dr_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}'}), is_leaf=True, yang_name="dr-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)


  def _get_neighbor_established(self):
    """
    Getter method for neighbor_established, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/neighbors/neighbor/state/neighbor_established (oc-types:timeticks64)

    YANG Description: This timestamp indicates the time that the
PIM neighbor adjacency established. It is expressed
relative to the Unix Epoch (Jan 1, 1970 00:00:00 UTC).

The PIM session uptime can be computed by clients
as the difference between this value and the
current time in UTC.
    """
    return self.__neighbor_established
      
  def _set_neighbor_established(self, v, load=False):
    """
    Setter method for neighbor_established, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/neighbors/neighbor/state/neighbor_established (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor_established is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor_established() directly.

    YANG Description: This timestamp indicates the time that the
PIM neighbor adjacency established. It is expressed
relative to the Unix Epoch (Jan 1, 1970 00:00:00 UTC).

The PIM session uptime can be computed by clients
as the difference between this value and the
current time in UTC.
    """
    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="neighbor-established", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor_established must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="neighbor-established", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__neighbor_established = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor_established(self):
    self.__neighbor_established = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="neighbor-established", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_neighbor_expires(self):
    """
    Getter method for neighbor_expires, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/neighbors/neighbor/state/neighbor_expires (oc-types:timeticks64)

    YANG Description: This timestamp indicates the time that the
PIM neighbor adjacency will expire should hello
messages fail to arrive from the neighbor. The value
is expressed relative to the Unix Epoch (Jan 1, 1970
00:00:00 UTC).
    """
    return self.__neighbor_expires
      
  def _set_neighbor_expires(self, v, load=False):
    """
    Setter method for neighbor_expires, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/neighbors/neighbor/state/neighbor_expires (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor_expires is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor_expires() directly.

    YANG Description: This timestamp indicates the time that the
PIM neighbor adjacency will expire should hello
messages fail to arrive from the neighbor. The value
is expressed relative to the Unix Epoch (Jan 1, 1970
00:00:00 UTC).
    """
    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="neighbor-expires", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor_expires must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="neighbor-expires", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__neighbor_expires = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor_expires(self):
    self.__neighbor_expires = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="neighbor-expires", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_mode(self):
    """
    Getter method for mode, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/neighbors/neighbor/state/mode (identityref)

    YANG Description: PIM mode in use when delivering multicast traffic
via this neighbor.
    """
    return self.__mode
      
  def _set_mode(self, v, load=False):
    """
    Setter method for mode, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/neighbors/neighbor/state/mode (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mode() directly.

    YANG Description: PIM mode in use when delivering multicast traffic
via this neighbor.
    """
    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={'PIM_MODE_SPARSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}, 'oc-pim-types:PIM_MODE_SPARSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}, 'PIM_MODE_DENSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}, 'oc-pim-types:PIM_MODE_DENSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}},), is_leaf=True, yang_name="mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mode must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PIM_MODE_SPARSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}, 'oc-pim-types:PIM_MODE_SPARSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}, 'PIM_MODE_DENSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}, 'oc-pim-types:PIM_MODE_DENSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}},), is_leaf=True, yang_name="mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mode(self):
    self.__mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PIM_MODE_SPARSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}, 'oc-pim-types:PIM_MODE_SPARSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}, 'PIM_MODE_DENSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}, 'oc-pim-types:PIM_MODE_DENSE': {'@module': 'openconfig-pim-types', '@namespace': 'http://openconfig.net/yang/pim/types'}},), is_leaf=True, yang_name="mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  neighbor_address = __builtin__.property(_get_neighbor_address)
  dr_address = __builtin__.property(_get_dr_address)
  neighbor_established = __builtin__.property(_get_neighbor_established)
  neighbor_expires = __builtin__.property(_get_neighbor_expires)
  mode = __builtin__.property(_get_mode)


  _pyangbind_elements = OrderedDict([('neighbor_address', neighbor_address), ('dr_address', dr_address), ('neighbor_established', neighbor_established), ('neighbor_expires', neighbor_expires), ('mode', mode), ])


class yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces_interface_neighbors_neighbor(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/pim/interfaces/interface/neighbors/neighbor. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Details about a specific PIM neighbor.
  """
  __slots__ = ('_path_helper', '_extmethods', '__neighbor_address','__state',)

  _yang_name = 'neighbor'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__neighbor_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces_interface_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'pim', 'interfaces', 'interface', 'neighbors', 'neighbor']

  def _get_neighbor_address(self):
    """
    Getter method for neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/neighbors/neighbor/neighbor_address (leafref)

    YANG Description: IPv4 address of neighbor router.
    """
    return self.__neighbor_address
      
  def _set_neighbor_address(self, v, load=False):
    """
    Setter method for neighbor_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/neighbors/neighbor/neighbor_address (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor_address() directly.

    YANG Description: IPv4 address of neighbor router.
    """
    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="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor_address must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__neighbor_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor_address(self):
    self.__neighbor_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="neighbor-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/neighbors/neighbor/state (container)

    YANG Description: Details about a specific PIM neighbor.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/neighbors/neighbor/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: Details about a specific PIM neighbor.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces_interface_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces_interface_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces_interface_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  neighbor_address = __builtin__.property(_get_neighbor_address)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('neighbor_address', neighbor_address), ('state', state), ])


class yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces_interface_neighbors(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/pim/interfaces/interface/neighbors. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Details about PIM neighbors.
  """
  __slots__ = ('_path_helper', '_extmethods', '__neighbor',)

  _yang_name = 'neighbors'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__neighbor = YANGDynClass(base=YANGListType("neighbor_address",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces_interface_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='neighbor-address', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'pim', 'interfaces', 'interface', 'neighbors']

  def _get_neighbor(self):
    """
    Getter method for neighbor, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/neighbors/neighbor (list)

    YANG Description: Details about a specific PIM neighbor.
    """
    return self.__neighbor
      
  def _set_neighbor(self, v, load=False):
    """
    Setter method for neighbor, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/neighbors/neighbor (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor() directly.

    YANG Description: Details about a specific PIM neighbor.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("neighbor_address",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces_interface_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='neighbor-address', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("neighbor_address",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces_interface_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='neighbor-address', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__neighbor = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor(self):
    self.__neighbor = YANGDynClass(base=YANGListType("neighbor_address",yc_neighbor_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces_interface_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='neighbor-address', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  neighbor = __builtin__.property(_get_neighbor)


  _pyangbind_elements = OrderedDict([('neighbor', neighbor), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces_interface_interface_ref_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/pim/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'pim', 'interfaces', 'interface', 'interface-ref', 'config']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/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 /network_instances/network_instance/protocols/protocol/pim/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/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 /network_instances/network_instance/protocols/protocol/pim/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces_interface_interface_ref_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/pim/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'pim', 'interfaces', 'interface', 'interface-ref', 'state']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/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 /network_instances/network_instance/protocols/protocol/pim/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/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 /network_instances/network_instance/protocols/protocol/pim/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces_interface_interface_ref(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/pim/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
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'interface-ref'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'pim', 'interfaces', 'interface', 'interface-ref']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/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 /network_instances/network_instance/protocols/protocol/pim/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_network_instance__network_instances_network_instance_protocols_protocol_pim_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pim_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pim_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/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 /network_instances/network_instance/protocols/protocol/pim/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_network_instance__network_instances_network_instance_protocols_protocol_pim_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pim_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pim_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces_interface_enable_bfd_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/pim/interfaces/interface/enable-bfd/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to enabling BFD.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'pim', 'interfaces', 'interface', 'enable-bfd', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/enable_bfd/config/enabled (boolean)

    YANG Description: When this leaf is set to true, BFD is used to detect the
liveliness of the remote peer or next-hop.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/enable_bfd/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When this leaf is set to true, BFD is used to detect the
liveliness of the remote peer or next-hop.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces_interface_enable_bfd_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/pim/interfaces/interface/enable-bfd/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 enabing BFD.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'pim', 'interfaces', 'interface', 'enable-bfd', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/enable_bfd/state/enabled (boolean)

    YANG Description: When this leaf is set to true, BFD is used to detect the
liveliness of the remote peer or next-hop.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/enable_bfd/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When this leaf is set to true, BFD is used to detect the
liveliness of the remote peer or next-hop.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  enabled = __builtin__.property(_get_enabled)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ])


class yc_enable_bfd_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces_interface_enable_bfd(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/pim/interfaces/interface/enable-bfd. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enable BFD for liveliness detection to the next-hop or
neighbour.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'enable-bfd'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces_interface_enable_bfd_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces_interface_enable_bfd_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'pim', 'interfaces', 'interface', 'enable-bfd']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/enable_bfd/config (container)

    YANG Description: Configuration parameters relating to enabling BFD.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/enable_bfd/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 enabling BFD.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces_interface_enable_bfd_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces_interface_enable_bfd_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces_interface_enable_bfd_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/enable_bfd/state (container)

    YANG Description: Operational state parameters relating to enabing BFD.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/enable_bfd/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 enabing BFD.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces_interface_enable_bfd_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces_interface_enable_bfd_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces_interface_enable_bfd_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_interface_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces_interface(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/pim/interfaces/interface. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines interface PIM configuration and
state information.
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id','__config','__state','__neighbors','__interface_ref','__enable_bfd',)

  _yang_name = 'interface'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__neighbors = YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces_interface_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__interface_ref = YANGDynClass(base=yc_interface_ref_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__enable_bfd = YANGDynClass(base=yc_enable_bfd_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces_interface_enable_bfd, is_container='container', yang_name="enable-bfd", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'pim', 'interfaces', 'interface']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/interface_id (leafref)

    YANG Description: Reference to an interface on which PIM is enabled.
    """
    return self.__interface_id
      
  def _set_interface_id(self, v, load=False):
    """
    Setter method for interface_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/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 an interface on which PIM is enabled.
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/config (container)

    YANG Description: PIM interface configuration.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/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: PIM interface configuration.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pim_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pim_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/state (container)

    YANG Description: State information for PIM interfaces.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/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: State information for PIM interfaces.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pim_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pim_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_neighbors(self):
    """
    Getter method for neighbors, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/neighbors (container)

    YANG Description: Details about PIM neighbors.
    """
    return self.__neighbors
      
  def _set_neighbors(self, v, load=False):
    """
    Setter method for neighbors, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/neighbors (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbors is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbors() directly.

    YANG Description: Details about PIM neighbors.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces_interface_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbors must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces_interface_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__neighbors = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbors(self):
    self.__neighbors = YANGDynClass(base=yc_neighbors_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces_interface_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_interface_ref(self):
    """
    Getter method for interface_ref, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/interface_ref (container)

    YANG Description: Reference to an interface or subinterface
    """
    return self.__interface_ref
      
  def _set_interface_ref(self, v, load=False):
    """
    Setter method for interface_ref, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/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
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interface_ref_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pim_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pim_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_enable_bfd(self):
    """
    Getter method for enable_bfd, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/enable_bfd (container)

    YANG Description: Enable BFD for liveliness detection to the next-hop or
neighbour.
    """
    return self.__enable_bfd
      
  def _set_enable_bfd(self, v, load=False):
    """
    Setter method for enable_bfd, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface/enable_bfd (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable_bfd is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable_bfd() directly.

    YANG Description: Enable BFD for liveliness detection to the next-hop or
neighbour.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_enable_bfd_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces_interface_enable_bfd, is_container='container', yang_name="enable-bfd", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable_bfd must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_enable_bfd_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces_interface_enable_bfd, is_container='container', yang_name="enable-bfd", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__enable_bfd = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable_bfd(self):
    self.__enable_bfd = YANGDynClass(base=yc_enable_bfd_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces_interface_enable_bfd, is_container='container', yang_name="enable-bfd", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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)
  neighbors = __builtin__.property(_get_neighbors, _set_neighbors)
  interface_ref = __builtin__.property(_get_interface_ref, _set_interface_ref)
  enable_bfd = __builtin__.property(_get_enable_bfd, _set_enable_bfd)


  _pyangbind_elements = OrderedDict([('interface_id', interface_id), ('config', config), ('state', state), ('neighbors', neighbors), ('interface_ref', interface_ref), ('enable_bfd', enable_bfd), ])


class yc_interfaces_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_interfaces(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/pim/interfaces. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration and state data for PIM on each interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface',)

  _yang_name = 'interfaces'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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_network_instance__network_instances_network_instance_protocols_protocol_pim_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'pim', 'interfaces']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces/interface (list)

    YANG Description: This container defines interface PIM configuration and
state information.
    """
    return self.__interface
      
  def _set_interface(self, v, load=False):
    """
    Setter method for interface, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/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: This container defines interface PIM configuration and
state information.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("interface_id",yc_interface_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pim_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pim_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/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  interface = __builtin__.property(_get_interface, _set_interface)


  _pyangbind_elements = OrderedDict([('interface', interface), ])


class yc_pim_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/pim. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level PIM configuration and operational state.
  """
  __slots__ = ('_path_helper', '_extmethods', '__global_','__interfaces',)

  _yang_name = 'pim'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__global_ = YANGDynClass(base=yc_global__openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__interfaces = YANGDynClass(base=yc_interfaces_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'pim']

  def _get_global_(self):
    """
    Getter method for global_, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global (container)

    YANG Description: This container defines global PIM configuration and state
information.
    """
    return self.__global_
      
  def _set_global_(self, v, load=False):
    """
    Setter method for global_, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/global (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_global_ is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_global_() directly.

    YANG Description: This container defines global PIM configuration and state
information.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_global__openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """global_ must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_global__openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__global_ = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_global_(self):
    self.__global_ = YANGDynClass(base=yc_global__openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_interfaces(self):
    """
    Getter method for interfaces, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/interfaces (container)

    YANG Description: Configuration and state data for PIM on each interface.
    """
    return self.__interfaces
      
  def _set_interfaces(self, v, load=False):
    """
    Setter method for interfaces, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim/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: Configuration and state data for PIM on each interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interfaces_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pim_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pim_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  global_ = __builtin__.property(_get_global_, _set_global_)
  interfaces = __builtin__.property(_get_interfaces, _set_interfaces)


  _pyangbind_elements = OrderedDict([('global_', global_), ('interfaces', interfaces), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_global_ssm_mappings_mapping_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/igmp/global/ssm/mappings/mapping/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration for SSM maps.
  """
  __slots__ = ('_path_helper', '_extmethods', '__source','__ssm_ranges',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__source = 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}'}), is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=True)
    self.__ssm_ranges = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ssm-ranges", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'igmp', 'global', 'ssm', 'mappings', 'mapping', 'config']

  def _get_source(self):
    """
    Getter method for source, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/global/ssm/mappings/mapping/config/source (inet:ipv4-address)

    YANG Description: Multicast source address.
    """
    return self.__source
      
  def _set_source(self, v, load=False):
    """
    Setter method for source, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/global/ssm/mappings/mapping/config/source (inet:ipv4-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source() directly.

    YANG Description: Multicast source address.
    """
    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}'}), is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source must be of a type compatible with inet:ipv4-address""",
          'defined-type': "inet:ipv4-address",
          '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}'}), is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=True)""",
        })

    self.__source = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source(self):
    self.__source = 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}'}), is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=True)


  def _get_ssm_ranges(self):
    """
    Getter method for ssm_ranges, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/global/ssm/mappings/mapping/config/ssm_ranges (leafref)

    YANG Description: List of accepted source specific multicast (SSM) address
ranges.
    """
    return self.__ssm_ranges
      
  def _set_ssm_ranges(self, v, load=False):
    """
    Setter method for ssm_ranges, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/global/ssm/mappings/mapping/config/ssm_ranges (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ssm_ranges is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ssm_ranges() directly.

    YANG Description: List of accepted source specific multicast (SSM) address
ranges.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="ssm-ranges", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ssm_ranges must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ssm-ranges", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__ssm_ranges = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ssm_ranges(self):
    self.__ssm_ranges = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ssm-ranges", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)

  source = __builtin__.property(_get_source, _set_source)
  ssm_ranges = __builtin__.property(_get_ssm_ranges, _set_ssm_ranges)


  _pyangbind_elements = OrderedDict([('source', source), ('ssm_ranges', ssm_ranges), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_global_ssm_mappings_mapping_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/igmp/global/ssm/mappings/mapping/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State for SSM maps.
  """
  __slots__ = ('_path_helper', '_extmethods', '__source','__ssm_ranges',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__source = 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}'}), is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)
    self.__ssm_ranges = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ssm-ranges", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'igmp', 'global', 'ssm', 'mappings', 'mapping', 'state']

  def _get_source(self):
    """
    Getter method for source, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/global/ssm/mappings/mapping/state/source (inet:ipv4-address)

    YANG Description: Multicast source address.
    """
    return self.__source
      
  def _set_source(self, v, load=False):
    """
    Setter method for source, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/global/ssm/mappings/mapping/state/source (inet:ipv4-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source() directly.

    YANG Description: Multicast source address.
    """
    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}'}), is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source must be of a type compatible with inet:ipv4-address""",
          'defined-type': "inet:ipv4-address",
          '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}'}), is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)""",
        })

    self.__source = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source(self):
    self.__source = 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}'}), is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)


  def _get_ssm_ranges(self):
    """
    Getter method for ssm_ranges, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/global/ssm/mappings/mapping/state/ssm_ranges (leafref)

    YANG Description: List of accepted source specific multicast (SSM) address
ranges.
    """
    return self.__ssm_ranges
      
  def _set_ssm_ranges(self, v, load=False):
    """
    Setter method for ssm_ranges, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/global/ssm/mappings/mapping/state/ssm_ranges (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ssm_ranges is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ssm_ranges() directly.

    YANG Description: List of accepted source specific multicast (SSM) address
ranges.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="ssm-ranges", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ssm_ranges must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ssm-ranges", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__ssm_ranges = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ssm_ranges(self):
    self.__ssm_ranges = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ssm-ranges", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)

  source = __builtin__.property(_get_source)
  ssm_ranges = __builtin__.property(_get_ssm_ranges)


  _pyangbind_elements = OrderedDict([('source', source), ('ssm_ranges', ssm_ranges), ])


class yc_mapping_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_global_ssm_mappings_mapping(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/igmp/global/ssm/mappings/mapping. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A Source Specific Multicast (SSM) mapping. This allows
IGMP v2 hosts to be able to join in SSM environments
by translating IGMP v2 reports into IGMP v3 reports.
The request in an IGMP v2 join is sent toward the source
address found by matching the multicast address.
  """
  __slots__ = ('_path_helper', '_extmethods', '__source','__config','__state',)

  _yang_name = 'mapping'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__source = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_global_ssm_mappings_mapping_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_global_ssm_mappings_mapping_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'igmp', 'global', 'ssm', 'mappings', 'mapping']

  def _get_source(self):
    """
    Getter method for source, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/global/ssm/mappings/mapping/source (leafref)

    YANG Description: Multicast source address.
    """
    return self.__source
      
  def _set_source(self, v, load=False):
    """
    Setter method for source, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/global/ssm/mappings/mapping/source (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source() directly.

    YANG Description: Multicast source address.
    """
    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="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__source = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source(self):
    self.__source = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/global/ssm/mappings/mapping/config (container)

    YANG Description: Configuration for SSM maps.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/global/ssm/mappings/mapping/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 for SSM maps.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_global_ssm_mappings_mapping_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_igmp_global_ssm_mappings_mapping_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_igmp_global_ssm_mappings_mapping_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/global/ssm/mappings/mapping/state (container)

    YANG Description: State for SSM maps.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/global/ssm/mappings/mapping/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 for SSM maps.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_global_ssm_mappings_mapping_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_igmp_global_ssm_mappings_mapping_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_igmp_global_ssm_mappings_mapping_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  source = __builtin__.property(_get_source, _set_source)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('source', source), ('config', config), ('state', state), ])


class yc_mappings_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_global_ssm_mappings(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/igmp/global/ssm/mappings. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A list of source specific multicast (SSM) mappings.
  """
  __slots__ = ('_path_helper', '_extmethods', '__mapping',)

  _yang_name = 'mappings'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__mapping = YANGDynClass(base=YANGListType("source",yc_mapping_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_global_ssm_mappings_mapping, yang_name="mapping", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='source', extensions=None), is_container='list', yang_name="mapping", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'igmp', 'global', 'ssm', 'mappings']

  def _get_mapping(self):
    """
    Getter method for mapping, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/global/ssm/mappings/mapping (list)

    YANG Description: A Source Specific Multicast (SSM) mapping. This allows
IGMP v2 hosts to be able to join in SSM environments
by translating IGMP v2 reports into IGMP v3 reports.
The request in an IGMP v2 join is sent toward the source
address found by matching the multicast address.
    """
    return self.__mapping
      
  def _set_mapping(self, v, load=False):
    """
    Setter method for mapping, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/global/ssm/mappings/mapping (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mapping is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mapping() directly.

    YANG Description: A Source Specific Multicast (SSM) mapping. This allows
IGMP v2 hosts to be able to join in SSM environments
by translating IGMP v2 reports into IGMP v3 reports.
The request in an IGMP v2 join is sent toward the source
address found by matching the multicast address.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("source",yc_mapping_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_global_ssm_mappings_mapping, yang_name="mapping", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='source', extensions=None), is_container='list', yang_name="mapping", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mapping must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("source",yc_mapping_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_global_ssm_mappings_mapping, yang_name="mapping", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='source', extensions=None), is_container='list', yang_name="mapping", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__mapping = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mapping(self):
    self.__mapping = YANGDynClass(base=YANGListType("source",yc_mapping_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_global_ssm_mappings_mapping, yang_name="mapping", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='source', extensions=None), is_container='list', yang_name="mapping", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  mapping = __builtin__.property(_get_mapping, _set_mapping)


  _pyangbind_elements = OrderedDict([('mapping', mapping), ])


class yc_ssm_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_global_ssm(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/igmp/global/ssm. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Source specific multicast (SSM).
  """
  __slots__ = ('_path_helper', '_extmethods', '__mappings',)

  _yang_name = 'ssm'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__mappings = YANGDynClass(base=yc_mappings_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_global_ssm_mappings, is_container='container', yang_name="mappings", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'igmp', 'global', 'ssm']

  def _get_mappings(self):
    """
    Getter method for mappings, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/global/ssm/mappings (container)

    YANG Description: A list of source specific multicast (SSM) mappings.
    """
    return self.__mappings
      
  def _set_mappings(self, v, load=False):
    """
    Setter method for mappings, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/global/ssm/mappings (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mappings is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mappings() directly.

    YANG Description: A list of source specific multicast (SSM) mappings.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_mappings_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_global_ssm_mappings, is_container='container', yang_name="mappings", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mappings must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_mappings_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_global_ssm_mappings, is_container='container', yang_name="mappings", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__mappings = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mappings(self):
    self.__mappings = YANGDynClass(base=yc_mappings_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_global_ssm_mappings, is_container='container', yang_name="mappings", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  mappings = __builtin__.property(_get_mappings, _set_mappings)


  _pyangbind_elements = OrderedDict([('mappings', mappings), ])


class yc_global__openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_global(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/igmp/global. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Global IGMP configuration and operational state.
  """
  __slots__ = ('_path_helper', '_extmethods', '__ssm',)

  _yang_name = 'global'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__ssm = YANGDynClass(base=yc_ssm_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_global_ssm, is_container='container', yang_name="ssm", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'igmp', 'global']

  def _get_ssm(self):
    """
    Getter method for ssm, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/global/ssm (container)

    YANG Description: Source specific multicast (SSM).
    """
    return self.__ssm
      
  def _set_ssm(self, v, load=False):
    """
    Setter method for ssm, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/global/ssm (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ssm is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ssm() directly.

    YANG Description: Source specific multicast (SSM).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ssm_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_global_ssm, is_container='container', yang_name="ssm", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ssm must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ssm_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_global_ssm, is_container='container', yang_name="ssm", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__ssm = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ssm(self):
    self.__ssm = YANGDynClass(base=yc_ssm_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_global_ssm, is_container='container', yang_name="ssm", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  ssm = __builtin__.property(_get_ssm, _set_ssm)


  _pyangbind_elements = OrderedDict([('ssm', ssm), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/igmp/interfaces/interface/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: IGMP interface configuration.
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id','__enabled','__version','__query_interval','__filter_prefixes',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=True)
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__version = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..3']}), is_leaf=True, yang_name="version", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-igmp-types:igmp-version', is_config=True)
    self.__query_interval = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..1024']}), is_leaf=True, yang_name="query-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-igmp-types:igmp-interval-type', is_config=True)
    self.__filter_prefixes = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="filter-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'igmp', 'interfaces', 'interface', 'config']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/config/interface_id (oc-if:interface-id)

    YANG Description: Reference to an interface on which IGMP is enabled.
    """
    return self.__interface_id
      
  def _set_interface_id(self, v, load=False):
    """
    Setter method for interface_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/config/interface_id (oc-if:interface-id)
    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 an interface on which IGMP is enabled.
    """
    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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_id must be of a type compatible with oc-if:interface-id""",
          'defined-type': "oc-if:interface-id",
          '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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=True)


  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/config/enabled (boolean)

    YANG Description: When set to true, the functionality within which this
leaf is defined is enabled, when set to false it is
explicitly disabled.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When set to true, the functionality within which this
leaf is defined is enabled, when set to false it is
explicitly disabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_version(self):
    """
    Getter method for version, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/config/version (oc-igmp-types:igmp-version)

    YANG Description: IGMP Version.
    """
    return self.__version
      
  def _set_version(self, v, load=False):
    """
    Setter method for version, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/config/version (oc-igmp-types:igmp-version)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_version is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_version() directly.

    YANG Description: IGMP Version.
    """
    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': ['1..3']}), is_leaf=True, yang_name="version", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-igmp-types:igmp-version', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """version must be of a type compatible with oc-igmp-types:igmp-version""",
          'defined-type': "oc-igmp-types:igmp-version",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..3']}), is_leaf=True, yang_name="version", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-igmp-types:igmp-version', is_config=True)""",
        })

    self.__version = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_version(self):
    self.__version = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..3']}), is_leaf=True, yang_name="version", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-igmp-types:igmp-version', is_config=True)


  def _get_query_interval(self):
    """
    Getter method for query_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/config/query_interval (oc-igmp-types:igmp-interval-type)

    YANG Description: Interval at which the router sends the IGMP membership
queries.
    """
    return self.__query_interval
      
  def _set_query_interval(self, v, load=False):
    """
    Setter method for query_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/config/query_interval (oc-igmp-types:igmp-interval-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_query_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_query_interval() directly.

    YANG Description: Interval at which the router sends the IGMP membership
queries.
    """
    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': ['1..1024']}), is_leaf=True, yang_name="query-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-igmp-types:igmp-interval-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """query_interval must be of a type compatible with oc-igmp-types:igmp-interval-type""",
          'defined-type': "oc-igmp-types:igmp-interval-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..1024']}), is_leaf=True, yang_name="query-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-igmp-types:igmp-interval-type', is_config=True)""",
        })

    self.__query_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_query_interval(self):
    self.__query_interval = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..1024']}), is_leaf=True, yang_name="query-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-igmp-types:igmp-interval-type', is_config=True)


  def _get_filter_prefixes(self):
    """
    Getter method for filter_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/config/filter_prefixes (string)

    YANG Description: List used to filter joins.
    """
    return self.__filter_prefixes
      
  def _set_filter_prefixes(self, v, load=False):
    """
    Setter method for filter_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/config/filter_prefixes (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_filter_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_filter_prefixes() directly.

    YANG Description: List used to filter joins.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="filter-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """filter_prefixes must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="filter-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)""",
        })

    self.__filter_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_filter_prefixes(self):
    self.__filter_prefixes = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="filter-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)

  interface_id = __builtin__.property(_get_interface_id, _set_interface_id)
  enabled = __builtin__.property(_get_enabled, _set_enabled)
  version = __builtin__.property(_get_version, _set_version)
  query_interval = __builtin__.property(_get_query_interval, _set_query_interval)
  filter_prefixes = __builtin__.property(_get_filter_prefixes, _set_filter_prefixes)


  _pyangbind_elements = OrderedDict([('interface_id', interface_id), ('enabled', enabled), ('version', version), ('query_interval', query_interval), ('filter_prefixes', filter_prefixes), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/igmp/interfaces/interface/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines state information for IGMP
interfaces.
  """
  __slots__ = ('_path_helper', '_extmethods', '__query_expires','__interface_id','__enabled','__version','__query_interval','__filter_prefixes',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__query_expires = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="query-expires", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=False)
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__version = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..3']}), is_leaf=True, yang_name="version", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-igmp-types:igmp-version', is_config=False)
    self.__query_interval = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..1024']}), is_leaf=True, yang_name="query-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-igmp-types:igmp-interval-type', is_config=False)
    self.__filter_prefixes = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="filter-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'igmp', 'interfaces', 'interface', 'state']

  def _get_query_expires(self):
    """
    Getter method for query_expires, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/state/query_expires (oc-types:timeticks64)

    YANG Description: This timestamp indicates the time that the next query is sent
expressed relative to the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    return self.__query_expires
      
  def _set_query_expires(self, v, load=False):
    """
    Setter method for query_expires, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/state/query_expires (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_query_expires is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_query_expires() directly.

    YANG Description: This timestamp indicates the time that the next query is sent
expressed relative to the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    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="query-expires", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """query_expires must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="query-expires", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__query_expires = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_query_expires(self):
    self.__query_expires = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="query-expires", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/state/interface_id (oc-if:interface-id)

    YANG Description: Reference to an interface on which IGMP is enabled.
    """
    return self.__interface_id
      
  def _set_interface_id(self, v, load=False):
    """
    Setter method for interface_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/state/interface_id (oc-if:interface-id)
    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 an interface on which IGMP is enabled.
    """
    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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_id must be of a type compatible with oc-if:interface-id""",
          'defined-type': "oc-if:interface-id",
          '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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=False)


  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/state/enabled (boolean)

    YANG Description: When set to true, the functionality within which this
leaf is defined is enabled, when set to false it is
explicitly disabled.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When set to true, the functionality within which this
leaf is defined is enabled, when set to false it is
explicitly disabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_version(self):
    """
    Getter method for version, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/state/version (oc-igmp-types:igmp-version)

    YANG Description: IGMP Version.
    """
    return self.__version
      
  def _set_version(self, v, load=False):
    """
    Setter method for version, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/state/version (oc-igmp-types:igmp-version)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_version is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_version() directly.

    YANG Description: IGMP Version.
    """
    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': ['1..3']}), is_leaf=True, yang_name="version", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-igmp-types:igmp-version', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """version must be of a type compatible with oc-igmp-types:igmp-version""",
          'defined-type': "oc-igmp-types:igmp-version",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..3']}), is_leaf=True, yang_name="version", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-igmp-types:igmp-version', is_config=False)""",
        })

    self.__version = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_version(self):
    self.__version = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..3']}), is_leaf=True, yang_name="version", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-igmp-types:igmp-version', is_config=False)


  def _get_query_interval(self):
    """
    Getter method for query_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/state/query_interval (oc-igmp-types:igmp-interval-type)

    YANG Description: Interval at which the router sends the IGMP membership
queries.
    """
    return self.__query_interval
      
  def _set_query_interval(self, v, load=False):
    """
    Setter method for query_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/state/query_interval (oc-igmp-types:igmp-interval-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_query_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_query_interval() directly.

    YANG Description: Interval at which the router sends the IGMP membership
queries.
    """
    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': ['1..1024']}), is_leaf=True, yang_name="query-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-igmp-types:igmp-interval-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """query_interval must be of a type compatible with oc-igmp-types:igmp-interval-type""",
          'defined-type': "oc-igmp-types:igmp-interval-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..1024']}), is_leaf=True, yang_name="query-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-igmp-types:igmp-interval-type', is_config=False)""",
        })

    self.__query_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_query_interval(self):
    self.__query_interval = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..1024']}), is_leaf=True, yang_name="query-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-igmp-types:igmp-interval-type', is_config=False)


  def _get_filter_prefixes(self):
    """
    Getter method for filter_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/state/filter_prefixes (string)

    YANG Description: List used to filter joins.
    """
    return self.__filter_prefixes
      
  def _set_filter_prefixes(self, v, load=False):
    """
    Setter method for filter_prefixes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/state/filter_prefixes (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_filter_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_filter_prefixes() directly.

    YANG Description: List used to filter joins.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="filter-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """filter_prefixes must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="filter-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__filter_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_filter_prefixes(self):
    self.__filter_prefixes = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="filter-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)

  query_expires = __builtin__.property(_get_query_expires)
  interface_id = __builtin__.property(_get_interface_id)
  enabled = __builtin__.property(_get_enabled)
  version = __builtin__.property(_get_version)
  query_interval = __builtin__.property(_get_query_interval)
  filter_prefixes = __builtin__.property(_get_filter_prefixes)


  _pyangbind_elements = OrderedDict([('query_expires', query_expires), ('interface_id', interface_id), ('enabled', enabled), ('version', version), ('query_interval', query_interval), ('filter_prefixes', filter_prefixes), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_counters_queries_sent_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/igmp/interfaces/interface/counters/queries/sent/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Counters for each IGMP protocol version.
  """
  __slots__ = ('_path_helper', '_extmethods', '__v1','__v2','__v3',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__v1 = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="v1", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__v2 = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="v2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__v3 = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="v3", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'igmp', 'interfaces', 'interface', 'counters', 'queries', 'sent', 'state']

  def _get_v1(self):
    """
    Getter method for v1, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/counters/queries/sent/state/v1 (uint32)

    YANG Description: IGMP v1.
    """
    return self.__v1
      
  def _set_v1(self, v, load=False):
    """
    Setter method for v1, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/counters/queries/sent/state/v1 (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_v1 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_v1() directly.

    YANG Description: IGMP v1.
    """
    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="v1", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """v1 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="v1", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__v1 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_v1(self):
    self.__v1 = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="v1", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_v2(self):
    """
    Getter method for v2, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/counters/queries/sent/state/v2 (uint32)

    YANG Description: IGMP v2.
    """
    return self.__v2
      
  def _set_v2(self, v, load=False):
    """
    Setter method for v2, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/counters/queries/sent/state/v2 (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_v2 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_v2() directly.

    YANG Description: IGMP v2.
    """
    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="v2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """v2 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="v2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__v2 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_v2(self):
    self.__v2 = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="v2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_v3(self):
    """
    Getter method for v3, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/counters/queries/sent/state/v3 (uint32)

    YANG Description: IGMP v3.
    """
    return self.__v3
      
  def _set_v3(self, v, load=False):
    """
    Setter method for v3, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/counters/queries/sent/state/v3 (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_v3 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_v3() directly.

    YANG Description: IGMP v3.
    """
    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="v3", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """v3 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="v3", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__v3 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_v3(self):
    self.__v3 = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="v3", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  v1 = __builtin__.property(_get_v1)
  v2 = __builtin__.property(_get_v2)
  v3 = __builtin__.property(_get_v3)


  _pyangbind_elements = OrderedDict([('v1', v1), ('v2', v2), ('v3', v3), ])


class yc_sent_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_counters_queries_sent(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/igmp/interfaces/interface/counters/queries/sent. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Number of IGMP membership queries sent.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'sent'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_counters_queries_sent_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'igmp', 'interfaces', 'interface', 'counters', 'queries', 'sent']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/counters/queries/sent/state (container)

    YANG Description: Counters for each IGMP protocol version.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/counters/queries/sent/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: Counters for each IGMP protocol version.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_counters_queries_sent_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_counters_queries_sent_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_counters_queries_sent_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_counters_queries_received_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/igmp/interfaces/interface/counters/queries/received/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Counters for each IGMP protocol version.
  """
  __slots__ = ('_path_helper', '_extmethods', '__v1','__v2','__v3',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__v1 = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="v1", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__v2 = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="v2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__v3 = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="v3", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'igmp', 'interfaces', 'interface', 'counters', 'queries', 'received', 'state']

  def _get_v1(self):
    """
    Getter method for v1, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/counters/queries/received/state/v1 (uint32)

    YANG Description: IGMP v1.
    """
    return self.__v1
      
  def _set_v1(self, v, load=False):
    """
    Setter method for v1, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/counters/queries/received/state/v1 (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_v1 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_v1() directly.

    YANG Description: IGMP v1.
    """
    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="v1", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """v1 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="v1", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__v1 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_v1(self):
    self.__v1 = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="v1", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_v2(self):
    """
    Getter method for v2, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/counters/queries/received/state/v2 (uint32)

    YANG Description: IGMP v2.
    """
    return self.__v2
      
  def _set_v2(self, v, load=False):
    """
    Setter method for v2, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/counters/queries/received/state/v2 (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_v2 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_v2() directly.

    YANG Description: IGMP v2.
    """
    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="v2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """v2 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="v2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__v2 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_v2(self):
    self.__v2 = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="v2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_v3(self):
    """
    Getter method for v3, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/counters/queries/received/state/v3 (uint32)

    YANG Description: IGMP v3.
    """
    return self.__v3
      
  def _set_v3(self, v, load=False):
    """
    Setter method for v3, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/counters/queries/received/state/v3 (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_v3 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_v3() directly.

    YANG Description: IGMP v3.
    """
    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="v3", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """v3 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="v3", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__v3 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_v3(self):
    self.__v3 = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="v3", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  v1 = __builtin__.property(_get_v1)
  v2 = __builtin__.property(_get_v2)
  v3 = __builtin__.property(_get_v3)


  _pyangbind_elements = OrderedDict([('v1', v1), ('v2', v2), ('v3', v3), ])


class yc_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_counters_queries_received(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/igmp/interfaces/interface/counters/queries/received. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Number of IGMP membership queries received.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'received'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_counters_queries_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'igmp', 'interfaces', 'interface', 'counters', 'queries', 'received']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/counters/queries/received/state (container)

    YANG Description: Counters for each IGMP protocol version.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/counters/queries/received/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: Counters for each IGMP protocol version.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_counters_queries_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_counters_queries_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_counters_queries_received_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_queries_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_counters_queries(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/igmp/interfaces/interface/counters/queries. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: IGMP membership queries.
  """
  __slots__ = ('_path_helper', '_extmethods', '__sent','__received',)

  _yang_name = 'queries'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__sent = YANGDynClass(base=yc_sent_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_counters_queries_sent, is_container='container', yang_name="sent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__received = YANGDynClass(base=yc_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_counters_queries_received, is_container='container', yang_name="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'igmp', 'interfaces', 'interface', 'counters', 'queries']

  def _get_sent(self):
    """
    Getter method for sent, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/counters/queries/sent (container)

    YANG Description: Number of IGMP membership queries sent.
    """
    return self.__sent
      
  def _set_sent(self, v, load=False):
    """
    Setter method for sent, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/counters/queries/sent (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sent() directly.

    YANG Description: Number of IGMP membership queries sent.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_sent_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_counters_queries_sent, is_container='container', yang_name="sent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sent must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_sent_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_counters_queries_sent, is_container='container', yang_name="sent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__sent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sent(self):
    self.__sent = YANGDynClass(base=yc_sent_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_counters_queries_sent, is_container='container', yang_name="sent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_received(self):
    """
    Getter method for received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/counters/queries/received (container)

    YANG Description: Number of IGMP membership queries received.
    """
    return self.__received
      
  def _set_received(self, v, load=False):
    """
    Setter method for received, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/counters/queries/received (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_received() directly.

    YANG Description: Number of IGMP membership queries received.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_counters_queries_received, is_container='container', yang_name="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """received must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_counters_queries_received, is_container='container', yang_name="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_received(self):
    self.__received = YANGDynClass(base=yc_received_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_counters_queries_received, is_container='container', yang_name="received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  sent = __builtin__.property(_get_sent, _set_sent)
  received = __builtin__.property(_get_received, _set_received)


  _pyangbind_elements = OrderedDict([('sent', sent), ('received', received), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_counters_reports_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/igmp/interfaces/interface/counters/reports/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Counters for each IGMP protocol version.
  """
  __slots__ = ('_path_helper', '_extmethods', '__v1','__v2','__v3',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__v1 = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="v1", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__v2 = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="v2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__v3 = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="v3", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'igmp', 'interfaces', 'interface', 'counters', 'reports', 'state']

  def _get_v1(self):
    """
    Getter method for v1, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/counters/reports/state/v1 (uint32)

    YANG Description: IGMP v1.
    """
    return self.__v1
      
  def _set_v1(self, v, load=False):
    """
    Setter method for v1, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/counters/reports/state/v1 (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_v1 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_v1() directly.

    YANG Description: IGMP v1.
    """
    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="v1", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """v1 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="v1", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__v1 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_v1(self):
    self.__v1 = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="v1", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_v2(self):
    """
    Getter method for v2, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/counters/reports/state/v2 (uint32)

    YANG Description: IGMP v2.
    """
    return self.__v2
      
  def _set_v2(self, v, load=False):
    """
    Setter method for v2, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/counters/reports/state/v2 (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_v2 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_v2() directly.

    YANG Description: IGMP v2.
    """
    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="v2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """v2 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="v2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__v2 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_v2(self):
    self.__v2 = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="v2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_v3(self):
    """
    Getter method for v3, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/counters/reports/state/v3 (uint32)

    YANG Description: IGMP v3.
    """
    return self.__v3
      
  def _set_v3(self, v, load=False):
    """
    Setter method for v3, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/counters/reports/state/v3 (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_v3 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_v3() directly.

    YANG Description: IGMP v3.
    """
    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="v3", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """v3 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="v3", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__v3 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_v3(self):
    self.__v3 = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="v3", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  v1 = __builtin__.property(_get_v1)
  v2 = __builtin__.property(_get_v2)
  v3 = __builtin__.property(_get_v3)


  _pyangbind_elements = OrderedDict([('v1', v1), ('v2', v2), ('v3', v3), ])


class yc_reports_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_counters_reports(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/igmp/interfaces/interface/counters/reports. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Number of IGMP membership reports received.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'reports'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_counters_reports_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'igmp', 'interfaces', 'interface', 'counters', 'reports']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/counters/reports/state (container)

    YANG Description: Counters for each IGMP protocol version.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/counters/reports/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: Counters for each IGMP protocol version.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_counters_reports_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_counters_reports_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_counters_reports_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_counters_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_counters(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/igmp/interfaces/interface/counters. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Counters avaiable on a per interface bases for IGMP.
  """
  __slots__ = ('_path_helper', '_extmethods', '__queries','__reports',)

  _yang_name = 'counters'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__queries = YANGDynClass(base=yc_queries_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_counters_queries, is_container='container', yang_name="queries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__reports = YANGDynClass(base=yc_reports_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_counters_reports, is_container='container', yang_name="reports", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'igmp', 'interfaces', 'interface', 'counters']

  def _get_queries(self):
    """
    Getter method for queries, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/counters/queries (container)

    YANG Description: IGMP membership queries.
    """
    return self.__queries
      
  def _set_queries(self, v, load=False):
    """
    Setter method for queries, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/counters/queries (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_queries is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_queries() directly.

    YANG Description: IGMP membership queries.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_queries_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_counters_queries, is_container='container', yang_name="queries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """queries must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_queries_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_counters_queries, is_container='container', yang_name="queries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__queries = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_queries(self):
    self.__queries = YANGDynClass(base=yc_queries_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_counters_queries, is_container='container', yang_name="queries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_reports(self):
    """
    Getter method for reports, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/counters/reports (container)

    YANG Description: Number of IGMP membership reports received.
    """
    return self.__reports
      
  def _set_reports(self, v, load=False):
    """
    Setter method for reports, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/counters/reports (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_reports is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_reports() directly.

    YANG Description: Number of IGMP membership reports received.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_reports_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_counters_reports, is_container='container', yang_name="reports", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """reports must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_reports_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_counters_reports, is_container='container', yang_name="reports", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__reports = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_reports(self):
    self.__reports = YANGDynClass(base=yc_reports_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_counters_reports, is_container='container', yang_name="reports", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  queries = __builtin__.property(_get_queries, _set_queries)
  reports = __builtin__.property(_get_reports, _set_reports)


  _pyangbind_elements = OrderedDict([('queries', queries), ('reports', reports), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_membership_groups_group_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/igmp/interfaces/interface/membership-groups/group/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Multicast group membership.
  """
  __slots__ = ('_path_helper', '_extmethods', '__group','__source','__reporter',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__group = 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}'}), is_leaf=True, yang_name="group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)
    self.__source = 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}'}), is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)
    self.__reporter = 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}'}), is_leaf=True, yang_name="reporter", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'igmp', 'interfaces', 'interface', 'membership-groups', 'group', 'state']

  def _get_group(self):
    """
    Getter method for group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/membership_groups/group/state/group (inet:ipv4-address)

    YANG Description: Multicast address.
    """
    return self.__group
      
  def _set_group(self, v, load=False):
    """
    Setter method for group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/membership_groups/group/state/group (inet:ipv4-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_group() directly.

    YANG Description: Multicast address.
    """
    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}'}), is_leaf=True, yang_name="group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """group must be of a type compatible with inet:ipv4-address""",
          'defined-type': "inet:ipv4-address",
          '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}'}), is_leaf=True, yang_name="group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)""",
        })

    self.__group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_group(self):
    self.__group = 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}'}), is_leaf=True, yang_name="group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)


  def _get_source(self):
    """
    Getter method for source, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/membership_groups/group/state/source (inet:ipv4-address)

    YANG Description: Source address of multicast.
    """
    return self.__source
      
  def _set_source(self, v, load=False):
    """
    Setter method for source, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/membership_groups/group/state/source (inet:ipv4-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source() directly.

    YANG Description: Source address of multicast.
    """
    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}'}), is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source must be of a type compatible with inet:ipv4-address""",
          'defined-type': "inet:ipv4-address",
          '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}'}), is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)""",
        })

    self.__source = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source(self):
    self.__source = 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}'}), is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)


  def _get_reporter(self):
    """
    Getter method for reporter, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/membership_groups/group/state/reporter (inet:ipv4-address)

    YANG Description: Address of the last reporter.
    """
    return self.__reporter
      
  def _set_reporter(self, v, load=False):
    """
    Setter method for reporter, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/membership_groups/group/state/reporter (inet:ipv4-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_reporter is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_reporter() directly.

    YANG Description: Address of the last reporter.
    """
    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}'}), is_leaf=True, yang_name="reporter", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """reporter must be of a type compatible with inet:ipv4-address""",
          'defined-type': "inet:ipv4-address",
          '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}'}), is_leaf=True, yang_name="reporter", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)""",
        })

    self.__reporter = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_reporter(self):
    self.__reporter = 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}'}), is_leaf=True, yang_name="reporter", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)

  group = __builtin__.property(_get_group)
  source = __builtin__.property(_get_source)
  reporter = __builtin__.property(_get_reporter)


  _pyangbind_elements = OrderedDict([('group', group), ('source', source), ('reporter', reporter), ])


class yc_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_membership_groups_group(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/igmp/interfaces/interface/membership-groups/group. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Multicast group membership.
  """
  __slots__ = ('_path_helper', '_extmethods', '__group','__state',)

  _yang_name = 'group'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_membership_groups_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'igmp', 'interfaces', 'interface', 'membership-groups', 'group']

  def _get_group(self):
    """
    Getter method for group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/membership_groups/group/group (leafref)

    YANG Description: Multicast address.
    """
    return self.__group
      
  def _set_group(self, v, load=False):
    """
    Setter method for group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/membership_groups/group/group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_group() directly.

    YANG Description: Multicast address.
    """
    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="group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_group(self):
    self.__group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/membership_groups/group/state (container)

    YANG Description: Multicast group membership.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/membership_groups/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: Multicast group membership.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_membership_groups_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_membership_groups_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_membership_groups_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  group = __builtin__.property(_get_group)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('group', group), ('state', state), ])


class yc_membership_groups_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_membership_groups(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/igmp/interfaces/interface/membership-groups. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of IGMP Membership information.
  """
  __slots__ = ('_path_helper', '_extmethods', '__group',)

  _yang_name = 'membership-groups'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__group = YANGDynClass(base=YANGListType("group",yc_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_membership_groups_group, yang_name="group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='group', extensions=None), is_container='list', yang_name="group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'igmp', 'interfaces', 'interface', 'membership-groups']

  def _get_group(self):
    """
    Getter method for group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/membership_groups/group (list)

    YANG Description: Multicast group membership.
    """
    return self.__group
      
  def _set_group(self, v, load=False):
    """
    Setter method for group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/membership_groups/group (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_group() directly.

    YANG Description: Multicast group membership.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("group",yc_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_membership_groups_group, yang_name="group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='group', extensions=None), is_container='list', yang_name="group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """group must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("group",yc_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_membership_groups_group, yang_name="group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='group', extensions=None), is_container='list', yang_name="group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_group(self):
    self.__group = YANGDynClass(base=YANGListType("group",yc_group_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_membership_groups_group, yang_name="group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='group', extensions=None), is_container='list', yang_name="group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  group = __builtin__.property(_get_group, _set_group)


  _pyangbind_elements = OrderedDict([('group', group), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_static_membership_groups_static_groups_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/igmp/interfaces/interface/static-membership-groups/static-groups/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Multicast group membership.
  """
  __slots__ = ('_path_helper', '_extmethods', '__static_group','__source',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__static_group = 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}'}), is_leaf=True, yang_name="static-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=True)
    self.__source = 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}'}), is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'protocols', 'protocol', 'igmp', 'interfaces', 'interface', 'static-membership-groups', 'static-groups', 'config']

  def _get_static_group(self):
    """
    Getter method for static_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/static_membership_groups/static_groups/config/static_group (inet:ipv4-address)

    YANG Description: Multicast address.
    """
    return self.__static_group
      
  def _set_static_group(self, v, load=False):
    """
    Setter method for static_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/static_membership_groups/static_groups/config/static_group (inet:ipv4-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_static_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_static_group() directly.

    YANG Description: Multicast address.
    """
    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}'}), is_leaf=True, yang_name="static-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """static_group must be of a type compatible with inet:ipv4-address""",
          'defined-type': "inet:ipv4-address",
          '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}'}), is_leaf=True, yang_name="static-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=True)""",
        })

    self.__static_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_static_group(self):
    self.__static_group = 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}'}), is_leaf=True, yang_name="static-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=True)


  def _get_source(self):
    """
    Getter method for source, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/static_membership_groups/static_groups/config/source (inet:ipv4-address)

    YANG Description: Source address of multicast.
    """
    return self.__source
      
  def _set_source(self, v, load=False):
    """
    Setter method for source, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/static_membership_groups/static_groups/config/source (inet:ipv4-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source() directly.

    YANG Description: Source address of multicast.
    """
    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}'}), is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source must be of a type compatible with inet:ipv4-address""",
          'defined-type': "inet:ipv4-address",
          '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}'}), is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=True)""",
        })

    self.__source = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source(self):
    self.__source = 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}'}), is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=True)

  static_group = __builtin__.property(_get_static_group, _set_static_group)
  source = __builtin__.property(_get_source, _set_source)


  _pyangbind_elements = OrderedDict([('static_group', static_group), ('source', source), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_static_membership_groups_static_groups_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/igmp/interfaces/interface/static-membership-groups/static-groups/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Multicast group membership.
  """
  __slots__ = ('_path_helper', '_extmethods', '__static_group','__source',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__static_group = 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}'}), is_leaf=True, yang_name="static-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)
    self.__source = 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}'}), is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'igmp', 'interfaces', 'interface', 'static-membership-groups', 'static-groups', 'state']

  def _get_static_group(self):
    """
    Getter method for static_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/static_membership_groups/static_groups/state/static_group (inet:ipv4-address)

    YANG Description: Multicast address.
    """
    return self.__static_group
      
  def _set_static_group(self, v, load=False):
    """
    Setter method for static_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/static_membership_groups/static_groups/state/static_group (inet:ipv4-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_static_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_static_group() directly.

    YANG Description: Multicast address.
    """
    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}'}), is_leaf=True, yang_name="static-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """static_group must be of a type compatible with inet:ipv4-address""",
          'defined-type': "inet:ipv4-address",
          '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}'}), is_leaf=True, yang_name="static-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)""",
        })

    self.__static_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_static_group(self):
    self.__static_group = 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}'}), is_leaf=True, yang_name="static-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)


  def _get_source(self):
    """
    Getter method for source, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/static_membership_groups/static_groups/state/source (inet:ipv4-address)

    YANG Description: Source address of multicast.
    """
    return self.__source
      
  def _set_source(self, v, load=False):
    """
    Setter method for source, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/static_membership_groups/static_groups/state/source (inet:ipv4-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source() directly.

    YANG Description: Source address of multicast.
    """
    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}'}), is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source must be of a type compatible with inet:ipv4-address""",
          'defined-type': "inet:ipv4-address",
          '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}'}), is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)""",
        })

    self.__source = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source(self):
    self.__source = 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}'}), is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv4-address', is_config=False)

  static_group = __builtin__.property(_get_static_group)
  source = __builtin__.property(_get_source)


  _pyangbind_elements = OrderedDict([('static_group', static_group), ('source', source), ])


class yc_static_groups_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_static_membership_groups_static_groups(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/igmp/interfaces/interface/static-membership-groups/static-groups. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Multicast group membership.
  """
  __slots__ = ('_path_helper', '_extmethods', '__static_group','__config','__state',)

  _yang_name = 'static-groups'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__static_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="static-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_static_membership_groups_static_groups_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_static_membership_groups_static_groups_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'igmp', 'interfaces', 'interface', 'static-membership-groups', 'static-groups']

  def _get_static_group(self):
    """
    Getter method for static_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/static_membership_groups/static_groups/static_group (leafref)

    YANG Description: Multicast address.
    """
    return self.__static_group
      
  def _set_static_group(self, v, load=False):
    """
    Setter method for static_group, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/static_membership_groups/static_groups/static_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_static_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_static_group() directly.

    YANG Description: Multicast address.
    """
    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="static-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """static_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="static-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__static_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_static_group(self):
    self.__static_group = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="static-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/static_membership_groups/static_groups/config (container)

    YANG Description: Multicast group membership.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/static_membership_groups/static_groups/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: Multicast group membership.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_static_membership_groups_static_groups_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_static_membership_groups_static_groups_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_static_membership_groups_static_groups_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/static_membership_groups/static_groups/state (container)

    YANG Description: Multicast group membership.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/static_membership_groups/static_groups/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: Multicast group membership.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_static_membership_groups_static_groups_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_static_membership_groups_static_groups_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_static_membership_groups_static_groups_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  static_group = __builtin__.property(_get_static_group, _set_static_group)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('static_group', static_group), ('config', config), ('state', state), ])


class yc_static_membership_groups_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_static_membership_groups(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/igmp/interfaces/interface/static-membership-groups. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of IGMP Membership information.
  """
  __slots__ = ('_path_helper', '_extmethods', '__static_groups',)

  _yang_name = 'static-membership-groups'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__static_groups = YANGDynClass(base=YANGListType("static_group",yc_static_groups_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_static_membership_groups_static_groups, yang_name="static-groups", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='static-group', extensions=None), is_container='list', yang_name="static-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'igmp', 'interfaces', 'interface', 'static-membership-groups']

  def _get_static_groups(self):
    """
    Getter method for static_groups, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/static_membership_groups/static_groups (list)

    YANG Description: Multicast group membership.
    """
    return self.__static_groups
      
  def _set_static_groups(self, v, load=False):
    """
    Setter method for static_groups, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/static_membership_groups/static_groups (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_static_groups is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_static_groups() directly.

    YANG Description: Multicast group membership.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("static_group",yc_static_groups_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_static_membership_groups_static_groups, yang_name="static-groups", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='static-group', extensions=None), is_container='list', yang_name="static-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """static_groups must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("static_group",yc_static_groups_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_static_membership_groups_static_groups, yang_name="static-groups", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='static-group', extensions=None), is_container='list', yang_name="static-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__static_groups = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_static_groups(self):
    self.__static_groups = YANGDynClass(base=YANGListType("static_group",yc_static_groups_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_static_membership_groups_static_groups, yang_name="static-groups", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='static-group', extensions=None), is_container='list', yang_name="static-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  static_groups = __builtin__.property(_get_static_groups, _set_static_groups)


  _pyangbind_elements = OrderedDict([('static_groups', static_groups), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_interface_ref_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/igmp/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'igmp', 'interfaces', 'interface', 'interface-ref', 'config']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/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 /network_instances/network_instance/protocols/protocol/igmp/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/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 /network_instances/network_instance/protocols/protocol/igmp/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_interface_ref_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/igmp/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'igmp', 'interfaces', 'interface', 'interface-ref', 'state']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/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 /network_instances/network_instance/protocols/protocol/igmp/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/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 /network_instances/network_instance/protocols/protocol/igmp/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_interface_ref(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/igmp/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
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'interface-ref'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'igmp', 'interfaces', 'interface', 'interface-ref']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/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 /network_instances/network_instance/protocols/protocol/igmp/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_network_instance__network_instances_network_instance_protocols_protocol_igmp_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_igmp_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_igmp_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/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 /network_instances/network_instance/protocols/protocol/igmp/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_network_instance__network_instances_network_instance_protocols_protocol_igmp_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_igmp_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_igmp_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/network-instance', defining_module='openconfig-network-instance', 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_interface_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/igmp/interfaces/interface. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines interface IGMP configuration and
state information.
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id','__config','__state','__counters','__membership_groups','__static_membership_groups','__interface_ref',)

  _yang_name = 'interface'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__membership_groups = YANGDynClass(base=yc_membership_groups_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_membership_groups, is_container='container', yang_name="membership-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__static_membership_groups = YANGDynClass(base=yc_static_membership_groups_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_static_membership_groups, is_container='container', yang_name="static-membership-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__interface_ref = YANGDynClass(base=yc_interface_ref_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'igmp', 'interfaces', 'interface']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/interface_id (leafref)

    YANG Description: Reference to an interface on which IGMP is enabled.
    """
    return self.__interface_id
      
  def _set_interface_id(self, v, load=False):
    """
    Setter method for interface_id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/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 an interface on which IGMP is enabled.
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/config (container)

    YANG Description: IGMP interface configuration.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/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: IGMP interface configuration.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_igmp_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_igmp_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/state (container)

    YANG Description: This container defines state information for IGMP
interfaces.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/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: This container defines state information for IGMP
interfaces.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_igmp_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_igmp_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_counters(self):
    """
    Getter method for counters, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/counters (container)

    YANG Description: Counters avaiable on a per interface bases for IGMP.
    """
    return self.__counters
      
  def _set_counters(self, v, load=False):
    """
    Setter method for counters, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/counters (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_counters is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_counters() directly.

    YANG Description: Counters avaiable on a per interface bases for IGMP.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_counters_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """counters must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__counters = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_counters(self):
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_membership_groups(self):
    """
    Getter method for membership_groups, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/membership_groups (container)

    YANG Description: List of IGMP Membership information.
    """
    return self.__membership_groups
      
  def _set_membership_groups(self, v, load=False):
    """
    Setter method for membership_groups, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/membership_groups (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_membership_groups is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_membership_groups() directly.

    YANG Description: List of IGMP Membership information.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_membership_groups_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_membership_groups, is_container='container', yang_name="membership-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """membership_groups must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_membership_groups_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_membership_groups, is_container='container', yang_name="membership-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__membership_groups = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_membership_groups(self):
    self.__membership_groups = YANGDynClass(base=yc_membership_groups_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_membership_groups, is_container='container', yang_name="membership-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_static_membership_groups(self):
    """
    Getter method for static_membership_groups, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/static_membership_groups (container)

    YANG Description: List of IGMP Membership information.
    """
    return self.__static_membership_groups
      
  def _set_static_membership_groups(self, v, load=False):
    """
    Setter method for static_membership_groups, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/static_membership_groups (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_static_membership_groups is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_static_membership_groups() directly.

    YANG Description: List of IGMP Membership information.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_static_membership_groups_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_static_membership_groups, is_container='container', yang_name="static-membership-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """static_membership_groups must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_static_membership_groups_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_static_membership_groups, is_container='container', yang_name="static-membership-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__static_membership_groups = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_static_membership_groups(self):
    self.__static_membership_groups = YANGDynClass(base=yc_static_membership_groups_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces_interface_static_membership_groups, is_container='container', yang_name="static-membership-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_interface_ref(self):
    """
    Getter method for interface_ref, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface/interface_ref (container)

    YANG Description: Reference to an interface or subinterface
    """
    return self.__interface_ref
      
  def _set_interface_ref(self, v, load=False):
    """
    Setter method for interface_ref, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/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
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interface_ref_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_igmp_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_igmp_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/network-instance', defining_module='openconfig-network-instance', 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)
  counters = __builtin__.property(_get_counters, _set_counters)
  membership_groups = __builtin__.property(_get_membership_groups, _set_membership_groups)
  static_membership_groups = __builtin__.property(_get_static_membership_groups, _set_static_membership_groups)
  interface_ref = __builtin__.property(_get_interface_ref, _set_interface_ref)


  _pyangbind_elements = OrderedDict([('interface_id', interface_id), ('config', config), ('state', state), ('counters', counters), ('membership_groups', membership_groups), ('static_membership_groups', static_membership_groups), ('interface_ref', interface_ref), ])


class yc_interfaces_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_interfaces(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/igmp/interfaces. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The interfaces on which IGMP is configured.
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface',)

  _yang_name = 'interfaces'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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_network_instance__network_instances_network_instance_protocols_protocol_igmp_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'igmp', 'interfaces']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces/interface (list)

    YANG Description: This container defines interface IGMP configuration and
state information.
    """
    return self.__interface
      
  def _set_interface(self, v, load=False):
    """
    Setter method for interface, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/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: This container defines interface IGMP configuration and
state information.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("interface_id",yc_interface_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_igmp_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_igmp_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/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  interface = __builtin__.property(_get_interface, _set_interface)


  _pyangbind_elements = OrderedDict([('interface', interface), ])


class yc_igmp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/igmp. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level IGMP configuration and operational state.
  """
  __slots__ = ('_path_helper', '_extmethods', '__global_','__interfaces',)

  _yang_name = 'igmp'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__global_ = YANGDynClass(base=yc_global__openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__interfaces = YANGDynClass(base=yc_interfaces_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'igmp']

  def _get_global_(self):
    """
    Getter method for global_, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/global (container)

    YANG Description: Global IGMP configuration and operational state.
    """
    return self.__global_
      
  def _set_global_(self, v, load=False):
    """
    Setter method for global_, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/global (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_global_ is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_global_() directly.

    YANG Description: Global IGMP configuration and operational state.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_global__openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """global_ must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_global__openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__global_ = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_global_(self):
    self.__global_ = YANGDynClass(base=yc_global__openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_interfaces(self):
    """
    Getter method for interfaces, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/interfaces (container)

    YANG Description: The interfaces on which IGMP is configured.
    """
    return self.__interfaces
      
  def _set_interfaces(self, v, load=False):
    """
    Setter method for interfaces, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp/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: The interfaces on which IGMP is configured.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interfaces_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_igmp_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_igmp_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  global_ = __builtin__.property(_get_global_, _set_global_)
  interfaces = __builtin__.property(_get_interfaces, _set_interfaces)


  _pyangbind_elements = OrderedDict([('global_', global_), ('interfaces', interfaces), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/pcep/path-computation-servers/path-computation-server/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: PCE server configuration.
  """
  __slots__ = ('_path_helper', '_extmethods', '__pce_server_address','__id','__port','__source_address','__pce_type','__preference','__report_local_lsp','__pce_initiated_capability','__sr_support',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__pce_server_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}'}),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}|:))'}),], is_leaf=True, yang_name="pce-server-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__port = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(4189), is_leaf=True, yang_name="port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:port-number', is_config=True)
    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}'}),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}|:))'}),], 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    self.__pce_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STATELESS': {}, 'STATEFUL_PASSIVE': {}, 'STATEFUL_ACTIVE': {}},), is_leaf=True, yang_name="pce-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='pce-mode-type', is_config=True)
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    self.__report_local_lsp = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="report-local-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__pce_initiated_capability = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="pce-initiated-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__sr_support = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="sr-support", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'pcep', 'path-computation-servers', 'path-computation-server', 'config']

  def _get_pce_server_address(self):
    """
    Getter method for pce_server_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/config/pce_server_address (oc-inet:ip-address)

    YANG Description: The destination IP address of the PCE server for PCEP service.
      Specify multiple entries in the path-computation-server-list to provide redundancy.
      When multiple candidate servers are specified for a single client,
      they are prioritized according to preference.
    """
    return self.__pce_server_address
      
  def _set_pce_server_address(self, v, load=False):
    """
    Setter method for pce_server_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/config/pce_server_address (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pce_server_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pce_server_address() directly.

    YANG Description: The destination IP address of the PCE server for PCEP service.
      Specify multiple entries in the path-computation-server-list to provide redundancy.
      When multiple candidate servers are specified for a single client,
      they are prioritized according to preference.
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="pce-server-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pce_server_address must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="pce-server-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)""",
        })

    self.__pce_server_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_pce_server_address(self):
    self.__pce_server_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}'}),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}|:))'}),], is_leaf=True, yang_name="pce-server-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)


  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/config/id (string)

    YANG Description: A unique name for the PCE server.
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/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: A unique name for the PCE server.
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_port(self):
    """
    Getter method for port, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/config/port (oc-inet:port-number)

    YANG Description: The destination TCP port used for PCEP service in the PCE server.
    """
    return self.__port
      
  def _set_port(self, v, load=False):
    """
    Setter method for port, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/config/port (oc-inet:port-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_port is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_port() directly.

    YANG Description: The destination TCP port used for PCEP service in the PCE server.
    """
    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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(4189), is_leaf=True, yang_name="port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:port-number', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """port must be of a type compatible with oc-inet:port-number""",
          'defined-type': "oc-inet:port-number",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(4189), is_leaf=True, yang_name="port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:port-number', is_config=True)""",
        })

    self.__port = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_port(self):
    self.__port = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(4189), is_leaf=True, yang_name="port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:port-number', is_config=True)


  def _get_source_address(self):
    """
    Getter method for source_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/config/source_address (oc-inet:ip-address)

    YANG Description: The source IP address used by PCC(Router) to establish PCEP session.
    """
    return self.__source_address
      
  def _set_source_address(self, v, load=False):
    """
    Setter method for source_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/config/source_address (oc-inet:ip-address)
    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: The source IP address used by PCC(Router) to establish PCEP session.
    """
    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}'}),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}|:))'}),], 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', 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}'}),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}|:))'}),], 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)


  def _get_pce_type(self):
    """
    Getter method for pce_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/config/pce_type (pce-mode-type)

    YANG Description: The type of PCEP capability supported which is advertised in the Open
  message when a PCEP session is established.
    """
    return self.__pce_type
      
  def _set_pce_type(self, v, load=False):
    """
    Setter method for pce_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/config/pce_type (pce-mode-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pce_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pce_type() directly.

    YANG Description: The type of PCEP capability supported which is advertised in the Open
  message when a PCEP session is established.
    """
    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={'STATELESS': {}, 'STATEFUL_PASSIVE': {}, 'STATEFUL_ACTIVE': {}},), is_leaf=True, yang_name="pce-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='pce-mode-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pce_type must be of a type compatible with pce-mode-type""",
          'defined-type': "openconfig-network-instance:pce-mode-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STATELESS': {}, 'STATEFUL_PASSIVE': {}, 'STATEFUL_ACTIVE': {}},), is_leaf=True, yang_name="pce-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='pce-mode-type', is_config=True)""",
        })

    self.__pce_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_pce_type(self):
    self.__pce_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STATELESS': {}, 'STATEFUL_PASSIVE': {}, 'STATEFUL_ACTIVE': {}},), is_leaf=True, yang_name="pce-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='pce-mode-type', is_config=True)


  def _get_preference(self):
    """
    Getter method for preference, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/config/preference (uint8)

    YANG Description: When multiple PCE servers are specified, the candidate PCE server
with the highest preference is selected to calculate paths.
The greater or lower the value, the higher the preference could
dependon vendor implementation. If no preference value is set, indicate
the lowest preference or no preference at all.
    """
    return self.__preference
      
  def _set_preference(self, v, load=False):
    """
    Setter method for preference, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/config/preference (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_preference is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_preference() directly.

    YANG Description: When multiple PCE servers are specified, the candidate PCE server
with the highest preference is selected to calculate paths.
The greater or lower the value, the higher the preference could
dependon vendor implementation. If no preference value is set, indicate
the lowest preference or no preference at all.
    """
    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="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """preference 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="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
        })

    self.__preference = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_preference(self):
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)


  def _get_report_local_lsp(self):
    """
    Getter method for report_local_lsp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/config/report_local_lsp (boolean)

    YANG Description: Specifies whether the PCC (Router) will advertise LSP existence and state
      for LSPs that are not controlled by any PCE (for example, LSPs that are
      statically configured at the PCC) but without delegating them.
    """
    return self.__report_local_lsp
      
  def _set_report_local_lsp(self, v, load=False):
    """
    Setter method for report_local_lsp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/config/report_local_lsp (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_report_local_lsp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_report_local_lsp() directly.

    YANG Description: Specifies whether the PCC (Router) will advertise LSP existence and state
      for LSPs that are not controlled by any PCE (for example, LSPs that are
      statically configured at the PCC) but without delegating them.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="report-local-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """report_local_lsp must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="report-local-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__report_local_lsp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_report_local_lsp(self):
    self.__report_local_lsp = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="report-local-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_pce_initiated_capability(self):
    """
    Getter method for pce_initiated_capability, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/config/pce_initiated_capability (boolean)

    YANG Description: Indicates to PCE that PCC (Router) supports PCE-initiated LSP paths instantiation.
      A PCE can initiate LSPs only for PCCs that advertised this capability.
    """
    return self.__pce_initiated_capability
      
  def _set_pce_initiated_capability(self, v, load=False):
    """
    Setter method for pce_initiated_capability, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/config/pce_initiated_capability (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pce_initiated_capability is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pce_initiated_capability() directly.

    YANG Description: Indicates to PCE that PCC (Router) supports PCE-initiated LSP paths instantiation.
      A PCE can initiate LSPs only for PCCs that advertised this capability.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="pce-initiated-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pce_initiated_capability must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="pce-initiated-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__pce_initiated_capability = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_pce_initiated_capability(self):
    self.__pce_initiated_capability = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="pce-initiated-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_sr_support(self):
    """
    Getter method for sr_support, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/config/sr_support (boolean)

    YANG Description: Indicates to PCE that PCC (Router) supports Segment-Routing
      to set up LSP paths in addition to RSVP-TE.
    """
    return self.__sr_support
      
  def _set_sr_support(self, v, load=False):
    """
    Setter method for sr_support, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/config/sr_support (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sr_support is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sr_support() directly.

    YANG Description: Indicates to PCE that PCC (Router) supports Segment-Routing
      to set up LSP paths in addition to RSVP-TE.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="sr-support", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sr_support must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="sr-support", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__sr_support = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sr_support(self):
    self.__sr_support = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="sr-support", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  pce_server_address = __builtin__.property(_get_pce_server_address, _set_pce_server_address)
  id = __builtin__.property(_get_id, _set_id)
  port = __builtin__.property(_get_port, _set_port)
  source_address = __builtin__.property(_get_source_address, _set_source_address)
  pce_type = __builtin__.property(_get_pce_type, _set_pce_type)
  preference = __builtin__.property(_get_preference, _set_preference)
  report_local_lsp = __builtin__.property(_get_report_local_lsp, _set_report_local_lsp)
  pce_initiated_capability = __builtin__.property(_get_pce_initiated_capability, _set_pce_initiated_capability)
  sr_support = __builtin__.property(_get_sr_support, _set_sr_support)


  _pyangbind_elements = OrderedDict([('pce_server_address', pce_server_address), ('id', id), ('port', port), ('source_address', source_address), ('pce_type', pce_type), ('preference', preference), ('report_local_lsp', report_local_lsp), ('pce_initiated_capability', pce_initiated_capability), ('sr_support', sr_support), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/pcep/path-computation-servers/path-computation-server/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: PCE server state.
  """
  __slots__ = ('_path_helper', '_extmethods', '__pce_server_address','__id','__port','__source_address','__pce_type','__preference','__report_local_lsp','__pce_initiated_capability','__sr_support',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__pce_server_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}'}),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}|:))'}),], is_leaf=True, yang_name="pce-server-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__port = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(4189), is_leaf=True, yang_name="port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:port-number', is_config=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}'}),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}|:))'}),], 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__pce_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STATELESS': {}, 'STATEFUL_PASSIVE': {}, 'STATEFUL_ACTIVE': {}},), is_leaf=True, yang_name="pce-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='pce-mode-type', is_config=False)
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__report_local_lsp = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="report-local-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__pce_initiated_capability = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="pce-initiated-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__sr_support = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="sr-support", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'pcep', 'path-computation-servers', 'path-computation-server', 'state']

  def _get_pce_server_address(self):
    """
    Getter method for pce_server_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/state/pce_server_address (oc-inet:ip-address)

    YANG Description: The destination IP address of the PCE server for PCEP service.
      Specify multiple entries in the path-computation-server-list to provide redundancy.
      When multiple candidate servers are specified for a single client,
      they are prioritized according to preference.
    """
    return self.__pce_server_address
      
  def _set_pce_server_address(self, v, load=False):
    """
    Setter method for pce_server_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/state/pce_server_address (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pce_server_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pce_server_address() directly.

    YANG Description: The destination IP address of the PCE server for PCEP service.
      Specify multiple entries in the path-computation-server-list to provide redundancy.
      When multiple candidate servers are specified for a single client,
      they are prioritized according to preference.
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="pce-server-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pce_server_address must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="pce-server-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__pce_server_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_pce_server_address(self):
    self.__pce_server_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}'}),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}|:))'}),], is_leaf=True, yang_name="pce-server-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/state/id (string)

    YANG Description: A unique name for the PCE server.
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/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: A unique name for the PCE server.
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_port(self):
    """
    Getter method for port, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/state/port (oc-inet:port-number)

    YANG Description: The destination TCP port used for PCEP service in the PCE server.
    """
    return self.__port
      
  def _set_port(self, v, load=False):
    """
    Setter method for port, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/state/port (oc-inet:port-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_port is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_port() directly.

    YANG Description: The destination TCP port used for PCEP service in the PCE server.
    """
    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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(4189), is_leaf=True, yang_name="port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:port-number', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """port must be of a type compatible with oc-inet:port-number""",
          'defined-type': "oc-inet:port-number",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(4189), is_leaf=True, yang_name="port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:port-number', is_config=False)""",
        })

    self.__port = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_port(self):
    self.__port = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(4189), is_leaf=True, yang_name="port", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:port-number', is_config=False)


  def _get_source_address(self):
    """
    Getter method for source_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/state/source_address (oc-inet:ip-address)

    YANG Description: The source IP address used by PCC(Router) to establish PCEP session.
    """
    return self.__source_address
      
  def _set_source_address(self, v, load=False):
    """
    Setter method for source_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/state/source_address (oc-inet:ip-address)
    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: The source IP address used by PCC(Router) to establish PCEP session.
    """
    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}'}),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}|:))'}),], 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', 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}'}),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}|:))'}),], 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_pce_type(self):
    """
    Getter method for pce_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/state/pce_type (pce-mode-type)

    YANG Description: The type of PCEP capability supported which is advertised in the Open
  message when a PCEP session is established.
    """
    return self.__pce_type
      
  def _set_pce_type(self, v, load=False):
    """
    Setter method for pce_type, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/state/pce_type (pce-mode-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pce_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pce_type() directly.

    YANG Description: The type of PCEP capability supported which is advertised in the Open
  message when a PCEP session is established.
    """
    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={'STATELESS': {}, 'STATEFUL_PASSIVE': {}, 'STATEFUL_ACTIVE': {}},), is_leaf=True, yang_name="pce-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='pce-mode-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pce_type must be of a type compatible with pce-mode-type""",
          'defined-type': "openconfig-network-instance:pce-mode-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STATELESS': {}, 'STATEFUL_PASSIVE': {}, 'STATEFUL_ACTIVE': {}},), is_leaf=True, yang_name="pce-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='pce-mode-type', is_config=False)""",
        })

    self.__pce_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_pce_type(self):
    self.__pce_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STATELESS': {}, 'STATEFUL_PASSIVE': {}, 'STATEFUL_ACTIVE': {}},), is_leaf=True, yang_name="pce-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='pce-mode-type', is_config=False)


  def _get_preference(self):
    """
    Getter method for preference, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/state/preference (uint8)

    YANG Description: When multiple PCE servers are specified, the candidate PCE server
with the highest preference is selected to calculate paths.
The greater or lower the value, the higher the preference could
dependon vendor implementation. If no preference value is set, indicate
the lowest preference or no preference at all.
    """
    return self.__preference
      
  def _set_preference(self, v, load=False):
    """
    Setter method for preference, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/state/preference (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_preference is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_preference() directly.

    YANG Description: When multiple PCE servers are specified, the candidate PCE server
with the highest preference is selected to calculate paths.
The greater or lower the value, the higher the preference could
dependon vendor implementation. If no preference value is set, indicate
the lowest preference or no preference at all.
    """
    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="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """preference 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="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__preference = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_preference(self):
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_report_local_lsp(self):
    """
    Getter method for report_local_lsp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/state/report_local_lsp (boolean)

    YANG Description: Specifies whether the PCC (Router) will advertise LSP existence and state
      for LSPs that are not controlled by any PCE (for example, LSPs that are
      statically configured at the PCC) but without delegating them.
    """
    return self.__report_local_lsp
      
  def _set_report_local_lsp(self, v, load=False):
    """
    Setter method for report_local_lsp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/state/report_local_lsp (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_report_local_lsp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_report_local_lsp() directly.

    YANG Description: Specifies whether the PCC (Router) will advertise LSP existence and state
      for LSPs that are not controlled by any PCE (for example, LSPs that are
      statically configured at the PCC) but without delegating them.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="report-local-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """report_local_lsp must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="report-local-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__report_local_lsp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_report_local_lsp(self):
    self.__report_local_lsp = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="report-local-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_pce_initiated_capability(self):
    """
    Getter method for pce_initiated_capability, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/state/pce_initiated_capability (boolean)

    YANG Description: Indicates to PCE that PCC (Router) supports PCE-initiated LSP paths instantiation.
      A PCE can initiate LSPs only for PCCs that advertised this capability.
    """
    return self.__pce_initiated_capability
      
  def _set_pce_initiated_capability(self, v, load=False):
    """
    Setter method for pce_initiated_capability, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/state/pce_initiated_capability (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pce_initiated_capability is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pce_initiated_capability() directly.

    YANG Description: Indicates to PCE that PCC (Router) supports PCE-initiated LSP paths instantiation.
      A PCE can initiate LSPs only for PCCs that advertised this capability.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="pce-initiated-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pce_initiated_capability must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="pce-initiated-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__pce_initiated_capability = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_pce_initiated_capability(self):
    self.__pce_initiated_capability = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="pce-initiated-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_sr_support(self):
    """
    Getter method for sr_support, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/state/sr_support (boolean)

    YANG Description: Indicates to PCE that PCC (Router) supports Segment-Routing
      to set up LSP paths in addition to RSVP-TE.
    """
    return self.__sr_support
      
  def _set_sr_support(self, v, load=False):
    """
    Setter method for sr_support, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/state/sr_support (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sr_support is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sr_support() directly.

    YANG Description: Indicates to PCE that PCC (Router) supports Segment-Routing
      to set up LSP paths in addition to RSVP-TE.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="sr-support", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sr_support must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="sr-support", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__sr_support = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sr_support(self):
    self.__sr_support = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="sr-support", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  pce_server_address = __builtin__.property(_get_pce_server_address)
  id = __builtin__.property(_get_id)
  port = __builtin__.property(_get_port)
  source_address = __builtin__.property(_get_source_address)
  pce_type = __builtin__.property(_get_pce_type)
  preference = __builtin__.property(_get_preference)
  report_local_lsp = __builtin__.property(_get_report_local_lsp)
  pce_initiated_capability = __builtin__.property(_get_pce_initiated_capability)
  sr_support = __builtin__.property(_get_sr_support)


  _pyangbind_elements = OrderedDict([('pce_server_address', pce_server_address), ('id', id), ('port', port), ('source_address', source_address), ('pce_type', pce_type), ('preference', preference), ('report_local_lsp', report_local_lsp), ('pce_initiated_capability', pce_initiated_capability), ('sr_support', sr_support), ])


class yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server_timers_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/pcep/path-computation-servers/path-computation-server/timers/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines PCEP timers configuration.
  """
  __slots__ = ('_path_helper', '_extmethods', '__keepalive','__dead_timer','__redelegation_timeout_interval','__state_timeout_interval',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__keepalive = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(30), is_leaf=True, yang_name="keepalive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    self.__dead_timer = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(120), is_leaf=True, yang_name="dead-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    self.__redelegation_timeout_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="redelegation-timeout-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__state_timeout_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="state-timeout-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'protocols', 'protocol', 'pcep', 'path-computation-servers', 'path-computation-server', 'timers', 'config']

  def _get_keepalive(self):
    """
    Getter method for keepalive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/timers/config/keepalive (uint8)

    YANG Description: Interval for sending keepalive messages over PCE session.
    """
    return self.__keepalive
      
  def _set_keepalive(self, v, load=False):
    """
    Setter method for keepalive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/timers/config/keepalive (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_keepalive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_keepalive() directly.

    YANG Description: Interval for sending keepalive messages over PCE session.
    """
    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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(30), is_leaf=True, yang_name="keepalive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """keepalive 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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(30), is_leaf=True, yang_name="keepalive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
        })

    self.__keepalive = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_keepalive(self):
    self.__keepalive = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(30), is_leaf=True, yang_name="keepalive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)


  def _get_dead_timer(self):
    """
    Getter method for dead_timer, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/timers/config/dead_timer (uint8)

    YANG Description: Interval after which PCE session is declared dead.
    """
    return self.__dead_timer
      
  def _set_dead_timer(self, v, load=False):
    """
    Setter method for dead_timer, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/timers/config/dead_timer (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dead_timer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dead_timer() directly.

    YANG Description: Interval after which PCE session is declared dead.
    """
    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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(120), is_leaf=True, yang_name="dead-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dead_timer 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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(120), is_leaf=True, yang_name="dead-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
        })

    self.__dead_timer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dead_timer(self):
    self.__dead_timer = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(120), is_leaf=True, yang_name="dead-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)


  def _get_redelegation_timeout_interval(self):
    """
    Getter method for redelegation_timeout_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/timers/config/redelegation_timeout_interval (uint16)

    YANG Description: When a PCEP session is terminated, the period of time a PCC waits
before revoking LSP delegation and attempting to redelegate LSPs
associated with the terminated PCEP session to an alternate PCE.
    """
    return self.__redelegation_timeout_interval
      
  def _set_redelegation_timeout_interval(self, v, load=False):
    """
    Setter method for redelegation_timeout_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/timers/config/redelegation_timeout_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_redelegation_timeout_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_redelegation_timeout_interval() directly.

    YANG Description: When a PCEP session is terminated, the period of time a PCC waits
before revoking LSP delegation and attempting to redelegate LSPs
associated with the terminated PCEP session to an alternate PCE.
    """
    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="redelegation-timeout-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """redelegation_timeout_interval 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="redelegation-timeout-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__redelegation_timeout_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_redelegation_timeout_interval(self):
    self.__redelegation_timeout_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="redelegation-timeout-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_state_timeout_interval(self):
    """
    Getter method for state_timeout_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/timers/config/state_timeout_interval (uint16)

    YANG Description: When a PCEP session is terminated, the period of time a PCC waits
      before before flushing LSP state associated with that PCEP session
      and reverting to operator-defined default parameters or behaviors.
    """
    return self.__state_timeout_interval
      
  def _set_state_timeout_interval(self, v, load=False):
    """
    Setter method for state_timeout_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/timers/config/state_timeout_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state_timeout_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state_timeout_interval() directly.

    YANG Description: When a PCEP session is terminated, the period of time a PCC waits
      before before flushing LSP state associated with that PCEP session
      and reverting to operator-defined default parameters or behaviors.
    """
    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="state-timeout-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state_timeout_interval 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="state-timeout-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__state_timeout_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state_timeout_interval(self):
    self.__state_timeout_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="state-timeout-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

  keepalive = __builtin__.property(_get_keepalive, _set_keepalive)
  dead_timer = __builtin__.property(_get_dead_timer, _set_dead_timer)
  redelegation_timeout_interval = __builtin__.property(_get_redelegation_timeout_interval, _set_redelegation_timeout_interval)
  state_timeout_interval = __builtin__.property(_get_state_timeout_interval, _set_state_timeout_interval)


  _pyangbind_elements = OrderedDict([('keepalive', keepalive), ('dead_timer', dead_timer), ('redelegation_timeout_interval', redelegation_timeout_interval), ('state_timeout_interval', state_timeout_interval), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server_timers_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/pcep/path-computation-servers/path-computation-server/timers/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines state information for PCEP timers.
  """
  __slots__ = ('_path_helper', '_extmethods', '__keepalive','__dead_timer','__redelegation_timeout_interval','__state_timeout_interval',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__keepalive = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(30), is_leaf=True, yang_name="keepalive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__dead_timer = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(120), is_leaf=True, yang_name="dead-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__redelegation_timeout_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="redelegation-timeout-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__state_timeout_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="state-timeout-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'pcep', 'path-computation-servers', 'path-computation-server', 'timers', 'state']

  def _get_keepalive(self):
    """
    Getter method for keepalive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/timers/state/keepalive (uint8)

    YANG Description: Interval for sending keepalive messages over PCE session.
    """
    return self.__keepalive
      
  def _set_keepalive(self, v, load=False):
    """
    Setter method for keepalive, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/timers/state/keepalive (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_keepalive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_keepalive() directly.

    YANG Description: Interval for sending keepalive messages over PCE session.
    """
    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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(30), is_leaf=True, yang_name="keepalive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """keepalive 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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(30), is_leaf=True, yang_name="keepalive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__keepalive = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_keepalive(self):
    self.__keepalive = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(30), is_leaf=True, yang_name="keepalive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_dead_timer(self):
    """
    Getter method for dead_timer, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/timers/state/dead_timer (uint8)

    YANG Description: Interval after which PCE session is declared dead.
    """
    return self.__dead_timer
      
  def _set_dead_timer(self, v, load=False):
    """
    Setter method for dead_timer, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/timers/state/dead_timer (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dead_timer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dead_timer() directly.

    YANG Description: Interval after which PCE session is declared dead.
    """
    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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(120), is_leaf=True, yang_name="dead-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dead_timer 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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(120), is_leaf=True, yang_name="dead-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__dead_timer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dead_timer(self):
    self.__dead_timer = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(120), is_leaf=True, yang_name="dead-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_redelegation_timeout_interval(self):
    """
    Getter method for redelegation_timeout_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/timers/state/redelegation_timeout_interval (uint16)

    YANG Description: When a PCEP session is terminated, the period of time a PCC waits
before revoking LSP delegation and attempting to redelegate LSPs
associated with the terminated PCEP session to an alternate PCE.
    """
    return self.__redelegation_timeout_interval
      
  def _set_redelegation_timeout_interval(self, v, load=False):
    """
    Setter method for redelegation_timeout_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/timers/state/redelegation_timeout_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_redelegation_timeout_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_redelegation_timeout_interval() directly.

    YANG Description: When a PCEP session is terminated, the period of time a PCC waits
before revoking LSP delegation and attempting to redelegate LSPs
associated with the terminated PCEP session to an alternate PCE.
    """
    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="redelegation-timeout-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """redelegation_timeout_interval 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="redelegation-timeout-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__redelegation_timeout_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_redelegation_timeout_interval(self):
    self.__redelegation_timeout_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="redelegation-timeout-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_state_timeout_interval(self):
    """
    Getter method for state_timeout_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/timers/state/state_timeout_interval (uint16)

    YANG Description: When a PCEP session is terminated, the period of time a PCC waits
      before before flushing LSP state associated with that PCEP session
      and reverting to operator-defined default parameters or behaviors.
    """
    return self.__state_timeout_interval
      
  def _set_state_timeout_interval(self, v, load=False):
    """
    Setter method for state_timeout_interval, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/timers/state/state_timeout_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state_timeout_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state_timeout_interval() directly.

    YANG Description: When a PCEP session is terminated, the period of time a PCC waits
      before before flushing LSP state associated with that PCEP session
      and reverting to operator-defined default parameters or behaviors.
    """
    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="state-timeout-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state_timeout_interval 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="state-timeout-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__state_timeout_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state_timeout_interval(self):
    self.__state_timeout_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="state-timeout-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  keepalive = __builtin__.property(_get_keepalive)
  dead_timer = __builtin__.property(_get_dead_timer)
  redelegation_timeout_interval = __builtin__.property(_get_redelegation_timeout_interval)
  state_timeout_interval = __builtin__.property(_get_state_timeout_interval)


  _pyangbind_elements = OrderedDict([('keepalive', keepalive), ('dead_timer', dead_timer), ('redelegation_timeout_interval', redelegation_timeout_interval), ('state_timeout_interval', state_timeout_interval), ])


class yc_timers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server_timers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/pcep/path-computation-servers/path-computation-server/timers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: This container defines PCEP timers.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'timers'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server_timers_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server_timers_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'pcep', 'path-computation-servers', 'path-computation-server', 'timers']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/timers/config (container)

    YANG Description: This container defines PCEP timers configuration.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/timers/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: This container defines PCEP timers configuration.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server_timers_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server_timers_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server_timers_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/timers/state (container)

    YANG Description: This container defines state information for PCEP timers.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/timers/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: This container defines state information for PCEP timers.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server_timers_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server_timers_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server_timers_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server_authentication_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/pcep/path-computation-servers/path-computation-server/authentication/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration of PCEP authentication attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__enable','__authentication_key','__keychain',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__authentication_key = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)
    self.__keychain = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="keychain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-keychain:keychain-ref', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'protocols', 'protocol', 'pcep', 'path-computation-servers', 'path-computation-server', 'authentication', 'config']

  def _get_enable(self):
    """
    Getter method for enable, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/authentication/config/enable (boolean)

    YANG Description: Enables PCEP authentication on the node.
    """
    return self.__enable
      
  def _set_enable(self, v, load=False):
    """
    Setter method for enable, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/authentication/config/enable (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable() directly.

    YANG Description: Enables PCEP authentication on the node.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable 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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enable = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable(self):
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_authentication_key(self):
    """
    Getter method for authentication_key, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/authentication/config/authentication_key (oc-types:routing-password)

    YANG Description: Password (key) used for securing a PCEP session using
TCP-MD5 authentication
    """
    return self.__authentication_key
      
  def _set_authentication_key(self, v, load=False):
    """
    Setter method for authentication_key, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/authentication/config/authentication_key (oc-types:routing-password)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_authentication_key is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_authentication_key() directly.

    YANG Description: Password (key) used for securing a PCEP session using
TCP-MD5 authentication
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """authentication_key must be of a type compatible with oc-types:routing-password""",
          'defined-type': "oc-types:routing-password",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)""",
        })

    self.__authentication_key = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_authentication_key(self):
    self.__authentication_key = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)


  def _get_keychain(self):
    """
    Getter method for keychain, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/authentication/config/keychain (oc-keychain:keychain-ref)

    YANG Description: Reference to a predefined keychain that should be used to secure
PCEP session
    """
    return self.__keychain
      
  def _set_keychain(self, v, load=False):
    """
    Setter method for keychain, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/authentication/config/keychain (oc-keychain:keychain-ref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_keychain is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_keychain() directly.

    YANG Description: Reference to a predefined keychain that should be used to secure
PCEP session
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="keychain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-keychain:keychain-ref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """keychain must be of a type compatible with oc-keychain:keychain-ref""",
          'defined-type': "oc-keychain:keychain-ref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="keychain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-keychain:keychain-ref', is_config=True)""",
        })

    self.__keychain = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_keychain(self):
    self.__keychain = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="keychain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-keychain:keychain-ref', is_config=True)

  enable = __builtin__.property(_get_enable, _set_enable)
  authentication_key = __builtin__.property(_get_authentication_key, _set_authentication_key)
  keychain = __builtin__.property(_get_keychain, _set_keychain)


  _pyangbind_elements = OrderedDict([('enable', enable), ('authentication_key', authentication_key), ('keychain', keychain), ])


class yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server_authentication_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/pcep/path-computation-servers/path-computation-server/authentication/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: PCEP authentication state.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enable','__authentication_key','__keychain',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__authentication_key = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=False)
    self.__keychain = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="keychain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-keychain:keychain-ref', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'pcep', 'path-computation-servers', 'path-computation-server', 'authentication', 'state']

  def _get_enable(self):
    """
    Getter method for enable, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/authentication/state/enable (boolean)

    YANG Description: Enables PCEP authentication on the node.
    """
    return self.__enable
      
  def _set_enable(self, v, load=False):
    """
    Setter method for enable, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/authentication/state/enable (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable() directly.

    YANG Description: Enables PCEP authentication on the node.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable 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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enable = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable(self):
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_authentication_key(self):
    """
    Getter method for authentication_key, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/authentication/state/authentication_key (oc-types:routing-password)

    YANG Description: Password (key) used for securing a PCEP session using
TCP-MD5 authentication
    """
    return self.__authentication_key
      
  def _set_authentication_key(self, v, load=False):
    """
    Setter method for authentication_key, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/authentication/state/authentication_key (oc-types:routing-password)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_authentication_key is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_authentication_key() directly.

    YANG Description: Password (key) used for securing a PCEP session using
TCP-MD5 authentication
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """authentication_key must be of a type compatible with oc-types:routing-password""",
          'defined-type': "oc-types:routing-password",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=False)""",
        })

    self.__authentication_key = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_authentication_key(self):
    self.__authentication_key = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=False)


  def _get_keychain(self):
    """
    Getter method for keychain, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/authentication/state/keychain (oc-keychain:keychain-ref)

    YANG Description: Reference to a predefined keychain that should be used to secure
PCEP session
    """
    return self.__keychain
      
  def _set_keychain(self, v, load=False):
    """
    Setter method for keychain, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/authentication/state/keychain (oc-keychain:keychain-ref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_keychain is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_keychain() directly.

    YANG Description: Reference to a predefined keychain that should be used to secure
PCEP session
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="keychain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-keychain:keychain-ref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """keychain must be of a type compatible with oc-keychain:keychain-ref""",
          'defined-type': "oc-keychain:keychain-ref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="keychain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-keychain:keychain-ref', is_config=False)""",
        })

    self.__keychain = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_keychain(self):
    self.__keychain = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="keychain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-keychain:keychain-ref', is_config=False)

  enable = __builtin__.property(_get_enable)
  authentication_key = __builtin__.property(_get_authentication_key)
  keychain = __builtin__.property(_get_keychain)


  _pyangbind_elements = OrderedDict([('enable', enable), ('authentication_key', authentication_key), ('keychain', keychain), ])


class yc_authentication_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server_authentication(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/pcep/path-computation-servers/path-computation-server/authentication. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Global PCEP authentication
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'authentication'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server_authentication_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'pcep', 'path-computation-servers', 'path-computation-server', 'authentication']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/authentication/config (container)

    YANG Description: Configuration of PCEP authentication attributes
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/authentication/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 of PCEP authentication attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server_authentication_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server_authentication_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server_authentication_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/authentication/state (container)

    YANG Description: PCEP authentication state.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/authentication/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: PCEP authentication state.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_path_computation_server_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/pcep/path-computation-servers/path-computation-server. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration and state information for communication with a PCE server.
  """
  __slots__ = ('_path_helper', '_extmethods', '__pce_server_address','__config','__state','__timers','__authentication',)

  _yang_name = 'path-computation-server'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__pce_server_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="pce-server-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__timers = YANGDynClass(base=yc_timers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server_timers, is_container='container', yang_name="timers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__authentication = YANGDynClass(base=yc_authentication_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server_authentication, is_container='container', yang_name="authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'pcep', 'path-computation-servers', 'path-computation-server']

  def _get_pce_server_address(self):
    """
    Getter method for pce_server_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/pce_server_address (leafref)

    YANG Description: IPv4 address of PCE server.
    """
    return self.__pce_server_address
      
  def _set_pce_server_address(self, v, load=False):
    """
    Setter method for pce_server_address, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/pce_server_address (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pce_server_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pce_server_address() directly.

    YANG Description: IPv4 address of PCE server.
    """
    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="pce-server-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pce_server_address must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="pce-server-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__pce_server_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_pce_server_address(self):
    self.__pce_server_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="pce-server-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/config (container)

    YANG Description: PCE server configuration.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/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: PCE server configuration.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/state (container)

    YANG Description: PCE server state.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/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: PCE server state.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_timers(self):
    """
    Getter method for timers, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/timers (container)

    YANG Description: This container defines PCEP timers.
    """
    return self.__timers
      
  def _set_timers(self, v, load=False):
    """
    Setter method for timers, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/timers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_timers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_timers() directly.

    YANG Description: This container defines PCEP timers.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_timers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server_timers, is_container='container', yang_name="timers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """timers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_timers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server_timers, is_container='container', yang_name="timers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__timers = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_timers(self):
    self.__timers = YANGDynClass(base=yc_timers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server_timers, is_container='container', yang_name="timers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_authentication(self):
    """
    Getter method for authentication, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/authentication (container)

    YANG Description: Global PCEP authentication
    """
    return self.__authentication
      
  def _set_authentication(self, v, load=False):
    """
    Setter method for authentication, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server/authentication (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_authentication is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_authentication() directly.

    YANG Description: Global PCEP authentication
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_authentication_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server_authentication, is_container='container', yang_name="authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """authentication must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_authentication_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server_authentication, is_container='container', yang_name="authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__authentication = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_authentication(self):
    self.__authentication = YANGDynClass(base=yc_authentication_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server_authentication, is_container='container', yang_name="authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  pce_server_address = __builtin__.property(_get_pce_server_address, _set_pce_server_address)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  timers = __builtin__.property(_get_timers, _set_timers)
  authentication = __builtin__.property(_get_authentication, _set_authentication)


  _pyangbind_elements = OrderedDict([('pce_server_address', pce_server_address), ('config', config), ('state', state), ('timers', timers), ('authentication', authentication), ])


class yc_path_computation_servers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/pcep/path-computation-servers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Defines PCE server parameters.
  """
  __slots__ = ('_path_helper', '_extmethods', '__path_computation_server',)

  _yang_name = 'path-computation-servers'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__path_computation_server = YANGDynClass(base=YANGListType("pce_server_address",yc_path_computation_server_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server, yang_name="path-computation-server", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='pce-server-address', extensions=None), is_container='list', yang_name="path-computation-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'pcep', 'path-computation-servers']

  def _get_path_computation_server(self):
    """
    Getter method for path_computation_server, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server (list)

    YANG Description: Configuration and state information for communication with a PCE server.
    """
    return self.__path_computation_server
      
  def _set_path_computation_server(self, v, load=False):
    """
    Setter method for path_computation_server, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers/path_computation_server (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_computation_server is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_computation_server() directly.

    YANG Description: Configuration and state information for communication with a PCE server.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("pce_server_address",yc_path_computation_server_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server, yang_name="path-computation-server", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='pce-server-address', extensions=None), is_container='list', yang_name="path-computation-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_computation_server must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("pce_server_address",yc_path_computation_server_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server, yang_name="path-computation-server", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='pce-server-address', extensions=None), is_container='list', yang_name="path-computation-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__path_computation_server = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_computation_server(self):
    self.__path_computation_server = YANGDynClass(base=YANGListType("pce_server_address",yc_path_computation_server_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers_path_computation_server, yang_name="path-computation-server", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='pce-server-address', extensions=None), is_container='list', yang_name="path-computation-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  path_computation_server = __builtin__.property(_get_path_computation_server, _set_path_computation_server)


  _pyangbind_elements = OrderedDict([('path_computation_server', path_computation_server), ])


class yc_pcep_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/pcep. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level PCEP configuration and operational state.
  """
  __slots__ = ('_path_helper', '_extmethods', '__path_computation_servers',)

  _yang_name = 'pcep'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__path_computation_servers = YANGDynClass(base=yc_path_computation_servers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers, is_container='container', yang_name="path-computation-servers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol', 'pcep']

  def _get_path_computation_servers(self):
    """
    Getter method for path_computation_servers, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers (container)

    YANG Description: Defines PCE server parameters.
    """
    return self.__path_computation_servers
      
  def _set_path_computation_servers(self, v, load=False):
    """
    Setter method for path_computation_servers, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep/path_computation_servers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_computation_servers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_computation_servers() directly.

    YANG Description: Defines PCE server parameters.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_path_computation_servers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers, is_container='container', yang_name="path-computation-servers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_computation_servers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_path_computation_servers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers, is_container='container', yang_name="path-computation-servers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__path_computation_servers = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_computation_servers(self):
    self.__path_computation_servers = YANGDynClass(base=yc_path_computation_servers_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep_path_computation_servers, is_container='container', yang_name="path-computation-servers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  path_computation_servers = __builtin__.property(_get_path_computation_servers, _set_path_computation_servers)


  _pyangbind_elements = OrderedDict([('path_computation_servers', path_computation_servers), ])


class yc_protocol_openconfig_network_instance__network_instances_network_instance_protocols_protocol(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A process (instance) of a routing protocol. Some
systems may not support more than one instance of
a particular routing protocol
  """
  __slots__ = ('_path_helper', '_extmethods', '__identifier','__name','__config','__state','__static_routes','__local_aggregates','__bgp','__ospfv2','__isis','__pim','__igmp','__pcep',)

  _yang_name = 'protocol'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__identifier = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__name = 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__static_routes = YANGDynClass(base=yc_static_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes, is_container='container', yang_name="static-routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__local_aggregates = YANGDynClass(base=yc_local_aggregates_openconfig_network_instance__network_instances_network_instance_protocols_protocol_local_aggregates, is_container='container', yang_name="local-aggregates", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__bgp = YANGDynClass(base=yc_bgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp, is_container='container', yang_name="bgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__ospfv2 = YANGDynClass(base=yc_ospfv2_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2, is_container='container', yang_name="ospfv2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__isis = YANGDynClass(base=yc_isis_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis, is_container='container', yang_name="isis", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__pim = YANGDynClass(base=yc_pim_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim, is_container='container', yang_name="pim", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__igmp = YANGDynClass(base=yc_igmp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp, is_container='container', yang_name="igmp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__pcep = YANGDynClass(base=yc_pcep_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep, is_container='container', yang_name="pcep", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols', 'protocol']

  def _get_identifier(self):
    """
    Getter method for identifier, mapped from YANG variable /network_instances/network_instance/protocols/protocol/identifier (leafref)

    YANG Description: The protocol name for the routing or forwarding
protocol to be instantiated
    """
    return self.__identifier
      
  def _set_identifier(self, v, load=False):
    """
    Setter method for identifier, mapped from YANG variable /network_instances/network_instance/protocols/protocol/identifier (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_identifier is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_identifier() directly.

    YANG Description: The protocol name for the routing or forwarding
protocol to be instantiated
    """
    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="identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """identifier must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__identifier = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_identifier(self):
    self.__identifier = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/name (leafref)

    YANG Description: An operator-assigned identifier for the routing
or forwarding protocol. For some processes this
leaf may be system defined.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/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: An operator-assigned identifier for the routing
or forwarding protocol. For some processes this
leaf may be system defined.
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/config (container)

    YANG Description: Configuration parameters relating to the routing
protocol instance
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/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 routing
protocol instance
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_protocols_protocol_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/state (container)

    YANG Description: State parameters relating to the routing protocol
instance
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/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 parameters relating to the routing protocol
instance
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_protocols_protocol_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_protocols_protocol_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_static_routes(self):
    """
    Getter method for static_routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes (container)

    YANG Description: Enclosing container for the list of static routes
    """
    return self.__static_routes
      
  def _set_static_routes(self, v, load=False):
    """
    Setter method for static_routes, mapped from YANG variable /network_instances/network_instance/protocols/protocol/static_routes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_static_routes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_static_routes() directly.

    YANG Description: Enclosing container for the list of static routes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_static_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes, is_container='container', yang_name="static-routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """static_routes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_static_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes, is_container='container', yang_name="static-routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__static_routes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_static_routes(self):
    self.__static_routes = YANGDynClass(base=yc_static_routes_openconfig_network_instance__network_instances_network_instance_protocols_protocol_static_routes, is_container='container', yang_name="static-routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_local_aggregates(self):
    """
    Getter method for local_aggregates, mapped from YANG variable /network_instances/network_instance/protocols/protocol/local_aggregates (container)

    YANG Description: Enclosing container for locally-defined aggregate
routes
    """
    return self.__local_aggregates
      
  def _set_local_aggregates(self, v, load=False):
    """
    Setter method for local_aggregates, mapped from YANG variable /network_instances/network_instance/protocols/protocol/local_aggregates (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_aggregates is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_aggregates() directly.

    YANG Description: Enclosing container for locally-defined aggregate
routes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_local_aggregates_openconfig_network_instance__network_instances_network_instance_protocols_protocol_local_aggregates, is_container='container', yang_name="local-aggregates", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_aggregates must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_local_aggregates_openconfig_network_instance__network_instances_network_instance_protocols_protocol_local_aggregates, is_container='container', yang_name="local-aggregates", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__local_aggregates = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_aggregates(self):
    self.__local_aggregates = YANGDynClass(base=yc_local_aggregates_openconfig_network_instance__network_instances_network_instance_protocols_protocol_local_aggregates, is_container='container', yang_name="local-aggregates", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_bgp(self):
    """
    Getter method for bgp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp (container)

    YANG Description: Top-level configuration and state for the BGP router
    """
    return self.__bgp
      
  def _set_bgp(self, v, load=False):
    """
    Setter method for bgp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bgp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bgp() directly.

    YANG Description: Top-level configuration and state for the BGP router
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_bgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp, is_container='container', yang_name="bgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bgp must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_bgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp, is_container='container', yang_name="bgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__bgp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bgp(self):
    self.__bgp = YANGDynClass(base=yc_bgp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_bgp, is_container='container', yang_name="bgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_ospfv2(self):
    """
    Getter method for ospfv2, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2 (container)

    YANG Description: Top-level configuration and operational state for
Open Shortest Path First (OSPF) v2
    """
    return self.__ospfv2
      
  def _set_ospfv2(self, v, load=False):
    """
    Setter method for ospfv2, mapped from YANG variable /network_instances/network_instance/protocols/protocol/ospfv2 (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ospfv2 is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ospfv2() directly.

    YANG Description: Top-level configuration and operational state for
Open Shortest Path First (OSPF) v2
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ospfv2_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2, is_container='container', yang_name="ospfv2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ospfv2 must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ospfv2_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2, is_container='container', yang_name="ospfv2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__ospfv2 = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ospfv2(self):
    self.__ospfv2 = YANGDynClass(base=yc_ospfv2_openconfig_network_instance__network_instances_network_instance_protocols_protocol_ospfv2, is_container='container', yang_name="ospfv2", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_isis(self):
    """
    Getter method for isis, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis (container)

    YANG Description: This container defines top-level ISIS configuration and state
information.
    """
    return self.__isis
      
  def _set_isis(self, v, load=False):
    """
    Setter method for isis, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_isis is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_isis() directly.

    YANG Description: This container defines top-level ISIS configuration and state
information.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_isis_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis, is_container='container', yang_name="isis", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """isis must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_isis_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis, is_container='container', yang_name="isis", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__isis = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_isis(self):
    self.__isis = YANGDynClass(base=yc_isis_openconfig_network_instance__network_instances_network_instance_protocols_protocol_isis, is_container='container', yang_name="isis", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_pim(self):
    """
    Getter method for pim, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim (container)

    YANG Description: Top-level PIM configuration and operational state.
    """
    return self.__pim
      
  def _set_pim(self, v, load=False):
    """
    Setter method for pim, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pim (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pim is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pim() directly.

    YANG Description: Top-level PIM configuration and operational state.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_pim_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim, is_container='container', yang_name="pim", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pim must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_pim_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim, is_container='container', yang_name="pim", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__pim = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_pim(self):
    self.__pim = YANGDynClass(base=yc_pim_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pim, is_container='container', yang_name="pim", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_igmp(self):
    """
    Getter method for igmp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp (container)

    YANG Description: Top-level IGMP configuration and operational state.
    """
    return self.__igmp
      
  def _set_igmp(self, v, load=False):
    """
    Setter method for igmp, mapped from YANG variable /network_instances/network_instance/protocols/protocol/igmp (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_igmp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_igmp() directly.

    YANG Description: Top-level IGMP configuration and operational state.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_igmp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp, is_container='container', yang_name="igmp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """igmp must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_igmp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp, is_container='container', yang_name="igmp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__igmp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_igmp(self):
    self.__igmp = YANGDynClass(base=yc_igmp_openconfig_network_instance__network_instances_network_instance_protocols_protocol_igmp, is_container='container', yang_name="igmp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_pcep(self):
    """
    Getter method for pcep, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep (container)

    YANG Description: Top-level PCEP configuration and operational state.
    """
    return self.__pcep
      
  def _set_pcep(self, v, load=False):
    """
    Setter method for pcep, mapped from YANG variable /network_instances/network_instance/protocols/protocol/pcep (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pcep is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pcep() directly.

    YANG Description: Top-level PCEP configuration and operational state.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_pcep_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep, is_container='container', yang_name="pcep", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pcep must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_pcep_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep, is_container='container', yang_name="pcep", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__pcep = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_pcep(self):
    self.__pcep = YANGDynClass(base=yc_pcep_openconfig_network_instance__network_instances_network_instance_protocols_protocol_pcep, is_container='container', yang_name="pcep", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  identifier = __builtin__.property(_get_identifier, _set_identifier)
  name = __builtin__.property(_get_name, _set_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  static_routes = __builtin__.property(_get_static_routes, _set_static_routes)
  local_aggregates = __builtin__.property(_get_local_aggregates, _set_local_aggregates)
  bgp = __builtin__.property(_get_bgp, _set_bgp)
  ospfv2 = __builtin__.property(_get_ospfv2, _set_ospfv2)
  isis = __builtin__.property(_get_isis, _set_isis)
  pim = __builtin__.property(_get_pim, _set_pim)
  igmp = __builtin__.property(_get_igmp, _set_igmp)
  pcep = __builtin__.property(_get_pcep, _set_pcep)


  _pyangbind_elements = OrderedDict([('identifier', identifier), ('name', name), ('config', config), ('state', state), ('static_routes', static_routes), ('local_aggregates', local_aggregates), ('bgp', bgp), ('ospfv2', ospfv2), ('isis', isis), ('pim', pim), ('igmp', igmp), ('pcep', pcep), ])


class yc_protocols_openconfig_network_instance__network_instances_network_instance_protocols(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The routing protocols that are enabled for this
network-instance.
  """
  __slots__ = ('_path_helper', '_extmethods', '__protocol',)

  _yang_name = 'protocols'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__protocol = YANGDynClass(base=YANGListType("identifier name",yc_protocol_openconfig_network_instance__network_instances_network_instance_protocols_protocol, yang_name="protocol", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='identifier name', extensions=None), is_container='list', yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'protocols']

  def _get_protocol(self):
    """
    Getter method for protocol, mapped from YANG variable /network_instances/network_instance/protocols/protocol (list)

    YANG Description: A process (instance) of a routing protocol. Some
systems may not support more than one instance of
a particular routing protocol
    """
    return self.__protocol
      
  def _set_protocol(self, v, load=False):
    """
    Setter method for protocol, mapped from YANG variable /network_instances/network_instance/protocols/protocol (list)
    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: A process (instance) of a routing protocol. Some
systems may not support more than one instance of
a particular routing protocol
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("identifier name",yc_protocol_openconfig_network_instance__network_instances_network_instance_protocols_protocol, yang_name="protocol", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='identifier name', extensions=None), is_container='list', yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """protocol must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("identifier name",yc_protocol_openconfig_network_instance__network_instances_network_instance_protocols_protocol, yang_name="protocol", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='identifier name', extensions=None), is_container='list', yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__protocol = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_protocol(self):
    self.__protocol = YANGDynClass(base=YANGListType("identifier name",yc_protocol_openconfig_network_instance__network_instances_network_instance_protocols_protocol, yang_name="protocol", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='identifier name', extensions=None), is_container='list', yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  protocol = __builtin__.property(_get_protocol, _set_protocol)


  _pyangbind_elements = OrderedDict([('protocol', protocol), ])


class yc_network_instance_openconfig_network_instance__network_instances_network_instance(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances/network-instance. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Network instances configured on the local system

IPv4 and IPv6 forwarding are enabled by default within an L3
network-instance and subsequently, routes can be populated
into the network-instance using protocols that enable IPv4 and
IPv6 configuration without explicitly enabling these.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state','__fdb','__evpn','__encapsulation','__inter_instance_policies','__table_connections','__interfaces','__route_limits','__tables','__connection_points','__mpls','__segment_routing','__vlans','__policy_forwarding','__afts','__protocols',)

  _yang_name = 'network-instance'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance__network_instances_network_instance_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance__network_instances_network_instance_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__fdb = YANGDynClass(base=yc_fdb_openconfig_network_instance__network_instances_network_instance_fdb, is_container='container', yang_name="fdb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__evpn = YANGDynClass(base=yc_evpn_openconfig_network_instance__network_instances_network_instance_evpn, is_container='container', yang_name="evpn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__encapsulation = YANGDynClass(base=yc_encapsulation_openconfig_network_instance__network_instances_network_instance_encapsulation, is_container='container', yang_name="encapsulation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__inter_instance_policies = YANGDynClass(base=yc_inter_instance_policies_openconfig_network_instance__network_instances_network_instance_inter_instance_policies, is_container='container', yang_name="inter-instance-policies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__table_connections = YANGDynClass(base=yc_table_connections_openconfig_network_instance__network_instances_network_instance_table_connections, is_container='container', yang_name="table-connections", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__interfaces = YANGDynClass(base=yc_interfaces_openconfig_network_instance__network_instances_network_instance_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__route_limits = YANGDynClass(base=yc_route_limits_openconfig_network_instance__network_instances_network_instance_route_limits, is_container='container', yang_name="route-limits", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__tables = YANGDynClass(base=yc_tables_openconfig_network_instance__network_instances_network_instance_tables, is_container='container', yang_name="tables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__connection_points = YANGDynClass(base=yc_connection_points_openconfig_network_instance__network_instances_network_instance_connection_points, is_container='container', yang_name="connection-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__mpls = YANGDynClass(base=yc_mpls_openconfig_network_instance__network_instances_network_instance_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__segment_routing = YANGDynClass(base=yc_segment_routing_openconfig_network_instance__network_instances_network_instance_segment_routing, is_container='container', yang_name="segment-routing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__vlans = YANGDynClass(base=yc_vlans_openconfig_network_instance__network_instances_network_instance_vlans, is_container='container', yang_name="vlans", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__policy_forwarding = YANGDynClass(base=yc_policy_forwarding_openconfig_network_instance__network_instances_network_instance_policy_forwarding, is_container='container', yang_name="policy-forwarding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__afts = YANGDynClass(base=yc_afts_openconfig_network_instance__network_instances_network_instance_afts, is_container='container', yang_name="afts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__protocols = YANGDynClass(base=yc_protocols_openconfig_network_instance__network_instances_network_instance_protocols, is_container='container', yang_name="protocols", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/name (leafref)

    YANG Description: A unique name identifying the network instance
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/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: A unique name identifying the network instance
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/config (container)

    YANG Description: Configuration parameters relating to a network
instance
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/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 network
instance
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance__network_instances_network_instance_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/state (container)

    YANG Description: Operational state parameters relating to a network
instance
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/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 network
instance
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance__network_instances_network_instance_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_fdb(self):
    """
    Getter method for fdb, mapped from YANG variable /network_instances/network_instance/fdb (container)

    YANG Description: Operational state and configuration parameters relating to
the forwarding database of the network instance
    """
    return self.__fdb
      
  def _set_fdb(self, v, load=False):
    """
    Setter method for fdb, mapped from YANG variable /network_instances/network_instance/fdb (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_fdb is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_fdb() directly.

    YANG Description: Operational state and configuration parameters relating to
the forwarding database of the network instance
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_fdb_openconfig_network_instance__network_instances_network_instance_fdb, is_container='container', yang_name="fdb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """fdb must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_fdb_openconfig_network_instance__network_instances_network_instance_fdb, is_container='container', yang_name="fdb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__fdb = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_fdb(self):
    self.__fdb = YANGDynClass(base=yc_fdb_openconfig_network_instance__network_instances_network_instance_fdb, is_container='container', yang_name="fdb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_evpn(self):
    """
    Getter method for evpn, mapped from YANG variable /network_instances/network_instance/evpn (container)

    YANG Description: Configuration of parameters for EVPN related bridge domains
(MAC VRFs) and layer3 VRFs (IP VRFs)
    """
    return self.__evpn
      
  def _set_evpn(self, v, load=False):
    """
    Setter method for evpn, mapped from YANG variable /network_instances/network_instance/evpn (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_evpn is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_evpn() directly.

    YANG Description: Configuration of parameters for EVPN related bridge domains
(MAC VRFs) and layer3 VRFs (IP VRFs)
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_evpn_openconfig_network_instance__network_instances_network_instance_evpn, is_container='container', yang_name="evpn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """evpn must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_evpn_openconfig_network_instance__network_instances_network_instance_evpn, is_container='container', yang_name="evpn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__evpn = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_evpn(self):
    self.__evpn = YANGDynClass(base=yc_evpn_openconfig_network_instance__network_instances_network_instance_evpn, is_container='container', yang_name="evpn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_encapsulation(self):
    """
    Getter method for encapsulation, mapped from YANG variable /network_instances/network_instance/encapsulation (container)

    YANG Description: Configuration parameters relating to the encapsulation
used for the network instance
    """
    return self.__encapsulation
      
  def _set_encapsulation(self, v, load=False):
    """
    Setter method for encapsulation, mapped from YANG variable /network_instances/network_instance/encapsulation (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_encapsulation is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_encapsulation() directly.

    YANG Description: Configuration parameters relating to the encapsulation
used for the network instance
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_encapsulation_openconfig_network_instance__network_instances_network_instance_encapsulation, is_container='container', yang_name="encapsulation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """encapsulation must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_encapsulation_openconfig_network_instance__network_instances_network_instance_encapsulation, is_container='container', yang_name="encapsulation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__encapsulation = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_encapsulation(self):
    self.__encapsulation = YANGDynClass(base=yc_encapsulation_openconfig_network_instance__network_instances_network_instance_encapsulation, is_container='container', yang_name="encapsulation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_inter_instance_policies(self):
    """
    Getter method for inter_instance_policies, mapped from YANG variable /network_instances/network_instance/inter_instance_policies (container)

    YANG Description: Policies dictating how RIB or FIB entries are imported
to and exported from this instance
    """
    return self.__inter_instance_policies
      
  def _set_inter_instance_policies(self, v, load=False):
    """
    Setter method for inter_instance_policies, mapped from YANG variable /network_instances/network_instance/inter_instance_policies (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_inter_instance_policies is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_inter_instance_policies() directly.

    YANG Description: Policies dictating how RIB or FIB entries are imported
to and exported from this instance
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_inter_instance_policies_openconfig_network_instance__network_instances_network_instance_inter_instance_policies, is_container='container', yang_name="inter-instance-policies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """inter_instance_policies must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_inter_instance_policies_openconfig_network_instance__network_instances_network_instance_inter_instance_policies, is_container='container', yang_name="inter-instance-policies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__inter_instance_policies = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_inter_instance_policies(self):
    self.__inter_instance_policies = YANGDynClass(base=yc_inter_instance_policies_openconfig_network_instance__network_instances_network_instance_inter_instance_policies, is_container='container', yang_name="inter-instance-policies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_table_connections(self):
    """
    Getter method for table_connections, mapped from YANG variable /network_instances/network_instance/table_connections (container)

    YANG Description: Policies dictating how RIB or FIB entries are propagated
between tables
    """
    return self.__table_connections
      
  def _set_table_connections(self, v, load=False):
    """
    Setter method for table_connections, mapped from YANG variable /network_instances/network_instance/table_connections (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_table_connections is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_table_connections() directly.

    YANG Description: Policies dictating how RIB or FIB entries are propagated
between tables
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_table_connections_openconfig_network_instance__network_instances_network_instance_table_connections, is_container='container', yang_name="table-connections", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """table_connections must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_table_connections_openconfig_network_instance__network_instances_network_instance_table_connections, is_container='container', yang_name="table-connections", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__table_connections = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_table_connections(self):
    self.__table_connections = YANGDynClass(base=yc_table_connections_openconfig_network_instance__network_instances_network_instance_table_connections, is_container='container', yang_name="table-connections", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_interfaces(self):
    """
    Getter method for interfaces, mapped from YANG variable /network_instances/network_instance/interfaces (container)

    YANG Description: The interfaces that are associated with this network
instance
    """
    return self.__interfaces
      
  def _set_interfaces(self, v, load=False):
    """
    Setter method for interfaces, mapped from YANG variable /network_instances/network_instance/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: The interfaces that are associated with this network
instance
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interfaces_openconfig_network_instance__network_instances_network_instance_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_route_limits(self):
    """
    Getter method for route_limits, mapped from YANG variable /network_instances/network_instance/route_limits (container)

    YANG Description: Configuration and operational state relating to the
maximum number of routes for the address family that
should be allowed within the Layer 3 network instance.

When the specified value is reached, no further prefixes
should be installed into the system's RIB from this network
instance unless the warning only leaf is set. In this case,
new routes should still be installed. If a alarm threshold
is specified, then this should be used to generate
alarms via telemetry for the network instance.
    """
    return self.__route_limits
      
  def _set_route_limits(self, v, load=False):
    """
    Setter method for route_limits, mapped from YANG variable /network_instances/network_instance/route_limits (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route_limits is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route_limits() directly.

    YANG Description: Configuration and operational state relating to the
maximum number of routes for the address family that
should be allowed within the Layer 3 network instance.

When the specified value is reached, no further prefixes
should be installed into the system's RIB from this network
instance unless the warning only leaf is set. In this case,
new routes should still be installed. If a alarm threshold
is specified, then this should be used to generate
alarms via telemetry for the network instance.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_route_limits_openconfig_network_instance__network_instances_network_instance_route_limits, is_container='container', yang_name="route-limits", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route_limits must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_route_limits_openconfig_network_instance__network_instances_network_instance_route_limits, is_container='container', yang_name="route-limits", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__route_limits = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route_limits(self):
    self.__route_limits = YANGDynClass(base=yc_route_limits_openconfig_network_instance__network_instances_network_instance_route_limits, is_container='container', yang_name="route-limits", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_tables(self):
    """
    Getter method for tables, mapped from YANG variable /network_instances/network_instance/tables (container)

    YANG Description: The routing tables that are managed by this network
instance
    """
    return self.__tables
      
  def _set_tables(self, v, load=False):
    """
    Setter method for tables, mapped from YANG variable /network_instances/network_instance/tables (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tables is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tables() directly.

    YANG Description: The routing tables that are managed by this network
instance
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_tables_openconfig_network_instance__network_instances_network_instance_tables, is_container='container', yang_name="tables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tables must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_tables_openconfig_network_instance__network_instances_network_instance_tables, is_container='container', yang_name="tables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__tables = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tables(self):
    self.__tables = YANGDynClass(base=yc_tables_openconfig_network_instance__network_instances_network_instance_tables, is_container='container', yang_name="tables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_connection_points(self):
    """
    Getter method for connection_points, mapped from YANG variable /network_instances/network_instance/connection_points (container)

    YANG Description: The set of connection points within a forwarding
instance
    """
    return self.__connection_points
      
  def _set_connection_points(self, v, load=False):
    """
    Setter method for connection_points, mapped from YANG variable /network_instances/network_instance/connection_points (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_connection_points is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_connection_points() directly.

    YANG Description: The set of connection points within a forwarding
instance
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_connection_points_openconfig_network_instance__network_instances_network_instance_connection_points, is_container='container', yang_name="connection-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """connection_points must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_connection_points_openconfig_network_instance__network_instances_network_instance_connection_points, is_container='container', yang_name="connection-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__connection_points = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_connection_points(self):
    self.__connection_points = YANGDynClass(base=yc_connection_points_openconfig_network_instance__network_instances_network_instance_connection_points, is_container='container', yang_name="connection-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_mpls(self):
    """
    Getter method for mpls, mapped from YANG variable /network_instances/network_instance/mpls (container)

    YANG Description: Anchor point for mpls configuration and operational
data
    """
    return self.__mpls
      
  def _set_mpls(self, v, load=False):
    """
    Setter method for mpls, mapped from YANG variable /network_instances/network_instance/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: Anchor point for mpls configuration and operational
data
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_mpls_openconfig_network_instance__network_instances_network_instance_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance__network_instances_network_instance_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_segment_routing(self):
    """
    Getter method for segment_routing, mapped from YANG variable /network_instances/network_instance/segment_routing (container)

    YANG Description: Configuration and operational state parameters relating to
segment routing.
    """
    return self.__segment_routing
      
  def _set_segment_routing(self, v, load=False):
    """
    Setter method for segment_routing, mapped from YANG variable /network_instances/network_instance/segment_routing (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_segment_routing is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_segment_routing() directly.

    YANG Description: Configuration and operational state parameters relating to
segment routing.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_segment_routing_openconfig_network_instance__network_instances_network_instance_segment_routing, is_container='container', yang_name="segment-routing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """segment_routing must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_segment_routing_openconfig_network_instance__network_instances_network_instance_segment_routing, is_container='container', yang_name="segment-routing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__segment_routing = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_segment_routing(self):
    self.__segment_routing = YANGDynClass(base=yc_segment_routing_openconfig_network_instance__network_instances_network_instance_segment_routing, is_container='container', yang_name="segment-routing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_vlans(self):
    """
    Getter method for vlans, mapped from YANG variable /network_instances/network_instance/vlans (container)

    YANG Description: Container for VLAN configuration and state
variables
    """
    return self.__vlans
      
  def _set_vlans(self, v, load=False):
    """
    Setter method for vlans, mapped from YANG variable /network_instances/network_instance/vlans (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_vlans is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_vlans() directly.

    YANG Description: Container for VLAN configuration and state
variables
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_vlans_openconfig_network_instance__network_instances_network_instance_vlans, is_container='container', yang_name="vlans", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """vlans must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_vlans_openconfig_network_instance__network_instances_network_instance_vlans, is_container='container', yang_name="vlans", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__vlans = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_vlans(self):
    self.__vlans = YANGDynClass(base=yc_vlans_openconfig_network_instance__network_instances_network_instance_vlans, is_container='container', yang_name="vlans", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_policy_forwarding(self):
    """
    Getter method for policy_forwarding, mapped from YANG variable /network_instances/network_instance/policy_forwarding (container)

    YANG Description: Configuration and operational state relating to policy-forwarding within
a network instance.
    """
    return self.__policy_forwarding
      
  def _set_policy_forwarding(self, v, load=False):
    """
    Setter method for policy_forwarding, mapped from YANG variable /network_instances/network_instance/policy_forwarding (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_policy_forwarding is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_policy_forwarding() directly.

    YANG Description: Configuration and operational state relating to policy-forwarding within
a network instance.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_policy_forwarding_openconfig_network_instance__network_instances_network_instance_policy_forwarding, is_container='container', yang_name="policy-forwarding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """policy_forwarding must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_policy_forwarding_openconfig_network_instance__network_instances_network_instance_policy_forwarding, is_container='container', yang_name="policy-forwarding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__policy_forwarding = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_policy_forwarding(self):
    self.__policy_forwarding = YANGDynClass(base=yc_policy_forwarding_openconfig_network_instance__network_instances_network_instance_policy_forwarding, is_container='container', yang_name="policy-forwarding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_afts(self):
    """
    Getter method for afts, mapped from YANG variable /network_instances/network_instance/afts (container)

    YANG Description: The abstract forwarding tables (AFTs) that are associated
with the network instance. An AFT is instantiated per-protocol
running within the network-instance - such that one exists for
IPv4 Unicast, IPv6 Unicast, MPLS, L2 forwarding entries, etc.
A forwarding entry within the FIB has a set of next-hops,
which may be a reference to an entry within another table -
e.g., where a Layer 3 next-hop has an associated Layer 2
forwarding entry.
    """
    return self.__afts
      
  def _set_afts(self, v, load=False):
    """
    Setter method for afts, mapped from YANG variable /network_instances/network_instance/afts (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afts() directly.

    YANG Description: The abstract forwarding tables (AFTs) that are associated
with the network instance. An AFT is instantiated per-protocol
running within the network-instance - such that one exists for
IPv4 Unicast, IPv6 Unicast, MPLS, L2 forwarding entries, etc.
A forwarding entry within the FIB has a set of next-hops,
which may be a reference to an entry within another table -
e.g., where a Layer 3 next-hop has an associated Layer 2
forwarding entry.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_afts_openconfig_network_instance__network_instances_network_instance_afts, is_container='container', yang_name="afts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afts must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_afts_openconfig_network_instance__network_instances_network_instance_afts, is_container='container', yang_name="afts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__afts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afts(self):
    self.__afts = YANGDynClass(base=yc_afts_openconfig_network_instance__network_instances_network_instance_afts, is_container='container', yang_name="afts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_protocols(self):
    """
    Getter method for protocols, mapped from YANG variable /network_instances/network_instance/protocols (container)

    YANG Description: The routing protocols that are enabled for this
network-instance.
    """
    return self.__protocols
      
  def _set_protocols(self, v, load=False):
    """
    Setter method for protocols, mapped from YANG variable /network_instances/network_instance/protocols (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_protocols is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_protocols() directly.

    YANG Description: The routing protocols that are enabled for this
network-instance.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_protocols_openconfig_network_instance__network_instances_network_instance_protocols, is_container='container', yang_name="protocols", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """protocols must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_protocols_openconfig_network_instance__network_instances_network_instance_protocols, is_container='container', yang_name="protocols", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__protocols = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_protocols(self):
    self.__protocols = YANGDynClass(base=yc_protocols_openconfig_network_instance__network_instances_network_instance_protocols, is_container='container', yang_name="protocols", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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)
  fdb = __builtin__.property(_get_fdb, _set_fdb)
  evpn = __builtin__.property(_get_evpn, _set_evpn)
  encapsulation = __builtin__.property(_get_encapsulation, _set_encapsulation)
  inter_instance_policies = __builtin__.property(_get_inter_instance_policies, _set_inter_instance_policies)
  table_connections = __builtin__.property(_get_table_connections, _set_table_connections)
  interfaces = __builtin__.property(_get_interfaces, _set_interfaces)
  route_limits = __builtin__.property(_get_route_limits, _set_route_limits)
  tables = __builtin__.property(_get_tables, _set_tables)
  connection_points = __builtin__.property(_get_connection_points, _set_connection_points)
  mpls = __builtin__.property(_get_mpls, _set_mpls)
  segment_routing = __builtin__.property(_get_segment_routing, _set_segment_routing)
  vlans = __builtin__.property(_get_vlans, _set_vlans)
  policy_forwarding = __builtin__.property(_get_policy_forwarding, _set_policy_forwarding)
  afts = __builtin__.property(_get_afts, _set_afts)
  protocols = __builtin__.property(_get_protocols, _set_protocols)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ('fdb', fdb), ('evpn', evpn), ('encapsulation', encapsulation), ('inter_instance_policies', inter_instance_policies), ('table_connections', table_connections), ('interfaces', interfaces), ('route_limits', route_limits), ('tables', tables), ('connection_points', connection_points), ('mpls', mpls), ('segment_routing', segment_routing), ('vlans', vlans), ('policy_forwarding', policy_forwarding), ('afts', afts), ('protocols', protocols), ])


class yc_network_instances_openconfig_network_instance__network_instances(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /network-instances. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The L2, L3, or L2+L3 forwarding instances that are
configured on the local system
  """
  __slots__ = ('_path_helper', '_extmethods', '__network_instance',)

  _yang_name = 'network-instances'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__network_instance = YANGDynClass(base=YANGListType("name",yc_network_instance_openconfig_network_instance__network_instances_network_instance, yang_name="network-instance", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances']

  def _get_network_instance(self):
    """
    Getter method for network_instance, mapped from YANG variable /network_instances/network_instance (list)

    YANG Description: Network instances configured on the local system

IPv4 and IPv6 forwarding are enabled by default within an L3
network-instance and subsequently, routes can be populated
into the network-instance using protocols that enable IPv4 and
IPv6 configuration without explicitly enabling these.
    """
    return self.__network_instance
      
  def _set_network_instance(self, v, load=False):
    """
    Setter method for network_instance, mapped from YANG variable /network_instances/network_instance (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_network_instance is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_network_instance() directly.

    YANG Description: Network instances configured on the local system

IPv4 and IPv6 forwarding are enabled by default within an L3
network-instance and subsequently, routes can be populated
into the network-instance using protocols that enable IPv4 and
IPv6 configuration without explicitly enabling these.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_network_instance_openconfig_network_instance__network_instances_network_instance, yang_name="network-instance", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """network_instance must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_network_instance_openconfig_network_instance__network_instances_network_instance, yang_name="network-instance", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__network_instance = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_network_instance(self):
    self.__network_instance = YANGDynClass(base=YANGListType("name",yc_network_instance_openconfig_network_instance__network_instances_network_instance, yang_name="network-instance", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  network_instance = __builtin__.property(_get_network_instance, _set_network_instance)


  _pyangbind_elements = OrderedDict([('network_instance', network_instance), ])


class openconfig_network_instance(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance - based on the path /openconfig-network-instance. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: An OpenConfig description of a network-instance. This may be
a Layer 3 forwarding construct such as a virtual routing and
forwarding (VRF) instance, or a Layer 2 instance such as a
virtual switch instance (VSI). Mixed Layer 2 and Layer 3
instances are also supported.
  """
  __slots__ = ('_path_helper', '_extmethods', '__network_instances',)

  _yang_name = 'openconfig-network-instance'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__network_instances = YANGDynClass(base=yc_network_instances_openconfig_network_instance__network_instances, is_container='container', yang_name="network-instances", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instances(self):
    """
    Getter method for network_instances, mapped from YANG variable /network_instances (container)

    YANG Description: The L2, L3, or L2+L3 forwarding instances that are
configured on the local system
    """
    return self.__network_instances
      
  def _set_network_instances(self, v, load=False):
    """
    Setter method for network_instances, mapped from YANG variable /network_instances (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_network_instances is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_network_instances() directly.

    YANG Description: The L2, L3, or L2+L3 forwarding instances that are
configured on the local system
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_network_instances_openconfig_network_instance__network_instances, is_container='container', yang_name="network-instances", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """network_instances must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_network_instances_openconfig_network_instance__network_instances, is_container='container', yang_name="network-instances", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__network_instances = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_network_instances(self):
    self.__network_instances = YANGDynClass(base=yc_network_instances_openconfig_network_instance__network_instances, is_container='container', yang_name="network-instances", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  network_instances = __builtin__.property(_get_network_instances, _set_network_instances)


  _pyangbind_elements = OrderedDict([('network_instances', network_instances), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/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 network
instance
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__type','__description','__router_id','__route_distinguisher','__fallback_network_instance',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DEFAULT_INSTANCE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:DEFAULT_INSTANCE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L3VRF': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L3VRF': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2VSI': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2VSI': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2P2P': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2P2P': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2L3': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2L3': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__description = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__router_id = 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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:dotted-quad', is_config=True)
    self.__route_distinguisher = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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])'}),], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', is_config=True)
    self.__fallback_network_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="fallback-network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='network-instance-ref', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/config/name (string)

    YANG Description: An operator-assigned unique name for the network instance.
If the operator does not designate a name for the instance of
type 'DEFAULT_INSTANCE' (e.g. config), the implementation
should use the name of 'DEFAULT' (e.g. state).
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/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: An operator-assigned unique name for the network instance.
If the operator does not designate a name for the instance of
type 'DEFAULT_INSTANCE' (e.g. config), the implementation
should use the name of 'DEFAULT' (e.g. state).
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/config/type (identityref)

    YANG Description: The type of network instance. The value of this leaf
indicates the type of forwarding entries that should be
supported by this network instance. Signalling protocols also
use the network instance type to infer the type of service
they advertise; for example MPLS signalling for an L2VSI
network instance would infer a VPLS service whereas a type of
L2PTP would infer a VPWS (pseudo-wire) service.

An implementation must support only a single network-instance
of type 'DEFAULT_INSTANCE'.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/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: The type of network instance. The value of this leaf
indicates the type of forwarding entries that should be
supported by this network instance. Signalling protocols also
use the network instance type to infer the type of service
they advertise; for example MPLS signalling for an L2VSI
network instance would infer a VPLS service whereas a type of
L2PTP would infer a VPWS (pseudo-wire) service.

An implementation must support only a single network-instance
of type 'DEFAULT_INSTANCE'.
    """
    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={'DEFAULT_INSTANCE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:DEFAULT_INSTANCE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L3VRF': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L3VRF': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2VSI': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2VSI': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2P2P': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2P2P': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2L3': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2L3': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DEFAULT_INSTANCE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:DEFAULT_INSTANCE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L3VRF': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L3VRF': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2VSI': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2VSI': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2P2P': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2P2P': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2L3': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2L3': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-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/network-instance', defining_module='openconfig-network-instance', 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={'DEFAULT_INSTANCE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:DEFAULT_INSTANCE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L3VRF': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L3VRF': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2VSI': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2VSI': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2P2P': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2P2P': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2L3': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2L3': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_description(self):
    """
    Getter method for description, mapped from YANG variable /network_instances/network_instance/config/description (string)

    YANG Description: A free-form string to be used by the network operator to
describe the function of this network instance
    """
    return self.__description
      
  def _set_description(self, v, load=False):
    """
    Setter method for description, mapped from YANG variable /network_instances/network_instance/config/description (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_description is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_description() directly.

    YANG Description: A free-form string to be used by the network operator to
describe the function of this network instance
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """description must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)""",
        })

    self.__description = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_description(self):
    self.__description = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_router_id(self):
    """
    Getter method for router_id, mapped from YANG variable /network_instances/network_instance/config/router_id (oc-yang:dotted-quad)

    YANG Description: A identifier for the local network instance - typically
used within associated routing protocols or signalling
routing information in another network instance
    """
    return self.__router_id
      
  def _set_router_id(self, v, load=False):
    """
    Setter method for router_id, mapped from YANG variable /network_instances/network_instance/config/router_id (oc-yang:dotted-quad)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_router_id() directly.

    YANG Description: A identifier for the local network instance - typically
used within associated routing protocols or signalling
routing information in another network instance
    """
    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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:dotted-quad', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """router_id must be of a type compatible with oc-yang:dotted-quad""",
          'defined-type': "oc-yang:dotted-quad",
          '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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:dotted-quad', is_config=True)""",
        })

    self.__router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_router_id(self):
    self.__router_id = 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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:dotted-quad', is_config=True)


  def _get_route_distinguisher(self):
    """
    Getter method for route_distinguisher, mapped from YANG variable /network_instances/network_instance/config/route_distinguisher (oc-ni-types:route-distinguisher)

    YANG Description: The route distinguisher that should be used for the local
VRF or VSI instance when it is signalled via BGP.
    """
    return self.__route_distinguisher
      
  def _set_route_distinguisher(self, v, load=False):
    """
    Setter method for route_distinguisher, mapped from YANG variable /network_instances/network_instance/config/route_distinguisher (oc-ni-types:route-distinguisher)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route_distinguisher is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route_distinguisher() directly.

    YANG Description: The route distinguisher that should be used for the local
VRF or VSI instance when it is signalled via BGP.
    """
    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,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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])'}),], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route_distinguisher must be of a type compatible with oc-ni-types:route-distinguisher""",
          'defined-type': "oc-ni-types:route-distinguisher",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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])'}),], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', is_config=True)""",
        })

    self.__route_distinguisher = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route_distinguisher(self):
    self.__route_distinguisher = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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])'}),], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', is_config=True)


  def _get_fallback_network_instance(self):
    """
    Getter method for fallback_network_instance, mapped from YANG variable /network_instances/network_instance/config/fallback_network_instance (network-instance-ref)

    YANG Description: When this leaf is populated, the specified network instance
should be used as a fallback instance when a route cannot
be resolved in the local network-instance.
This configuration is only valid when specified in a non-default
instance which must be a L3 capable VRF (i.e., L2L3, or L3VRF).
    """
    return self.__fallback_network_instance
      
  def _set_fallback_network_instance(self, v, load=False):
    """
    Setter method for fallback_network_instance, mapped from YANG variable /network_instances/network_instance/config/fallback_network_instance (network-instance-ref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_fallback_network_instance is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_fallback_network_instance() directly.

    YANG Description: When this leaf is populated, the specified network instance
should be used as a fallback instance when a route cannot
be resolved in the local network-instance.
This configuration is only valid when specified in a non-default
instance which must be a L3 capable VRF (i.e., L2L3, or L3VRF).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="fallback-network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='network-instance-ref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """fallback_network_instance must be of a type compatible with network-instance-ref""",
          'defined-type': "openconfig-network-instance:network-instance-ref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="fallback-network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='network-instance-ref', is_config=True)""",
        })

    self.__fallback_network_instance = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_fallback_network_instance(self):
    self.__fallback_network_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="fallback-network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='network-instance-ref', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  type = __builtin__.property(_get_type, _set_type)
  description = __builtin__.property(_get_description, _set_description)
  router_id = __builtin__.property(_get_router_id, _set_router_id)
  route_distinguisher = __builtin__.property(_get_route_distinguisher, _set_route_distinguisher)
  fallback_network_instance = __builtin__.property(_get_fallback_network_instance, _set_fallback_network_instance)


  _pyangbind_elements = OrderedDict([('name', name), ('type', type), ('description', description), ('router_id', router_id), ('route_distinguisher', route_distinguisher), ('fallback_network_instance', fallback_network_instance), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/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 network
instance
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__type','__description','__router_id','__route_distinguisher','__fallback_network_instance',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DEFAULT_INSTANCE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:DEFAULT_INSTANCE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L3VRF': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L3VRF': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2VSI': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2VSI': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2P2P': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2P2P': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2L3': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2L3': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__description = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__router_id = 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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:dotted-quad', is_config=False)
    self.__route_distinguisher = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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])'}),], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', is_config=False)
    self.__fallback_network_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="fallback-network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='network-instance-ref', 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 ['network-instances', 'network-instance', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/state/name (string)

    YANG Description: An operator-assigned unique name for the network instance.
If the operator does not designate a name for the instance of
type 'DEFAULT_INSTANCE' (e.g. config), the implementation
should use the name of 'DEFAULT' (e.g. state).
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/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: An operator-assigned unique name for the network instance.
If the operator does not designate a name for the instance of
type 'DEFAULT_INSTANCE' (e.g. config), the implementation
should use the name of 'DEFAULT' (e.g. state).
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/state/type (identityref)

    YANG Description: The type of network instance. The value of this leaf
indicates the type of forwarding entries that should be
supported by this network instance. Signalling protocols also
use the network instance type to infer the type of service
they advertise; for example MPLS signalling for an L2VSI
network instance would infer a VPLS service whereas a type of
L2PTP would infer a VPWS (pseudo-wire) service.

An implementation must support only a single network-instance
of type 'DEFAULT_INSTANCE'.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/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: The type of network instance. The value of this leaf
indicates the type of forwarding entries that should be
supported by this network instance. Signalling protocols also
use the network instance type to infer the type of service
they advertise; for example MPLS signalling for an L2VSI
network instance would infer a VPLS service whereas a type of
L2PTP would infer a VPWS (pseudo-wire) service.

An implementation must support only a single network-instance
of type 'DEFAULT_INSTANCE'.
    """
    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={'DEFAULT_INSTANCE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:DEFAULT_INSTANCE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L3VRF': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L3VRF': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2VSI': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2VSI': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2P2P': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2P2P': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2L3': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2L3': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DEFAULT_INSTANCE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:DEFAULT_INSTANCE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L3VRF': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L3VRF': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2VSI': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2VSI': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2P2P': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2P2P': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2L3': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2L3': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-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/network-instance', defining_module='openconfig-network-instance', 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={'DEFAULT_INSTANCE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:DEFAULT_INSTANCE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L3VRF': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L3VRF': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2VSI': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2VSI': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2P2P': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2P2P': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2L3': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2L3': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_description(self):
    """
    Getter method for description, mapped from YANG variable /network_instances/network_instance/state/description (string)

    YANG Description: A free-form string to be used by the network operator to
describe the function of this network instance
    """
    return self.__description
      
  def _set_description(self, v, load=False):
    """
    Setter method for description, mapped from YANG variable /network_instances/network_instance/state/description (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_description is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_description() directly.

    YANG Description: A free-form string to be used by the network operator to
describe the function of this network instance
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """description must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__description = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_description(self):
    self.__description = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_router_id(self):
    """
    Getter method for router_id, mapped from YANG variable /network_instances/network_instance/state/router_id (oc-yang:dotted-quad)

    YANG Description: A identifier for the local network instance - typically
used within associated routing protocols or signalling
routing information in another network instance
    """
    return self.__router_id
      
  def _set_router_id(self, v, load=False):
    """
    Setter method for router_id, mapped from YANG variable /network_instances/network_instance/state/router_id (oc-yang:dotted-quad)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_router_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_router_id() directly.

    YANG Description: A identifier for the local network instance - typically
used within associated routing protocols or signalling
routing information in another network instance
    """
    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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:dotted-quad', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """router_id must be of a type compatible with oc-yang:dotted-quad""",
          'defined-type': "oc-yang:dotted-quad",
          '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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:dotted-quad', is_config=False)""",
        })

    self.__router_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_router_id(self):
    self.__router_id = 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}'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:dotted-quad', is_config=False)


  def _get_route_distinguisher(self):
    """
    Getter method for route_distinguisher, mapped from YANG variable /network_instances/network_instance/state/route_distinguisher (oc-ni-types:route-distinguisher)

    YANG Description: The route distinguisher that should be used for the local
VRF or VSI instance when it is signalled via BGP.
    """
    return self.__route_distinguisher
      
  def _set_route_distinguisher(self, v, load=False):
    """
    Setter method for route_distinguisher, mapped from YANG variable /network_instances/network_instance/state/route_distinguisher (oc-ni-types:route-distinguisher)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route_distinguisher is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route_distinguisher() directly.

    YANG Description: The route distinguisher that should be used for the local
VRF or VSI instance when it is signalled via BGP.
    """
    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,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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])'}),], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route_distinguisher must be of a type compatible with oc-ni-types:route-distinguisher""",
          'defined-type': "oc-ni-types:route-distinguisher",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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])'}),], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', is_config=False)""",
        })

    self.__route_distinguisher = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route_distinguisher(self):
    self.__route_distinguisher = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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])'}),], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', is_config=False)


  def _get_fallback_network_instance(self):
    """
    Getter method for fallback_network_instance, mapped from YANG variable /network_instances/network_instance/state/fallback_network_instance (network-instance-ref)

    YANG Description: When this leaf is populated, the specified network instance
should be used as a fallback instance when a route cannot
be resolved in the local network-instance.
This configuration is only valid when specified in a non-default
instance which must be a L3 capable VRF (i.e., L2L3, or L3VRF).
    """
    return self.__fallback_network_instance
      
  def _set_fallback_network_instance(self, v, load=False):
    """
    Setter method for fallback_network_instance, mapped from YANG variable /network_instances/network_instance/state/fallback_network_instance (network-instance-ref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_fallback_network_instance is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_fallback_network_instance() directly.

    YANG Description: When this leaf is populated, the specified network instance
should be used as a fallback instance when a route cannot
be resolved in the local network-instance.
This configuration is only valid when specified in a non-default
instance which must be a L3 capable VRF (i.e., L2L3, or L3VRF).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="fallback-network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='network-instance-ref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """fallback_network_instance must be of a type compatible with network-instance-ref""",
          'defined-type': "openconfig-network-instance:network-instance-ref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="fallback-network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='network-instance-ref', is_config=False)""",
        })

    self.__fallback_network_instance = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_fallback_network_instance(self):
    self.__fallback_network_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="fallback-network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='network-instance-ref', is_config=False)

  name = __builtin__.property(_get_name)
  type = __builtin__.property(_get_type)
  description = __builtin__.property(_get_description)
  router_id = __builtin__.property(_get_router_id)
  route_distinguisher = __builtin__.property(_get_route_distinguisher)
  fallback_network_instance = __builtin__.property(_get_fallback_network_instance)


  _pyangbind_elements = OrderedDict([('name', name), ('type', type), ('description', description), ('router_id', router_id), ('route_distinguisher', route_distinguisher), ('fallback_network_instance', fallback_network_instance), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_fdb_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb/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 FDB
  """
  __slots__ = ('_path_helper', '_extmethods', '__mac_learning','__mac_aging_time','__maximum_entries','__anycast_gateway_mac','__flood_unknown_unicast_supression',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__mac_learning = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="mac-learning", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__mac_aging_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="mac-aging-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__maximum_entries = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="maximum-entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__anycast_gateway_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="anycast-gateway-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=True)
    self.__flood_unknown_unicast_supression = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="flood-unknown-unicast-supression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'config']

  def _get_mac_learning(self):
    """
    Getter method for mac_learning, mapped from YANG variable /network_instances/network_instance/fdb/config/mac_learning (boolean)

    YANG Description: When this leaf is set to true, MAC learning is enabled for
the network instance, such that MAC addresses are learned
from ingress frames and added to the FDB.
    """
    return self.__mac_learning
      
  def _set_mac_learning(self, v, load=False):
    """
    Setter method for mac_learning, mapped from YANG variable /network_instances/network_instance/fdb/config/mac_learning (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_learning is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_learning() directly.

    YANG Description: When this leaf is set to true, MAC learning is enabled for
the network instance, such that MAC addresses are learned
from ingress frames and added to the FDB.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="mac-learning", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_learning must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="mac-learning", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__mac_learning = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mac_learning(self):
    self.__mac_learning = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="mac-learning", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_mac_aging_time(self):
    """
    Getter method for mac_aging_time, mapped from YANG variable /network_instances/network_instance/fdb/config/mac_aging_time (uint16)

    YANG Description: The number of seconds of inactivity after which the entry
in the local FDB is timed out.
    """
    return self.__mac_aging_time
      
  def _set_mac_aging_time(self, v, load=False):
    """
    Setter method for mac_aging_time, mapped from YANG variable /network_instances/network_instance/fdb/config/mac_aging_time (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_aging_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_aging_time() directly.

    YANG Description: The number of seconds of inactivity after which the entry
in the local FDB is timed out.
    """
    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="mac-aging-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_aging_time 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="mac-aging-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__mac_aging_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mac_aging_time(self):
    self.__mac_aging_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="mac-aging-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_maximum_entries(self):
    """
    Getter method for maximum_entries, mapped from YANG variable /network_instances/network_instance/fdb/config/maximum_entries (uint16)

    YANG Description: The maximum number of MAC address entries that should be
accepted into the FDB
    """
    return self.__maximum_entries
      
  def _set_maximum_entries(self, v, load=False):
    """
    Setter method for maximum_entries, mapped from YANG variable /network_instances/network_instance/fdb/config/maximum_entries (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_maximum_entries is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_maximum_entries() directly.

    YANG Description: The maximum number of MAC address entries that should be
accepted into the FDB
    """
    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="maximum-entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """maximum_entries 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="maximum-entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__maximum_entries = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_maximum_entries(self):
    self.__maximum_entries = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="maximum-entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_anycast_gateway_mac(self):
    """
    Getter method for anycast_gateway_mac, mapped from YANG variable /network_instances/network_instance/fdb/config/anycast_gateway_mac (oc-yang:mac-address)

    YANG Description: Configure the anycast gateway MAC address that all VTEPs
use for the network instance. When a VM sends an Address
Resolution Protocol (ARP) request for the anycast gateway
IP address in a VXLAN virtual network, the VTEP responds
with the configured anycast MAC address.
    """
    return self.__anycast_gateway_mac
      
  def _set_anycast_gateway_mac(self, v, load=False):
    """
    Setter method for anycast_gateway_mac, mapped from YANG variable /network_instances/network_instance/fdb/config/anycast_gateway_mac (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_anycast_gateway_mac is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_anycast_gateway_mac() directly.

    YANG Description: Configure the anycast gateway MAC address that all VTEPs
use for the network instance. When a VM sends an Address
Resolution Protocol (ARP) request for the anycast gateway
IP address in a VXLAN virtual network, the VTEP responds
with the configured anycast 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="anycast-gateway-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """anycast_gateway_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="anycast-gateway-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=True)""",
        })

    self.__anycast_gateway_mac = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_anycast_gateway_mac(self):
    self.__anycast_gateway_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="anycast-gateway-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=True)


  def _get_flood_unknown_unicast_supression(self):
    """
    Getter method for flood_unknown_unicast_supression, mapped from YANG variable /network_instances/network_instance/fdb/config/flood_unknown_unicast_supression (boolean)

    YANG Description: Enable (TRUE) or disable (FALSE) the Unknown Unicast Flooding
Suppression. If the Unknown Unicast Flooding Suppression is on,
the unicast traffic towards an unknown host will be dropped.
    """
    return self.__flood_unknown_unicast_supression
      
  def _set_flood_unknown_unicast_supression(self, v, load=False):
    """
    Setter method for flood_unknown_unicast_supression, mapped from YANG variable /network_instances/network_instance/fdb/config/flood_unknown_unicast_supression (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flood_unknown_unicast_supression is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flood_unknown_unicast_supression() directly.

    YANG Description: Enable (TRUE) or disable (FALSE) the Unknown Unicast Flooding
Suppression. If the Unknown Unicast Flooding Suppression is on,
the unicast traffic towards an unknown host will be dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="flood-unknown-unicast-supression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flood_unknown_unicast_supression must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="flood-unknown-unicast-supression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__flood_unknown_unicast_supression = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_flood_unknown_unicast_supression(self):
    self.__flood_unknown_unicast_supression = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="flood-unknown-unicast-supression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  mac_learning = __builtin__.property(_get_mac_learning, _set_mac_learning)
  mac_aging_time = __builtin__.property(_get_mac_aging_time, _set_mac_aging_time)
  maximum_entries = __builtin__.property(_get_maximum_entries, _set_maximum_entries)
  anycast_gateway_mac = __builtin__.property(_get_anycast_gateway_mac, _set_anycast_gateway_mac)
  flood_unknown_unicast_supression = __builtin__.property(_get_flood_unknown_unicast_supression, _set_flood_unknown_unicast_supression)


  _pyangbind_elements = OrderedDict([('mac_learning', mac_learning), ('mac_aging_time', mac_aging_time), ('maximum_entries', maximum_entries), ('anycast_gateway_mac', anycast_gateway_mac), ('flood_unknown_unicast_supression', flood_unknown_unicast_supression), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_fdb_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb/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 FDB
  """
  __slots__ = ('_path_helper', '_extmethods', '__mac_learning','__mac_aging_time','__maximum_entries','__anycast_gateway_mac','__flood_unknown_unicast_supression',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__mac_learning = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="mac-learning", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__mac_aging_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="mac-aging-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__maximum_entries = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="maximum-entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__anycast_gateway_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="anycast-gateway-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)
    self.__flood_unknown_unicast_supression = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="flood-unknown-unicast-supression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'state']

  def _get_mac_learning(self):
    """
    Getter method for mac_learning, mapped from YANG variable /network_instances/network_instance/fdb/state/mac_learning (boolean)

    YANG Description: When this leaf is set to true, MAC learning is enabled for
the network instance, such that MAC addresses are learned
from ingress frames and added to the FDB.
    """
    return self.__mac_learning
      
  def _set_mac_learning(self, v, load=False):
    """
    Setter method for mac_learning, mapped from YANG variable /network_instances/network_instance/fdb/state/mac_learning (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_learning is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_learning() directly.

    YANG Description: When this leaf is set to true, MAC learning is enabled for
the network instance, such that MAC addresses are learned
from ingress frames and added to the FDB.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="mac-learning", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_learning must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="mac-learning", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__mac_learning = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mac_learning(self):
    self.__mac_learning = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="mac-learning", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_mac_aging_time(self):
    """
    Getter method for mac_aging_time, mapped from YANG variable /network_instances/network_instance/fdb/state/mac_aging_time (uint16)

    YANG Description: The number of seconds of inactivity after which the entry
in the local FDB is timed out.
    """
    return self.__mac_aging_time
      
  def _set_mac_aging_time(self, v, load=False):
    """
    Setter method for mac_aging_time, mapped from YANG variable /network_instances/network_instance/fdb/state/mac_aging_time (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_aging_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_aging_time() directly.

    YANG Description: The number of seconds of inactivity after which the entry
in the local FDB is timed out.
    """
    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="mac-aging-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_aging_time 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="mac-aging-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__mac_aging_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mac_aging_time(self):
    self.__mac_aging_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="mac-aging-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_maximum_entries(self):
    """
    Getter method for maximum_entries, mapped from YANG variable /network_instances/network_instance/fdb/state/maximum_entries (uint16)

    YANG Description: The maximum number of MAC address entries that should be
accepted into the FDB
    """
    return self.__maximum_entries
      
  def _set_maximum_entries(self, v, load=False):
    """
    Setter method for maximum_entries, mapped from YANG variable /network_instances/network_instance/fdb/state/maximum_entries (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_maximum_entries is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_maximum_entries() directly.

    YANG Description: The maximum number of MAC address entries that should be
accepted into the FDB
    """
    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="maximum-entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """maximum_entries 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="maximum-entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__maximum_entries = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_maximum_entries(self):
    self.__maximum_entries = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="maximum-entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_anycast_gateway_mac(self):
    """
    Getter method for anycast_gateway_mac, mapped from YANG variable /network_instances/network_instance/fdb/state/anycast_gateway_mac (oc-yang:mac-address)

    YANG Description: Configure the anycast gateway MAC address that all VTEPs
use for the network instance. When a VM sends an Address
Resolution Protocol (ARP) request for the anycast gateway
IP address in a VXLAN virtual network, the VTEP responds
with the configured anycast MAC address.
    """
    return self.__anycast_gateway_mac
      
  def _set_anycast_gateway_mac(self, v, load=False):
    """
    Setter method for anycast_gateway_mac, mapped from YANG variable /network_instances/network_instance/fdb/state/anycast_gateway_mac (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_anycast_gateway_mac is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_anycast_gateway_mac() directly.

    YANG Description: Configure the anycast gateway MAC address that all VTEPs
use for the network instance. When a VM sends an Address
Resolution Protocol (ARP) request for the anycast gateway
IP address in a VXLAN virtual network, the VTEP responds
with the configured anycast 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="anycast-gateway-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """anycast_gateway_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="anycast-gateway-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)""",
        })

    self.__anycast_gateway_mac = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_anycast_gateway_mac(self):
    self.__anycast_gateway_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="anycast-gateway-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)


  def _get_flood_unknown_unicast_supression(self):
    """
    Getter method for flood_unknown_unicast_supression, mapped from YANG variable /network_instances/network_instance/fdb/state/flood_unknown_unicast_supression (boolean)

    YANG Description: Enable (TRUE) or disable (FALSE) the Unknown Unicast Flooding
Suppression. If the Unknown Unicast Flooding Suppression is on,
the unicast traffic towards an unknown host will be dropped.
    """
    return self.__flood_unknown_unicast_supression
      
  def _set_flood_unknown_unicast_supression(self, v, load=False):
    """
    Setter method for flood_unknown_unicast_supression, mapped from YANG variable /network_instances/network_instance/fdb/state/flood_unknown_unicast_supression (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flood_unknown_unicast_supression is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flood_unknown_unicast_supression() directly.

    YANG Description: Enable (TRUE) or disable (FALSE) the Unknown Unicast Flooding
Suppression. If the Unknown Unicast Flooding Suppression is on,
the unicast traffic towards an unknown host will be dropped.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="flood-unknown-unicast-supression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flood_unknown_unicast_supression must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="flood-unknown-unicast-supression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__flood_unknown_unicast_supression = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_flood_unknown_unicast_supression(self):
    self.__flood_unknown_unicast_supression = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="flood-unknown-unicast-supression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  mac_learning = __builtin__.property(_get_mac_learning)
  mac_aging_time = __builtin__.property(_get_mac_aging_time)
  maximum_entries = __builtin__.property(_get_maximum_entries)
  anycast_gateway_mac = __builtin__.property(_get_anycast_gateway_mac)
  flood_unknown_unicast_supression = __builtin__.property(_get_flood_unknown_unicast_supression)


  _pyangbind_elements = OrderedDict([('mac_learning', mac_learning), ('mac_aging_time', mac_aging_time), ('maximum_entries', maximum_entries), ('anycast_gateway_mac', anycast_gateway_mac), ('flood_unknown_unicast_supression', flood_unknown_unicast_supression), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_table_entries_entry_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb/mac-table/entries/entry/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for MAC table entries
  """
  __slots__ = ('_path_helper', '_extmethods', '__mac_address','__vlan',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__mac_address = 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=True)
    self.__vlan = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'mac-table', 'entries', 'entry', 'config']

  def _get_mac_address(self):
    """
    Getter method for mac_address, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/config/mac_address (oc-yang:mac-address)

    YANG Description: MAC address for the dynamic or static MAC table
entry
    """
    return self.__mac_address
      
  def _set_mac_address(self, v, load=False):
    """
    Setter method for mac_address, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/config/mac_address (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_address() directly.

    YANG Description: MAC address for the dynamic or static MAC table
entry
    """
    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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_address 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=True)""",
        })

    self.__mac_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mac_address(self):
    self.__mac_address = 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=True)


  def _get_vlan(self):
    """
    Getter method for vlan, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/config/vlan (leafref)

    YANG Description: VLAN on which the MAC address is present. The same MAC
address may be seen on multiple VLANs in some cases.
    """
    return self.__vlan
      
  def _set_vlan(self, v, load=False):
    """
    Setter method for vlan, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/config/vlan (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_vlan is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_vlan() directly.

    YANG Description: VLAN on which the MAC address is present. The same MAC
address may be seen on multiple VLANs in some cases.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """vlan must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__vlan = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_vlan(self):
    self.__vlan = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)

  mac_address = __builtin__.property(_get_mac_address, _set_mac_address)
  vlan = __builtin__.property(_get_vlan, _set_vlan)


  _pyangbind_elements = OrderedDict([('mac_address', mac_address), ('vlan', vlan), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_table_entries_entry_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb/mac-table/entries/entry/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for MAC table entries
  """
  __slots__ = ('_path_helper', '_extmethods', '__mac_address','__vlan','__age','__entry_type','__evi',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__mac_address = 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)
    self.__vlan = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__age = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="age", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__entry_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STATIC': {}, 'DYNAMIC': {}},), is_leaf=True, yang_name="entry-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__evi = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:vni-id', 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 ['network-instances', 'network-instance', 'fdb', 'mac-table', 'entries', 'entry', 'state']

  def _get_mac_address(self):
    """
    Getter method for mac_address, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/state/mac_address (oc-yang:mac-address)

    YANG Description: MAC address for the dynamic or static MAC table
entry
    """
    return self.__mac_address
      
  def _set_mac_address(self, v, load=False):
    """
    Setter method for mac_address, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/state/mac_address (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_address() directly.

    YANG Description: MAC address for the dynamic or static MAC table
entry
    """
    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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_address 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)""",
        })

    self.__mac_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mac_address(self):
    self.__mac_address = 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)


  def _get_vlan(self):
    """
    Getter method for vlan, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/state/vlan (leafref)

    YANG Description: VLAN on which the MAC address is present. The same MAC
address may be seen on multiple VLANs in some cases.
    """
    return self.__vlan
      
  def _set_vlan(self, v, load=False):
    """
    Setter method for vlan, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/state/vlan (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_vlan is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_vlan() directly.

    YANG Description: VLAN on which the MAC address is present. The same MAC
address may be seen on multiple VLANs in some cases.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """vlan must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__vlan = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_vlan(self):
    self.__vlan = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_age(self):
    """
    Getter method for age, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/state/age (uint64)

    YANG Description: The time in seconds since the MAC address has been in the
table
    """
    return self.__age
      
  def _set_age(self, v, load=False):
    """
    Setter method for age, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/state/age (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_age is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_age() directly.

    YANG Description: The time in seconds since the MAC address has been in the
table
    """
    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="age", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """age 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="age", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__age = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_age(self):
    self.__age = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="age", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_entry_type(self):
    """
    Getter method for entry_type, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/state/entry_type (enumeration)

    YANG Description: Indicates whether the entry was statically configured, or
dynamically learned.
    """
    return self.__entry_type
      
  def _set_entry_type(self, v, load=False):
    """
    Setter method for entry_type, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/state/entry_type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_entry_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_entry_type() directly.

    YANG Description: Indicates whether the entry was statically configured, or
dynamically learned.
    """
    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': {}, 'DYNAMIC': {}},), is_leaf=True, yang_name="entry-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """entry_type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STATIC': {}, 'DYNAMIC': {}},), is_leaf=True, yang_name="entry-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__entry_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_entry_type(self):
    self.__entry_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STATIC': {}, 'DYNAMIC': {}},), is_leaf=True, yang_name="entry-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_evi(self):
    """
    Getter method for evi, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/state/evi (oc-evpn-types:vni-id)

    YANG Description: EVPN EVI to associate with the BD/VLAN
    """
    return self.__evi
      
  def _set_evi(self, v, load=False):
    """
    Setter method for evi, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/state/evi (oc-evpn-types:vni-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_evi is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_evi() directly.

    YANG Description: EVPN EVI to associate with the BD/VLAN
    """
    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': ['1..16777215']}), is_leaf=True, yang_name="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:vni-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """evi must be of a type compatible with oc-evpn-types:vni-id""",
          'defined-type': "oc-evpn-types:vni-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:vni-id', is_config=False)""",
        })

    self.__evi = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_evi(self):
    self.__evi = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:vni-id', is_config=False)

  mac_address = __builtin__.property(_get_mac_address)
  vlan = __builtin__.property(_get_vlan)
  age = __builtin__.property(_get_age)
  entry_type = __builtin__.property(_get_entry_type)
  evi = __builtin__.property(_get_evi)


  _pyangbind_elements = OrderedDict([('mac_address', mac_address), ('vlan', vlan), ('age', age), ('entry_type', entry_type), ('evi', evi), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_table_entries_entry_interface_interface_ref_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb/mac-table/entries/entry/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'mac-table', 'entries', 'entry', 'interface', 'interface-ref', 'config']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/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 /network_instances/network_instance/fdb/mac_table/entries/entry/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/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 /network_instances/network_instance/fdb/mac_table/entries/entry/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_mac_table_entries_entry_interface_interface_ref_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb/mac-table/entries/entry/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'mac-table', 'entries', 'entry', 'interface', 'interface-ref', 'state']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/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 /network_instances/network_instance/fdb/mac_table/entries/entry/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/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 /network_instances/network_instance/fdb/mac_table/entries/entry/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_mac_table_entries_entry_interface_interface_ref(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb/mac-table/entries/entry/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
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'interface-ref'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_table_entries_entry_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_table_entries_entry_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'mac-table', 'entries', 'entry', 'interface', 'interface-ref']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/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 /network_instances/network_instance/fdb/mac_table/entries/entry/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_network_instance_l2__network_instances_network_instance_fdb_mac_table_entries_entry_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_mac_table_entries_entry_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_mac_table_entries_entry_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/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 /network_instances/network_instance/fdb/mac_table/entries/entry/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_network_instance_l2__network_instances_network_instance_fdb_mac_table_entries_entry_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_mac_table_entries_entry_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_mac_table_entries_entry_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/network-instance', defining_module='openconfig-network-instance', 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_interface_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_table_entries_entry_interface(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb/mac-table/entries/entry/interface. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Reference to the base and/or subinterface for the
MAC table entry
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_ref',)

  _yang_name = 'interface'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__interface_ref = YANGDynClass(base=yc_interface_ref_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_table_entries_entry_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'mac-table', 'entries', 'entry', 'interface']

  def _get_interface_ref(self):
    """
    Getter method for interface_ref, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/interface/interface_ref (container)

    YANG Description: Reference to an interface or subinterface
    """
    return self.__interface_ref
      
  def _set_interface_ref(self, v, load=False):
    """
    Setter method for interface_ref, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/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
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interface_ref_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_table_entries_entry_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_mac_table_entries_entry_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_mac_table_entries_entry_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  interface_ref = __builtin__.property(_get_interface_ref, _set_interface_ref)


  _pyangbind_elements = OrderedDict([('interface_ref', interface_ref), ])


class yc_entry_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_table_entries_entry(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb/mac-table/entries/entry. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of learned MAC addresses
  """
  __slots__ = ('_path_helper', '_extmethods', '__mac_address','__vlan','__config','__state','__interface',)

  _yang_name = 'entry'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__mac_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__vlan = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_table_entries_entry_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_table_entries_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__interface = YANGDynClass(base=yc_interface_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_table_entries_entry_interface, is_container='container', yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'mac-table', 'entries', 'entry']

  def _get_mac_address(self):
    """
    Getter method for mac_address, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/mac_address (leafref)

    YANG Description: Reference to mac-address list key
    """
    return self.__mac_address
      
  def _set_mac_address(self, v, load=False):
    """
    Setter method for mac_address, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/mac_address (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_address() directly.

    YANG Description: Reference to mac-address 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_address must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__mac_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mac_address(self):
    self.__mac_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_vlan(self):
    """
    Getter method for vlan, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/vlan (leafref)

    YANG Description: Reference to vlan list key
    """
    return self.__vlan
      
  def _set_vlan(self, v, load=False):
    """
    Setter method for vlan, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/vlan (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_vlan is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_vlan() directly.

    YANG Description: Reference to vlan 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="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """vlan must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__vlan = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_vlan(self):
    self.__vlan = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/config (container)

    YANG Description: Configuration data for MAC table entries
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/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 MAC table entries
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_table_entries_entry_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_mac_table_entries_entry_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_mac_table_entries_entry_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/state (container)

    YANG Description: Operational state data for MAC table entries
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/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 MAC table entries
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_table_entries_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_mac_table_entries_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_mac_table_entries_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/interface (container)

    YANG Description: Reference to the base and/or subinterface for the
MAC table entry
    """
    return self.__interface
      
  def _set_interface(self, v, load=False):
    """
    Setter method for interface, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry/interface (container)
    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 the base and/or subinterface for the
MAC table entry
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interface_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_table_entries_entry_interface, is_container='container', yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_interface_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_table_entries_entry_interface, is_container='container', yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__interface = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_interface(self):
    self.__interface = YANGDynClass(base=yc_interface_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_table_entries_entry_interface, is_container='container', yang_name="interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  mac_address = __builtin__.property(_get_mac_address, _set_mac_address)
  vlan = __builtin__.property(_get_vlan, _set_vlan)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  interface = __builtin__.property(_get_interface, _set_interface)


  _pyangbind_elements = OrderedDict([('mac_address', mac_address), ('vlan', vlan), ('config', config), ('state', state), ('interface', interface), ])


class yc_entries_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_table_entries(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb/mac-table/entries. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for list of MAC table entries
  """
  __slots__ = ('_path_helper', '_extmethods', '__entry',)

  _yang_name = 'entries'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__entry = YANGDynClass(base=YANGListType("mac_address vlan",yc_entry_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_table_entries_entry, yang_name="entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mac-address vlan', extensions=None), is_container='list', yang_name="entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'mac-table', 'entries']

  def _get_entry(self):
    """
    Getter method for entry, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry (list)

    YANG Description: List of learned MAC addresses
    """
    return self.__entry
      
  def _set_entry(self, v, load=False):
    """
    Setter method for entry, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries/entry (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_entry is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_entry() directly.

    YANG Description: List of learned MAC addresses
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("mac_address vlan",yc_entry_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_table_entries_entry, yang_name="entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mac-address vlan', extensions=None), is_container='list', yang_name="entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """entry must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("mac_address vlan",yc_entry_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_table_entries_entry, yang_name="entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mac-address vlan', extensions=None), is_container='list', yang_name="entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__entry = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_entry(self):
    self.__entry = YANGDynClass(base=YANGListType("mac_address vlan",yc_entry_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_table_entries_entry, yang_name="entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mac-address vlan', extensions=None), is_container='list', yang_name="entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  entry = __builtin__.property(_get_entry, _set_entry)


  _pyangbind_elements = OrderedDict([('entry', entry), ])


class yc_mac_table_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_table(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb/mac-table. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Table of learned or statically configured MAC addresses and
corresponding VLANs in the bridge domain
  """
  __slots__ = ('_path_helper', '_extmethods', '__entries',)

  _yang_name = 'mac-table'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__entries = YANGDynClass(base=yc_entries_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_table_entries, is_container='container', yang_name="entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'mac-table']

  def _get_entries(self):
    """
    Getter method for entries, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries (container)

    YANG Description: Enclosing container for list of MAC table entries
    """
    return self.__entries
      
  def _set_entries(self, v, load=False):
    """
    Setter method for entries, mapped from YANG variable /network_instances/network_instance/fdb/mac_table/entries (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_entries is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_entries() directly.

    YANG Description: Enclosing container for list of MAC table entries
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_entries_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_table_entries, is_container='container', yang_name="entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """entries must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_entries_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_table_entries, is_container='container', yang_name="entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__entries = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_entries(self):
    self.__entries = YANGDynClass(base=yc_entries_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_table_entries, is_container='container', yang_name="entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  entries = __builtin__.property(_get_entries, _set_entries)


  _pyangbind_elements = OrderedDict([('entries', entries), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_mobility_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb/mac-mobility/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data related to mac mobility.
  """
  __slots__ = ('_path_helper', '_extmethods', '__mac_mobility','__mac_mobility_window','__mac_mobility_threshold','__ip_mobility_threshold','__duplicate_ip_detection_interval',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__mac_mobility = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="mac-mobility", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__mac_mobility_window = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..600']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(180), is_leaf=True, yang_name="mac-mobility-window", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__mac_mobility_threshold = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..50']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(5), is_leaf=True, yang_name="mac-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    self.__ip_mobility_threshold = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__duplicate_ip_detection_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'fdb', 'mac-mobility', 'config']

  def _get_mac_mobility(self):
    """
    Getter method for mac_mobility, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/config/mac_mobility (boolean)

    YANG Description: Enable (TRUE) or disable (FALSE). It is possible for a given host
or end-station (as defined by its MAC address) to move from one
Ethernet segment to another; this is referred to as 'MAC Mobility'
or 'MAC move. The configuration attributes includes: mac-mobility-window
and mac-mobility-threshold
    """
    return self.__mac_mobility
      
  def _set_mac_mobility(self, v, load=False):
    """
    Setter method for mac_mobility, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/config/mac_mobility (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_mobility is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_mobility() directly.

    YANG Description: Enable (TRUE) or disable (FALSE). It is possible for a given host
or end-station (as defined by its MAC address) to move from one
Ethernet segment to another; this is referred to as 'MAC Mobility'
or 'MAC move. The configuration attributes includes: mac-mobility-window
and mac-mobility-threshold
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="mac-mobility", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_mobility must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="mac-mobility", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__mac_mobility = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mac_mobility(self):
    self.__mac_mobility = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="mac-mobility", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_mac_mobility_window(self):
    """
    Getter method for mac_mobility_window, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/config/mac_mobility_window (uint16)

    YANG Description: The time interval used in detecting a duplicate MAC address.
The value can be from 5 through 600 seconds.
The default is 180 seconds
    """
    return self.__mac_mobility_window
      
  def _set_mac_mobility_window(self, v, load=False):
    """
    Setter method for mac_mobility_window, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/config/mac_mobility_window (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_mobility_window is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_mobility_window() directly.

    YANG Description: The time interval used in detecting a duplicate MAC address.
The value can be from 5 through 600 seconds.
The default is 180 seconds
    """
    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': ['0..600']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(180), is_leaf=True, yang_name="mac-mobility-window", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_mobility_window must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..600']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(180), is_leaf=True, yang_name="mac-mobility-window", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__mac_mobility_window = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mac_mobility_window(self):
    self.__mac_mobility_window = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..600']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(180), is_leaf=True, yang_name="mac-mobility-window", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_mac_mobility_threshold(self):
    """
    Getter method for mac_mobility_threshold, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/config/mac_mobility_threshold (uint8)

    YANG Description: The number of MAC mobility events that are detected for a
given MAC address within the detection-window before it is identified
as a duplicate MAC address. Once the detection threshold is reached,
updates for the MAC address are suppressed.
    """
    return self.__mac_mobility_threshold
      
  def _set_mac_mobility_threshold(self, v, load=False):
    """
    Setter method for mac_mobility_threshold, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/config/mac_mobility_threshold (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_mobility_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_mobility_threshold() directly.

    YANG Description: The number of MAC mobility events that are detected for a
given MAC address within the detection-window before it is identified
as a duplicate MAC address. Once the detection threshold is reached,
updates for the MAC address are suppressed.
    """
    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..50']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(5), is_leaf=True, yang_name="mac-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_mobility_threshold 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..50']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(5), is_leaf=True, yang_name="mac-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
        })

    self.__mac_mobility_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mac_mobility_threshold(self):
    self.__mac_mobility_threshold = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..50']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(5), is_leaf=True, yang_name="mac-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)


  def _get_ip_mobility_threshold(self):
    """
    Getter method for ip_mobility_threshold, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/config/ip_mobility_threshold (uint16)

    YANG Description: Enable (TRUE) or disable (FALSE). It is possible for a given host
or end-station (as defined by its IP address) to move from one
Ethernet segment to another. The number of IP mobility events that
are detected for a given IP address within the detection-threshold
before it is identified as a duplicate IP address.
Once the detection threshold is reached, updates for the IP address
are suppressed.
    """
    return self.__ip_mobility_threshold
      
  def _set_ip_mobility_threshold(self, v, load=False):
    """
    Setter method for ip_mobility_threshold, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/config/ip_mobility_threshold (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ip_mobility_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ip_mobility_threshold() directly.

    YANG Description: Enable (TRUE) or disable (FALSE). It is possible for a given host
or end-station (as defined by its IP address) to move from one
Ethernet segment to another. The number of IP mobility events that
are detected for a given IP address within the detection-threshold
before it is identified as a duplicate IP address.
Once the detection threshold is reached, updates for the IP address
are suppressed.
    """
    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="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ip_mobility_threshold 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="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__ip_mobility_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ip_mobility_threshold(self):
    self.__ip_mobility_threshold = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_duplicate_ip_detection_interval(self):
    """
    Getter method for duplicate_ip_detection_interval, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/config/duplicate_ip_detection_interval (uint16)

    YANG Description: The time interval used in detecting a duplicate IP address.
Duplicate ip detection number of host moves
allowed within interval period
    """
    return self.__duplicate_ip_detection_interval
      
  def _set_duplicate_ip_detection_interval(self, v, load=False):
    """
    Setter method for duplicate_ip_detection_interval, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/config/duplicate_ip_detection_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_duplicate_ip_detection_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_duplicate_ip_detection_interval() directly.

    YANG Description: The time interval used in detecting a duplicate IP address.
Duplicate ip detection number of host moves
allowed within interval period
    """
    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="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """duplicate_ip_detection_interval 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="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__duplicate_ip_detection_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_duplicate_ip_detection_interval(self):
    self.__duplicate_ip_detection_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

  mac_mobility = __builtin__.property(_get_mac_mobility, _set_mac_mobility)
  mac_mobility_window = __builtin__.property(_get_mac_mobility_window, _set_mac_mobility_window)
  mac_mobility_threshold = __builtin__.property(_get_mac_mobility_threshold, _set_mac_mobility_threshold)
  ip_mobility_threshold = __builtin__.property(_get_ip_mobility_threshold, _set_ip_mobility_threshold)
  duplicate_ip_detection_interval = __builtin__.property(_get_duplicate_ip_detection_interval, _set_duplicate_ip_detection_interval)


  _pyangbind_elements = OrderedDict([('mac_mobility', mac_mobility), ('mac_mobility_window', mac_mobility_window), ('mac_mobility_threshold', mac_mobility_threshold), ('ip_mobility_threshold', ip_mobility_threshold), ('duplicate_ip_detection_interval', duplicate_ip_detection_interval), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_mobility_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb/mac-mobility/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State data related to mac mobility.
  """
  __slots__ = ('_path_helper', '_extmethods', '__mac_mobility','__mac_mobility_window','__mac_mobility_threshold','__ip_mobility_threshold','__duplicate_ip_detection_interval',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__mac_mobility = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="mac-mobility", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__mac_mobility_window = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..600']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(180), is_leaf=True, yang_name="mac-mobility-window", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__mac_mobility_threshold = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..50']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(5), is_leaf=True, yang_name="mac-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__ip_mobility_threshold = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__duplicate_ip_detection_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'fdb', 'mac-mobility', 'state']

  def _get_mac_mobility(self):
    """
    Getter method for mac_mobility, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/state/mac_mobility (boolean)

    YANG Description: Enable (TRUE) or disable (FALSE). It is possible for a given host
or end-station (as defined by its MAC address) to move from one
Ethernet segment to another; this is referred to as 'MAC Mobility'
or 'MAC move. The configuration attributes includes: mac-mobility-window
and mac-mobility-threshold
    """
    return self.__mac_mobility
      
  def _set_mac_mobility(self, v, load=False):
    """
    Setter method for mac_mobility, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/state/mac_mobility (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_mobility is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_mobility() directly.

    YANG Description: Enable (TRUE) or disable (FALSE). It is possible for a given host
or end-station (as defined by its MAC address) to move from one
Ethernet segment to another; this is referred to as 'MAC Mobility'
or 'MAC move. The configuration attributes includes: mac-mobility-window
and mac-mobility-threshold
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="mac-mobility", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_mobility must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="mac-mobility", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__mac_mobility = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mac_mobility(self):
    self.__mac_mobility = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="mac-mobility", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_mac_mobility_window(self):
    """
    Getter method for mac_mobility_window, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/state/mac_mobility_window (uint16)

    YANG Description: The time interval used in detecting a duplicate MAC address.
The value can be from 5 through 600 seconds.
The default is 180 seconds
    """
    return self.__mac_mobility_window
      
  def _set_mac_mobility_window(self, v, load=False):
    """
    Setter method for mac_mobility_window, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/state/mac_mobility_window (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_mobility_window is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_mobility_window() directly.

    YANG Description: The time interval used in detecting a duplicate MAC address.
The value can be from 5 through 600 seconds.
The default is 180 seconds
    """
    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': ['0..600']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(180), is_leaf=True, yang_name="mac-mobility-window", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_mobility_window must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..600']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(180), is_leaf=True, yang_name="mac-mobility-window", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__mac_mobility_window = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mac_mobility_window(self):
    self.__mac_mobility_window = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..600']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(180), is_leaf=True, yang_name="mac-mobility-window", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_mac_mobility_threshold(self):
    """
    Getter method for mac_mobility_threshold, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/state/mac_mobility_threshold (uint8)

    YANG Description: The number of MAC mobility events that are detected for a
given MAC address within the detection-window before it is identified
as a duplicate MAC address. Once the detection threshold is reached,
updates for the MAC address are suppressed.
    """
    return self.__mac_mobility_threshold
      
  def _set_mac_mobility_threshold(self, v, load=False):
    """
    Setter method for mac_mobility_threshold, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/state/mac_mobility_threshold (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_mobility_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_mobility_threshold() directly.

    YANG Description: The number of MAC mobility events that are detected for a
given MAC address within the detection-window before it is identified
as a duplicate MAC address. Once the detection threshold is reached,
updates for the MAC address are suppressed.
    """
    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..50']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(5), is_leaf=True, yang_name="mac-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_mobility_threshold 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..50']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(5), is_leaf=True, yang_name="mac-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__mac_mobility_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mac_mobility_threshold(self):
    self.__mac_mobility_threshold = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..50']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(5), is_leaf=True, yang_name="mac-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_ip_mobility_threshold(self):
    """
    Getter method for ip_mobility_threshold, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/state/ip_mobility_threshold (uint16)

    YANG Description: Enable (TRUE) or disable (FALSE). It is possible for a given host
or end-station (as defined by its IP address) to move from one
Ethernet segment to another. The number of IP mobility events that
are detected for a given IP address within the detection-threshold
before it is identified as a duplicate IP address.
Once the detection threshold is reached, updates for the IP address
are suppressed.
    """
    return self.__ip_mobility_threshold
      
  def _set_ip_mobility_threshold(self, v, load=False):
    """
    Setter method for ip_mobility_threshold, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/state/ip_mobility_threshold (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ip_mobility_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ip_mobility_threshold() directly.

    YANG Description: Enable (TRUE) or disable (FALSE). It is possible for a given host
or end-station (as defined by its IP address) to move from one
Ethernet segment to another. The number of IP mobility events that
are detected for a given IP address within the detection-threshold
before it is identified as a duplicate IP address.
Once the detection threshold is reached, updates for the IP address
are suppressed.
    """
    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="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ip_mobility_threshold 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="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__ip_mobility_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ip_mobility_threshold(self):
    self.__ip_mobility_threshold = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_duplicate_ip_detection_interval(self):
    """
    Getter method for duplicate_ip_detection_interval, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/state/duplicate_ip_detection_interval (uint16)

    YANG Description: The time interval used in detecting a duplicate IP address.
Duplicate ip detection number of host moves
allowed within interval period
    """
    return self.__duplicate_ip_detection_interval
      
  def _set_duplicate_ip_detection_interval(self, v, load=False):
    """
    Setter method for duplicate_ip_detection_interval, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/state/duplicate_ip_detection_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_duplicate_ip_detection_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_duplicate_ip_detection_interval() directly.

    YANG Description: The time interval used in detecting a duplicate IP address.
Duplicate ip detection number of host moves
allowed within interval period
    """
    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="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """duplicate_ip_detection_interval 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="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__duplicate_ip_detection_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_duplicate_ip_detection_interval(self):
    self.__duplicate_ip_detection_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  mac_mobility = __builtin__.property(_get_mac_mobility)
  mac_mobility_window = __builtin__.property(_get_mac_mobility_window)
  mac_mobility_threshold = __builtin__.property(_get_mac_mobility_threshold)
  ip_mobility_threshold = __builtin__.property(_get_ip_mobility_threshold)
  duplicate_ip_detection_interval = __builtin__.property(_get_duplicate_ip_detection_interval)


  _pyangbind_elements = OrderedDict([('mac_mobility', mac_mobility), ('mac_mobility_window', mac_mobility_window), ('mac_mobility_threshold', mac_mobility_threshold), ('ip_mobility_threshold', ip_mobility_threshold), ('duplicate_ip_detection_interval', duplicate_ip_detection_interval), ])


class yc_mac_mobility_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_mobility(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb/mac-mobility. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top grouping the configuration and state data related to mac
mobility.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'mac-mobility'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_mobility_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_mobility_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'mac-mobility']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/config (container)

    YANG Description: Configuration data related to mac mobility.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/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 related to mac mobility.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_mobility_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_mac_mobility_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_mac_mobility_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/state (container)

    YANG Description: State data related to mac mobility.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility/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 related to mac mobility.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_mobility_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_mac_mobility_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_mac_mobility_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_arp_proxy_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb/arp-proxy/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data related to ARP-Proxy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enable','__arp_suppression','__ip_mobility_threshold','__duplicate_ip_detection_interval',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__arp_suppression = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="arp-suppression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__ip_mobility_threshold = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__duplicate_ip_detection_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'fdb', 'arp-proxy', 'config']

  def _get_enable(self):
    """
    Getter method for enable, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy/config/enable (boolean)

    YANG Description: Enable (TRUE) or disable (FALSE) ARP proxy. If true
a proxy server on the network answers the
Address Resolution Protocol (ARP) queries for an
IP address that is not on that network.
    """
    return self.__enable
      
  def _set_enable(self, v, load=False):
    """
    Setter method for enable, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy/config/enable (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable() directly.

    YANG Description: Enable (TRUE) or disable (FALSE) ARP proxy. If true
a proxy server on the network answers the
Address Resolution Protocol (ARP) queries for an
IP address that is not on that network.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable 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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enable = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable(self):
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_arp_suppression(self):
    """
    Getter method for arp_suppression, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy/config/arp_suppression (boolean)

    YANG Description: Enable (TRUE) or disable (FALSE) ARP suppression. If true
the  Address Resolution Protocol (ARP) queries for an
IP address that is not on that network are suppressed.
Address Resolution Protocol (ARP) suppression is a
technique used to reduce the amount of ARP broadcast
flooding within individual VXLAN segments, that is between
VMs connected to the same logical switch.
    """
    return self.__arp_suppression
      
  def _set_arp_suppression(self, v, load=False):
    """
    Setter method for arp_suppression, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy/config/arp_suppression (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_arp_suppression is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_arp_suppression() directly.

    YANG Description: Enable (TRUE) or disable (FALSE) ARP suppression. If true
the  Address Resolution Protocol (ARP) queries for an
IP address that is not on that network are suppressed.
Address Resolution Protocol (ARP) suppression is a
technique used to reduce the amount of ARP broadcast
flooding within individual VXLAN segments, that is between
VMs connected to the same logical switch.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="arp-suppression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """arp_suppression must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="arp-suppression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__arp_suppression = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_arp_suppression(self):
    self.__arp_suppression = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="arp-suppression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_ip_mobility_threshold(self):
    """
    Getter method for ip_mobility_threshold, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy/config/ip_mobility_threshold (uint16)

    YANG Description: Enable (TRUE) or disable (FALSE). It is possible for a given host
or end-station (as defined by its IP address) to move from one
Ethernet segment to another. The number of IP mobility events that
are detected for a given IP address within the detection-threshold
before it is identified as a duplicate IP address.
Once the detection threshold is reached, updates for the IP address
are suppressed.
    """
    return self.__ip_mobility_threshold
      
  def _set_ip_mobility_threshold(self, v, load=False):
    """
    Setter method for ip_mobility_threshold, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy/config/ip_mobility_threshold (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ip_mobility_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ip_mobility_threshold() directly.

    YANG Description: Enable (TRUE) or disable (FALSE). It is possible for a given host
or end-station (as defined by its IP address) to move from one
Ethernet segment to another. The number of IP mobility events that
are detected for a given IP address within the detection-threshold
before it is identified as a duplicate IP address.
Once the detection threshold is reached, updates for the IP address
are suppressed.
    """
    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="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ip_mobility_threshold 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="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__ip_mobility_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ip_mobility_threshold(self):
    self.__ip_mobility_threshold = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_duplicate_ip_detection_interval(self):
    """
    Getter method for duplicate_ip_detection_interval, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy/config/duplicate_ip_detection_interval (uint16)

    YANG Description: The time interval used in detecting a duplicate IP address.
Duplicate ip detection number of host moves
allowed within interval period
    """
    return self.__duplicate_ip_detection_interval
      
  def _set_duplicate_ip_detection_interval(self, v, load=False):
    """
    Setter method for duplicate_ip_detection_interval, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy/config/duplicate_ip_detection_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_duplicate_ip_detection_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_duplicate_ip_detection_interval() directly.

    YANG Description: The time interval used in detecting a duplicate IP address.
Duplicate ip detection number of host moves
allowed within interval period
    """
    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="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """duplicate_ip_detection_interval 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="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__duplicate_ip_detection_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_duplicate_ip_detection_interval(self):
    self.__duplicate_ip_detection_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

  enable = __builtin__.property(_get_enable, _set_enable)
  arp_suppression = __builtin__.property(_get_arp_suppression, _set_arp_suppression)
  ip_mobility_threshold = __builtin__.property(_get_ip_mobility_threshold, _set_ip_mobility_threshold)
  duplicate_ip_detection_interval = __builtin__.property(_get_duplicate_ip_detection_interval, _set_duplicate_ip_detection_interval)


  _pyangbind_elements = OrderedDict([('enable', enable), ('arp_suppression', arp_suppression), ('ip_mobility_threshold', ip_mobility_threshold), ('duplicate_ip_detection_interval', duplicate_ip_detection_interval), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_fdb_arp_proxy_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb/arp-proxy/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State data related to ARP-Proxy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enable','__arp_suppression','__ip_mobility_threshold','__duplicate_ip_detection_interval',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__arp_suppression = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="arp-suppression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__ip_mobility_threshold = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__duplicate_ip_detection_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'fdb', 'arp-proxy', 'state']

  def _get_enable(self):
    """
    Getter method for enable, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy/state/enable (boolean)

    YANG Description: Enable (TRUE) or disable (FALSE) ARP proxy. If true
a proxy server on the network answers the
Address Resolution Protocol (ARP) queries for an
IP address that is not on that network.
    """
    return self.__enable
      
  def _set_enable(self, v, load=False):
    """
    Setter method for enable, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy/state/enable (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable() directly.

    YANG Description: Enable (TRUE) or disable (FALSE) ARP proxy. If true
a proxy server on the network answers the
Address Resolution Protocol (ARP) queries for an
IP address that is not on that network.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable 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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enable = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable(self):
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_arp_suppression(self):
    """
    Getter method for arp_suppression, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy/state/arp_suppression (boolean)

    YANG Description: Enable (TRUE) or disable (FALSE) ARP suppression. If true
the  Address Resolution Protocol (ARP) queries for an
IP address that is not on that network are suppressed.
Address Resolution Protocol (ARP) suppression is a
technique used to reduce the amount of ARP broadcast
flooding within individual VXLAN segments, that is between
VMs connected to the same logical switch.
    """
    return self.__arp_suppression
      
  def _set_arp_suppression(self, v, load=False):
    """
    Setter method for arp_suppression, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy/state/arp_suppression (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_arp_suppression is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_arp_suppression() directly.

    YANG Description: Enable (TRUE) or disable (FALSE) ARP suppression. If true
the  Address Resolution Protocol (ARP) queries for an
IP address that is not on that network are suppressed.
Address Resolution Protocol (ARP) suppression is a
technique used to reduce the amount of ARP broadcast
flooding within individual VXLAN segments, that is between
VMs connected to the same logical switch.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="arp-suppression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """arp_suppression must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="arp-suppression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__arp_suppression = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_arp_suppression(self):
    self.__arp_suppression = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="arp-suppression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_ip_mobility_threshold(self):
    """
    Getter method for ip_mobility_threshold, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy/state/ip_mobility_threshold (uint16)

    YANG Description: Enable (TRUE) or disable (FALSE). It is possible for a given host
or end-station (as defined by its IP address) to move from one
Ethernet segment to another. The number of IP mobility events that
are detected for a given IP address within the detection-threshold
before it is identified as a duplicate IP address.
Once the detection threshold is reached, updates for the IP address
are suppressed.
    """
    return self.__ip_mobility_threshold
      
  def _set_ip_mobility_threshold(self, v, load=False):
    """
    Setter method for ip_mobility_threshold, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy/state/ip_mobility_threshold (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ip_mobility_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ip_mobility_threshold() directly.

    YANG Description: Enable (TRUE) or disable (FALSE). It is possible for a given host
or end-station (as defined by its IP address) to move from one
Ethernet segment to another. The number of IP mobility events that
are detected for a given IP address within the detection-threshold
before it is identified as a duplicate IP address.
Once the detection threshold is reached, updates for the IP address
are suppressed.
    """
    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="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ip_mobility_threshold 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="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__ip_mobility_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ip_mobility_threshold(self):
    self.__ip_mobility_threshold = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_duplicate_ip_detection_interval(self):
    """
    Getter method for duplicate_ip_detection_interval, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy/state/duplicate_ip_detection_interval (uint16)

    YANG Description: The time interval used in detecting a duplicate IP address.
Duplicate ip detection number of host moves
allowed within interval period
    """
    return self.__duplicate_ip_detection_interval
      
  def _set_duplicate_ip_detection_interval(self, v, load=False):
    """
    Setter method for duplicate_ip_detection_interval, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy/state/duplicate_ip_detection_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_duplicate_ip_detection_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_duplicate_ip_detection_interval() directly.

    YANG Description: The time interval used in detecting a duplicate IP address.
Duplicate ip detection number of host moves
allowed within interval period
    """
    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="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """duplicate_ip_detection_interval 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="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__duplicate_ip_detection_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_duplicate_ip_detection_interval(self):
    self.__duplicate_ip_detection_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  enable = __builtin__.property(_get_enable)
  arp_suppression = __builtin__.property(_get_arp_suppression)
  ip_mobility_threshold = __builtin__.property(_get_ip_mobility_threshold)
  duplicate_ip_detection_interval = __builtin__.property(_get_duplicate_ip_detection_interval)


  _pyangbind_elements = OrderedDict([('enable', enable), ('arp_suppression', arp_suppression), ('ip_mobility_threshold', ip_mobility_threshold), ('duplicate_ip_detection_interval', duplicate_ip_detection_interval), ])


class yc_arp_proxy_openconfig_network_instance_l2__network_instances_network_instance_fdb_arp_proxy(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb/arp-proxy. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top Container related to ARP-Proxy
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'arp-proxy'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_fdb_arp_proxy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_fdb_arp_proxy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'arp-proxy']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy/config (container)

    YANG Description: Configuration data related to ARP-Proxy.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy/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 related to ARP-Proxy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_fdb_arp_proxy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_arp_proxy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_arp_proxy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy/state (container)

    YANG Description: State data related to ARP-Proxy.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy/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 related to ARP-Proxy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_fdb_arp_proxy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_arp_proxy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_arp_proxy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_nd_proxy_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb/nd-proxy/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data related to ND-Proxy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enable','__nd_suppression','__ip_mobility_threshold','__duplicate_ip_detection_interval',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__nd_suppression = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="nd-suppression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__ip_mobility_threshold = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__duplicate_ip_detection_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'fdb', 'nd-proxy', 'config']

  def _get_enable(self):
    """
    Getter method for enable, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy/config/enable (boolean)

    YANG Description: Enable (TRUE) or disable (FALSE) Neighbor Discovery (ND)
proxy. If true a proxy server on the network answers the
NDP packets for an IP address that is not on that network.
    """
    return self.__enable
      
  def _set_enable(self, v, load=False):
    """
    Setter method for enable, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy/config/enable (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable() directly.

    YANG Description: Enable (TRUE) or disable (FALSE) Neighbor Discovery (ND)
proxy. If true a proxy server on the network answers the
NDP packets for an IP address that is not on that network.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable 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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enable = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable(self):
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_nd_suppression(self):
    """
    Getter method for nd_suppression, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy/config/nd_suppression (boolean)

    YANG Description: Enable (TRUE) or disable (FALSE) Neighbor Discovery suppression.
If true the NDP queries for an IP address that is not on that
network are suppressed. NDP suppression is a
technique used to reduce the amount of NDP Packets
flooding within individual VXLAN segments, that is between
VMs connected to the same logical switch.
    """
    return self.__nd_suppression
      
  def _set_nd_suppression(self, v, load=False):
    """
    Setter method for nd_suppression, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy/config/nd_suppression (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_nd_suppression is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_nd_suppression() directly.

    YANG Description: Enable (TRUE) or disable (FALSE) Neighbor Discovery suppression.
If true the NDP queries for an IP address that is not on that
network are suppressed. NDP suppression is a
technique used to reduce the amount of NDP Packets
flooding within individual VXLAN segments, that is between
VMs connected to the same logical switch.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="nd-suppression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """nd_suppression must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="nd-suppression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__nd_suppression = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_nd_suppression(self):
    self.__nd_suppression = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="nd-suppression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_ip_mobility_threshold(self):
    """
    Getter method for ip_mobility_threshold, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy/config/ip_mobility_threshold (uint16)

    YANG Description: Enable (TRUE) or disable (FALSE). It is possible for a given host
or end-station (as defined by its IP address) to move from one
Ethernet segment to another. The number of IP mobility events that
are detected for a given IP address within the detection-threshold
before it is identified as a duplicate IP address.
Once the detection threshold is reached, updates for the IP address
are suppressed.
    """
    return self.__ip_mobility_threshold
      
  def _set_ip_mobility_threshold(self, v, load=False):
    """
    Setter method for ip_mobility_threshold, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy/config/ip_mobility_threshold (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ip_mobility_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ip_mobility_threshold() directly.

    YANG Description: Enable (TRUE) or disable (FALSE). It is possible for a given host
or end-station (as defined by its IP address) to move from one
Ethernet segment to another. The number of IP mobility events that
are detected for a given IP address within the detection-threshold
before it is identified as a duplicate IP address.
Once the detection threshold is reached, updates for the IP address
are suppressed.
    """
    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="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ip_mobility_threshold 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="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__ip_mobility_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ip_mobility_threshold(self):
    self.__ip_mobility_threshold = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_duplicate_ip_detection_interval(self):
    """
    Getter method for duplicate_ip_detection_interval, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy/config/duplicate_ip_detection_interval (uint16)

    YANG Description: The time interval used in detecting a duplicate IP address.
Duplicate ip detection number of host moves
allowed within interval period
    """
    return self.__duplicate_ip_detection_interval
      
  def _set_duplicate_ip_detection_interval(self, v, load=False):
    """
    Setter method for duplicate_ip_detection_interval, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy/config/duplicate_ip_detection_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_duplicate_ip_detection_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_duplicate_ip_detection_interval() directly.

    YANG Description: The time interval used in detecting a duplicate IP address.
Duplicate ip detection number of host moves
allowed within interval period
    """
    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="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """duplicate_ip_detection_interval 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="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__duplicate_ip_detection_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_duplicate_ip_detection_interval(self):
    self.__duplicate_ip_detection_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

  enable = __builtin__.property(_get_enable, _set_enable)
  nd_suppression = __builtin__.property(_get_nd_suppression, _set_nd_suppression)
  ip_mobility_threshold = __builtin__.property(_get_ip_mobility_threshold, _set_ip_mobility_threshold)
  duplicate_ip_detection_interval = __builtin__.property(_get_duplicate_ip_detection_interval, _set_duplicate_ip_detection_interval)


  _pyangbind_elements = OrderedDict([('enable', enable), ('nd_suppression', nd_suppression), ('ip_mobility_threshold', ip_mobility_threshold), ('duplicate_ip_detection_interval', duplicate_ip_detection_interval), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_fdb_nd_proxy_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb/nd-proxy/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State data related to ND-Proxy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enable','__nd_suppression','__ip_mobility_threshold','__duplicate_ip_detection_interval',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__nd_suppression = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="nd-suppression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__ip_mobility_threshold = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__duplicate_ip_detection_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'fdb', 'nd-proxy', 'state']

  def _get_enable(self):
    """
    Getter method for enable, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy/state/enable (boolean)

    YANG Description: Enable (TRUE) or disable (FALSE) Neighbor Discovery (ND)
proxy. If true a proxy server on the network answers the
NDP packets for an IP address that is not on that network.
    """
    return self.__enable
      
  def _set_enable(self, v, load=False):
    """
    Setter method for enable, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy/state/enable (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable() directly.

    YANG Description: Enable (TRUE) or disable (FALSE) Neighbor Discovery (ND)
proxy. If true a proxy server on the network answers the
NDP packets for an IP address that is not on that network.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable 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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enable = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable(self):
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_nd_suppression(self):
    """
    Getter method for nd_suppression, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy/state/nd_suppression (boolean)

    YANG Description: Enable (TRUE) or disable (FALSE) Neighbor Discovery suppression.
If true the NDP queries for an IP address that is not on that
network are suppressed. NDP suppression is a
technique used to reduce the amount of NDP Packets
flooding within individual VXLAN segments, that is between
VMs connected to the same logical switch.
    """
    return self.__nd_suppression
      
  def _set_nd_suppression(self, v, load=False):
    """
    Setter method for nd_suppression, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy/state/nd_suppression (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_nd_suppression is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_nd_suppression() directly.

    YANG Description: Enable (TRUE) or disable (FALSE) Neighbor Discovery suppression.
If true the NDP queries for an IP address that is not on that
network are suppressed. NDP suppression is a
technique used to reduce the amount of NDP Packets
flooding within individual VXLAN segments, that is between
VMs connected to the same logical switch.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="nd-suppression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """nd_suppression must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="nd-suppression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__nd_suppression = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_nd_suppression(self):
    self.__nd_suppression = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="nd-suppression", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_ip_mobility_threshold(self):
    """
    Getter method for ip_mobility_threshold, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy/state/ip_mobility_threshold (uint16)

    YANG Description: Enable (TRUE) or disable (FALSE). It is possible for a given host
or end-station (as defined by its IP address) to move from one
Ethernet segment to another. The number of IP mobility events that
are detected for a given IP address within the detection-threshold
before it is identified as a duplicate IP address.
Once the detection threshold is reached, updates for the IP address
are suppressed.
    """
    return self.__ip_mobility_threshold
      
  def _set_ip_mobility_threshold(self, v, load=False):
    """
    Setter method for ip_mobility_threshold, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy/state/ip_mobility_threshold (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ip_mobility_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ip_mobility_threshold() directly.

    YANG Description: Enable (TRUE) or disable (FALSE). It is possible for a given host
or end-station (as defined by its IP address) to move from one
Ethernet segment to another. The number of IP mobility events that
are detected for a given IP address within the detection-threshold
before it is identified as a duplicate IP address.
Once the detection threshold is reached, updates for the IP address
are suppressed.
    """
    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="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ip_mobility_threshold 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="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__ip_mobility_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ip_mobility_threshold(self):
    self.__ip_mobility_threshold = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="ip-mobility-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_duplicate_ip_detection_interval(self):
    """
    Getter method for duplicate_ip_detection_interval, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy/state/duplicate_ip_detection_interval (uint16)

    YANG Description: The time interval used in detecting a duplicate IP address.
Duplicate ip detection number of host moves
allowed within interval period
    """
    return self.__duplicate_ip_detection_interval
      
  def _set_duplicate_ip_detection_interval(self, v, load=False):
    """
    Setter method for duplicate_ip_detection_interval, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy/state/duplicate_ip_detection_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_duplicate_ip_detection_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_duplicate_ip_detection_interval() directly.

    YANG Description: The time interval used in detecting a duplicate IP address.
Duplicate ip detection number of host moves
allowed within interval period
    """
    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="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """duplicate_ip_detection_interval 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="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__duplicate_ip_detection_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_duplicate_ip_detection_interval(self):
    self.__duplicate_ip_detection_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="duplicate-ip-detection-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  enable = __builtin__.property(_get_enable)
  nd_suppression = __builtin__.property(_get_nd_suppression)
  ip_mobility_threshold = __builtin__.property(_get_ip_mobility_threshold)
  duplicate_ip_detection_interval = __builtin__.property(_get_duplicate_ip_detection_interval)


  _pyangbind_elements = OrderedDict([('enable', enable), ('nd_suppression', nd_suppression), ('ip_mobility_threshold', ip_mobility_threshold), ('duplicate_ip_detection_interval', duplicate_ip_detection_interval), ])


class yc_nd_proxy_openconfig_network_instance_l2__network_instances_network_instance_fdb_nd_proxy(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb/nd-proxy. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top Container related to ND-Proxy.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'nd-proxy'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_fdb_nd_proxy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_fdb_nd_proxy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'nd-proxy']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy/config (container)

    YANG Description: Configuration data related to ND-Proxy.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy/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 related to ND-Proxy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_fdb_nd_proxy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_nd_proxy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_nd_proxy_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy/state (container)

    YANG Description: State data related to ND-Proxy.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy/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 related to ND-Proxy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_fdb_nd_proxy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_nd_proxy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_nd_proxy_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_state_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb/l2rib/mac-table/entries/entry/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for L2RIB MAC table object entry
  """
  __slots__ = ('_path_helper', '_extmethods', '__mac_address','__vlan','__evi','__l2_vni',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__mac_address = 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)
    self.__vlan = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__evi = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)
    self.__l2_vni = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="l2-vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib', 'mac-table', 'entries', 'entry', 'state']

  def _get_mac_address(self):
    """
    Getter method for mac_address, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/state/mac_address (oc-yang:mac-address)

    YANG Description: MAC address of the L2RIB MAC or MAC-IP entry
    """
    return self.__mac_address
      
  def _set_mac_address(self, v, load=False):
    """
    Setter method for mac_address, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/state/mac_address (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_address() directly.

    YANG Description: MAC address of the L2RIB MAC or MAC-IP entry
    """
    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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_address 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)""",
        })

    self.__mac_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mac_address(self):
    self.__mac_address = 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)


  def _get_vlan(self):
    """
    Getter method for vlan, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/state/vlan (leafref)

    YANG Description: VLAN on which the MAC or MAC-IP address is present.
    """
    return self.__vlan
      
  def _set_vlan(self, v, load=False):
    """
    Setter method for vlan, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/state/vlan (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_vlan is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_vlan() directly.

    YANG Description: VLAN on which the MAC or MAC-IP address is present.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """vlan must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__vlan = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_vlan(self):
    self.__vlan = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_evi(self):
    """
    Getter method for evi, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/state/evi (oc-evpn-types:evi-id)

    YANG Description: EVPN Instance Identifier for the MAC or MAC-IP
    """
    return self.__evi
      
  def _set_evi(self, v, load=False):
    """
    Setter method for evi, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/state/evi (oc-evpn-types:evi-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_evi is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_evi() directly.

    YANG Description: EVPN Instance Identifier for the MAC or MAC-IP
    """
    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': ['1..16777215']}), is_leaf=True, yang_name="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """evi must be of a type compatible with oc-evpn-types:evi-id""",
          'defined-type': "oc-evpn-types:evi-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)""",
        })

    self.__evi = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_evi(self):
    self.__evi = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)


  def _get_l2_vni(self):
    """
    Getter method for l2_vni, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/state/l2_vni (oc-evpn-types:evi-id)

    YANG Description: Layer2 VNI segment mapped to given vlan-id
    """
    return self.__l2_vni
      
  def _set_l2_vni(self, v, load=False):
    """
    Setter method for l2_vni, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/state/l2_vni (oc-evpn-types:evi-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_l2_vni is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_l2_vni() directly.

    YANG Description: Layer2 VNI segment mapped to given vlan-id
    """
    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': ['1..16777215']}), is_leaf=True, yang_name="l2-vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """l2_vni must be of a type compatible with oc-evpn-types:evi-id""",
          'defined-type': "oc-evpn-types:evi-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="l2-vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)""",
        })

    self.__l2_vni = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_l2_vni(self):
    self.__l2_vni = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="l2-vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)

  mac_address = __builtin__.property(_get_mac_address)
  vlan = __builtin__.property(_get_vlan)
  evi = __builtin__.property(_get_evi)
  l2_vni = __builtin__.property(_get_l2_vni)


  _pyangbind_elements = OrderedDict([('mac_address', mac_address), ('vlan', vlan), ('evi', evi), ('l2_vni', l2_vni), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry_producers_producer_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb/l2rib/mac-table/entries/entry/producers/producer/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State container for L2RIB MAC Table Entries
  """
  __slots__ = ('_path_helper', '_extmethods', '__producer','__seq_number','__mobility_state','__esi','__sticky','__next_hop','__derived_from_mac_ip','__directly_received',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__producer = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LOCAL': {}, 'STATIC': {}, 'BGP': {}},), is_leaf=True, yang_name="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__seq_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="seq-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__mobility_state = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'FROZEN': {}, 'DUPLICATE': {}},), is_leaf=True, yang_name="mobility-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__esi = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}), is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi', is_config=False)
    self.__sticky = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sticky", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__next_hop = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__derived_from_mac_ip = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="derived-from-mac-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__directly_received = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="directly-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib', 'mac-table', 'entries', 'entry', 'producers', 'producer', 'state']

  def _get_producer(self):
    """
    Getter method for producer, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer/state/producer (enumeration)

    YANG Description: Source of the learned L2RIB route
    """
    return self.__producer
      
  def _set_producer(self, v, load=False):
    """
    Setter method for producer, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer/state/producer (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_producer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_producer() directly.

    YANG Description: Source of the learned L2RIB route
    """
    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={'LOCAL': {}, 'STATIC': {}, 'BGP': {}},), is_leaf=True, yang_name="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """producer must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LOCAL': {}, 'STATIC': {}, 'BGP': {}},), is_leaf=True, yang_name="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__producer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_producer(self):
    self.__producer = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LOCAL': {}, 'STATIC': {}, 'BGP': {}},), is_leaf=True, yang_name="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_seq_number(self):
    """
    Getter method for seq_number, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer/state/seq_number (uint32)

    YANG Description: The sequence number is used to ensure that PEs retain the correct
MAC/IP Advertisement route when multiple updates occur for the same
MAC address
    """
    return self.__seq_number
      
  def _set_seq_number(self, v, load=False):
    """
    Setter method for seq_number, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer/state/seq_number (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_seq_number is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_seq_number() directly.

    YANG Description: The sequence number is used to ensure that PEs retain the correct
MAC/IP Advertisement route when multiple updates occur for the same
MAC address
    """
    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="seq-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """seq_number 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="seq-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__seq_number = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_seq_number(self):
    self.__seq_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="seq-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_mobility_state(self):
    """
    Getter method for mobility_state, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer/state/mobility_state (enumeration)

    YANG Description: Indicates if learned MAC address is duplicate or frozen
    """
    return self.__mobility_state
      
  def _set_mobility_state(self, v, load=False):
    """
    Setter method for mobility_state, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer/state/mobility_state (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mobility_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mobility_state() directly.

    YANG Description: Indicates if learned MAC address is duplicate or frozen
    """
    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={'FROZEN': {}, 'DUPLICATE': {}},), is_leaf=True, yang_name="mobility-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mobility_state must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'FROZEN': {}, 'DUPLICATE': {}},), is_leaf=True, yang_name="mobility-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__mobility_state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mobility_state(self):
    self.__mobility_state = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'FROZEN': {}, 'DUPLICATE': {}},), is_leaf=True, yang_name="mobility-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_esi(self):
    """
    Getter method for esi, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer/state/esi (oc-evpn-types:esi)

    YANG Description: Ethernet Segment Identifier for local and remote routes
    """
    return self.__esi
      
  def _set_esi(self, v, load=False):
    """
    Setter method for esi, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer/state/esi (oc-evpn-types:esi)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_esi is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_esi() directly.

    YANG Description: Ethernet Segment Identifier for local and remote routes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}), is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """esi must be of a type compatible with oc-evpn-types:esi""",
          'defined-type': "oc-evpn-types:esi",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}), is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi', is_config=False)""",
        })

    self.__esi = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_esi(self):
    self.__esi = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}), is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi', is_config=False)


  def _get_sticky(self):
    """
    Getter method for sticky, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer/state/sticky (boolean)

    YANG Description: MAC address is sticky and not subjected to MAC moves
    """
    return self.__sticky
      
  def _set_sticky(self, v, load=False):
    """
    Setter method for sticky, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer/state/sticky (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sticky is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sticky() directly.

    YANG Description: MAC address is sticky and not subjected to MAC moves
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="sticky", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sticky must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sticky", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__sticky = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sticky(self):
    self.__sticky = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sticky", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_next_hop(self):
    """
    Getter method for next_hop, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer/state/next_hop (leafref)

    YANG Description: Leafref next-hop for the MAC-IP table entry
    """
    return self.__next_hop
      
  def _set_next_hop(self, v, load=False):
    """
    Setter method for next_hop, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer/state/next_hop (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hop() directly.

    YANG Description: Leafref next-hop for the MAC-IP table entry
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hop must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__next_hop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_next_hop(self):
    self.__next_hop = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_derived_from_mac_ip(self):
    """
    Getter method for derived_from_mac_ip, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer/state/derived_from_mac_ip (boolean)

    YANG Description: Derived from BGP MAC-IP route-type 2
    """
    return self.__derived_from_mac_ip
      
  def _set_derived_from_mac_ip(self, v, load=False):
    """
    Setter method for derived_from_mac_ip, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer/state/derived_from_mac_ip (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_derived_from_mac_ip is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_derived_from_mac_ip() directly.

    YANG Description: Derived from BGP MAC-IP route-type 2
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="derived-from-mac-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """derived_from_mac_ip must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="derived-from-mac-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__derived_from_mac_ip = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_derived_from_mac_ip(self):
    self.__derived_from_mac_ip = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="derived-from-mac-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_directly_received(self):
    """
    Getter method for directly_received, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer/state/directly_received (boolean)

    YANG Description: BGP learned MAC route-type 2
    """
    return self.__directly_received
      
  def _set_directly_received(self, v, load=False):
    """
    Setter method for directly_received, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer/state/directly_received (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_directly_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_directly_received() directly.

    YANG Description: BGP learned MAC route-type 2
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="directly-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """directly_received must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="directly-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__directly_received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_directly_received(self):
    self.__directly_received = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="directly-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  producer = __builtin__.property(_get_producer)
  seq_number = __builtin__.property(_get_seq_number)
  mobility_state = __builtin__.property(_get_mobility_state)
  esi = __builtin__.property(_get_esi)
  sticky = __builtin__.property(_get_sticky)
  next_hop = __builtin__.property(_get_next_hop)
  derived_from_mac_ip = __builtin__.property(_get_derived_from_mac_ip)
  directly_received = __builtin__.property(_get_directly_received)


  _pyangbind_elements = OrderedDict([('producer', producer), ('seq_number', seq_number), ('mobility_state', mobility_state), ('esi', esi), ('sticky', sticky), ('next_hop', next_hop), ('derived_from_mac_ip', derived_from_mac_ip), ('directly_received', directly_received), ])


class yc_producer_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry_producers_producer(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb/l2rib/mac-table/entries/entry/producers/producer. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of producers for each MAC table entry
  """
  __slots__ = ('_path_helper', '_extmethods', '__producer','__state',)

  _yang_name = 'producer'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__producer = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry_producers_producer_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib', 'mac-table', 'entries', 'entry', 'producers', 'producer']

  def _get_producer(self):
    """
    Getter method for producer, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer/producer (leafref)

    YANG Description: Reference to producer list key
    """
    return self.__producer
      
  def _set_producer(self, v, load=False):
    """
    Setter method for producer, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer/producer (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_producer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_producer() directly.

    YANG Description: Reference to producer 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="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """producer must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__producer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_producer(self):
    self.__producer = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer/state (container)

    YANG Description: State container for L2RIB MAC Table Entries
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer/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 container for L2RIB MAC Table Entries
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry_producers_producer_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry_producers_producer_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry_producers_producer_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  producer = __builtin__.property(_get_producer)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('producer', producer), ('state', state), ])


class yc_producers_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry_producers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb/l2rib/mac-table/entries/entry/producers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Source producers for each MAC Table entry
  """
  __slots__ = ('_path_helper', '_extmethods', '__producer',)

  _yang_name = 'producers'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__producer = YANGDynClass(base=YANGListType("producer",yc_producer_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry_producers_producer, yang_name="producer", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='producer', extensions=None), is_container='list', yang_name="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib', 'mac-table', 'entries', 'entry', 'producers']

  def _get_producer(self):
    """
    Getter method for producer, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer (list)

    YANG Description: List of producers for each MAC table entry
    """
    return self.__producer
      
  def _set_producer(self, v, load=False):
    """
    Setter method for producer, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers/producer (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_producer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_producer() directly.

    YANG Description: List of producers for each MAC table entry
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("producer",yc_producer_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry_producers_producer, yang_name="producer", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='producer', extensions=None), is_container='list', yang_name="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """producer must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("producer",yc_producer_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry_producers_producer, yang_name="producer", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='producer', extensions=None), is_container='list', yang_name="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__producer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_producer(self):
    self.__producer = YANGDynClass(base=YANGListType("producer",yc_producer_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry_producers_producer, yang_name="producer", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='producer', extensions=None), is_container='list', yang_name="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  producer = __builtin__.property(_get_producer)


  _pyangbind_elements = OrderedDict([('producer', producer), ])


class yc_entry_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb/l2rib/mac-table/entries/entry. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of learned MAC addresses
  """
  __slots__ = ('_path_helper', '_extmethods', '__mac_address','__state','__producers',)

  _yang_name = 'entry'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__mac_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__producers = YANGDynClass(base=yc_producers_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry_producers, is_container='container', yang_name="producers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib', 'mac-table', 'entries', 'entry']

  def _get_mac_address(self):
    """
    Getter method for mac_address, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/mac_address (leafref)

    YANG Description: Leafref of MAC address object
    """
    return self.__mac_address
      
  def _set_mac_address(self, v, load=False):
    """
    Setter method for mac_address, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/mac_address (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_address() directly.

    YANG Description: Leafref of MAC address object
    """
    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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_address must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__mac_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mac_address(self):
    self.__mac_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/state (container)

    YANG Description: Operational state data for L2RIB MAC table object entry
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/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 L2RIB MAC table object entry
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_producers(self):
    """
    Getter method for producers, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers (container)

    YANG Description: Source producers for each MAC Table entry
    """
    return self.__producers
      
  def _set_producers(self, v, load=False):
    """
    Setter method for producers, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry/producers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_producers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_producers() directly.

    YANG Description: Source producers for each MAC Table entry
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_producers_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry_producers, is_container='container', yang_name="producers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """producers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_producers_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry_producers, is_container='container', yang_name="producers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__producers = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_producers(self):
    self.__producers = YANGDynClass(base=yc_producers_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry_producers, is_container='container', yang_name="producers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  mac_address = __builtin__.property(_get_mac_address)
  state = __builtin__.property(_get_state)
  producers = __builtin__.property(_get_producers)


  _pyangbind_elements = OrderedDict([('mac_address', mac_address), ('state', state), ('producers', producers), ])


class yc_entries_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_entries(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb/l2rib/mac-table/entries. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for list of MAC address entries
  """
  __slots__ = ('_path_helper', '_extmethods', '__entry',)

  _yang_name = 'entries'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__entry = YANGDynClass(base=YANGListType("mac_address",yc_entry_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry, yang_name="entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mac-address', extensions=None), is_container='list', yang_name="entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib', 'mac-table', 'entries']

  def _get_entry(self):
    """
    Getter method for entry, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry (list)

    YANG Description: List of learned MAC addresses
    """
    return self.__entry
      
  def _set_entry(self, v, load=False):
    """
    Setter method for entry, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries/entry (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_entry is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_entry() directly.

    YANG Description: List of learned MAC addresses
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("mac_address",yc_entry_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry, yang_name="entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mac-address', extensions=None), is_container='list', yang_name="entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """entry must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("mac_address",yc_entry_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry, yang_name="entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mac-address', extensions=None), is_container='list', yang_name="entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__entry = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_entry(self):
    self.__entry = YANGDynClass(base=YANGListType("mac_address",yc_entry_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_entries_entry, yang_name="entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mac-address', extensions=None), is_container='list', yang_name="entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  entry = __builtin__.property(_get_entry)


  _pyangbind_elements = OrderedDict([('entry', entry), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_next_hops_next_hop_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb/l2rib/mac-table/next-hops/next-hop/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State container for common next-hop attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__peer_ip','__label','__interface','__subinterface',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__peer_ip = 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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib', 'mac-table', 'next-hops', 'next-hop', 'state']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/next_hops/next_hop/state/index (uint64)

    YANG Description: A unique entry for the next-hop.
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/next_hops/next_hop/state/index (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: A unique entry for the next-hop.
    """
    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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_index(self):
    self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_peer_ip(self):
    """
    Getter method for peer_ip, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/next_hops/next_hop/state/peer_ip (oc-inet:ip-address)

    YANG Description: Next hop peer address
    """
    return self.__peer_ip
      
  def _set_peer_ip(self, v, load=False):
    """
    Setter method for peer_ip, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/next_hops/next_hop/state/peer_ip (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_ip is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_ip() directly.

    YANG Description: Next hop peer address
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_ip must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__peer_ip = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_ip(self):
    self.__peer_ip = 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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_label(self):
    """
    Getter method for label, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/next_hops/next_hop/state/label (oc-evpn-types:evi-id)

    YANG Description: Next hop label representing the l2vni for the route
    """
    return self.__label
      
  def _set_label(self, v, load=False):
    """
    Setter method for label, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/next_hops/next_hop/state/label (oc-evpn-types:evi-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_label() directly.

    YANG Description: Next hop label representing the l2vni for the route
    """
    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': ['1..16777215']}), is_leaf=True, yang_name="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """label must be of a type compatible with oc-evpn-types:evi-id""",
          'defined-type': "oc-evpn-types:evi-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)""",
        })

    self.__label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_label(self):
    self.__label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)


  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/next_hops/next_hop/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 /network_instances/network_instance/fdb/l2rib/mac_table/next_hops/next_hop/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/next_hops/next_hop/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 /network_instances/network_instance/fdb/l2rib/mac_table/next_hops/next_hop/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)

  index = __builtin__.property(_get_index)
  peer_ip = __builtin__.property(_get_peer_ip)
  label = __builtin__.property(_get_label)
  interface = __builtin__.property(_get_interface)
  subinterface = __builtin__.property(_get_subinterface)


  _pyangbind_elements = OrderedDict([('index', index), ('peer_ip', peer_ip), ('label', label), ('interface', interface), ('subinterface', subinterface), ])


class yc_next_hop_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_next_hops_next_hop(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb/l2rib/mac-table/next-hops/next-hop. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of next hop attributes for each MAC or MAC-IP
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__state',)

  _yang_name = 'next-hop'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_next_hops_next_hop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib', 'mac-table', 'next-hops', 'next-hop']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/next_hops/next_hop/index (leafref)

    YANG Description: A unique index identifying the next-hop entry for the
MAC or MAC-IP entry
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/next_hops/next_hop/index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: A unique index identifying the next-hop entry for the
MAC or MAC-IP entry
    """
    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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_index(self):
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/next_hops/next_hop/state (container)

    YANG Description: State container for common next-hop attributes
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/next_hops/next_hop/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 container for common next-hop attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_next_hops_next_hop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_next_hops_next_hop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_next_hops_next_hop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  index = __builtin__.property(_get_index)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('index', index), ('state', state), ])


class yc_next_hops_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_next_hops(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb/l2rib/mac-table/next-hops. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A next-hop associated with the MAC or MAC-IP entry
  """
  __slots__ = ('_path_helper', '_extmethods', '__next_hop',)

  _yang_name = 'next-hops'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__next_hop = YANGDynClass(base=YANGListType("index",yc_next_hop_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_next_hops_next_hop, yang_name="next-hop", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib', 'mac-table', 'next-hops']

  def _get_next_hop(self):
    """
    Getter method for next_hop, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/next_hops/next_hop (list)

    YANG Description: List of next hop attributes for each MAC or MAC-IP
    """
    return self.__next_hop
      
  def _set_next_hop(self, v, load=False):
    """
    Setter method for next_hop, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/next_hops/next_hop (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hop() directly.

    YANG Description: List of next hop attributes for each MAC or MAC-IP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("index",yc_next_hop_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_next_hops_next_hop, yang_name="next-hop", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hop must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("index",yc_next_hop_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_next_hops_next_hop, yang_name="next-hop", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__next_hop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_next_hop(self):
    self.__next_hop = YANGDynClass(base=YANGListType("index",yc_next_hop_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_next_hops_next_hop, yang_name="next-hop", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  next_hop = __builtin__.property(_get_next_hop)


  _pyangbind_elements = OrderedDict([('next_hop', next_hop), ])


class yc_mac_table_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb/l2rib/mac-table. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state container for MAC address information installed
into the MAC VRF of the L2RIB
  """
  __slots__ = ('_path_helper', '_extmethods', '__entries','__next_hops',)

  _yang_name = 'mac-table'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__entries = YANGDynClass(base=yc_entries_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_entries, is_container='container', yang_name="entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__next_hops = YANGDynClass(base=yc_next_hops_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_next_hops, is_container='container', yang_name="next-hops", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib', 'mac-table']

  def _get_entries(self):
    """
    Getter method for entries, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries (container)

    YANG Description: Enclosing container for list of MAC address entries
    """
    return self.__entries
      
  def _set_entries(self, v, load=False):
    """
    Setter method for entries, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/entries (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_entries is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_entries() directly.

    YANG Description: Enclosing container for list of MAC address entries
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_entries_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_entries, is_container='container', yang_name="entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """entries must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_entries_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_entries, is_container='container', yang_name="entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__entries = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_entries(self):
    self.__entries = YANGDynClass(base=yc_entries_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_entries, is_container='container', yang_name="entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_next_hops(self):
    """
    Getter method for next_hops, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/next_hops (container)

    YANG Description: A next-hop associated with the MAC or MAC-IP entry
    """
    return self.__next_hops
      
  def _set_next_hops(self, v, load=False):
    """
    Setter method for next_hops, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table/next_hops (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hops is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hops() directly.

    YANG Description: A next-hop associated with the MAC or MAC-IP entry
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_next_hops_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_next_hops, is_container='container', yang_name="next-hops", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hops must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_next_hops_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_next_hops, is_container='container', yang_name="next-hops", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__next_hops = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_next_hops(self):
    self.__next_hops = YANGDynClass(base=yc_next_hops_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table_next_hops, is_container='container', yang_name="next-hops", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  entries = __builtin__.property(_get_entries)
  next_hops = __builtin__.property(_get_next_hops)


  _pyangbind_elements = OrderedDict([('entries', entries), ('next_hops', next_hops), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb/l2rib/mac-ip-table/entries/entry/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for L2RIB MAC-IP table object entry
  """
  __slots__ = ('_path_helper', '_extmethods', '__mac_address','__vlan','__evi','__l2_vni','__host_ip','__l3_vni',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__mac_address = 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)
    self.__vlan = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__evi = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)
    self.__l2_vni = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="l2-vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)
    self.__host_ip = 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}'}),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}|:))'}),], is_leaf=True, yang_name="host-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__l3_vni = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="l3-vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib', 'mac-ip-table', 'entries', 'entry', 'state']

  def _get_mac_address(self):
    """
    Getter method for mac_address, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/state/mac_address (oc-yang:mac-address)

    YANG Description: MAC address of the L2RIB MAC or MAC-IP entry
    """
    return self.__mac_address
      
  def _set_mac_address(self, v, load=False):
    """
    Setter method for mac_address, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/state/mac_address (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_address() directly.

    YANG Description: MAC address of the L2RIB MAC or MAC-IP entry
    """
    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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_address 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)""",
        })

    self.__mac_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mac_address(self):
    self.__mac_address = 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)


  def _get_vlan(self):
    """
    Getter method for vlan, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/state/vlan (leafref)

    YANG Description: VLAN on which the MAC or MAC-IP address is present.
    """
    return self.__vlan
      
  def _set_vlan(self, v, load=False):
    """
    Setter method for vlan, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/state/vlan (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_vlan is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_vlan() directly.

    YANG Description: VLAN on which the MAC or MAC-IP address is present.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """vlan must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__vlan = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_vlan(self):
    self.__vlan = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="vlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_evi(self):
    """
    Getter method for evi, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/state/evi (oc-evpn-types:evi-id)

    YANG Description: EVPN Instance Identifier for the MAC or MAC-IP
    """
    return self.__evi
      
  def _set_evi(self, v, load=False):
    """
    Setter method for evi, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/state/evi (oc-evpn-types:evi-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_evi is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_evi() directly.

    YANG Description: EVPN Instance Identifier for the MAC or MAC-IP
    """
    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': ['1..16777215']}), is_leaf=True, yang_name="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """evi must be of a type compatible with oc-evpn-types:evi-id""",
          'defined-type': "oc-evpn-types:evi-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)""",
        })

    self.__evi = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_evi(self):
    self.__evi = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)


  def _get_l2_vni(self):
    """
    Getter method for l2_vni, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/state/l2_vni (oc-evpn-types:evi-id)

    YANG Description: Layer2 VNI segment mapped to given vlan-id
    """
    return self.__l2_vni
      
  def _set_l2_vni(self, v, load=False):
    """
    Setter method for l2_vni, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/state/l2_vni (oc-evpn-types:evi-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_l2_vni is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_l2_vni() directly.

    YANG Description: Layer2 VNI segment mapped to given vlan-id
    """
    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': ['1..16777215']}), is_leaf=True, yang_name="l2-vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """l2_vni must be of a type compatible with oc-evpn-types:evi-id""",
          'defined-type': "oc-evpn-types:evi-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="l2-vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)""",
        })

    self.__l2_vni = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_l2_vni(self):
    self.__l2_vni = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="l2-vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)


  def _get_host_ip(self):
    """
    Getter method for host_ip, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/state/host_ip (oc-inet:ip-address)

    YANG Description: Host IP address of the CE device for the L2RIB MAC-IP entry
    """
    return self.__host_ip
      
  def _set_host_ip(self, v, load=False):
    """
    Setter method for host_ip, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/state/host_ip (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_host_ip is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_host_ip() directly.

    YANG Description: Host IP address of the CE device for the L2RIB MAC-IP entry
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="host-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """host_ip must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="host-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__host_ip = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_host_ip(self):
    self.__host_ip = 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}'}),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}|:))'}),], is_leaf=True, yang_name="host-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_l3_vni(self):
    """
    Getter method for l3_vni, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/state/l3_vni (oc-evpn-types:evi-id)

    YANG Description: Symmetric IRB uses the same forwarding semantics when routing
between IP subnets with VRF Lite or MPLS L3VPNs. With symmetric IRB,
all traffic egressing and returning from a VTEP uses the same VNI.
Specifically, the same Layer 3 VNI (L3VNI) associated with the VRF
is used for all routed traffic. Layer3 VNI used for inter-subnet
routing
    """
    return self.__l3_vni
      
  def _set_l3_vni(self, v, load=False):
    """
    Setter method for l3_vni, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/state/l3_vni (oc-evpn-types:evi-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_l3_vni is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_l3_vni() directly.

    YANG Description: Symmetric IRB uses the same forwarding semantics when routing
between IP subnets with VRF Lite or MPLS L3VPNs. With symmetric IRB,
all traffic egressing and returning from a VTEP uses the same VNI.
Specifically, the same Layer 3 VNI (L3VNI) associated with the VRF
is used for all routed traffic. Layer3 VNI used for inter-subnet
routing
    """
    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': ['1..16777215']}), is_leaf=True, yang_name="l3-vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """l3_vni must be of a type compatible with oc-evpn-types:evi-id""",
          'defined-type': "oc-evpn-types:evi-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="l3-vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)""",
        })

    self.__l3_vni = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_l3_vni(self):
    self.__l3_vni = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="l3-vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)

  mac_address = __builtin__.property(_get_mac_address)
  vlan = __builtin__.property(_get_vlan)
  evi = __builtin__.property(_get_evi)
  l2_vni = __builtin__.property(_get_l2_vni)
  host_ip = __builtin__.property(_get_host_ip)
  l3_vni = __builtin__.property(_get_l3_vni)


  _pyangbind_elements = OrderedDict([('mac_address', mac_address), ('vlan', vlan), ('evi', evi), ('l2_vni', l2_vni), ('host_ip', host_ip), ('l3_vni', l3_vni), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry_producers_producer_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb/l2rib/mac-ip-table/entries/entry/producers/producer/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State container for L2RIB MAC Table Entries
  """
  __slots__ = ('_path_helper', '_extmethods', '__producer','__seq_number','__mobility_state','__esi','__sticky','__next_hop',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__producer = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LOCAL': {}, 'STATIC': {}, 'BGP': {}},), is_leaf=True, yang_name="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__seq_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="seq-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__mobility_state = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'FROZEN': {}, 'DUPLICATE': {}},), is_leaf=True, yang_name="mobility-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__esi = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}), is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi', is_config=False)
    self.__sticky = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sticky", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__next_hop = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib', 'mac-ip-table', 'entries', 'entry', 'producers', 'producer', 'state']

  def _get_producer(self):
    """
    Getter method for producer, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/producers/producer/state/producer (enumeration)

    YANG Description: Source of the learned L2RIB route
    """
    return self.__producer
      
  def _set_producer(self, v, load=False):
    """
    Setter method for producer, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/producers/producer/state/producer (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_producer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_producer() directly.

    YANG Description: Source of the learned L2RIB route
    """
    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={'LOCAL': {}, 'STATIC': {}, 'BGP': {}},), is_leaf=True, yang_name="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """producer must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LOCAL': {}, 'STATIC': {}, 'BGP': {}},), is_leaf=True, yang_name="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__producer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_producer(self):
    self.__producer = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LOCAL': {}, 'STATIC': {}, 'BGP': {}},), is_leaf=True, yang_name="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_seq_number(self):
    """
    Getter method for seq_number, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/producers/producer/state/seq_number (uint32)

    YANG Description: The sequence number is used to ensure that PEs retain the correct
MAC/IP Advertisement route when multiple updates occur for the same
MAC address
    """
    return self.__seq_number
      
  def _set_seq_number(self, v, load=False):
    """
    Setter method for seq_number, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/producers/producer/state/seq_number (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_seq_number is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_seq_number() directly.

    YANG Description: The sequence number is used to ensure that PEs retain the correct
MAC/IP Advertisement route when multiple updates occur for the same
MAC address
    """
    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="seq-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """seq_number 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="seq-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__seq_number = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_seq_number(self):
    self.__seq_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="seq-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_mobility_state(self):
    """
    Getter method for mobility_state, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/producers/producer/state/mobility_state (enumeration)

    YANG Description: Indicates if learned MAC address is duplicate or frozen
    """
    return self.__mobility_state
      
  def _set_mobility_state(self, v, load=False):
    """
    Setter method for mobility_state, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/producers/producer/state/mobility_state (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mobility_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mobility_state() directly.

    YANG Description: Indicates if learned MAC address is duplicate or frozen
    """
    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={'FROZEN': {}, 'DUPLICATE': {}},), is_leaf=True, yang_name="mobility-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mobility_state must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'FROZEN': {}, 'DUPLICATE': {}},), is_leaf=True, yang_name="mobility-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__mobility_state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mobility_state(self):
    self.__mobility_state = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'FROZEN': {}, 'DUPLICATE': {}},), is_leaf=True, yang_name="mobility-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_esi(self):
    """
    Getter method for esi, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/producers/producer/state/esi (oc-evpn-types:esi)

    YANG Description: Ethernet Segment Identifier for local and remote routes
    """
    return self.__esi
      
  def _set_esi(self, v, load=False):
    """
    Setter method for esi, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/producers/producer/state/esi (oc-evpn-types:esi)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_esi is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_esi() directly.

    YANG Description: Ethernet Segment Identifier for local and remote routes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}), is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """esi must be of a type compatible with oc-evpn-types:esi""",
          'defined-type': "oc-evpn-types:esi",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}), is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi', is_config=False)""",
        })

    self.__esi = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_esi(self):
    self.__esi = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}), is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi', is_config=False)


  def _get_sticky(self):
    """
    Getter method for sticky, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/producers/producer/state/sticky (boolean)

    YANG Description: MAC address is sticky and not subjected to MAC moves
    """
    return self.__sticky
      
  def _set_sticky(self, v, load=False):
    """
    Setter method for sticky, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/producers/producer/state/sticky (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sticky is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sticky() directly.

    YANG Description: MAC address is sticky and not subjected to MAC moves
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="sticky", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sticky must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sticky", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__sticky = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sticky(self):
    self.__sticky = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sticky", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_next_hop(self):
    """
    Getter method for next_hop, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/producers/producer/state/next_hop (leafref)

    YANG Description: Leafref next-hop for the MAC-IP table entry
    """
    return self.__next_hop
      
  def _set_next_hop(self, v, load=False):
    """
    Setter method for next_hop, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/producers/producer/state/next_hop (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hop() directly.

    YANG Description: Leafref next-hop for the MAC-IP table entry
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hop must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__next_hop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_next_hop(self):
    self.__next_hop = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)

  producer = __builtin__.property(_get_producer)
  seq_number = __builtin__.property(_get_seq_number)
  mobility_state = __builtin__.property(_get_mobility_state)
  esi = __builtin__.property(_get_esi)
  sticky = __builtin__.property(_get_sticky)
  next_hop = __builtin__.property(_get_next_hop)


  _pyangbind_elements = OrderedDict([('producer', producer), ('seq_number', seq_number), ('mobility_state', mobility_state), ('esi', esi), ('sticky', sticky), ('next_hop', next_hop), ])


class yc_producer_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry_producers_producer(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb/l2rib/mac-ip-table/entries/entry/producers/producer. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of producers for each MAC-IP table entry
  """
  __slots__ = ('_path_helper', '_extmethods', '__producer','__state',)

  _yang_name = 'producer'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__producer = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry_producers_producer_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib', 'mac-ip-table', 'entries', 'entry', 'producers', 'producer']

  def _get_producer(self):
    """
    Getter method for producer, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/producers/producer/producer (leafref)

    YANG Description: Reference to producer list key
    """
    return self.__producer
      
  def _set_producer(self, v, load=False):
    """
    Setter method for producer, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/producers/producer/producer (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_producer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_producer() directly.

    YANG Description: Reference to producer 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="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """producer must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__producer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_producer(self):
    self.__producer = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/producers/producer/state (container)

    YANG Description: State container for L2RIB MAC Table Entries
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/producers/producer/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 container for L2RIB MAC Table Entries
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry_producers_producer_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry_producers_producer_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry_producers_producer_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  producer = __builtin__.property(_get_producer)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('producer', producer), ('state', state), ])


class yc_producers_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry_producers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb/l2rib/mac-ip-table/entries/entry/producers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Source producers for each MAC-IP Table entry
  """
  __slots__ = ('_path_helper', '_extmethods', '__producer',)

  _yang_name = 'producers'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__producer = YANGDynClass(base=YANGListType("producer",yc_producer_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry_producers_producer, yang_name="producer", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='producer', extensions=None), is_container='list', yang_name="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib', 'mac-ip-table', 'entries', 'entry', 'producers']

  def _get_producer(self):
    """
    Getter method for producer, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/producers/producer (list)

    YANG Description: List of producers for each MAC-IP table entry
    """
    return self.__producer
      
  def _set_producer(self, v, load=False):
    """
    Setter method for producer, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/producers/producer (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_producer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_producer() directly.

    YANG Description: List of producers for each MAC-IP table entry
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("producer",yc_producer_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry_producers_producer, yang_name="producer", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='producer', extensions=None), is_container='list', yang_name="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """producer must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("producer",yc_producer_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry_producers_producer, yang_name="producer", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='producer', extensions=None), is_container='list', yang_name="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__producer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_producer(self):
    self.__producer = YANGDynClass(base=YANGListType("producer",yc_producer_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry_producers_producer, yang_name="producer", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='producer', extensions=None), is_container='list', yang_name="producer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  producer = __builtin__.property(_get_producer)


  _pyangbind_elements = OrderedDict([('producer', producer), ])


class yc_entry_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb/l2rib/mac-ip-table/entries/entry. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of learned MAC-IP addresses
  """
  __slots__ = ('_path_helper', '_extmethods', '__mac_address','__host_ip','__state','__producers',)

  _yang_name = 'entry'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__mac_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__host_ip = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="host-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__producers = YANGDynClass(base=yc_producers_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry_producers, is_container='container', yang_name="producers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib', 'mac-ip-table', 'entries', 'entry']

  def _get_mac_address(self):
    """
    Getter method for mac_address, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/mac_address (leafref)

    YANG Description: Leafref of MAC-IP address object
    """
    return self.__mac_address
      
  def _set_mac_address(self, v, load=False):
    """
    Setter method for mac_address, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/mac_address (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_address() directly.

    YANG Description: Leafref of MAC-IP address object
    """
    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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_address must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__mac_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mac_address(self):
    self.__mac_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_host_ip(self):
    """
    Getter method for host_ip, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/host_ip (leafref)

    YANG Description: IP address of the Customer Edge device
    """
    return self.__host_ip
      
  def _set_host_ip(self, v, load=False):
    """
    Setter method for host_ip, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/host_ip (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_host_ip is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_host_ip() directly.

    YANG Description: IP address of the Customer Edge device
    """
    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="host-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """host_ip must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="host-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__host_ip = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_host_ip(self):
    self.__host_ip = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="host-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/state (container)

    YANG Description: Operational state data for L2RIB MAC-IP table object entry
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/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 L2RIB MAC-IP table object entry
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_producers(self):
    """
    Getter method for producers, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/producers (container)

    YANG Description: Source producers for each MAC-IP Table entry
    """
    return self.__producers
      
  def _set_producers(self, v, load=False):
    """
    Setter method for producers, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry/producers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_producers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_producers() directly.

    YANG Description: Source producers for each MAC-IP Table entry
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_producers_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry_producers, is_container='container', yang_name="producers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """producers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_producers_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry_producers, is_container='container', yang_name="producers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__producers = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_producers(self):
    self.__producers = YANGDynClass(base=yc_producers_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry_producers, is_container='container', yang_name="producers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  mac_address = __builtin__.property(_get_mac_address)
  host_ip = __builtin__.property(_get_host_ip)
  state = __builtin__.property(_get_state)
  producers = __builtin__.property(_get_producers)


  _pyangbind_elements = OrderedDict([('mac_address', mac_address), ('host_ip', host_ip), ('state', state), ('producers', producers), ])


class yc_entries_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb/l2rib/mac-ip-table/entries. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for list of MAC-IP address entries
  """
  __slots__ = ('_path_helper', '_extmethods', '__entry',)

  _yang_name = 'entries'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__entry = YANGDynClass(base=YANGListType("mac_address host_ip",yc_entry_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry, yang_name="entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mac-address host-ip', extensions=None), is_container='list', yang_name="entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib', 'mac-ip-table', 'entries']

  def _get_entry(self):
    """
    Getter method for entry, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry (list)

    YANG Description: List of learned MAC-IP addresses
    """
    return self.__entry
      
  def _set_entry(self, v, load=False):
    """
    Setter method for entry, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries/entry (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_entry is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_entry() directly.

    YANG Description: List of learned MAC-IP addresses
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("mac_address host_ip",yc_entry_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry, yang_name="entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mac-address host-ip', extensions=None), is_container='list', yang_name="entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """entry must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("mac_address host_ip",yc_entry_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry, yang_name="entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mac-address host-ip', extensions=None), is_container='list', yang_name="entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__entry = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_entry(self):
    self.__entry = YANGDynClass(base=YANGListType("mac_address host_ip",yc_entry_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries_entry, yang_name="entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mac-address host-ip', extensions=None), is_container='list', yang_name="entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  entry = __builtin__.property(_get_entry)


  _pyangbind_elements = OrderedDict([('entry', entry), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_next_hops_next_hop_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb/l2rib/mac-ip-table/next-hops/next-hop/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State container for common next-hop attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__peer_ip','__label','__interface','__subinterface',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__peer_ip = 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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib', 'mac-ip-table', 'next-hops', 'next-hop', 'state']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/next_hops/next_hop/state/index (uint64)

    YANG Description: A unique entry for the next-hop.
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/next_hops/next_hop/state/index (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: A unique entry for the next-hop.
    """
    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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_index(self):
    self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_peer_ip(self):
    """
    Getter method for peer_ip, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/next_hops/next_hop/state/peer_ip (oc-inet:ip-address)

    YANG Description: Next hop peer address
    """
    return self.__peer_ip
      
  def _set_peer_ip(self, v, load=False):
    """
    Setter method for peer_ip, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/next_hops/next_hop/state/peer_ip (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_ip is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_ip() directly.

    YANG Description: Next hop peer address
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_ip must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__peer_ip = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_ip(self):
    self.__peer_ip = 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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_label(self):
    """
    Getter method for label, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/next_hops/next_hop/state/label (oc-evpn-types:evi-id)

    YANG Description: Next hop label representing the l2vni for the route
    """
    return self.__label
      
  def _set_label(self, v, load=False):
    """
    Setter method for label, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/next_hops/next_hop/state/label (oc-evpn-types:evi-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_label() directly.

    YANG Description: Next hop label representing the l2vni for the route
    """
    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': ['1..16777215']}), is_leaf=True, yang_name="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """label must be of a type compatible with oc-evpn-types:evi-id""",
          'defined-type': "oc-evpn-types:evi-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)""",
        })

    self.__label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_label(self):
    self.__label = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)


  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/next_hops/next_hop/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 /network_instances/network_instance/fdb/l2rib/mac_ip_table/next_hops/next_hop/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/next_hops/next_hop/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 /network_instances/network_instance/fdb/l2rib/mac_ip_table/next_hops/next_hop/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)

  index = __builtin__.property(_get_index)
  peer_ip = __builtin__.property(_get_peer_ip)
  label = __builtin__.property(_get_label)
  interface = __builtin__.property(_get_interface)
  subinterface = __builtin__.property(_get_subinterface)


  _pyangbind_elements = OrderedDict([('index', index), ('peer_ip', peer_ip), ('label', label), ('interface', interface), ('subinterface', subinterface), ])


class yc_next_hop_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_next_hops_next_hop(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb/l2rib/mac-ip-table/next-hops/next-hop. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of next hop attributes for each MAC or MAC-IP
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__state',)

  _yang_name = 'next-hop'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_next_hops_next_hop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib', 'mac-ip-table', 'next-hops', 'next-hop']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/next_hops/next_hop/index (leafref)

    YANG Description: A unique index identifying the next-hop entry for the
MAC or MAC-IP entry
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/next_hops/next_hop/index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: A unique index identifying the next-hop entry for the
MAC or MAC-IP entry
    """
    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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_index(self):
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/next_hops/next_hop/state (container)

    YANG Description: State container for common next-hop attributes
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/next_hops/next_hop/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 container for common next-hop attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_next_hops_next_hop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_next_hops_next_hop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_next_hops_next_hop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  index = __builtin__.property(_get_index)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('index', index), ('state', state), ])


class yc_next_hops_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_next_hops(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb/l2rib/mac-ip-table/next-hops. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A next-hop associated with the MAC or MAC-IP entry
  """
  __slots__ = ('_path_helper', '_extmethods', '__next_hop',)

  _yang_name = 'next-hops'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__next_hop = YANGDynClass(base=YANGListType("index",yc_next_hop_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_next_hops_next_hop, yang_name="next-hop", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib', 'mac-ip-table', 'next-hops']

  def _get_next_hop(self):
    """
    Getter method for next_hop, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/next_hops/next_hop (list)

    YANG Description: List of next hop attributes for each MAC or MAC-IP
    """
    return self.__next_hop
      
  def _set_next_hop(self, v, load=False):
    """
    Setter method for next_hop, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/next_hops/next_hop (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hop() directly.

    YANG Description: List of next hop attributes for each MAC or MAC-IP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("index",yc_next_hop_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_next_hops_next_hop, yang_name="next-hop", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hop must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("index",yc_next_hop_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_next_hops_next_hop, yang_name="next-hop", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__next_hop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_next_hop(self):
    self.__next_hop = YANGDynClass(base=YANGListType("index",yc_next_hop_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_next_hops_next_hop, yang_name="next-hop", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  next_hop = __builtin__.property(_get_next_hop)


  _pyangbind_elements = OrderedDict([('next_hop', next_hop), ])


class yc_mac_ip_table_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb/l2rib/mac-ip-table. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state container for MAC-IP address information installed
into the MAC VRF of the L2RIB
  """
  __slots__ = ('_path_helper', '_extmethods', '__entries','__next_hops',)

  _yang_name = 'mac-ip-table'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__entries = YANGDynClass(base=yc_entries_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries, is_container='container', yang_name="entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__next_hops = YANGDynClass(base=yc_next_hops_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_next_hops, is_container='container', yang_name="next-hops", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib', 'mac-ip-table']

  def _get_entries(self):
    """
    Getter method for entries, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries (container)

    YANG Description: Enclosing container for list of MAC-IP address entries
    """
    return self.__entries
      
  def _set_entries(self, v, load=False):
    """
    Setter method for entries, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/entries (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_entries is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_entries() directly.

    YANG Description: Enclosing container for list of MAC-IP address entries
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_entries_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries, is_container='container', yang_name="entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """entries must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_entries_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries, is_container='container', yang_name="entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__entries = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_entries(self):
    self.__entries = YANGDynClass(base=yc_entries_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_entries, is_container='container', yang_name="entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_next_hops(self):
    """
    Getter method for next_hops, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/next_hops (container)

    YANG Description: A next-hop associated with the MAC or MAC-IP entry
    """
    return self.__next_hops
      
  def _set_next_hops(self, v, load=False):
    """
    Setter method for next_hops, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table/next_hops (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hops is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hops() directly.

    YANG Description: A next-hop associated with the MAC or MAC-IP entry
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_next_hops_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_next_hops, is_container='container', yang_name="next-hops", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hops must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_next_hops_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_next_hops, is_container='container', yang_name="next-hops", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__next_hops = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_next_hops(self):
    self.__next_hops = YANGDynClass(base=yc_next_hops_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table_next_hops, is_container='container', yang_name="next-hops", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  entries = __builtin__.property(_get_entries)
  next_hops = __builtin__.property(_get_next_hops)


  _pyangbind_elements = OrderedDict([('entries', entries), ('next_hops', next_hops), ])


class yc_l2rib_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb/l2rib. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state container for MAC address and MAC-IP address
information that is learned and installed into the MAC VRF Layer 2
Routing Information Base (L2RIB)
  """
  __slots__ = ('_path_helper', '_extmethods', '__mac_table','__mac_ip_table',)

  _yang_name = 'l2rib'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__mac_table = YANGDynClass(base=yc_mac_table_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table, is_container='container', yang_name="mac-table", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__mac_ip_table = YANGDynClass(base=yc_mac_ip_table_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table, is_container='container', yang_name="mac-ip-table", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb', 'l2rib']

  def _get_mac_table(self):
    """
    Getter method for mac_table, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table (container)

    YANG Description: Operational state container for MAC address information installed
into the MAC VRF of the L2RIB
    """
    return self.__mac_table
      
  def _set_mac_table(self, v, load=False):
    """
    Setter method for mac_table, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_table (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_table is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_table() directly.

    YANG Description: Operational state container for MAC address information installed
into the MAC VRF of the L2RIB
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_mac_table_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table, is_container='container', yang_name="mac-table", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_table must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_mac_table_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table, is_container='container', yang_name="mac-table", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__mac_table = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mac_table(self):
    self.__mac_table = YANGDynClass(base=yc_mac_table_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_table, is_container='container', yang_name="mac-table", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_mac_ip_table(self):
    """
    Getter method for mac_ip_table, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table (container)

    YANG Description: Operational state container for MAC-IP address information installed
into the MAC VRF of the L2RIB
    """
    return self.__mac_ip_table
      
  def _set_mac_ip_table(self, v, load=False):
    """
    Setter method for mac_ip_table, mapped from YANG variable /network_instances/network_instance/fdb/l2rib/mac_ip_table (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_ip_table is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_ip_table() directly.

    YANG Description: Operational state container for MAC-IP address information installed
into the MAC VRF of the L2RIB
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_mac_ip_table_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table, is_container='container', yang_name="mac-ip-table", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_ip_table must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_mac_ip_table_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table, is_container='container', yang_name="mac-ip-table", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__mac_ip_table = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mac_ip_table(self):
    self.__mac_ip_table = YANGDynClass(base=yc_mac_ip_table_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib_mac_ip_table, is_container='container', yang_name="mac-ip-table", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  mac_table = __builtin__.property(_get_mac_table)
  mac_ip_table = __builtin__.property(_get_mac_ip_table)


  _pyangbind_elements = OrderedDict([('mac_table', mac_table), ('mac_ip_table', mac_ip_table), ])


class yc_fdb_openconfig_network_instance_l2__network_instances_network_instance_fdb(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/fdb. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state and configuration parameters relating to
the forwarding database of the network instance
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__mac_table','__mac_mobility','__arp_proxy','__nd_proxy','__l2rib',)

  _yang_name = 'fdb'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_fdb_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_fdb_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__mac_table = YANGDynClass(base=yc_mac_table_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_table, is_container='container', yang_name="mac-table", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__mac_mobility = YANGDynClass(base=yc_mac_mobility_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_mobility, is_container='container', yang_name="mac-mobility", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__arp_proxy = YANGDynClass(base=yc_arp_proxy_openconfig_network_instance_l2__network_instances_network_instance_fdb_arp_proxy, is_container='container', yang_name="arp-proxy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__nd_proxy = YANGDynClass(base=yc_nd_proxy_openconfig_network_instance_l2__network_instances_network_instance_fdb_nd_proxy, is_container='container', yang_name="nd-proxy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__l2rib = YANGDynClass(base=yc_l2rib_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib, is_container='container', yang_name="l2rib", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'fdb']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/fdb/config (container)

    YANG Description: Configuration parameters relating to the FDB
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/fdb/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 FDB
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_fdb_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/fdb/state (container)

    YANG Description: Operational state parameters relating to the FDB
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/fdb/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 FDB
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_fdb_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_fdb_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_mac_table(self):
    """
    Getter method for mac_table, mapped from YANG variable /network_instances/network_instance/fdb/mac_table (container)

    YANG Description: Table of learned or statically configured MAC addresses and
corresponding VLANs in the bridge domain
    """
    return self.__mac_table
      
  def _set_mac_table(self, v, load=False):
    """
    Setter method for mac_table, mapped from YANG variable /network_instances/network_instance/fdb/mac_table (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_table is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_table() directly.

    YANG Description: Table of learned or statically configured MAC addresses and
corresponding VLANs in the bridge domain
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_mac_table_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_table, is_container='container', yang_name="mac-table", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_table must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_mac_table_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_table, is_container='container', yang_name="mac-table", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__mac_table = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mac_table(self):
    self.__mac_table = YANGDynClass(base=yc_mac_table_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_table, is_container='container', yang_name="mac-table", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_mac_mobility(self):
    """
    Getter method for mac_mobility, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility (container)

    YANG Description: Top grouping the configuration and state data related to mac
mobility.
    """
    return self.__mac_mobility
      
  def _set_mac_mobility(self, v, load=False):
    """
    Setter method for mac_mobility, mapped from YANG variable /network_instances/network_instance/fdb/mac_mobility (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_mobility is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_mobility() directly.

    YANG Description: Top grouping the configuration and state data related to mac
mobility.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_mac_mobility_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_mobility, is_container='container', yang_name="mac-mobility", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_mobility must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_mac_mobility_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_mobility, is_container='container', yang_name="mac-mobility", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__mac_mobility = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mac_mobility(self):
    self.__mac_mobility = YANGDynClass(base=yc_mac_mobility_openconfig_network_instance_l2__network_instances_network_instance_fdb_mac_mobility, is_container='container', yang_name="mac-mobility", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_arp_proxy(self):
    """
    Getter method for arp_proxy, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy (container)

    YANG Description: Top Container related to ARP-Proxy
    """
    return self.__arp_proxy
      
  def _set_arp_proxy(self, v, load=False):
    """
    Setter method for arp_proxy, mapped from YANG variable /network_instances/network_instance/fdb/arp_proxy (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_arp_proxy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_arp_proxy() directly.

    YANG Description: Top Container related to ARP-Proxy
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_arp_proxy_openconfig_network_instance_l2__network_instances_network_instance_fdb_arp_proxy, is_container='container', yang_name="arp-proxy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """arp_proxy must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_arp_proxy_openconfig_network_instance_l2__network_instances_network_instance_fdb_arp_proxy, is_container='container', yang_name="arp-proxy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__arp_proxy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_arp_proxy(self):
    self.__arp_proxy = YANGDynClass(base=yc_arp_proxy_openconfig_network_instance_l2__network_instances_network_instance_fdb_arp_proxy, is_container='container', yang_name="arp-proxy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_nd_proxy(self):
    """
    Getter method for nd_proxy, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy (container)

    YANG Description: Top Container related to ND-Proxy.
    """
    return self.__nd_proxy
      
  def _set_nd_proxy(self, v, load=False):
    """
    Setter method for nd_proxy, mapped from YANG variable /network_instances/network_instance/fdb/nd_proxy (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_nd_proxy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_nd_proxy() directly.

    YANG Description: Top Container related to ND-Proxy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_nd_proxy_openconfig_network_instance_l2__network_instances_network_instance_fdb_nd_proxy, is_container='container', yang_name="nd-proxy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """nd_proxy must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_nd_proxy_openconfig_network_instance_l2__network_instances_network_instance_fdb_nd_proxy, is_container='container', yang_name="nd-proxy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__nd_proxy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_nd_proxy(self):
    self.__nd_proxy = YANGDynClass(base=yc_nd_proxy_openconfig_network_instance_l2__network_instances_network_instance_fdb_nd_proxy, is_container='container', yang_name="nd-proxy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_l2rib(self):
    """
    Getter method for l2rib, mapped from YANG variable /network_instances/network_instance/fdb/l2rib (container)

    YANG Description: Operational state container for MAC address and MAC-IP address
information that is learned and installed into the MAC VRF Layer 2
Routing Information Base (L2RIB)
    """
    return self.__l2rib
      
  def _set_l2rib(self, v, load=False):
    """
    Setter method for l2rib, mapped from YANG variable /network_instances/network_instance/fdb/l2rib (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_l2rib is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_l2rib() directly.

    YANG Description: Operational state container for MAC address and MAC-IP address
information that is learned and installed into the MAC VRF Layer 2
Routing Information Base (L2RIB)
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_l2rib_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib, is_container='container', yang_name="l2rib", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """l2rib must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_l2rib_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib, is_container='container', yang_name="l2rib", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__l2rib = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_l2rib(self):
    self.__l2rib = YANGDynClass(base=yc_l2rib_openconfig_network_instance_l2__network_instances_network_instance_fdb_l2rib, is_container='container', yang_name="l2rib", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  mac_table = __builtin__.property(_get_mac_table, _set_mac_table)
  mac_mobility = __builtin__.property(_get_mac_mobility, _set_mac_mobility)
  arp_proxy = __builtin__.property(_get_arp_proxy, _set_arp_proxy)
  nd_proxy = __builtin__.property(_get_nd_proxy, _set_nd_proxy)
  l2rib = __builtin__.property(_get_l2rib, _set_l2rib)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('mac_table', mac_table), ('mac_mobility', mac_mobility), ('arp_proxy', arp_proxy), ('nd_proxy', nd_proxy), ('l2rib', l2rib), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/evpn/evpn-instances/evpn-instance/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: EVPN Configuration parameters for
the participation in an EVPN Intance.
  """
  __slots__ = ('_path_helper', '_extmethods', '__evi','__encapsulation_type','__service_type','__multicast_group','__multicast_mask','__replication_mode','__route_distinguisher',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__evi = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__encapsulation_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="encapsulation-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__service_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'VLAN_BASED': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_BASED': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'VLAN_BUNDLE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_BUNDLE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'VLAN_AWARE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_AWARE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}},), is_leaf=True, yang_name="service-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__multicast_group = 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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    self.__multicast_mask = 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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    self.__replication_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STATIC_INGRESS_REPLICATION': {}, 'BGP': {}, 'MULTICAST': {}},), is_leaf=True, yang_name="replication-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)
    self.__route_distinguisher = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'evpn', 'evpn-instances', 'evpn-instance', 'config']

  def _get_evi(self):
    """
    Getter method for evi, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/config/evi (string)

    YANG Description: EVPN Instance (EVI) identifier
    """
    return self.__evi
      
  def _set_evi(self, v, load=False):
    """
    Setter method for evi, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/config/evi (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_evi is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_evi() directly.

    YANG Description: EVPN Instance (EVI) identifier
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """evi must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)""",
        })

    self.__evi = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_evi(self):
    self.__evi = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_encapsulation_type(self):
    """
    Getter method for encapsulation_type, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/config/encapsulation_type (identityref)

    YANG Description: The on-the-wire encapsulation that should be used when
exchanging traffic from this network instance to/from
destinations belonging to the EVI. The use of MPLS or
VXLAN is selected using this container.
    """
    return self.__encapsulation_type
      
  def _set_encapsulation_type(self, v, load=False):
    """
    Setter method for encapsulation_type, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/config/encapsulation_type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_encapsulation_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_encapsulation_type() directly.

    YANG Description: The on-the-wire encapsulation that should be used when
exchanging traffic from this network instance to/from
destinations belonging to the EVI. The use of MPLS or
VXLAN is selected using this container.
    """
    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={'MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="encapsulation-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """encapsulation_type must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="encapsulation-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__encapsulation_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_encapsulation_type(self):
    self.__encapsulation_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="encapsulation-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_service_type(self):
    """
    Getter method for service_type, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/config/service_type (identityref)

    YANG Description: Specifies the type of EVPN that is being created according
to the values in the EVPN_TYPES identity.
The options are VLAN-based, VLAN-Bundle or VLAN-aware.
VLAN-Based services consists of an EVPN instance of only a
single broadcast domain, the proper network-instance type used
for this kind of services is L2VSI.
    """
    return self.__service_type
      
  def _set_service_type(self, v, load=False):
    """
    Setter method for service_type, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/config/service_type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_service_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_service_type() directly.

    YANG Description: Specifies the type of EVPN that is being created according
to the values in the EVPN_TYPES identity.
The options are VLAN-based, VLAN-Bundle or VLAN-aware.
VLAN-Based services consists of an EVPN instance of only a
single broadcast domain, the proper network-instance type used
for this kind of services is L2VSI.
    """
    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={'VLAN_BASED': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_BASED': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'VLAN_BUNDLE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_BUNDLE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'VLAN_AWARE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_AWARE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}},), is_leaf=True, yang_name="service-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """service_type must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'VLAN_BASED': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_BASED': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'VLAN_BUNDLE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_BUNDLE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'VLAN_AWARE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_AWARE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}},), is_leaf=True, yang_name="service-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__service_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_service_type(self):
    self.__service_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'VLAN_BASED': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_BASED': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'VLAN_BUNDLE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_BUNDLE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'VLAN_AWARE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_AWARE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}},), is_leaf=True, yang_name="service-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_multicast_group(self):
    """
    Getter method for multicast_group, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/config/multicast_group (oc-inet:ip-address)

    YANG Description: Multicast group address for BUM traffic
    """
    return self.__multicast_group
      
  def _set_multicast_group(self, v, load=False):
    """
    Setter method for multicast_group, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/config/multicast_group (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_group() directly.

    YANG Description: Multicast group address for BUM traffic
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_group must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)""",
        })

    self.__multicast_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multicast_group(self):
    self.__multicast_group = 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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)


  def _get_multicast_mask(self):
    """
    Getter method for multicast_mask, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/config/multicast_mask (oc-inet:ip-address)

    YANG Description: Multicast group address mask
    """
    return self.__multicast_mask
      
  def _set_multicast_mask(self, v, load=False):
    """
    Setter method for multicast_mask, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/config/multicast_mask (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_mask is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_mask() directly.

    YANG Description: Multicast group 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-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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_mask must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)""",
        })

    self.__multicast_mask = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multicast_mask(self):
    self.__multicast_mask = 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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)


  def _get_replication_mode(self):
    """
    Getter method for replication_mode, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/config/replication_mode (enumeration)

    YANG Description: Replication mode to handle BUM traffic
    """
    return self.__replication_mode
      
  def _set_replication_mode(self, v, load=False):
    """
    Setter method for replication_mode, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/config/replication_mode (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_replication_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_replication_mode() directly.

    YANG Description: Replication mode to handle BUM traffic
    """
    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_INGRESS_REPLICATION': {}, 'BGP': {}, 'MULTICAST': {}},), is_leaf=True, yang_name="replication-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """replication_mode must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STATIC_INGRESS_REPLICATION': {}, 'BGP': {}, 'MULTICAST': {}},), is_leaf=True, yang_name="replication-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)""",
        })

    self.__replication_mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_replication_mode(self):
    self.__replication_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STATIC_INGRESS_REPLICATION': {}, 'BGP': {}, 'MULTICAST': {}},), is_leaf=True, yang_name="replication-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)


  def _get_route_distinguisher(self):
    """
    Getter method for route_distinguisher, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/config/route_distinguisher (union)

    YANG Description: Route Distinguisher (RD) associated to the EVPN-instance.
An RD MUST be assigned for a given EVPN-instance on a PE.
This RD MUST be unique across all EVPN-instances on a PE.
The route-distinguisher at this level overrides
the route-distinguisher value defined under
network-instance/config.
    """
    return self.__route_distinguisher
      
  def _set_route_distinguisher(self, v, load=False):
    """
    Setter method for route_distinguisher, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/config/route_distinguisher (union)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route_distinguisher is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route_distinguisher() directly.

    YANG Description: Route Distinguisher (RD) associated to the EVPN-instance.
An RD MUST be assigned for a given EVPN-instance on a PE.
This RD MUST be unique across all EVPN-instances on a PE.
The route-distinguisher at this level overrides
the route-distinguisher value defined under
network-instance/config.
    """
    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,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route_distinguisher must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)""",
        })

    self.__route_distinguisher = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route_distinguisher(self):
    self.__route_distinguisher = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)

  evi = __builtin__.property(_get_evi, _set_evi)
  encapsulation_type = __builtin__.property(_get_encapsulation_type, _set_encapsulation_type)
  service_type = __builtin__.property(_get_service_type, _set_service_type)
  multicast_group = __builtin__.property(_get_multicast_group, _set_multicast_group)
  multicast_mask = __builtin__.property(_get_multicast_mask, _set_multicast_mask)
  replication_mode = __builtin__.property(_get_replication_mode, _set_replication_mode)
  route_distinguisher = __builtin__.property(_get_route_distinguisher, _set_route_distinguisher)


  _pyangbind_elements = OrderedDict([('evi', evi), ('encapsulation_type', encapsulation_type), ('service_type', service_type), ('multicast_group', multicast_group), ('multicast_mask', multicast_mask), ('replication_mode', replication_mode), ('route_distinguisher', route_distinguisher), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/evpn/evpn-instances/evpn-instance/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: EVPN State parameters for
the participation in an EVPN Intance.
  """
  __slots__ = ('_path_helper', '_extmethods', '__evi','__encapsulation_type','__service_type','__multicast_group','__multicast_mask','__replication_mode','__route_distinguisher',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__evi = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__encapsulation_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="encapsulation-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__service_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'VLAN_BASED': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_BASED': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'VLAN_BUNDLE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_BUNDLE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'VLAN_AWARE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_AWARE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}},), is_leaf=True, yang_name="service-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__multicast_group = 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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__multicast_mask = 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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__replication_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STATIC_INGRESS_REPLICATION': {}, 'BGP': {}, 'MULTICAST': {}},), is_leaf=True, yang_name="replication-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__route_distinguisher = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', 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 ['network-instances', 'network-instance', 'evpn', 'evpn-instances', 'evpn-instance', 'state']

  def _get_evi(self):
    """
    Getter method for evi, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/state/evi (string)

    YANG Description: EVPN Instance (EVI) identifier
    """
    return self.__evi
      
  def _set_evi(self, v, load=False):
    """
    Setter method for evi, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/state/evi (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_evi is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_evi() directly.

    YANG Description: EVPN Instance (EVI) identifier
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """evi must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__evi = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_evi(self):
    self.__evi = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_encapsulation_type(self):
    """
    Getter method for encapsulation_type, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/state/encapsulation_type (identityref)

    YANG Description: The on-the-wire encapsulation that should be used when
exchanging traffic from this network instance to/from
destinations belonging to the EVI. The use of MPLS or
VXLAN is selected using this container.
    """
    return self.__encapsulation_type
      
  def _set_encapsulation_type(self, v, load=False):
    """
    Setter method for encapsulation_type, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/state/encapsulation_type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_encapsulation_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_encapsulation_type() directly.

    YANG Description: The on-the-wire encapsulation that should be used when
exchanging traffic from this network instance to/from
destinations belonging to the EVI. The use of MPLS or
VXLAN is selected using this container.
    """
    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={'MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="encapsulation-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """encapsulation_type must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="encapsulation-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__encapsulation_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_encapsulation_type(self):
    self.__encapsulation_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="encapsulation-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_service_type(self):
    """
    Getter method for service_type, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/state/service_type (identityref)

    YANG Description: Specifies the type of EVPN that is being created according
to the values in the EVPN_TYPES identity.
The options are VLAN-based, VLAN-Bundle or VLAN-aware.
VLAN-Based services consists of an EVPN instance of only a
single broadcast domain, the proper network-instance type used
for this kind of services is L2VSI.
    """
    return self.__service_type
      
  def _set_service_type(self, v, load=False):
    """
    Setter method for service_type, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/state/service_type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_service_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_service_type() directly.

    YANG Description: Specifies the type of EVPN that is being created according
to the values in the EVPN_TYPES identity.
The options are VLAN-based, VLAN-Bundle or VLAN-aware.
VLAN-Based services consists of an EVPN instance of only a
single broadcast domain, the proper network-instance type used
for this kind of services is L2VSI.
    """
    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={'VLAN_BASED': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_BASED': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'VLAN_BUNDLE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_BUNDLE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'VLAN_AWARE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_AWARE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}},), is_leaf=True, yang_name="service-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """service_type must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'VLAN_BASED': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_BASED': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'VLAN_BUNDLE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_BUNDLE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'VLAN_AWARE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_AWARE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}},), is_leaf=True, yang_name="service-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__service_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_service_type(self):
    self.__service_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'VLAN_BASED': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_BASED': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'VLAN_BUNDLE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_BUNDLE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'VLAN_AWARE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:VLAN_AWARE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}},), is_leaf=True, yang_name="service-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_multicast_group(self):
    """
    Getter method for multicast_group, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/state/multicast_group (oc-inet:ip-address)

    YANG Description: Multicast group address for BUM traffic
    """
    return self.__multicast_group
      
  def _set_multicast_group(self, v, load=False):
    """
    Setter method for multicast_group, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/state/multicast_group (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_group() directly.

    YANG Description: Multicast group address for BUM traffic
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_group must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__multicast_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multicast_group(self):
    self.__multicast_group = 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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_multicast_mask(self):
    """
    Getter method for multicast_mask, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/state/multicast_mask (oc-inet:ip-address)

    YANG Description: Multicast group address mask
    """
    return self.__multicast_mask
      
  def _set_multicast_mask(self, v, load=False):
    """
    Setter method for multicast_mask, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/state/multicast_mask (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_mask is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_mask() directly.

    YANG Description: Multicast group 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-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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_mask must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__multicast_mask = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multicast_mask(self):
    self.__multicast_mask = 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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_replication_mode(self):
    """
    Getter method for replication_mode, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/state/replication_mode (enumeration)

    YANG Description: Replication mode to handle BUM traffic
    """
    return self.__replication_mode
      
  def _set_replication_mode(self, v, load=False):
    """
    Setter method for replication_mode, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/state/replication_mode (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_replication_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_replication_mode() directly.

    YANG Description: Replication mode to handle BUM traffic
    """
    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_INGRESS_REPLICATION': {}, 'BGP': {}, 'MULTICAST': {}},), is_leaf=True, yang_name="replication-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """replication_mode must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STATIC_INGRESS_REPLICATION': {}, 'BGP': {}, 'MULTICAST': {}},), is_leaf=True, yang_name="replication-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__replication_mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_replication_mode(self):
    self.__replication_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STATIC_INGRESS_REPLICATION': {}, 'BGP': {}, 'MULTICAST': {}},), is_leaf=True, yang_name="replication-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_route_distinguisher(self):
    """
    Getter method for route_distinguisher, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/state/route_distinguisher (union)

    YANG Description: Route Distinguisher (RD) associated to the EVPN-instance.
An RD MUST be assigned for a given EVPN-instance on a PE.
This RD MUST be unique across all EVPN-instances on a PE.
The route-distinguisher at this level overrides
the route-distinguisher value defined under
network-instance/config.
    """
    return self.__route_distinguisher
      
  def _set_route_distinguisher(self, v, load=False):
    """
    Setter method for route_distinguisher, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/state/route_distinguisher (union)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route_distinguisher is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route_distinguisher() directly.

    YANG Description: Route Distinguisher (RD) associated to the EVPN-instance.
An RD MUST be assigned for a given EVPN-instance on a PE.
This RD MUST be unique across all EVPN-instances on a PE.
The route-distinguisher at this level overrides
the route-distinguisher value defined under
network-instance/config.
    """
    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,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route_distinguisher must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)""",
        })

    self.__route_distinguisher = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route_distinguisher(self):
    self.__route_distinguisher = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,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-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])'}),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]|[1-9][0-9]{1,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=six.text_type, restriction_dict={'pattern': '([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,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=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)

  evi = __builtin__.property(_get_evi)
  encapsulation_type = __builtin__.property(_get_encapsulation_type)
  service_type = __builtin__.property(_get_service_type)
  multicast_group = __builtin__.property(_get_multicast_group)
  multicast_mask = __builtin__.property(_get_multicast_mask)
  replication_mode = __builtin__.property(_get_replication_mode)
  route_distinguisher = __builtin__.property(_get_route_distinguisher)


  _pyangbind_elements = OrderedDict([('evi', evi), ('encapsulation_type', encapsulation_type), ('service_type', service_type), ('multicast_group', multicast_group), ('multicast_mask', multicast_mask), ('replication_mode', replication_mode), ('route_distinguisher', route_distinguisher), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_import_export_policy_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/evpn/evpn-instances/evpn-instance/import-export-policy/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters to set the import and export policies
associated with a EVI
  """
  __slots__ = ('_path_helper', '_extmethods', '__export_route_target','__import_route_target',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__export_route_target = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="export-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)
    self.__import_route_target = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="import-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'evpn', 'evpn-instances', 'evpn-instance', 'import-export-policy', 'config']

  def _get_export_route_target(self):
    """
    Getter method for export_route_target, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/import_export_policy/config/export_route_target (union)

    YANG Description: Export Route Target (RT) in the network-instance on a PE.
    """
    return self.__export_route_target
      
  def _set_export_route_target(self, v, load=False):
    """
    Setter method for export_route_target, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/import_export_policy/config/export_route_target (union)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_export_route_target is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_export_route_target() directly.

    YANG Description: Export Route Target (RT) in the network-instance on a PE.
    """
    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_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="export-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """export_route_target must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="export-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)""",
        })

    self.__export_route_target = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_export_route_target(self):
    self.__export_route_target = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="export-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)


  def _get_import_route_target(self):
    """
    Getter method for import_route_target, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/import_export_policy/config/import_route_target (union)

    YANG Description: Import Route Target (RT) in the network-instance on a PE.
    """
    return self.__import_route_target
      
  def _set_import_route_target(self, v, load=False):
    """
    Setter method for import_route_target, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/import_export_policy/config/import_route_target (union)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_import_route_target is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_import_route_target() directly.

    YANG Description: Import Route Target (RT) in the network-instance on a PE.
    """
    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_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="import-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """import_route_target must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="import-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)""",
        })

    self.__import_route_target = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_import_route_target(self):
    self.__import_route_target = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="import-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)

  export_route_target = __builtin__.property(_get_export_route_target, _set_export_route_target)
  import_route_target = __builtin__.property(_get_import_route_target, _set_import_route_target)


  _pyangbind_elements = OrderedDict([('export_route_target', export_route_target), ('import_route_target', import_route_target), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_import_export_policy_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/evpn/evpn-instances/evpn-instance/import-export-policy/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of the import and export policies
associated with a EVI
  """
  __slots__ = ('_path_helper', '_extmethods', '__export_route_target','__import_route_target',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__export_route_target = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="export-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    self.__import_route_target = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="import-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', 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 ['network-instances', 'network-instance', 'evpn', 'evpn-instances', 'evpn-instance', 'import-export-policy', 'state']

  def _get_export_route_target(self):
    """
    Getter method for export_route_target, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/import_export_policy/state/export_route_target (union)

    YANG Description: Export Route Target (RT) in the network-instance on a PE.
    """
    return self.__export_route_target
      
  def _set_export_route_target(self, v, load=False):
    """
    Setter method for export_route_target, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/import_export_policy/state/export_route_target (union)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_export_route_target is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_export_route_target() directly.

    YANG Description: Export Route Target (RT) in the network-instance on a PE.
    """
    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_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="export-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """export_route_target must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="export-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)""",
        })

    self.__export_route_target = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_export_route_target(self):
    self.__export_route_target = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="export-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)


  def _get_import_route_target(self):
    """
    Getter method for import_route_target, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/import_export_policy/state/import_route_target (union)

    YANG Description: Import Route Target (RT) in the network-instance on a PE.
    """
    return self.__import_route_target
      
  def _set_import_route_target(self, v, load=False):
    """
    Setter method for import_route_target, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/import_export_policy/state/import_route_target (union)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_import_route_target is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_import_route_target() directly.

    YANG Description: Import Route Target (RT) in the network-instance on a PE.
    """
    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_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="import-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """import_route_target must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="import-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)""",
        })

    self.__import_route_target = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_import_route_target(self):
    self.__import_route_target = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="import-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)

  export_route_target = __builtin__.property(_get_export_route_target)
  import_route_target = __builtin__.property(_get_import_route_target)


  _pyangbind_elements = OrderedDict([('export_route_target', export_route_target), ('import_route_target', import_route_target), ])


class yc_import_export_policy_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_import_export_policy(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/evpn/evpn-instances/evpn-instance/import-export-policy. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top container to set the import and export policies
associated with a EVI
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'import-export-policy'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_import_export_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_import_export_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn', 'evpn-instances', 'evpn-instance', 'import-export-policy']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/import_export_policy/config (container)

    YANG Description: Configuration parameters to set the import and export policies
associated with a EVI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/import_export_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 to set the import and export policies
associated with a EVI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_import_export_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_import_export_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_import_export_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/import_export_policy/state (container)

    YANG Description: State parameters of the import and export policies
associated with a EVI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/import_export_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: State parameters of the import and export policies
associated with a EVI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_import_export_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_import_export_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_import_export_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/evpn/evpn-instances/evpn-instance/vxlan/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data related to Overlay Solution in EVPN.
  """
  __slots__ = ('_path_helper', '_extmethods', '__vni','__overlay_endpoint_network_instance','__overlay_endpoint','__host_reachability_bgp','__multicast_group','__multicast_mask',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__vni = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:vni-id', is_config=True)
    self.__overlay_endpoint_network_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="overlay-endpoint-network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__overlay_endpoint = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="overlay-endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__host_reachability_bgp = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="host-reachability-bgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__multicast_group = 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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    self.__multicast_mask = 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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'evpn', 'evpn-instances', 'evpn-instance', 'vxlan', 'config']

  def _get_vni(self):
    """
    Getter method for vni, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/config/vni (oc-evpn-types:vni-id)

    YANG Description: Virtual Network Identifier (VNI) associated to the EVI. This VNI is used for
ingress and egress in the VXLAN domain.
    """
    return self.__vni
      
  def _set_vni(self, v, load=False):
    """
    Setter method for vni, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/config/vni (oc-evpn-types:vni-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_vni is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_vni() directly.

    YANG Description: Virtual Network Identifier (VNI) associated to the EVI. This VNI is used for
ingress and egress in the VXLAN domain.
    """
    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': ['1..16777215']}), is_leaf=True, yang_name="vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:vni-id', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """vni must be of a type compatible with oc-evpn-types:vni-id""",
          'defined-type': "oc-evpn-types:vni-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:vni-id', is_config=True)""",
        })

    self.__vni = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_vni(self):
    self.__vni = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:vni-id', is_config=True)


  def _get_overlay_endpoint_network_instance(self):
    """
    Getter method for overlay_endpoint_network_instance, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/config/overlay_endpoint_network_instance (leafref)

    YANG Description: The network instance to resolve the overlay-endpoint within.
    """
    return self.__overlay_endpoint_network_instance
      
  def _set_overlay_endpoint_network_instance(self, v, load=False):
    """
    Setter method for overlay_endpoint_network_instance, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/config/overlay_endpoint_network_instance (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_overlay_endpoint_network_instance is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_overlay_endpoint_network_instance() directly.

    YANG Description: The network instance to resolve the overlay-endpoint within.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="overlay-endpoint-network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """overlay_endpoint_network_instance must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="overlay-endpoint-network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__overlay_endpoint_network_instance = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_overlay_endpoint_network_instance(self):
    self.__overlay_endpoint_network_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="overlay-endpoint-network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_overlay_endpoint(self):
    """
    Getter method for overlay_endpoint, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/config/overlay_endpoint (leafref)

    YANG Description: Associate the EVI with an VXLAN Endpoint defined under connection
points. The network instance to resolve the overlay-endpoint within.
    """
    return self.__overlay_endpoint
      
  def _set_overlay_endpoint(self, v, load=False):
    """
    Setter method for overlay_endpoint, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/config/overlay_endpoint (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_overlay_endpoint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_overlay_endpoint() directly.

    YANG Description: Associate the EVI with an VXLAN Endpoint defined under connection
points. The network instance to resolve the overlay-endpoint within.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="overlay-endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """overlay_endpoint must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="overlay-endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__overlay_endpoint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_overlay_endpoint(self):
    self.__overlay_endpoint = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="overlay-endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_host_reachability_bgp(self):
    """
    Getter method for host_reachability_bgp, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/config/host_reachability_bgp (boolean)

    YANG Description: Enable or Disable the BGP control plane to be
used to exchange  updates from the NVE interface
    """
    return self.__host_reachability_bgp
      
  def _set_host_reachability_bgp(self, v, load=False):
    """
    Setter method for host_reachability_bgp, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/config/host_reachability_bgp (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_host_reachability_bgp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_host_reachability_bgp() directly.

    YANG Description: Enable or Disable the BGP control plane to be
used to exchange  updates from the NVE interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="host-reachability-bgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """host_reachability_bgp must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="host-reachability-bgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__host_reachability_bgp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_host_reachability_bgp(self):
    self.__host_reachability_bgp = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="host-reachability-bgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_multicast_group(self):
    """
    Getter method for multicast_group, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/config/multicast_group (oc-inet:ip-address)

    YANG Description: Multicast group address for BUM traffic
    """
    return self.__multicast_group
      
  def _set_multicast_group(self, v, load=False):
    """
    Setter method for multicast_group, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/config/multicast_group (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_group() directly.

    YANG Description: Multicast group address for BUM traffic
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_group must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)""",
        })

    self.__multicast_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multicast_group(self):
    self.__multicast_group = 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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)


  def _get_multicast_mask(self):
    """
    Getter method for multicast_mask, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/config/multicast_mask (oc-inet:ip-address)

    YANG Description: Multicast group address mask
    """
    return self.__multicast_mask
      
  def _set_multicast_mask(self, v, load=False):
    """
    Setter method for multicast_mask, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/config/multicast_mask (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_mask is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_mask() directly.

    YANG Description: Multicast group 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-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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_mask must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)""",
        })

    self.__multicast_mask = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multicast_mask(self):
    self.__multicast_mask = 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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)

  vni = __builtin__.property(_get_vni, _set_vni)
  overlay_endpoint_network_instance = __builtin__.property(_get_overlay_endpoint_network_instance, _set_overlay_endpoint_network_instance)
  overlay_endpoint = __builtin__.property(_get_overlay_endpoint, _set_overlay_endpoint)
  host_reachability_bgp = __builtin__.property(_get_host_reachability_bgp, _set_host_reachability_bgp)
  multicast_group = __builtin__.property(_get_multicast_group, _set_multicast_group)
  multicast_mask = __builtin__.property(_get_multicast_mask, _set_multicast_mask)


  _pyangbind_elements = OrderedDict([('vni', vni), ('overlay_endpoint_network_instance', overlay_endpoint_network_instance), ('overlay_endpoint', overlay_endpoint), ('host_reachability_bgp', host_reachability_bgp), ('multicast_group', multicast_group), ('multicast_mask', multicast_mask), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/evpn/evpn-instances/evpn-instance/vxlan/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State data related to Overlay Solution in EVPN.
  """
  __slots__ = ('_path_helper', '_extmethods', '__vni','__overlay_endpoint_network_instance','__overlay_endpoint','__host_reachability_bgp','__multicast_group','__multicast_mask',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__vni = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:vni-id', is_config=False)
    self.__overlay_endpoint_network_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="overlay-endpoint-network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__overlay_endpoint = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="overlay-endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__host_reachability_bgp = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="host-reachability-bgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__multicast_group = 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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__multicast_mask = 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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', 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 ['network-instances', 'network-instance', 'evpn', 'evpn-instances', 'evpn-instance', 'vxlan', 'state']

  def _get_vni(self):
    """
    Getter method for vni, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/state/vni (oc-evpn-types:vni-id)

    YANG Description: Virtual Network Identifier (VNI) associated to the EVI. This VNI is used for
ingress and egress in the VXLAN domain.
    """
    return self.__vni
      
  def _set_vni(self, v, load=False):
    """
    Setter method for vni, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/state/vni (oc-evpn-types:vni-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_vni is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_vni() directly.

    YANG Description: Virtual Network Identifier (VNI) associated to the EVI. This VNI is used for
ingress and egress in the VXLAN domain.
    """
    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': ['1..16777215']}), is_leaf=True, yang_name="vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:vni-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """vni must be of a type compatible with oc-evpn-types:vni-id""",
          'defined-type': "oc-evpn-types:vni-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:vni-id', is_config=False)""",
        })

    self.__vni = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_vni(self):
    self.__vni = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:vni-id', is_config=False)


  def _get_overlay_endpoint_network_instance(self):
    """
    Getter method for overlay_endpoint_network_instance, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/state/overlay_endpoint_network_instance (leafref)

    YANG Description: The network instance to resolve the overlay-endpoint within.
    """
    return self.__overlay_endpoint_network_instance
      
  def _set_overlay_endpoint_network_instance(self, v, load=False):
    """
    Setter method for overlay_endpoint_network_instance, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/state/overlay_endpoint_network_instance (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_overlay_endpoint_network_instance is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_overlay_endpoint_network_instance() directly.

    YANG Description: The network instance to resolve the overlay-endpoint within.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="overlay-endpoint-network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """overlay_endpoint_network_instance must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="overlay-endpoint-network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__overlay_endpoint_network_instance = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_overlay_endpoint_network_instance(self):
    self.__overlay_endpoint_network_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="overlay-endpoint-network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_overlay_endpoint(self):
    """
    Getter method for overlay_endpoint, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/state/overlay_endpoint (leafref)

    YANG Description: Associate the EVI with an VXLAN Endpoint defined under connection
points. The network instance to resolve the overlay-endpoint within.
    """
    return self.__overlay_endpoint
      
  def _set_overlay_endpoint(self, v, load=False):
    """
    Setter method for overlay_endpoint, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/state/overlay_endpoint (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_overlay_endpoint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_overlay_endpoint() directly.

    YANG Description: Associate the EVI with an VXLAN Endpoint defined under connection
points. The network instance to resolve the overlay-endpoint within.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="overlay-endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """overlay_endpoint must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="overlay-endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__overlay_endpoint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_overlay_endpoint(self):
    self.__overlay_endpoint = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="overlay-endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_host_reachability_bgp(self):
    """
    Getter method for host_reachability_bgp, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/state/host_reachability_bgp (boolean)

    YANG Description: Enable or Disable the BGP control plane to be
used to exchange  updates from the NVE interface
    """
    return self.__host_reachability_bgp
      
  def _set_host_reachability_bgp(self, v, load=False):
    """
    Setter method for host_reachability_bgp, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/state/host_reachability_bgp (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_host_reachability_bgp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_host_reachability_bgp() directly.

    YANG Description: Enable or Disable the BGP control plane to be
used to exchange  updates from the NVE interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="host-reachability-bgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """host_reachability_bgp must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="host-reachability-bgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__host_reachability_bgp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_host_reachability_bgp(self):
    self.__host_reachability_bgp = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="host-reachability-bgp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_multicast_group(self):
    """
    Getter method for multicast_group, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/state/multicast_group (oc-inet:ip-address)

    YANG Description: Multicast group address for BUM traffic
    """
    return self.__multicast_group
      
  def _set_multicast_group(self, v, load=False):
    """
    Setter method for multicast_group, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/state/multicast_group (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_group() directly.

    YANG Description: Multicast group address for BUM traffic
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_group must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__multicast_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multicast_group(self):
    self.__multicast_group = 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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_multicast_mask(self):
    """
    Getter method for multicast_mask, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/state/multicast_mask (oc-inet:ip-address)

    YANG Description: Multicast group address mask
    """
    return self.__multicast_mask
      
  def _set_multicast_mask(self, v, load=False):
    """
    Setter method for multicast_mask, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/state/multicast_mask (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multicast_mask is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multicast_mask() directly.

    YANG Description: Multicast group 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-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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multicast_mask must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__multicast_mask = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multicast_mask(self):
    self.__multicast_mask = 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}'}),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}|:))'}),], is_leaf=True, yang_name="multicast-mask", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)

  vni = __builtin__.property(_get_vni)
  overlay_endpoint_network_instance = __builtin__.property(_get_overlay_endpoint_network_instance)
  overlay_endpoint = __builtin__.property(_get_overlay_endpoint)
  host_reachability_bgp = __builtin__.property(_get_host_reachability_bgp)
  multicast_group = __builtin__.property(_get_multicast_group)
  multicast_mask = __builtin__.property(_get_multicast_mask)


  _pyangbind_elements = OrderedDict([('vni', vni), ('overlay_endpoint_network_instance', overlay_endpoint_network_instance), ('overlay_endpoint', overlay_endpoint), ('host_reachability_bgp', host_reachability_bgp), ('multicast_group', multicast_group), ('multicast_mask', multicast_mask), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_anycast_source_interface_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/evpn/evpn-instances/evpn-instance/vxlan/anycast-source-interface/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Anycast source interface configuration references
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface','__subinterface',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn', 'evpn-instances', 'evpn-instance', 'vxlan', 'anycast-source-interface', 'config']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/anycast_source_interface/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 /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/anycast_source_interface/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/anycast_source_interface/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 /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/anycast_source_interface/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_anycast_source_interface_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/evpn/evpn-instances/evpn-instance/vxlan/anycast-source-interface/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Anycast source interface state references
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface','__subinterface',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn', 'evpn-instances', 'evpn-instance', 'vxlan', 'anycast-source-interface', 'state']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/anycast_source_interface/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 /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/anycast_source_interface/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/anycast_source_interface/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 /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/anycast_source_interface/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_anycast_source_interface_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_anycast_source_interface(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/evpn/evpn-instances/evpn-instance/vxlan/anycast-source-interface. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Anycast source interface references
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'anycast-source-interface'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_anycast_source_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_anycast_source_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn', 'evpn-instances', 'evpn-instance', 'vxlan', 'anycast-source-interface']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/anycast_source_interface/config (container)

    YANG Description: Anycast source interface configuration references
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/anycast_source_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: Anycast source interface configuration references
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_anycast_source_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_anycast_source_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_anycast_source_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/anycast_source_interface/state (container)

    YANG Description: Anycast source interface state references
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/anycast_source_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: Anycast source interface state references
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_anycast_source_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_anycast_source_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_anycast_source_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/network-instance', defining_module='openconfig-network-instance', 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_vxlan_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/evpn/evpn-instances/evpn-instance/vxlan. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top container related to Overlay Solution in EVPN.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__anycast_source_interface',)

  _yang_name = 'vxlan'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__anycast_source_interface = YANGDynClass(base=yc_anycast_source_interface_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_anycast_source_interface, is_container='container', yang_name="anycast-source-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn', 'evpn-instances', 'evpn-instance', 'vxlan']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/config (container)

    YANG Description: Configuration data related to Overlay Solution in EVPN.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/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 related to Overlay Solution in EVPN.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/state (container)

    YANG Description: State data related to Overlay Solution in EVPN.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/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 related to Overlay Solution in EVPN.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_anycast_source_interface(self):
    """
    Getter method for anycast_source_interface, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/anycast_source_interface (container)

    YANG Description: Anycast source interface references
    """
    return self.__anycast_source_interface
      
  def _set_anycast_source_interface(self, v, load=False):
    """
    Setter method for anycast_source_interface, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan/anycast_source_interface (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_anycast_source_interface is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_anycast_source_interface() directly.

    YANG Description: Anycast source interface references
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_anycast_source_interface_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_anycast_source_interface, is_container='container', yang_name="anycast-source-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """anycast_source_interface must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_anycast_source_interface_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_anycast_source_interface, is_container='container', yang_name="anycast-source-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__anycast_source_interface = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_anycast_source_interface(self):
    self.__anycast_source_interface = YANGDynClass(base=yc_anycast_source_interface_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan_anycast_source_interface, is_container='container', yang_name="anycast-source-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  anycast_source_interface = __builtin__.property(_get_anycast_source_interface, _set_anycast_source_interface)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('anycast_source_interface', anycast_source_interface), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/evpn/evpn-instances/evpn-instance/pbb/b-component/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration variables for the b-components.
  """
  __slots__ = ('_path_helper', '_extmethods', '__b_component_name','__backbone_src_mac',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__b_component_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="b-component-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__backbone_src_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="backbone-src-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'evpn', 'evpn-instances', 'evpn-instance', 'pbb', 'b-component', 'config']

  def _get_b_component_name(self):
    """
    Getter method for b_component_name, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/config/b_component_name (string)

    YANG Description: Type of the associated b-component
    """
    return self.__b_component_name
      
  def _set_b_component_name(self, v, load=False):
    """
    Setter method for b_component_name, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/config/b_component_name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_b_component_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_b_component_name() directly.

    YANG Description: Type of the associated b-component
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="b-component-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """b_component_name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="b-component-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)""",
        })

    self.__b_component_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_b_component_name(self):
    self.__b_component_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="b-component-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_backbone_src_mac(self):
    """
    Getter method for backbone_src_mac, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/config/backbone_src_mac (oc-yang:mac-address)

    YANG Description: EVPN will run independently in both components,
the I-component MAC-VRF and B-component MAC-VRF.
The backbone-src-mac assigns the b-component MAC.
    """
    return self.__backbone_src_mac
      
  def _set_backbone_src_mac(self, v, load=False):
    """
    Setter method for backbone_src_mac, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/config/backbone_src_mac (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_backbone_src_mac is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_backbone_src_mac() directly.

    YANG Description: EVPN will run independently in both components,
the I-component MAC-VRF and B-component MAC-VRF.
The backbone-src-mac assigns the b-component MAC.
    """
    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="backbone-src-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """backbone_src_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="backbone-src-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=True)""",
        })

    self.__backbone_src_mac = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_backbone_src_mac(self):
    self.__backbone_src_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="backbone-src-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=True)

  b_component_name = __builtin__.property(_get_b_component_name, _set_b_component_name)
  backbone_src_mac = __builtin__.property(_get_backbone_src_mac, _set_backbone_src_mac)


  _pyangbind_elements = OrderedDict([('b_component_name', b_component_name), ('backbone_src_mac', backbone_src_mac), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/evpn/evpn-instances/evpn-instance/pbb/b-component/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State variables for the b-components.
  """
  __slots__ = ('_path_helper', '_extmethods', '__b_component_name','__backbone_src_mac',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__b_component_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="b-component-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__backbone_src_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="backbone-src-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', 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 ['network-instances', 'network-instance', 'evpn', 'evpn-instances', 'evpn-instance', 'pbb', 'b-component', 'state']

  def _get_b_component_name(self):
    """
    Getter method for b_component_name, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/state/b_component_name (string)

    YANG Description: Type of the associated b-component
    """
    return self.__b_component_name
      
  def _set_b_component_name(self, v, load=False):
    """
    Setter method for b_component_name, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/state/b_component_name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_b_component_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_b_component_name() directly.

    YANG Description: Type of the associated b-component
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="b-component-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """b_component_name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="b-component-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__b_component_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_b_component_name(self):
    self.__b_component_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="b-component-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_backbone_src_mac(self):
    """
    Getter method for backbone_src_mac, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/state/backbone_src_mac (oc-yang:mac-address)

    YANG Description: EVPN will run independently in both components,
the I-component MAC-VRF and B-component MAC-VRF.
The backbone-src-mac assigns the b-component MAC.
    """
    return self.__backbone_src_mac
      
  def _set_backbone_src_mac(self, v, load=False):
    """
    Setter method for backbone_src_mac, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/state/backbone_src_mac (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_backbone_src_mac is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_backbone_src_mac() directly.

    YANG Description: EVPN will run independently in both components,
the I-component MAC-VRF and B-component MAC-VRF.
The backbone-src-mac assigns the b-component MAC.
    """
    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="backbone-src-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """backbone_src_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="backbone-src-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)""",
        })

    self.__backbone_src_mac = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_backbone_src_mac(self):
    self.__backbone_src_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="backbone-src-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)

  b_component_name = __builtin__.property(_get_b_component_name)
  backbone_src_mac = __builtin__.property(_get_backbone_src_mac)


  _pyangbind_elements = OrderedDict([('b_component_name', b_component_name), ('backbone_src_mac', backbone_src_mac), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_i_components_i_component_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/evpn/evpn-instances/evpn-instance/pbb/b-component/i-components/i-component/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration variables for the i-sid
  """
  __slots__ = ('_path_helper', '_extmethods', '__i_sid',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__i_sid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..16777215']}), is_leaf=True, yang_name="i-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn', 'evpn-instances', 'evpn-instance', 'pbb', 'b-component', 'i-components', 'i-component', 'config']

  def _get_i_sid(self):
    """
    Getter method for i_sid, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/i_components/i_component/config/i_sid (uint32)

    YANG Description: Service Instance Identifier 24 bits and global within a PBB
network. I-SID defines the service instance that the frame should be
mapped to.
    """
    return self.__i_sid
      
  def _set_i_sid(self, v, load=False):
    """
    Setter method for i_sid, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/i_components/i_component/config/i_sid (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_i_sid is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_i_sid() directly.

    YANG Description: Service Instance Identifier 24 bits and global within a PBB
network. I-SID defines the service instance that the frame should be
mapped to.
    """
    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..16777215']}), is_leaf=True, yang_name="i-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """i_sid must be of a type compatible with uint32""",
          'defined-type': "uint32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..16777215']}), is_leaf=True, yang_name="i-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__i_sid = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_i_sid(self):
    self.__i_sid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..16777215']}), is_leaf=True, yang_name="i-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)

  i_sid = __builtin__.property(_get_i_sid, _set_i_sid)


  _pyangbind_elements = OrderedDict([('i_sid', i_sid), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_i_components_i_component_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/evpn/evpn-instances/evpn-instance/pbb/b-component/i-components/i-component/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State variables for the i-sid
  """
  __slots__ = ('_path_helper', '_extmethods', '__i_sid',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__i_sid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..16777215']}), is_leaf=True, yang_name="i-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn', 'evpn-instances', 'evpn-instance', 'pbb', 'b-component', 'i-components', 'i-component', 'state']

  def _get_i_sid(self):
    """
    Getter method for i_sid, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/i_components/i_component/state/i_sid (uint32)

    YANG Description: Service Instance Identifier 24 bits and global within a PBB
network. I-SID defines the service instance that the frame should be
mapped to.
    """
    return self.__i_sid
      
  def _set_i_sid(self, v, load=False):
    """
    Setter method for i_sid, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/i_components/i_component/state/i_sid (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_i_sid is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_i_sid() directly.

    YANG Description: Service Instance Identifier 24 bits and global within a PBB
network. I-SID defines the service instance that the frame should be
mapped to.
    """
    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..16777215']}), is_leaf=True, yang_name="i-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """i_sid must be of a type compatible with uint32""",
          'defined-type': "uint32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..16777215']}), is_leaf=True, yang_name="i-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__i_sid = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_i_sid(self):
    self.__i_sid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['0..16777215']}), is_leaf=True, yang_name="i-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  i_sid = __builtin__.property(_get_i_sid)


  _pyangbind_elements = OrderedDict([('i_sid', i_sid), ])


class yc_i_component_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_i_components_i_component(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/evpn/evpn-instances/evpn-instance/pbb/b-component/i-components/i-component. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: list of i-components
  """
  __slots__ = ('_path_helper', '_extmethods', '__i_sid','__config','__state',)

  _yang_name = 'i-component'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__i_sid = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="i-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_i_components_i_component_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_i_components_i_component_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn', 'evpn-instances', 'evpn-instance', 'pbb', 'b-component', 'i-components', 'i-component']

  def _get_i_sid(self):
    """
    Getter method for i_sid, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/i_components/i_component/i_sid (leafref)

    YANG Description: I-SID represents a unique service identifier associated with
service instances
    """
    return self.__i_sid
      
  def _set_i_sid(self, v, load=False):
    """
    Setter method for i_sid, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/i_components/i_component/i_sid (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_i_sid is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_i_sid() directly.

    YANG Description: I-SID represents a unique service identifier associated with
service instances
    """
    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="i-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """i_sid must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="i-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__i_sid = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_i_sid(self):
    self.__i_sid = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="i-sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/i_components/i_component/config (container)

    YANG Description: Configuration variables for the i-sid
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/i_components/i_component/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 variables for the i-sid
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_i_components_i_component_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_i_components_i_component_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_i_components_i_component_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/i_components/i_component/state (container)

    YANG Description: State variables for the i-sid
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/i_components/i_component/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 variables for the i-sid
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_i_components_i_component_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_i_components_i_component_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_i_components_i_component_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  i_sid = __builtin__.property(_get_i_sid, _set_i_sid)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('i_sid', i_sid), ('config', config), ('state', state), ])


class yc_i_components_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_i_components(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/evpn/evpn-instances/evpn-instance/pbb/b-component/i-components. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: i-components container definition.
  """
  __slots__ = ('_path_helper', '_extmethods', '__i_component',)

  _yang_name = 'i-components'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__i_component = YANGDynClass(base=YANGListType("i_sid",yc_i_component_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_i_components_i_component, yang_name="i-component", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='i-sid', extensions=None), is_container='list', yang_name="i-component", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn', 'evpn-instances', 'evpn-instance', 'pbb', 'b-component', 'i-components']

  def _get_i_component(self):
    """
    Getter method for i_component, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/i_components/i_component (list)

    YANG Description: list of i-components
    """
    return self.__i_component
      
  def _set_i_component(self, v, load=False):
    """
    Setter method for i_component, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/i_components/i_component (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_i_component is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_i_component() directly.

    YANG Description: list of i-components
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("i_sid",yc_i_component_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_i_components_i_component, yang_name="i-component", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='i-sid', extensions=None), is_container='list', yang_name="i-component", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """i_component must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("i_sid",yc_i_component_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_i_components_i_component, yang_name="i-component", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='i-sid', extensions=None), is_container='list', yang_name="i-component", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__i_component = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_i_component(self):
    self.__i_component = YANGDynClass(base=YANGListType("i_sid",yc_i_component_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_i_components_i_component, yang_name="i-component", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='i-sid', extensions=None), is_container='list', yang_name="i-component", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  i_component = __builtin__.property(_get_i_component, _set_i_component)


  _pyangbind_elements = OrderedDict([('i_component', i_component), ])


class yc_b_component_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/evpn/evpn-instances/evpn-instance/pbb/b-component. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of B-components. The b-component learns and forwards
traffic on the backbone in order to reduce the number of
BGP MAC Advertisement routes by aggregating Customer/Client
MAC (C-MAC) addresses via Provider Backbone MAC (B-MAC) address.
  """
  __slots__ = ('_path_helper', '_extmethods', '__b_component_name','__config','__state','__i_components',)

  _yang_name = 'b-component'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__b_component_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="b-component-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__i_components = YANGDynClass(base=yc_i_components_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_i_components, is_container='container', yang_name="i-components", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn', 'evpn-instances', 'evpn-instance', 'pbb', 'b-component']

  def _get_b_component_name(self):
    """
    Getter method for b_component_name, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/b_component_name (leafref)

    YANG Description: Provider Backbone Bridging component name.
    """
    return self.__b_component_name
      
  def _set_b_component_name(self, v, load=False):
    """
    Setter method for b_component_name, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/b_component_name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_b_component_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_b_component_name() directly.

    YANG Description: Provider Backbone Bridging component 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="b-component-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """b_component_name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="b-component-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__b_component_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_b_component_name(self):
    self.__b_component_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="b-component-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/config (container)

    YANG Description: Configuration variables for the b-components.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/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 variables for the b-components.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/state (container)

    YANG Description: State variables for the b-components.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/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 variables for the b-components.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_i_components(self):
    """
    Getter method for i_components, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/i_components (container)

    YANG Description: i-components container definition.
    """
    return self.__i_components
      
  def _set_i_components(self, v, load=False):
    """
    Setter method for i_components, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component/i_components (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_i_components is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_i_components() directly.

    YANG Description: i-components container definition.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_i_components_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_i_components, is_container='container', yang_name="i-components", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """i_components must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_i_components_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_i_components, is_container='container', yang_name="i-components", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__i_components = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_i_components(self):
    self.__i_components = YANGDynClass(base=yc_i_components_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component_i_components, is_container='container', yang_name="i-components", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  b_component_name = __builtin__.property(_get_b_component_name, _set_b_component_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  i_components = __builtin__.property(_get_i_components, _set_i_components)


  _pyangbind_elements = OrderedDict([('b_component_name', b_component_name), ('config', config), ('state', state), ('i_components', i_components), ])


class yc_pbb_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/evpn/evpn-instances/evpn-instance/pbb. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Container for EVPN with PBB PE functionality
for scaling over MPLS,
  """
  __slots__ = ('_path_helper', '_extmethods', '__b_component',)

  _yang_name = 'pbb'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__b_component = YANGDynClass(base=YANGListType("b_component_name",yc_b_component_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component, yang_name="b-component", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='b-component-name', extensions=None), is_container='list', yang_name="b-component", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn', 'evpn-instances', 'evpn-instance', 'pbb']

  def _get_b_component(self):
    """
    Getter method for b_component, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component (list)

    YANG Description: List of B-components. The b-component learns and forwards
traffic on the backbone in order to reduce the number of
BGP MAC Advertisement routes by aggregating Customer/Client
MAC (C-MAC) addresses via Provider Backbone MAC (B-MAC) address.
    """
    return self.__b_component
      
  def _set_b_component(self, v, load=False):
    """
    Setter method for b_component, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb/b_component (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_b_component is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_b_component() directly.

    YANG Description: List of B-components. The b-component learns and forwards
traffic on the backbone in order to reduce the number of
BGP MAC Advertisement routes by aggregating Customer/Client
MAC (C-MAC) addresses via Provider Backbone MAC (B-MAC) address.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("b_component_name",yc_b_component_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component, yang_name="b-component", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='b-component-name', extensions=None), is_container='list', yang_name="b-component", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """b_component must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("b_component_name",yc_b_component_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component, yang_name="b-component", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='b-component-name', extensions=None), is_container='list', yang_name="b-component", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__b_component = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_b_component(self):
    self.__b_component = YANGDynClass(base=YANGListType("b_component_name",yc_b_component_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb_b_component, yang_name="b-component", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='b-component-name', extensions=None), is_container='list', yang_name="b-component", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  b_component = __builtin__.property(_get_b_component, _set_b_component)


  _pyangbind_elements = OrderedDict([('b_component', b_component), ])


class yc_evpn_instance_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/evpn/evpn-instances/evpn-instance. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: An EVPN instance (EVI) comprises Customer Edge devices
(CEs) that are connected to Provider Edge devices (PEs). One
network instance (representing a single MAC VRF) can
participate in one or more EVPN Instances. For each EVPN instance
in which the forwarding instance participates an
EVPN instance needs to be created.

The model supports BGP MPLS-Based Ethernet VPNs
(RFC 7432) and  Network Virtualization Overlay Solution
Using Ethernet VPN (RFC 8365). The use of MPLS or VXLAN
is selected via the encapsulation container within
EVPN instance. One use case requiring participating in
two EVIs is the Interconnect Solution for EVPN Overlay
networks (see draft-ietf-bess-dci-evpn-overlay-10)
  """
  __slots__ = ('_path_helper', '_extmethods', '__evi','__config','__state','__import_export_policy','__vxlan','__pbb',)

  _yang_name = 'evpn-instance'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__evi = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__import_export_policy = YANGDynClass(base=yc_import_export_policy_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_import_export_policy, is_container='container', yang_name="import-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__vxlan = YANGDynClass(base=yc_vxlan_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan, is_container='container', yang_name="vxlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__pbb = YANGDynClass(base=yc_pbb_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb, is_container='container', yang_name="pbb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn', 'evpn-instances', 'evpn-instance']

  def _get_evi(self):
    """
    Getter method for evi, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/evi (leafref)

    YANG Description: EVPN Intance (EVI) identifier
    """
    return self.__evi
      
  def _set_evi(self, v, load=False):
    """
    Setter method for evi, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/evi (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_evi is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_evi() directly.

    YANG Description: EVPN Intance (EVI) identifier
    """
    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="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """evi must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__evi = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_evi(self):
    self.__evi = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="evi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/config (container)

    YANG Description: EVPN Configuration parameters for
the participation in an EVPN Intance.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/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: EVPN Configuration parameters for
the participation in an EVPN Intance.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/state (container)

    YANG Description: EVPN State parameters for
the participation in an EVPN Intance.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/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: EVPN State parameters for
the participation in an EVPN Intance.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_import_export_policy(self):
    """
    Getter method for import_export_policy, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/import_export_policy (container)

    YANG Description: Top container to set the import and export policies
associated with a EVI
    """
    return self.__import_export_policy
      
  def _set_import_export_policy(self, v, load=False):
    """
    Setter method for import_export_policy, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/import_export_policy (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_import_export_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_import_export_policy() directly.

    YANG Description: Top container to set the import and export policies
associated with a EVI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_import_export_policy_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_import_export_policy, is_container='container', yang_name="import-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """import_export_policy must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_import_export_policy_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_import_export_policy, is_container='container', yang_name="import-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__import_export_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_import_export_policy(self):
    self.__import_export_policy = YANGDynClass(base=yc_import_export_policy_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_import_export_policy, is_container='container', yang_name="import-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_vxlan(self):
    """
    Getter method for vxlan, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan (container)

    YANG Description: Top container related to Overlay Solution in EVPN.
    """
    return self.__vxlan
      
  def _set_vxlan(self, v, load=False):
    """
    Setter method for vxlan, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/vxlan (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_vxlan is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_vxlan() directly.

    YANG Description: Top container related to Overlay Solution in EVPN.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_vxlan_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan, is_container='container', yang_name="vxlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """vxlan must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_vxlan_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan, is_container='container', yang_name="vxlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__vxlan = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_vxlan(self):
    self.__vxlan = YANGDynClass(base=yc_vxlan_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_vxlan, is_container='container', yang_name="vxlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_pbb(self):
    """
    Getter method for pbb, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb (container)

    YANG Description: Container for EVPN with PBB PE functionality
for scaling over MPLS,
    """
    return self.__pbb
      
  def _set_pbb(self, v, load=False):
    """
    Setter method for pbb, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance/pbb (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pbb is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pbb() directly.

    YANG Description: Container for EVPN with PBB PE functionality
for scaling over MPLS,
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_pbb_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb, is_container='container', yang_name="pbb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pbb must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_pbb_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb, is_container='container', yang_name="pbb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__pbb = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_pbb(self):
    self.__pbb = YANGDynClass(base=yc_pbb_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance_pbb, is_container='container', yang_name="pbb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  evi = __builtin__.property(_get_evi, _set_evi)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  import_export_policy = __builtin__.property(_get_import_export_policy, _set_import_export_policy)
  vxlan = __builtin__.property(_get_vxlan, _set_vxlan)
  pbb = __builtin__.property(_get_pbb, _set_pbb)


  _pyangbind_elements = OrderedDict([('evi', evi), ('config', config), ('state', state), ('import_export_policy', import_export_policy), ('vxlan', vxlan), ('pbb', pbb), ])


class yc_evpn_instances_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/evpn/evpn-instances. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration attributes of the EVPN Instance
  """
  __slots__ = ('_path_helper', '_extmethods', '__evpn_instance',)

  _yang_name = 'evpn-instances'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__evpn_instance = YANGDynClass(base=YANGListType("evi",yc_evpn_instance_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance, yang_name="evpn-instance", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='evi', extensions=None), is_container='list', yang_name="evpn-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn', 'evpn-instances']

  def _get_evpn_instance(self):
    """
    Getter method for evpn_instance, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance (list)

    YANG Description: An EVPN instance (EVI) comprises Customer Edge devices
(CEs) that are connected to Provider Edge devices (PEs). One
network instance (representing a single MAC VRF) can
participate in one or more EVPN Instances. For each EVPN instance
in which the forwarding instance participates an
EVPN instance needs to be created.

The model supports BGP MPLS-Based Ethernet VPNs
(RFC 7432) and  Network Virtualization Overlay Solution
Using Ethernet VPN (RFC 8365). The use of MPLS or VXLAN
is selected via the encapsulation container within
EVPN instance. One use case requiring participating in
two EVIs is the Interconnect Solution for EVPN Overlay
networks (see draft-ietf-bess-dci-evpn-overlay-10)
    """
    return self.__evpn_instance
      
  def _set_evpn_instance(self, v, load=False):
    """
    Setter method for evpn_instance, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances/evpn_instance (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_evpn_instance is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_evpn_instance() directly.

    YANG Description: An EVPN instance (EVI) comprises Customer Edge devices
(CEs) that are connected to Provider Edge devices (PEs). One
network instance (representing a single MAC VRF) can
participate in one or more EVPN Instances. For each EVPN instance
in which the forwarding instance participates an
EVPN instance needs to be created.

The model supports BGP MPLS-Based Ethernet VPNs
(RFC 7432) and  Network Virtualization Overlay Solution
Using Ethernet VPN (RFC 8365). The use of MPLS or VXLAN
is selected via the encapsulation container within
EVPN instance. One use case requiring participating in
two EVIs is the Interconnect Solution for EVPN Overlay
networks (see draft-ietf-bess-dci-evpn-overlay-10)
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("evi",yc_evpn_instance_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance, yang_name="evpn-instance", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='evi', extensions=None), is_container='list', yang_name="evpn-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """evpn_instance must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("evi",yc_evpn_instance_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance, yang_name="evpn-instance", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='evi', extensions=None), is_container='list', yang_name="evpn-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__evpn_instance = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_evpn_instance(self):
    self.__evpn_instance = YANGDynClass(base=YANGListType("evi",yc_evpn_instance_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances_evpn_instance, yang_name="evpn-instance", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='evi', extensions=None), is_container='list', yang_name="evpn-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  evpn_instance = __builtin__.property(_get_evpn_instance, _set_evpn_instance)


  _pyangbind_elements = OrderedDict([('evpn_instance', evpn_instance), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/evpn/ethernet-segments/ethernet-segment/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for the Ethernet Segments.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__esi_type','__esi','__redundancy_mode','__interface','__subinterface',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__esi_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TYPE_0_OPERATOR_CONFIGURED': {'value': 0}, 'TYPE_1_LACP_BASED': {'value': 1}, 'TYPE_2_BRIDGE_PROTOCOL_BASED': {'value': 2}, 'TYPE_3_MAC_BASED': {'value': 3}, 'TYPE_4_ROUTER_ID_BASED': {'value': 4}, 'TYPE_5_AS_BASED': {'value': 5}},), default=six.text_type("TYPE_0_OPERATOR_CONFIGURED"), is_leaf=True, yang_name="esi-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi-type', is_config=True)
    self.__esi = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),], is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)
    self.__redundancy_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'SINGLE_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:SINGLE_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'ALL_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:ALL_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}},), is_leaf=True, yang_name="redundancy-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn', 'ethernet-segments', 'ethernet-segment', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/config/name (string)

    YANG Description: Ethernet Segment name
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/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: Ethernet Segment name
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_esi_type(self):
    """
    Getter method for esi_type, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/config/esi_type (oc-evpn-types:esi-type)

    YANG Description: ESI Type is a 1-octet field (most significant octet) that
specifies the format of the remaining 9 octets (ESI Value).
    """
    return self.__esi_type
      
  def _set_esi_type(self, v, load=False):
    """
    Setter method for esi_type, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/config/esi_type (oc-evpn-types:esi-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_esi_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_esi_type() directly.

    YANG Description: ESI Type is a 1-octet field (most significant octet) that
specifies the format of the remaining 9 octets (ESI Value).
    """
    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={'TYPE_0_OPERATOR_CONFIGURED': {'value': 0}, 'TYPE_1_LACP_BASED': {'value': 1}, 'TYPE_2_BRIDGE_PROTOCOL_BASED': {'value': 2}, 'TYPE_3_MAC_BASED': {'value': 3}, 'TYPE_4_ROUTER_ID_BASED': {'value': 4}, 'TYPE_5_AS_BASED': {'value': 5}},), default=six.text_type("TYPE_0_OPERATOR_CONFIGURED"), is_leaf=True, yang_name="esi-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """esi_type must be of a type compatible with oc-evpn-types:esi-type""",
          'defined-type': "oc-evpn-types:esi-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TYPE_0_OPERATOR_CONFIGURED': {'value': 0}, 'TYPE_1_LACP_BASED': {'value': 1}, 'TYPE_2_BRIDGE_PROTOCOL_BASED': {'value': 2}, 'TYPE_3_MAC_BASED': {'value': 3}, 'TYPE_4_ROUTER_ID_BASED': {'value': 4}, 'TYPE_5_AS_BASED': {'value': 5}},), default=six.text_type("TYPE_0_OPERATOR_CONFIGURED"), is_leaf=True, yang_name="esi-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi-type', is_config=True)""",
        })

    self.__esi_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_esi_type(self):
    self.__esi_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TYPE_0_OPERATOR_CONFIGURED': {'value': 0}, 'TYPE_1_LACP_BASED': {'value': 1}, 'TYPE_2_BRIDGE_PROTOCOL_BASED': {'value': 2}, 'TYPE_3_MAC_BASED': {'value': 3}, 'TYPE_4_ROUTER_ID_BASED': {'value': 4}, 'TYPE_5_AS_BASED': {'value': 5}},), default=six.text_type("TYPE_0_OPERATOR_CONFIGURED"), is_leaf=True, yang_name="esi-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi-type', is_config=True)


  def _get_esi(self):
    """
    Getter method for esi, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/config/esi (union)

    YANG Description: Ethernet Segment Identifier (ESI) value.
For ESI Type 0: The esi leaf value is directly configured by the operator.
For ESI Type 1: The AUTO enum must be used.
For ESI Type 2: The AUTO enum must be used.
For ESI Type 3: The directly configured or AUTO enum must be used.
For ESI Type 4: The directly configured or AUTO enum must be used.
For ESI Type 5: The directly configured or AUTO enum must be used.
    """
    return self.__esi
      
  def _set_esi(self, v, load=False):
    """
    Setter method for esi, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/config/esi (union)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_esi is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_esi() directly.

    YANG Description: Ethernet Segment Identifier (ESI) value.
For ESI Type 0: The esi leaf value is directly configured by the operator.
For ESI Type 1: The AUTO enum must be used.
For ESI Type 2: The AUTO enum must be used.
For ESI Type 3: The directly configured or AUTO enum must be used.
For ESI Type 4: The directly configured or AUTO enum must be used.
For ESI Type 5: The directly configured or AUTO enum must be used.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),], is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """esi must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),], is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)""",
        })

    self.__esi = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_esi(self):
    self.__esi = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),], is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)


  def _get_redundancy_mode(self):
    """
    Getter method for redundancy_mode, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/config/redundancy_mode (identityref)

    YANG Description: Multihoming options for load balancing of
traffic in the Ethernet Segment.
    """
    return self.__redundancy_mode
      
  def _set_redundancy_mode(self, v, load=False):
    """
    Setter method for redundancy_mode, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/config/redundancy_mode (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_redundancy_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_redundancy_mode() directly.

    YANG Description: Multihoming options for load balancing of
traffic in the Ethernet Segment.
    """
    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={'SINGLE_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:SINGLE_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'ALL_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:ALL_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}},), is_leaf=True, yang_name="redundancy-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """redundancy_mode must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'SINGLE_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:SINGLE_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'ALL_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:ALL_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}},), is_leaf=True, yang_name="redundancy-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__redundancy_mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_redundancy_mode(self):
    self.__redundancy_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'SINGLE_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:SINGLE_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'ALL_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:ALL_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}},), is_leaf=True, yang_name="redundancy-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/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 /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/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 /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  esi_type = __builtin__.property(_get_esi_type, _set_esi_type)
  esi = __builtin__.property(_get_esi, _set_esi)
  redundancy_mode = __builtin__.property(_get_redundancy_mode, _set_redundancy_mode)
  interface = __builtin__.property(_get_interface, _set_interface)
  subinterface = __builtin__.property(_get_subinterface, _set_subinterface)


  _pyangbind_elements = OrderedDict([('name', name), ('esi_type', esi_type), ('esi', esi), ('redundancy_mode', redundancy_mode), ('interface', interface), ('subinterface', subinterface), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/evpn/ethernet-segments/ethernet-segment/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 Ethernet Segments.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__esi_type','__esi','__redundancy_mode','__interface','__subinterface',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__esi_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TYPE_0_OPERATOR_CONFIGURED': {'value': 0}, 'TYPE_1_LACP_BASED': {'value': 1}, 'TYPE_2_BRIDGE_PROTOCOL_BASED': {'value': 2}, 'TYPE_3_MAC_BASED': {'value': 3}, 'TYPE_4_ROUTER_ID_BASED': {'value': 4}, 'TYPE_5_AS_BASED': {'value': 5}},), default=six.text_type("TYPE_0_OPERATOR_CONFIGURED"), is_leaf=True, yang_name="esi-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi-type', is_config=False)
    self.__esi = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),], is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    self.__redundancy_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'SINGLE_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:SINGLE_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'ALL_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:ALL_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}},), is_leaf=True, yang_name="redundancy-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn', 'ethernet-segments', 'ethernet-segment', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/state/name (string)

    YANG Description: Ethernet Segment name
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/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: Ethernet Segment name
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_esi_type(self):
    """
    Getter method for esi_type, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/state/esi_type (oc-evpn-types:esi-type)

    YANG Description: ESI Type is a 1-octet field (most significant octet) that
specifies the format of the remaining 9 octets (ESI Value).
    """
    return self.__esi_type
      
  def _set_esi_type(self, v, load=False):
    """
    Setter method for esi_type, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/state/esi_type (oc-evpn-types:esi-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_esi_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_esi_type() directly.

    YANG Description: ESI Type is a 1-octet field (most significant octet) that
specifies the format of the remaining 9 octets (ESI Value).
    """
    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={'TYPE_0_OPERATOR_CONFIGURED': {'value': 0}, 'TYPE_1_LACP_BASED': {'value': 1}, 'TYPE_2_BRIDGE_PROTOCOL_BASED': {'value': 2}, 'TYPE_3_MAC_BASED': {'value': 3}, 'TYPE_4_ROUTER_ID_BASED': {'value': 4}, 'TYPE_5_AS_BASED': {'value': 5}},), default=six.text_type("TYPE_0_OPERATOR_CONFIGURED"), is_leaf=True, yang_name="esi-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """esi_type must be of a type compatible with oc-evpn-types:esi-type""",
          'defined-type': "oc-evpn-types:esi-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TYPE_0_OPERATOR_CONFIGURED': {'value': 0}, 'TYPE_1_LACP_BASED': {'value': 1}, 'TYPE_2_BRIDGE_PROTOCOL_BASED': {'value': 2}, 'TYPE_3_MAC_BASED': {'value': 3}, 'TYPE_4_ROUTER_ID_BASED': {'value': 4}, 'TYPE_5_AS_BASED': {'value': 5}},), default=six.text_type("TYPE_0_OPERATOR_CONFIGURED"), is_leaf=True, yang_name="esi-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi-type', is_config=False)""",
        })

    self.__esi_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_esi_type(self):
    self.__esi_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'TYPE_0_OPERATOR_CONFIGURED': {'value': 0}, 'TYPE_1_LACP_BASED': {'value': 1}, 'TYPE_2_BRIDGE_PROTOCOL_BASED': {'value': 2}, 'TYPE_3_MAC_BASED': {'value': 3}, 'TYPE_4_ROUTER_ID_BASED': {'value': 4}, 'TYPE_5_AS_BASED': {'value': 5}},), default=six.text_type("TYPE_0_OPERATOR_CONFIGURED"), is_leaf=True, yang_name="esi-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:esi-type', is_config=False)


  def _get_esi(self):
    """
    Getter method for esi, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/state/esi (union)

    YANG Description: Ethernet Segment Identifier (ESI) value.
For ESI Type 0: The esi leaf value is directly configured by the operator.
For ESI Type 1: The AUTO enum must be used.
For ESI Type 2: The AUTO enum must be used.
For ESI Type 3: The directly configured or AUTO enum must be used.
For ESI Type 4: The directly configured or AUTO enum must be used.
For ESI Type 5: The directly configured or AUTO enum must be used.
    """
    return self.__esi
      
  def _set_esi(self, v, load=False):
    """
    Setter method for esi, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/state/esi (union)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_esi is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_esi() directly.

    YANG Description: Ethernet Segment Identifier (ESI) value.
For ESI Type 0: The esi leaf value is directly configured by the operator.
For ESI Type 1: The AUTO enum must be used.
For ESI Type 2: The AUTO enum must be used.
For ESI Type 3: The directly configured or AUTO enum must be used.
For ESI Type 4: The directly configured or AUTO enum must be used.
For ESI Type 5: The directly configured or AUTO enum must be used.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),], is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """esi must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),], is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)""",
        })

    self.__esi = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_esi(self):
    self.__esi = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]*'}), restriction_dict={'length': ['20']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),], is_leaf=True, yang_name="esi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)


  def _get_redundancy_mode(self):
    """
    Getter method for redundancy_mode, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/state/redundancy_mode (identityref)

    YANG Description: Multihoming options for load balancing of
traffic in the Ethernet Segment.
    """
    return self.__redundancy_mode
      
  def _set_redundancy_mode(self, v, load=False):
    """
    Setter method for redundancy_mode, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/state/redundancy_mode (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_redundancy_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_redundancy_mode() directly.

    YANG Description: Multihoming options for load balancing of
traffic in the Ethernet Segment.
    """
    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={'SINGLE_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:SINGLE_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'ALL_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:ALL_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}},), is_leaf=True, yang_name="redundancy-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """redundancy_mode must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'SINGLE_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:SINGLE_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'ALL_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:ALL_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}},), is_leaf=True, yang_name="redundancy-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__redundancy_mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_redundancy_mode(self):
    self.__redundancy_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'SINGLE_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:SINGLE_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'ALL_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}, 'oc-evpn-types:ALL_ACTIVE': {'@module': 'openconfig-evpn-types', '@namespace': 'http://openconfig.net/yang/evpn-types'}},), is_leaf=True, yang_name="redundancy-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/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 /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/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 /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)

  name = __builtin__.property(_get_name)
  esi_type = __builtin__.property(_get_esi_type)
  esi = __builtin__.property(_get_esi)
  redundancy_mode = __builtin__.property(_get_redundancy_mode)
  interface = __builtin__.property(_get_interface)
  subinterface = __builtin__.property(_get_subinterface)


  _pyangbind_elements = OrderedDict([('name', name), ('esi_type', esi_type), ('esi', esi), ('redundancy_mode', redundancy_mode), ('interface', interface), ('subinterface', subinterface), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_df_election_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/evpn/ethernet-segments/ethernet-segment/df-election/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for the Designated forwarding Election
  """
  __slots__ = ('_path_helper', '_extmethods', '__df_election_method','__preference','__revertive','__election_wait_time',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__df_election_method = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DEFAULT': {'value': 0}, 'HIGHEST_RANDOM_WEIGHT': {'value': 1}, 'PREFERENCE': {'value': 2}},), is_leaf=True, yang_name="df-election-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__revertive = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="revertive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__election_wait_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="election-wait-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn', 'ethernet-segments', 'ethernet-segment', 'df-election', 'config']

  def _get_df_election_method(self):
    """
    Getter method for df_election_method, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election/config/df_election_method (enumeration)

    YANG Description: Select the Designated Forwarder Election (DF) election method
    """
    return self.__df_election_method
      
  def _set_df_election_method(self, v, load=False):
    """
    Setter method for df_election_method, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election/config/df_election_method (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_df_election_method is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_df_election_method() directly.

    YANG Description: Select the Designated Forwarder Election (DF) election method
    """
    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={'DEFAULT': {'value': 0}, 'HIGHEST_RANDOM_WEIGHT': {'value': 1}, 'PREFERENCE': {'value': 2}},), is_leaf=True, yang_name="df-election-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """df_election_method must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DEFAULT': {'value': 0}, 'HIGHEST_RANDOM_WEIGHT': {'value': 1}, 'PREFERENCE': {'value': 2}},), is_leaf=True, yang_name="df-election-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)""",
        })

    self.__df_election_method = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_df_election_method(self):
    self.__df_election_method = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DEFAULT': {'value': 0}, 'HIGHEST_RANDOM_WEIGHT': {'value': 1}, 'PREFERENCE': {'value': 2}},), is_leaf=True, yang_name="df-election-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)


  def _get_preference(self):
    """
    Getter method for preference, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election/config/preference (uint16)

    YANG Description: Defines a 2-octet value that indicates the PE
preference to become the DF in the Ethernet-Segment.
    """
    return self.__preference
      
  def _set_preference(self, v, load=False):
    """
    Setter method for preference, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election/config/preference (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_preference is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_preference() directly.

    YANG Description: Defines a 2-octet value that indicates the PE
preference to become the DF in the Ethernet-Segment.
    """
    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="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """preference 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="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__preference = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_preference(self):
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_revertive(self):
    """
    Getter method for revertive, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election/config/revertive (boolean)

    YANG Description: The 'preempt' or 'revertive' behavior. This option will allow a
non-revertive behavior in the DF election.
    """
    return self.__revertive
      
  def _set_revertive(self, v, load=False):
    """
    Setter method for revertive, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election/config/revertive (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_revertive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_revertive() directly.

    YANG Description: The 'preempt' or 'revertive' behavior. This option will allow a
non-revertive behavior in the DF election.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="revertive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """revertive must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="revertive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__revertive = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_revertive(self):
    self.__revertive = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="revertive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_election_wait_time(self):
    """
    Getter method for election_wait_time, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election/config/election_wait_time (uint32)

    YANG Description: Designated Forwarder Election wait-time. When the DF timer expires,
the PE device selects the DF based on the highest preference value
    """
    return self.__election_wait_time
      
  def _set_election_wait_time(self, v, load=False):
    """
    Setter method for election_wait_time, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election/config/election_wait_time (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_election_wait_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_election_wait_time() directly.

    YANG Description: Designated Forwarder Election wait-time. When the DF timer expires,
the PE device selects the DF based on the highest preference value
    """
    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="election-wait-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """election_wait_time 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="election-wait-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__election_wait_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_election_wait_time(self):
    self.__election_wait_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="election-wait-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)

  df_election_method = __builtin__.property(_get_df_election_method, _set_df_election_method)
  preference = __builtin__.property(_get_preference, _set_preference)
  revertive = __builtin__.property(_get_revertive, _set_revertive)
  election_wait_time = __builtin__.property(_get_election_wait_time, _set_election_wait_time)


  _pyangbind_elements = OrderedDict([('df_election_method', df_election_method), ('preference', preference), ('revertive', revertive), ('election_wait_time', election_wait_time), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_df_election_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/evpn/ethernet-segments/ethernet-segment/df-election/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for the Designated forwarding Election
  """
  __slots__ = ('_path_helper', '_extmethods', '__df_election_method','__preference','__revertive','__election_wait_time',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__df_election_method = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DEFAULT': {'value': 0}, 'HIGHEST_RANDOM_WEIGHT': {'value': 1}, 'PREFERENCE': {'value': 2}},), is_leaf=True, yang_name="df-election-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__revertive = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="revertive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__election_wait_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="election-wait-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn', 'ethernet-segments', 'ethernet-segment', 'df-election', 'state']

  def _get_df_election_method(self):
    """
    Getter method for df_election_method, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election/state/df_election_method (enumeration)

    YANG Description: Select the Designated Forwarder Election (DF) election method
    """
    return self.__df_election_method
      
  def _set_df_election_method(self, v, load=False):
    """
    Setter method for df_election_method, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election/state/df_election_method (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_df_election_method is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_df_election_method() directly.

    YANG Description: Select the Designated Forwarder Election (DF) election method
    """
    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={'DEFAULT': {'value': 0}, 'HIGHEST_RANDOM_WEIGHT': {'value': 1}, 'PREFERENCE': {'value': 2}},), is_leaf=True, yang_name="df-election-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """df_election_method must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DEFAULT': {'value': 0}, 'HIGHEST_RANDOM_WEIGHT': {'value': 1}, 'PREFERENCE': {'value': 2}},), is_leaf=True, yang_name="df-election-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__df_election_method = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_df_election_method(self):
    self.__df_election_method = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DEFAULT': {'value': 0}, 'HIGHEST_RANDOM_WEIGHT': {'value': 1}, 'PREFERENCE': {'value': 2}},), is_leaf=True, yang_name="df-election-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_preference(self):
    """
    Getter method for preference, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election/state/preference (uint16)

    YANG Description: Defines a 2-octet value that indicates the PE
preference to become the DF in the Ethernet-Segment.
    """
    return self.__preference
      
  def _set_preference(self, v, load=False):
    """
    Setter method for preference, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election/state/preference (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_preference is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_preference() directly.

    YANG Description: Defines a 2-octet value that indicates the PE
preference to become the DF in the Ethernet-Segment.
    """
    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="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """preference 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="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__preference = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_preference(self):
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_revertive(self):
    """
    Getter method for revertive, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election/state/revertive (boolean)

    YANG Description: The 'preempt' or 'revertive' behavior. This option will allow a
non-revertive behavior in the DF election.
    """
    return self.__revertive
      
  def _set_revertive(self, v, load=False):
    """
    Setter method for revertive, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election/state/revertive (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_revertive is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_revertive() directly.

    YANG Description: The 'preempt' or 'revertive' behavior. This option will allow a
non-revertive behavior in the DF election.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="revertive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """revertive must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="revertive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__revertive = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_revertive(self):
    self.__revertive = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="revertive", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_election_wait_time(self):
    """
    Getter method for election_wait_time, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election/state/election_wait_time (uint32)

    YANG Description: Designated Forwarder Election wait-time. When the DF timer expires,
the PE device selects the DF based on the highest preference value
    """
    return self.__election_wait_time
      
  def _set_election_wait_time(self, v, load=False):
    """
    Setter method for election_wait_time, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election/state/election_wait_time (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_election_wait_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_election_wait_time() directly.

    YANG Description: Designated Forwarder Election wait-time. When the DF timer expires,
the PE device selects the DF based on the highest preference value
    """
    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="election-wait-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """election_wait_time 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="election-wait-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__election_wait_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_election_wait_time(self):
    self.__election_wait_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="election-wait-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  df_election_method = __builtin__.property(_get_df_election_method)
  preference = __builtin__.property(_get_preference)
  revertive = __builtin__.property(_get_revertive)
  election_wait_time = __builtin__.property(_get_election_wait_time)


  _pyangbind_elements = OrderedDict([('df_election_method', df_election_method), ('preference', preference), ('revertive', revertive), ('election_wait_time', election_wait_time), ])


class yc_df_election_openconfig_network_instance_l2__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_df_election(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/evpn/ethernet-segments/ethernet-segment/df-election. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top container for the configuration and state parameters
for the Designated forwarding Election
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'df-election'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_df_election_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_df_election_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn', 'ethernet-segments', 'ethernet-segment', 'df-election']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election/config (container)

    YANG Description: Configuration parameters for the Designated forwarding Election
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election/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 Designated forwarding Election
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_df_election_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_df_election_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_df_election_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election/state (container)

    YANG Description: Configuration parameters for the Designated forwarding Election
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election/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: Configuration parameters for the Designated forwarding Election
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_df_election_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_df_election_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_df_election_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_ethernet_segment_openconfig_network_instance_l2__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/evpn/ethernet-segments/ethernet-segment. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of Ethernet Segments.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state','__df_election',)

  _yang_name = 'ethernet-segment'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__df_election = YANGDynClass(base=yc_df_election_openconfig_network_instance_l2__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_df_election, is_container='container', yang_name="df-election", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn', 'ethernet-segments', 'ethernet-segment']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/name (leafref)

    YANG Description: Ethernet Segment Name 
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/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: Ethernet Segment 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/config (container)

    YANG Description: Configuration data for the Ethernet Segments.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/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 Ethernet Segments.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/state (container)

    YANG Description: Operational state data for the Ethernet Segments.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/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 Ethernet Segments.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_df_election(self):
    """
    Getter method for df_election, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election (container)

    YANG Description: Top container for the configuration and state parameters
for the Designated forwarding Election
    """
    return self.__df_election
      
  def _set_df_election(self, v, load=False):
    """
    Setter method for df_election, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment/df_election (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_df_election is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_df_election() directly.

    YANG Description: Top container for the configuration and state parameters
for the Designated forwarding Election
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_df_election_openconfig_network_instance_l2__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_df_election, is_container='container', yang_name="df-election", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """df_election must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_df_election_openconfig_network_instance_l2__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_df_election, is_container='container', yang_name="df-election", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__df_election = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_df_election(self):
    self.__df_election = YANGDynClass(base=yc_df_election_openconfig_network_instance_l2__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment_df_election, is_container='container', yang_name="df-election", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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)
  df_election = __builtin__.property(_get_df_election, _set_df_election)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ('df_election', df_election), ])


class yc_ethernet_segments_openconfig_network_instance_l2__network_instances_network_instance_evpn_ethernet_segments(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/evpn/ethernet-segments. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for ethernet segments. An Ethernet Segment
is referenced by a name and an ESI
  """
  __slots__ = ('_path_helper', '_extmethods', '__ethernet_segment',)

  _yang_name = 'ethernet-segments'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__ethernet_segment = YANGDynClass(base=YANGListType("name",yc_ethernet_segment_openconfig_network_instance_l2__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment, yang_name="ethernet-segment", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="ethernet-segment", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn', 'ethernet-segments']

  def _get_ethernet_segment(self):
    """
    Getter method for ethernet_segment, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment (list)

    YANG Description: List of Ethernet Segments.
    """
    return self.__ethernet_segment
      
  def _set_ethernet_segment(self, v, load=False):
    """
    Setter method for ethernet_segment, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments/ethernet_segment (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ethernet_segment is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ethernet_segment() directly.

    YANG Description: List of Ethernet Segments.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_ethernet_segment_openconfig_network_instance_l2__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment, yang_name="ethernet-segment", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="ethernet-segment", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ethernet_segment must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_ethernet_segment_openconfig_network_instance_l2__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment, yang_name="ethernet-segment", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="ethernet-segment", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__ethernet_segment = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ethernet_segment(self):
    self.__ethernet_segment = YANGDynClass(base=YANGListType("name",yc_ethernet_segment_openconfig_network_instance_l2__network_instances_network_instance_evpn_ethernet_segments_ethernet_segment, yang_name="ethernet-segment", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="ethernet-segment", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  ethernet_segment = __builtin__.property(_get_ethernet_segment, _set_ethernet_segment)


  _pyangbind_elements = OrderedDict([('ethernet_segment', ethernet_segment), ])


class yc_evpn_openconfig_network_instance_l2__network_instances_network_instance_evpn(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/evpn. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration of parameters for EVPN related bridge domains
(MAC VRFs) and layer3 VRFs (IP VRFs)
  """
  __slots__ = ('_path_helper', '_extmethods', '__evpn_instances','__ethernet_segments',)

  _yang_name = 'evpn'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__evpn_instances = YANGDynClass(base=yc_evpn_instances_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances, is_container='container', yang_name="evpn-instances", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__ethernet_segments = YANGDynClass(base=yc_ethernet_segments_openconfig_network_instance_l2__network_instances_network_instance_evpn_ethernet_segments, is_container='container', yang_name="ethernet-segments", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'evpn']

  def _get_evpn_instances(self):
    """
    Getter method for evpn_instances, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances (container)

    YANG Description: Configuration attributes of the EVPN Instance
    """
    return self.__evpn_instances
      
  def _set_evpn_instances(self, v, load=False):
    """
    Setter method for evpn_instances, mapped from YANG variable /network_instances/network_instance/evpn/evpn_instances (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_evpn_instances is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_evpn_instances() directly.

    YANG Description: Configuration attributes of the EVPN Instance
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_evpn_instances_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances, is_container='container', yang_name="evpn-instances", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """evpn_instances must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_evpn_instances_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances, is_container='container', yang_name="evpn-instances", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__evpn_instances = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_evpn_instances(self):
    self.__evpn_instances = YANGDynClass(base=yc_evpn_instances_openconfig_network_instance_l2__network_instances_network_instance_evpn_evpn_instances, is_container='container', yang_name="evpn-instances", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_ethernet_segments(self):
    """
    Getter method for ethernet_segments, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments (container)

    YANG Description: Top-level container for ethernet segments. An Ethernet Segment
is referenced by a name and an ESI
    """
    return self.__ethernet_segments
      
  def _set_ethernet_segments(self, v, load=False):
    """
    Setter method for ethernet_segments, mapped from YANG variable /network_instances/network_instance/evpn/ethernet_segments (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ethernet_segments is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ethernet_segments() directly.

    YANG Description: Top-level container for ethernet segments. An Ethernet Segment
is referenced by a name and an ESI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ethernet_segments_openconfig_network_instance_l2__network_instances_network_instance_evpn_ethernet_segments, is_container='container', yang_name="ethernet-segments", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ethernet_segments must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ethernet_segments_openconfig_network_instance_l2__network_instances_network_instance_evpn_ethernet_segments, is_container='container', yang_name="ethernet-segments", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__ethernet_segments = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ethernet_segments(self):
    self.__ethernet_segments = YANGDynClass(base=yc_ethernet_segments_openconfig_network_instance_l2__network_instances_network_instance_evpn_ethernet_segments, is_container='container', yang_name="ethernet-segments", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  evpn_instances = __builtin__.property(_get_evpn_instances, _set_evpn_instances)
  ethernet_segments = __builtin__.property(_get_ethernet_segments, _set_ethernet_segments)


  _pyangbind_elements = OrderedDict([('evpn_instances', evpn_instances), ('ethernet_segments', ethernet_segments), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_encapsulation_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/encapsulation/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 encapsulation
of the network instance
  """
  __slots__ = ('_path_helper', '_extmethods', '__encapsulation_type','__label_allocation_mode','__control_word',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__encapsulation_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="encapsulation-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__label_allocation_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PER_PREFIX': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:PER_PREFIX': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'PER_NEXTHOP': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:PER_NEXTHOP': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'INSTANCE_LABEL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:INSTANCE_LABEL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="label-allocation-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__control_word = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="control-word", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'encapsulation', 'config']

  def _get_encapsulation_type(self):
    """
    Getter method for encapsulation_type, mapped from YANG variable /network_instances/network_instance/encapsulation/config/encapsulation_type (identityref)

    YANG Description: The on-the-wire encapsulation that should be used when
sending traffic from this network instance
    """
    return self.__encapsulation_type
      
  def _set_encapsulation_type(self, v, load=False):
    """
    Setter method for encapsulation_type, mapped from YANG variable /network_instances/network_instance/encapsulation/config/encapsulation_type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_encapsulation_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_encapsulation_type() directly.

    YANG Description: The on-the-wire encapsulation that should be used when
sending traffic from this network instance
    """
    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={'MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="encapsulation-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """encapsulation_type must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="encapsulation-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__encapsulation_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_encapsulation_type(self):
    self.__encapsulation_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="encapsulation-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_label_allocation_mode(self):
    """
    Getter method for label_allocation_mode, mapped from YANG variable /network_instances/network_instance/encapsulation/config/label_allocation_mode (identityref)

    YANG Description: The label allocation mode to be used for L3 entries
in the network instance
    """
    return self.__label_allocation_mode
      
  def _set_label_allocation_mode(self, v, load=False):
    """
    Setter method for label_allocation_mode, mapped from YANG variable /network_instances/network_instance/encapsulation/config/label_allocation_mode (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_label_allocation_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_label_allocation_mode() directly.

    YANG Description: The label allocation mode to be used for L3 entries
in the network instance
    """
    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={'PER_PREFIX': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:PER_PREFIX': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'PER_NEXTHOP': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:PER_NEXTHOP': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'INSTANCE_LABEL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:INSTANCE_LABEL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="label-allocation-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """label_allocation_mode must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PER_PREFIX': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:PER_PREFIX': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'PER_NEXTHOP': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:PER_NEXTHOP': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'INSTANCE_LABEL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:INSTANCE_LABEL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="label-allocation-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__label_allocation_mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_label_allocation_mode(self):
    self.__label_allocation_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PER_PREFIX': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:PER_PREFIX': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'PER_NEXTHOP': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:PER_NEXTHOP': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'INSTANCE_LABEL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:INSTANCE_LABEL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="label-allocation-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_control_word(self):
    """
    Getter method for control_word, mapped from YANG variable /network_instances/network_instance/encapsulation/config/control_word (boolean)

    YANG Description: Whether the control-word should be used for the network
instance
    """
    return self.__control_word
      
  def _set_control_word(self, v, load=False):
    """
    Setter method for control_word, mapped from YANG variable /network_instances/network_instance/encapsulation/config/control_word (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_control_word is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_control_word() directly.

    YANG Description: Whether the control-word should be used for the network
instance
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="control-word", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """control_word must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="control-word", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__control_word = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_control_word(self):
    self.__control_word = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="control-word", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  encapsulation_type = __builtin__.property(_get_encapsulation_type, _set_encapsulation_type)
  label_allocation_mode = __builtin__.property(_get_label_allocation_mode, _set_label_allocation_mode)
  control_word = __builtin__.property(_get_control_word, _set_control_word)


  _pyangbind_elements = OrderedDict([('encapsulation_type', encapsulation_type), ('label_allocation_mode', label_allocation_mode), ('control_word', control_word), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_encapsulation_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/encapsulation/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to the encapsulation of
the network instance
  """
  __slots__ = ('_path_helper', '_extmethods', '__encapsulation_type','__label_allocation_mode','__control_word',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__encapsulation_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="encapsulation-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__label_allocation_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PER_PREFIX': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:PER_PREFIX': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'PER_NEXTHOP': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:PER_NEXTHOP': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'INSTANCE_LABEL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:INSTANCE_LABEL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="label-allocation-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__control_word = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="control-word", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'encapsulation', 'state']

  def _get_encapsulation_type(self):
    """
    Getter method for encapsulation_type, mapped from YANG variable /network_instances/network_instance/encapsulation/state/encapsulation_type (identityref)

    YANG Description: The on-the-wire encapsulation that should be used when
sending traffic from this network instance
    """
    return self.__encapsulation_type
      
  def _set_encapsulation_type(self, v, load=False):
    """
    Setter method for encapsulation_type, mapped from YANG variable /network_instances/network_instance/encapsulation/state/encapsulation_type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_encapsulation_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_encapsulation_type() directly.

    YANG Description: The on-the-wire encapsulation that should be used when
sending traffic from this network instance
    """
    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={'MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="encapsulation-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """encapsulation_type must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="encapsulation-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__encapsulation_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_encapsulation_type(self):
    self.__encapsulation_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:MPLS': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:VXLAN': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="encapsulation-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_label_allocation_mode(self):
    """
    Getter method for label_allocation_mode, mapped from YANG variable /network_instances/network_instance/encapsulation/state/label_allocation_mode (identityref)

    YANG Description: The label allocation mode to be used for L3 entries
in the network instance
    """
    return self.__label_allocation_mode
      
  def _set_label_allocation_mode(self, v, load=False):
    """
    Setter method for label_allocation_mode, mapped from YANG variable /network_instances/network_instance/encapsulation/state/label_allocation_mode (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_label_allocation_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_label_allocation_mode() directly.

    YANG Description: The label allocation mode to be used for L3 entries
in the network instance
    """
    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={'PER_PREFIX': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:PER_PREFIX': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'PER_NEXTHOP': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:PER_NEXTHOP': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'INSTANCE_LABEL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:INSTANCE_LABEL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="label-allocation-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """label_allocation_mode must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PER_PREFIX': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:PER_PREFIX': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'PER_NEXTHOP': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:PER_NEXTHOP': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'INSTANCE_LABEL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:INSTANCE_LABEL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="label-allocation-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__label_allocation_mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_label_allocation_mode(self):
    self.__label_allocation_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PER_PREFIX': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:PER_PREFIX': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'PER_NEXTHOP': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:PER_NEXTHOP': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'INSTANCE_LABEL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:INSTANCE_LABEL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="label-allocation-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_control_word(self):
    """
    Getter method for control_word, mapped from YANG variable /network_instances/network_instance/encapsulation/state/control_word (boolean)

    YANG Description: Whether the control-word should be used for the network
instance
    """
    return self.__control_word
      
  def _set_control_word(self, v, load=False):
    """
    Setter method for control_word, mapped from YANG variable /network_instances/network_instance/encapsulation/state/control_word (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_control_word is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_control_word() directly.

    YANG Description: Whether the control-word should be used for the network
instance
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="control-word", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """control_word must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="control-word", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__control_word = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_control_word(self):
    self.__control_word = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="control-word", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  encapsulation_type = __builtin__.property(_get_encapsulation_type)
  label_allocation_mode = __builtin__.property(_get_label_allocation_mode)
  control_word = __builtin__.property(_get_control_word)


  _pyangbind_elements = OrderedDict([('encapsulation_type', encapsulation_type), ('label_allocation_mode', label_allocation_mode), ('control_word', control_word), ])


class yc_encapsulation_openconfig_network_instance_l2__network_instances_network_instance_encapsulation(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/encapsulation. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to the encapsulation
used for the network instance
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'encapsulation'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_encapsulation_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_encapsulation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'encapsulation']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/encapsulation/config (container)

    YANG Description: Configuration parameters relating to the encapsulation
of the network instance
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/encapsulation/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 encapsulation
of the network instance
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_encapsulation_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_encapsulation_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_encapsulation_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/encapsulation/state (container)

    YANG Description: State parameters relating to the encapsulation of
the network instance
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/encapsulation/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 parameters relating to the encapsulation of
the network instance
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_encapsulation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_encapsulation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_encapsulation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_inter_instance_policies_apply_policy_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/inter-instance-policies/apply-policy/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Policy configuration data.
  """
  __slots__ = ('_path_helper', '_extmethods', '__import_policy','__default_import_policy','__export_policy','__default_export_policy',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)
    self.__export_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__default_export_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-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 ['network-instances', 'network-instance', 'inter-instance-policies', 'apply-policy', 'config']

  def _get_import_policy(self):
    """
    Getter method for import_policy, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_policy/config/import_policy (leafref)

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    return self.__import_policy
      
  def _set_import_policy(self, v, load=False):
    """
    Setter method for import_policy, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_policy/config/import_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_import_policy() directly.

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """import_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__import_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_import_policy(self):
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_default_import_policy(self):
    """
    Getter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_policy/config/default_import_policy (default-policy-type)

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    return self.__default_import_policy
      
  def _set_default_import_policy(self, v, load=False):
    """
    Setter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_policy/config/default_import_policy (default-policy-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_default_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_default_import_policy() directly.

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    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={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """default_import_policy must be of a type compatible with default-policy-type""",
          'defined-type': "openconfig-network-instance:default-policy-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)""",
        })

    self.__default_import_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_default_import_policy(self):
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)


  def _get_export_policy(self):
    """
    Getter method for export_policy, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_policy/config/export_policy (leafref)

    YANG Description: list of policy names in sequence to be applied on
sending a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    return self.__export_policy
      
  def _set_export_policy(self, v, load=False):
    """
    Setter method for export_policy, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_policy/config/export_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_export_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_export_policy() directly.

    YANG Description: list of policy names in sequence to be applied on
sending a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """export_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__export_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_export_policy(self):
    self.__export_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_default_export_policy(self):
    """
    Getter method for default_export_policy, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_policy/config/default_export_policy (default-policy-type)

    YANG Description: explicitly set a default policy if no policy definition
in the export policy chain is satisfied.
    """
    return self.__default_export_policy
      
  def _set_default_export_policy(self, v, load=False):
    """
    Setter method for default_export_policy, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_policy/config/default_export_policy (default-policy-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_default_export_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_default_export_policy() directly.

    YANG Description: explicitly set a default policy if no policy definition
in the export policy chain is satisfied.
    """
    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={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """default_export_policy must be of a type compatible with default-policy-type""",
          'defined-type': "openconfig-network-instance:default-policy-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)""",
        })

    self.__default_export_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_default_export_policy(self):
    self.__default_export_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)

  import_policy = __builtin__.property(_get_import_policy, _set_import_policy)
  default_import_policy = __builtin__.property(_get_default_import_policy, _set_default_import_policy)
  export_policy = __builtin__.property(_get_export_policy, _set_export_policy)
  default_export_policy = __builtin__.property(_get_default_export_policy, _set_default_export_policy)


  _pyangbind_elements = OrderedDict([('import_policy', import_policy), ('default_import_policy', default_import_policy), ('export_policy', export_policy), ('default_export_policy', default_export_policy), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_inter_instance_policies_apply_policy_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/inter-instance-policies/apply-policy/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for routing policy
  """
  __slots__ = ('_path_helper', '_extmethods', '__import_policy','__default_import_policy','__export_policy','__default_export_policy',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)
    self.__export_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__default_export_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-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 ['network-instances', 'network-instance', 'inter-instance-policies', 'apply-policy', 'state']

  def _get_import_policy(self):
    """
    Getter method for import_policy, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_policy/state/import_policy (leafref)

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    return self.__import_policy
      
  def _set_import_policy(self, v, load=False):
    """
    Setter method for import_policy, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_policy/state/import_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_import_policy() directly.

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """import_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__import_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_import_policy(self):
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_default_import_policy(self):
    """
    Getter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_policy/state/default_import_policy (default-policy-type)

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    return self.__default_import_policy
      
  def _set_default_import_policy(self, v, load=False):
    """
    Setter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_policy/state/default_import_policy (default-policy-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_default_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_default_import_policy() directly.

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    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={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """default_import_policy must be of a type compatible with default-policy-type""",
          'defined-type': "openconfig-network-instance:default-policy-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)""",
        })

    self.__default_import_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_default_import_policy(self):
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)


  def _get_export_policy(self):
    """
    Getter method for export_policy, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_policy/state/export_policy (leafref)

    YANG Description: list of policy names in sequence to be applied on
sending a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    return self.__export_policy
      
  def _set_export_policy(self, v, load=False):
    """
    Setter method for export_policy, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_policy/state/export_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_export_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_export_policy() directly.

    YANG Description: list of policy names in sequence to be applied on
sending a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """export_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__export_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_export_policy(self):
    self.__export_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_default_export_policy(self):
    """
    Getter method for default_export_policy, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_policy/state/default_export_policy (default-policy-type)

    YANG Description: explicitly set a default policy if no policy definition
in the export policy chain is satisfied.
    """
    return self.__default_export_policy
      
  def _set_default_export_policy(self, v, load=False):
    """
    Setter method for default_export_policy, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_policy/state/default_export_policy (default-policy-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_default_export_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_default_export_policy() directly.

    YANG Description: explicitly set a default policy if no policy definition
in the export policy chain is satisfied.
    """
    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={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """default_export_policy must be of a type compatible with default-policy-type""",
          'defined-type': "openconfig-network-instance:default-policy-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)""",
        })

    self.__default_export_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_default_export_policy(self):
    self.__default_export_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)

  import_policy = __builtin__.property(_get_import_policy)
  default_import_policy = __builtin__.property(_get_default_import_policy)
  export_policy = __builtin__.property(_get_export_policy)
  default_export_policy = __builtin__.property(_get_default_export_policy)


  _pyangbind_elements = OrderedDict([('import_policy', import_policy), ('default_import_policy', default_import_policy), ('export_policy', export_policy), ('default_export_policy', default_export_policy), ])


class yc_apply_policy_openconfig_network_instance_l2__network_instances_network_instance_inter_instance_policies_apply_policy(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/inter-instance-policies/apply-policy. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Anchor point for routing policies in the model.
Import and export policies are with respect to the local
routing table, i.e., export (send) and import (receive),
depending on the context.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'apply-policy'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_inter_instance_policies_apply_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_inter_instance_policies_apply_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'inter-instance-policies', 'apply-policy']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_policy/config (container)

    YANG Description: Policy configuration data.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_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: Policy configuration data.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_inter_instance_policies_apply_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_inter_instance_policies_apply_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_inter_instance_policies_apply_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_policy/state (container)

    YANG Description: Operational state for routing policy
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_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 for routing policy
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_inter_instance_policies_apply_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_inter_instance_policies_apply_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_inter_instance_policies_apply_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_inter_instance_policies_import_export_policy_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/inter-instance-policies/import-export-policy/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters to set the import and export policies
associated with a EVI
  """
  __slots__ = ('_path_helper', '_extmethods', '__export_route_target','__import_route_target',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__export_route_target = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="export-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)
    self.__import_route_target = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="import-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'inter-instance-policies', 'import-export-policy', 'config']

  def _get_export_route_target(self):
    """
    Getter method for export_route_target, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/import_export_policy/config/export_route_target (union)

    YANG Description: Export Route Target (RT) in the network-instance on a PE.
    """
    return self.__export_route_target
      
  def _set_export_route_target(self, v, load=False):
    """
    Setter method for export_route_target, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/import_export_policy/config/export_route_target (union)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_export_route_target is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_export_route_target() directly.

    YANG Description: Export Route Target (RT) in the network-instance on a PE.
    """
    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_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="export-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """export_route_target must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="export-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)""",
        })

    self.__export_route_target = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_export_route_target(self):
    self.__export_route_target = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="export-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)


  def _get_import_route_target(self):
    """
    Getter method for import_route_target, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/import_export_policy/config/import_route_target (union)

    YANG Description: Import Route Target (RT) in the network-instance on a PE.
    """
    return self.__import_route_target
      
  def _set_import_route_target(self, v, load=False):
    """
    Setter method for import_route_target, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/import_export_policy/config/import_route_target (union)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_import_route_target is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_import_route_target() directly.

    YANG Description: Import Route Target (RT) in the network-instance on a PE.
    """
    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_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="import-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """import_route_target must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="import-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)""",
        })

    self.__import_route_target = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_import_route_target(self):
    self.__import_route_target = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="import-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=True)

  export_route_target = __builtin__.property(_get_export_route_target, _set_export_route_target)
  import_route_target = __builtin__.property(_get_import_route_target, _set_import_route_target)


  _pyangbind_elements = OrderedDict([('export_route_target', export_route_target), ('import_route_target', import_route_target), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_inter_instance_policies_import_export_policy_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/inter-instance-policies/import-export-policy/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters of the import and export policies
associated with a EVI
  """
  __slots__ = ('_path_helper', '_extmethods', '__export_route_target','__import_route_target',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__export_route_target = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="export-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    self.__import_route_target = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="import-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', 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 ['network-instances', 'network-instance', 'inter-instance-policies', 'import-export-policy', 'state']

  def _get_export_route_target(self):
    """
    Getter method for export_route_target, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/import_export_policy/state/export_route_target (union)

    YANG Description: Export Route Target (RT) in the network-instance on a PE.
    """
    return self.__export_route_target
      
  def _set_export_route_target(self, v, load=False):
    """
    Setter method for export_route_target, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/import_export_policy/state/export_route_target (union)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_export_route_target is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_export_route_target() directly.

    YANG Description: Export Route Target (RT) in the network-instance on a PE.
    """
    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_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="export-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """export_route_target must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="export-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)""",
        })

    self.__export_route_target = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_export_route_target(self):
    self.__export_route_target = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="export-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)


  def _get_import_route_target(self):
    """
    Getter method for import_route_target, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/import_export_policy/state/import_route_target (union)

    YANG Description: Import Route Target (RT) in the network-instance on a PE.
    """
    return self.__import_route_target
      
  def _set_import_route_target(self, v, load=False):
    """
    Setter method for import_route_target, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/import_export_policy/state/import_route_target (union)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_import_route_target is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_import_route_target() directly.

    YANG Description: Import Route Target (RT) in the network-instance on a PE.
    """
    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_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="import-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """import_route_target must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="import-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)""",
        })

    self.__import_route_target = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_import_route_target(self):
    self.__import_route_target = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-target:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'route\\-origin:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9]):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': 'color:[0-1]{2}:(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{1,8}|[0-9])'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'AUTO': {}},),]), is_leaf=False, yang_name="import-route-target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)

  export_route_target = __builtin__.property(_get_export_route_target)
  import_route_target = __builtin__.property(_get_import_route_target)


  _pyangbind_elements = OrderedDict([('export_route_target', export_route_target), ('import_route_target', import_route_target), ])


class yc_import_export_policy_openconfig_network_instance_l2__network_instances_network_instance_inter_instance_policies_import_export_policy(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/inter-instance-policies/import-export-policy. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top container to set the import and export policies
associated with a EVI
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'import-export-policy'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_inter_instance_policies_import_export_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_inter_instance_policies_import_export_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'inter-instance-policies', 'import-export-policy']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/import_export_policy/config (container)

    YANG Description: Configuration parameters to set the import and export policies
associated with a EVI
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/import_export_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 to set the import and export policies
associated with a EVI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_inter_instance_policies_import_export_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_inter_instance_policies_import_export_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_inter_instance_policies_import_export_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/import_export_policy/state (container)

    YANG Description: State parameters of the import and export policies
associated with a EVI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/import_export_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: State parameters of the import and export policies
associated with a EVI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_inter_instance_policies_import_export_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_inter_instance_policies_import_export_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_inter_instance_policies_import_export_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/network-instance', defining_module='openconfig-network-instance', 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_inter_instance_policies_openconfig_network_instance_l2__network_instances_network_instance_inter_instance_policies(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/inter-instance-policies. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Policies dictating how RIB or FIB entries are imported
to and exported from this instance
  """
  __slots__ = ('_path_helper', '_extmethods', '__apply_policy','__import_export_policy',)

  _yang_name = 'inter-instance-policies'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__apply_policy = YANGDynClass(base=yc_apply_policy_openconfig_network_instance_l2__network_instances_network_instance_inter_instance_policies_apply_policy, is_container='container', yang_name="apply-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__import_export_policy = YANGDynClass(base=yc_import_export_policy_openconfig_network_instance_l2__network_instances_network_instance_inter_instance_policies_import_export_policy, is_container='container', yang_name="import-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'inter-instance-policies']

  def _get_apply_policy(self):
    """
    Getter method for apply_policy, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_policy (container)

    YANG Description: Anchor point for routing policies in the model.
Import and export policies are with respect to the local
routing table, i.e., export (send) and import (receive),
depending on the context.
    """
    return self.__apply_policy
      
  def _set_apply_policy(self, v, load=False):
    """
    Setter method for apply_policy, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/apply_policy (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_apply_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_apply_policy() directly.

    YANG Description: Anchor point for routing policies in the model.
Import and export policies are with respect to the local
routing table, i.e., export (send) and import (receive),
depending on the context.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_apply_policy_openconfig_network_instance_l2__network_instances_network_instance_inter_instance_policies_apply_policy, is_container='container', yang_name="apply-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """apply_policy must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_apply_policy_openconfig_network_instance_l2__network_instances_network_instance_inter_instance_policies_apply_policy, is_container='container', yang_name="apply-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__apply_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_apply_policy(self):
    self.__apply_policy = YANGDynClass(base=yc_apply_policy_openconfig_network_instance_l2__network_instances_network_instance_inter_instance_policies_apply_policy, is_container='container', yang_name="apply-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_import_export_policy(self):
    """
    Getter method for import_export_policy, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/import_export_policy (container)

    YANG Description: Top container to set the import and export policies
associated with a EVI
    """
    return self.__import_export_policy
      
  def _set_import_export_policy(self, v, load=False):
    """
    Setter method for import_export_policy, mapped from YANG variable /network_instances/network_instance/inter_instance_policies/import_export_policy (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_import_export_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_import_export_policy() directly.

    YANG Description: Top container to set the import and export policies
associated with a EVI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_import_export_policy_openconfig_network_instance_l2__network_instances_network_instance_inter_instance_policies_import_export_policy, is_container='container', yang_name="import-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """import_export_policy must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_import_export_policy_openconfig_network_instance_l2__network_instances_network_instance_inter_instance_policies_import_export_policy, is_container='container', yang_name="import-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__import_export_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_import_export_policy(self):
    self.__import_export_policy = YANGDynClass(base=yc_import_export_policy_openconfig_network_instance_l2__network_instances_network_instance_inter_instance_policies_import_export_policy, is_container='container', yang_name="import-export-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  apply_policy = __builtin__.property(_get_apply_policy, _set_apply_policy)
  import_export_policy = __builtin__.property(_get_import_export_policy, _set_import_export_policy)


  _pyangbind_elements = OrderedDict([('apply_policy', apply_policy), ('import_export_policy', import_export_policy), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_table_connections_table_connection_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/table-connections/table-connection/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 connection
between tables
  """
  __slots__ = ('_path_helper', '_extmethods', '__src_protocol','__address_family','__dst_protocol','__disable_metric_propagation','__import_policy','__default_import_policy',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__src_protocol = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="src-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__address_family = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__dst_protocol = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="dst-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__disable_metric_propagation = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-metric-propagation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-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 ['network-instances', 'network-instance', 'table-connections', 'table-connection', 'config']

  def _get_src_protocol(self):
    """
    Getter method for src_protocol, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/config/src_protocol (leafref)

    YANG Description: The source protocol for the table connection
    """
    return self.__src_protocol
      
  def _set_src_protocol(self, v, load=False):
    """
    Setter method for src_protocol, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/config/src_protocol (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_src_protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_src_protocol() directly.

    YANG Description: The source protocol for the table connection
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="src-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """src_protocol must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="src-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__src_protocol = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_src_protocol(self):
    self.__src_protocol = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="src-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_address_family(self):
    """
    Getter method for address_family, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/config/address_family (leafref)

    YANG Description: The address family associated with the connection. This
must be defined for the source protocol. The target
address family is implicitly defined by the address family
specified for the source protocol.
    """
    return self.__address_family
      
  def _set_address_family(self, v, load=False):
    """
    Setter method for address_family, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/config/address_family (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address_family is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address_family() directly.

    YANG Description: The address family associated with the connection. This
must be defined for the source protocol. The target
address family is implicitly defined by the address family
specified for the source protocol.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address_family must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__address_family = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address_family(self):
    self.__address_family = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_dst_protocol(self):
    """
    Getter method for dst_protocol, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/config/dst_protocol (leafref)

    YANG Description: The destination protocol for the table connection
    """
    return self.__dst_protocol
      
  def _set_dst_protocol(self, v, load=False):
    """
    Setter method for dst_protocol, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/config/dst_protocol (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dst_protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dst_protocol() directly.

    YANG Description: The destination protocol for the table connection
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="dst-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dst_protocol must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="dst-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__dst_protocol = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dst_protocol(self):
    self.__dst_protocol = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="dst-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_disable_metric_propagation(self):
    """
    Getter method for disable_metric_propagation, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/config/disable_metric_propagation (boolean)

    YANG Description: By default a system may reflect the metric specified in
the destination protocol according to that which is set in
the source protocol. For example:
- IS-IS metric may be reflected in BGP MED (and vice versa)
- OSPF metric may be reflected in the BGP MED (and vice versa)
When this leaf is set to true, this reflection behaviour MUST be
disabled, and rather the metric must be set to the default value,
or explicitly set by policy.
    """
    return self.__disable_metric_propagation
      
  def _set_disable_metric_propagation(self, v, load=False):
    """
    Setter method for disable_metric_propagation, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/config/disable_metric_propagation (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_disable_metric_propagation is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_disable_metric_propagation() directly.

    YANG Description: By default a system may reflect the metric specified in
the destination protocol according to that which is set in
the source protocol. For example:
- IS-IS metric may be reflected in BGP MED (and vice versa)
- OSPF metric may be reflected in the BGP MED (and vice versa)
When this leaf is set to true, this reflection behaviour MUST be
disabled, and rather the metric must be set to the default value,
or explicitly set by policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-metric-propagation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """disable_metric_propagation must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-metric-propagation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__disable_metric_propagation = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_disable_metric_propagation(self):
    self.__disable_metric_propagation = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-metric-propagation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_import_policy(self):
    """
    Getter method for import_policy, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/config/import_policy (leafref)

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    return self.__import_policy
      
  def _set_import_policy(self, v, load=False):
    """
    Setter method for import_policy, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/config/import_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_import_policy() directly.

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """import_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__import_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_import_policy(self):
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_default_import_policy(self):
    """
    Getter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/config/default_import_policy (default-policy-type)

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    return self.__default_import_policy
      
  def _set_default_import_policy(self, v, load=False):
    """
    Setter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/config/default_import_policy (default-policy-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_default_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_default_import_policy() directly.

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    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={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """default_import_policy must be of a type compatible with default-policy-type""",
          'defined-type': "openconfig-network-instance:default-policy-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)""",
        })

    self.__default_import_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_default_import_policy(self):
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=True)

  src_protocol = __builtin__.property(_get_src_protocol, _set_src_protocol)
  address_family = __builtin__.property(_get_address_family, _set_address_family)
  dst_protocol = __builtin__.property(_get_dst_protocol, _set_dst_protocol)
  disable_metric_propagation = __builtin__.property(_get_disable_metric_propagation, _set_disable_metric_propagation)
  import_policy = __builtin__.property(_get_import_policy, _set_import_policy)
  default_import_policy = __builtin__.property(_get_default_import_policy, _set_default_import_policy)


  _pyangbind_elements = OrderedDict([('src_protocol', src_protocol), ('address_family', address_family), ('dst_protocol', dst_protocol), ('disable_metric_propagation', disable_metric_propagation), ('import_policy', import_policy), ('default_import_policy', default_import_policy), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_table_connections_table_connection_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/table-connections/table-connection/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to the connection between
tables
  """
  __slots__ = ('_path_helper', '_extmethods', '__src_protocol','__address_family','__dst_protocol','__disable_metric_propagation','__import_policy','__default_import_policy',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__src_protocol = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="src-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__address_family = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__dst_protocol = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="dst-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__disable_metric_propagation = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-metric-propagation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-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 ['network-instances', 'network-instance', 'table-connections', 'table-connection', 'state']

  def _get_src_protocol(self):
    """
    Getter method for src_protocol, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/state/src_protocol (leafref)

    YANG Description: The source protocol for the table connection
    """
    return self.__src_protocol
      
  def _set_src_protocol(self, v, load=False):
    """
    Setter method for src_protocol, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/state/src_protocol (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_src_protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_src_protocol() directly.

    YANG Description: The source protocol for the table connection
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="src-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """src_protocol must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="src-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__src_protocol = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_src_protocol(self):
    self.__src_protocol = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="src-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_address_family(self):
    """
    Getter method for address_family, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/state/address_family (leafref)

    YANG Description: The address family associated with the connection. This
must be defined for the source protocol. The target
address family is implicitly defined by the address family
specified for the source protocol.
    """
    return self.__address_family
      
  def _set_address_family(self, v, load=False):
    """
    Setter method for address_family, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/state/address_family (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address_family is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address_family() directly.

    YANG Description: The address family associated with the connection. This
must be defined for the source protocol. The target
address family is implicitly defined by the address family
specified for the source protocol.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address_family must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__address_family = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address_family(self):
    self.__address_family = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_dst_protocol(self):
    """
    Getter method for dst_protocol, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/state/dst_protocol (leafref)

    YANG Description: The destination protocol for the table connection
    """
    return self.__dst_protocol
      
  def _set_dst_protocol(self, v, load=False):
    """
    Setter method for dst_protocol, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/state/dst_protocol (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dst_protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dst_protocol() directly.

    YANG Description: The destination protocol for the table connection
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="dst-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dst_protocol must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="dst-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__dst_protocol = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dst_protocol(self):
    self.__dst_protocol = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="dst-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_disable_metric_propagation(self):
    """
    Getter method for disable_metric_propagation, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/state/disable_metric_propagation (boolean)

    YANG Description: By default a system may reflect the metric specified in
the destination protocol according to that which is set in
the source protocol. For example:
- IS-IS metric may be reflected in BGP MED (and vice versa)
- OSPF metric may be reflected in the BGP MED (and vice versa)
When this leaf is set to true, this reflection behaviour MUST be
disabled, and rather the metric must be set to the default value,
or explicitly set by policy.
    """
    return self.__disable_metric_propagation
      
  def _set_disable_metric_propagation(self, v, load=False):
    """
    Setter method for disable_metric_propagation, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/state/disable_metric_propagation (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_disable_metric_propagation is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_disable_metric_propagation() directly.

    YANG Description: By default a system may reflect the metric specified in
the destination protocol according to that which is set in
the source protocol. For example:
- IS-IS metric may be reflected in BGP MED (and vice versa)
- OSPF metric may be reflected in the BGP MED (and vice versa)
When this leaf is set to true, this reflection behaviour MUST be
disabled, and rather the metric must be set to the default value,
or explicitly set by policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-metric-propagation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """disable_metric_propagation must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-metric-propagation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__disable_metric_propagation = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_disable_metric_propagation(self):
    self.__disable_metric_propagation = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="disable-metric-propagation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_import_policy(self):
    """
    Getter method for import_policy, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/state/import_policy (leafref)

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    return self.__import_policy
      
  def _set_import_policy(self, v, load=False):
    """
    Setter method for import_policy, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/state/import_policy (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_import_policy() directly.

    YANG Description: list of policy names in sequence to be applied on
receiving a routing update in the current context, e.g.,
for the current peer group, neighbor, address family,
etc.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """import_policy must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__import_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_import_policy(self):
    self.__import_policy = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_default_import_policy(self):
    """
    Getter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/state/default_import_policy (default-policy-type)

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    return self.__default_import_policy
      
  def _set_default_import_policy(self, v, load=False):
    """
    Setter method for default_import_policy, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/state/default_import_policy (default-policy-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_default_import_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_default_import_policy() directly.

    YANG Description: explicitly set a default policy if no policy definition
in the import policy chain is satisfied.
    """
    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={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """default_import_policy must be of a type compatible with default-policy-type""",
          'defined-type': "openconfig-network-instance:default-policy-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)""",
        })

    self.__default_import_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_default_import_policy(self):
    self.__default_import_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACCEPT_ROUTE': {}, 'REJECT_ROUTE': {}},), default=six.text_type("REJECT_ROUTE"), is_leaf=True, yang_name="default-import-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='default-policy-type', is_config=False)

  src_protocol = __builtin__.property(_get_src_protocol)
  address_family = __builtin__.property(_get_address_family)
  dst_protocol = __builtin__.property(_get_dst_protocol)
  disable_metric_propagation = __builtin__.property(_get_disable_metric_propagation)
  import_policy = __builtin__.property(_get_import_policy)
  default_import_policy = __builtin__.property(_get_default_import_policy)


  _pyangbind_elements = OrderedDict([('src_protocol', src_protocol), ('address_family', address_family), ('dst_protocol', dst_protocol), ('disable_metric_propagation', disable_metric_propagation), ('import_policy', import_policy), ('default_import_policy', default_import_policy), ])


class yc_table_connection_openconfig_network_instance_l2__network_instances_network_instance_table_connections_table_connection(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/table-connections/table-connection. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A list of connections between pairs of routing or
forwarding tables, the leaking of entries between
which is specified by the import policy.

A connection connecting a source table to a destination
table implies that routes that match the policy specified
for the connection are available for the destination
protocol to advertise, or match within its policies.
  """
  __slots__ = ('_path_helper', '_extmethods', '__src_protocol','__dst_protocol','__address_family','__config','__state',)

  _yang_name = 'table-connection'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__src_protocol = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="src-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__dst_protocol = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="dst-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__address_family = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_table_connections_table_connection_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_table_connections_table_connection_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'table-connections', 'table-connection']

  def _get_src_protocol(self):
    """
    Getter method for src_protocol, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/src_protocol (leafref)

    YANG Description: The name of the protocol associated with the table
which should be utilised as the source of forwarding
or routing information
    """
    return self.__src_protocol
      
  def _set_src_protocol(self, v, load=False):
    """
    Setter method for src_protocol, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/src_protocol (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_src_protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_src_protocol() directly.

    YANG Description: The name of the protocol associated with the table
which should be utilised as the source of forwarding
or routing information
    """
    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="src-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """src_protocol must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="src-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__src_protocol = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_src_protocol(self):
    self.__src_protocol = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="src-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_dst_protocol(self):
    """
    Getter method for dst_protocol, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/dst_protocol (leafref)

    YANG Description: The table to which routing entries should be
exported
    """
    return self.__dst_protocol
      
  def _set_dst_protocol(self, v, load=False):
    """
    Setter method for dst_protocol, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/dst_protocol (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dst_protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dst_protocol() directly.

    YANG Description: The table to which routing entries should be
exported
    """
    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="dst-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dst_protocol must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="dst-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__dst_protocol = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dst_protocol(self):
    self.__dst_protocol = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="dst-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_address_family(self):
    """
    Getter method for address_family, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/address_family (leafref)

    YANG Description: The address family associated with the connection
    """
    return self.__address_family
      
  def _set_address_family(self, v, load=False):
    """
    Setter method for address_family, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/address_family (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address_family is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address_family() directly.

    YANG Description: The address family associated with the connection
    """
    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="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address_family must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__address_family = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address_family(self):
    self.__address_family = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/config (container)

    YANG Description: Configuration parameters relating to the connection
between tables
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/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 connection
between tables
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_table_connections_table_connection_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_table_connections_table_connection_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_table_connections_table_connection_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/state (container)

    YANG Description: State parameters relating to the connection between
tables
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection/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 parameters relating to the connection between
tables
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_table_connections_table_connection_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_table_connections_table_connection_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_table_connections_table_connection_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  src_protocol = __builtin__.property(_get_src_protocol, _set_src_protocol)
  dst_protocol = __builtin__.property(_get_dst_protocol, _set_dst_protocol)
  address_family = __builtin__.property(_get_address_family, _set_address_family)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('src_protocol', src_protocol), ('dst_protocol', dst_protocol), ('address_family', address_family), ('config', config), ('state', state), ])


class yc_table_connections_openconfig_network_instance_l2__network_instances_network_instance_table_connections(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/table-connections. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Policies dictating how RIB or FIB entries are propagated
between tables
  """
  __slots__ = ('_path_helper', '_extmethods', '__table_connection',)

  _yang_name = 'table-connections'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__table_connection = YANGDynClass(base=YANGListType("src_protocol dst_protocol address_family",yc_table_connection_openconfig_network_instance_l2__network_instances_network_instance_table_connections_table_connection, yang_name="table-connection", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='src-protocol dst-protocol address-family', extensions=None), is_container='list', yang_name="table-connection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'table-connections']

  def _get_table_connection(self):
    """
    Getter method for table_connection, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection (list)

    YANG Description: A list of connections between pairs of routing or
forwarding tables, the leaking of entries between
which is specified by the import policy.

A connection connecting a source table to a destination
table implies that routes that match the policy specified
for the connection are available for the destination
protocol to advertise, or match within its policies.
    """
    return self.__table_connection
      
  def _set_table_connection(self, v, load=False):
    """
    Setter method for table_connection, mapped from YANG variable /network_instances/network_instance/table_connections/table_connection (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_table_connection is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_table_connection() directly.

    YANG Description: A list of connections between pairs of routing or
forwarding tables, the leaking of entries between
which is specified by the import policy.

A connection connecting a source table to a destination
table implies that routes that match the policy specified
for the connection are available for the destination
protocol to advertise, or match within its policies.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("src_protocol dst_protocol address_family",yc_table_connection_openconfig_network_instance_l2__network_instances_network_instance_table_connections_table_connection, yang_name="table-connection", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='src-protocol dst-protocol address-family', extensions=None), is_container='list', yang_name="table-connection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """table_connection must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("src_protocol dst_protocol address_family",yc_table_connection_openconfig_network_instance_l2__network_instances_network_instance_table_connections_table_connection, yang_name="table-connection", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='src-protocol dst-protocol address-family', extensions=None), is_container='list', yang_name="table-connection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__table_connection = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_table_connection(self):
    self.__table_connection = YANGDynClass(base=YANGListType("src_protocol dst_protocol address_family",yc_table_connection_openconfig_network_instance_l2__network_instances_network_instance_table_connections_table_connection, yang_name="table-connection", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='src-protocol dst-protocol address-family', extensions=None), is_container='list', yang_name="table-connection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  table_connection = __builtin__.property(_get_table_connection, _set_table_connection)


  _pyangbind_elements = OrderedDict([('table_connection', table_connection), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_interfaces_interface_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/interfaces/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 associated
interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__interface','__subinterface','__associated_address_families','__mac_pinning','__irb_anycast_gateway',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__associated_address_families = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},)), is_leaf=False, yang_name="associated-address-families", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__mac_pinning = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="mac-pinning", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__irb_anycast_gateway = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DISTRIBUTED_SYMETRIC': {}, 'DISTRIBUTED_ASYMETRIC': {}, 'HYBRID': {}, 'CENTRALIZED': {}},), is_leaf=True, yang_name="irb-anycast-gateway", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'interfaces', 'interface', 'config']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /network_instances/network_instance/interfaces/interface/config/id (string)

    YANG Description: A unique identifier for this interface - this is expressed
as a free-text string
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /network_instances/network_instance/interfaces/interface/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: A unique identifier for this interface - this is expressed
as a free-text string
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/interfaces/interface/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 /network_instances/network_instance/interfaces/interface/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/interfaces/interface/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 /network_instances/network_instance/interfaces/interface/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_associated_address_families(self):
    """
    Getter method for associated_address_families, mapped from YANG variable /network_instances/network_instance/interfaces/interface/config/associated_address_families (identityref)

    YANG Description: The address families on the subinterface which are to be
associated with this network instance. When this leaf-list
is empty and the network instance requires Layer 3 information
the address families for which the network instance is
enabled should be imported. If the value of this leaf-list
is specified then the association MUST only be made for
those address families that are included in the list.
    """
    return self.__associated_address_families
      
  def _set_associated_address_families(self, v, load=False):
    """
    Setter method for associated_address_families, mapped from YANG variable /network_instances/network_instance/interfaces/interface/config/associated_address_families (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_associated_address_families is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_associated_address_families() directly.

    YANG Description: The address families on the subinterface which are to be
associated with this network instance. When this leaf-list
is empty and the network instance requires Layer 3 information
the address families for which the network instance is
enabled should be imported. If the value of this leaf-list
is specified then the association MUST only be made for
those address families that are included in the list.
    """
    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={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},)), is_leaf=False, yang_name="associated-address-families", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """associated_address_families must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},)), is_leaf=False, yang_name="associated-address-families", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__associated_address_families = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_associated_address_families(self):
    self.__associated_address_families = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},)), is_leaf=False, yang_name="associated-address-families", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_mac_pinning(self):
    """
    Getter method for mac_pinning, mapped from YANG variable /network_instances/network_instance/interfaces/interface/config/mac_pinning (boolean)

    YANG Description: Enable (TRUE) or disable (FALSE). There are scenarios in which
it is desired to configure some MAC addresses as static so
that they are not subjected to MAC moves. If you enable MAC pinning
on a CE interface, that MAC address cannot be moved to any
other CE interface
    """
    return self.__mac_pinning
      
  def _set_mac_pinning(self, v, load=False):
    """
    Setter method for mac_pinning, mapped from YANG variable /network_instances/network_instance/interfaces/interface/config/mac_pinning (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_pinning is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_pinning() directly.

    YANG Description: Enable (TRUE) or disable (FALSE). There are scenarios in which
it is desired to configure some MAC addresses as static so
that they are not subjected to MAC moves. If you enable MAC pinning
on a CE interface, that MAC address cannot be moved to any
other CE interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="mac-pinning", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_pinning must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="mac-pinning", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__mac_pinning = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mac_pinning(self):
    self.__mac_pinning = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="mac-pinning", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_irb_anycast_gateway(self):
    """
    Getter method for irb_anycast_gateway, mapped from YANG variable /network_instances/network_instance/interfaces/interface/config/irb_anycast_gateway (enumeration)

    YANG Description: Associate VLAN SVI with anycast Gateway.
The SVI is the layer3 interface for the mac-vrf
when the SVI is being used as the first hop default gw.
    """
    return self.__irb_anycast_gateway
      
  def _set_irb_anycast_gateway(self, v, load=False):
    """
    Setter method for irb_anycast_gateway, mapped from YANG variable /network_instances/network_instance/interfaces/interface/config/irb_anycast_gateway (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_irb_anycast_gateway is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_irb_anycast_gateway() directly.

    YANG Description: Associate VLAN SVI with anycast Gateway.
The SVI is the layer3 interface for the mac-vrf
when the SVI is being used as the first hop default gw.
    """
    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={'DISTRIBUTED_SYMETRIC': {}, 'DISTRIBUTED_ASYMETRIC': {}, 'HYBRID': {}, 'CENTRALIZED': {}},), is_leaf=True, yang_name="irb-anycast-gateway", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """irb_anycast_gateway must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DISTRIBUTED_SYMETRIC': {}, 'DISTRIBUTED_ASYMETRIC': {}, 'HYBRID': {}, 'CENTRALIZED': {}},), is_leaf=True, yang_name="irb-anycast-gateway", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)""",
        })

    self.__irb_anycast_gateway = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_irb_anycast_gateway(self):
    self.__irb_anycast_gateway = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DISTRIBUTED_SYMETRIC': {}, 'DISTRIBUTED_ASYMETRIC': {}, 'HYBRID': {}, 'CENTRALIZED': {}},), is_leaf=True, yang_name="irb-anycast-gateway", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)

  id = __builtin__.property(_get_id, _set_id)
  interface = __builtin__.property(_get_interface, _set_interface)
  subinterface = __builtin__.property(_get_subinterface, _set_subinterface)
  associated_address_families = __builtin__.property(_get_associated_address_families, _set_associated_address_families)
  mac_pinning = __builtin__.property(_get_mac_pinning, _set_mac_pinning)
  irb_anycast_gateway = __builtin__.property(_get_irb_anycast_gateway, _set_irb_anycast_gateway)


  _pyangbind_elements = OrderedDict([('id', id), ('interface', interface), ('subinterface', subinterface), ('associated_address_families', associated_address_families), ('mac_pinning', mac_pinning), ('irb_anycast_gateway', irb_anycast_gateway), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_interfaces_interface_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/interfaces/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
associated interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__interface','__subinterface','__associated_address_families','__mac_pinning','__irb_anycast_gateway',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__associated_address_families = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},)), is_leaf=False, yang_name="associated-address-families", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__mac_pinning = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="mac-pinning", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__irb_anycast_gateway = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DISTRIBUTED_SYMETRIC': {}, 'DISTRIBUTED_ASYMETRIC': {}, 'HYBRID': {}, 'CENTRALIZED': {}},), is_leaf=True, yang_name="irb-anycast-gateway", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'interfaces', 'interface', 'state']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /network_instances/network_instance/interfaces/interface/state/id (string)

    YANG Description: A unique identifier for this interface - this is expressed
as a free-text string
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /network_instances/network_instance/interfaces/interface/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: A unique identifier for this interface - this is expressed
as a free-text string
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/interfaces/interface/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 /network_instances/network_instance/interfaces/interface/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/interfaces/interface/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 /network_instances/network_instance/interfaces/interface/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_associated_address_families(self):
    """
    Getter method for associated_address_families, mapped from YANG variable /network_instances/network_instance/interfaces/interface/state/associated_address_families (identityref)

    YANG Description: The address families on the subinterface which are to be
associated with this network instance. When this leaf-list
is empty and the network instance requires Layer 3 information
the address families for which the network instance is
enabled should be imported. If the value of this leaf-list
is specified then the association MUST only be made for
those address families that are included in the list.
    """
    return self.__associated_address_families
      
  def _set_associated_address_families(self, v, load=False):
    """
    Setter method for associated_address_families, mapped from YANG variable /network_instances/network_instance/interfaces/interface/state/associated_address_families (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_associated_address_families is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_associated_address_families() directly.

    YANG Description: The address families on the subinterface which are to be
associated with this network instance. When this leaf-list
is empty and the network instance requires Layer 3 information
the address families for which the network instance is
enabled should be imported. If the value of this leaf-list
is specified then the association MUST only be made for
those address families that are included in the list.
    """
    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={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},)), is_leaf=False, yang_name="associated-address-families", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """associated_address_families must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},)), is_leaf=False, yang_name="associated-address-families", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__associated_address_families = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_associated_address_families(self):
    self.__associated_address_families = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},)), is_leaf=False, yang_name="associated-address-families", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_mac_pinning(self):
    """
    Getter method for mac_pinning, mapped from YANG variable /network_instances/network_instance/interfaces/interface/state/mac_pinning (boolean)

    YANG Description: Enable (TRUE) or disable (FALSE). There are scenarios in which
it is desired to configure some MAC addresses as static so
that they are not subjected to MAC moves. If you enable MAC pinning
on a CE interface, that MAC address cannot be moved to any
other CE interface
    """
    return self.__mac_pinning
      
  def _set_mac_pinning(self, v, load=False):
    """
    Setter method for mac_pinning, mapped from YANG variable /network_instances/network_instance/interfaces/interface/state/mac_pinning (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_pinning is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_pinning() directly.

    YANG Description: Enable (TRUE) or disable (FALSE). There are scenarios in which
it is desired to configure some MAC addresses as static so
that they are not subjected to MAC moves. If you enable MAC pinning
on a CE interface, that MAC address cannot be moved to any
other CE interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="mac-pinning", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_pinning must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="mac-pinning", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__mac_pinning = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mac_pinning(self):
    self.__mac_pinning = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="mac-pinning", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_irb_anycast_gateway(self):
    """
    Getter method for irb_anycast_gateway, mapped from YANG variable /network_instances/network_instance/interfaces/interface/state/irb_anycast_gateway (enumeration)

    YANG Description: Associate VLAN SVI with anycast Gateway.
The SVI is the layer3 interface for the mac-vrf
when the SVI is being used as the first hop default gw.
    """
    return self.__irb_anycast_gateway
      
  def _set_irb_anycast_gateway(self, v, load=False):
    """
    Setter method for irb_anycast_gateway, mapped from YANG variable /network_instances/network_instance/interfaces/interface/state/irb_anycast_gateway (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_irb_anycast_gateway is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_irb_anycast_gateway() directly.

    YANG Description: Associate VLAN SVI with anycast Gateway.
The SVI is the layer3 interface for the mac-vrf
when the SVI is being used as the first hop default gw.
    """
    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={'DISTRIBUTED_SYMETRIC': {}, 'DISTRIBUTED_ASYMETRIC': {}, 'HYBRID': {}, 'CENTRALIZED': {}},), is_leaf=True, yang_name="irb-anycast-gateway", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """irb_anycast_gateway must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DISTRIBUTED_SYMETRIC': {}, 'DISTRIBUTED_ASYMETRIC': {}, 'HYBRID': {}, 'CENTRALIZED': {}},), is_leaf=True, yang_name="irb-anycast-gateway", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__irb_anycast_gateway = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_irb_anycast_gateway(self):
    self.__irb_anycast_gateway = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DISTRIBUTED_SYMETRIC': {}, 'DISTRIBUTED_ASYMETRIC': {}, 'HYBRID': {}, 'CENTRALIZED': {}},), is_leaf=True, yang_name="irb-anycast-gateway", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)

  id = __builtin__.property(_get_id)
  interface = __builtin__.property(_get_interface)
  subinterface = __builtin__.property(_get_subinterface)
  associated_address_families = __builtin__.property(_get_associated_address_families)
  mac_pinning = __builtin__.property(_get_mac_pinning)
  irb_anycast_gateway = __builtin__.property(_get_irb_anycast_gateway)


  _pyangbind_elements = OrderedDict([('id', id), ('interface', interface), ('subinterface', subinterface), ('associated_address_families', associated_address_families), ('mac_pinning', mac_pinning), ('irb_anycast_gateway', irb_anycast_gateway), ])


class yc_interface_openconfig_network_instance_l2__network_instances_network_instance_interfaces_interface(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/interfaces/interface. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: An interface associated with the network instance
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__config','__state',)

  _yang_name = 'interface'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'interfaces', 'interface']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /network_instances/network_instance/interfaces/interface/id (leafref)

    YANG Description: A reference to an identifier for this interface which
acts as a key for this list
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /network_instances/network_instance/interfaces/interface/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: A reference to an identifier for this interface which
acts as a key for this list
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/interfaces/interface/config (container)

    YANG Description: Configuration parameters relating to the associated
interface
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/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 parameters relating to the associated
interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/interfaces/interface/state (container)

    YANG Description: Operational state parameters relating to the
associated interface
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/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 parameters relating to the
associated interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_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/network-instance', defining_module='openconfig-network-instance', 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_interfaces_openconfig_network_instance_l2__network_instances_network_instance_interfaces(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/interfaces. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The interfaces that are associated with this network
instance
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface',)

  _yang_name = 'interfaces'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__interface = YANGDynClass(base=YANGListType("id",yc_interface_openconfig_network_instance_l2__network_instances_network_instance_interfaces_interface, yang_name="interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'interfaces']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/interfaces/interface (list)

    YANG Description: An interface associated with the network instance
    """
    return self.__interface
      
  def _set_interface(self, v, load=False):
    """
    Setter method for interface, mapped from YANG variable /network_instances/network_instance/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: An interface associated with the network instance
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("id",yc_interface_openconfig_network_instance_l2__network_instances_network_instance_interfaces_interface, yang_name="interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='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/network-instance', defining_module='openconfig-network-instance', 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("id",yc_interface_openconfig_network_instance_l2__network_instances_network_instance_interfaces_interface, yang_name="interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='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/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__interface = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_interface(self):
    self.__interface = YANGDynClass(base=YANGListType("id",yc_interface_openconfig_network_instance_l2__network_instances_network_instance_interfaces_interface, yang_name="interface", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='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/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  interface = __builtin__.property(_get_interface, _set_interface)


  _pyangbind_elements = OrderedDict([('interface', interface), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_route_limits_route_limit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/route-limits/route-limit/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration options relating to the route limit.
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi','__maximum','__warning_only','__alarm_threshold',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},), is_leaf=True, yang_name="afi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__maximum = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maximum", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__warning_only = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="warning-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__alarm_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="alarm-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'route-limits', 'route-limit', 'config']

  def _get_afi(self):
    """
    Getter method for afi, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/config/afi (identityref)

    YANG Description: The address family for which the route limit applies.
    """
    return self.__afi
      
  def _set_afi(self, v, load=False):
    """
    Setter method for afi, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/config/afi (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi() directly.

    YANG Description: The address family for which the route limit applies.
    """
    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': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},), is_leaf=True, yang_name="afi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},), is_leaf=True, yang_name="afi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__afi = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi(self):
    self.__afi = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},), is_leaf=True, yang_name="afi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_maximum(self):
    """
    Getter method for maximum, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/config/maximum (uint32)

    YANG Description: The maximum number of routes for the address family. The
system should not install more than maximum number of
prefixes into the RIB unless the warning-only leaf is specified.
    """
    return self.__maximum
      
  def _set_maximum(self, v, load=False):
    """
    Setter method for maximum, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/config/maximum (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_maximum is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_maximum() directly.

    YANG Description: The maximum number of routes for the address family. The
system should not install more than maximum number of
prefixes into the RIB unless the warning-only leaf is specified.
    """
    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="maximum", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """maximum 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="maximum", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__maximum = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_maximum(self):
    self.__maximum = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maximum", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_warning_only(self):
    """
    Getter method for warning_only, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/config/warning_only (boolean)

    YANG Description: When specified, the route limit specified is considered only as
a warning - and routes should continue to be installed into the
RIB over the limit specified in the maximum leaf.
    """
    return self.__warning_only
      
  def _set_warning_only(self, v, load=False):
    """
    Setter method for warning_only, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/config/warning_only (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_only is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_only() directly.

    YANG Description: When specified, the route limit specified is considered only as
a warning - and routes should continue to be installed into the
RIB over the limit specified in the maximum leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="warning-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_only must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="warning-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__warning_only = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_only(self):
    self.__warning_only = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="warning-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_alarm_threshold(self):
    """
    Getter method for alarm_threshold, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/config/alarm_threshold (uint32)

    YANG Description: When specified, an alarm should be generated when the threshold
number of installed routes is reached.
    """
    return self.__alarm_threshold
      
  def _set_alarm_threshold(self, v, load=False):
    """
    Setter method for alarm_threshold, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/config/alarm_threshold (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_alarm_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_alarm_threshold() directly.

    YANG Description: When specified, an alarm should be generated when the threshold
number of installed routes is reached.
    """
    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="alarm-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """alarm_threshold 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="alarm-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__alarm_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_alarm_threshold(self):
    self.__alarm_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="alarm-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)

  afi = __builtin__.property(_get_afi, _set_afi)
  maximum = __builtin__.property(_get_maximum, _set_maximum)
  warning_only = __builtin__.property(_get_warning_only, _set_warning_only)
  alarm_threshold = __builtin__.property(_get_alarm_threshold, _set_alarm_threshold)


  _pyangbind_elements = OrderedDict([('afi', afi), ('maximum', maximum), ('warning_only', warning_only), ('alarm_threshold', alarm_threshold), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_route_limits_route_limit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/route-limits/route-limit/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 route limit.
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi','__maximum','__warning_only','__alarm_threshold','__threshold_exceeded','__installed_routes',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},), is_leaf=True, yang_name="afi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__maximum = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maximum", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__warning_only = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="warning-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__alarm_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="alarm-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__threshold_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="threshold-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__installed_routes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="installed-routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'route-limits', 'route-limit', 'state']

  def _get_afi(self):
    """
    Getter method for afi, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/state/afi (identityref)

    YANG Description: The address family for which the route limit applies.
    """
    return self.__afi
      
  def _set_afi(self, v, load=False):
    """
    Setter method for afi, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/state/afi (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi() directly.

    YANG Description: The address family for which the route limit applies.
    """
    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': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},), is_leaf=True, yang_name="afi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},), is_leaf=True, yang_name="afi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__afi = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi(self):
    self.__afi = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},), is_leaf=True, yang_name="afi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_maximum(self):
    """
    Getter method for maximum, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/state/maximum (uint32)

    YANG Description: The maximum number of routes for the address family. The
system should not install more than maximum number of
prefixes into the RIB unless the warning-only leaf is specified.
    """
    return self.__maximum
      
  def _set_maximum(self, v, load=False):
    """
    Setter method for maximum, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/state/maximum (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_maximum is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_maximum() directly.

    YANG Description: The maximum number of routes for the address family. The
system should not install more than maximum number of
prefixes into the RIB unless the warning-only leaf is specified.
    """
    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="maximum", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """maximum 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="maximum", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__maximum = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_maximum(self):
    self.__maximum = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maximum", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_warning_only(self):
    """
    Getter method for warning_only, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/state/warning_only (boolean)

    YANG Description: When specified, the route limit specified is considered only as
a warning - and routes should continue to be installed into the
RIB over the limit specified in the maximum leaf.
    """
    return self.__warning_only
      
  def _set_warning_only(self, v, load=False):
    """
    Setter method for warning_only, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/state/warning_only (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_warning_only is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_warning_only() directly.

    YANG Description: When specified, the route limit specified is considered only as
a warning - and routes should continue to be installed into the
RIB over the limit specified in the maximum leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="warning-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """warning_only must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="warning-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__warning_only = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_warning_only(self):
    self.__warning_only = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="warning-only", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_alarm_threshold(self):
    """
    Getter method for alarm_threshold, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/state/alarm_threshold (uint32)

    YANG Description: When specified, an alarm should be generated when the threshold
number of installed routes is reached.
    """
    return self.__alarm_threshold
      
  def _set_alarm_threshold(self, v, load=False):
    """
    Setter method for alarm_threshold, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/state/alarm_threshold (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_alarm_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_alarm_threshold() directly.

    YANG Description: When specified, an alarm should be generated when the threshold
number of installed routes is reached.
    """
    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="alarm-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """alarm_threshold 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="alarm-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__alarm_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_alarm_threshold(self):
    self.__alarm_threshold = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="alarm-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_threshold_exceeded(self):
    """
    Getter method for threshold_exceeded, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/state/threshold_exceeded (boolean)

    YANG Description: This leaf should be set to true in the case that the threshold
number of routes has been exceeded.
    """
    return self.__threshold_exceeded
      
  def _set_threshold_exceeded(self, v, load=False):
    """
    Setter method for threshold_exceeded, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/state/threshold_exceeded (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_threshold_exceeded is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_threshold_exceeded() directly.

    YANG Description: This leaf should be set to true in the case that the threshold
number of routes has been exceeded.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="threshold-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """threshold_exceeded must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="threshold-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__threshold_exceeded = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_threshold_exceeded(self):
    self.__threshold_exceeded = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="threshold-exceeded", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_installed_routes(self):
    """
    Getter method for installed_routes, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/state/installed_routes (uint32)

    YANG Description: The current number of routes installed for the address family.
    """
    return self.__installed_routes
      
  def _set_installed_routes(self, v, load=False):
    """
    Setter method for installed_routes, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/state/installed_routes (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_installed_routes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_installed_routes() directly.

    YANG Description: The current number of routes installed for the address family.
    """
    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="installed-routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """installed_routes 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="installed-routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__installed_routes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_installed_routes(self):
    self.__installed_routes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="installed-routes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  afi = __builtin__.property(_get_afi)
  maximum = __builtin__.property(_get_maximum)
  warning_only = __builtin__.property(_get_warning_only)
  alarm_threshold = __builtin__.property(_get_alarm_threshold)
  threshold_exceeded = __builtin__.property(_get_threshold_exceeded)
  installed_routes = __builtin__.property(_get_installed_routes)


  _pyangbind_elements = OrderedDict([('afi', afi), ('maximum', maximum), ('warning_only', warning_only), ('alarm_threshold', alarm_threshold), ('threshold_exceeded', threshold_exceeded), ('installed_routes', installed_routes), ])


class yc_route_limit_openconfig_network_instance_l2__network_instances_network_instance_route_limits_route_limit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/route-limits/route-limit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A route limit applying to a particular address family.
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi','__config','__state',)

  _yang_name = 'route-limit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_route_limits_route_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_route_limits_route_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'route-limits', 'route-limit']

  def _get_afi(self):
    """
    Getter method for afi, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/afi (leafref)

    YANG Description: Reference to the address family for which the route
limit is being applied.
    """
    return self.__afi
      
  def _set_afi(self, v, load=False):
    """
    Setter method for afi, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/afi (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi() directly.

    YANG Description: Reference to the address family for which the route
limit is being applied.
    """
    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="afi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__afi = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi(self):
    self.__afi = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/config (container)

    YANG Description: Configuration options relating to the route limit.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/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 options relating to the route limit.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_route_limits_route_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_route_limits_route_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_route_limits_route_limit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/state (container)

    YANG Description: Operational state parameters relating to the route limit.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit/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 route limit.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_route_limits_route_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_route_limits_route_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_route_limits_route_limit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  afi = __builtin__.property(_get_afi, _set_afi)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('afi', afi), ('config', config), ('state', state), ])


class yc_route_limits_openconfig_network_instance_l2__network_instances_network_instance_route_limits(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/route-limits. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration and operational state relating to the
maximum number of routes for the address family that
should be allowed within the Layer 3 network instance.

When the specified value is reached, no further prefixes
should be installed into the system's RIB from this network
instance unless the warning only leaf is set. In this case,
new routes should still be installed. If a alarm threshold
is specified, then this should be used to generate
alarms via telemetry for the network instance.
  """
  __slots__ = ('_path_helper', '_extmethods', '__route_limit',)

  _yang_name = 'route-limits'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__route_limit = YANGDynClass(base=YANGListType("afi",yc_route_limit_openconfig_network_instance_l2__network_instances_network_instance_route_limits_route_limit, yang_name="route-limit", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi', extensions=None), is_container='list', yang_name="route-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'route-limits']

  def _get_route_limit(self):
    """
    Getter method for route_limit, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit (list)

    YANG Description: A route limit applying to a particular address family.
    """
    return self.__route_limit
      
  def _set_route_limit(self, v, load=False):
    """
    Setter method for route_limit, mapped from YANG variable /network_instances/network_instance/route_limits/route_limit (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_route_limit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_route_limit() directly.

    YANG Description: A route limit applying to a particular address family.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("afi",yc_route_limit_openconfig_network_instance_l2__network_instances_network_instance_route_limits_route_limit, yang_name="route-limit", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi', extensions=None), is_container='list', yang_name="route-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """route_limit must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("afi",yc_route_limit_openconfig_network_instance_l2__network_instances_network_instance_route_limits_route_limit, yang_name="route-limit", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi', extensions=None), is_container='list', yang_name="route-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__route_limit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_route_limit(self):
    self.__route_limit = YANGDynClass(base=YANGListType("afi",yc_route_limit_openconfig_network_instance_l2__network_instances_network_instance_route_limits_route_limit, yang_name="route-limit", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi', extensions=None), is_container='list', yang_name="route-limit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  route_limit = __builtin__.property(_get_route_limit, _set_route_limit)


  _pyangbind_elements = OrderedDict([('route_limit', route_limit), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_tables_table_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/tables/table/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
table
  """
  __slots__ = ('_path_helper', '_extmethods', '__protocol','__address_family',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__protocol = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__address_family = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},), is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'tables', 'table', 'config']

  def _get_protocol(self):
    """
    Getter method for protocol, mapped from YANG variable /network_instances/network_instance/tables/table/config/protocol (leafref)

    YANG Description: Reference to the protocol that the table is associated with.
    """
    return self.__protocol
      
  def _set_protocol(self, v, load=False):
    """
    Setter method for protocol, mapped from YANG variable /network_instances/network_instance/tables/table/config/protocol (leafref)
    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: Reference to the protocol that the table is associated with.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """protocol must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__protocol = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_protocol(self):
    self.__protocol = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_address_family(self):
    """
    Getter method for address_family, mapped from YANG variable /network_instances/network_instance/tables/table/config/address_family (identityref)

    YANG Description: The address family (IPv4, IPv6) of the table's entries
    """
    return self.__address_family
      
  def _set_address_family(self, v, load=False):
    """
    Setter method for address_family, mapped from YANG variable /network_instances/network_instance/tables/table/config/address_family (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address_family is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address_family() directly.

    YANG Description: The address family (IPv4, IPv6) of the table's entries
    """
    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': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},), is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address_family must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},), is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__address_family = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address_family(self):
    self.__address_family = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},), is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)

  protocol = __builtin__.property(_get_protocol, _set_protocol)
  address_family = __builtin__.property(_get_address_family, _set_address_family)


  _pyangbind_elements = OrderedDict([('protocol', protocol), ('address_family', address_family), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_tables_table_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/tables/table/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters related to the table
  """
  __slots__ = ('_path_helper', '_extmethods', '__protocol','__address_family',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__protocol = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__address_family = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},), is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'tables', 'table', 'state']

  def _get_protocol(self):
    """
    Getter method for protocol, mapped from YANG variable /network_instances/network_instance/tables/table/state/protocol (leafref)

    YANG Description: Reference to the protocol that the table is associated with.
    """
    return self.__protocol
      
  def _set_protocol(self, v, load=False):
    """
    Setter method for protocol, mapped from YANG variable /network_instances/network_instance/tables/table/state/protocol (leafref)
    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: Reference to the protocol that the table is associated with.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """protocol must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__protocol = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_protocol(self):
    self.__protocol = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_address_family(self):
    """
    Getter method for address_family, mapped from YANG variable /network_instances/network_instance/tables/table/state/address_family (identityref)

    YANG Description: The address family (IPv4, IPv6) of the table's entries
    """
    return self.__address_family
      
  def _set_address_family(self, v, load=False):
    """
    Setter method for address_family, mapped from YANG variable /network_instances/network_instance/tables/table/state/address_family (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address_family is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address_family() directly.

    YANG Description: The address family (IPv4, IPv6) of the table's entries
    """
    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': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},), is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address_family must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},), is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__address_family = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address_family(self):
    self.__address_family = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},), is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  protocol = __builtin__.property(_get_protocol)
  address_family = __builtin__.property(_get_address_family)


  _pyangbind_elements = OrderedDict([('protocol', protocol), ('address_family', address_family), ])


class yc_table_openconfig_network_instance_l2__network_instances_network_instance_tables_table(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/tables/table. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A network instance manages one or more forwarding or
routing tables. These may reflect a Layer 2 forwarding
information base, a Layer 3 routing table, or an MPLS
LFIB.

The table populated by a protocol within an instance is
identified by the protocol identifier (e.g., BGP, IS-IS)
and the address family (e.g., IPv4, IPv6) supported by
that protocol. Multiple instances of the same protocol
populate a single table -- such that
a single IS-IS or OSPF IPv4 table exists per network
instance.

An implementation is expected to create entries within
this list when the relevant protocol context is enabled.
i.e., when a BGP instance is created with IPv4 and IPv6
address families enabled, the protocol=BGP,
address-family=IPv4 table is created by the system.
  """
  __slots__ = ('_path_helper', '_extmethods', '__protocol','__address_family','__config','__state',)

  _yang_name = 'table'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__protocol = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__address_family = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_tables_table_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_tables_table_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'tables', 'table']

  def _get_protocol(self):
    """
    Getter method for protocol, mapped from YANG variable /network_instances/network_instance/tables/table/protocol (leafref)

    YANG Description: A reference to the protocol that populates
the table
    """
    return self.__protocol
      
  def _set_protocol(self, v, load=False):
    """
    Setter method for protocol, mapped from YANG variable /network_instances/network_instance/tables/table/protocol (leafref)
    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: A reference to the protocol that populates
the table
    """
    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="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """protocol must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__protocol = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_protocol(self):
    self.__protocol = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_address_family(self):
    """
    Getter method for address_family, mapped from YANG variable /network_instances/network_instance/tables/table/address_family (leafref)

    YANG Description: A reference to the address-family that the
table represents
    """
    return self.__address_family
      
  def _set_address_family(self, v, load=False):
    """
    Setter method for address_family, mapped from YANG variable /network_instances/network_instance/tables/table/address_family (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address_family is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address_family() directly.

    YANG Description: A reference to the address-family that the
table represents
    """
    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="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address_family must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__address_family = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address_family(self):
    self.__address_family = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/tables/table/config (container)

    YANG Description: Configuration parameters relating to the
table
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/tables/table/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
table
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_tables_table_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_tables_table_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_tables_table_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/tables/table/state (container)

    YANG Description: State parameters related to the table
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/tables/table/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 parameters related to the table
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_tables_table_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_tables_table_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_tables_table_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  protocol = __builtin__.property(_get_protocol, _set_protocol)
  address_family = __builtin__.property(_get_address_family, _set_address_family)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('protocol', protocol), ('address_family', address_family), ('config', config), ('state', state), ])


class yc_tables_openconfig_network_instance_l2__network_instances_network_instance_tables(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/tables. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The routing tables that are managed by this network
instance
  """
  __slots__ = ('_path_helper', '_extmethods', '__table',)

  _yang_name = 'tables'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__table = YANGDynClass(base=YANGListType("protocol address_family",yc_table_openconfig_network_instance_l2__network_instances_network_instance_tables_table, yang_name="table", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='protocol address-family', extensions=None), is_container='list', yang_name="table", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'tables']

  def _get_table(self):
    """
    Getter method for table, mapped from YANG variable /network_instances/network_instance/tables/table (list)

    YANG Description: A network instance manages one or more forwarding or
routing tables. These may reflect a Layer 2 forwarding
information base, a Layer 3 routing table, or an MPLS
LFIB.

The table populated by a protocol within an instance is
identified by the protocol identifier (e.g., BGP, IS-IS)
and the address family (e.g., IPv4, IPv6) supported by
that protocol. Multiple instances of the same protocol
populate a single table -- such that
a single IS-IS or OSPF IPv4 table exists per network
instance.

An implementation is expected to create entries within
this list when the relevant protocol context is enabled.
i.e., when a BGP instance is created with IPv4 and IPv6
address families enabled, the protocol=BGP,
address-family=IPv4 table is created by the system.
    """
    return self.__table
      
  def _set_table(self, v, load=False):
    """
    Setter method for table, mapped from YANG variable /network_instances/network_instance/tables/table (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_table is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_table() directly.

    YANG Description: A network instance manages one or more forwarding or
routing tables. These may reflect a Layer 2 forwarding
information base, a Layer 3 routing table, or an MPLS
LFIB.

The table populated by a protocol within an instance is
identified by the protocol identifier (e.g., BGP, IS-IS)
and the address family (e.g., IPv4, IPv6) supported by
that protocol. Multiple instances of the same protocol
populate a single table -- such that
a single IS-IS or OSPF IPv4 table exists per network
instance.

An implementation is expected to create entries within
this list when the relevant protocol context is enabled.
i.e., when a BGP instance is created with IPv4 and IPv6
address families enabled, the protocol=BGP,
address-family=IPv4 table is created by the system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("protocol address_family",yc_table_openconfig_network_instance_l2__network_instances_network_instance_tables_table, yang_name="table", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='protocol address-family', extensions=None), is_container='list', yang_name="table", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """table must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("protocol address_family",yc_table_openconfig_network_instance_l2__network_instances_network_instance_tables_table, yang_name="table", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='protocol address-family', extensions=None), is_container='list', yang_name="table", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__table = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_table(self):
    self.__table = YANGDynClass(base=YANGListType("protocol address_family",yc_table_openconfig_network_instance_l2__network_instances_network_instance_tables_table, yang_name="table", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='protocol address-family', extensions=None), is_container='list', yang_name="table", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  table = __builtin__.property(_get_table, _set_table)


  _pyangbind_elements = OrderedDict([('table', table), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/connection-points/connection-point/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 Layer 2
network instance connection point
  """
  __slots__ = ('_path_helper', '_extmethods', '__connection_point_id',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__connection_point_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="connection-point-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'config']

  def _get_connection_point_id(self):
    """
    Getter method for connection_point_id, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/config/connection_point_id (string)

    YANG Description: An identifier for a connection point
    """
    return self.__connection_point_id
      
  def _set_connection_point_id(self, v, load=False):
    """
    Setter method for connection_point_id, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/config/connection_point_id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_connection_point_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_connection_point_id() directly.

    YANG Description: An identifier for a connection point
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="connection-point-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """connection_point_id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="connection-point-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)""",
        })

    self.__connection_point_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_connection_point_id(self):
    self.__connection_point_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="connection-point-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)

  connection_point_id = __builtin__.property(_get_connection_point_id, _set_connection_point_id)


  _pyangbind_elements = OrderedDict([('connection_point_id', connection_point_id), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/connection-points/connection-point/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 Layer 2
network instance connection point
  """
  __slots__ = ('_path_helper', '_extmethods', '__connection_point_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__connection_point_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="connection-point-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'state']

  def _get_connection_point_id(self):
    """
    Getter method for connection_point_id, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/state/connection_point_id (string)

    YANG Description: An identifier for a connection point
    """
    return self.__connection_point_id
      
  def _set_connection_point_id(self, v, load=False):
    """
    Setter method for connection_point_id, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/state/connection_point_id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_connection_point_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_connection_point_id() directly.

    YANG Description: An identifier for a connection point
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="connection-point-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """connection_point_id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="connection-point-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__connection_point_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_connection_point_id(self):
    self.__connection_point_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="connection-point-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)

  connection_point_id = __builtin__.property(_get_connection_point_id)


  _pyangbind_elements = OrderedDict([('connection_point_id', connection_point_id), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/connection-points/connection-point/endpoints/endpoint/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
endpoint
  """
  __slots__ = ('_path_helper', '_extmethods', '__endpoint_id','__precedence','__type',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__endpoint_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__precedence = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="precedence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LOCAL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:LOCAL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'REMOTE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:REMOTE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'endpoints', 'endpoint', 'config']

  def _get_endpoint_id(self):
    """
    Getter method for endpoint_id, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/config/endpoint_id (string)

    YANG Description: An identifier for the endpoint
    """
    return self.__endpoint_id
      
  def _set_endpoint_id(self, v, load=False):
    """
    Setter method for endpoint_id, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/config/endpoint_id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint_id() directly.

    YANG Description: An identifier for the endpoint
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="endpoint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """endpoint_id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)""",
        })

    self.__endpoint_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_endpoint_id(self):
    self.__endpoint_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_precedence(self):
    """
    Getter method for precedence, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/config/precedence (uint16)

    YANG Description: The precedence of the endpoint - the lowest precendence
viable endpoint will be utilised as the active endpoint
within a connection
    """
    return self.__precedence
      
  def _set_precedence(self, v, load=False):
    """
    Setter method for precedence, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/config/precedence (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_precedence is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_precedence() directly.

    YANG Description: The precedence of the endpoint - the lowest precendence
viable endpoint will be utilised as the active endpoint
within a connection
    """
    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="precedence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """precedence 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="precedence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__precedence = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_precedence(self):
    self.__precedence = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="precedence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/config/type (identityref)

    YANG Description: The type of endpoint that is referred to by the current
endpoint
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/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: The type of endpoint that is referred to by the current
endpoint
    """
    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={'LOCAL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:LOCAL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'REMOTE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:REMOTE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LOCAL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:LOCAL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'REMOTE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:REMOTE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-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/network-instance', defining_module='openconfig-network-instance', 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={'LOCAL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:LOCAL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'REMOTE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:REMOTE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)

  endpoint_id = __builtin__.property(_get_endpoint_id, _set_endpoint_id)
  precedence = __builtin__.property(_get_precedence, _set_precedence)
  type = __builtin__.property(_get_type, _set_type)


  _pyangbind_elements = OrderedDict([('endpoint_id', endpoint_id), ('precedence', precedence), ('type', type), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/connection-points/connection-point/endpoints/endpoint/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
endpoint
  """
  __slots__ = ('_path_helper', '_extmethods', '__endpoint_id','__precedence','__type','__active',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__endpoint_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__precedence = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="precedence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LOCAL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:LOCAL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'REMOTE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:REMOTE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__active = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="active", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'endpoints', 'endpoint', 'state']

  def _get_endpoint_id(self):
    """
    Getter method for endpoint_id, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/state/endpoint_id (string)

    YANG Description: An identifier for the endpoint
    """
    return self.__endpoint_id
      
  def _set_endpoint_id(self, v, load=False):
    """
    Setter method for endpoint_id, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/state/endpoint_id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint_id() directly.

    YANG Description: An identifier for the endpoint
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="endpoint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """endpoint_id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__endpoint_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_endpoint_id(self):
    self.__endpoint_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_precedence(self):
    """
    Getter method for precedence, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/state/precedence (uint16)

    YANG Description: The precedence of the endpoint - the lowest precendence
viable endpoint will be utilised as the active endpoint
within a connection
    """
    return self.__precedence
      
  def _set_precedence(self, v, load=False):
    """
    Setter method for precedence, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/state/precedence (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_precedence is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_precedence() directly.

    YANG Description: The precedence of the endpoint - the lowest precendence
viable endpoint will be utilised as the active endpoint
within a connection
    """
    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="precedence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """precedence 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="precedence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__precedence = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_precedence(self):
    self.__precedence = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="precedence", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/state/type (identityref)

    YANG Description: The type of endpoint that is referred to by the current
endpoint
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/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: The type of endpoint that is referred to by the current
endpoint
    """
    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={'LOCAL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:LOCAL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'REMOTE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:REMOTE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LOCAL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:LOCAL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'REMOTE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:REMOTE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-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/network-instance', defining_module='openconfig-network-instance', 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={'LOCAL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:LOCAL': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'REMOTE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:REMOTE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_active(self):
    """
    Getter method for active, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/state/active (boolean)

    YANG Description: When the backup endpoint is active, the value of this
parameter is set to true
    """
    return self.__active
      
  def _set_active(self, v, load=False):
    """
    Setter method for active, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/state/active (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_active is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_active() directly.

    YANG Description: When the backup endpoint is active, the value of this
parameter is set to true
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="active", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """active must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="active", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__active = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_active(self):
    self.__active = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="active", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  endpoint_id = __builtin__.property(_get_endpoint_id)
  precedence = __builtin__.property(_get_precedence)
  type = __builtin__.property(_get_type)
  active = __builtin__.property(_get_active)


  _pyangbind_elements = OrderedDict([('endpoint_id', endpoint_id), ('precedence', precedence), ('type', type), ('active', active), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_local_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/connection-points/connection-point/endpoints/endpoint/local/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 local
endpoint
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface','__subinterface','__site_id','__site_label_block_offset','__site_label_block_size',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__site_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="site-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__site_label_block_offset = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="site-label-block-offset", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__site_label_block_size = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="site-label-block-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'endpoints', 'endpoint', 'local', 'config']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/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 /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/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 /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_site_id(self):
    """
    Getter method for site_id, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/config/site_id (uint16)

    YANG Description: The VE ID as defined in RFC4761 (VPLS) or CE ID as defined in
RFC6624 (l2vpn) to uniquely identify this endpoint (site) as part
of the BGP discovery of remote endpoints for layer 2 services.
    """
    return self.__site_id
      
  def _set_site_id(self, v, load=False):
    """
    Setter method for site_id, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/config/site_id (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_site_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_site_id() directly.

    YANG Description: The VE ID as defined in RFC4761 (VPLS) or CE ID as defined in
RFC6624 (l2vpn) to uniquely identify this endpoint (site) as part
of the BGP discovery of remote endpoints for layer 2 services.
    """
    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="site-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """site_id 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="site-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__site_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_site_id(self):
    self.__site_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="site-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_site_label_block_offset(self):
    """
    Getter method for site_label_block_offset, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/config/site_label_block_offset (uint16)

    YANG Description: The VPLS label block offset that is signaled with the 'site-id'.
    """
    return self.__site_label_block_offset
      
  def _set_site_label_block_offset(self, v, load=False):
    """
    Setter method for site_label_block_offset, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/config/site_label_block_offset (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_site_label_block_offset is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_site_label_block_offset() directly.

    YANG Description: The VPLS label block offset that is signaled with the 'site-id'.
    """
    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="site-label-block-offset", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """site_label_block_offset 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="site-label-block-offset", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__site_label_block_offset = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_site_label_block_offset(self):
    self.__site_label_block_offset = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="site-label-block-offset", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_site_label_block_size(self):
    """
    Getter method for site_label_block_size, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/config/site_label_block_size (uint16)

    YANG Description: The VPLS label block size that is signaled with the 'site-id'.
    """
    return self.__site_label_block_size
      
  def _set_site_label_block_size(self, v, load=False):
    """
    Setter method for site_label_block_size, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/config/site_label_block_size (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_site_label_block_size is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_site_label_block_size() directly.

    YANG Description: The VPLS label block size that is signaled with the 'site-id'.
    """
    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="site-label-block-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """site_label_block_size 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="site-label-block-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__site_label_block_size = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_site_label_block_size(self):
    self.__site_label_block_size = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="site-label-block-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

  interface = __builtin__.property(_get_interface, _set_interface)
  subinterface = __builtin__.property(_get_subinterface, _set_subinterface)
  site_id = __builtin__.property(_get_site_id, _set_site_id)
  site_label_block_offset = __builtin__.property(_get_site_label_block_offset, _set_site_label_block_offset)
  site_label_block_size = __builtin__.property(_get_site_label_block_size, _set_site_label_block_size)


  _pyangbind_elements = OrderedDict([('interface', interface), ('subinterface', subinterface), ('site_id', site_id), ('site_label_block_offset', site_label_block_offset), ('site_label_block_size', site_label_block_size), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_local_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/connection-points/connection-point/endpoints/endpoint/local/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
local endpoint
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface','__subinterface','__site_id','__site_label_block_offset','__site_label_block_size',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__site_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="site-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__site_label_block_offset = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="site-label-block-offset", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__site_label_block_size = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="site-label-block-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'endpoints', 'endpoint', 'local', 'state']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/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 /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/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 /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_site_id(self):
    """
    Getter method for site_id, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/state/site_id (uint16)

    YANG Description: The VE ID as defined in RFC4761 (VPLS) or CE ID as defined in
RFC6624 (l2vpn) to uniquely identify this endpoint (site) as part
of the BGP discovery of remote endpoints for layer 2 services.
    """
    return self.__site_id
      
  def _set_site_id(self, v, load=False):
    """
    Setter method for site_id, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/state/site_id (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_site_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_site_id() directly.

    YANG Description: The VE ID as defined in RFC4761 (VPLS) or CE ID as defined in
RFC6624 (l2vpn) to uniquely identify this endpoint (site) as part
of the BGP discovery of remote endpoints for layer 2 services.
    """
    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="site-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """site_id 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="site-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__site_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_site_id(self):
    self.__site_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="site-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_site_label_block_offset(self):
    """
    Getter method for site_label_block_offset, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/state/site_label_block_offset (uint16)

    YANG Description: The VPLS label block offset that is signaled with the 'site-id'.
    """
    return self.__site_label_block_offset
      
  def _set_site_label_block_offset(self, v, load=False):
    """
    Setter method for site_label_block_offset, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/state/site_label_block_offset (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_site_label_block_offset is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_site_label_block_offset() directly.

    YANG Description: The VPLS label block offset that is signaled with the 'site-id'.
    """
    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="site-label-block-offset", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """site_label_block_offset 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="site-label-block-offset", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__site_label_block_offset = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_site_label_block_offset(self):
    self.__site_label_block_offset = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="site-label-block-offset", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_site_label_block_size(self):
    """
    Getter method for site_label_block_size, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/state/site_label_block_size (uint16)

    YANG Description: The VPLS label block size that is signaled with the 'site-id'.
    """
    return self.__site_label_block_size
      
  def _set_site_label_block_size(self, v, load=False):
    """
    Setter method for site_label_block_size, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/state/site_label_block_size (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_site_label_block_size is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_site_label_block_size() directly.

    YANG Description: The VPLS label block size that is signaled with the 'site-id'.
    """
    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="site-label-block-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """site_label_block_size 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="site-label-block-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__site_label_block_size = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_site_label_block_size(self):
    self.__site_label_block_size = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="site-label-block-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  interface = __builtin__.property(_get_interface)
  subinterface = __builtin__.property(_get_subinterface)
  site_id = __builtin__.property(_get_site_id)
  site_label_block_offset = __builtin__.property(_get_site_label_block_offset)
  site_label_block_size = __builtin__.property(_get_site_label_block_size)


  _pyangbind_elements = OrderedDict([('interface', interface), ('subinterface', subinterface), ('site_id', site_id), ('site_label_block_offset', site_label_block_offset), ('site_label_block_size', site_label_block_size), ])


class yc_local__openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_local(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/connection-points/connection-point/endpoints/endpoint/local. 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 a local interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'local'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_local_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_local_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'endpoints', 'endpoint', 'local']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/config (container)

    YANG Description: Configuration parameters relating to a local
endpoint
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/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 local
endpoint
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_local_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_local_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_local_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/state (container)

    YANG Description: Operational state parameters relating to a
local endpoint
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local/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
local endpoint
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_local_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_local_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_local_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_remote_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/connection-points/connection-point/endpoints/endpoint/remote/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 remote
endpoint
  """
  __slots__ = ('_path_helper', '_extmethods', '__remote_system','__virtual_circuit_identifier','__site_id',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__remote_system = 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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-system", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    self.__virtual_circuit_identifier = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="virtual-circuit-identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__site_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="site-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'endpoints', 'endpoint', 'remote', 'config']

  def _get_remote_system(self):
    """
    Getter method for remote_system, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/remote/config/remote_system (oc-inet:ip-address)

    YANG Description: The IP address of the device which hosts the
remote end-point
    """
    return self.__remote_system
      
  def _set_remote_system(self, v, load=False):
    """
    Setter method for remote_system, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/remote/config/remote_system (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_remote_system is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_remote_system() directly.

    YANG Description: The IP address of the device which hosts the
remote end-point
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-system", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """remote_system must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-system", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)""",
        })

    self.__remote_system = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_remote_system(self):
    self.__remote_system = 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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-system", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)


  def _get_virtual_circuit_identifier(self):
    """
    Getter method for virtual_circuit_identifier, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/remote/config/virtual_circuit_identifier (uint32)

    YANG Description: The virtual-circuit identifier that identifies the
connection at the remote end-point
    """
    return self.__virtual_circuit_identifier
      
  def _set_virtual_circuit_identifier(self, v, load=False):
    """
    Setter method for virtual_circuit_identifier, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/remote/config/virtual_circuit_identifier (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_virtual_circuit_identifier is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_virtual_circuit_identifier() directly.

    YANG Description: The virtual-circuit identifier that identifies the
connection at the remote end-point
    """
    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="virtual-circuit-identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """virtual_circuit_identifier 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="virtual-circuit-identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__virtual_circuit_identifier = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_virtual_circuit_identifier(self):
    self.__virtual_circuit_identifier = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="virtual-circuit-identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_site_id(self):
    """
    Getter method for site_id, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/remote/config/site_id (uint16)

    YANG Description: Identifies remote sites. When BGP discovery is used this
is the customer edge identifier
    """
    return self.__site_id
      
  def _set_site_id(self, v, load=False):
    """
    Setter method for site_id, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/remote/config/site_id (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_site_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_site_id() directly.

    YANG Description: Identifies remote sites. When BGP discovery is used this
is the customer edge identifier
    """
    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="site-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """site_id 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="site-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__site_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_site_id(self):
    self.__site_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="site-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

  remote_system = __builtin__.property(_get_remote_system, _set_remote_system)
  virtual_circuit_identifier = __builtin__.property(_get_virtual_circuit_identifier, _set_virtual_circuit_identifier)
  site_id = __builtin__.property(_get_site_id, _set_site_id)


  _pyangbind_elements = OrderedDict([('remote_system', remote_system), ('virtual_circuit_identifier', virtual_circuit_identifier), ('site_id', site_id), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_remote_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/connection-points/connection-point/endpoints/endpoint/remote/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 remote endpoint
  """
  __slots__ = ('_path_helper', '_extmethods', '__remote_system','__virtual_circuit_identifier','__site_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__remote_system = 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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-system", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__virtual_circuit_identifier = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="virtual-circuit-identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__site_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="site-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'endpoints', 'endpoint', 'remote', 'state']

  def _get_remote_system(self):
    """
    Getter method for remote_system, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/remote/state/remote_system (oc-inet:ip-address)

    YANG Description: The IP address of the device which hosts the
remote end-point
    """
    return self.__remote_system
      
  def _set_remote_system(self, v, load=False):
    """
    Setter method for remote_system, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/remote/state/remote_system (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_remote_system is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_remote_system() directly.

    YANG Description: The IP address of the device which hosts the
remote end-point
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-system", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """remote_system must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-system", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__remote_system = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_remote_system(self):
    self.__remote_system = 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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-system", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_virtual_circuit_identifier(self):
    """
    Getter method for virtual_circuit_identifier, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/remote/state/virtual_circuit_identifier (uint32)

    YANG Description: The virtual-circuit identifier that identifies the
connection at the remote end-point
    """
    return self.__virtual_circuit_identifier
      
  def _set_virtual_circuit_identifier(self, v, load=False):
    """
    Setter method for virtual_circuit_identifier, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/remote/state/virtual_circuit_identifier (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_virtual_circuit_identifier is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_virtual_circuit_identifier() directly.

    YANG Description: The virtual-circuit identifier that identifies the
connection at the remote end-point
    """
    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="virtual-circuit-identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """virtual_circuit_identifier 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="virtual-circuit-identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__virtual_circuit_identifier = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_virtual_circuit_identifier(self):
    self.__virtual_circuit_identifier = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="virtual-circuit-identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_site_id(self):
    """
    Getter method for site_id, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/remote/state/site_id (uint16)

    YANG Description: Identifies remote sites. When BGP discovery is used this
is the customer edge identifier
    """
    return self.__site_id
      
  def _set_site_id(self, v, load=False):
    """
    Setter method for site_id, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/remote/state/site_id (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_site_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_site_id() directly.

    YANG Description: Identifies remote sites. When BGP discovery is used this
is the customer edge identifier
    """
    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="site-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """site_id 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="site-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__site_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_site_id(self):
    self.__site_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="site-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  remote_system = __builtin__.property(_get_remote_system)
  virtual_circuit_identifier = __builtin__.property(_get_virtual_circuit_identifier)
  site_id = __builtin__.property(_get_site_id)


  _pyangbind_elements = OrderedDict([('remote_system', remote_system), ('virtual_circuit_identifier', virtual_circuit_identifier), ('site_id', site_id), ])


class yc_remote_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_remote(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/connection-points/connection-point/endpoints/endpoint/remote. 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 a remote interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'remote'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_remote_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_remote_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'endpoints', 'endpoint', 'remote']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/remote/config (container)

    YANG Description: Configuration parameters relating to a remote
endpoint
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/remote/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 remote
endpoint
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_remote_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_remote_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_remote_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/remote/state (container)

    YANG Description: Operational state parameters relating to
a remote endpoint
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/remote/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 remote endpoint
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_remote_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_remote_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_remote_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/connection-points/connection-point/endpoints/endpoint/vxlan/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 overlay tunnel
endpoints of the network instance
  """
  __slots__ = ('_path_helper', '_extmethods', '__description','__enabled','__source_interface',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__description = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__source_interface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'endpoints', 'endpoint', 'vxlan', 'config']

  def _get_description(self):
    """
    Getter method for description, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/config/description (string)

    YANG Description: Description to identify the VXLAN tunnel endpoint It
is a unique name identifying the overlay endpoint
    """
    return self.__description
      
  def _set_description(self, v, load=False):
    """
    Setter method for description, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/config/description (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_description is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_description() directly.

    YANG Description: Description to identify the VXLAN tunnel endpoint It
is a unique name identifying the overlay endpoint
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """description must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)""",
        })

    self.__description = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_description(self):
    self.__description = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/config/enabled (boolean)

    YANG Description: VXLAN tunnel endpoint administrative state.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: VXLAN tunnel endpoint administrative state.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_source_interface(self):
    """
    Getter method for source_interface, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/config/source_interface (string)

    YANG Description: Source loopback interface name
    """
    return self.__source_interface
      
  def _set_source_interface(self, v, load=False):
    """
    Setter method for source_interface, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/config/source_interface (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_interface is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_interface() directly.

    YANG Description: Source loopback interface name
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="source-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_interface must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)""",
        })

    self.__source_interface = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_interface(self):
    self.__source_interface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)

  description = __builtin__.property(_get_description, _set_description)
  enabled = __builtin__.property(_get_enabled, _set_enabled)
  source_interface = __builtin__.property(_get_source_interface, _set_source_interface)


  _pyangbind_elements = OrderedDict([('description', description), ('enabled', enabled), ('source_interface', source_interface), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/connection-points/connection-point/endpoints/endpoint/vxlan/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to the overlay tunnel endpoints of
the network instance
  """
  __slots__ = ('_path_helper', '_extmethods', '__description','__enabled','__source_interface',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__description = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__source_interface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'endpoints', 'endpoint', 'vxlan', 'state']

  def _get_description(self):
    """
    Getter method for description, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/state/description (string)

    YANG Description: Description to identify the VXLAN tunnel endpoint It
is a unique name identifying the overlay endpoint
    """
    return self.__description
      
  def _set_description(self, v, load=False):
    """
    Setter method for description, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/state/description (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_description is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_description() directly.

    YANG Description: Description to identify the VXLAN tunnel endpoint It
is a unique name identifying the overlay endpoint
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """description must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__description = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_description(self):
    self.__description = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/state/enabled (boolean)

    YANG Description: VXLAN tunnel endpoint administrative state.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: VXLAN tunnel endpoint administrative state.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_source_interface(self):
    """
    Getter method for source_interface, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/state/source_interface (string)

    YANG Description: Source loopback interface name
    """
    return self.__source_interface
      
  def _set_source_interface(self, v, load=False):
    """
    Setter method for source_interface, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/state/source_interface (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source_interface is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source_interface() directly.

    YANG Description: Source loopback interface name
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="source-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_interface must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__source_interface = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source_interface(self):
    self.__source_interface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)

  description = __builtin__.property(_get_description)
  enabled = __builtin__.property(_get_enabled)
  source_interface = __builtin__.property(_get_source_interface)


  _pyangbind_elements = OrderedDict([('description', description), ('enabled', enabled), ('source_interface', source_interface), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_peers_endpoint_peer_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/connection-points/connection-point/endpoints/endpoint/vxlan/endpoint-peers/endpoint-peer/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Container for state parameters related to this VTEP peer
  """
  __slots__ = ('_path_helper', '_extmethods', '__peer_address','__peer_state','__uptime','__control_plane_vnis','__router_mac',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__peer_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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__peer_state = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UP': {}, 'DOWN': {}},), is_leaf=True, yang_name="peer-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__uptime = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="uptime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__control_plane_vnis = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="control-plane-vnis", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__router_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="router-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', 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 ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'endpoints', 'endpoint', 'vxlan', 'endpoint-peers', 'endpoint-peer', 'state']

  def _get_peer_address(self):
    """
    Getter method for peer_address, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_peers/endpoint_peer/state/peer_address (oc-inet:ip-address)

    YANG Description: IP address of the remote VXLAN Tunnel Endpoint peer
    """
    return self.__peer_address
      
  def _set_peer_address(self, v, load=False):
    """
    Setter method for peer_address, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_peers/endpoint_peer/state/peer_address (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_address() directly.

    YANG Description: IP address of the remote VXLAN Tunnel Endpoint peer
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_address must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__peer_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_address(self):
    self.__peer_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}'}),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}|:))'}),], is_leaf=True, yang_name="peer-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_peer_state(self):
    """
    Getter method for peer_state, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_peers/endpoint_peer/state/peer_state (enumeration)

    YANG Description: State parameters related to the remote VTEP peer state
    """
    return self.__peer_state
      
  def _set_peer_state(self, v, load=False):
    """
    Setter method for peer_state, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_peers/endpoint_peer/state/peer_state (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_state() directly.

    YANG Description: State parameters related to the remote VTEP peer state
    """
    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={'UP': {}, 'DOWN': {}},), is_leaf=True, yang_name="peer-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_state must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UP': {}, 'DOWN': {}},), is_leaf=True, yang_name="peer-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__peer_state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_state(self):
    self.__peer_state = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UP': {}, 'DOWN': {}},), is_leaf=True, yang_name="peer-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_uptime(self):
    """
    Getter method for uptime, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_peers/endpoint_peer/state/uptime (oc-types:timeticks64)

    YANG Description: This timestamp indicates the time elapsed relative to the moment that
the remote VTEP peer was discovered.
    """
    return self.__uptime
      
  def _set_uptime(self, v, load=False):
    """
    Setter method for uptime, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_peers/endpoint_peer/state/uptime (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_uptime is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_uptime() directly.

    YANG Description: This timestamp indicates the time elapsed relative to the moment that
the remote VTEP peer was discovered.
    """
    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="uptime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """uptime must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="uptime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__uptime = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_uptime(self):
    self.__uptime = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="uptime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_control_plane_vnis(self):
    """
    Getter method for control_plane_vnis, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_peers/endpoint_peer/state/control_plane_vnis (string)

    YANG Description: The control-plane VNIs are all of the VNIs that are discovered by the
control-plane behind this peer VTEP
    """
    return self.__control_plane_vnis
      
  def _set_control_plane_vnis(self, v, load=False):
    """
    Setter method for control_plane_vnis, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_peers/endpoint_peer/state/control_plane_vnis (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_control_plane_vnis is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_control_plane_vnis() directly.

    YANG Description: The control-plane VNIs are all of the VNIs that are discovered by the
control-plane behind this peer VTEP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="control-plane-vnis", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """control_plane_vnis must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="control-plane-vnis", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__control_plane_vnis = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_control_plane_vnis(self):
    self.__control_plane_vnis = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="control-plane-vnis", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_router_mac(self):
    """
    Getter method for router_mac, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_peers/endpoint_peer/state/router_mac (oc-yang:mac-address)

    YANG Description: MAC address of the remote VTEP
    """
    return self.__router_mac
      
  def _set_router_mac(self, v, load=False):
    """
    Setter method for router_mac, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_peers/endpoint_peer/state/router_mac (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_router_mac is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_router_mac() directly.

    YANG Description: MAC address of the remote VTEP
    """
    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="router-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """router_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="router-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)""",
        })

    self.__router_mac = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_router_mac(self):
    self.__router_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="router-mac", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)

  peer_address = __builtin__.property(_get_peer_address)
  peer_state = __builtin__.property(_get_peer_state)
  uptime = __builtin__.property(_get_uptime)
  control_plane_vnis = __builtin__.property(_get_control_plane_vnis)
  router_mac = __builtin__.property(_get_router_mac)


  _pyangbind_elements = OrderedDict([('peer_address', peer_address), ('peer_state', peer_state), ('uptime', uptime), ('control_plane_vnis', control_plane_vnis), ('router_mac', router_mac), ])


class yc_endpoint_peer_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_peers_endpoint_peer(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/connection-points/connection-point/endpoints/endpoint/vxlan/endpoint-peers/endpoint-peer. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of VTEP peers and associated state information
  """
  __slots__ = ('_path_helper', '_extmethods', '__peer_address','__state',)

  _yang_name = 'endpoint-peer'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__peer_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_peers_endpoint_peer_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'endpoints', 'endpoint', 'vxlan', 'endpoint-peers', 'endpoint-peer']

  def _get_peer_address(self):
    """
    Getter method for peer_address, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_peers/endpoint_peer/peer_address (leafref)

    YANG Description: IP address for the VTEP peer
    """
    return self.__peer_address
      
  def _set_peer_address(self, v, load=False):
    """
    Setter method for peer_address, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_peers/endpoint_peer/peer_address (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_address() directly.

    YANG Description: IP address for the VTEP peer
    """
    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="peer-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_address must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__peer_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_address(self):
    self.__peer_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="peer-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_peers/endpoint_peer/state (container)

    YANG Description: Container for state parameters related to this VTEP peer
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_peers/endpoint_peer/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: Container for state parameters related to this VTEP peer
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_peers_endpoint_peer_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_peers_endpoint_peer_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_peers_endpoint_peer_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  peer_address = __builtin__.property(_get_peer_address)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('peer_address', peer_address), ('state', state), ])


class yc_endpoint_peers_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_peers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/connection-points/connection-point/endpoints/endpoint/vxlan/endpoint-peers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top level container for state information related to peer VXLAN Tunnel
Endpoints(VTEPs) learned by the local VTEP in the default network
instance
  """
  __slots__ = ('_path_helper', '_extmethods', '__endpoint_peer',)

  _yang_name = 'endpoint-peers'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__endpoint_peer = YANGDynClass(base=YANGListType("peer_address",yc_endpoint_peer_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_peers_endpoint_peer, yang_name="endpoint-peer", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='peer-address', extensions=None), is_container='list', yang_name="endpoint-peer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'endpoints', 'endpoint', 'vxlan', 'endpoint-peers']

  def _get_endpoint_peer(self):
    """
    Getter method for endpoint_peer, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_peers/endpoint_peer (list)

    YANG Description: List of VTEP peers and associated state information
    """
    return self.__endpoint_peer
      
  def _set_endpoint_peer(self, v, load=False):
    """
    Setter method for endpoint_peer, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_peers/endpoint_peer (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint_peer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint_peer() directly.

    YANG Description: List of VTEP peers and associated state information
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("peer_address",yc_endpoint_peer_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_peers_endpoint_peer, yang_name="endpoint-peer", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='peer-address', extensions=None), is_container='list', yang_name="endpoint-peer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """endpoint_peer must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("peer_address",yc_endpoint_peer_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_peers_endpoint_peer, yang_name="endpoint-peer", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='peer-address', extensions=None), is_container='list', yang_name="endpoint-peer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__endpoint_peer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_endpoint_peer(self):
    self.__endpoint_peer = YANGDynClass(base=YANGListType("peer_address",yc_endpoint_peer_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_peers_endpoint_peer, yang_name="endpoint-peer", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='peer-address', extensions=None), is_container='list', yang_name="endpoint-peer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  endpoint_peer = __builtin__.property(_get_endpoint_peer)


  _pyangbind_elements = OrderedDict([('endpoint_peer', endpoint_peer), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_vnis_endpoint_vni_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/connection-points/connection-point/endpoints/endpoint/vxlan/endpoint-vnis/endpoint-vni/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Container for state parameters related to this L2VNI or L3VNI
  """
  __slots__ = ('_path_helper', '_extmethods', '__vni','__multidestination_traffic','__learning_mode','__vni_type','__vni_state','__svi_state','__bridge_domain','__l3_vrf_name',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__vni = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)
    self.__multidestination_traffic = 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}'}),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}|:))'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STATIC_INGRESS_REPLICATION': {}, 'BGP_INGRESS_REPLICATION': {}},),], is_leaf=True, yang_name="multidestination-traffic", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    self.__learning_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'CONTROL_PLANE': {'value': 0}, 'DATA_PLANE': {'value': 1}},), is_leaf=True, yang_name="learning-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:learning-mode', is_config=False)
    self.__vni_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'L2': {}, 'L3': {}},), is_leaf=True, yang_name="vni-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__vni_state = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UP': {}, 'DOWN': {}},), is_leaf=True, yang_name="vni-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__svi_state = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UP': {}, 'DOWN': {}},), is_leaf=True, yang_name="svi-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__bridge_domain = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bridge-domain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__l3_vrf_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="l3-vrf-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'endpoints', 'endpoint', 'vxlan', 'endpoint-vnis', 'endpoint-vni', 'state']

  def _get_vni(self):
    """
    Getter method for vni, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni/state/vni (oc-evpn-types:evi-id)

    YANG Description: L2VNI or L3VNI Identifier
    """
    return self.__vni
      
  def _set_vni(self, v, load=False):
    """
    Setter method for vni, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni/state/vni (oc-evpn-types:evi-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_vni is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_vni() directly.

    YANG Description: L2VNI or L3VNI Identifier
    """
    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': ['1..16777215']}), is_leaf=True, yang_name="vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """vni must be of a type compatible with oc-evpn-types:evi-id""",
          'defined-type': "oc-evpn-types:evi-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)""",
        })

    self.__vni = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_vni(self):
    self.__vni = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), restriction_dict={'range': ['1..16777215']}), is_leaf=True, yang_name="vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:evi-id', is_config=False)


  def _get_multidestination_traffic(self):
    """
    Getter method for multidestination_traffic, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni/state/multidestination_traffic (union)

    YANG Description: The data plane for overlays needs to handle the transport of
multidestination traffic. Multidestination traffic is typically
referred to as (BUM) which stands for broadcast, unknown unicast,
or multicast. The two most common methods that can accommodate this
replication and transport in the underlay are IP multicast and
ingress replication
(also called head-end replication or unicast mode).
    """
    return self.__multidestination_traffic
      
  def _set_multidestination_traffic(self, v, load=False):
    """
    Setter method for multidestination_traffic, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni/state/multidestination_traffic (union)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_multidestination_traffic is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_multidestination_traffic() directly.

    YANG Description: The data plane for overlays needs to handle the transport of
multidestination traffic. Multidestination traffic is typically
referred to as (BUM) which stands for broadcast, unknown unicast,
or multicast. The two most common methods that can accommodate this
replication and transport in the underlay are IP multicast and
ingress replication
(also called head-end replication or unicast mode).
    """
    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}'}),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}|:))'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STATIC_INGRESS_REPLICATION': {}, 'BGP_INGRESS_REPLICATION': {}},),], is_leaf=True, yang_name="multidestination-traffic", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """multidestination_traffic must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          '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}'}),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}|:))'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STATIC_INGRESS_REPLICATION': {}, 'BGP_INGRESS_REPLICATION': {}},),], is_leaf=True, yang_name="multidestination-traffic", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)""",
        })

    self.__multidestination_traffic = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_multidestination_traffic(self):
    self.__multidestination_traffic = 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}'}),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}|:))'}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'STATIC_INGRESS_REPLICATION': {}, 'BGP_INGRESS_REPLICATION': {}},),], is_leaf=True, yang_name="multidestination-traffic", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)


  def _get_learning_mode(self):
    """
    Getter method for learning_mode, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni/state/learning_mode (oc-evpn-types:learning-mode)

    YANG Description: Indicates whether the learning mode for this VNI is either
control-plane or data-plane
    """
    return self.__learning_mode
      
  def _set_learning_mode(self, v, load=False):
    """
    Setter method for learning_mode, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni/state/learning_mode (oc-evpn-types:learning-mode)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_learning_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_learning_mode() directly.

    YANG Description: Indicates whether the learning mode for this VNI is either
control-plane or data-plane
    """
    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={'CONTROL_PLANE': {'value': 0}, 'DATA_PLANE': {'value': 1}},), is_leaf=True, yang_name="learning-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:learning-mode', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """learning_mode must be of a type compatible with oc-evpn-types:learning-mode""",
          'defined-type': "oc-evpn-types:learning-mode",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'CONTROL_PLANE': {'value': 0}, 'DATA_PLANE': {'value': 1}},), is_leaf=True, yang_name="learning-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:learning-mode', is_config=False)""",
        })

    self.__learning_mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_learning_mode(self):
    self.__learning_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'CONTROL_PLANE': {'value': 0}, 'DATA_PLANE': {'value': 1}},), is_leaf=True, yang_name="learning-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-evpn-types:learning-mode', is_config=False)


  def _get_vni_type(self):
    """
    Getter method for vni_type, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni/state/vni_type (enumeration)

    YANG Description: The type of virtual network identfier
    """
    return self.__vni_type
      
  def _set_vni_type(self, v, load=False):
    """
    Setter method for vni_type, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni/state/vni_type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_vni_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_vni_type() directly.

    YANG Description: The type of virtual network identfier
    """
    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={'L2': {}, 'L3': {}},), is_leaf=True, yang_name="vni-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """vni_type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'L2': {}, 'L3': {}},), is_leaf=True, yang_name="vni-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__vni_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_vni_type(self):
    self.__vni_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'L2': {}, 'L3': {}},), is_leaf=True, yang_name="vni-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_vni_state(self):
    """
    Getter method for vni_state, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni/state/vni_state (enumeration)

    YANG Description: Operational state of the L2VNI or L3VNI
    """
    return self.__vni_state
      
  def _set_vni_state(self, v, load=False):
    """
    Setter method for vni_state, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni/state/vni_state (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_vni_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_vni_state() directly.

    YANG Description: Operational state of the L2VNI or L3VNI
    """
    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={'UP': {}, 'DOWN': {}},), is_leaf=True, yang_name="vni-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """vni_state must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UP': {}, 'DOWN': {}},), is_leaf=True, yang_name="vni-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__vni_state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_vni_state(self):
    self.__vni_state = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UP': {}, 'DOWN': {}},), is_leaf=True, yang_name="vni-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_svi_state(self):
    """
    Getter method for svi_state, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni/state/svi_state (enumeration)

    YANG Description: Operational status of the SVI mapped to the L3VNI that is used for
routing between subnets in the VXLAN fabric
    """
    return self.__svi_state
      
  def _set_svi_state(self, v, load=False):
    """
    Setter method for svi_state, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni/state/svi_state (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_svi_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_svi_state() directly.

    YANG Description: Operational status of the SVI mapped to the L3VNI that is used for
routing between subnets in the VXLAN fabric
    """
    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={'UP': {}, 'DOWN': {}},), is_leaf=True, yang_name="svi-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """svi_state must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UP': {}, 'DOWN': {}},), is_leaf=True, yang_name="svi-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__svi_state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_svi_state(self):
    self.__svi_state = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UP': {}, 'DOWN': {}},), is_leaf=True, yang_name="svi-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_bridge_domain(self):
    """
    Getter method for bridge_domain, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni/state/bridge_domain (uint32)

    YANG Description: This reflects the configured VLAN or Bridge Domain that maps to this
L2VNI in the VXLAN fabric
    """
    return self.__bridge_domain
      
  def _set_bridge_domain(self, v, load=False):
    """
    Setter method for bridge_domain, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni/state/bridge_domain (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bridge_domain is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bridge_domain() directly.

    YANG Description: This reflects the configured VLAN or Bridge Domain that maps to this
L2VNI in the VXLAN fabric
    """
    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="bridge-domain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bridge_domain 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="bridge-domain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__bridge_domain = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bridge_domain(self):
    self.__bridge_domain = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bridge-domain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_l3_vrf_name(self):
    """
    Getter method for l3_vrf_name, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni/state/l3_vrf_name (string)

    YANG Description: This refects the configured VRF instance that maps to this L3VNI
that is used for routing between subnets in the VXLAN fabric
    """
    return self.__l3_vrf_name
      
  def _set_l3_vrf_name(self, v, load=False):
    """
    Setter method for l3_vrf_name, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni/state/l3_vrf_name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_l3_vrf_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_l3_vrf_name() directly.

    YANG Description: This refects the configured VRF instance that maps to this L3VNI
that is used for routing between subnets in the VXLAN fabric
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="l3-vrf-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """l3_vrf_name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="l3-vrf-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__l3_vrf_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_l3_vrf_name(self):
    self.__l3_vrf_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="l3-vrf-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)

  vni = __builtin__.property(_get_vni)
  multidestination_traffic = __builtin__.property(_get_multidestination_traffic)
  learning_mode = __builtin__.property(_get_learning_mode)
  vni_type = __builtin__.property(_get_vni_type)
  vni_state = __builtin__.property(_get_vni_state)
  svi_state = __builtin__.property(_get_svi_state)
  bridge_domain = __builtin__.property(_get_bridge_domain)
  l3_vrf_name = __builtin__.property(_get_l3_vrf_name)


  _pyangbind_elements = OrderedDict([('vni', vni), ('multidestination_traffic', multidestination_traffic), ('learning_mode', learning_mode), ('vni_type', vni_type), ('vni_state', vni_state), ('svi_state', svi_state), ('bridge_domain', bridge_domain), ('l3_vrf_name', l3_vrf_name), ])


class yc_endpoint_vni_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_vnis_endpoint_vni(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/connection-points/connection-point/endpoints/endpoint/vxlan/endpoint-vnis/endpoint-vni. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of L2VNIs and L3VNIs learned on the local VTEP
  """
  __slots__ = ('_path_helper', '_extmethods', '__vni','__state',)

  _yang_name = 'endpoint-vni'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__vni = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_vnis_endpoint_vni_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'endpoints', 'endpoint', 'vxlan', 'endpoint-vnis', 'endpoint-vni']

  def _get_vni(self):
    """
    Getter method for vni, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni/vni (leafref)

    YANG Description: L2VNI or L3VNI Identifier
    """
    return self.__vni
      
  def _set_vni(self, v, load=False):
    """
    Setter method for vni, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni/vni (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_vni is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_vni() directly.

    YANG Description: L2VNI or L3VNI Identifier
    """
    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="vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """vni must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__vni = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_vni(self):
    self.__vni = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni/state (container)

    YANG Description: Container for state parameters related to this L2VNI or L3VNI
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni/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: Container for state parameters related to this L2VNI or L3VNI
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_vnis_endpoint_vni_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_vnis_endpoint_vni_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_vnis_endpoint_vni_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  vni = __builtin__.property(_get_vni)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('vni', vni), ('state', state), ])


class yc_endpoint_vnis_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_vnis(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/connection-points/connection-point/endpoints/endpoint/vxlan/endpoint-vnis. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top level container for state information related to Layer 2 virtual
network identifiers (L2VNIs) and Layer 3 virtual network identifiers
(L3VNIs) that are learned on the local VXLAN Tunnel End Point from
remote VTEPs in the default network instance
  """
  __slots__ = ('_path_helper', '_extmethods', '__endpoint_vni',)

  _yang_name = 'endpoint-vnis'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__endpoint_vni = YANGDynClass(base=YANGListType("vni",yc_endpoint_vni_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_vnis_endpoint_vni, yang_name="endpoint-vni", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='vni', extensions=None), is_container='list', yang_name="endpoint-vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'endpoints', 'endpoint', 'vxlan', 'endpoint-vnis']

  def _get_endpoint_vni(self):
    """
    Getter method for endpoint_vni, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni (list)

    YANG Description: List of L2VNIs and L3VNIs learned on the local VTEP
    """
    return self.__endpoint_vni
      
  def _set_endpoint_vni(self, v, load=False):
    """
    Setter method for endpoint_vni, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis/endpoint_vni (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint_vni is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint_vni() directly.

    YANG Description: List of L2VNIs and L3VNIs learned on the local VTEP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("vni",yc_endpoint_vni_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_vnis_endpoint_vni, yang_name="endpoint-vni", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='vni', extensions=None), is_container='list', yang_name="endpoint-vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """endpoint_vni must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("vni",yc_endpoint_vni_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_vnis_endpoint_vni, yang_name="endpoint-vni", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='vni', extensions=None), is_container='list', yang_name="endpoint-vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__endpoint_vni = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_endpoint_vni(self):
    self.__endpoint_vni = YANGDynClass(base=YANGListType("vni",yc_endpoint_vni_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_vnis_endpoint_vni, yang_name="endpoint-vni", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='vni', extensions=None), is_container='list', yang_name="endpoint-vni", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  endpoint_vni = __builtin__.property(_get_endpoint_vni)


  _pyangbind_elements = OrderedDict([('endpoint_vni', endpoint_vni), ])


class yc_vxlan_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/connection-points/connection-point/endpoints/endpoint/vxlan. 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 a VXLAN tunnel end-point interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__endpoint_peers','__endpoint_vnis',)

  _yang_name = 'vxlan'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__endpoint_peers = YANGDynClass(base=yc_endpoint_peers_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_peers, is_container='container', yang_name="endpoint-peers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__endpoint_vnis = YANGDynClass(base=yc_endpoint_vnis_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_vnis, is_container='container', yang_name="endpoint-vnis", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'endpoints', 'endpoint', 'vxlan']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/config (container)

    YANG Description: Configuration parameters relating to the overlay tunnel
endpoints of the network instance
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/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 overlay tunnel
endpoints of the network instance
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/state (container)

    YANG Description: State parameters relating to the overlay tunnel endpoints of
the network instance
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/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 parameters relating to the overlay tunnel endpoints of
the network instance
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_endpoint_peers(self):
    """
    Getter method for endpoint_peers, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_peers (container)

    YANG Description: Top level container for state information related to peer VXLAN Tunnel
Endpoints(VTEPs) learned by the local VTEP in the default network
instance
    """
    return self.__endpoint_peers
      
  def _set_endpoint_peers(self, v, load=False):
    """
    Setter method for endpoint_peers, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_peers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint_peers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint_peers() directly.

    YANG Description: Top level container for state information related to peer VXLAN Tunnel
Endpoints(VTEPs) learned by the local VTEP in the default network
instance
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_endpoint_peers_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_peers, is_container='container', yang_name="endpoint-peers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """endpoint_peers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_endpoint_peers_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_peers, is_container='container', yang_name="endpoint-peers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__endpoint_peers = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_endpoint_peers(self):
    self.__endpoint_peers = YANGDynClass(base=yc_endpoint_peers_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_peers, is_container='container', yang_name="endpoint-peers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_endpoint_vnis(self):
    """
    Getter method for endpoint_vnis, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis (container)

    YANG Description: Top level container for state information related to Layer 2 virtual
network identifiers (L2VNIs) and Layer 3 virtual network identifiers
(L3VNIs) that are learned on the local VXLAN Tunnel End Point from
remote VTEPs in the default network instance
    """
    return self.__endpoint_vnis
      
  def _set_endpoint_vnis(self, v, load=False):
    """
    Setter method for endpoint_vnis, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan/endpoint_vnis (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint_vnis is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint_vnis() directly.

    YANG Description: Top level container for state information related to Layer 2 virtual
network identifiers (L2VNIs) and Layer 3 virtual network identifiers
(L3VNIs) that are learned on the local VXLAN Tunnel End Point from
remote VTEPs in the default network instance
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_endpoint_vnis_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_vnis, is_container='container', yang_name="endpoint-vnis", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """endpoint_vnis must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_endpoint_vnis_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_vnis, is_container='container', yang_name="endpoint-vnis", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__endpoint_vnis = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_endpoint_vnis(self):
    self.__endpoint_vnis = YANGDynClass(base=yc_endpoint_vnis_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan_endpoint_vnis, is_container='container', yang_name="endpoint-vnis", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  endpoint_peers = __builtin__.property(_get_endpoint_peers, _set_endpoint_peers)
  endpoint_vnis = __builtin__.property(_get_endpoint_vnis, _set_endpoint_vnis)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('endpoint_peers', endpoint_peers), ('endpoint_vnis', endpoint_vnis), ])


class yc_endpoint_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/connection-points/connection-point/endpoints/endpoint. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A list of the endpoints (interfaces or remote
connection points that can be used for this
connection point). The active endpoint is selected
based on the precedence that it is configured
with
  """
  __slots__ = ('_path_helper', '_extmethods', '__endpoint_id','__config','__state','__local_','__remote','__vxlan',)

  _yang_name = 'endpoint'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__endpoint_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__local_ = YANGDynClass(base=yc_local__openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_local, is_container='container', yang_name="local", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__remote = YANGDynClass(base=yc_remote_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_remote, is_container='container', yang_name="remote", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__vxlan = YANGDynClass(base=yc_vxlan_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan, is_container='container', yang_name="vxlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'endpoints', 'endpoint']

  def _get_endpoint_id(self):
    """
    Getter method for endpoint_id, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/endpoint_id (leafref)

    YANG Description: A pointer to the configured identifier for the
endpoint
    """
    return self.__endpoint_id
      
  def _set_endpoint_id(self, v, load=False):
    """
    Setter method for endpoint_id, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/endpoint_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint_id() directly.

    YANG Description: A pointer to the configured identifier for the
endpoint
    """
    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="endpoint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """endpoint_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__endpoint_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_endpoint_id(self):
    self.__endpoint_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/config (container)

    YANG Description: Configuration parameters relating to the
endpoint
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/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
endpoint
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/state (container)

    YANG Description: Operational state parameters relating to the
endpoint
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/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
endpoint
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_local_(self):
    """
    Getter method for local_, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local (container)

    YANG Description: Configuration and operational state parameters
relating to a local interface
    """
    return self.__local_
      
  def _set_local_(self, v, load=False):
    """
    Setter method for local_, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/local (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_ is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_() directly.

    YANG Description: Configuration and operational state parameters
relating to a local interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_local__openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_local, is_container='container', yang_name="local", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_ must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_local__openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_local, is_container='container', yang_name="local", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__local_ = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_(self):
    self.__local_ = YANGDynClass(base=yc_local__openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_local, is_container='container', yang_name="local", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_remote(self):
    """
    Getter method for remote, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/remote (container)

    YANG Description: Configuration and operational state parameters
relating to a remote interface
    """
    return self.__remote
      
  def _set_remote(self, v, load=False):
    """
    Setter method for remote, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/remote (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_remote is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_remote() directly.

    YANG Description: Configuration and operational state parameters
relating to a remote interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_remote_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_remote, is_container='container', yang_name="remote", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """remote must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_remote_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_remote, is_container='container', yang_name="remote", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__remote = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_remote(self):
    self.__remote = YANGDynClass(base=yc_remote_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_remote, is_container='container', yang_name="remote", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_vxlan(self):
    """
    Getter method for vxlan, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan (container)

    YANG Description: Configuration and operational state parameters
relating to a VXLAN tunnel end-point interface
    """
    return self.__vxlan
      
  def _set_vxlan(self, v, load=False):
    """
    Setter method for vxlan, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint/vxlan (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_vxlan is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_vxlan() directly.

    YANG Description: Configuration and operational state parameters
relating to a VXLAN tunnel end-point interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_vxlan_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan, is_container='container', yang_name="vxlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """vxlan must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_vxlan_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan, is_container='container', yang_name="vxlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__vxlan = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_vxlan(self):
    self.__vxlan = YANGDynClass(base=yc_vxlan_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint_vxlan, is_container='container', yang_name="vxlan", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  endpoint_id = __builtin__.property(_get_endpoint_id, _set_endpoint_id)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  local_ = __builtin__.property(_get_local_, _set_local_)
  remote = __builtin__.property(_get_remote, _set_remote)
  vxlan = __builtin__.property(_get_vxlan, _set_vxlan)


  _pyangbind_elements = OrderedDict([('endpoint_id', endpoint_id), ('config', config), ('state', state), ('local_', local_), ('remote', remote), ('vxlan', vxlan), ])


class yc_endpoints_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/connection-points/connection-point/endpoints. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The set of endpoints which are grouped within the
connection point
  """
  __slots__ = ('_path_helper', '_extmethods', '__endpoint',)

  _yang_name = 'endpoints'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__endpoint = YANGDynClass(base=YANGListType("endpoint_id",yc_endpoint_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint, yang_name="endpoint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='endpoint-id', extensions=None), is_container='list', yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'connection-points', 'connection-point', 'endpoints']

  def _get_endpoint(self):
    """
    Getter method for endpoint, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint (list)

    YANG Description: A list of the endpoints (interfaces or remote
connection points that can be used for this
connection point). The active endpoint is selected
based on the precedence that it is configured
with
    """
    return self.__endpoint
      
  def _set_endpoint(self, v, load=False):
    """
    Setter method for endpoint, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints/endpoint (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint() directly.

    YANG Description: A list of the endpoints (interfaces or remote
connection points that can be used for this
connection point). The active endpoint is selected
based on the precedence that it is configured
with
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("endpoint_id",yc_endpoint_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint, yang_name="endpoint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='endpoint-id', extensions=None), is_container='list', yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """endpoint must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("endpoint_id",yc_endpoint_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint, yang_name="endpoint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='endpoint-id', extensions=None), is_container='list', yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__endpoint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_endpoint(self):
    self.__endpoint = YANGDynClass(base=YANGListType("endpoint_id",yc_endpoint_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints_endpoint, yang_name="endpoint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='endpoint-id', extensions=None), is_container='list', yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  endpoint = __builtin__.property(_get_endpoint, _set_endpoint)


  _pyangbind_elements = OrderedDict([('endpoint', endpoint), ])


class yc_connection_point_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/connection-points/connection-point. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A connection point within a Layer 2 network instance.
Each connection-point consists of a set of interfaces
only one of which is active at any one time. Other than
the specification of whether an interface is local
(i.e., exists within this network-instance), or remote,
all configuration and state parameters are common
  """
  __slots__ = ('_path_helper', '_extmethods', '__connection_point_id','__config','__state','__endpoints',)

  _yang_name = 'connection-point'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__connection_point_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="connection-point-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__endpoints = YANGDynClass(base=yc_endpoints_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints, is_container='container', yang_name="endpoints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'connection-points', 'connection-point']

  def _get_connection_point_id(self):
    """
    Getter method for connection_point_id, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/connection_point_id (leafref)

    YANG Description: A locally significant reference for the
connection-point
    """
    return self.__connection_point_id
      
  def _set_connection_point_id(self, v, load=False):
    """
    Setter method for connection_point_id, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/connection_point_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_connection_point_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_connection_point_id() directly.

    YANG Description: A locally significant reference for the
connection-point
    """
    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="connection-point-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """connection_point_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="connection-point-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__connection_point_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_connection_point_id(self):
    self.__connection_point_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="connection-point-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/config (container)

    YANG Description: Configuration parameters relating to a Layer 2
network instance connection point
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/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 Layer 2
network instance connection point
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_connection_points_connection_point_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_connection_points_connection_point_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/state (container)

    YANG Description: Operational state parameters relating to a Layer 2
network instance connection point
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/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 Layer 2
network instance connection point
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_connection_points_connection_point_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_connection_points_connection_point_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_endpoints(self):
    """
    Getter method for endpoints, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints (container)

    YANG Description: The set of endpoints which are grouped within the
connection point
    """
    return self.__endpoints
      
  def _set_endpoints(self, v, load=False):
    """
    Setter method for endpoints, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point/endpoints (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoints is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoints() directly.

    YANG Description: The set of endpoints which are grouped within the
connection point
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_endpoints_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints, is_container='container', yang_name="endpoints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """endpoints must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_endpoints_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints, is_container='container', yang_name="endpoints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__endpoints = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_endpoints(self):
    self.__endpoints = YANGDynClass(base=yc_endpoints_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point_endpoints, is_container='container', yang_name="endpoints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  connection_point_id = __builtin__.property(_get_connection_point_id, _set_connection_point_id)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  endpoints = __builtin__.property(_get_endpoints, _set_endpoints)


  _pyangbind_elements = OrderedDict([('connection_point_id', connection_point_id), ('config', config), ('state', state), ('endpoints', endpoints), ])


class yc_connection_points_openconfig_network_instance_l2__network_instances_network_instance_connection_points(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/connection-points. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The set of connection points within a forwarding
instance
  """
  __slots__ = ('_path_helper', '_extmethods', '__connection_point',)

  _yang_name = 'connection-points'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__connection_point = YANGDynClass(base=YANGListType("connection_point_id",yc_connection_point_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point, yang_name="connection-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='connection-point-id', extensions=None), is_container='list', yang_name="connection-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'connection-points']

  def _get_connection_point(self):
    """
    Getter method for connection_point, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point (list)

    YANG Description: A connection point within a Layer 2 network instance.
Each connection-point consists of a set of interfaces
only one of which is active at any one time. Other than
the specification of whether an interface is local
(i.e., exists within this network-instance), or remote,
all configuration and state parameters are common
    """
    return self.__connection_point
      
  def _set_connection_point(self, v, load=False):
    """
    Setter method for connection_point, mapped from YANG variable /network_instances/network_instance/connection_points/connection_point (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_connection_point is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_connection_point() directly.

    YANG Description: A connection point within a Layer 2 network instance.
Each connection-point consists of a set of interfaces
only one of which is active at any one time. Other than
the specification of whether an interface is local
(i.e., exists within this network-instance), or remote,
all configuration and state parameters are common
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("connection_point_id",yc_connection_point_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point, yang_name="connection-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='connection-point-id', extensions=None), is_container='list', yang_name="connection-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """connection_point must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("connection_point_id",yc_connection_point_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point, yang_name="connection-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='connection-point-id', extensions=None), is_container='list', yang_name="connection-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__connection_point = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_connection_point(self):
    self.__connection_point = YANGDynClass(base=YANGListType("connection_point_id",yc_connection_point_openconfig_network_instance_l2__network_instances_network_instance_connection_points_connection_point, yang_name="connection-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='connection-point-id', extensions=None), is_container='list', yang_name="connection-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  connection_point = __builtin__.property(_get_connection_point, _set_connection_point)


  _pyangbind_elements = OrderedDict([('connection_point', connection_point), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_global_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/global/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top level global MPLS configuration
  """
  __slots__ = ('_path_helper', '_extmethods', '__null_label','__ttl_propagation','__pw_encapsulation',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__null_label = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:IMPLICIT"), is_leaf=True, yang_name="null-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__ttl_propagation = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="ttl-propagation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__pw_encapsulation = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="pw-encapsulation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'global', 'config']

  def _get_null_label(self):
    """
    Getter method for null_label, mapped from YANG variable /network_instances/network_instance/mpls/global/config/null_label (identityref)

    YANG Description: The null-label type used, implicit or explicit
    """
    return self.__null_label
      
  def _set_null_label(self, v, load=False):
    """
    Setter method for null_label, mapped from YANG variable /network_instances/network_instance/mpls/global/config/null_label (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_null_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_null_label() directly.

    YANG Description: The null-label type used, implicit or explicit
    """
    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': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:IMPLICIT"), is_leaf=True, yang_name="null-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """null_label must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:IMPLICIT"), is_leaf=True, yang_name="null-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__null_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_null_label(self):
    self.__null_label = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:IMPLICIT"), is_leaf=True, yang_name="null-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_ttl_propagation(self):
    """
    Getter method for ttl_propagation, mapped from YANG variable /network_instances/network_instance/mpls/global/config/ttl_propagation (boolean)

    YANG Description: Enables TTL propagation across the MPLS domain.
When ttl-propagation is set to true, the IP TTL
is copied into the MPLS header TTL when pushing
a label to an IP packet. If false, the IP TTL is
not copied into the MPLS header TTL and, therefore,
the IP TTL is not updated in the MPLS domain.
    """
    return self.__ttl_propagation
      
  def _set_ttl_propagation(self, v, load=False):
    """
    Setter method for ttl_propagation, mapped from YANG variable /network_instances/network_instance/mpls/global/config/ttl_propagation (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ttl_propagation is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ttl_propagation() directly.

    YANG Description: Enables TTL propagation across the MPLS domain.
When ttl-propagation is set to true, the IP TTL
is copied into the MPLS header TTL when pushing
a label to an IP packet. If false, the IP TTL is
not copied into the MPLS header TTL and, therefore,
the IP TTL is not updated in the MPLS domain.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="ttl-propagation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ttl_propagation must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="ttl-propagation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__ttl_propagation = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ttl_propagation(self):
    self.__ttl_propagation = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="ttl-propagation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_pw_encapsulation(self):
    """
    Getter method for pw_encapsulation, mapped from YANG variable /network_instances/network_instance/mpls/global/config/pw_encapsulation (identityref)

    YANG Description: The PDU type to use with pseudowires.
    """
    return self.__pw_encapsulation
      
  def _set_pw_encapsulation(self, v, load=False):
    """
    Setter method for pw_encapsulation, mapped from YANG variable /network_instances/network_instance/mpls/global/config/pw_encapsulation (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pw_encapsulation is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pw_encapsulation() directly.

    YANG Description: The PDU type to use with pseudowires.
    """
    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={'PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="pw-encapsulation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pw_encapsulation must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="pw-encapsulation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__pw_encapsulation = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_pw_encapsulation(self):
    self.__pw_encapsulation = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="pw-encapsulation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)

  null_label = __builtin__.property(_get_null_label, _set_null_label)
  ttl_propagation = __builtin__.property(_get_ttl_propagation, _set_ttl_propagation)
  pw_encapsulation = __builtin__.property(_get_pw_encapsulation, _set_pw_encapsulation)


  _pyangbind_elements = OrderedDict([('null_label', null_label), ('ttl_propagation', ttl_propagation), ('pw_encapsulation', pw_encapsulation), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_global_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/global/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top level global MPLS state
  """
  __slots__ = ('_path_helper', '_extmethods', '__null_label','__ttl_propagation','__pw_encapsulation',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__null_label = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:IMPLICIT"), is_leaf=True, yang_name="null-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__ttl_propagation = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="ttl-propagation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__pw_encapsulation = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="pw-encapsulation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'global', 'state']

  def _get_null_label(self):
    """
    Getter method for null_label, mapped from YANG variable /network_instances/network_instance/mpls/global/state/null_label (identityref)

    YANG Description: The null-label type used, implicit or explicit
    """
    return self.__null_label
      
  def _set_null_label(self, v, load=False):
    """
    Setter method for null_label, mapped from YANG variable /network_instances/network_instance/mpls/global/state/null_label (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_null_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_null_label() directly.

    YANG Description: The null-label type used, implicit or explicit
    """
    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': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:IMPLICIT"), is_leaf=True, yang_name="null-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """null_label must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:IMPLICIT"), is_leaf=True, yang_name="null-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__null_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_null_label(self):
    self.__null_label = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IMPLICIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:IMPLICIT"), is_leaf=True, yang_name="null-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_ttl_propagation(self):
    """
    Getter method for ttl_propagation, mapped from YANG variable /network_instances/network_instance/mpls/global/state/ttl_propagation (boolean)

    YANG Description: Enables TTL propagation across the MPLS domain.
When ttl-propagation is set to true, the IP TTL
is copied into the MPLS header TTL when pushing
a label to an IP packet. If false, the IP TTL is
not copied into the MPLS header TTL and, therefore,
the IP TTL is not updated in the MPLS domain.
    """
    return self.__ttl_propagation
      
  def _set_ttl_propagation(self, v, load=False):
    """
    Setter method for ttl_propagation, mapped from YANG variable /network_instances/network_instance/mpls/global/state/ttl_propagation (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ttl_propagation is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ttl_propagation() directly.

    YANG Description: Enables TTL propagation across the MPLS domain.
When ttl-propagation is set to true, the IP TTL
is copied into the MPLS header TTL when pushing
a label to an IP packet. If false, the IP TTL is
not copied into the MPLS header TTL and, therefore,
the IP TTL is not updated in the MPLS domain.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="ttl-propagation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ttl_propagation must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="ttl-propagation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__ttl_propagation = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ttl_propagation(self):
    self.__ttl_propagation = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="ttl-propagation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_pw_encapsulation(self):
    """
    Getter method for pw_encapsulation, mapped from YANG variable /network_instances/network_instance/mpls/global/state/pw_encapsulation (identityref)

    YANG Description: The PDU type to use with pseudowires.
    """
    return self.__pw_encapsulation
      
  def _set_pw_encapsulation(self, v, load=False):
    """
    Setter method for pw_encapsulation, mapped from YANG variable /network_instances/network_instance/mpls/global/state/pw_encapsulation (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pw_encapsulation is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pw_encapsulation() directly.

    YANG Description: The PDU type to use with pseudowires.
    """
    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={'PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="pw-encapsulation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pw_encapsulation must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="pw-encapsulation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__pw_encapsulation = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_pw_encapsulation(self):
    self.__pw_encapsulation = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PWE_ETHERNET_TAGGED_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PWE_ETHERNET_RAW_MODE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="pw-encapsulation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)

  null_label = __builtin__.property(_get_null_label)
  ttl_propagation = __builtin__.property(_get_ttl_propagation)
  pw_encapsulation = __builtin__.property(_get_pw_encapsulation)


  _pyangbind_elements = OrderedDict([('null_label', null_label), ('ttl_propagation', ttl_propagation), ('pw_encapsulation', pw_encapsulation), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_global_interface_attributes_interface_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/global/interface-attributes/interface/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters related to MPLS interfaces:
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id','__mpls_enabled',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=True)
    self.__mpls_enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="mpls-enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'global', 'interface-attributes', 'interface', 'config']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/interface/config/interface_id (oc-if:interface-id)

    YANG Description: Indentifier for the MPLS interface
    """
    return self.__interface_id
      
  def _set_interface_id(self, v, load=False):
    """
    Setter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/interface/config/interface_id (oc-if:interface-id)
    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: Indentifier for the MPLS 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_id must be of a type compatible with oc-if:interface-id""",
          'defined-type': "oc-if:interface-id",
          '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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=True)


  def _get_mpls_enabled(self):
    """
    Getter method for mpls_enabled, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/interface/config/mpls_enabled (boolean)

    YANG Description: Enable MPLS forwarding on this interface
    """
    return self.__mpls_enabled
      
  def _set_mpls_enabled(self, v, load=False):
    """
    Setter method for mpls_enabled, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/interface/config/mpls_enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mpls_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mpls_enabled() directly.

    YANG Description: Enable MPLS forwarding on this interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="mpls-enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mpls_enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="mpls-enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__mpls_enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mpls_enabled(self):
    self.__mpls_enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="mpls-enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  interface_id = __builtin__.property(_get_interface_id, _set_interface_id)
  mpls_enabled = __builtin__.property(_get_mpls_enabled, _set_mpls_enabled)


  _pyangbind_elements = OrderedDict([('interface_id', interface_id), ('mpls_enabled', mpls_enabled), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_global_interface_attributes_interface_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/global/interface-attributes/interface/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters related to TE interfaces
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id','__mpls_enabled',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=False)
    self.__mpls_enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="mpls-enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'global', 'interface-attributes', 'interface', 'state']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/interface/state/interface_id (oc-if:interface-id)

    YANG Description: Indentifier for the MPLS interface
    """
    return self.__interface_id
      
  def _set_interface_id(self, v, load=False):
    """
    Setter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/interface/state/interface_id (oc-if:interface-id)
    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: Indentifier for the MPLS 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_id must be of a type compatible with oc-if:interface-id""",
          'defined-type': "oc-if:interface-id",
          '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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=False)


  def _get_mpls_enabled(self):
    """
    Getter method for mpls_enabled, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/interface/state/mpls_enabled (boolean)

    YANG Description: Enable MPLS forwarding on this interface
    """
    return self.__mpls_enabled
      
  def _set_mpls_enabled(self, v, load=False):
    """
    Setter method for mpls_enabled, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/interface/state/mpls_enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mpls_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mpls_enabled() directly.

    YANG Description: Enable MPLS forwarding on this interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="mpls-enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mpls_enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="mpls-enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__mpls_enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mpls_enabled(self):
    self.__mpls_enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="mpls-enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  interface_id = __builtin__.property(_get_interface_id)
  mpls_enabled = __builtin__.property(_get_mpls_enabled)


  _pyangbind_elements = OrderedDict([('interface_id', interface_id), ('mpls_enabled', mpls_enabled), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_global_interface_attributes_interface_interface_ref_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/global/interface-attributes/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'global', 'interface-attributes', 'interface', 'interface-ref', 'config']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/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 /network_instances/network_instance/mpls/global/interface_attributes/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/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 /network_instances/network_instance/mpls/global/interface_attributes/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_global_interface_attributes_interface_interface_ref_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/global/interface-attributes/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'global', 'interface-attributes', 'interface', 'interface-ref', 'state']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/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 /network_instances/network_instance/mpls/global/interface_attributes/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/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 /network_instances/network_instance/mpls/global/interface_attributes/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_global_interface_attributes_interface_interface_ref(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/global/interface-attributes/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
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'interface-ref'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'global', 'interface-attributes', 'interface', 'interface-ref']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/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 /network_instances/network_instance/mpls/global/interface_attributes/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_network_instance_l2__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/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 /network_instances/network_instance/mpls/global/interface_attributes/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_network_instance_l2__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_interface_openconfig_network_instance_l2__network_instances_network_instance_mpls_global_interface_attributes_interface(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/global/interface-attributes/interface. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of TE interfaces
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id','__config','__state','__interface_ref',)

  _yang_name = 'interface'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__interface_ref = YANGDynClass(base=yc_interface_ref_openconfig_network_instance_l2__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'global', 'interface-attributes', 'interface']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/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 /network_instances/network_instance/mpls/global/interface_attributes/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/interface/config (container)

    YANG Description: Configuration parameters related to MPLS interfaces:
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/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 related to MPLS interfaces:
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/interface/state (container)

    YANG Description: State parameters related to TE interfaces
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/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: State parameters related to TE interfaces
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_interface_ref(self):
    """
    Getter method for interface_ref, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/interface/interface_ref (container)

    YANG Description: Reference to an interface or subinterface
    """
    return self.__interface_ref
      
  def _set_interface_ref(self, v, load=False):
    """
    Setter method for interface_ref, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/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
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interface_ref_openconfig_network_instance_l2__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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)


  _pyangbind_elements = OrderedDict([('interface_id', interface_id), ('config', config), ('state', state), ('interface_ref', interface_ref), ])


class yc_interface_attributes_openconfig_network_instance_l2__network_instances_network_instance_mpls_global_interface_attributes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/global/interface-attributes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Parameters related to MPLS interfaces
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface',)

  _yang_name = 'interface-attributes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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_network_instance_l2__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'global', 'interface-attributes']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/interface (list)

    YANG Description: List of TE interfaces
    """
    return self.__interface
      
  def _set_interface(self, v, load=False):
    """
    Setter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes/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 TE interfaces
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("interface_id",yc_interface_openconfig_network_instance_l2__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_global_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  interface = __builtin__.property(_get_interface, _set_interface)


  _pyangbind_elements = OrderedDict([('interface', interface), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_global_reserved_label_blocks_reserved_label_block_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/global/reserved-label-blocks/reserved-label-block/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 label block.
  """
  __slots__ = ('_path_helper', '_extmethods', '__local_id','__lower_bound','__upper_bound',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__local_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__lower_bound = 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="lower-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)
    self.__upper_bound = 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="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'global', 'reserved-label-blocks', 'reserved-label-block', 'config']

  def _get_local_id(self):
    """
    Getter method for local_id, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks/reserved_label_block/config/local_id (string)

    YANG Description: A local identifier for the global label block allocation.
    """
    return self.__local_id
      
  def _set_local_id(self, v, load=False):
    """
    Setter method for local_id, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks/reserved_label_block/config/local_id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_id() directly.

    YANG Description: A local identifier for the global label block allocation.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)""",
        })

    self.__local_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_id(self):
    self.__local_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_lower_bound(self):
    """
    Getter method for lower_bound, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks/reserved_label_block/config/lower_bound (oc-mplst:mpls-label)

    YANG Description: Lower bound of the global label block. The block is defined to include
this label.
    """
    return self.__lower_bound
      
  def _set_lower_bound(self, v, load=False):
    """
    Setter method for lower_bound, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks/reserved_label_block/config/lower_bound (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lower_bound is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lower_bound() directly.

    YANG Description: Lower bound of the global label block. The block is defined to include
this 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': ['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="lower-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lower_bound must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="lower-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)""",
        })

    self.__lower_bound = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lower_bound(self):
    self.__lower_bound = 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="lower-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)


  def _get_upper_bound(self):
    """
    Getter method for upper_bound, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks/reserved_label_block/config/upper_bound (oc-mplst:mpls-label)

    YANG Description: Upper bound for the global label block. The block is defined to include
this label.
    """
    return self.__upper_bound
      
  def _set_upper_bound(self, v, load=False):
    """
    Setter method for upper_bound, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks/reserved_label_block/config/upper_bound (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_upper_bound is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_upper_bound() directly.

    YANG Description: Upper bound for the global label block. The block is defined to include
this 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': ['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="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """upper_bound must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)""",
        })

    self.__upper_bound = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_upper_bound(self):
    self.__upper_bound = 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="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)

  local_id = __builtin__.property(_get_local_id, _set_local_id)
  lower_bound = __builtin__.property(_get_lower_bound, _set_lower_bound)
  upper_bound = __builtin__.property(_get_upper_bound, _set_upper_bound)


  _pyangbind_elements = OrderedDict([('local_id', local_id), ('lower_bound', lower_bound), ('upper_bound', upper_bound), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_global_reserved_label_blocks_reserved_label_block_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/global/reserved-label-blocks/reserved-label-block/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to the label block.
  """
  __slots__ = ('_path_helper', '_extmethods', '__local_id','__lower_bound','__upper_bound',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__local_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__lower_bound = 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="lower-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    self.__upper_bound = 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="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', 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 ['network-instances', 'network-instance', 'mpls', 'global', 'reserved-label-blocks', 'reserved-label-block', 'state']

  def _get_local_id(self):
    """
    Getter method for local_id, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks/reserved_label_block/state/local_id (string)

    YANG Description: A local identifier for the global label block allocation.
    """
    return self.__local_id
      
  def _set_local_id(self, v, load=False):
    """
    Setter method for local_id, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks/reserved_label_block/state/local_id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_id() directly.

    YANG Description: A local identifier for the global label block allocation.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__local_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_id(self):
    self.__local_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_lower_bound(self):
    """
    Getter method for lower_bound, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks/reserved_label_block/state/lower_bound (oc-mplst:mpls-label)

    YANG Description: Lower bound of the global label block. The block is defined to include
this label.
    """
    return self.__lower_bound
      
  def _set_lower_bound(self, v, load=False):
    """
    Setter method for lower_bound, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks/reserved_label_block/state/lower_bound (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lower_bound is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lower_bound() directly.

    YANG Description: Lower bound of the global label block. The block is defined to include
this 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': ['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="lower-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lower_bound must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="lower-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)""",
        })

    self.__lower_bound = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lower_bound(self):
    self.__lower_bound = 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="lower-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)


  def _get_upper_bound(self):
    """
    Getter method for upper_bound, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks/reserved_label_block/state/upper_bound (oc-mplst:mpls-label)

    YANG Description: Upper bound for the global label block. The block is defined to include
this label.
    """
    return self.__upper_bound
      
  def _set_upper_bound(self, v, load=False):
    """
    Setter method for upper_bound, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks/reserved_label_block/state/upper_bound (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_upper_bound is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_upper_bound() directly.

    YANG Description: Upper bound for the global label block. The block is defined to include
this 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': ['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="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """upper_bound must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)""",
        })

    self.__upper_bound = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_upper_bound(self):
    self.__upper_bound = 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="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)

  local_id = __builtin__.property(_get_local_id)
  lower_bound = __builtin__.property(_get_lower_bound)
  upper_bound = __builtin__.property(_get_upper_bound)


  _pyangbind_elements = OrderedDict([('local_id', local_id), ('lower_bound', lower_bound), ('upper_bound', upper_bound), ])


class yc_reserved_label_block_openconfig_network_instance_l2__network_instances_network_instance_mpls_global_reserved_label_blocks_reserved_label_block(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/global/reserved-label-blocks/reserved-label-block. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A range of labels starting with the start-label up to and including
the end label that should be allocated for use by a specific protocol.
  """
  __slots__ = ('_path_helper', '_extmethods', '__local_id','__config','__state',)

  _yang_name = 'reserved-label-block'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__local_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_global_reserved_label_blocks_reserved_label_block_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_global_reserved_label_blocks_reserved_label_block_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'global', 'reserved-label-blocks', 'reserved-label-block']

  def _get_local_id(self):
    """
    Getter method for local_id, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks/reserved_label_block/local_id (leafref)

    YANG Description: A reference to a unique local identifier for this label block.
    """
    return self.__local_id
      
  def _set_local_id(self, v, load=False):
    """
    Setter method for local_id, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks/reserved_label_block/local_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_id() directly.

    YANG Description: A reference to a unique local identifier for this label block.
    """
    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="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__local_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_id(self):
    self.__local_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks/reserved_label_block/config (container)

    YANG Description: Configuration parameters relating to the label block.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks/reserved_label_block/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 label block.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_global_reserved_label_blocks_reserved_label_block_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_global_reserved_label_blocks_reserved_label_block_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_global_reserved_label_blocks_reserved_label_block_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks/reserved_label_block/state (container)

    YANG Description: State parameters relating to the label block.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks/reserved_label_block/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 parameters relating to the label block.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_global_reserved_label_blocks_reserved_label_block_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_global_reserved_label_blocks_reserved_label_block_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_global_reserved_label_blocks_reserved_label_block_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  local_id = __builtin__.property(_get_local_id, _set_local_id)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('local_id', local_id), ('config', config), ('state', state), ])


class yc_reserved_label_blocks_openconfig_network_instance_l2__network_instances_network_instance_mpls_global_reserved_label_blocks(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/global/reserved-label-blocks. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A range of labels starting with the start-label and up-to and including
the end label that should be allocated as reserved. These labels should
not be utilised by any dynamic label allocation on the local system unless
the allocating protocol is explicitly configured to specify that
allocation of labels should be out of the label block specified.
  """
  __slots__ = ('_path_helper', '_extmethods', '__reserved_label_block',)

  _yang_name = 'reserved-label-blocks'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__reserved_label_block = YANGDynClass(base=YANGListType("local_id",yc_reserved_label_block_openconfig_network_instance_l2__network_instances_network_instance_mpls_global_reserved_label_blocks_reserved_label_block, yang_name="reserved-label-block", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='local-id', extensions=None), is_container='list', yang_name="reserved-label-block", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'global', 'reserved-label-blocks']

  def _get_reserved_label_block(self):
    """
    Getter method for reserved_label_block, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks/reserved_label_block (list)

    YANG Description: A range of labels starting with the start-label up to and including
the end label that should be allocated for use by a specific protocol.
    """
    return self.__reserved_label_block
      
  def _set_reserved_label_block(self, v, load=False):
    """
    Setter method for reserved_label_block, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks/reserved_label_block (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_reserved_label_block is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_reserved_label_block() directly.

    YANG Description: A range of labels starting with the start-label up to and including
the end label that should be allocated for use by a specific protocol.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("local_id",yc_reserved_label_block_openconfig_network_instance_l2__network_instances_network_instance_mpls_global_reserved_label_blocks_reserved_label_block, yang_name="reserved-label-block", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='local-id', extensions=None), is_container='list', yang_name="reserved-label-block", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """reserved_label_block must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("local_id",yc_reserved_label_block_openconfig_network_instance_l2__network_instances_network_instance_mpls_global_reserved_label_blocks_reserved_label_block, yang_name="reserved-label-block", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='local-id', extensions=None), is_container='list', yang_name="reserved-label-block", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__reserved_label_block = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_reserved_label_block(self):
    self.__reserved_label_block = YANGDynClass(base=YANGListType("local_id",yc_reserved_label_block_openconfig_network_instance_l2__network_instances_network_instance_mpls_global_reserved_label_blocks_reserved_label_block, yang_name="reserved-label-block", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='local-id', extensions=None), is_container='list', yang_name="reserved-label-block", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  reserved_label_block = __builtin__.property(_get_reserved_label_block, _set_reserved_label_block)


  _pyangbind_elements = OrderedDict([('reserved_label_block', reserved_label_block), ])


class yc_global__openconfig_network_instance_l2__network_instances_network_instance_mpls_global(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/global. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: general mpls configuration applicable to any
type of LSP and signaling protocol - label ranges,
entropy label supportmay be added here
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__interface_attributes','__reserved_label_blocks',)

  _yang_name = 'global'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_global_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_global_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__interface_attributes = YANGDynClass(base=yc_interface_attributes_openconfig_network_instance_l2__network_instances_network_instance_mpls_global_interface_attributes, is_container='container', yang_name="interface-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__reserved_label_blocks = YANGDynClass(base=yc_reserved_label_blocks_openconfig_network_instance_l2__network_instances_network_instance_mpls_global_reserved_label_blocks, is_container='container', yang_name="reserved-label-blocks", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'global']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/global/config (container)

    YANG Description: Top level global MPLS configuration
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/global/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: Top level global MPLS configuration
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_global_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_global_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_global_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/global/state (container)

    YANG Description: Top level global MPLS state
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/global/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: Top level global MPLS state
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_global_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_global_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_global_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_interface_attributes(self):
    """
    Getter method for interface_attributes, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes (container)

    YANG Description: Parameters related to MPLS interfaces
    """
    return self.__interface_attributes
      
  def _set_interface_attributes(self, v, load=False):
    """
    Setter method for interface_attributes, mapped from YANG variable /network_instances/network_instance/mpls/global/interface_attributes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_interface_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_interface_attributes() directly.

    YANG Description: Parameters related to MPLS interfaces
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interface_attributes_openconfig_network_instance_l2__network_instances_network_instance_mpls_global_interface_attributes, is_container='container', yang_name="interface-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_attributes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_interface_attributes_openconfig_network_instance_l2__network_instances_network_instance_mpls_global_interface_attributes, is_container='container', yang_name="interface-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__interface_attributes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_interface_attributes(self):
    self.__interface_attributes = YANGDynClass(base=yc_interface_attributes_openconfig_network_instance_l2__network_instances_network_instance_mpls_global_interface_attributes, is_container='container', yang_name="interface-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_reserved_label_blocks(self):
    """
    Getter method for reserved_label_blocks, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks (container)

    YANG Description: A range of labels starting with the start-label and up-to and including
the end label that should be allocated as reserved. These labels should
not be utilised by any dynamic label allocation on the local system unless
the allocating protocol is explicitly configured to specify that
allocation of labels should be out of the label block specified.
    """
    return self.__reserved_label_blocks
      
  def _set_reserved_label_blocks(self, v, load=False):
    """
    Setter method for reserved_label_blocks, mapped from YANG variable /network_instances/network_instance/mpls/global/reserved_label_blocks (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_reserved_label_blocks is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_reserved_label_blocks() directly.

    YANG Description: A range of labels starting with the start-label and up-to and including
the end label that should be allocated as reserved. These labels should
not be utilised by any dynamic label allocation on the local system unless
the allocating protocol is explicitly configured to specify that
allocation of labels should be out of the label block specified.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_reserved_label_blocks_openconfig_network_instance_l2__network_instances_network_instance_mpls_global_reserved_label_blocks, is_container='container', yang_name="reserved-label-blocks", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """reserved_label_blocks must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_reserved_label_blocks_openconfig_network_instance_l2__network_instances_network_instance_mpls_global_reserved_label_blocks, is_container='container', yang_name="reserved-label-blocks", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__reserved_label_blocks = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_reserved_label_blocks(self):
    self.__reserved_label_blocks = YANGDynClass(base=yc_reserved_label_blocks_openconfig_network_instance_l2__network_instances_network_instance_mpls_global_reserved_label_blocks, is_container='container', yang_name="reserved-label-blocks", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  interface_attributes = __builtin__.property(_get_interface_attributes, _set_interface_attributes)
  reserved_label_blocks = __builtin__.property(_get_reserved_label_blocks, _set_reserved_label_blocks)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('interface_attributes', interface_attributes), ('reserved_label_blocks', reserved_label_blocks), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/te-global-attributes/srlgs/srlg/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters related to the SRLG
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__value','__cost','__flooding_type',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__cost = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="cost", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__flooding_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'FLOODED_SRLG': {}, 'STATIC_SRLG': {}},), default=six.text_type("FLOODED_SRLG"), is_leaf=True, yang_name="flooding-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='mpls-srlg-flooding-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 ['network-instances', 'network-instance', 'mpls', 'te-global-attributes', 'srlgs', 'srlg', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/config/name (string)

    YANG Description: SRLG group identifier
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/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: SRLG group identifier
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/config/value (uint32)

    YANG Description: group ID for the SRLG
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/config/value (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: group ID for the SRLG
    """
    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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value 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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_cost(self):
    """
    Getter method for cost, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/config/cost (uint32)

    YANG Description: The cost of the SRLG to the computation
algorithm
    """
    return self.__cost
      
  def _set_cost(self, v, load=False):
    """
    Setter method for cost, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/config/cost (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cost is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cost() directly.

    YANG Description: The cost of the SRLG to the computation
algorithm
    """
    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="cost", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cost 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="cost", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__cost = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cost(self):
    self.__cost = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="cost", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_flooding_type(self):
    """
    Getter method for flooding_type, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/config/flooding_type (mpls-srlg-flooding-type)

    YANG Description: The type of SRLG, either flooded in the IGP or
statically configured
    """
    return self.__flooding_type
      
  def _set_flooding_type(self, v, load=False):
    """
    Setter method for flooding_type, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/config/flooding_type (mpls-srlg-flooding-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flooding_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flooding_type() directly.

    YANG Description: The type of SRLG, either flooded in the IGP or
statically 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={'FLOODED_SRLG': {}, 'STATIC_SRLG': {}},), default=six.text_type("FLOODED_SRLG"), is_leaf=True, yang_name="flooding-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='mpls-srlg-flooding-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flooding_type must be of a type compatible with mpls-srlg-flooding-type""",
          'defined-type': "openconfig-network-instance:mpls-srlg-flooding-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'FLOODED_SRLG': {}, 'STATIC_SRLG': {}},), default=six.text_type("FLOODED_SRLG"), is_leaf=True, yang_name="flooding-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='mpls-srlg-flooding-type', is_config=True)""",
        })

    self.__flooding_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_flooding_type(self):
    self.__flooding_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'FLOODED_SRLG': {}, 'STATIC_SRLG': {}},), default=six.text_type("FLOODED_SRLG"), is_leaf=True, yang_name="flooding-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='mpls-srlg-flooding-type', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  value = __builtin__.property(_get_value, _set_value)
  cost = __builtin__.property(_get_cost, _set_cost)
  flooding_type = __builtin__.property(_get_flooding_type, _set_flooding_type)


  _pyangbind_elements = OrderedDict([('name', name), ('value', value), ('cost', cost), ('flooding_type', flooding_type), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/te-global-attributes/srlgs/srlg/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters related to the SRLG
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__value','__cost','__flooding_type',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__cost = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="cost", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__flooding_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'FLOODED_SRLG': {}, 'STATIC_SRLG': {}},), default=six.text_type("FLOODED_SRLG"), is_leaf=True, yang_name="flooding-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='mpls-srlg-flooding-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 ['network-instances', 'network-instance', 'mpls', 'te-global-attributes', 'srlgs', 'srlg', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/state/name (string)

    YANG Description: SRLG group identifier
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/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: SRLG group identifier
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/state/value (uint32)

    YANG Description: group ID for the SRLG
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/state/value (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: group ID for the SRLG
    """
    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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value 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="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_cost(self):
    """
    Getter method for cost, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/state/cost (uint32)

    YANG Description: The cost of the SRLG to the computation
algorithm
    """
    return self.__cost
      
  def _set_cost(self, v, load=False):
    """
    Setter method for cost, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/state/cost (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cost is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cost() directly.

    YANG Description: The cost of the SRLG to the computation
algorithm
    """
    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="cost", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cost 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="cost", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__cost = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cost(self):
    self.__cost = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="cost", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_flooding_type(self):
    """
    Getter method for flooding_type, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/state/flooding_type (mpls-srlg-flooding-type)

    YANG Description: The type of SRLG, either flooded in the IGP or
statically configured
    """
    return self.__flooding_type
      
  def _set_flooding_type(self, v, load=False):
    """
    Setter method for flooding_type, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/state/flooding_type (mpls-srlg-flooding-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_flooding_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_flooding_type() directly.

    YANG Description: The type of SRLG, either flooded in the IGP or
statically 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={'FLOODED_SRLG': {}, 'STATIC_SRLG': {}},), default=six.text_type("FLOODED_SRLG"), is_leaf=True, yang_name="flooding-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='mpls-srlg-flooding-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """flooding_type must be of a type compatible with mpls-srlg-flooding-type""",
          'defined-type': "openconfig-network-instance:mpls-srlg-flooding-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'FLOODED_SRLG': {}, 'STATIC_SRLG': {}},), default=six.text_type("FLOODED_SRLG"), is_leaf=True, yang_name="flooding-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='mpls-srlg-flooding-type', is_config=False)""",
        })

    self.__flooding_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_flooding_type(self):
    self.__flooding_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'FLOODED_SRLG': {}, 'STATIC_SRLG': {}},), default=six.text_type("FLOODED_SRLG"), is_leaf=True, yang_name="flooding-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='mpls-srlg-flooding-type', is_config=False)

  name = __builtin__.property(_get_name)
  value = __builtin__.property(_get_value)
  cost = __builtin__.property(_get_cost)
  flooding_type = __builtin__.property(_get_flooding_type)


  _pyangbind_elements = OrderedDict([('name', name), ('value', value), ('cost', cost), ('flooding_type', flooding_type), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_static_srlg_members_members_list_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/te-global-attributes/srlgs/srlg/static-srlg-members/members-list/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
SRLG members
  """
  __slots__ = ('_path_helper', '_extmethods', '__from_address','__to_address',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__from_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}'}),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}|:))'}),], is_leaf=True, yang_name="from-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)
    self.__to_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}'}),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}|:))'}),], is_leaf=True, yang_name="to-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'te-global-attributes', 'srlgs', 'srlg', 'static-srlg-members', 'members-list', 'config']

  def _get_from_address(self):
    """
    Getter method for from_address, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/static_srlg_members/members_list/config/from_address (inet:ip-address)

    YANG Description: IP address of the a-side of the SRLG link
    """
    return self.__from_address
      
  def _set_from_address(self, v, load=False):
    """
    Setter method for from_address, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/static_srlg_members/members_list/config/from_address (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_from_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_from_address() directly.

    YANG Description: IP address of the a-side of the SRLG link
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="from-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """from_address must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="from-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)""",
        })

    self.__from_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_from_address(self):
    self.__from_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}'}),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}|:))'}),], is_leaf=True, yang_name="from-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)


  def _get_to_address(self):
    """
    Getter method for to_address, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/static_srlg_members/members_list/config/to_address (inet:ip-address)

    YANG Description: IP address of the z-side of the SRLG link
    """
    return self.__to_address
      
  def _set_to_address(self, v, load=False):
    """
    Setter method for to_address, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/static_srlg_members/members_list/config/to_address (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_to_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_to_address() directly.

    YANG Description: IP address of the z-side of the SRLG link
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="to-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """to_address must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="to-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)""",
        })

    self.__to_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_to_address(self):
    self.__to_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}'}),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}|:))'}),], is_leaf=True, yang_name="to-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)

  from_address = __builtin__.property(_get_from_address, _set_from_address)
  to_address = __builtin__.property(_get_to_address, _set_to_address)


  _pyangbind_elements = OrderedDict([('from_address', from_address), ('to_address', to_address), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_static_srlg_members_members_list_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/te-global-attributes/srlgs/srlg/static-srlg-members/members-list/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to the SRLG
members
  """
  __slots__ = ('_path_helper', '_extmethods', '__from_address','__to_address',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__from_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}'}),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}|:))'}),], is_leaf=True, yang_name="from-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    self.__to_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}'}),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}|:))'}),], is_leaf=True, yang_name="to-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', 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 ['network-instances', 'network-instance', 'mpls', 'te-global-attributes', 'srlgs', 'srlg', 'static-srlg-members', 'members-list', 'state']

  def _get_from_address(self):
    """
    Getter method for from_address, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/static_srlg_members/members_list/state/from_address (inet:ip-address)

    YANG Description: IP address of the a-side of the SRLG link
    """
    return self.__from_address
      
  def _set_from_address(self, v, load=False):
    """
    Setter method for from_address, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/static_srlg_members/members_list/state/from_address (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_from_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_from_address() directly.

    YANG Description: IP address of the a-side of the SRLG link
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="from-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """from_address must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="from-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)""",
        })

    self.__from_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_from_address(self):
    self.__from_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}'}),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}|:))'}),], is_leaf=True, yang_name="from-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)


  def _get_to_address(self):
    """
    Getter method for to_address, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/static_srlg_members/members_list/state/to_address (inet:ip-address)

    YANG Description: IP address of the z-side of the SRLG link
    """
    return self.__to_address
      
  def _set_to_address(self, v, load=False):
    """
    Setter method for to_address, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/static_srlg_members/members_list/state/to_address (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_to_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_to_address() directly.

    YANG Description: IP address of the z-side of the SRLG link
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="to-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """to_address must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="to-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)""",
        })

    self.__to_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_to_address(self):
    self.__to_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}'}),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}|:))'}),], is_leaf=True, yang_name="to-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)

  from_address = __builtin__.property(_get_from_address)
  to_address = __builtin__.property(_get_to_address)


  _pyangbind_elements = OrderedDict([('from_address', from_address), ('to_address', to_address), ])


class yc_members_list_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_static_srlg_members_members_list(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/te-global-attributes/srlgs/srlg/static-srlg-members/members-list. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of SRLG members, which are expressed
as IP address endpoints of links contained in the
SRLG
  """
  __slots__ = ('_path_helper', '_extmethods', '__from_address','__config','__state',)

  _yang_name = 'members-list'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__from_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="from-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_static_srlg_members_members_list_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_static_srlg_members_members_list_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'te-global-attributes', 'srlgs', 'srlg', 'static-srlg-members', 'members-list']

  def _get_from_address(self):
    """
    Getter method for from_address, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/static_srlg_members/members_list/from_address (leafref)

    YANG Description: The from address of the link in the SRLG
    """
    return self.__from_address
      
  def _set_from_address(self, v, load=False):
    """
    Setter method for from_address, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/static_srlg_members/members_list/from_address (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_from_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_from_address() directly.

    YANG Description: The from address of the link in the SRLG
    """
    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="from-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """from_address must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="from-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__from_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_from_address(self):
    self.__from_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="from-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/static_srlg_members/members_list/config (container)

    YANG Description: Configuration parameters relating to the
SRLG members
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/static_srlg_members/members_list/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
SRLG members
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_static_srlg_members_members_list_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_static_srlg_members_members_list_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_static_srlg_members_members_list_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/static_srlg_members/members_list/state (container)

    YANG Description: State parameters relating to the SRLG
members
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/static_srlg_members/members_list/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 parameters relating to the SRLG
members
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_static_srlg_members_members_list_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_static_srlg_members_members_list_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_static_srlg_members_members_list_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  from_address = __builtin__.property(_get_from_address, _set_from_address)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('from_address', from_address), ('config', config), ('state', state), ])


class yc_static_srlg_members_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_static_srlg_members(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/te-global-attributes/srlgs/srlg/static-srlg-members. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: SRLG members for static (not flooded) SRLGs 
  """
  __slots__ = ('_path_helper', '_extmethods', '__members_list',)

  _yang_name = 'static-srlg-members'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__members_list = YANGDynClass(base=YANGListType("from_address",yc_members_list_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_static_srlg_members_members_list, yang_name="members-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='from-address', extensions=None), is_container='list', yang_name="members-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'te-global-attributes', 'srlgs', 'srlg', 'static-srlg-members']

  def _get_members_list(self):
    """
    Getter method for members_list, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/static_srlg_members/members_list (list)

    YANG Description: List of SRLG members, which are expressed
as IP address endpoints of links contained in the
SRLG
    """
    return self.__members_list
      
  def _set_members_list(self, v, load=False):
    """
    Setter method for members_list, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/static_srlg_members/members_list (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_members_list is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_members_list() directly.

    YANG Description: List of SRLG members, which are expressed
as IP address endpoints of links contained in the
SRLG
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("from_address",yc_members_list_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_static_srlg_members_members_list, yang_name="members-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='from-address', extensions=None), is_container='list', yang_name="members-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """members_list must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("from_address",yc_members_list_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_static_srlg_members_members_list, yang_name="members-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='from-address', extensions=None), is_container='list', yang_name="members-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__members_list = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_members_list(self):
    self.__members_list = YANGDynClass(base=YANGListType("from_address",yc_members_list_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_static_srlg_members_members_list, yang_name="members-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='from-address', extensions=None), is_container='list', yang_name="members-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  members_list = __builtin__.property(_get_members_list, _set_members_list)


  _pyangbind_elements = OrderedDict([('members_list', members_list), ])


class yc_srlg_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/te-global-attributes/srlgs/srlg. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of shared risk link groups
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state','__static_srlg_members',)

  _yang_name = 'srlg'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__static_srlg_members = YANGDynClass(base=yc_static_srlg_members_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_static_srlg_members, is_container='container', yang_name="static-srlg-members", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'te-global-attributes', 'srlgs', 'srlg']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/name (leafref)

    YANG Description: The SRLG group identifier
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/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 SRLG group identifier
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/config (container)

    YANG Description: Configuration parameters related to the SRLG
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/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 related to the SRLG
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/state (container)

    YANG Description: State parameters related to the SRLG
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/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 parameters related to the SRLG
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_static_srlg_members(self):
    """
    Getter method for static_srlg_members, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/static_srlg_members (container)

    YANG Description: SRLG members for static (not flooded) SRLGs 
    """
    return self.__static_srlg_members
      
  def _set_static_srlg_members(self, v, load=False):
    """
    Setter method for static_srlg_members, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg/static_srlg_members (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_static_srlg_members is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_static_srlg_members() directly.

    YANG Description: SRLG members for static (not flooded) SRLGs 
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_static_srlg_members_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_static_srlg_members, is_container='container', yang_name="static-srlg-members", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """static_srlg_members must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_static_srlg_members_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_static_srlg_members, is_container='container', yang_name="static-srlg-members", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__static_srlg_members = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_static_srlg_members(self):
    self.__static_srlg_members = YANGDynClass(base=yc_static_srlg_members_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg_static_srlg_members, is_container='container', yang_name="static-srlg-members", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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)
  static_srlg_members = __builtin__.property(_get_static_srlg_members, _set_static_srlg_members)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ('static_srlg_members', static_srlg_members), ])


class yc_srlgs_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_srlgs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/te-global-attributes/srlgs. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Shared risk link groups attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__srlg',)

  _yang_name = 'srlgs'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__srlg = YANGDynClass(base=YANGListType("name",yc_srlg_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg, yang_name="srlg", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="srlg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'te-global-attributes', 'srlgs']

  def _get_srlg(self):
    """
    Getter method for srlg, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg (list)

    YANG Description: List of shared risk link groups
    """
    return self.__srlg
      
  def _set_srlg(self, v, load=False):
    """
    Setter method for srlg, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs/srlg (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_srlg is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_srlg() directly.

    YANG Description: List of shared risk link groups
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_srlg_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg, yang_name="srlg", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="srlg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """srlg must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_srlg_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg, yang_name="srlg", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="srlg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__srlg = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_srlg(self):
    self.__srlg = YANGDynClass(base=YANGListType("name",yc_srlg_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_srlgs_srlg, yang_name="srlg", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="srlg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  srlg = __builtin__.property(_get_srlg, _set_srlg)


  _pyangbind_elements = OrderedDict([('srlg', srlg), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_mpls_admin_groups_admin_group_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/te-global-attributes/mpls-admin-groups/admin-group/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configurable items for admin-groups
  """
  __slots__ = ('_path_helper', '_extmethods', '__admin_group_name','__bit_position',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__admin_group_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="admin-group-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__bit_position = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bit-position", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'te-global-attributes', 'mpls-admin-groups', 'admin-group', 'config']

  def _get_admin_group_name(self):
    """
    Getter method for admin_group_name, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/mpls_admin_groups/admin_group/config/admin_group_name (string)

    YANG Description: name for mpls admin-group
    """
    return self.__admin_group_name
      
  def _set_admin_group_name(self, v, load=False):
    """
    Setter method for admin_group_name, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/mpls_admin_groups/admin_group/config/admin_group_name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_admin_group_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_admin_group_name() directly.

    YANG Description: name for mpls admin-group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="admin-group-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """admin_group_name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="admin-group-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)""",
        })

    self.__admin_group_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_admin_group_name(self):
    self.__admin_group_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="admin-group-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_bit_position(self):
    """
    Getter method for bit_position, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/mpls_admin_groups/admin_group/config/bit_position (uint32)

    YANG Description: bit-position value for mpls admin-group. The value
for the admin group is an integer that represents one
of the bit positions in the admin-group bitmask. Values
between 0 and 31 are interpreted as the original limit
of 32 admin groups. Values >=32 are interpreted as
extended admin group values as per RFC7308.
    """
    return self.__bit_position
      
  def _set_bit_position(self, v, load=False):
    """
    Setter method for bit_position, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/mpls_admin_groups/admin_group/config/bit_position (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bit_position is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bit_position() directly.

    YANG Description: bit-position value for mpls admin-group. The value
for the admin group is an integer that represents one
of the bit positions in the admin-group bitmask. Values
between 0 and 31 are interpreted as the original limit
of 32 admin groups. Values >=32 are interpreted as
extended admin group values as per RFC7308.
    """
    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="bit-position", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bit_position 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="bit-position", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__bit_position = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bit_position(self):
    self.__bit_position = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bit-position", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)

  admin_group_name = __builtin__.property(_get_admin_group_name, _set_admin_group_name)
  bit_position = __builtin__.property(_get_bit_position, _set_bit_position)


  _pyangbind_elements = OrderedDict([('admin_group_name', admin_group_name), ('bit_position', bit_position), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_mpls_admin_groups_admin_group_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/te-global-attributes/mpls-admin-groups/admin-group/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for admin-groups
  """
  __slots__ = ('_path_helper', '_extmethods', '__admin_group_name','__bit_position',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__admin_group_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="admin-group-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__bit_position = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bit-position", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'te-global-attributes', 'mpls-admin-groups', 'admin-group', 'state']

  def _get_admin_group_name(self):
    """
    Getter method for admin_group_name, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/mpls_admin_groups/admin_group/state/admin_group_name (string)

    YANG Description: name for mpls admin-group
    """
    return self.__admin_group_name
      
  def _set_admin_group_name(self, v, load=False):
    """
    Setter method for admin_group_name, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/mpls_admin_groups/admin_group/state/admin_group_name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_admin_group_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_admin_group_name() directly.

    YANG Description: name for mpls admin-group
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="admin-group-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """admin_group_name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="admin-group-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__admin_group_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_admin_group_name(self):
    self.__admin_group_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="admin-group-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_bit_position(self):
    """
    Getter method for bit_position, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/mpls_admin_groups/admin_group/state/bit_position (uint32)

    YANG Description: bit-position value for mpls admin-group. The value
for the admin group is an integer that represents one
of the bit positions in the admin-group bitmask. Values
between 0 and 31 are interpreted as the original limit
of 32 admin groups. Values >=32 are interpreted as
extended admin group values as per RFC7308.
    """
    return self.__bit_position
      
  def _set_bit_position(self, v, load=False):
    """
    Setter method for bit_position, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/mpls_admin_groups/admin_group/state/bit_position (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bit_position is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bit_position() directly.

    YANG Description: bit-position value for mpls admin-group. The value
for the admin group is an integer that represents one
of the bit positions in the admin-group bitmask. Values
between 0 and 31 are interpreted as the original limit
of 32 admin groups. Values >=32 are interpreted as
extended admin group values as per RFC7308.
    """
    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="bit-position", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bit_position 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="bit-position", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__bit_position = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bit_position(self):
    self.__bit_position = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="bit-position", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  admin_group_name = __builtin__.property(_get_admin_group_name)
  bit_position = __builtin__.property(_get_bit_position)


  _pyangbind_elements = OrderedDict([('admin_group_name', admin_group_name), ('bit_position', bit_position), ])


class yc_admin_group_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_mpls_admin_groups_admin_group(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/te-global-attributes/mpls-admin-groups/admin-group. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: configuration of value to name mapping
for mpls affinities/admin-groups
  """
  __slots__ = ('_path_helper', '_extmethods', '__admin_group_name','__config','__state',)

  _yang_name = 'admin-group'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__admin_group_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="admin-group-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_mpls_admin_groups_admin_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_mpls_admin_groups_admin_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'te-global-attributes', 'mpls-admin-groups', 'admin-group']

  def _get_admin_group_name(self):
    """
    Getter method for admin_group_name, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/mpls_admin_groups/admin_group/admin_group_name (leafref)

    YANG Description: name for mpls admin-group
    """
    return self.__admin_group_name
      
  def _set_admin_group_name(self, v, load=False):
    """
    Setter method for admin_group_name, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/mpls_admin_groups/admin_group/admin_group_name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_admin_group_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_admin_group_name() directly.

    YANG Description: name for mpls admin-group
    """
    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="admin-group-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """admin_group_name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="admin-group-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__admin_group_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_admin_group_name(self):
    self.__admin_group_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="admin-group-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/mpls_admin_groups/admin_group/config (container)

    YANG Description: Configurable items for admin-groups
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/mpls_admin_groups/admin_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: Configurable items for admin-groups
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_mpls_admin_groups_admin_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_mpls_admin_groups_admin_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_mpls_admin_groups_admin_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/mpls_admin_groups/admin_group/state (container)

    YANG Description: Operational state for admin-groups
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/mpls_admin_groups/admin_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 for admin-groups
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_mpls_admin_groups_admin_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_mpls_admin_groups_admin_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_mpls_admin_groups_admin_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  admin_group_name = __builtin__.property(_get_admin_group_name, _set_admin_group_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('admin_group_name', admin_group_name), ('config', config), ('state', state), ])


class yc_mpls_admin_groups_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_mpls_admin_groups(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/te-global-attributes/mpls-admin-groups. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for admin-groups configuration
and state
  """
  __slots__ = ('_path_helper', '_extmethods', '__admin_group',)

  _yang_name = 'mpls-admin-groups'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__admin_group = YANGDynClass(base=YANGListType("admin_group_name",yc_admin_group_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_mpls_admin_groups_admin_group, yang_name="admin-group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='admin-group-name', extensions=None), is_container='list', yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'te-global-attributes', 'mpls-admin-groups']

  def _get_admin_group(self):
    """
    Getter method for admin_group, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/mpls_admin_groups/admin_group (list)

    YANG Description: configuration of value to name mapping
for mpls affinities/admin-groups
    """
    return self.__admin_group
      
  def _set_admin_group(self, v, load=False):
    """
    Setter method for admin_group, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/mpls_admin_groups/admin_group (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_admin_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_admin_group() directly.

    YANG Description: configuration of value to name mapping
for mpls affinities/admin-groups
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("admin_group_name",yc_admin_group_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_mpls_admin_groups_admin_group, yang_name="admin-group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='admin-group-name', extensions=None), is_container='list', yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """admin_group must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("admin_group_name",yc_admin_group_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_mpls_admin_groups_admin_group, yang_name="admin-group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='admin-group-name', extensions=None), is_container='list', yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__admin_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_admin_group(self):
    self.__admin_group = YANGDynClass(base=YANGListType("admin_group_name",yc_admin_group_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_mpls_admin_groups_admin_group, yang_name="admin-group", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='admin-group-name', extensions=None), is_container='list', yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  admin_group = __builtin__.property(_get_admin_group, _set_admin_group)


  _pyangbind_elements = OrderedDict([('admin_group', admin_group), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_te_lsp_timers_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/te-global-attributes/te-lsp-timers/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters related
to timers for TE LSPs
  """
  __slots__ = ('_path_helper', '_extmethods', '__install_delay','__cleanup_delay','__reoptimize_timer',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__install_delay = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..3600']}), is_leaf=True, yang_name="install-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__cleanup_delay = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="cleanup-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__reoptimize_timer = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="reoptimize-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'te-global-attributes', 'te-lsp-timers', 'config']

  def _get_install_delay(self):
    """
    Getter method for install_delay, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/te_lsp_timers/config/install_delay (uint16)

    YANG Description: delay the use of newly installed te lsp for a
specified amount of time.
    """
    return self.__install_delay
      
  def _set_install_delay(self, v, load=False):
    """
    Setter method for install_delay, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/te_lsp_timers/config/install_delay (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_install_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_install_delay() directly.

    YANG Description: delay the use of newly installed te lsp for a
specified amount of time.
    """
    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': ['0..3600']}), is_leaf=True, yang_name="install-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """install_delay must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..3600']}), is_leaf=True, yang_name="install-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__install_delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_install_delay(self):
    self.__install_delay = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..3600']}), is_leaf=True, yang_name="install-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_cleanup_delay(self):
    """
    Getter method for cleanup_delay, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/te_lsp_timers/config/cleanup_delay (uint16)

    YANG Description: delay the removal of old te lsp for a specified
amount of time
    """
    return self.__cleanup_delay
      
  def _set_cleanup_delay(self, v, load=False):
    """
    Setter method for cleanup_delay, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/te_lsp_timers/config/cleanup_delay (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cleanup_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cleanup_delay() directly.

    YANG Description: delay the removal of old te lsp for a specified
amount of time
    """
    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="cleanup-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cleanup_delay 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="cleanup-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__cleanup_delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cleanup_delay(self):
    self.__cleanup_delay = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="cleanup-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_reoptimize_timer(self):
    """
    Getter method for reoptimize_timer, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/te_lsp_timers/config/reoptimize_timer (uint16)

    YANG Description: frequency of reoptimization of
a traffic engineered LSP
    """
    return self.__reoptimize_timer
      
  def _set_reoptimize_timer(self, v, load=False):
    """
    Setter method for reoptimize_timer, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/te_lsp_timers/config/reoptimize_timer (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_reoptimize_timer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_reoptimize_timer() directly.

    YANG Description: frequency of reoptimization of
a traffic engineered LSP
    """
    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="reoptimize-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """reoptimize_timer 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="reoptimize-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__reoptimize_timer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_reoptimize_timer(self):
    self.__reoptimize_timer = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="reoptimize-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

  install_delay = __builtin__.property(_get_install_delay, _set_install_delay)
  cleanup_delay = __builtin__.property(_get_cleanup_delay, _set_cleanup_delay)
  reoptimize_timer = __builtin__.property(_get_reoptimize_timer, _set_reoptimize_timer)


  _pyangbind_elements = OrderedDict([('install_delay', install_delay), ('cleanup_delay', cleanup_delay), ('reoptimize_timer', reoptimize_timer), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_te_lsp_timers_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/te-global-attributes/te-lsp-timers/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State related to timers for TE LSPs
  """
  __slots__ = ('_path_helper', '_extmethods', '__install_delay','__cleanup_delay','__reoptimize_timer',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__install_delay = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..3600']}), is_leaf=True, yang_name="install-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__cleanup_delay = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="cleanup-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__reoptimize_timer = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="reoptimize-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'mpls', 'te-global-attributes', 'te-lsp-timers', 'state']

  def _get_install_delay(self):
    """
    Getter method for install_delay, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/te_lsp_timers/state/install_delay (uint16)

    YANG Description: delay the use of newly installed te lsp for a
specified amount of time.
    """
    return self.__install_delay
      
  def _set_install_delay(self, v, load=False):
    """
    Setter method for install_delay, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/te_lsp_timers/state/install_delay (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_install_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_install_delay() directly.

    YANG Description: delay the use of newly installed te lsp for a
specified amount of time.
    """
    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': ['0..3600']}), is_leaf=True, yang_name="install-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """install_delay must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..3600']}), is_leaf=True, yang_name="install-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__install_delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_install_delay(self):
    self.__install_delay = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..3600']}), is_leaf=True, yang_name="install-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_cleanup_delay(self):
    """
    Getter method for cleanup_delay, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/te_lsp_timers/state/cleanup_delay (uint16)

    YANG Description: delay the removal of old te lsp for a specified
amount of time
    """
    return self.__cleanup_delay
      
  def _set_cleanup_delay(self, v, load=False):
    """
    Setter method for cleanup_delay, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/te_lsp_timers/state/cleanup_delay (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cleanup_delay is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cleanup_delay() directly.

    YANG Description: delay the removal of old te lsp for a specified
amount of time
    """
    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="cleanup-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cleanup_delay 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="cleanup-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__cleanup_delay = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cleanup_delay(self):
    self.__cleanup_delay = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="cleanup-delay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_reoptimize_timer(self):
    """
    Getter method for reoptimize_timer, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/te_lsp_timers/state/reoptimize_timer (uint16)

    YANG Description: frequency of reoptimization of
a traffic engineered LSP
    """
    return self.__reoptimize_timer
      
  def _set_reoptimize_timer(self, v, load=False):
    """
    Setter method for reoptimize_timer, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/te_lsp_timers/state/reoptimize_timer (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_reoptimize_timer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_reoptimize_timer() directly.

    YANG Description: frequency of reoptimization of
a traffic engineered LSP
    """
    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="reoptimize-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """reoptimize_timer 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="reoptimize-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__reoptimize_timer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_reoptimize_timer(self):
    self.__reoptimize_timer = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="reoptimize-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  install_delay = __builtin__.property(_get_install_delay)
  cleanup_delay = __builtin__.property(_get_cleanup_delay)
  reoptimize_timer = __builtin__.property(_get_reoptimize_timer)


  _pyangbind_elements = OrderedDict([('install_delay', install_delay), ('cleanup_delay', cleanup_delay), ('reoptimize_timer', reoptimize_timer), ])


class yc_te_lsp_timers_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_te_lsp_timers(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/te-global-attributes/te-lsp-timers. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Definition for delays associated with setup
and cleanup of TE LSPs
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'te-lsp-timers'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_te_lsp_timers_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_te_lsp_timers_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'te-global-attributes', 'te-lsp-timers']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/te_lsp_timers/config (container)

    YANG Description: Configuration parameters related
to timers for TE LSPs
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/te_lsp_timers/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 related
to timers for TE LSPs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_te_lsp_timers_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_te_lsp_timers_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_te_lsp_timers_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/te_lsp_timers/state (container)

    YANG Description: State related to timers for TE LSPs
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/te_lsp_timers/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 related to timers for TE LSPs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_te_lsp_timers_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_te_lsp_timers_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_te_lsp_timers_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_te_global_attributes_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/te-global-attributes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: traffic-engineering global attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__srlgs','__mpls_admin_groups','__te_lsp_timers',)

  _yang_name = 'te-global-attributes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__srlgs = YANGDynClass(base=yc_srlgs_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_srlgs, is_container='container', yang_name="srlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__mpls_admin_groups = YANGDynClass(base=yc_mpls_admin_groups_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_mpls_admin_groups, is_container='container', yang_name="mpls-admin-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__te_lsp_timers = YANGDynClass(base=yc_te_lsp_timers_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_te_lsp_timers, is_container='container', yang_name="te-lsp-timers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'te-global-attributes']

  def _get_srlgs(self):
    """
    Getter method for srlgs, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs (container)

    YANG Description: Shared risk link groups attributes
    """
    return self.__srlgs
      
  def _set_srlgs(self, v, load=False):
    """
    Setter method for srlgs, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/srlgs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_srlgs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_srlgs() directly.

    YANG Description: Shared risk link groups attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_srlgs_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_srlgs, is_container='container', yang_name="srlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """srlgs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_srlgs_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_srlgs, is_container='container', yang_name="srlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__srlgs = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_srlgs(self):
    self.__srlgs = YANGDynClass(base=yc_srlgs_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_srlgs, is_container='container', yang_name="srlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_mpls_admin_groups(self):
    """
    Getter method for mpls_admin_groups, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/mpls_admin_groups (container)

    YANG Description: Top-level container for admin-groups configuration
and state
    """
    return self.__mpls_admin_groups
      
  def _set_mpls_admin_groups(self, v, load=False):
    """
    Setter method for mpls_admin_groups, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/mpls_admin_groups (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mpls_admin_groups is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mpls_admin_groups() directly.

    YANG Description: Top-level container for admin-groups configuration
and state
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_mpls_admin_groups_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_mpls_admin_groups, is_container='container', yang_name="mpls-admin-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mpls_admin_groups must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_mpls_admin_groups_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_mpls_admin_groups, is_container='container', yang_name="mpls-admin-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__mpls_admin_groups = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mpls_admin_groups(self):
    self.__mpls_admin_groups = YANGDynClass(base=yc_mpls_admin_groups_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_mpls_admin_groups, is_container='container', yang_name="mpls-admin-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_te_lsp_timers(self):
    """
    Getter method for te_lsp_timers, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/te_lsp_timers (container)

    YANG Description: Definition for delays associated with setup
and cleanup of TE LSPs
    """
    return self.__te_lsp_timers
      
  def _set_te_lsp_timers(self, v, load=False):
    """
    Setter method for te_lsp_timers, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes/te_lsp_timers (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_te_lsp_timers is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_te_lsp_timers() directly.

    YANG Description: Definition for delays associated with setup
and cleanup of TE LSPs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_te_lsp_timers_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_te_lsp_timers, is_container='container', yang_name="te-lsp-timers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """te_lsp_timers must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_te_lsp_timers_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_te_lsp_timers, is_container='container', yang_name="te-lsp-timers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__te_lsp_timers = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_te_lsp_timers(self):
    self.__te_lsp_timers = YANGDynClass(base=yc_te_lsp_timers_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes_te_lsp_timers, is_container='container', yang_name="te-lsp-timers", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  srlgs = __builtin__.property(_get_srlgs, _set_srlgs)
  mpls_admin_groups = __builtin__.property(_get_mpls_admin_groups, _set_mpls_admin_groups)
  te_lsp_timers = __builtin__.property(_get_te_lsp_timers, _set_te_lsp_timers)


  _pyangbind_elements = OrderedDict([('srlgs', srlgs), ('mpls_admin_groups', mpls_admin_groups), ('te_lsp_timers', te_lsp_timers), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_interface_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/te-interface-attributes/interface/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters related to TE interfaces:
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id','__te_metric','__srlg_membership','__admin_group',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=True)
    self.__te_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__srlg_membership = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="srlg-membership", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__admin_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'te-interface-attributes', 'interface', 'config']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/config/interface_id (oc-if:interface-id)

    YANG Description: Id of the interface
    """
    return self.__interface_id
      
  def _set_interface_id(self, v, load=False):
    """
    Setter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/config/interface_id (oc-if:interface-id)
    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: Id of 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_id must be of a type compatible with oc-if:interface-id""",
          'defined-type': "oc-if:interface-id",
          '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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=True)


  def _get_te_metric(self):
    """
    Getter method for te_metric, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/config/te_metric (uint32)

    YANG Description: TE specific metric for the link
    """
    return self.__te_metric
      
  def _set_te_metric(self, v, load=False):
    """
    Setter method for te_metric, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/config/te_metric (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_te_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_te_metric() directly.

    YANG Description: TE specific metric for the link
    """
    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="te-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """te_metric 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="te-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__te_metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_te_metric(self):
    self.__te_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_srlg_membership(self):
    """
    Getter method for srlg_membership, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/config/srlg_membership (leafref)

    YANG Description: list of references to named shared risk link groups that the
interface belongs to.
    """
    return self.__srlg_membership
      
  def _set_srlg_membership(self, v, load=False):
    """
    Setter method for srlg_membership, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/config/srlg_membership (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_srlg_membership is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_srlg_membership() directly.

    YANG Description: list of references to named shared risk link groups that the
interface belongs to.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="srlg-membership", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """srlg_membership must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="srlg-membership", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__srlg_membership = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_srlg_membership(self):
    self.__srlg_membership = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="srlg-membership", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_admin_group(self):
    """
    Getter method for admin_group, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/config/admin_group (string)

    YANG Description: list of admin groups (by name) on the interface
    """
    return self.__admin_group
      
  def _set_admin_group(self, v, load=False):
    """
    Setter method for admin_group, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/config/admin_group (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_admin_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_admin_group() directly.

    YANG Description: list of admin groups (by name) on the interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """admin_group must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)""",
        })

    self.__admin_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_admin_group(self):
    self.__admin_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)

  interface_id = __builtin__.property(_get_interface_id, _set_interface_id)
  te_metric = __builtin__.property(_get_te_metric, _set_te_metric)
  srlg_membership = __builtin__.property(_get_srlg_membership, _set_srlg_membership)
  admin_group = __builtin__.property(_get_admin_group, _set_admin_group)


  _pyangbind_elements = OrderedDict([('interface_id', interface_id), ('te_metric', te_metric), ('srlg_membership', srlg_membership), ('admin_group', admin_group), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_interface_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/te-interface-attributes/interface/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters related to TE interfaces
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id','__te_metric','__srlg_membership','__admin_group',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=False)
    self.__te_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__srlg_membership = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="srlg-membership", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__admin_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'te-interface-attributes', 'interface', 'state']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/state/interface_id (oc-if:interface-id)

    YANG Description: Id of the interface
    """
    return self.__interface_id
      
  def _set_interface_id(self, v, load=False):
    """
    Setter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/state/interface_id (oc-if:interface-id)
    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: Id of 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_id must be of a type compatible with oc-if:interface-id""",
          'defined-type': "oc-if:interface-id",
          '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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=False)


  def _get_te_metric(self):
    """
    Getter method for te_metric, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/state/te_metric (uint32)

    YANG Description: TE specific metric for the link
    """
    return self.__te_metric
      
  def _set_te_metric(self, v, load=False):
    """
    Setter method for te_metric, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/state/te_metric (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_te_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_te_metric() directly.

    YANG Description: TE specific metric for the link
    """
    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="te-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """te_metric 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="te-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__te_metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_te_metric(self):
    self.__te_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_srlg_membership(self):
    """
    Getter method for srlg_membership, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/state/srlg_membership (leafref)

    YANG Description: list of references to named shared risk link groups that the
interface belongs to.
    """
    return self.__srlg_membership
      
  def _set_srlg_membership(self, v, load=False):
    """
    Setter method for srlg_membership, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/state/srlg_membership (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_srlg_membership is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_srlg_membership() directly.

    YANG Description: list of references to named shared risk link groups that the
interface belongs to.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="srlg-membership", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """srlg_membership must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="srlg-membership", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__srlg_membership = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_srlg_membership(self):
    self.__srlg_membership = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="srlg-membership", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_admin_group(self):
    """
    Getter method for admin_group, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/state/admin_group (string)

    YANG Description: list of admin groups (by name) on the interface
    """
    return self.__admin_group
      
  def _set_admin_group(self, v, load=False):
    """
    Setter method for admin_group, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/state/admin_group (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_admin_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_admin_group() directly.

    YANG Description: list of admin groups (by name) on the interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """admin_group must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__admin_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_admin_group(self):
    self.__admin_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="admin-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)

  interface_id = __builtin__.property(_get_interface_id)
  te_metric = __builtin__.property(_get_te_metric)
  srlg_membership = __builtin__.property(_get_srlg_membership)
  admin_group = __builtin__.property(_get_admin_group)


  _pyangbind_elements = OrderedDict([('interface_id', interface_id), ('te_metric', te_metric), ('srlg_membership', srlg_membership), ('admin_group', admin_group), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_interface_interface_ref_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/te-interface-attributes/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'te-interface-attributes', 'interface', 'interface-ref', 'config']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/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 /network_instances/network_instance/mpls/te_interface_attributes/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/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 /network_instances/network_instance/mpls/te_interface_attributes/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_interface_interface_ref_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/te-interface-attributes/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'te-interface-attributes', 'interface', 'interface-ref', 'state']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/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 /network_instances/network_instance/mpls/te_interface_attributes/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/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 /network_instances/network_instance/mpls/te_interface_attributes/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_interface_interface_ref(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/te-interface-attributes/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
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'interface-ref'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'te-interface-attributes', 'interface', 'interface-ref']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/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 /network_instances/network_instance/mpls/te_interface_attributes/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_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/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 /network_instances/network_instance/mpls/te_interface_attributes/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_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_interface_igp_flooding_bandwidth_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/te-interface-attributes/interface/igp-flooding-bandwidth/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for TED
update threshold 
  """
  __slots__ = ('_path_helper', '_extmethods', '__threshold_type','__delta_percentage','__threshold_specification','__up_thresholds','__down_thresholds','__up_down_thresholds',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__threshold_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DELTA': {}, 'THRESHOLD_CROSSED': {}},), is_leaf=True, yang_name="threshold-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)
    self.__delta_percentage = 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="delta-percentage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    self.__threshold_specification = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'MIRRORED_UP_DOWN': {}, 'SEPARATE_UP_DOWN': {}},), is_leaf=True, yang_name="threshold-specification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)
    self.__up_thresholds = 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..100']})), is_leaf=False, yang_name="up-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    self.__down_thresholds = 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..100']})), is_leaf=False, yang_name="down-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    self.__up_down_thresholds = 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..100']})), is_leaf=False, yang_name="up-down-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'te-interface-attributes', 'interface', 'igp-flooding-bandwidth', 'config']

  def _get_threshold_type(self):
    """
    Getter method for threshold_type, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/threshold_type (enumeration)

    YANG Description: The type of threshold that should be used to specify the
values at which bandwidth is flooded. DELTA indicates that
the local system should flood IGP updates when a change in
reserved bandwidth >= the specified delta occurs on the
interface. Where THRESHOLD_CROSSED is specified, the local
system should trigger an update (and hence flood) the
reserved bandwidth when the reserved bandwidth changes such
that it crosses, or becomes equal to one of the threshold
values
    """
    return self.__threshold_type
      
  def _set_threshold_type(self, v, load=False):
    """
    Setter method for threshold_type, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/threshold_type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_threshold_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_threshold_type() directly.

    YANG Description: The type of threshold that should be used to specify the
values at which bandwidth is flooded. DELTA indicates that
the local system should flood IGP updates when a change in
reserved bandwidth >= the specified delta occurs on the
interface. Where THRESHOLD_CROSSED is specified, the local
system should trigger an update (and hence flood) the
reserved bandwidth when the reserved bandwidth changes such
that it crosses, or becomes equal to one of the threshold
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={'DELTA': {}, 'THRESHOLD_CROSSED': {}},), is_leaf=True, yang_name="threshold-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """threshold_type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DELTA': {}, 'THRESHOLD_CROSSED': {}},), is_leaf=True, yang_name="threshold-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)""",
        })

    self.__threshold_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_threshold_type(self):
    self.__threshold_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DELTA': {}, 'THRESHOLD_CROSSED': {}},), is_leaf=True, yang_name="threshold-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)


  def _get_delta_percentage(self):
    """
    Getter method for delta_percentage, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/delta_percentage (oc-types:percentage)

    YANG Description: The percentage of the maximum-reservable-bandwidth
considered as the delta that results in an IGP update
being flooded
    """
    return self.__delta_percentage
      
  def _set_delta_percentage(self, v, load=False):
    """
    Setter method for delta_percentage, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/delta_percentage (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_delta_percentage is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_delta_percentage() directly.

    YANG Description: The percentage of the maximum-reservable-bandwidth
considered as the delta that results in an IGP update
being flooded
    """
    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="delta-percentage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """delta_percentage 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="delta-percentage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__delta_percentage = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_delta_percentage(self):
    self.__delta_percentage = 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="delta-percentage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)


  def _get_threshold_specification(self):
    """
    Getter method for threshold_specification, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/threshold_specification (enumeration)

    YANG Description: This value specifies whether a single set of threshold
values should be used for both increasing and decreasing
bandwidth when determining whether to trigger updated
bandwidth values to be flooded in the IGP TE extensions.
MIRRORED-UP-DOWN indicates that a single value (or set of
values) should be used for both increasing and decreasing
values, where SEPARATE-UP-DOWN specifies that the increasing
and decreasing values will be separately specified
    """
    return self.__threshold_specification
      
  def _set_threshold_specification(self, v, load=False):
    """
    Setter method for threshold_specification, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/threshold_specification (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_threshold_specification is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_threshold_specification() directly.

    YANG Description: This value specifies whether a single set of threshold
values should be used for both increasing and decreasing
bandwidth when determining whether to trigger updated
bandwidth values to be flooded in the IGP TE extensions.
MIRRORED-UP-DOWN indicates that a single value (or set of
values) should be used for both increasing and decreasing
values, where SEPARATE-UP-DOWN specifies that the increasing
and decreasing values will be separately specified
    """
    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={'MIRRORED_UP_DOWN': {}, 'SEPARATE_UP_DOWN': {}},), is_leaf=True, yang_name="threshold-specification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """threshold_specification must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'MIRRORED_UP_DOWN': {}, 'SEPARATE_UP_DOWN': {}},), is_leaf=True, yang_name="threshold-specification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)""",
        })

    self.__threshold_specification = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_threshold_specification(self):
    self.__threshold_specification = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'MIRRORED_UP_DOWN': {}, 'SEPARATE_UP_DOWN': {}},), is_leaf=True, yang_name="threshold-specification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)


  def _get_up_thresholds(self):
    """
    Getter method for up_thresholds, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/up_thresholds (oc-types:percentage)

    YANG Description: The thresholds (expressed as a percentage of the maximum
reservable bandwidth) at which bandwidth updates are to be
triggered when the bandwidth is increasing.
    """
    return self.__up_thresholds
      
  def _set_up_thresholds(self, v, load=False):
    """
    Setter method for up_thresholds, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/up_thresholds (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_up_thresholds is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_up_thresholds() directly.

    YANG Description: The thresholds (expressed as a percentage of the maximum
reservable bandwidth) at which bandwidth updates are to be
triggered when the bandwidth is increasing.
    """
    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..100']})), is_leaf=False, yang_name="up-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """up_thresholds must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          '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..100']})), is_leaf=False, yang_name="up-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__up_thresholds = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_up_thresholds(self):
    self.__up_thresholds = 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..100']})), is_leaf=False, yang_name="up-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)


  def _get_down_thresholds(self):
    """
    Getter method for down_thresholds, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/down_thresholds (oc-types:percentage)

    YANG Description: The thresholds (expressed as a percentage of the maximum
reservable bandwidth) at which bandwidth updates are to be
triggered when the bandwidth is decreasing.
    """
    return self.__down_thresholds
      
  def _set_down_thresholds(self, v, load=False):
    """
    Setter method for down_thresholds, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/down_thresholds (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_down_thresholds is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_down_thresholds() directly.

    YANG Description: The thresholds (expressed as a percentage of the maximum
reservable bandwidth) at which bandwidth updates are to be
triggered when the bandwidth is decreasing.
    """
    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..100']})), is_leaf=False, yang_name="down-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """down_thresholds must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          '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..100']})), is_leaf=False, yang_name="down-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__down_thresholds = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_down_thresholds(self):
    self.__down_thresholds = 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..100']})), is_leaf=False, yang_name="down-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)


  def _get_up_down_thresholds(self):
    """
    Getter method for up_down_thresholds, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/up_down_thresholds (oc-types:percentage)

    YANG Description: The thresholds (expressed as a percentage of the maximum
reservable bandwidth of the interface) at which bandwidth
updates are flooded - used both when the bandwidth is
increasing and decreasing
    """
    return self.__up_down_thresholds
      
  def _set_up_down_thresholds(self, v, load=False):
    """
    Setter method for up_down_thresholds, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/up_down_thresholds (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_up_down_thresholds is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_up_down_thresholds() directly.

    YANG Description: The thresholds (expressed as a percentage of the maximum
reservable bandwidth of the interface) at which bandwidth
updates are flooded - used both when the bandwidth is
increasing and decreasing
    """
    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..100']})), is_leaf=False, yang_name="up-down-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """up_down_thresholds must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          '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..100']})), is_leaf=False, yang_name="up-down-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__up_down_thresholds = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_up_down_thresholds(self):
    self.__up_down_thresholds = 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..100']})), is_leaf=False, yang_name="up-down-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  threshold_type = __builtin__.property(_get_threshold_type, _set_threshold_type)
  delta_percentage = __builtin__.property(_get_delta_percentage, _set_delta_percentage)
  threshold_specification = __builtin__.property(_get_threshold_specification, _set_threshold_specification)
  up_thresholds = __builtin__.property(_get_up_thresholds, _set_up_thresholds)
  down_thresholds = __builtin__.property(_get_down_thresholds, _set_down_thresholds)
  up_down_thresholds = __builtin__.property(_get_up_down_thresholds, _set_up_down_thresholds)


  _pyangbind_elements = OrderedDict([('threshold_type', threshold_type), ('delta_percentage', delta_percentage), ('threshold_specification', threshold_specification), ('up_thresholds', up_thresholds), ('down_thresholds', down_thresholds), ('up_down_thresholds', up_down_thresholds), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_interface_igp_flooding_bandwidth_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/te-interface-attributes/interface/igp-flooding-bandwidth/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters for TED update threshold 
  """
  __slots__ = ('_path_helper', '_extmethods', '__threshold_type','__delta_percentage','__threshold_specification','__up_thresholds','__down_thresholds','__up_down_thresholds',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__threshold_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DELTA': {}, 'THRESHOLD_CROSSED': {}},), is_leaf=True, yang_name="threshold-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__delta_percentage = 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="delta-percentage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__threshold_specification = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'MIRRORED_UP_DOWN': {}, 'SEPARATE_UP_DOWN': {}},), is_leaf=True, yang_name="threshold-specification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__up_thresholds = 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..100']})), is_leaf=False, yang_name="up-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__down_thresholds = 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..100']})), is_leaf=False, yang_name="down-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__up_down_thresholds = 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..100']})), is_leaf=False, yang_name="up-down-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'te-interface-attributes', 'interface', 'igp-flooding-bandwidth', 'state']

  def _get_threshold_type(self):
    """
    Getter method for threshold_type, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/state/threshold_type (enumeration)

    YANG Description: The type of threshold that should be used to specify the
values at which bandwidth is flooded. DELTA indicates that
the local system should flood IGP updates when a change in
reserved bandwidth >= the specified delta occurs on the
interface. Where THRESHOLD_CROSSED is specified, the local
system should trigger an update (and hence flood) the
reserved bandwidth when the reserved bandwidth changes such
that it crosses, or becomes equal to one of the threshold
values
    """
    return self.__threshold_type
      
  def _set_threshold_type(self, v, load=False):
    """
    Setter method for threshold_type, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/state/threshold_type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_threshold_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_threshold_type() directly.

    YANG Description: The type of threshold that should be used to specify the
values at which bandwidth is flooded. DELTA indicates that
the local system should flood IGP updates when a change in
reserved bandwidth >= the specified delta occurs on the
interface. Where THRESHOLD_CROSSED is specified, the local
system should trigger an update (and hence flood) the
reserved bandwidth when the reserved bandwidth changes such
that it crosses, or becomes equal to one of the threshold
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={'DELTA': {}, 'THRESHOLD_CROSSED': {}},), is_leaf=True, yang_name="threshold-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """threshold_type must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DELTA': {}, 'THRESHOLD_CROSSED': {}},), is_leaf=True, yang_name="threshold-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__threshold_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_threshold_type(self):
    self.__threshold_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DELTA': {}, 'THRESHOLD_CROSSED': {}},), is_leaf=True, yang_name="threshold-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_delta_percentage(self):
    """
    Getter method for delta_percentage, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/state/delta_percentage (oc-types:percentage)

    YANG Description: The percentage of the maximum-reservable-bandwidth
considered as the delta that results in an IGP update
being flooded
    """
    return self.__delta_percentage
      
  def _set_delta_percentage(self, v, load=False):
    """
    Setter method for delta_percentage, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/state/delta_percentage (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_delta_percentage is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_delta_percentage() directly.

    YANG Description: The percentage of the maximum-reservable-bandwidth
considered as the delta that results in an IGP update
being flooded
    """
    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="delta-percentage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """delta_percentage 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="delta-percentage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__delta_percentage = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_delta_percentage(self):
    self.__delta_percentage = 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="delta-percentage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_threshold_specification(self):
    """
    Getter method for threshold_specification, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/state/threshold_specification (enumeration)

    YANG Description: This value specifies whether a single set of threshold
values should be used for both increasing and decreasing
bandwidth when determining whether to trigger updated
bandwidth values to be flooded in the IGP TE extensions.
MIRRORED-UP-DOWN indicates that a single value (or set of
values) should be used for both increasing and decreasing
values, where SEPARATE-UP-DOWN specifies that the increasing
and decreasing values will be separately specified
    """
    return self.__threshold_specification
      
  def _set_threshold_specification(self, v, load=False):
    """
    Setter method for threshold_specification, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/state/threshold_specification (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_threshold_specification is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_threshold_specification() directly.

    YANG Description: This value specifies whether a single set of threshold
values should be used for both increasing and decreasing
bandwidth when determining whether to trigger updated
bandwidth values to be flooded in the IGP TE extensions.
MIRRORED-UP-DOWN indicates that a single value (or set of
values) should be used for both increasing and decreasing
values, where SEPARATE-UP-DOWN specifies that the increasing
and decreasing values will be separately specified
    """
    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={'MIRRORED_UP_DOWN': {}, 'SEPARATE_UP_DOWN': {}},), is_leaf=True, yang_name="threshold-specification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """threshold_specification must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'MIRRORED_UP_DOWN': {}, 'SEPARATE_UP_DOWN': {}},), is_leaf=True, yang_name="threshold-specification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__threshold_specification = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_threshold_specification(self):
    self.__threshold_specification = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'MIRRORED_UP_DOWN': {}, 'SEPARATE_UP_DOWN': {}},), is_leaf=True, yang_name="threshold-specification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_up_thresholds(self):
    """
    Getter method for up_thresholds, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/state/up_thresholds (oc-types:percentage)

    YANG Description: The thresholds (expressed as a percentage of the maximum
reservable bandwidth) at which bandwidth updates are to be
triggered when the bandwidth is increasing.
    """
    return self.__up_thresholds
      
  def _set_up_thresholds(self, v, load=False):
    """
    Setter method for up_thresholds, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/state/up_thresholds (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_up_thresholds is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_up_thresholds() directly.

    YANG Description: The thresholds (expressed as a percentage of the maximum
reservable bandwidth) at which bandwidth updates are to be
triggered when the bandwidth is increasing.
    """
    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..100']})), is_leaf=False, yang_name="up-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """up_thresholds must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          '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..100']})), is_leaf=False, yang_name="up-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__up_thresholds = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_up_thresholds(self):
    self.__up_thresholds = 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..100']})), is_leaf=False, yang_name="up-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_down_thresholds(self):
    """
    Getter method for down_thresholds, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/state/down_thresholds (oc-types:percentage)

    YANG Description: The thresholds (expressed as a percentage of the maximum
reservable bandwidth) at which bandwidth updates are to be
triggered when the bandwidth is decreasing.
    """
    return self.__down_thresholds
      
  def _set_down_thresholds(self, v, load=False):
    """
    Setter method for down_thresholds, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/state/down_thresholds (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_down_thresholds is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_down_thresholds() directly.

    YANG Description: The thresholds (expressed as a percentage of the maximum
reservable bandwidth) at which bandwidth updates are to be
triggered when the bandwidth is decreasing.
    """
    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..100']})), is_leaf=False, yang_name="down-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """down_thresholds must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          '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..100']})), is_leaf=False, yang_name="down-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__down_thresholds = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_down_thresholds(self):
    self.__down_thresholds = 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..100']})), is_leaf=False, yang_name="down-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_up_down_thresholds(self):
    """
    Getter method for up_down_thresholds, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/state/up_down_thresholds (oc-types:percentage)

    YANG Description: The thresholds (expressed as a percentage of the maximum
reservable bandwidth of the interface) at which bandwidth
updates are flooded - used both when the bandwidth is
increasing and decreasing
    """
    return self.__up_down_thresholds
      
  def _set_up_down_thresholds(self, v, load=False):
    """
    Setter method for up_down_thresholds, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/state/up_down_thresholds (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_up_down_thresholds is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_up_down_thresholds() directly.

    YANG Description: The thresholds (expressed as a percentage of the maximum
reservable bandwidth of the interface) at which bandwidth
updates are flooded - used both when the bandwidth is
increasing and decreasing
    """
    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..100']})), is_leaf=False, yang_name="up-down-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """up_down_thresholds must be of a type compatible with oc-types:percentage""",
          'defined-type': "oc-types:percentage",
          '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..100']})), is_leaf=False, yang_name="up-down-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__up_down_thresholds = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_up_down_thresholds(self):
    self.__up_down_thresholds = 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..100']})), is_leaf=False, yang_name="up-down-thresholds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)

  threshold_type = __builtin__.property(_get_threshold_type)
  delta_percentage = __builtin__.property(_get_delta_percentage)
  threshold_specification = __builtin__.property(_get_threshold_specification)
  up_thresholds = __builtin__.property(_get_up_thresholds)
  down_thresholds = __builtin__.property(_get_down_thresholds)
  up_down_thresholds = __builtin__.property(_get_up_down_thresholds)


  _pyangbind_elements = OrderedDict([('threshold_type', threshold_type), ('delta_percentage', delta_percentage), ('threshold_specification', threshold_specification), ('up_thresholds', up_thresholds), ('down_thresholds', down_thresholds), ('up_down_thresholds', up_down_thresholds), ])


class yc_igp_flooding_bandwidth_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_interface_igp_flooding_bandwidth(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/te-interface-attributes/interface/igp-flooding-bandwidth. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Interface bandwidth change percentages
that trigger update events into the IGP traffic
engineering database (TED)
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'igp-flooding-bandwidth'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_interface_igp_flooding_bandwidth_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_interface_igp_flooding_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'te-interface-attributes', 'interface', 'igp-flooding-bandwidth']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config (container)

    YANG Description: Configuration parameters for TED
update threshold 
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/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 TED
update threshold 
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_interface_igp_flooding_bandwidth_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_interface_igp_flooding_bandwidth_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_interface_igp_flooding_bandwidth_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/state (container)

    YANG Description: State parameters for TED update threshold 
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/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 parameters for TED update threshold 
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_interface_igp_flooding_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_interface_igp_flooding_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_interface_igp_flooding_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_interface_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_interface(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/te-interface-attributes/interface. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of TE interfaces
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id','__config','__state','__interface_ref','__igp_flooding_bandwidth',)

  _yang_name = 'interface'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__interface_ref = YANGDynClass(base=yc_interface_ref_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__igp_flooding_bandwidth = YANGDynClass(base=yc_igp_flooding_bandwidth_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_interface_igp_flooding_bandwidth, is_container='container', yang_name="igp-flooding-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'te-interface-attributes', 'interface']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/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 /network_instances/network_instance/mpls/te_interface_attributes/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/config (container)

    YANG Description: Configuration parameters related to TE interfaces:
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/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 related to TE interfaces:
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/state (container)

    YANG Description: State parameters related to TE interfaces
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/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: State parameters related to TE interfaces
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_interface_ref(self):
    """
    Getter method for interface_ref, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/interface_ref (container)

    YANG Description: Reference to an interface or subinterface
    """
    return self.__interface_ref
      
  def _set_interface_ref(self, v, load=False):
    """
    Setter method for interface_ref, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/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
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interface_ref_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_igp_flooding_bandwidth(self):
    """
    Getter method for igp_flooding_bandwidth, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth (container)

    YANG Description: Interface bandwidth change percentages
that trigger update events into the IGP traffic
engineering database (TED)
    """
    return self.__igp_flooding_bandwidth
      
  def _set_igp_flooding_bandwidth(self, v, load=False):
    """
    Setter method for igp_flooding_bandwidth, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_igp_flooding_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_igp_flooding_bandwidth() directly.

    YANG Description: Interface bandwidth change percentages
that trigger update events into the IGP traffic
engineering database (TED)
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_igp_flooding_bandwidth_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_interface_igp_flooding_bandwidth, is_container='container', yang_name="igp-flooding-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """igp_flooding_bandwidth must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_igp_flooding_bandwidth_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_interface_igp_flooding_bandwidth, is_container='container', yang_name="igp-flooding-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__igp_flooding_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_igp_flooding_bandwidth(self):
    self.__igp_flooding_bandwidth = YANGDynClass(base=yc_igp_flooding_bandwidth_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_interface_igp_flooding_bandwidth, is_container='container', yang_name="igp-flooding-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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)
  igp_flooding_bandwidth = __builtin__.property(_get_igp_flooding_bandwidth, _set_igp_flooding_bandwidth)


  _pyangbind_elements = OrderedDict([('interface_id', interface_id), ('config', config), ('state', state), ('interface_ref', interface_ref), ('igp_flooding_bandwidth', igp_flooding_bandwidth), ])


class yc_te_interface_attributes_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/te-interface-attributes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: traffic engineering attributes specific
for interfaces
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface',)

  _yang_name = 'te-interface-attributes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'te-interface-attributes']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface (list)

    YANG Description: List of TE interfaces
    """
    return self.__interface
      
  def _set_interface(self, v, load=False):
    """
    Setter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/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 TE interfaces
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("interface_id",yc_interface_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  interface = __builtin__.property(_get_interface, _set_interface)


  _pyangbind_elements = OrderedDict([('interface', interface), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_record_route_objects_record_route_object_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/sessions/session/record-route-objects/record-route-object/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Information related to RRO objects. The hop, label, and
optional flags are present for each entry in the list.
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__address','__reported_label','__reported_flags',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__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}'}),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}|:))'}),], is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    self.__reported_label = 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="reported-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    self.__reported_flags = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="reported-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'sessions', 'session', 'record-route-objects', 'record-route-object', 'state']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/record_route_objects/record_route_object/state/index (uint8)

    YANG Description: Index of object in the list. Used for ordering.
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/record_route_objects/record_route_object/state/index (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: Index of object in the list. Used for ordering.
    """
    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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index must be of a type compatible with uint8""",
          'defined-type': "uint8",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_index(self):
    self.__index = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_address(self):
    """
    Getter method for address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/record_route_objects/record_route_object/state/address (inet:ip-address)

    YANG Description: IP router hop for RRO entry
    """
    return self.__address
      
  def _set_address(self, v, load=False):
    """
    Setter method for address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/record_route_objects/record_route_object/state/address (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address() directly.

    YANG Description: IP router hop for RRO entry
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)""",
        })

    self.__address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address(self):
    self.__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}'}),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}|:))'}),], is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)


  def _get_reported_label(self):
    """
    Getter method for reported_label, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/record_route_objects/record_route_object/state/reported_label (oc-mplst:mpls-label)

    YANG Description: Label reported for RRO hop
    """
    return self.__reported_label
      
  def _set_reported_label(self, v, load=False):
    """
    Setter method for reported_label, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/record_route_objects/record_route_object/state/reported_label (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_reported_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_reported_label() directly.

    YANG Description: Label reported for RRO hop
    """
    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="reported-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """reported_label must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="reported-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)""",
        })

    self.__reported_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_reported_label(self):
    self.__reported_label = 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="reported-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)


  def _get_reported_flags(self):
    """
    Getter method for reported_flags, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/record_route_objects/record_route_object/state/reported_flags (uint8)

    YANG Description: Subobject flags for MPLS label
    """
    return self.__reported_flags
      
  def _set_reported_flags(self, v, load=False):
    """
    Setter method for reported_flags, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/record_route_objects/record_route_object/state/reported_flags (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_reported_flags is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_reported_flags() directly.

    YANG Description: Subobject flags for MPLS label
    """
    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="reported-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """reported_flags 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="reported-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__reported_flags = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_reported_flags(self):
    self.__reported_flags = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="reported-flags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)

  index = __builtin__.property(_get_index)
  address = __builtin__.property(_get_address)
  reported_label = __builtin__.property(_get_reported_label)
  reported_flags = __builtin__.property(_get_reported_flags)


  _pyangbind_elements = OrderedDict([('index', index), ('address', address), ('reported_label', reported_label), ('reported_flags', reported_flags), ])


class yc_record_route_object_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_record_route_objects_record_route_object(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/sessions/session/record-route-objects/record-route-object. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Read-only list of record route objects associated with the
traffic engineered tunnel. Each entry in the list
may contain a hop IP address, MPLS label allocated
at the hop, and the flags associated with the entry.
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__state',)

  _yang_name = 'record-route-object'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_record_route_objects_record_route_object_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'sessions', 'session', 'record-route-objects', 'record-route-object']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/record_route_objects/record_route_object/index (leafref)

    YANG Description: Reference to the index of the record route object.
The index is used to indicate the ordering of hops in
the path.
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/record_route_objects/record_route_object/index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: Reference to the index of the record route object.
The index is used to indicate the ordering of hops in
the path.
    """
    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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_index(self):
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/record_route_objects/record_route_object/state (container)

    YANG Description: Information related to RRO objects. The hop, label, and
optional flags are present for each entry in the list.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/record_route_objects/record_route_object/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: Information related to RRO objects. The hop, label, and
optional flags are present for each entry in the list.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_record_route_objects_record_route_object_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_record_route_objects_record_route_object_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_record_route_objects_record_route_object_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  index = __builtin__.property(_get_index)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('index', index), ('state', state), ])


class yc_record_route_objects_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_record_route_objects(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/sessions/session/record-route-objects. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for MPLS RRO objects associated with the
traffic engineered tunnel.
  """
  __slots__ = ('_path_helper', '_extmethods', '__record_route_object',)

  _yang_name = 'record-route-objects'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__record_route_object = YANGDynClass(base=YANGListType("index",yc_record_route_object_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_record_route_objects_record_route_object, yang_name="record-route-object", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="record-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'sessions', 'session', 'record-route-objects']

  def _get_record_route_object(self):
    """
    Getter method for record_route_object, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/record_route_objects/record_route_object (list)

    YANG Description: Read-only list of record route objects associated with the
traffic engineered tunnel. Each entry in the list
may contain a hop IP address, MPLS label allocated
at the hop, and the flags associated with the entry.
    """
    return self.__record_route_object
      
  def _set_record_route_object(self, v, load=False):
    """
    Setter method for record_route_object, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/record_route_objects/record_route_object (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_record_route_object is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_record_route_object() directly.

    YANG Description: Read-only list of record route objects associated with the
traffic engineered tunnel. Each entry in the list
may contain a hop IP address, MPLS label allocated
at the hop, and the flags associated with the entry.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("index",yc_record_route_object_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_record_route_objects_record_route_object, yang_name="record-route-object", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="record-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """record_route_object must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("index",yc_record_route_object_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_record_route_objects_record_route_object, yang_name="record-route-object", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="record-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__record_route_object = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_record_route_object(self):
    self.__record_route_object = YANGDynClass(base=YANGListType("index",yc_record_route_object_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_record_route_objects_record_route_object, yang_name="record-route-object", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="record-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  record_route_object = __builtin__.property(_get_record_route_object)


  _pyangbind_elements = OrderedDict([('record_route_object', record_route_object), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_explicit_route_objects_explicit_route_object_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/sessions/session/explicit-route-objects/explicit-route-object/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Information related to the ERO index.
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__loose','__type','__ip_prefix','__asn','__label','__interface_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__loose = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="loose", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}, 'ASN': {}, 'ASN4': {}, 'LABEL': {}, 'UNNUMBERED_INTERFACE': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__ip_prefix = 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])'}),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="ip-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-prefix', is_config=False)
    self.__asn = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="asn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:as-number', is_config=False)
    self.__label = 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="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    self.__interface_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'sessions', 'session', 'explicit-route-objects', 'explicit-route-object', 'state']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects/explicit_route_object/state/index (uint64)

    YANG Description: Index of the entry in the ERO. Entries are ordered in
ascending order from the source to destination of the
LSP.
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects/explicit_route_object/state/index (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: Index of the entry in the ERO. Entries are ordered in
ascending order from the source to destination of the
LSP.
    """
    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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_index(self):
    self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_loose(self):
    """
    Getter method for loose, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects/explicit_route_object/state/loose (boolean)

    YANG Description: When set to true, indicates that the hop of the ERO is
a loose hop within the explicit route. If unset, indicates
that the hop must explicitly traverse the entity specified
in the ERO hop as the next-entity.
    """
    return self.__loose
      
  def _set_loose(self, v, load=False):
    """
    Setter method for loose, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects/explicit_route_object/state/loose (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_loose is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_loose() directly.

    YANG Description: When set to true, indicates that the hop of the ERO is
a loose hop within the explicit route. If unset, indicates
that the hop must explicitly traverse the entity specified
in the ERO hop as the next-entity.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="loose", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """loose must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="loose", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__loose = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_loose(self):
    self.__loose = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="loose", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects/explicit_route_object/state/type (enumeration)

    YANG Description: The type of hop indicated by the ERO entry.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects/explicit_route_object/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: The type of hop indicated by the ERO entry.
    """
    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': {}, 'ASN': {}, 'ASN4': {}, 'LABEL': {}, 'UNNUMBERED_INTERFACE': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}, 'ASN': {}, 'ASN4': {}, 'LABEL': {}, 'UNNUMBERED_INTERFACE': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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': {}, 'ASN': {}, 'ASN4': {}, 'LABEL': {}, 'UNNUMBERED_INTERFACE': {}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_ip_prefix(self):
    """
    Getter method for ip_prefix, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects/explicit_route_object/state/ip_prefix (inet:ip-prefix)

    YANG Description: The IPv4 or IPv6 prefix indicated by the ERO. Specified
only when the ERO hop is an IPv4 or IPv6 prefix.
    """
    return self.__ip_prefix
      
  def _set_ip_prefix(self, v, load=False):
    """
    Setter method for ip_prefix, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects/explicit_route_object/state/ip_prefix (inet:ip-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ip_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ip_prefix() directly.

    YANG Description: The IPv4 or IPv6 prefix indicated by the ERO. Specified
only when the ERO hop is an IPv4 or IPv6 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])'}),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="ip-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ip_prefix must be of a type compatible with inet:ip-prefix""",
          'defined-type': "inet:ip-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])'}),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="ip-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-prefix', is_config=False)""",
        })

    self.__ip_prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ip_prefix(self):
    self.__ip_prefix = 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])'}),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="ip-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-prefix', is_config=False)


  def _get_asn(self):
    """
    Getter method for asn, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects/explicit_route_object/state/asn (inet:as-number)

    YANG Description: The autonomous system number indicated by the ERO. Specified
only when the ERO hop is an 2 or 4-byte AS number.
    """
    return self.__asn
      
  def _set_asn(self, v, load=False):
    """
    Setter method for asn, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects/explicit_route_object/state/asn (inet:as-number)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_asn is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_asn() directly.

    YANG Description: The autonomous system number indicated by the ERO. Specified
only when the ERO hop is an 2 or 4-byte AS number.
    """
    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="asn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:as-number', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """asn must be of a type compatible with inet:as-number""",
          'defined-type': "inet:as-number",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="asn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:as-number', is_config=False)""",
        })

    self.__asn = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_asn(self):
    self.__asn = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="asn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:as-number', is_config=False)


  def _get_label(self):
    """
    Getter method for label, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects/explicit_route_object/state/label (oc-mplst:mpls-label)

    YANG Description: The MPLS label specified in the ERO hop. Specified only when
the hop is an MPLS label.
    """
    return self.__label
      
  def _set_label(self, v, load=False):
    """
    Setter method for label, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects/explicit_route_object/state/label (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_label() directly.

    YANG Description: The MPLS label specified in the ERO hop. Specified only when
the hop is an MPLS 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': ['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="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """label must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)""",
        })

    self.__label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_label(self):
    self.__label = 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="label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)


  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects/explicit_route_object/state/interface_id (uint32)

    YANG Description: The interface ID for an unnumbered interface. Specified only
when the ERO hop is a unnumbered interface.
    """
    return self.__interface_id
      
  def _set_interface_id(self, v, load=False):
    """
    Setter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects/explicit_route_object/state/interface_id (uint32)
    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: The interface ID for an unnumbered interface. Specified only
when the ERO hop is a unnumbered interface.
    """
    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="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_id 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="interface-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__interface_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_interface_id(self):
    self.__interface_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), 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/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  index = __builtin__.property(_get_index)
  loose = __builtin__.property(_get_loose)
  type = __builtin__.property(_get_type)
  ip_prefix = __builtin__.property(_get_ip_prefix)
  asn = __builtin__.property(_get_asn)
  label = __builtin__.property(_get_label)
  interface_id = __builtin__.property(_get_interface_id)


  _pyangbind_elements = OrderedDict([('index', index), ('loose', loose), ('type', type), ('ip_prefix', ip_prefix), ('asn', asn), ('label', label), ('interface_id', interface_id), ])


class yc_explicit_route_object_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_explicit_route_objects_explicit_route_object(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/sessions/session/explicit-route-objects/explicit-route-object. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Read-only list of explicit route objects associated with the
traffic-engineered tunnel. Each entry in the list contains
a hop IP address, and the MPLS label allocated at the hop.
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__state',)

  _yang_name = 'explicit-route-object'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_explicit_route_objects_explicit_route_object_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'sessions', 'session', 'explicit-route-objects', 'explicit-route-object']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects/explicit_route_object/index (leafref)

    YANG Description: Reference to the index of the entry in the explicit route
object. The index is used to indicate the ordering of hops
in the path.
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects/explicit_route_object/index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: Reference to the index of the entry in the explicit route
object. The index is used to indicate the ordering of hops
in the path.
    """
    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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_index(self):
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects/explicit_route_object/state (container)

    YANG Description: Information related to the ERO index.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects/explicit_route_object/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: Information related to the ERO index.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_explicit_route_objects_explicit_route_object_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_explicit_route_objects_explicit_route_object_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_explicit_route_objects_explicit_route_object_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  index = __builtin__.property(_get_index)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('index', index), ('state', state), ])


class yc_explicit_route_objects_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_explicit_route_objects(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/sessions/session/explicit-route-objects. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for MPLS ERO objects associated
with the traffic engineered tunnel.
  """
  __slots__ = ('_path_helper', '_extmethods', '__explicit_route_object',)

  _yang_name = 'explicit-route-objects'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__explicit_route_object = YANGDynClass(base=YANGListType("index",yc_explicit_route_object_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_explicit_route_objects_explicit_route_object, yang_name="explicit-route-object", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="explicit-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'sessions', 'session', 'explicit-route-objects']

  def _get_explicit_route_object(self):
    """
    Getter method for explicit_route_object, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects/explicit_route_object (list)

    YANG Description: Read-only list of explicit route objects associated with the
traffic-engineered tunnel. Each entry in the list contains
a hop IP address, and the MPLS label allocated at the hop.
    """
    return self.__explicit_route_object
      
  def _set_explicit_route_object(self, v, load=False):
    """
    Setter method for explicit_route_object, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects/explicit_route_object (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_explicit_route_object is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_explicit_route_object() directly.

    YANG Description: Read-only list of explicit route objects associated with the
traffic-engineered tunnel. Each entry in the list contains
a hop IP address, and the MPLS label allocated at the hop.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("index",yc_explicit_route_object_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_explicit_route_objects_explicit_route_object, yang_name="explicit-route-object", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="explicit-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """explicit_route_object must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("index",yc_explicit_route_object_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_explicit_route_objects_explicit_route_object, yang_name="explicit-route-object", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="explicit-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__explicit_route_object = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_explicit_route_object(self):
    self.__explicit_route_object = YANGDynClass(base=YANGListType("index",yc_explicit_route_object_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_explicit_route_objects_explicit_route_object, yang_name="explicit-route-object", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="explicit-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  explicit_route_object = __builtin__.property(_get_explicit_route_object)


  _pyangbind_elements = OrderedDict([('explicit_route_object', explicit_route_object), ])


class yc_sender_tspec_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_state_sender_tspec(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/sessions/session/state/sender-tspec. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state statistics relating to the SENDER_TSPEC
received for the RSVP session
  """
  __slots__ = ('_path_helper', '_extmethods', '__rate','__size','__peak_data_rate',)

  _yang_name = 'sender-tspec'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__rate = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="rate", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    self.__size = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    self.__peak_data_rate = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="peak-data-rate", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'sessions', 'session', 'state', 'sender-tspec']

  def _get_rate(self):
    """
    Getter method for rate, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/sender_tspec/rate (oc-types:ieeefloat32)

    YANG Description: The rate at which the head-end device generates traffic,
expressed in bytes per second.
    """
    return self.__rate
      
  def _set_rate(self, v, load=False):
    """
    Setter method for rate, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/sender_tspec/rate (oc-types:ieeefloat32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_rate is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_rate() directly.

    YANG Description: The rate at which the head-end device generates traffic,
expressed in bytes per second.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="rate", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """rate must be of a type compatible with oc-types:ieeefloat32""",
          'defined-type': "oc-types:ieeefloat32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="rate", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)""",
        })

    self.__rate = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_rate(self):
    self.__rate = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="rate", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)


  def _get_size(self):
    """
    Getter method for size, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/sender_tspec/size (oc-types:ieeefloat32)

    YANG Description: The size of the token bucket that is used to determine
the rate at which the head-end device generates traffic,
expressed in bytes per second.
    """
    return self.__size
      
  def _set_size(self, v, load=False):
    """
    Setter method for size, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/sender_tspec/size (oc-types:ieeefloat32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_size is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_size() directly.

    YANG Description: The size of the token bucket that is used to determine
the rate at which the head-end device generates traffic,
expressed in bytes per second.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """size must be of a type compatible with oc-types:ieeefloat32""",
          'defined-type': "oc-types:ieeefloat32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)""",
        })

    self.__size = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_size(self):
    self.__size = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)


  def _get_peak_data_rate(self):
    """
    Getter method for peak_data_rate, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/sender_tspec/peak_data_rate (oc-types:ieeefloat32)

    YANG Description: The maximum traffic generation rate that the head-end
device sends traffic at.
    """
    return self.__peak_data_rate
      
  def _set_peak_data_rate(self, v, load=False):
    """
    Setter method for peak_data_rate, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/sender_tspec/peak_data_rate (oc-types:ieeefloat32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peak_data_rate is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peak_data_rate() directly.

    YANG Description: The maximum traffic generation rate that the head-end
device sends traffic at.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="peak-data-rate", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peak_data_rate must be of a type compatible with oc-types:ieeefloat32""",
          'defined-type': "oc-types:ieeefloat32",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="peak-data-rate", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)""",
        })

    self.__peak_data_rate = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peak_data_rate(self):
    self.__peak_data_rate = YANGDynClass(base=RestrictedClassType(base_type=bitarray, restriction_dict={'length': ['4']}), is_leaf=True, yang_name="peak-data-rate", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:ieeefloat32', is_config=False)

  rate = __builtin__.property(_get_rate)
  size = __builtin__.property(_get_size)
  peak_data_rate = __builtin__.property(_get_peak_data_rate)


  _pyangbind_elements = OrderedDict([('rate', rate), ('size', size), ('peak_data_rate', peak_data_rate), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/sessions/session/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
RSVP session
  """
  __slots__ = ('_path_helper', '_extmethods', '__local_index','__source_address','__destination_address','__tunnel_id','__lsp_id','__session_name','__status','__type','__protection_requested','__label_in','__label_out','__sender_tspec',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__local_index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="local-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=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}'}),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}|:))'}),], 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/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', 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}'}),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}|:))'}),], 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/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    self.__tunnel_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="tunnel-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__lsp_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="lsp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__session_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="session-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UP': {}, 'DOWN': {}},), is_leaf=True, yang_name="status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__protection_requested = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="protection-requested", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__label_in = 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="label-in", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    self.__label_out = 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="label-out", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    self.__sender_tspec = YANGDynClass(base=yc_sender_tspec_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_state_sender_tspec, is_container='container', yang_name="sender-tspec", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'sessions', 'session', 'state']

  def _get_local_index(self):
    """
    Getter method for local_index, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/local_index (uint64)

    YANG Description: The index used to identify the RSVP session
on the local network element. This index is
generated by the device and is unique only
to the local network element.
    """
    return self.__local_index
      
  def _set_local_index(self, v, load=False):
    """
    Setter method for local_index, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/local_index (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_index() directly.

    YANG Description: The index used to identify the RSVP session
on the local network element. This index is
generated by the device and is unique only
to the local network element.
    """
    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="local-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_index 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="local-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__local_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_index(self):
    self.__local_index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="local-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_source_address(self):
    """
    Getter method for source_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/source_address (inet:ip-address)

    YANG Description: Origin address of RSVP session
    """
    return self.__source_address
      
  def _set_source_address(self, v, load=False):
    """
    Setter method for source_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/source_address (inet:ip-address)
    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: Origin address of RSVP session
    """
    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}'}),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}|:))'}),], 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/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source_address must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], 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/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', 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}'}),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}|:))'}),], 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/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)


  def _get_destination_address(self):
    """
    Getter method for destination_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/destination_address (inet:ip-address)

    YANG Description: Destination address of RSVP session
    """
    return self.__destination_address
      
  def _set_destination_address(self, v, load=False):
    """
    Setter method for destination_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/destination_address (inet:ip-address)
    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 address of RSVP session
    """
    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}'}),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}|:))'}),], 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/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination_address must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], 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/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', 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}'}),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}|:))'}),], 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/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)


  def _get_tunnel_id(self):
    """
    Getter method for tunnel_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/tunnel_id (uint16)

    YANG Description: The tunnel ID is an identifier used in the
RSVP session, which remains constant over
the life of the tunnel.
    """
    return self.__tunnel_id
      
  def _set_tunnel_id(self, v, load=False):
    """
    Setter method for tunnel_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/tunnel_id (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tunnel_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tunnel_id() directly.

    YANG Description: The tunnel ID is an identifier used in the
RSVP session, which remains constant over
the life of the tunnel.
    """
    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="tunnel-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tunnel_id 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="tunnel-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__tunnel_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tunnel_id(self):
    self.__tunnel_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="tunnel-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_lsp_id(self):
    """
    Getter method for lsp_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/lsp_id (uint16)

    YANG Description: The LSP ID distinguishes between two LSPs
originated from the same headend, and is
commonly used to distinguish RSVP sessions
during make before break operations.
    """
    return self.__lsp_id
      
  def _set_lsp_id(self, v, load=False):
    """
    Setter method for lsp_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/lsp_id (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsp_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsp_id() directly.

    YANG Description: The LSP ID distinguishes between two LSPs
originated from the same headend, and is
commonly used to distinguish RSVP sessions
during make before break operations.
    """
    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="lsp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsp_id 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="lsp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__lsp_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsp_id(self):
    self.__lsp_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="lsp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_session_name(self):
    """
    Getter method for session_name, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/session_name (string)

    YANG Description: The signaled name of this RSVP session.
    """
    return self.__session_name
      
  def _set_session_name(self, v, load=False):
    """
    Setter method for session_name, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/session_name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_session_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_session_name() directly.

    YANG Description: The signaled name of this RSVP session.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="session-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """session_name must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="session-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__session_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_session_name(self):
    self.__session_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="session-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_status(self):
    """
    Getter method for status, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/status (enumeration)

    YANG Description: Enumeration of RSVP session states
    """
    return self.__status
      
  def _set_status(self, v, load=False):
    """
    Setter method for status, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/status (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_status is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_status() directly.

    YANG Description: Enumeration of RSVP session states
    """
    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={'UP': {}, 'DOWN': {}},), is_leaf=True, yang_name="status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """status must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UP': {}, 'DOWN': {}},), is_leaf=True, yang_name="status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__status = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_status(self):
    self.__status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UP': {}, 'DOWN': {}},), is_leaf=True, yang_name="status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/type (identityref)

    YANG Description: The type/role of the RSVP session, signifing
the session's role on the current device, such as
a transit session vs. an ingress session.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/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: The type/role of the RSVP session, signifing
the session's role on the current device, such as
a transit session vs. an ingress session.
    """
    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={'INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', 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={'INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_protection_requested(self):
    """
    Getter method for protection_requested, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/protection_requested (identityref)

    YANG Description: The type of protection requested for the RSVP session
    """
    return self.__protection_requested
      
  def _set_protection_requested(self, v, load=False):
    """
    Setter method for protection_requested, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/protection_requested (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_protection_requested is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_protection_requested() directly.

    YANG Description: The type of protection requested for the RSVP session
    """
    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={'UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="protection-requested", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """protection_requested must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="protection-requested", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__protection_requested = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_protection_requested(self):
    self.__protection_requested = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="protection-requested", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_label_in(self):
    """
    Getter method for label_in, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/label_in (oc-mplst:mpls-label)

    YANG Description: Incoming MPLS label associated with this RSVP session
    """
    return self.__label_in
      
  def _set_label_in(self, v, load=False):
    """
    Setter method for label_in, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/label_in (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_label_in is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_label_in() directly.

    YANG Description: Incoming MPLS label associated with this RSVP session
    """
    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="label-in", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """label_in must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="label-in", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)""",
        })

    self.__label_in = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_label_in(self):
    self.__label_in = 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="label-in", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)


  def _get_label_out(self):
    """
    Getter method for label_out, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/label_out (oc-mplst:mpls-label)

    YANG Description: Outgoing MPLS label associated with this RSVP session
    """
    return self.__label_out
      
  def _set_label_out(self, v, load=False):
    """
    Setter method for label_out, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/label_out (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_label_out is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_label_out() directly.

    YANG Description: Outgoing MPLS label associated with this RSVP session
    """
    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="label-out", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """label_out must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="label-out", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)""",
        })

    self.__label_out = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_label_out(self):
    self.__label_out = 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="label-out", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)


  def _get_sender_tspec(self):
    """
    Getter method for sender_tspec, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/sender_tspec (container)

    YANG Description: Operational state statistics relating to the SENDER_TSPEC
received for the RSVP session
    """
    return self.__sender_tspec
      
  def _set_sender_tspec(self, v, load=False):
    """
    Setter method for sender_tspec, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state/sender_tspec (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sender_tspec is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sender_tspec() directly.

    YANG Description: Operational state statistics relating to the SENDER_TSPEC
received for the RSVP session
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_sender_tspec_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_state_sender_tspec, is_container='container', yang_name="sender-tspec", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sender_tspec must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_sender_tspec_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_state_sender_tspec, is_container='container', yang_name="sender-tspec", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__sender_tspec = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sender_tspec(self):
    self.__sender_tspec = YANGDynClass(base=yc_sender_tspec_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_state_sender_tspec, is_container='container', yang_name="sender-tspec", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  local_index = __builtin__.property(_get_local_index)
  source_address = __builtin__.property(_get_source_address)
  destination_address = __builtin__.property(_get_destination_address)
  tunnel_id = __builtin__.property(_get_tunnel_id)
  lsp_id = __builtin__.property(_get_lsp_id)
  session_name = __builtin__.property(_get_session_name)
  status = __builtin__.property(_get_status)
  type = __builtin__.property(_get_type)
  protection_requested = __builtin__.property(_get_protection_requested)
  label_in = __builtin__.property(_get_label_in)
  label_out = __builtin__.property(_get_label_out)
  sender_tspec = __builtin__.property(_get_sender_tspec)


  _pyangbind_elements = OrderedDict([('local_index', local_index), ('source_address', source_address), ('destination_address', destination_address), ('tunnel_id', tunnel_id), ('lsp_id', lsp_id), ('session_name', session_name), ('status', status), ('type', type), ('protection_requested', protection_requested), ('label_in', label_in), ('label_out', label_out), ('sender_tspec', sender_tspec), ])


class yc_session_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/sessions/session. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of RSVP sessions
  """
  __slots__ = ('_path_helper', '_extmethods', '__local_index','__record_route_objects','__explicit_route_objects','__state',)

  _yang_name = 'session'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__local_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__record_route_objects = YANGDynClass(base=yc_record_route_objects_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_record_route_objects, is_container='container', yang_name="record-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__explicit_route_objects = YANGDynClass(base=yc_explicit_route_objects_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_explicit_route_objects, is_container='container', yang_name="explicit-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'sessions', 'session']

  def _get_local_index(self):
    """
    Getter method for local_index, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/local_index (leafref)

    YANG Description: Reference to the local index for the RSVP
session
    """
    return self.__local_index
      
  def _set_local_index(self, v, load=False):
    """
    Setter method for local_index, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/local_index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_index() directly.

    YANG Description: Reference to the local index for the RSVP
session
    """
    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="local-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__local_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_index(self):
    self.__local_index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_record_route_objects(self):
    """
    Getter method for record_route_objects, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/record_route_objects (container)

    YANG Description: Enclosing container for MPLS RRO objects associated with the
traffic engineered tunnel.
    """
    return self.__record_route_objects
      
  def _set_record_route_objects(self, v, load=False):
    """
    Setter method for record_route_objects, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/record_route_objects (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_record_route_objects is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_record_route_objects() directly.

    YANG Description: Enclosing container for MPLS RRO objects associated with the
traffic engineered tunnel.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_record_route_objects_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_record_route_objects, is_container='container', yang_name="record-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """record_route_objects must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_record_route_objects_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_record_route_objects, is_container='container', yang_name="record-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__record_route_objects = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_record_route_objects(self):
    self.__record_route_objects = YANGDynClass(base=yc_record_route_objects_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_record_route_objects, is_container='container', yang_name="record-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_explicit_route_objects(self):
    """
    Getter method for explicit_route_objects, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects (container)

    YANG Description: Enclosing container for MPLS ERO objects associated
with the traffic engineered tunnel.
    """
    return self.__explicit_route_objects
      
  def _set_explicit_route_objects(self, v, load=False):
    """
    Setter method for explicit_route_objects, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/explicit_route_objects (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_explicit_route_objects is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_explicit_route_objects() directly.

    YANG Description: Enclosing container for MPLS ERO objects associated
with the traffic engineered tunnel.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_explicit_route_objects_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_explicit_route_objects, is_container='container', yang_name="explicit-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """explicit_route_objects must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_explicit_route_objects_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_explicit_route_objects, is_container='container', yang_name="explicit-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__explicit_route_objects = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_explicit_route_objects(self):
    self.__explicit_route_objects = YANGDynClass(base=yc_explicit_route_objects_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_explicit_route_objects, is_container='container', yang_name="explicit-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/state (container)

    YANG Description: Operational state parameters relating to the
RSVP session
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session/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
RSVP session
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  local_index = __builtin__.property(_get_local_index)
  record_route_objects = __builtin__.property(_get_record_route_objects)
  explicit_route_objects = __builtin__.property(_get_explicit_route_objects)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('local_index', local_index), ('record_route_objects', record_route_objects), ('explicit_route_objects', explicit_route_objects), ('state', state), ])


class yc_sessions_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/sessions. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for sessions
  """
  __slots__ = ('_path_helper', '_extmethods', '__session',)

  _yang_name = 'sessions'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__session = YANGDynClass(base=YANGListType("local_index",yc_session_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session, yang_name="session", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='local-index', extensions=None), is_container='list', yang_name="session", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'sessions']

  def _get_session(self):
    """
    Getter method for session, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session (list)

    YANG Description: List of RSVP sessions
    """
    return self.__session
      
  def _set_session(self, v, load=False):
    """
    Setter method for session, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions/session (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_session is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_session() directly.

    YANG Description: List of RSVP sessions
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("local_index",yc_session_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session, yang_name="session", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='local-index', extensions=None), is_container='list', yang_name="session", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """session must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("local_index",yc_session_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session, yang_name="session", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='local-index', extensions=None), is_container='list', yang_name="session", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__session = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_session(self):
    self.__session = YANGDynClass(base=YANGListType("local_index",yc_session_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions_session, yang_name="session", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='local-index', extensions=None), is_container='list', yang_name="session", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  session = __builtin__.property(_get_session, _set_session)


  _pyangbind_elements = OrderedDict([('session', session), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_neighbors_neighbor_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/neighbors/neighbor/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
RSVP neighbor
  """
  __slots__ = ('_path_helper', '_extmethods', '__address','__detected_interface','__neighbor_status','__refresh_reduction',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__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}'}),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}|:))'}),], is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    self.__detected_interface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="detected-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__neighbor_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UP': {}, 'DOWN': {}},), is_leaf=True, yang_name="neighbor-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__refresh_reduction = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="refresh-reduction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'neighbors', 'neighbor', 'state']

  def _get_address(self):
    """
    Getter method for address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/neighbors/neighbor/state/address (inet:ip-address)

    YANG Description: Address of RSVP neighbor
    """
    return self.__address
      
  def _set_address(self, v, load=False):
    """
    Setter method for address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/neighbors/neighbor/state/address (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address() directly.

    YANG Description: Address of RSVP neighbor
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)""",
        })

    self.__address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address(self):
    self.__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}'}),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}|:))'}),], is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)


  def _get_detected_interface(self):
    """
    Getter method for detected_interface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/neighbors/neighbor/state/detected_interface (string)

    YANG Description: Interface where RSVP neighbor was detected
    """
    return self.__detected_interface
      
  def _set_detected_interface(self, v, load=False):
    """
    Setter method for detected_interface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/neighbors/neighbor/state/detected_interface (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_detected_interface is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_detected_interface() directly.

    YANG Description: Interface where RSVP neighbor was detected
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="detected-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """detected_interface must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="detected-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__detected_interface = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_detected_interface(self):
    self.__detected_interface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="detected-interface", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_neighbor_status(self):
    """
    Getter method for neighbor_status, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/neighbors/neighbor/state/neighbor_status (enumeration)

    YANG Description: Enumuration of possible RSVP neighbor states
    """
    return self.__neighbor_status
      
  def _set_neighbor_status(self, v, load=False):
    """
    Setter method for neighbor_status, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/neighbors/neighbor/state/neighbor_status (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor_status is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor_status() directly.

    YANG Description: Enumuration of possible RSVP neighbor states
    """
    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={'UP': {}, 'DOWN': {}},), is_leaf=True, yang_name="neighbor-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor_status must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UP': {}, 'DOWN': {}},), is_leaf=True, yang_name="neighbor-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__neighbor_status = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor_status(self):
    self.__neighbor_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'UP': {}, 'DOWN': {}},), is_leaf=True, yang_name="neighbor-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_refresh_reduction(self):
    """
    Getter method for refresh_reduction, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/neighbors/neighbor/state/refresh_reduction (boolean)

    YANG Description: Suppport of neighbor for RSVP refresh reduction
    """
    return self.__refresh_reduction
      
  def _set_refresh_reduction(self, v, load=False):
    """
    Setter method for refresh_reduction, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/neighbors/neighbor/state/refresh_reduction (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_refresh_reduction is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_refresh_reduction() directly.

    YANG Description: Suppport of neighbor for RSVP refresh reduction
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="refresh-reduction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """refresh_reduction must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="refresh-reduction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__refresh_reduction = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_refresh_reduction(self):
    self.__refresh_reduction = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="refresh-reduction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  address = __builtin__.property(_get_address)
  detected_interface = __builtin__.property(_get_detected_interface)
  neighbor_status = __builtin__.property(_get_neighbor_status)
  refresh_reduction = __builtin__.property(_get_refresh_reduction)


  _pyangbind_elements = OrderedDict([('address', address), ('detected_interface', detected_interface), ('neighbor_status', neighbor_status), ('refresh_reduction', refresh_reduction), ])


class yc_neighbor_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_neighbors_neighbor(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/neighbors/neighbor. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of RSVP neighbors of the local system
  """
  __slots__ = ('_path_helper', '_extmethods', '__address','__state',)

  _yang_name = 'neighbor'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'neighbors', 'neighbor']

  def _get_address(self):
    """
    Getter method for address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/neighbors/neighbor/address (leafref)

    YANG Description: Reference to the address of the RSVP neighbor
    """
    return self.__address
      
  def _set_address(self, v, load=False):
    """
    Setter method for address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/neighbors/neighbor/address (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address() directly.

    YANG Description: Reference to the address of the RSVP neighbor
    """
    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="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address(self):
    self.__address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/neighbors/neighbor/state (container)

    YANG Description: Operational state parameters relating to the
RSVP neighbor
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/neighbors/neighbor/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
RSVP neighbor
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  address = __builtin__.property(_get_address)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('address', address), ('state', state), ])


class yc_neighbors_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_neighbors(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/neighbors. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration and state for RSVP neighbors connecting
to the device
  """
  __slots__ = ('_path_helper', '_extmethods', '__neighbor',)

  _yang_name = 'neighbors'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__neighbor = YANGDynClass(base=YANGListType("address",yc_neighbor_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='address', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'neighbors']

  def _get_neighbor(self):
    """
    Getter method for neighbor, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/neighbors/neighbor (list)

    YANG Description: List of RSVP neighbors of the local system
    """
    return self.__neighbor
      
  def _set_neighbor(self, v, load=False):
    """
    Setter method for neighbor, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/neighbors/neighbor (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor() directly.

    YANG Description: List of RSVP neighbors of the local system
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("address",yc_neighbor_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='address', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("address",yc_neighbor_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='address', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__neighbor = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor(self):
    self.__neighbor = YANGDynClass(base=YANGListType("address",yc_neighbor_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='address', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  neighbor = __builtin__.property(_get_neighbor, _set_neighbor)


  _pyangbind_elements = OrderedDict([('neighbor', neighbor), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_graceful_restart_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/global/graceful-restart/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to
graceful-restart
  """
  __slots__ = ('_path_helper', '_extmethods', '__enable','__restart_time','__recovery_time',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__restart_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__recovery_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="recovery-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'global', 'graceful-restart', 'config']

  def _get_enable(self):
    """
    Getter method for enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/graceful_restart/config/enable (boolean)

    YANG Description: Enables graceful restart on the node.
    """
    return self.__enable
      
  def _set_enable(self, v, load=False):
    """
    Setter method for enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/graceful_restart/config/enable (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable() directly.

    YANG Description: Enables graceful restart on the node.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable 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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enable = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable(self):
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_restart_time(self):
    """
    Getter method for restart_time, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/graceful_restart/config/restart_time (uint32)

    YANG Description: Graceful restart time (seconds).
    """
    return self.__restart_time
      
  def _set_restart_time(self, v, load=False):
    """
    Setter method for restart_time, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/graceful_restart/config/restart_time (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_restart_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_restart_time() directly.

    YANG Description: Graceful restart time (seconds).
    """
    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="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """restart_time 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="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__restart_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_restart_time(self):
    self.__restart_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_recovery_time(self):
    """
    Getter method for recovery_time, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/graceful_restart/config/recovery_time (uint32)

    YANG Description: RSVP state recovery time
    """
    return self.__recovery_time
      
  def _set_recovery_time(self, v, load=False):
    """
    Setter method for recovery_time, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/graceful_restart/config/recovery_time (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_recovery_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_recovery_time() directly.

    YANG Description: RSVP state recovery time
    """
    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="recovery-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """recovery_time 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="recovery-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__recovery_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_recovery_time(self):
    self.__recovery_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="recovery-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)

  enable = __builtin__.property(_get_enable, _set_enable)
  restart_time = __builtin__.property(_get_restart_time, _set_restart_time)
  recovery_time = __builtin__.property(_get_recovery_time, _set_recovery_time)


  _pyangbind_elements = OrderedDict([('enable', enable), ('restart_time', restart_time), ('recovery_time', recovery_time), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_graceful_restart_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/global/graceful-restart/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information associated with
RSVP graceful-restart
  """
  __slots__ = ('_path_helper', '_extmethods', '__enable','__restart_time','__recovery_time',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__restart_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__recovery_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="recovery-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'global', 'graceful-restart', 'state']

  def _get_enable(self):
    """
    Getter method for enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/graceful_restart/state/enable (boolean)

    YANG Description: Enables graceful restart on the node.
    """
    return self.__enable
      
  def _set_enable(self, v, load=False):
    """
    Setter method for enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/graceful_restart/state/enable (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable() directly.

    YANG Description: Enables graceful restart on the node.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable 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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enable = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable(self):
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_restart_time(self):
    """
    Getter method for restart_time, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/graceful_restart/state/restart_time (uint32)

    YANG Description: Graceful restart time (seconds).
    """
    return self.__restart_time
      
  def _set_restart_time(self, v, load=False):
    """
    Setter method for restart_time, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/graceful_restart/state/restart_time (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_restart_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_restart_time() directly.

    YANG Description: Graceful restart time (seconds).
    """
    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="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """restart_time 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="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__restart_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_restart_time(self):
    self.__restart_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restart-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_recovery_time(self):
    """
    Getter method for recovery_time, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/graceful_restart/state/recovery_time (uint32)

    YANG Description: RSVP state recovery time
    """
    return self.__recovery_time
      
  def _set_recovery_time(self, v, load=False):
    """
    Setter method for recovery_time, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/graceful_restart/state/recovery_time (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_recovery_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_recovery_time() directly.

    YANG Description: RSVP state recovery time
    """
    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="recovery-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """recovery_time 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="recovery-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__recovery_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_recovery_time(self):
    self.__recovery_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="recovery-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  enable = __builtin__.property(_get_enable)
  restart_time = __builtin__.property(_get_restart_time)
  recovery_time = __builtin__.property(_get_recovery_time)


  _pyangbind_elements = OrderedDict([('enable', enable), ('restart_time', restart_time), ('recovery_time', recovery_time), ])


class yc_graceful_restart_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_graceful_restart(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/global/graceful-restart. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state and configuration parameters relating to
graceful-restart for RSVP
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'graceful-restart'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'global', 'graceful-restart']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/graceful_restart/config (container)

    YANG Description: Configuration parameters relating to
graceful-restart
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/graceful_restart/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
graceful-restart
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/graceful_restart/state (container)

    YANG Description: State information associated with
RSVP graceful-restart
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/graceful_restart/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 associated with
RSVP graceful-restart
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_soft_preemption_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/global/soft-preemption/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to RSVP
soft preemption support
  """
  __slots__ = ('_path_helper', '_extmethods', '__enable','__soft_preemption_timeout',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__soft_preemption_timeout = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..max']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="soft-preemption-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'global', 'soft-preemption', 'config']

  def _get_enable(self):
    """
    Getter method for enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/soft_preemption/config/enable (boolean)

    YANG Description: Enables soft preemption on a node.
    """
    return self.__enable
      
  def _set_enable(self, v, load=False):
    """
    Setter method for enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/soft_preemption/config/enable (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable() directly.

    YANG Description: Enables soft preemption on a node.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable 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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enable = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable(self):
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_soft_preemption_timeout(self):
    """
    Getter method for soft_preemption_timeout, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/soft_preemption/config/soft_preemption_timeout (uint16)

    YANG Description: Timeout value for soft preemption to revert
to hard preemption. The default timeout for
soft-preemption is 30 seconds - after which
the local system reverts to hard pre-emption.
    """
    return self.__soft_preemption_timeout
      
  def _set_soft_preemption_timeout(self, v, load=False):
    """
    Setter method for soft_preemption_timeout, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/soft_preemption/config/soft_preemption_timeout (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_soft_preemption_timeout is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_soft_preemption_timeout() directly.

    YANG Description: Timeout value for soft preemption to revert
to hard preemption. The default timeout for
soft-preemption is 30 seconds - after which
the local system reverts to hard pre-emption.
    """
    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': ['0..max']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="soft-preemption-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """soft_preemption_timeout must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..max']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="soft-preemption-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__soft_preemption_timeout = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_soft_preemption_timeout(self):
    self.__soft_preemption_timeout = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..max']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="soft-preemption-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

  enable = __builtin__.property(_get_enable, _set_enable)
  soft_preemption_timeout = __builtin__.property(_get_soft_preemption_timeout, _set_soft_preemption_timeout)


  _pyangbind_elements = OrderedDict([('enable', enable), ('soft_preemption_timeout', soft_preemption_timeout), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_soft_preemption_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/global/soft-preemption/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to RSVP
soft preemption support
  """
  __slots__ = ('_path_helper', '_extmethods', '__enable','__soft_preemption_timeout',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__soft_preemption_timeout = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..max']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="soft-preemption-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'global', 'soft-preemption', 'state']

  def _get_enable(self):
    """
    Getter method for enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/soft_preemption/state/enable (boolean)

    YANG Description: Enables soft preemption on a node.
    """
    return self.__enable
      
  def _set_enable(self, v, load=False):
    """
    Setter method for enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/soft_preemption/state/enable (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable() directly.

    YANG Description: Enables soft preemption on a node.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable 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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enable = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable(self):
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_soft_preemption_timeout(self):
    """
    Getter method for soft_preemption_timeout, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/soft_preemption/state/soft_preemption_timeout (uint16)

    YANG Description: Timeout value for soft preemption to revert
to hard preemption. The default timeout for
soft-preemption is 30 seconds - after which
the local system reverts to hard pre-emption.
    """
    return self.__soft_preemption_timeout
      
  def _set_soft_preemption_timeout(self, v, load=False):
    """
    Setter method for soft_preemption_timeout, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/soft_preemption/state/soft_preemption_timeout (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_soft_preemption_timeout is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_soft_preemption_timeout() directly.

    YANG Description: Timeout value for soft preemption to revert
to hard preemption. The default timeout for
soft-preemption is 30 seconds - after which
the local system reverts to hard pre-emption.
    """
    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': ['0..max']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="soft-preemption-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """soft_preemption_timeout must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..max']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="soft-preemption-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__soft_preemption_timeout = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_soft_preemption_timeout(self):
    self.__soft_preemption_timeout = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['0..max']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(30), is_leaf=True, yang_name="soft-preemption-timeout", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  enable = __builtin__.property(_get_enable)
  soft_preemption_timeout = __builtin__.property(_get_soft_preemption_timeout)


  _pyangbind_elements = OrderedDict([('enable', enable), ('soft_preemption_timeout', soft_preemption_timeout), ])


class yc_soft_preemption_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_soft_preemption(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/global/soft-preemption. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Protocol options relating to RSVP
soft preemption
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'soft-preemption'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_soft_preemption_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_soft_preemption_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'global', 'soft-preemption']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/soft_preemption/config (container)

    YANG Description: Configuration parameters relating to RSVP
soft preemption support
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/soft_preemption/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 RSVP
soft preemption support
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_soft_preemption_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_soft_preemption_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_soft_preemption_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/soft_preemption/state (container)

    YANG Description: State parameters relating to RSVP
soft preemption support
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/soft_preemption/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 parameters relating to RSVP
soft preemption support
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_soft_preemption_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_soft_preemption_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_soft_preemption_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_hellos_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/global/hellos/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to RSVP
hellos
  """
  __slots__ = ('_path_helper', '_extmethods', '__hello_interval','__refresh_reduction',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1000..60000']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(9000), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__refresh_reduction = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="refresh-reduction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'global', 'hellos', 'config']

  def _get_hello_interval(self):
    """
    Getter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/hellos/config/hello_interval (uint16)

    YANG Description: set the interval in ms between RSVP hello
messages
    """
    return self.__hello_interval
      
  def _set_hello_interval(self, v, load=False):
    """
    Setter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/hellos/config/hello_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_interval() directly.

    YANG Description: set the interval in ms between RSVP hello
messages
    """
    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': ['1000..60000']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(9000), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_interval must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1000..60000']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(9000), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__hello_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_interval(self):
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1000..60000']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(9000), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_refresh_reduction(self):
    """
    Getter method for refresh_reduction, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/hellos/config/refresh_reduction (boolean)

    YANG Description: enables all RSVP refresh reduction message
bundling, RSVP message ID, reliable message delivery
and summary refresh
    """
    return self.__refresh_reduction
      
  def _set_refresh_reduction(self, v, load=False):
    """
    Setter method for refresh_reduction, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/hellos/config/refresh_reduction (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_refresh_reduction is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_refresh_reduction() directly.

    YANG Description: enables all RSVP refresh reduction message
bundling, RSVP message ID, reliable message delivery
and summary refresh
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="refresh-reduction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """refresh_reduction must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="refresh-reduction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__refresh_reduction = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_refresh_reduction(self):
    self.__refresh_reduction = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="refresh-reduction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  hello_interval = __builtin__.property(_get_hello_interval, _set_hello_interval)
  refresh_reduction = __builtin__.property(_get_refresh_reduction, _set_refresh_reduction)


  _pyangbind_elements = OrderedDict([('hello_interval', hello_interval), ('refresh_reduction', refresh_reduction), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_hellos_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/global/hellos/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information associated with RSVP hellos
  """
  __slots__ = ('_path_helper', '_extmethods', '__hello_interval','__refresh_reduction',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1000..60000']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(9000), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__refresh_reduction = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="refresh-reduction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'global', 'hellos', 'state']

  def _get_hello_interval(self):
    """
    Getter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/hellos/state/hello_interval (uint16)

    YANG Description: set the interval in ms between RSVP hello
messages
    """
    return self.__hello_interval
      
  def _set_hello_interval(self, v, load=False):
    """
    Setter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/hellos/state/hello_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_interval() directly.

    YANG Description: set the interval in ms between RSVP hello
messages
    """
    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': ['1000..60000']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(9000), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_interval must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1000..60000']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(9000), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__hello_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_interval(self):
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1000..60000']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(9000), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_refresh_reduction(self):
    """
    Getter method for refresh_reduction, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/hellos/state/refresh_reduction (boolean)

    YANG Description: enables all RSVP refresh reduction message
bundling, RSVP message ID, reliable message delivery
and summary refresh
    """
    return self.__refresh_reduction
      
  def _set_refresh_reduction(self, v, load=False):
    """
    Setter method for refresh_reduction, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/hellos/state/refresh_reduction (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_refresh_reduction is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_refresh_reduction() directly.

    YANG Description: enables all RSVP refresh reduction message
bundling, RSVP message ID, reliable message delivery
and summary refresh
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="refresh-reduction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """refresh_reduction must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="refresh-reduction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__refresh_reduction = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_refresh_reduction(self):
    self.__refresh_reduction = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="refresh-reduction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  hello_interval = __builtin__.property(_get_hello_interval)
  refresh_reduction = __builtin__.property(_get_refresh_reduction)


  _pyangbind_elements = OrderedDict([('hello_interval', hello_interval), ('refresh_reduction', refresh_reduction), ])


class yc_hellos_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_hellos(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/global/hellos. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top level container for RSVP hello parameters
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'hellos'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_hellos_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_hellos_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'global', 'hellos']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/hellos/config (container)

    YANG Description: Configuration parameters relating to RSVP
hellos
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/hellos/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 RSVP
hellos
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_hellos_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_hellos_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_hellos_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/hellos/state (container)

    YANG Description: State information associated with RSVP hellos
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/hellos/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 associated with RSVP hellos
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_hellos_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_hellos_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_hellos_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_errors_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_state_counters_errors(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/global/state/counters/errors. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Error counters associated with the global RSVP-TE
instance.
  """
  __slots__ = ('_path_helper', '_extmethods', '__authentication_fail','__bad_checksum','__bad_packet_format','__bad_packet_length','__out_of_order','__received_nack','__transmit_failure','__transmit_queue_full','__unknown_ack','__unknown_nack',)

  _yang_name = 'errors'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__authentication_fail = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="authentication-fail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__bad_checksum = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bad-checksum", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__bad_packet_format = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bad-packet-format", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__bad_packet_length = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bad-packet-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_of_order = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-of-order", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__received_nack = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="received-nack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__transmit_failure = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-failure", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__transmit_queue_full = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-queue-full", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__unknown_ack = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="unknown-ack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__unknown_nack = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="unknown-nack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'global', 'state', 'counters', 'errors']

  def _get_authentication_fail(self):
    """
    Getter method for authentication_fail, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors/authentication_fail (yang:counter64)

    YANG Description: The number of packets received that have failed RSVP-TE
authentication checks in the specified context.
    """
    return self.__authentication_fail
      
  def _set_authentication_fail(self, v, load=False):
    """
    Setter method for authentication_fail, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors/authentication_fail (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_authentication_fail is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_authentication_fail() directly.

    YANG Description: The number of packets received that have failed RSVP-TE
authentication checks in the specified context.
    """
    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="authentication-fail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """authentication_fail must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="authentication-fail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__authentication_fail = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_authentication_fail(self):
    self.__authentication_fail = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="authentication-fail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_bad_checksum(self):
    """
    Getter method for bad_checksum, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors/bad_checksum (yang:counter64)

    YANG Description: The number of packets received that have an incorrect RSVP-TE
checksum in the context.
    """
    return self.__bad_checksum
      
  def _set_bad_checksum(self, v, load=False):
    """
    Setter method for bad_checksum, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors/bad_checksum (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bad_checksum is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bad_checksum() directly.

    YANG Description: The number of packets received that have an incorrect RSVP-TE
checksum in the context.
    """
    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="bad-checksum", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bad_checksum must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bad-checksum", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__bad_checksum = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bad_checksum(self):
    self.__bad_checksum = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bad-checksum", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_bad_packet_format(self):
    """
    Getter method for bad_packet_format, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors/bad_packet_format (yang:counter64)

    YANG Description: The number of packets received that were dropped due to being
badly formed in the context.
    """
    return self.__bad_packet_format
      
  def _set_bad_packet_format(self, v, load=False):
    """
    Setter method for bad_packet_format, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors/bad_packet_format (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bad_packet_format is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bad_packet_format() directly.

    YANG Description: The number of packets received that were dropped due to being
badly formed in the context.
    """
    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="bad-packet-format", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bad_packet_format must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bad-packet-format", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__bad_packet_format = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bad_packet_format(self):
    self.__bad_packet_format = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bad-packet-format", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_bad_packet_length(self):
    """
    Getter method for bad_packet_length, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors/bad_packet_length (yang:counter64)

    YANG Description: The number of packets received that were dropped due to having
an invalid length specified in the context.
    """
    return self.__bad_packet_length
      
  def _set_bad_packet_length(self, v, load=False):
    """
    Setter method for bad_packet_length, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors/bad_packet_length (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bad_packet_length is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bad_packet_length() directly.

    YANG Description: The number of packets received that were dropped due to having
an invalid length specified in the context.
    """
    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="bad-packet-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bad_packet_length must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bad-packet-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__bad_packet_length = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bad_packet_length(self):
    self.__bad_packet_length = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bad-packet-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_of_order(self):
    """
    Getter method for out_of_order, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors/out_of_order (yang:counter64)

    YANG Description: The number of messages received out of order in the context.
    """
    return self.__out_of_order
      
  def _set_out_of_order(self, v, load=False):
    """
    Setter method for out_of_order, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors/out_of_order (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_of_order is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_of_order() directly.

    YANG Description: The number of messages received out of order in the context.
    """
    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="out-of-order", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_of_order must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-of-order", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_of_order = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_of_order(self):
    self.__out_of_order = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-of-order", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_received_nack(self):
    """
    Getter method for received_nack, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors/received_nack (yang:counter64)

    YANG Description: The number of NACK RESV messages received in the context.
    """
    return self.__received_nack
      
  def _set_received_nack(self, v, load=False):
    """
    Setter method for received_nack, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors/received_nack (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_received_nack is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_received_nack() directly.

    YANG Description: The number of NACK RESV messages received in the context.
    """
    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="received-nack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """received_nack must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="received-nack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__received_nack = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_received_nack(self):
    self.__received_nack = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="received-nack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_transmit_failure(self):
    """
    Getter method for transmit_failure, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors/transmit_failure (yang:counter64)

    YANG Description: The total number of packets dropped on transmit in the context.
    """
    return self.__transmit_failure
      
  def _set_transmit_failure(self, v, load=False):
    """
    Setter method for transmit_failure, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors/transmit_failure (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transmit_failure is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transmit_failure() directly.

    YANG Description: The total number of packets dropped on transmit in the context.
    """
    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-failure", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transmit_failure must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-failure", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__transmit_failure = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transmit_failure(self):
    self.__transmit_failure = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-failure", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_transmit_queue_full(self):
    """
    Getter method for transmit_queue_full, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors/transmit_queue_full (yang:counter64)

    YANG Description: The number of packets dropped due to the transmit queue being
full in the context.
    """
    return self.__transmit_queue_full
      
  def _set_transmit_queue_full(self, v, load=False):
    """
    Setter method for transmit_queue_full, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors/transmit_queue_full (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transmit_queue_full is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transmit_queue_full() directly.

    YANG Description: The number of packets dropped due to the transmit queue being
full in the context.
    """
    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-queue-full", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transmit_queue_full must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-queue-full", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__transmit_queue_full = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transmit_queue_full(self):
    self.__transmit_queue_full = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-queue-full", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_unknown_ack(self):
    """
    Getter method for unknown_ack, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors/unknown_ack (yang:counter64)

    YANG Description: The number of packets received containing an ACK for an unknown
message ID in the context.
    """
    return self.__unknown_ack
      
  def _set_unknown_ack(self, v, load=False):
    """
    Setter method for unknown_ack, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors/unknown_ack (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_ack is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_ack() directly.

    YANG Description: The number of packets received containing an ACK for an unknown
message ID in the context.
    """
    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="unknown-ack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_ack must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="unknown-ack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__unknown_ack = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_ack(self):
    self.__unknown_ack = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="unknown-ack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_unknown_nack(self):
    """
    Getter method for unknown_nack, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors/unknown_nack (yang:counter64)

    YANG Description: The number of packets received containing a NACK for an unknown
message ID in the context.
    """
    return self.__unknown_nack
      
  def _set_unknown_nack(self, v, load=False):
    """
    Setter method for unknown_nack, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors/unknown_nack (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_nack is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_nack() directly.

    YANG Description: The number of packets received containing a NACK for an unknown
message ID in the context.
    """
    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="unknown-nack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_nack must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="unknown-nack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__unknown_nack = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_nack(self):
    self.__unknown_nack = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="unknown-nack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)

  authentication_fail = __builtin__.property(_get_authentication_fail)
  bad_checksum = __builtin__.property(_get_bad_checksum)
  bad_packet_format = __builtin__.property(_get_bad_packet_format)
  bad_packet_length = __builtin__.property(_get_bad_packet_length)
  out_of_order = __builtin__.property(_get_out_of_order)
  received_nack = __builtin__.property(_get_received_nack)
  transmit_failure = __builtin__.property(_get_transmit_failure)
  transmit_queue_full = __builtin__.property(_get_transmit_queue_full)
  unknown_ack = __builtin__.property(_get_unknown_ack)
  unknown_nack = __builtin__.property(_get_unknown_nack)


  _pyangbind_elements = OrderedDict([('authentication_fail', authentication_fail), ('bad_checksum', bad_checksum), ('bad_packet_format', bad_packet_format), ('bad_packet_length', bad_packet_length), ('out_of_order', out_of_order), ('received_nack', received_nack), ('transmit_failure', transmit_failure), ('transmit_queue_full', transmit_queue_full), ('unknown_ack', unknown_ack), ('unknown_nack', unknown_nack), ])


class yc_counters_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_state_counters(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/global/state/counters. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Platform wide RSVP statistics and counters
  """
  __slots__ = ('_path_helper', '_extmethods', '__path_timeouts','__reservation_timeouts','__rate_limited_messages','__in_path_messages','__in_path_error_messages','__in_path_tear_messages','__in_reservation_messages','__in_reservation_error_messages','__in_reservation_tear_messages','__in_hello_messages','__in_srefresh_messages','__in_ack_messages','__out_path_messages','__out_path_error_messages','__out_path_tear_messages','__out_reservation_messages','__out_reservation_error_messages','__out_reservation_tear_messages','__out_hello_messages','__out_srefresh_messages','__out_ack_messages','__errors',)

  _yang_name = 'counters'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__path_timeouts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="path-timeouts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__reservation_timeouts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="reservation-timeouts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__rate_limited_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="rate-limited-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_path_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-path-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_path_error_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-path-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_path_tear_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-path-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_reservation_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-reservation-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_reservation_error_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-reservation-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_reservation_tear_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-reservation-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_hello_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-hello-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_srefresh_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-srefresh-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_ack_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-ack-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_path_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-path-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_path_error_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-path-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_path_tear_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-path-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_reservation_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-reservation-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_reservation_error_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-reservation-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_reservation_tear_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-reservation-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_hello_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-hello-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_srefresh_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-srefresh-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_ack_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-ack-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__errors = YANGDynClass(base=yc_errors_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_state_counters_errors, is_container='container', yang_name="errors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'global', 'state', 'counters']

  def _get_path_timeouts(self):
    """
    Getter method for path_timeouts, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/path_timeouts (yang:counter64)

    YANG Description: The number of Path State Blocks (PSBs) that
have been timed out by the local system.
    """
    return self.__path_timeouts
      
  def _set_path_timeouts(self, v, load=False):
    """
    Setter method for path_timeouts, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/path_timeouts (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_timeouts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_timeouts() directly.

    YANG Description: The number of Path State Blocks (PSBs) that
have been timed out by the local system.
    """
    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="path-timeouts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_timeouts must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="path-timeouts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__path_timeouts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_timeouts(self):
    self.__path_timeouts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="path-timeouts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_reservation_timeouts(self):
    """
    Getter method for reservation_timeouts, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/reservation_timeouts (yang:counter64)

    YANG Description: The number of Reservation State Blocks (RSBs) that
have been timed out by the local system.
    """
    return self.__reservation_timeouts
      
  def _set_reservation_timeouts(self, v, load=False):
    """
    Setter method for reservation_timeouts, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/reservation_timeouts (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_reservation_timeouts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_reservation_timeouts() directly.

    YANG Description: The number of Reservation State Blocks (RSBs) that
have been timed out by the local system.
    """
    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="reservation-timeouts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """reservation_timeouts must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="reservation-timeouts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__reservation_timeouts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_reservation_timeouts(self):
    self.__reservation_timeouts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="reservation-timeouts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_rate_limited_messages(self):
    """
    Getter method for rate_limited_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/rate_limited_messages (yang:counter64)

    YANG Description: RSVP messages dropped due to rate limiting
    """
    return self.__rate_limited_messages
      
  def _set_rate_limited_messages(self, v, load=False):
    """
    Setter method for rate_limited_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/rate_limited_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_rate_limited_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_rate_limited_messages() directly.

    YANG Description: RSVP messages dropped due to rate limiting
    """
    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="rate-limited-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """rate_limited_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="rate-limited-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__rate_limited_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_rate_limited_messages(self):
    self.__rate_limited_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="rate-limited-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_path_messages(self):
    """
    Getter method for in_path_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/in_path_messages (yang:counter64)

    YANG Description: Number of received RSVP Path messages
    """
    return self.__in_path_messages
      
  def _set_in_path_messages(self, v, load=False):
    """
    Setter method for in_path_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/in_path_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_path_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_path_messages() directly.

    YANG Description: Number of received RSVP Path messages
    """
    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="in-path-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_path_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-path-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__in_path_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_path_messages(self):
    self.__in_path_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-path-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_path_error_messages(self):
    """
    Getter method for in_path_error_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/in_path_error_messages (yang:counter64)

    YANG Description: Number of received RSVP Path Error messages
    """
    return self.__in_path_error_messages
      
  def _set_in_path_error_messages(self, v, load=False):
    """
    Setter method for in_path_error_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/in_path_error_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_path_error_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_path_error_messages() directly.

    YANG Description: Number of received RSVP Path Error messages
    """
    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="in-path-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_path_error_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-path-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__in_path_error_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_path_error_messages(self):
    self.__in_path_error_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-path-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_path_tear_messages(self):
    """
    Getter method for in_path_tear_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/in_path_tear_messages (yang:counter64)

    YANG Description: Number of received RSVP Path Tear messages
    """
    return self.__in_path_tear_messages
      
  def _set_in_path_tear_messages(self, v, load=False):
    """
    Setter method for in_path_tear_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/in_path_tear_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_path_tear_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_path_tear_messages() directly.

    YANG Description: Number of received RSVP Path Tear messages
    """
    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="in-path-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_path_tear_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-path-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__in_path_tear_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_path_tear_messages(self):
    self.__in_path_tear_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-path-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_reservation_messages(self):
    """
    Getter method for in_reservation_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/in_reservation_messages (yang:counter64)

    YANG Description: Number of received RSVP Resv messages
    """
    return self.__in_reservation_messages
      
  def _set_in_reservation_messages(self, v, load=False):
    """
    Setter method for in_reservation_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/in_reservation_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_reservation_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_reservation_messages() directly.

    YANG Description: Number of received RSVP Resv messages
    """
    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="in-reservation-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_reservation_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-reservation-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__in_reservation_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_reservation_messages(self):
    self.__in_reservation_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-reservation-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_reservation_error_messages(self):
    """
    Getter method for in_reservation_error_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/in_reservation_error_messages (yang:counter64)

    YANG Description: Number of received RSVP Resv Error messages
    """
    return self.__in_reservation_error_messages
      
  def _set_in_reservation_error_messages(self, v, load=False):
    """
    Setter method for in_reservation_error_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/in_reservation_error_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_reservation_error_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_reservation_error_messages() directly.

    YANG Description: Number of received RSVP Resv Error messages
    """
    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="in-reservation-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_reservation_error_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-reservation-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__in_reservation_error_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_reservation_error_messages(self):
    self.__in_reservation_error_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-reservation-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_reservation_tear_messages(self):
    """
    Getter method for in_reservation_tear_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/in_reservation_tear_messages (yang:counter64)

    YANG Description: Number of received RSVP Resv Tear messages
    """
    return self.__in_reservation_tear_messages
      
  def _set_in_reservation_tear_messages(self, v, load=False):
    """
    Setter method for in_reservation_tear_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/in_reservation_tear_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_reservation_tear_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_reservation_tear_messages() directly.

    YANG Description: Number of received RSVP Resv Tear messages
    """
    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="in-reservation-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_reservation_tear_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-reservation-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__in_reservation_tear_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_reservation_tear_messages(self):
    self.__in_reservation_tear_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-reservation-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_hello_messages(self):
    """
    Getter method for in_hello_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/in_hello_messages (yang:counter64)

    YANG Description: Number of received RSVP hello messages
    """
    return self.__in_hello_messages
      
  def _set_in_hello_messages(self, v, load=False):
    """
    Setter method for in_hello_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/in_hello_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_hello_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_hello_messages() directly.

    YANG Description: Number of received RSVP hello messages
    """
    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="in-hello-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_hello_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-hello-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__in_hello_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_hello_messages(self):
    self.__in_hello_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-hello-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_srefresh_messages(self):
    """
    Getter method for in_srefresh_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/in_srefresh_messages (yang:counter64)

    YANG Description: Number of received RSVP summary refresh messages
    """
    return self.__in_srefresh_messages
      
  def _set_in_srefresh_messages(self, v, load=False):
    """
    Setter method for in_srefresh_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/in_srefresh_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_srefresh_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_srefresh_messages() directly.

    YANG Description: Number of received RSVP summary refresh messages
    """
    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="in-srefresh-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_srefresh_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-srefresh-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__in_srefresh_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_srefresh_messages(self):
    self.__in_srefresh_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-srefresh-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_ack_messages(self):
    """
    Getter method for in_ack_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/in_ack_messages (yang:counter64)

    YANG Description: Number of received RSVP refresh reduction ack
messages
    """
    return self.__in_ack_messages
      
  def _set_in_ack_messages(self, v, load=False):
    """
    Setter method for in_ack_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/in_ack_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_ack_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_ack_messages() directly.

    YANG Description: Number of received RSVP refresh reduction ack
messages
    """
    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="in-ack-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_ack_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-ack-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__in_ack_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_ack_messages(self):
    self.__in_ack_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-ack-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_path_messages(self):
    """
    Getter method for out_path_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/out_path_messages (yang:counter64)

    YANG Description: Number of sent RSVP PATH messages
    """
    return self.__out_path_messages
      
  def _set_out_path_messages(self, v, load=False):
    """
    Setter method for out_path_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/out_path_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_path_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_path_messages() directly.

    YANG Description: Number of sent RSVP PATH messages
    """
    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="out-path-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_path_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-path-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_path_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_path_messages(self):
    self.__out_path_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-path-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_path_error_messages(self):
    """
    Getter method for out_path_error_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/out_path_error_messages (yang:counter64)

    YANG Description: Number of sent RSVP Path Error messages
    """
    return self.__out_path_error_messages
      
  def _set_out_path_error_messages(self, v, load=False):
    """
    Setter method for out_path_error_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/out_path_error_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_path_error_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_path_error_messages() directly.

    YANG Description: Number of sent RSVP Path Error messages
    """
    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="out-path-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_path_error_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-path-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_path_error_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_path_error_messages(self):
    self.__out_path_error_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-path-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_path_tear_messages(self):
    """
    Getter method for out_path_tear_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/out_path_tear_messages (yang:counter64)

    YANG Description: Number of sent RSVP Path Tear messages
    """
    return self.__out_path_tear_messages
      
  def _set_out_path_tear_messages(self, v, load=False):
    """
    Setter method for out_path_tear_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/out_path_tear_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_path_tear_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_path_tear_messages() directly.

    YANG Description: Number of sent RSVP Path Tear messages
    """
    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="out-path-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_path_tear_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-path-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_path_tear_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_path_tear_messages(self):
    self.__out_path_tear_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-path-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_reservation_messages(self):
    """
    Getter method for out_reservation_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/out_reservation_messages (yang:counter64)

    YANG Description: Number of sent RSVP Resv messages
    """
    return self.__out_reservation_messages
      
  def _set_out_reservation_messages(self, v, load=False):
    """
    Setter method for out_reservation_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/out_reservation_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_reservation_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_reservation_messages() directly.

    YANG Description: Number of sent RSVP Resv messages
    """
    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="out-reservation-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_reservation_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-reservation-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_reservation_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_reservation_messages(self):
    self.__out_reservation_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-reservation-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_reservation_error_messages(self):
    """
    Getter method for out_reservation_error_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/out_reservation_error_messages (yang:counter64)

    YANG Description: Number of sent RSVP Resv Error messages
    """
    return self.__out_reservation_error_messages
      
  def _set_out_reservation_error_messages(self, v, load=False):
    """
    Setter method for out_reservation_error_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/out_reservation_error_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_reservation_error_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_reservation_error_messages() directly.

    YANG Description: Number of sent RSVP Resv Error messages
    """
    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="out-reservation-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_reservation_error_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-reservation-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_reservation_error_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_reservation_error_messages(self):
    self.__out_reservation_error_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-reservation-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_reservation_tear_messages(self):
    """
    Getter method for out_reservation_tear_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/out_reservation_tear_messages (yang:counter64)

    YANG Description: Number of sent RSVP Resv Tear messages
    """
    return self.__out_reservation_tear_messages
      
  def _set_out_reservation_tear_messages(self, v, load=False):
    """
    Setter method for out_reservation_tear_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/out_reservation_tear_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_reservation_tear_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_reservation_tear_messages() directly.

    YANG Description: Number of sent RSVP Resv Tear messages
    """
    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="out-reservation-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_reservation_tear_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-reservation-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_reservation_tear_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_reservation_tear_messages(self):
    self.__out_reservation_tear_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-reservation-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_hello_messages(self):
    """
    Getter method for out_hello_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/out_hello_messages (yang:counter64)

    YANG Description: Number of sent RSVP hello messages
    """
    return self.__out_hello_messages
      
  def _set_out_hello_messages(self, v, load=False):
    """
    Setter method for out_hello_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/out_hello_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_hello_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_hello_messages() directly.

    YANG Description: Number of sent RSVP hello messages
    """
    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="out-hello-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_hello_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-hello-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_hello_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_hello_messages(self):
    self.__out_hello_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-hello-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_srefresh_messages(self):
    """
    Getter method for out_srefresh_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/out_srefresh_messages (yang:counter64)

    YANG Description: Number of sent RSVP summary refresh messages
    """
    return self.__out_srefresh_messages
      
  def _set_out_srefresh_messages(self, v, load=False):
    """
    Setter method for out_srefresh_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/out_srefresh_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_srefresh_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_srefresh_messages() directly.

    YANG Description: Number of sent RSVP summary refresh messages
    """
    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="out-srefresh-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_srefresh_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-srefresh-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_srefresh_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_srefresh_messages(self):
    self.__out_srefresh_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-srefresh-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_ack_messages(self):
    """
    Getter method for out_ack_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/out_ack_messages (yang:counter64)

    YANG Description: Number of sent RSVP refresh reduction ack messages
    """
    return self.__out_ack_messages
      
  def _set_out_ack_messages(self, v, load=False):
    """
    Setter method for out_ack_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/out_ack_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_ack_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_ack_messages() directly.

    YANG Description: Number of sent RSVP refresh reduction ack messages
    """
    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="out-ack-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_ack_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-ack-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_ack_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_ack_messages(self):
    self.__out_ack_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-ack-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_errors(self):
    """
    Getter method for errors, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors (container)

    YANG Description: Error counters associated with the global RSVP-TE
instance.
    """
    return self.__errors
      
  def _set_errors(self, v, load=False):
    """
    Setter method for errors, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters/errors (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_errors is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_errors() directly.

    YANG Description: Error counters associated with the global RSVP-TE
instance.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_errors_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_state_counters_errors, is_container='container', yang_name="errors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """errors must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_errors_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_state_counters_errors, is_container='container', yang_name="errors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__errors = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_errors(self):
    self.__errors = YANGDynClass(base=yc_errors_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_state_counters_errors, is_container='container', yang_name="errors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  path_timeouts = __builtin__.property(_get_path_timeouts)
  reservation_timeouts = __builtin__.property(_get_reservation_timeouts)
  rate_limited_messages = __builtin__.property(_get_rate_limited_messages)
  in_path_messages = __builtin__.property(_get_in_path_messages)
  in_path_error_messages = __builtin__.property(_get_in_path_error_messages)
  in_path_tear_messages = __builtin__.property(_get_in_path_tear_messages)
  in_reservation_messages = __builtin__.property(_get_in_reservation_messages)
  in_reservation_error_messages = __builtin__.property(_get_in_reservation_error_messages)
  in_reservation_tear_messages = __builtin__.property(_get_in_reservation_tear_messages)
  in_hello_messages = __builtin__.property(_get_in_hello_messages)
  in_srefresh_messages = __builtin__.property(_get_in_srefresh_messages)
  in_ack_messages = __builtin__.property(_get_in_ack_messages)
  out_path_messages = __builtin__.property(_get_out_path_messages)
  out_path_error_messages = __builtin__.property(_get_out_path_error_messages)
  out_path_tear_messages = __builtin__.property(_get_out_path_tear_messages)
  out_reservation_messages = __builtin__.property(_get_out_reservation_messages)
  out_reservation_error_messages = __builtin__.property(_get_out_reservation_error_messages)
  out_reservation_tear_messages = __builtin__.property(_get_out_reservation_tear_messages)
  out_hello_messages = __builtin__.property(_get_out_hello_messages)
  out_srefresh_messages = __builtin__.property(_get_out_srefresh_messages)
  out_ack_messages = __builtin__.property(_get_out_ack_messages)
  errors = __builtin__.property(_get_errors)


  _pyangbind_elements = OrderedDict([('path_timeouts', path_timeouts), ('reservation_timeouts', reservation_timeouts), ('rate_limited_messages', rate_limited_messages), ('in_path_messages', in_path_messages), ('in_path_error_messages', in_path_error_messages), ('in_path_tear_messages', in_path_tear_messages), ('in_reservation_messages', in_reservation_messages), ('in_reservation_error_messages', in_reservation_error_messages), ('in_reservation_tear_messages', in_reservation_tear_messages), ('in_hello_messages', in_hello_messages), ('in_srefresh_messages', in_srefresh_messages), ('in_ack_messages', in_ack_messages), ('out_path_messages', out_path_messages), ('out_path_error_messages', out_path_error_messages), ('out_path_tear_messages', out_path_tear_messages), ('out_reservation_messages', out_reservation_messages), ('out_reservation_error_messages', out_reservation_error_messages), ('out_reservation_tear_messages', out_reservation_tear_messages), ('out_hello_messages', out_hello_messages), ('out_srefresh_messages', out_srefresh_messages), ('out_ack_messages', out_ack_messages), ('errors', errors), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/global/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Platform wide RSVP state, including counters
  """
  __slots__ = ('_path_helper', '_extmethods', '__counters',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'global', 'state']

  def _get_counters(self):
    """
    Getter method for counters, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters (container)

    YANG Description: Platform wide RSVP statistics and counters
    """
    return self.__counters
      
  def _set_counters(self, v, load=False):
    """
    Setter method for counters, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state/counters (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_counters is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_counters() directly.

    YANG Description: Platform wide RSVP statistics and counters
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_counters_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """counters must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_counters_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__counters = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_counters(self):
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  counters = __builtin__.property(_get_counters)


  _pyangbind_elements = OrderedDict([('counters', counters), ])


class yc_global__openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/global. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Platform wide RSVP configuration and state
  """
  __slots__ = ('_path_helper', '_extmethods', '__graceful_restart','__soft_preemption','__hellos','__state',)

  _yang_name = 'global'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__graceful_restart = YANGDynClass(base=yc_graceful_restart_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__soft_preemption = YANGDynClass(base=yc_soft_preemption_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_soft_preemption, is_container='container', yang_name="soft-preemption", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__hellos = YANGDynClass(base=yc_hellos_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_hellos, is_container='container', yang_name="hellos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'global']

  def _get_graceful_restart(self):
    """
    Getter method for graceful_restart, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/graceful_restart (container)

    YANG Description: Operational state and configuration parameters relating to
graceful-restart for RSVP
    """
    return self.__graceful_restart
      
  def _set_graceful_restart(self, v, load=False):
    """
    Setter method for graceful_restart, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/graceful_restart (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_graceful_restart is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_graceful_restart() directly.

    YANG Description: Operational state and configuration parameters relating to
graceful-restart for RSVP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_graceful_restart_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """graceful_restart must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_graceful_restart_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__graceful_restart = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_graceful_restart(self):
    self.__graceful_restart = YANGDynClass(base=yc_graceful_restart_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_soft_preemption(self):
    """
    Getter method for soft_preemption, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/soft_preemption (container)

    YANG Description: Protocol options relating to RSVP
soft preemption
    """
    return self.__soft_preemption
      
  def _set_soft_preemption(self, v, load=False):
    """
    Setter method for soft_preemption, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/soft_preemption (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_soft_preemption is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_soft_preemption() directly.

    YANG Description: Protocol options relating to RSVP
soft preemption
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_soft_preemption_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_soft_preemption, is_container='container', yang_name="soft-preemption", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """soft_preemption must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_soft_preemption_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_soft_preemption, is_container='container', yang_name="soft-preemption", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__soft_preemption = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_soft_preemption(self):
    self.__soft_preemption = YANGDynClass(base=yc_soft_preemption_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_soft_preemption, is_container='container', yang_name="soft-preemption", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_hellos(self):
    """
    Getter method for hellos, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/hellos (container)

    YANG Description: Top level container for RSVP hello parameters
    """
    return self.__hellos
      
  def _set_hellos(self, v, load=False):
    """
    Setter method for hellos, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/hellos (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hellos is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hellos() directly.

    YANG Description: Top level container for RSVP hello parameters
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_hellos_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_hellos, is_container='container', yang_name="hellos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hellos must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_hellos_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_hellos, is_container='container', yang_name="hellos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__hellos = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hellos(self):
    self.__hellos = YANGDynClass(base=yc_hellos_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_hellos, is_container='container', yang_name="hellos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/state (container)

    YANG Description: Platform wide RSVP state, including counters
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global/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: Platform wide RSVP state, including counters
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  graceful_restart = __builtin__.property(_get_graceful_restart, _set_graceful_restart)
  soft_preemption = __builtin__.property(_get_soft_preemption, _set_soft_preemption)
  hellos = __builtin__.property(_get_hellos, _set_hellos)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('graceful_restart', graceful_restart), ('soft_preemption', soft_preemption), ('hellos', hellos), ('state', state), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/interface/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration of per-interface RSVP parameters
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'config']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/config/interface_id (oc-if:interface-id)

    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 /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/config/interface_id (oc-if:interface-id)
    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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_id must be of a type compatible with oc-if:interface-id""",
          'defined-type': "oc-if:interface-id",
          '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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=True)

  interface_id = __builtin__.property(_get_interface_id, _set_interface_id)


  _pyangbind_elements = OrderedDict([('interface_id', interface_id), ])


class yc_errors_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_state_counters_errors(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/interface/state/counters/errors. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Interface specific RSVP error counters
  """
  __slots__ = ('_path_helper', '_extmethods', '__authentication_fail','__bad_checksum','__bad_packet_format','__bad_packet_length','__out_of_order','__received_nack','__transmit_failure','__transmit_queue_full','__unknown_ack','__unknown_nack',)

  _yang_name = 'errors'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__authentication_fail = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="authentication-fail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__bad_checksum = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bad-checksum", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__bad_packet_format = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bad-packet-format", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__bad_packet_length = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bad-packet-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_of_order = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-of-order", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__received_nack = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="received-nack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__transmit_failure = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-failure", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__transmit_queue_full = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-queue-full", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__unknown_ack = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="unknown-ack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__unknown_nack = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="unknown-nack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'state', 'counters', 'errors']

  def _get_authentication_fail(self):
    """
    Getter method for authentication_fail, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors/authentication_fail (yang:counter64)

    YANG Description: The number of packets received that have failed RSVP-TE
authentication checks in the specified context.
    """
    return self.__authentication_fail
      
  def _set_authentication_fail(self, v, load=False):
    """
    Setter method for authentication_fail, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors/authentication_fail (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_authentication_fail is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_authentication_fail() directly.

    YANG Description: The number of packets received that have failed RSVP-TE
authentication checks in the specified context.
    """
    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="authentication-fail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """authentication_fail must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="authentication-fail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__authentication_fail = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_authentication_fail(self):
    self.__authentication_fail = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="authentication-fail", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_bad_checksum(self):
    """
    Getter method for bad_checksum, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors/bad_checksum (yang:counter64)

    YANG Description: The number of packets received that have an incorrect RSVP-TE
checksum in the context.
    """
    return self.__bad_checksum
      
  def _set_bad_checksum(self, v, load=False):
    """
    Setter method for bad_checksum, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors/bad_checksum (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bad_checksum is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bad_checksum() directly.

    YANG Description: The number of packets received that have an incorrect RSVP-TE
checksum in the context.
    """
    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="bad-checksum", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bad_checksum must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bad-checksum", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__bad_checksum = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bad_checksum(self):
    self.__bad_checksum = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bad-checksum", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_bad_packet_format(self):
    """
    Getter method for bad_packet_format, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors/bad_packet_format (yang:counter64)

    YANG Description: The number of packets received that were dropped due to being
badly formed in the context.
    """
    return self.__bad_packet_format
      
  def _set_bad_packet_format(self, v, load=False):
    """
    Setter method for bad_packet_format, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors/bad_packet_format (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bad_packet_format is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bad_packet_format() directly.

    YANG Description: The number of packets received that were dropped due to being
badly formed in the context.
    """
    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="bad-packet-format", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bad_packet_format must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bad-packet-format", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__bad_packet_format = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bad_packet_format(self):
    self.__bad_packet_format = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bad-packet-format", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_bad_packet_length(self):
    """
    Getter method for bad_packet_length, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors/bad_packet_length (yang:counter64)

    YANG Description: The number of packets received that were dropped due to having
an invalid length specified in the context.
    """
    return self.__bad_packet_length
      
  def _set_bad_packet_length(self, v, load=False):
    """
    Setter method for bad_packet_length, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors/bad_packet_length (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bad_packet_length is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bad_packet_length() directly.

    YANG Description: The number of packets received that were dropped due to having
an invalid length specified in the context.
    """
    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="bad-packet-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bad_packet_length must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bad-packet-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__bad_packet_length = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bad_packet_length(self):
    self.__bad_packet_length = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bad-packet-length", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_of_order(self):
    """
    Getter method for out_of_order, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors/out_of_order (yang:counter64)

    YANG Description: The number of messages received out of order in the context.
    """
    return self.__out_of_order
      
  def _set_out_of_order(self, v, load=False):
    """
    Setter method for out_of_order, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors/out_of_order (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_of_order is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_of_order() directly.

    YANG Description: The number of messages received out of order in the context.
    """
    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="out-of-order", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_of_order must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-of-order", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_of_order = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_of_order(self):
    self.__out_of_order = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-of-order", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_received_nack(self):
    """
    Getter method for received_nack, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors/received_nack (yang:counter64)

    YANG Description: The number of NACK RESV messages received in the context.
    """
    return self.__received_nack
      
  def _set_received_nack(self, v, load=False):
    """
    Setter method for received_nack, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors/received_nack (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_received_nack is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_received_nack() directly.

    YANG Description: The number of NACK RESV messages received in the context.
    """
    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="received-nack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """received_nack must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="received-nack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__received_nack = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_received_nack(self):
    self.__received_nack = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="received-nack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_transmit_failure(self):
    """
    Getter method for transmit_failure, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors/transmit_failure (yang:counter64)

    YANG Description: The total number of packets dropped on transmit in the context.
    """
    return self.__transmit_failure
      
  def _set_transmit_failure(self, v, load=False):
    """
    Setter method for transmit_failure, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors/transmit_failure (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transmit_failure is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transmit_failure() directly.

    YANG Description: The total number of packets dropped on transmit in the context.
    """
    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-failure", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transmit_failure must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-failure", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__transmit_failure = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transmit_failure(self):
    self.__transmit_failure = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-failure", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_transmit_queue_full(self):
    """
    Getter method for transmit_queue_full, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors/transmit_queue_full (yang:counter64)

    YANG Description: The number of packets dropped due to the transmit queue being
full in the context.
    """
    return self.__transmit_queue_full
      
  def _set_transmit_queue_full(self, v, load=False):
    """
    Setter method for transmit_queue_full, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors/transmit_queue_full (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transmit_queue_full is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transmit_queue_full() directly.

    YANG Description: The number of packets dropped due to the transmit queue being
full in the context.
    """
    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-queue-full", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transmit_queue_full must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-queue-full", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__transmit_queue_full = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transmit_queue_full(self):
    self.__transmit_queue_full = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="transmit-queue-full", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_unknown_ack(self):
    """
    Getter method for unknown_ack, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors/unknown_ack (yang:counter64)

    YANG Description: The number of packets received containing an ACK for an unknown
message ID in the context.
    """
    return self.__unknown_ack
      
  def _set_unknown_ack(self, v, load=False):
    """
    Setter method for unknown_ack, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors/unknown_ack (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_ack is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_ack() directly.

    YANG Description: The number of packets received containing an ACK for an unknown
message ID in the context.
    """
    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="unknown-ack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_ack must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="unknown-ack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__unknown_ack = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_ack(self):
    self.__unknown_ack = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="unknown-ack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_unknown_nack(self):
    """
    Getter method for unknown_nack, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors/unknown_nack (yang:counter64)

    YANG Description: The number of packets received containing a NACK for an unknown
message ID in the context.
    """
    return self.__unknown_nack
      
  def _set_unknown_nack(self, v, load=False):
    """
    Setter method for unknown_nack, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors/unknown_nack (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unknown_nack is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unknown_nack() directly.

    YANG Description: The number of packets received containing a NACK for an unknown
message ID in the context.
    """
    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="unknown-nack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unknown_nack must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="unknown-nack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__unknown_nack = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unknown_nack(self):
    self.__unknown_nack = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="unknown-nack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)

  authentication_fail = __builtin__.property(_get_authentication_fail)
  bad_checksum = __builtin__.property(_get_bad_checksum)
  bad_packet_format = __builtin__.property(_get_bad_packet_format)
  bad_packet_length = __builtin__.property(_get_bad_packet_length)
  out_of_order = __builtin__.property(_get_out_of_order)
  received_nack = __builtin__.property(_get_received_nack)
  transmit_failure = __builtin__.property(_get_transmit_failure)
  transmit_queue_full = __builtin__.property(_get_transmit_queue_full)
  unknown_ack = __builtin__.property(_get_unknown_ack)
  unknown_nack = __builtin__.property(_get_unknown_nack)


  _pyangbind_elements = OrderedDict([('authentication_fail', authentication_fail), ('bad_checksum', bad_checksum), ('bad_packet_format', bad_packet_format), ('bad_packet_length', bad_packet_length), ('out_of_order', out_of_order), ('received_nack', received_nack), ('transmit_failure', transmit_failure), ('transmit_queue_full', transmit_queue_full), ('unknown_ack', unknown_ack), ('unknown_nack', unknown_nack), ])


class yc_counters_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_state_counters(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/interface/state/counters. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Interface specific RSVP statistics and counters
  """
  __slots__ = ('_path_helper', '_extmethods', '__in_path_messages','__in_path_error_messages','__in_path_tear_messages','__in_reservation_messages','__in_reservation_error_messages','__in_reservation_tear_messages','__in_hello_messages','__in_srefresh_messages','__in_ack_messages','__out_path_messages','__out_path_error_messages','__out_path_tear_messages','__out_reservation_messages','__out_reservation_error_messages','__out_reservation_tear_messages','__out_hello_messages','__out_srefresh_messages','__out_ack_messages','__rate_limited_messages','__errors',)

  _yang_name = 'counters'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__in_path_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-path-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_path_error_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-path-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_path_tear_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-path-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_reservation_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-reservation-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_reservation_error_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-reservation-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_reservation_tear_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-reservation-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_hello_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-hello-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_srefresh_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-srefresh-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_ack_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-ack-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_path_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-path-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_path_error_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-path-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_path_tear_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-path-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_reservation_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-reservation-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_reservation_error_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-reservation-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_reservation_tear_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-reservation-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_hello_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-hello-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_srefresh_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-srefresh-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_ack_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-ack-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__rate_limited_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="rate-limited-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__errors = YANGDynClass(base=yc_errors_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_state_counters_errors, is_container='container', yang_name="errors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'state', 'counters']

  def _get_in_path_messages(self):
    """
    Getter method for in_path_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/in_path_messages (yang:counter64)

    YANG Description: Number of received RSVP Path messages
    """
    return self.__in_path_messages
      
  def _set_in_path_messages(self, v, load=False):
    """
    Setter method for in_path_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/in_path_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_path_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_path_messages() directly.

    YANG Description: Number of received RSVP Path messages
    """
    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="in-path-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_path_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-path-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__in_path_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_path_messages(self):
    self.__in_path_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-path-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_path_error_messages(self):
    """
    Getter method for in_path_error_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/in_path_error_messages (yang:counter64)

    YANG Description: Number of received RSVP Path Error messages
    """
    return self.__in_path_error_messages
      
  def _set_in_path_error_messages(self, v, load=False):
    """
    Setter method for in_path_error_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/in_path_error_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_path_error_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_path_error_messages() directly.

    YANG Description: Number of received RSVP Path Error messages
    """
    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="in-path-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_path_error_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-path-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__in_path_error_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_path_error_messages(self):
    self.__in_path_error_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-path-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_path_tear_messages(self):
    """
    Getter method for in_path_tear_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/in_path_tear_messages (yang:counter64)

    YANG Description: Number of received RSVP Path Tear messages
    """
    return self.__in_path_tear_messages
      
  def _set_in_path_tear_messages(self, v, load=False):
    """
    Setter method for in_path_tear_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/in_path_tear_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_path_tear_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_path_tear_messages() directly.

    YANG Description: Number of received RSVP Path Tear messages
    """
    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="in-path-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_path_tear_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-path-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__in_path_tear_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_path_tear_messages(self):
    self.__in_path_tear_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-path-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_reservation_messages(self):
    """
    Getter method for in_reservation_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/in_reservation_messages (yang:counter64)

    YANG Description: Number of received RSVP Resv messages
    """
    return self.__in_reservation_messages
      
  def _set_in_reservation_messages(self, v, load=False):
    """
    Setter method for in_reservation_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/in_reservation_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_reservation_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_reservation_messages() directly.

    YANG Description: Number of received RSVP Resv messages
    """
    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="in-reservation-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_reservation_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-reservation-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__in_reservation_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_reservation_messages(self):
    self.__in_reservation_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-reservation-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_reservation_error_messages(self):
    """
    Getter method for in_reservation_error_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/in_reservation_error_messages (yang:counter64)

    YANG Description: Number of received RSVP Resv Error messages
    """
    return self.__in_reservation_error_messages
      
  def _set_in_reservation_error_messages(self, v, load=False):
    """
    Setter method for in_reservation_error_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/in_reservation_error_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_reservation_error_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_reservation_error_messages() directly.

    YANG Description: Number of received RSVP Resv Error messages
    """
    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="in-reservation-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_reservation_error_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-reservation-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__in_reservation_error_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_reservation_error_messages(self):
    self.__in_reservation_error_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-reservation-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_reservation_tear_messages(self):
    """
    Getter method for in_reservation_tear_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/in_reservation_tear_messages (yang:counter64)

    YANG Description: Number of received RSVP Resv Tear messages
    """
    return self.__in_reservation_tear_messages
      
  def _set_in_reservation_tear_messages(self, v, load=False):
    """
    Setter method for in_reservation_tear_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/in_reservation_tear_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_reservation_tear_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_reservation_tear_messages() directly.

    YANG Description: Number of received RSVP Resv Tear messages
    """
    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="in-reservation-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_reservation_tear_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-reservation-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__in_reservation_tear_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_reservation_tear_messages(self):
    self.__in_reservation_tear_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-reservation-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_hello_messages(self):
    """
    Getter method for in_hello_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/in_hello_messages (yang:counter64)

    YANG Description: Number of received RSVP hello messages
    """
    return self.__in_hello_messages
      
  def _set_in_hello_messages(self, v, load=False):
    """
    Setter method for in_hello_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/in_hello_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_hello_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_hello_messages() directly.

    YANG Description: Number of received RSVP hello messages
    """
    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="in-hello-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_hello_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-hello-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__in_hello_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_hello_messages(self):
    self.__in_hello_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-hello-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_srefresh_messages(self):
    """
    Getter method for in_srefresh_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/in_srefresh_messages (yang:counter64)

    YANG Description: Number of received RSVP summary refresh messages
    """
    return self.__in_srefresh_messages
      
  def _set_in_srefresh_messages(self, v, load=False):
    """
    Setter method for in_srefresh_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/in_srefresh_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_srefresh_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_srefresh_messages() directly.

    YANG Description: Number of received RSVP summary refresh messages
    """
    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="in-srefresh-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_srefresh_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-srefresh-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__in_srefresh_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_srefresh_messages(self):
    self.__in_srefresh_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-srefresh-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_ack_messages(self):
    """
    Getter method for in_ack_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/in_ack_messages (yang:counter64)

    YANG Description: Number of received RSVP refresh reduction ack
messages
    """
    return self.__in_ack_messages
      
  def _set_in_ack_messages(self, v, load=False):
    """
    Setter method for in_ack_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/in_ack_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_ack_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_ack_messages() directly.

    YANG Description: Number of received RSVP refresh reduction ack
messages
    """
    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="in-ack-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_ack_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-ack-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__in_ack_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_ack_messages(self):
    self.__in_ack_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-ack-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_path_messages(self):
    """
    Getter method for out_path_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/out_path_messages (yang:counter64)

    YANG Description: Number of sent RSVP PATH messages
    """
    return self.__out_path_messages
      
  def _set_out_path_messages(self, v, load=False):
    """
    Setter method for out_path_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/out_path_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_path_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_path_messages() directly.

    YANG Description: Number of sent RSVP PATH messages
    """
    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="out-path-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_path_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-path-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_path_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_path_messages(self):
    self.__out_path_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-path-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_path_error_messages(self):
    """
    Getter method for out_path_error_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/out_path_error_messages (yang:counter64)

    YANG Description: Number of sent RSVP Path Error messages
    """
    return self.__out_path_error_messages
      
  def _set_out_path_error_messages(self, v, load=False):
    """
    Setter method for out_path_error_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/out_path_error_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_path_error_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_path_error_messages() directly.

    YANG Description: Number of sent RSVP Path Error messages
    """
    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="out-path-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_path_error_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-path-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_path_error_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_path_error_messages(self):
    self.__out_path_error_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-path-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_path_tear_messages(self):
    """
    Getter method for out_path_tear_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/out_path_tear_messages (yang:counter64)

    YANG Description: Number of sent RSVP Path Tear messages
    """
    return self.__out_path_tear_messages
      
  def _set_out_path_tear_messages(self, v, load=False):
    """
    Setter method for out_path_tear_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/out_path_tear_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_path_tear_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_path_tear_messages() directly.

    YANG Description: Number of sent RSVP Path Tear messages
    """
    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="out-path-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_path_tear_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-path-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_path_tear_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_path_tear_messages(self):
    self.__out_path_tear_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-path-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_reservation_messages(self):
    """
    Getter method for out_reservation_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/out_reservation_messages (yang:counter64)

    YANG Description: Number of sent RSVP Resv messages
    """
    return self.__out_reservation_messages
      
  def _set_out_reservation_messages(self, v, load=False):
    """
    Setter method for out_reservation_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/out_reservation_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_reservation_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_reservation_messages() directly.

    YANG Description: Number of sent RSVP Resv messages
    """
    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="out-reservation-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_reservation_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-reservation-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_reservation_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_reservation_messages(self):
    self.__out_reservation_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-reservation-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_reservation_error_messages(self):
    """
    Getter method for out_reservation_error_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/out_reservation_error_messages (yang:counter64)

    YANG Description: Number of sent RSVP Resv Error messages
    """
    return self.__out_reservation_error_messages
      
  def _set_out_reservation_error_messages(self, v, load=False):
    """
    Setter method for out_reservation_error_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/out_reservation_error_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_reservation_error_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_reservation_error_messages() directly.

    YANG Description: Number of sent RSVP Resv Error messages
    """
    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="out-reservation-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_reservation_error_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-reservation-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_reservation_error_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_reservation_error_messages(self):
    self.__out_reservation_error_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-reservation-error-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_reservation_tear_messages(self):
    """
    Getter method for out_reservation_tear_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/out_reservation_tear_messages (yang:counter64)

    YANG Description: Number of sent RSVP Resv Tear messages
    """
    return self.__out_reservation_tear_messages
      
  def _set_out_reservation_tear_messages(self, v, load=False):
    """
    Setter method for out_reservation_tear_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/out_reservation_tear_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_reservation_tear_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_reservation_tear_messages() directly.

    YANG Description: Number of sent RSVP Resv Tear messages
    """
    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="out-reservation-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_reservation_tear_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-reservation-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_reservation_tear_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_reservation_tear_messages(self):
    self.__out_reservation_tear_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-reservation-tear-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_hello_messages(self):
    """
    Getter method for out_hello_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/out_hello_messages (yang:counter64)

    YANG Description: Number of sent RSVP hello messages
    """
    return self.__out_hello_messages
      
  def _set_out_hello_messages(self, v, load=False):
    """
    Setter method for out_hello_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/out_hello_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_hello_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_hello_messages() directly.

    YANG Description: Number of sent RSVP hello messages
    """
    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="out-hello-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_hello_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-hello-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_hello_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_hello_messages(self):
    self.__out_hello_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-hello-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_srefresh_messages(self):
    """
    Getter method for out_srefresh_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/out_srefresh_messages (yang:counter64)

    YANG Description: Number of sent RSVP summary refresh messages
    """
    return self.__out_srefresh_messages
      
  def _set_out_srefresh_messages(self, v, load=False):
    """
    Setter method for out_srefresh_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/out_srefresh_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_srefresh_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_srefresh_messages() directly.

    YANG Description: Number of sent RSVP summary refresh messages
    """
    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="out-srefresh-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_srefresh_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-srefresh-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_srefresh_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_srefresh_messages(self):
    self.__out_srefresh_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-srefresh-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_ack_messages(self):
    """
    Getter method for out_ack_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/out_ack_messages (yang:counter64)

    YANG Description: Number of sent RSVP refresh reduction ack messages
    """
    return self.__out_ack_messages
      
  def _set_out_ack_messages(self, v, load=False):
    """
    Setter method for out_ack_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/out_ack_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_ack_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_ack_messages() directly.

    YANG Description: Number of sent RSVP refresh reduction ack messages
    """
    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="out-ack-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_ack_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-ack-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_ack_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_ack_messages(self):
    self.__out_ack_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-ack-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_rate_limited_messages(self):
    """
    Getter method for rate_limited_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/rate_limited_messages (yang:counter64)

    YANG Description: RSVP messages dropped due to rate limiting
    """
    return self.__rate_limited_messages
      
  def _set_rate_limited_messages(self, v, load=False):
    """
    Setter method for rate_limited_messages, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/rate_limited_messages (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_rate_limited_messages is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_rate_limited_messages() directly.

    YANG Description: RSVP messages dropped due to rate limiting
    """
    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="rate-limited-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """rate_limited_messages must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="rate-limited-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__rate_limited_messages = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_rate_limited_messages(self):
    self.__rate_limited_messages = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="rate-limited-messages", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_errors(self):
    """
    Getter method for errors, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors (container)

    YANG Description: Interface specific RSVP error counters
    """
    return self.__errors
      
  def _set_errors(self, v, load=False):
    """
    Setter method for errors, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters/errors (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_errors is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_errors() directly.

    YANG Description: Interface specific RSVP error counters
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_errors_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_state_counters_errors, is_container='container', yang_name="errors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """errors must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_errors_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_state_counters_errors, is_container='container', yang_name="errors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__errors = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_errors(self):
    self.__errors = YANGDynClass(base=yc_errors_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_state_counters_errors, is_container='container', yang_name="errors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  in_path_messages = __builtin__.property(_get_in_path_messages)
  in_path_error_messages = __builtin__.property(_get_in_path_error_messages)
  in_path_tear_messages = __builtin__.property(_get_in_path_tear_messages)
  in_reservation_messages = __builtin__.property(_get_in_reservation_messages)
  in_reservation_error_messages = __builtin__.property(_get_in_reservation_error_messages)
  in_reservation_tear_messages = __builtin__.property(_get_in_reservation_tear_messages)
  in_hello_messages = __builtin__.property(_get_in_hello_messages)
  in_srefresh_messages = __builtin__.property(_get_in_srefresh_messages)
  in_ack_messages = __builtin__.property(_get_in_ack_messages)
  out_path_messages = __builtin__.property(_get_out_path_messages)
  out_path_error_messages = __builtin__.property(_get_out_path_error_messages)
  out_path_tear_messages = __builtin__.property(_get_out_path_tear_messages)
  out_reservation_messages = __builtin__.property(_get_out_reservation_messages)
  out_reservation_error_messages = __builtin__.property(_get_out_reservation_error_messages)
  out_reservation_tear_messages = __builtin__.property(_get_out_reservation_tear_messages)
  out_hello_messages = __builtin__.property(_get_out_hello_messages)
  out_srefresh_messages = __builtin__.property(_get_out_srefresh_messages)
  out_ack_messages = __builtin__.property(_get_out_ack_messages)
  rate_limited_messages = __builtin__.property(_get_rate_limited_messages)
  errors = __builtin__.property(_get_errors)


  _pyangbind_elements = OrderedDict([('in_path_messages', in_path_messages), ('in_path_error_messages', in_path_error_messages), ('in_path_tear_messages', in_path_tear_messages), ('in_reservation_messages', in_reservation_messages), ('in_reservation_error_messages', in_reservation_error_messages), ('in_reservation_tear_messages', in_reservation_tear_messages), ('in_hello_messages', in_hello_messages), ('in_srefresh_messages', in_srefresh_messages), ('in_ack_messages', in_ack_messages), ('out_path_messages', out_path_messages), ('out_path_error_messages', out_path_error_messages), ('out_path_tear_messages', out_path_tear_messages), ('out_reservation_messages', out_reservation_messages), ('out_reservation_error_messages', out_reservation_error_messages), ('out_reservation_tear_messages', out_reservation_tear_messages), ('out_hello_messages', out_hello_messages), ('out_srefresh_messages', out_srefresh_messages), ('out_ack_messages', out_ack_messages), ('rate_limited_messages', rate_limited_messages), ('errors', errors), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/interface/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Per-interface RSVP protocol and state information
  """
  __slots__ = ('_path_helper', '_extmethods', '__max_link_bandwidth','__interface_id','__counters',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__max_link_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=False)
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'state']

  def _get_max_link_bandwidth(self):
    """
    Getter method for max_link_bandwidth, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/max_link_bandwidth (oc-mplst:bandwidth-kbps)

    YANG Description: The maximum link bandwidth expressed in kilobits
per second. This value should be the same (other than
the units) as the value that is advertised into the
IGP traffic engineering database.
    """
    return self.__max_link_bandwidth
      
  def _set_max_link_bandwidth(self, v, load=False):
    """
    Setter method for max_link_bandwidth, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/max_link_bandwidth (oc-mplst:bandwidth-kbps)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_link_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_link_bandwidth() directly.

    YANG Description: The maximum link bandwidth expressed in kilobits
per second. This value should be the same (other than
the units) as the value that is advertised into the
IGP traffic engineering database.
    """
    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-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_link_bandwidth must be of a type compatible with oc-mplst:bandwidth-kbps""",
          'defined-type': "oc-mplst:bandwidth-kbps",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)""",
        })

    self.__max_link_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_link_bandwidth(self):
    self.__max_link_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)


  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/interface_id (oc-if:interface-id)

    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 /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/interface_id (oc-if:interface-id)
    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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_id must be of a type compatible with oc-if:interface-id""",
          'defined-type': "oc-if:interface-id",
          '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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=False)


  def _get_counters(self):
    """
    Getter method for counters, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters (container)

    YANG Description: Interface specific RSVP statistics and counters
    """
    return self.__counters
      
  def _set_counters(self, v, load=False):
    """
    Setter method for counters, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state/counters (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_counters is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_counters() directly.

    YANG Description: Interface specific RSVP statistics and counters
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_counters_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """counters must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_counters_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__counters = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_counters(self):
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  max_link_bandwidth = __builtin__.property(_get_max_link_bandwidth)
  interface_id = __builtin__.property(_get_interface_id)
  counters = __builtin__.property(_get_counters)


  _pyangbind_elements = OrderedDict([('max_link_bandwidth', max_link_bandwidth), ('interface_id', interface_id), ('counters', counters), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_interface_ref_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'interface-ref', 'config']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/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 /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/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 /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_interface_ref_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'interface-ref', 'state']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/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 /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/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 /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_interface_ref(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/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
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'interface-ref'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'interface-ref']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/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 /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/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 /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_bandwidth_reservations_bandwidth_reservation_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/interface/bandwidth-reservations/bandwidth-reservation/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
bandwidth reservation at a certain priority
  """
  __slots__ = ('_path_helper', '_extmethods', '__priority','__available_bandwidth','__reserved_bandwidth','__active_reservations_count','__highwater_mark',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__priority = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ALL': {}},),], is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    self.__available_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="available-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-mbps', is_config=False)
    self.__reserved_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="reserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-mbps', is_config=False)
    self.__active_reservations_count = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="active-reservations-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:gauge64', is_config=False)
    self.__highwater_mark = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="highwater-mark", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-mbps', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'bandwidth-reservations', 'bandwidth-reservation', 'state']

  def _get_priority(self):
    """
    Getter method for priority, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/bandwidth_reservations/bandwidth_reservation/state/priority (union)

    YANG Description: RSVP priority level for LSPs traversing the interface
    """
    return self.__priority
      
  def _set_priority(self, v, load=False):
    """
    Setter method for priority, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/bandwidth_reservations/bandwidth_reservation/state/priority (union)
    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: RSVP priority level for LSPs traversing the interface
    """
    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']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ALL': {}},),], is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """priority must be of a type compatible with union""",
          'defined-type': "openconfig-network-instance:union",
          'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ALL': {}},),], is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)""",
        })

    self.__priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_priority(self):
    self.__priority = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}),RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ALL': {}},),], is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='union', is_config=False)


  def _get_available_bandwidth(self):
    """
    Getter method for available_bandwidth, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/bandwidth_reservations/bandwidth_reservation/state/available_bandwidth (oc-mplst:bandwidth-mbps)

    YANG Description: Bandwidth currently available with the priority level,
or for the entire interface when the priority is set to
ALL
    """
    return self.__available_bandwidth
      
  def _set_available_bandwidth(self, v, load=False):
    """
    Setter method for available_bandwidth, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/bandwidth_reservations/bandwidth_reservation/state/available_bandwidth (oc-mplst:bandwidth-mbps)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_available_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_available_bandwidth() directly.

    YANG Description: Bandwidth currently available with the priority level,
or for the entire interface when the priority is set to
ALL
    """
    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="available-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-mbps', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """available_bandwidth must be of a type compatible with oc-mplst:bandwidth-mbps""",
          'defined-type': "oc-mplst:bandwidth-mbps",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="available-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-mbps', is_config=False)""",
        })

    self.__available_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_available_bandwidth(self):
    self.__available_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="available-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-mbps', is_config=False)


  def _get_reserved_bandwidth(self):
    """
    Getter method for reserved_bandwidth, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/bandwidth_reservations/bandwidth_reservation/state/reserved_bandwidth (oc-mplst:bandwidth-mbps)

    YANG Description: Bandwidth currently reserved within the priority level,
or the sum of all priority levels when the keyword is set
to ALL
    """
    return self.__reserved_bandwidth
      
  def _set_reserved_bandwidth(self, v, load=False):
    """
    Setter method for reserved_bandwidth, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/bandwidth_reservations/bandwidth_reservation/state/reserved_bandwidth (oc-mplst:bandwidth-mbps)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_reserved_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_reserved_bandwidth() directly.

    YANG Description: Bandwidth currently reserved within the priority level,
or the sum of all priority levels when the keyword is set
to ALL
    """
    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="reserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-mbps', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """reserved_bandwidth must be of a type compatible with oc-mplst:bandwidth-mbps""",
          'defined-type': "oc-mplst:bandwidth-mbps",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="reserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-mbps', is_config=False)""",
        })

    self.__reserved_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_reserved_bandwidth(self):
    self.__reserved_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="reserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-mbps', is_config=False)


  def _get_active_reservations_count(self):
    """
    Getter method for active_reservations_count, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/bandwidth_reservations/bandwidth_reservation/state/active_reservations_count (yang:gauge64)

    YANG Description: Number of active RSVP reservations in the associated
priority, or the sum of all reservations when the priority
level is set to ALL
    """
    return self.__active_reservations_count
      
  def _set_active_reservations_count(self, v, load=False):
    """
    Setter method for active_reservations_count, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/bandwidth_reservations/bandwidth_reservation/state/active_reservations_count (yang:gauge64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_active_reservations_count is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_active_reservations_count() directly.

    YANG Description: Number of active RSVP reservations in the associated
priority, or the sum of all reservations when the priority
level is set to ALL
    """
    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="active-reservations-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:gauge64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """active_reservations_count must be of a type compatible with yang:gauge64""",
          'defined-type': "yang:gauge64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="active-reservations-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:gauge64', is_config=False)""",
        })

    self.__active_reservations_count = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_active_reservations_count(self):
    self.__active_reservations_count = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="active-reservations-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:gauge64', is_config=False)


  def _get_highwater_mark(self):
    """
    Getter method for highwater_mark, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/bandwidth_reservations/bandwidth_reservation/state/highwater_mark (oc-mplst:bandwidth-mbps)

    YANG Description: Maximum bandwidth reserved on the interface within the
priority, or across all priorities in the case that the
priority level is set to ALL
    """
    return self.__highwater_mark
      
  def _set_highwater_mark(self, v, load=False):
    """
    Setter method for highwater_mark, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/bandwidth_reservations/bandwidth_reservation/state/highwater_mark (oc-mplst:bandwidth-mbps)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_highwater_mark is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_highwater_mark() directly.

    YANG Description: Maximum bandwidth reserved on the interface within the
priority, or across all priorities in the case that the
priority level is set to ALL
    """
    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="highwater-mark", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-mbps', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """highwater_mark must be of a type compatible with oc-mplst:bandwidth-mbps""",
          'defined-type': "oc-mplst:bandwidth-mbps",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="highwater-mark", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-mbps', is_config=False)""",
        })

    self.__highwater_mark = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_highwater_mark(self):
    self.__highwater_mark = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="highwater-mark", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-mbps', is_config=False)

  priority = __builtin__.property(_get_priority)
  available_bandwidth = __builtin__.property(_get_available_bandwidth)
  reserved_bandwidth = __builtin__.property(_get_reserved_bandwidth)
  active_reservations_count = __builtin__.property(_get_active_reservations_count)
  highwater_mark = __builtin__.property(_get_highwater_mark)


  _pyangbind_elements = OrderedDict([('priority', priority), ('available_bandwidth', available_bandwidth), ('reserved_bandwidth', reserved_bandwidth), ('active_reservations_count', active_reservations_count), ('highwater_mark', highwater_mark), ])


class yc_bandwidth_reservation_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_bandwidth_reservations_bandwidth_reservation(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/interface/bandwidth-reservations/bandwidth-reservation. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Available and reserved bandwidth by priority on
the interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__priority','__state',)

  _yang_name = 'bandwidth-reservation'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__priority = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_bandwidth_reservations_bandwidth_reservation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'bandwidth-reservations', 'bandwidth-reservation']

  def _get_priority(self):
    """
    Getter method for priority, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/bandwidth_reservations/bandwidth_reservation/priority (leafref)

    YANG Description: Reference to the RSVP priority level
    """
    return self.__priority
      
  def _set_priority(self, v, load=False):
    """
    Setter method for priority, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/bandwidth_reservations/bandwidth_reservation/priority (leafref)
    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: Reference to the RSVP priority level
    """
    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="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """priority must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_priority(self):
    self.__priority = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/bandwidth_reservations/bandwidth_reservation/state (container)

    YANG Description: Operational state parameters relating to a
bandwidth reservation at a certain priority
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/bandwidth_reservations/bandwidth_reservation/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
bandwidth reservation at a certain priority
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_bandwidth_reservations_bandwidth_reservation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_bandwidth_reservations_bandwidth_reservation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_bandwidth_reservations_bandwidth_reservation_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  priority = __builtin__.property(_get_priority)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('priority', priority), ('state', state), ])


class yc_bandwidth_reservations_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_bandwidth_reservations(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/interface/bandwidth-reservations. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for bandwidth reservation
  """
  __slots__ = ('_path_helper', '_extmethods', '__bandwidth_reservation',)

  _yang_name = 'bandwidth-reservations'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__bandwidth_reservation = YANGDynClass(base=YANGListType("priority",yc_bandwidth_reservation_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_bandwidth_reservations_bandwidth_reservation, yang_name="bandwidth-reservation", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="bandwidth-reservation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'bandwidth-reservations']

  def _get_bandwidth_reservation(self):
    """
    Getter method for bandwidth_reservation, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/bandwidth_reservations/bandwidth_reservation (list)

    YANG Description: Available and reserved bandwidth by priority on
the interface.
    """
    return self.__bandwidth_reservation
      
  def _set_bandwidth_reservation(self, v, load=False):
    """
    Setter method for bandwidth_reservation, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/bandwidth_reservations/bandwidth_reservation (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth_reservation is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth_reservation() directly.

    YANG Description: Available and reserved bandwidth by priority on
the interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("priority",yc_bandwidth_reservation_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_bandwidth_reservations_bandwidth_reservation, yang_name="bandwidth-reservation", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="bandwidth-reservation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth_reservation must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("priority",yc_bandwidth_reservation_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_bandwidth_reservations_bandwidth_reservation, yang_name="bandwidth-reservation", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="bandwidth-reservation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__bandwidth_reservation = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth_reservation(self):
    self.__bandwidth_reservation = YANGDynClass(base=YANGListType("priority",yc_bandwidth_reservation_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_bandwidth_reservations_bandwidth_reservation, yang_name="bandwidth-reservation", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="bandwidth-reservation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  bandwidth_reservation = __builtin__.property(_get_bandwidth_reservation, _set_bandwidth_reservation)


  _pyangbind_elements = OrderedDict([('bandwidth_reservation', bandwidth_reservation), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_hellos_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/interface/hellos/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to RSVP
hellos
  """
  __slots__ = ('_path_helper', '_extmethods', '__hello_interval','__refresh_reduction',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1000..60000']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(9000), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__refresh_reduction = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="refresh-reduction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'hellos', 'config']

  def _get_hello_interval(self):
    """
    Getter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/hellos/config/hello_interval (uint16)

    YANG Description: set the interval in ms between RSVP hello
messages
    """
    return self.__hello_interval
      
  def _set_hello_interval(self, v, load=False):
    """
    Setter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/hellos/config/hello_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_interval() directly.

    YANG Description: set the interval in ms between RSVP hello
messages
    """
    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': ['1000..60000']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(9000), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_interval must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1000..60000']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(9000), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__hello_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_interval(self):
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1000..60000']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(9000), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_refresh_reduction(self):
    """
    Getter method for refresh_reduction, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/hellos/config/refresh_reduction (boolean)

    YANG Description: enables all RSVP refresh reduction message
bundling, RSVP message ID, reliable message delivery
and summary refresh
    """
    return self.__refresh_reduction
      
  def _set_refresh_reduction(self, v, load=False):
    """
    Setter method for refresh_reduction, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/hellos/config/refresh_reduction (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_refresh_reduction is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_refresh_reduction() directly.

    YANG Description: enables all RSVP refresh reduction message
bundling, RSVP message ID, reliable message delivery
and summary refresh
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="refresh-reduction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """refresh_reduction must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="refresh-reduction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__refresh_reduction = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_refresh_reduction(self):
    self.__refresh_reduction = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="refresh-reduction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  hello_interval = __builtin__.property(_get_hello_interval, _set_hello_interval)
  refresh_reduction = __builtin__.property(_get_refresh_reduction, _set_refresh_reduction)


  _pyangbind_elements = OrderedDict([('hello_interval', hello_interval), ('refresh_reduction', refresh_reduction), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_hellos_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/interface/hellos/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information associated with RSVP hellos
  """
  __slots__ = ('_path_helper', '_extmethods', '__hello_interval','__refresh_reduction',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1000..60000']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(9000), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__refresh_reduction = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="refresh-reduction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'hellos', 'state']

  def _get_hello_interval(self):
    """
    Getter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/hellos/state/hello_interval (uint16)

    YANG Description: set the interval in ms between RSVP hello
messages
    """
    return self.__hello_interval
      
  def _set_hello_interval(self, v, load=False):
    """
    Setter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/hellos/state/hello_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_interval() directly.

    YANG Description: set the interval in ms between RSVP hello
messages
    """
    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': ['1000..60000']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(9000), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_interval must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1000..60000']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(9000), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__hello_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_interval(self):
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1000..60000']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(9000), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_refresh_reduction(self):
    """
    Getter method for refresh_reduction, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/hellos/state/refresh_reduction (boolean)

    YANG Description: enables all RSVP refresh reduction message
bundling, RSVP message ID, reliable message delivery
and summary refresh
    """
    return self.__refresh_reduction
      
  def _set_refresh_reduction(self, v, load=False):
    """
    Setter method for refresh_reduction, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/hellos/state/refresh_reduction (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_refresh_reduction is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_refresh_reduction() directly.

    YANG Description: enables all RSVP refresh reduction message
bundling, RSVP message ID, reliable message delivery
and summary refresh
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="refresh-reduction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """refresh_reduction must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="refresh-reduction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__refresh_reduction = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_refresh_reduction(self):
    self.__refresh_reduction = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="refresh-reduction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  hello_interval = __builtin__.property(_get_hello_interval)
  refresh_reduction = __builtin__.property(_get_refresh_reduction)


  _pyangbind_elements = OrderedDict([('hello_interval', hello_interval), ('refresh_reduction', refresh_reduction), ])


class yc_hellos_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_hellos(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/interface/hellos. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top level container for RSVP hello parameters
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'hellos'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_hellos_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_hellos_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'hellos']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/hellos/config (container)

    YANG Description: Configuration parameters relating to RSVP
hellos
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/hellos/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 RSVP
hellos
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_hellos_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_hellos_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_hellos_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/hellos/state (container)

    YANG Description: State information associated with RSVP hellos
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/hellos/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 associated with RSVP hellos
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_hellos_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_hellos_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_hellos_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_authentication_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/interface/authentication/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating
to authentication
  """
  __slots__ = ('_path_helper', '_extmethods', '__enable','__authentication_type','__authentication_key',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__authentication_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="authentication-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__authentication_key = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'authentication', 'config']

  def _get_enable(self):
    """
    Getter method for enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/authentication/config/enable (boolean)

    YANG Description: Enables RSVP authentication on the node.
    """
    return self.__enable
      
  def _set_enable(self, v, load=False):
    """
    Setter method for enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/authentication/config/enable (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable() directly.

    YANG Description: Enables RSVP authentication on the node.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable 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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enable = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable(self):
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_authentication_type(self):
    """
    Getter method for authentication_type, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/authentication/config/authentication_type (identityref)

    YANG Description: RSVP message authentication algorithm type
    """
    return self.__authentication_type
      
  def _set_authentication_type(self, v, load=False):
    """
    Setter method for authentication_type, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/authentication/config/authentication_type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_authentication_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_authentication_type() directly.

    YANG Description: RSVP message authentication algorithm type
    """
    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={'RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="authentication-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """authentication_type must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="authentication-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__authentication_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_authentication_type(self):
    self.__authentication_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="authentication-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_authentication_key(self):
    """
    Getter method for authentication_key, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/authentication/config/authentication_key (oc-types:routing-password)

    YANG Description: Authenticate RSVP signaling messages
    """
    return self.__authentication_key
      
  def _set_authentication_key(self, v, load=False):
    """
    Setter method for authentication_key, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/authentication/config/authentication_key (oc-types:routing-password)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_authentication_key is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_authentication_key() directly.

    YANG Description: Authenticate RSVP signaling messages
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """authentication_key must be of a type compatible with oc-types:routing-password""",
          'defined-type': "oc-types:routing-password",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)""",
        })

    self.__authentication_key = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_authentication_key(self):
    self.__authentication_key = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)

  enable = __builtin__.property(_get_enable, _set_enable)
  authentication_type = __builtin__.property(_get_authentication_type, _set_authentication_type)
  authentication_key = __builtin__.property(_get_authentication_key, _set_authentication_key)


  _pyangbind_elements = OrderedDict([('enable', enable), ('authentication_type', authentication_type), ('authentication_key', authentication_key), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_authentication_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/interface/authentication/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information associated
with authentication
  """
  __slots__ = ('_path_helper', '_extmethods', '__enable','__authentication_type','__authentication_key',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__authentication_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="authentication-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__authentication_key = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'authentication', 'state']

  def _get_enable(self):
    """
    Getter method for enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/authentication/state/enable (boolean)

    YANG Description: Enables RSVP authentication on the node.
    """
    return self.__enable
      
  def _set_enable(self, v, load=False):
    """
    Setter method for enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/authentication/state/enable (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable() directly.

    YANG Description: Enables RSVP authentication on the node.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable 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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enable = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable(self):
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_authentication_type(self):
    """
    Getter method for authentication_type, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/authentication/state/authentication_type (identityref)

    YANG Description: RSVP message authentication algorithm type
    """
    return self.__authentication_type
      
  def _set_authentication_type(self, v, load=False):
    """
    Setter method for authentication_type, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/authentication/state/authentication_type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_authentication_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_authentication_type() directly.

    YANG Description: RSVP message authentication algorithm type
    """
    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={'RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="authentication-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """authentication_type must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="authentication-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__authentication_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_authentication_type(self):
    self.__authentication_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:RSVP_AUTH_MD5': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="authentication-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_authentication_key(self):
    """
    Getter method for authentication_key, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/authentication/state/authentication_key (oc-types:routing-password)

    YANG Description: Authenticate RSVP signaling messages
    """
    return self.__authentication_key
      
  def _set_authentication_key(self, v, load=False):
    """
    Setter method for authentication_key, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/authentication/state/authentication_key (oc-types:routing-password)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_authentication_key is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_authentication_key() directly.

    YANG Description: Authenticate RSVP signaling messages
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """authentication_key must be of a type compatible with oc-types:routing-password""",
          'defined-type': "oc-types:routing-password",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=False)""",
        })

    self.__authentication_key = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_authentication_key(self):
    self.__authentication_key = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=False)

  enable = __builtin__.property(_get_enable)
  authentication_type = __builtin__.property(_get_authentication_type)
  authentication_key = __builtin__.property(_get_authentication_key)


  _pyangbind_elements = OrderedDict([('enable', enable), ('authentication_type', authentication_type), ('authentication_key', authentication_key), ])


class yc_authentication_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_authentication(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/interface/authentication. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration and state parameters relating to RSVP
authentication as per RFC2747
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'authentication'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_authentication_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'authentication']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/authentication/config (container)

    YANG Description: Configuration parameters relating
to authentication
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/authentication/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 authentication
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_authentication_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_authentication_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_authentication_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/authentication/state (container)

    YANG Description: State information associated
with authentication
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/authentication/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 associated
with authentication
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_subscription_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/interface/subscription/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to RSVP
subscription options
  """
  __slots__ = ('_path_helper', '_extmethods', '__subscription',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__subscription = 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="subscription", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'subscription', 'config']

  def _get_subscription(self):
    """
    Getter method for subscription, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/subscription/config/subscription (oc-types:percentage)

    YANG Description: percentage of the interface bandwidth that
RSVP can reserve
    """
    return self.__subscription
      
  def _set_subscription(self, v, load=False):
    """
    Setter method for subscription, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/subscription/config/subscription (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_subscription is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_subscription() directly.

    YANG Description: percentage of the interface bandwidth that
RSVP can reserve
    """
    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="subscription", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """subscription 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="subscription", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__subscription = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_subscription(self):
    self.__subscription = 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="subscription", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  subscription = __builtin__.property(_get_subscription, _set_subscription)


  _pyangbind_elements = OrderedDict([('subscription', subscription), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_subscription_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/interface/subscription/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to RSVP
subscription options
  """
  __slots__ = ('_path_helper', '_extmethods', '__subscription','__calculated_absolute_subscription_bw',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__subscription = 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="subscription", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__calculated_absolute_subscription_bw = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="calculated-absolute-subscription-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'subscription', 'state']

  def _get_subscription(self):
    """
    Getter method for subscription, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/subscription/state/subscription (oc-types:percentage)

    YANG Description: percentage of the interface bandwidth that
RSVP can reserve
    """
    return self.__subscription
      
  def _set_subscription(self, v, load=False):
    """
    Setter method for subscription, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/subscription/state/subscription (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_subscription is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_subscription() directly.

    YANG Description: percentage of the interface bandwidth that
RSVP can reserve
    """
    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="subscription", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """subscription 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="subscription", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__subscription = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_subscription(self):
    self.__subscription = 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="subscription", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_calculated_absolute_subscription_bw(self):
    """
    Getter method for calculated_absolute_subscription_bw, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/subscription/state/calculated_absolute_subscription_bw (uint64)

    YANG Description: The calculated absolute value of the bandwidth
which is reservable to RSVP-TE on the interface
prior to any adjustments that may be made from
external sources.
    """
    return self.__calculated_absolute_subscription_bw
      
  def _set_calculated_absolute_subscription_bw(self, v, load=False):
    """
    Setter method for calculated_absolute_subscription_bw, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/subscription/state/calculated_absolute_subscription_bw (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_calculated_absolute_subscription_bw is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_calculated_absolute_subscription_bw() directly.

    YANG Description: The calculated absolute value of the bandwidth
which is reservable to RSVP-TE on the interface
prior to any adjustments that may be made from
external sources.
    """
    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="calculated-absolute-subscription-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """calculated_absolute_subscription_bw 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="calculated-absolute-subscription-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__calculated_absolute_subscription_bw = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_calculated_absolute_subscription_bw(self):
    self.__calculated_absolute_subscription_bw = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="calculated-absolute-subscription-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)

  subscription = __builtin__.property(_get_subscription)
  calculated_absolute_subscription_bw = __builtin__.property(_get_calculated_absolute_subscription_bw)


  _pyangbind_elements = OrderedDict([('subscription', subscription), ('calculated_absolute_subscription_bw', calculated_absolute_subscription_bw), ])


class yc_subscription_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_subscription(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/interface/subscription. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Bandwidth percentage reservable by RSVP
on an interface
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'subscription'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_subscription_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_subscription_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'subscription']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/subscription/config (container)

    YANG Description: Configuration parameters relating to RSVP
subscription options
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/subscription/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 RSVP
subscription options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_subscription_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_subscription_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_subscription_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/subscription/state (container)

    YANG Description: State parameters relating to RSVP
subscription options
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/subscription/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 parameters relating to RSVP
subscription options
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_subscription_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_subscription_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_subscription_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_protection_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/interface/protection/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration for link-protection
  """
  __slots__ = ('_path_helper', '_extmethods', '__link_protection_style_requested','__bypass_optimize_interval',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__link_protection_style_requested = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LINK_NODE_PROTECTION_REQUESTED"), is_leaf=True, yang_name="link-protection-style-requested", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__bypass_optimize_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="bypass-optimize-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'protection', 'config']

  def _get_link_protection_style_requested(self):
    """
    Getter method for link_protection_style_requested, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/protection/config/link_protection_style_requested (identityref)

    YANG Description: Style of mpls frr protection desired:
link, link-node, or unprotected
    """
    return self.__link_protection_style_requested
      
  def _set_link_protection_style_requested(self, v, load=False):
    """
    Setter method for link_protection_style_requested, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/protection/config/link_protection_style_requested (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_protection_style_requested is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_protection_style_requested() directly.

    YANG Description: Style of mpls frr protection desired:
link, link-node, or unprotected
    """
    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={'UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LINK_NODE_PROTECTION_REQUESTED"), is_leaf=True, yang_name="link-protection-style-requested", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_protection_style_requested must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LINK_NODE_PROTECTION_REQUESTED"), is_leaf=True, yang_name="link-protection-style-requested", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__link_protection_style_requested = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_protection_style_requested(self):
    self.__link_protection_style_requested = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LINK_NODE_PROTECTION_REQUESTED"), is_leaf=True, yang_name="link-protection-style-requested", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_bypass_optimize_interval(self):
    """
    Getter method for bypass_optimize_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/protection/config/bypass_optimize_interval (uint16)

    YANG Description: interval between periodic optimization
of the bypass LSPs
    """
    return self.__bypass_optimize_interval
      
  def _set_bypass_optimize_interval(self, v, load=False):
    """
    Setter method for bypass_optimize_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/protection/config/bypass_optimize_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bypass_optimize_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bypass_optimize_interval() directly.

    YANG Description: interval between periodic optimization
of the bypass LSPs
    """
    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="bypass-optimize-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bypass_optimize_interval 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="bypass-optimize-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__bypass_optimize_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bypass_optimize_interval(self):
    self.__bypass_optimize_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="bypass-optimize-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

  link_protection_style_requested = __builtin__.property(_get_link_protection_style_requested, _set_link_protection_style_requested)
  bypass_optimize_interval = __builtin__.property(_get_bypass_optimize_interval, _set_bypass_optimize_interval)


  _pyangbind_elements = OrderedDict([('link_protection_style_requested', link_protection_style_requested), ('bypass_optimize_interval', bypass_optimize_interval), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_protection_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/interface/protection/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State for link-protection
  """
  __slots__ = ('_path_helper', '_extmethods', '__link_protection_style_requested','__bypass_optimize_interval',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__link_protection_style_requested = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LINK_NODE_PROTECTION_REQUESTED"), is_leaf=True, yang_name="link-protection-style-requested", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__bypass_optimize_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="bypass-optimize-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'protection', 'state']

  def _get_link_protection_style_requested(self):
    """
    Getter method for link_protection_style_requested, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/protection/state/link_protection_style_requested (identityref)

    YANG Description: Style of mpls frr protection desired:
link, link-node, or unprotected
    """
    return self.__link_protection_style_requested
      
  def _set_link_protection_style_requested(self, v, load=False):
    """
    Setter method for link_protection_style_requested, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/protection/state/link_protection_style_requested (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_link_protection_style_requested is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_link_protection_style_requested() directly.

    YANG Description: Style of mpls frr protection desired:
link, link-node, or unprotected
    """
    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={'UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LINK_NODE_PROTECTION_REQUESTED"), is_leaf=True, yang_name="link-protection-style-requested", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """link_protection_style_requested must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LINK_NODE_PROTECTION_REQUESTED"), is_leaf=True, yang_name="link-protection-style-requested", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__link_protection_style_requested = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_link_protection_style_requested(self):
    self.__link_protection_style_requested = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LINK_NODE_PROTECTION_REQUESTED"), is_leaf=True, yang_name="link-protection-style-requested", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_bypass_optimize_interval(self):
    """
    Getter method for bypass_optimize_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/protection/state/bypass_optimize_interval (uint16)

    YANG Description: interval between periodic optimization
of the bypass LSPs
    """
    return self.__bypass_optimize_interval
      
  def _set_bypass_optimize_interval(self, v, load=False):
    """
    Setter method for bypass_optimize_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/protection/state/bypass_optimize_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bypass_optimize_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bypass_optimize_interval() directly.

    YANG Description: interval between periodic optimization
of the bypass LSPs
    """
    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="bypass-optimize-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bypass_optimize_interval 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="bypass-optimize-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__bypass_optimize_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bypass_optimize_interval(self):
    self.__bypass_optimize_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="bypass-optimize-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  link_protection_style_requested = __builtin__.property(_get_link_protection_style_requested)
  bypass_optimize_interval = __builtin__.property(_get_bypass_optimize_interval)


  _pyangbind_elements = OrderedDict([('link_protection_style_requested', link_protection_style_requested), ('bypass_optimize_interval', bypass_optimize_interval), ])


class yc_protection_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_protection(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/interface/protection. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: link-protection (NHOP) related configuration
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'protection'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_protection_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_protection_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface', 'protection']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/protection/config (container)

    YANG Description: Configuration for link-protection
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/protection/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 for link-protection
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_protection_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_protection_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_protection_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/protection/state (container)

    YANG Description: State for link-protection
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/protection/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 for link-protection
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_protection_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_protection_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_protection_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_interface_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes/interface. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: list of per-interface RSVP configurations
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id','__config','__state','__interface_ref','__bandwidth_reservations','__hellos','__authentication','__subscription','__protection',)

  _yang_name = 'interface'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__interface_ref = YANGDynClass(base=yc_interface_ref_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__bandwidth_reservations = YANGDynClass(base=yc_bandwidth_reservations_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_bandwidth_reservations, is_container='container', yang_name="bandwidth-reservations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__hellos = YANGDynClass(base=yc_hellos_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_hellos, is_container='container', yang_name="hellos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__authentication = YANGDynClass(base=yc_authentication_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_authentication, is_container='container', yang_name="authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__subscription = YANGDynClass(base=yc_subscription_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_subscription, is_container='container', yang_name="subscription", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__protection = YANGDynClass(base=yc_protection_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_protection, is_container='container', yang_name="protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes', 'interface']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/interface_id (leafref)

    YANG Description: reference to the interface-id data
    """
    return self.__interface_id
      
  def _set_interface_id(self, v, load=False):
    """
    Setter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/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 data
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/config (container)

    YANG Description: Configuration of per-interface RSVP parameters
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/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 of per-interface RSVP parameters
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/state (container)

    YANG Description: Per-interface RSVP protocol and state information
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/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: Per-interface RSVP protocol and state information
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_interface_ref(self):
    """
    Getter method for interface_ref, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/interface_ref (container)

    YANG Description: Reference to an interface or subinterface
    """
    return self.__interface_ref
      
  def _set_interface_ref(self, v, load=False):
    """
    Setter method for interface_ref, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/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
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interface_ref_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_bandwidth_reservations(self):
    """
    Getter method for bandwidth_reservations, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/bandwidth_reservations (container)

    YANG Description: Enclosing container for bandwidth reservation
    """
    return self.__bandwidth_reservations
      
  def _set_bandwidth_reservations(self, v, load=False):
    """
    Setter method for bandwidth_reservations, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/bandwidth_reservations (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth_reservations is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth_reservations() directly.

    YANG Description: Enclosing container for bandwidth reservation
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_bandwidth_reservations_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_bandwidth_reservations, is_container='container', yang_name="bandwidth-reservations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth_reservations must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_bandwidth_reservations_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_bandwidth_reservations, is_container='container', yang_name="bandwidth-reservations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__bandwidth_reservations = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth_reservations(self):
    self.__bandwidth_reservations = YANGDynClass(base=yc_bandwidth_reservations_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_bandwidth_reservations, is_container='container', yang_name="bandwidth-reservations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_hellos(self):
    """
    Getter method for hellos, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/hellos (container)

    YANG Description: Top level container for RSVP hello parameters
    """
    return self.__hellos
      
  def _set_hellos(self, v, load=False):
    """
    Setter method for hellos, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/hellos (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hellos is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hellos() directly.

    YANG Description: Top level container for RSVP hello parameters
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_hellos_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_hellos, is_container='container', yang_name="hellos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hellos must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_hellos_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_hellos, is_container='container', yang_name="hellos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__hellos = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hellos(self):
    self.__hellos = YANGDynClass(base=yc_hellos_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_hellos, is_container='container', yang_name="hellos", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_authentication(self):
    """
    Getter method for authentication, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/authentication (container)

    YANG Description: Configuration and state parameters relating to RSVP
authentication as per RFC2747
    """
    return self.__authentication
      
  def _set_authentication(self, v, load=False):
    """
    Setter method for authentication, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/authentication (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_authentication is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_authentication() directly.

    YANG Description: Configuration and state parameters relating to RSVP
authentication as per RFC2747
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_authentication_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_authentication, is_container='container', yang_name="authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """authentication must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_authentication_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_authentication, is_container='container', yang_name="authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__authentication = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_authentication(self):
    self.__authentication = YANGDynClass(base=yc_authentication_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_authentication, is_container='container', yang_name="authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_subscription(self):
    """
    Getter method for subscription, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/subscription (container)

    YANG Description: Bandwidth percentage reservable by RSVP
on an interface
    """
    return self.__subscription
      
  def _set_subscription(self, v, load=False):
    """
    Setter method for subscription, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/subscription (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_subscription is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_subscription() directly.

    YANG Description: Bandwidth percentage reservable by RSVP
on an interface
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_subscription_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_subscription, is_container='container', yang_name="subscription", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """subscription must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_subscription_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_subscription, is_container='container', yang_name="subscription", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__subscription = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_subscription(self):
    self.__subscription = YANGDynClass(base=yc_subscription_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_subscription, is_container='container', yang_name="subscription", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_protection(self):
    """
    Getter method for protection, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/protection (container)

    YANG Description: link-protection (NHOP) related configuration
    """
    return self.__protection
      
  def _set_protection(self, v, load=False):
    """
    Setter method for protection, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface/protection (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_protection is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_protection() directly.

    YANG Description: link-protection (NHOP) related configuration
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_protection_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_protection, is_container='container', yang_name="protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """protection must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_protection_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_protection, is_container='container', yang_name="protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__protection = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_protection(self):
    self.__protection = YANGDynClass(base=yc_protection_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_interface_protection, is_container='container', yang_name="protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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)
  bandwidth_reservations = __builtin__.property(_get_bandwidth_reservations, _set_bandwidth_reservations)
  hellos = __builtin__.property(_get_hellos, _set_hellos)
  authentication = __builtin__.property(_get_authentication, _set_authentication)
  subscription = __builtin__.property(_get_subscription, _set_subscription)
  protection = __builtin__.property(_get_protection, _set_protection)


  _pyangbind_elements = OrderedDict([('interface_id', interface_id), ('config', config), ('state', state), ('interface_ref', interface_ref), ('bandwidth_reservations', bandwidth_reservations), ('hellos', hellos), ('authentication', authentication), ('subscription', subscription), ('protection', protection), ])


class yc_interface_attributes_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te/interface-attributes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Attributes relating to RSVP-TE enabled interfaces
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface',)

  _yang_name = 'interface-attributes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te', 'interface-attributes']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/interface (list)

    YANG Description: list of per-interface RSVP configurations
    """
    return self.__interface
      
  def _set_interface(self, v, load=False):
    """
    Setter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes/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 per-interface RSVP configurations
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("interface_id",yc_interface_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  interface = __builtin__.property(_get_interface, _set_interface)


  _pyangbind_elements = OrderedDict([('interface', interface), ])


class yc_rsvp_te_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/rsvp-te. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: RSVP-TE global signaling protocol configuration
  """
  __slots__ = ('_path_helper', '_extmethods', '__sessions','__neighbors','__global_','__interface_attributes',)

  _yang_name = 'rsvp-te'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__sessions = YANGDynClass(base=yc_sessions_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions, is_container='container', yang_name="sessions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__neighbors = YANGDynClass(base=yc_neighbors_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__global_ = YANGDynClass(base=yc_global__openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__interface_attributes = YANGDynClass(base=yc_interface_attributes_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes, is_container='container', yang_name="interface-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'rsvp-te']

  def _get_sessions(self):
    """
    Getter method for sessions, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions (container)

    YANG Description: Enclosing container for sessions
    """
    return self.__sessions
      
  def _set_sessions(self, v, load=False):
    """
    Setter method for sessions, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/sessions (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sessions is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sessions() directly.

    YANG Description: Enclosing container for sessions
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_sessions_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions, is_container='container', yang_name="sessions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sessions must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_sessions_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions, is_container='container', yang_name="sessions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__sessions = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sessions(self):
    self.__sessions = YANGDynClass(base=yc_sessions_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_sessions, is_container='container', yang_name="sessions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_neighbors(self):
    """
    Getter method for neighbors, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/neighbors (container)

    YANG Description: Configuration and state for RSVP neighbors connecting
to the device
    """
    return self.__neighbors
      
  def _set_neighbors(self, v, load=False):
    """
    Setter method for neighbors, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/neighbors (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbors is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbors() directly.

    YANG Description: Configuration and state for RSVP neighbors connecting
to the device
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_neighbors_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbors must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_neighbors_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__neighbors = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbors(self):
    self.__neighbors = YANGDynClass(base=yc_neighbors_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_global_(self):
    """
    Getter method for global_, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global (container)

    YANG Description: Platform wide RSVP configuration and state
    """
    return self.__global_
      
  def _set_global_(self, v, load=False):
    """
    Setter method for global_, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_global_ is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_global_() directly.

    YANG Description: Platform wide RSVP configuration and state
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_global__openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """global_ must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_global__openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__global_ = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_global_(self):
    self.__global_ = YANGDynClass(base=yc_global__openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_interface_attributes(self):
    """
    Getter method for interface_attributes, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes (container)

    YANG Description: Attributes relating to RSVP-TE enabled interfaces
    """
    return self.__interface_attributes
      
  def _set_interface_attributes(self, v, load=False):
    """
    Setter method for interface_attributes, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te/interface_attributes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_interface_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_interface_attributes() directly.

    YANG Description: Attributes relating to RSVP-TE enabled interfaces
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interface_attributes_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes, is_container='container', yang_name="interface-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_attributes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_interface_attributes_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes, is_container='container', yang_name="interface-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__interface_attributes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_interface_attributes(self):
    self.__interface_attributes = YANGDynClass(base=yc_interface_attributes_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te_interface_attributes, is_container='container', yang_name="interface-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  sessions = __builtin__.property(_get_sessions, _set_sessions)
  neighbors = __builtin__.property(_get_neighbors, _set_neighbors)
  global_ = __builtin__.property(_get_global_, _set_global_)
  interface_attributes = __builtin__.property(_get_interface_attributes, _set_interface_attributes)


  _pyangbind_elements = OrderedDict([('sessions', sessions), ('neighbors', neighbors), ('global_', global_), ('interface_attributes', interface_attributes), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/global/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Global LDP configuration attributes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__lsr_id',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__lsr_id = 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}'}),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}|:))'}),], is_leaf=True, yang_name="lsr-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'global', 'config']

  def _get_lsr_id(self):
    """
    Getter method for lsr_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/config/lsr_id (oc-inet:ip-address)

    YANG Description: Global label switch router identifier
configuration.
    """
    return self.__lsr_id
      
  def _set_lsr_id(self, v, load=False):
    """
    Setter method for lsr_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/config/lsr_id (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsr_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsr_id() directly.

    YANG Description: Global label switch router identifier
configuration.
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="lsr-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsr_id must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="lsr-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)""",
        })

    self.__lsr_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsr_id(self):
    self.__lsr_id = 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}'}),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}|:))'}),], is_leaf=True, yang_name="lsr-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)

  lsr_id = __builtin__.property(_get_lsr_id, _set_lsr_id)


  _pyangbind_elements = OrderedDict([('lsr_id', lsr_id), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/global/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Global LDP state information.
  """
  __slots__ = ('_path_helper', '_extmethods', '__lsr_id',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__lsr_id = 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}'}),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}|:))'}),], is_leaf=True, yang_name="lsr-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'global', 'state']

  def _get_lsr_id(self):
    """
    Getter method for lsr_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/state/lsr_id (oc-inet:ip-address)

    YANG Description: Global label switch router identifier
configuration.
    """
    return self.__lsr_id
      
  def _set_lsr_id(self, v, load=False):
    """
    Setter method for lsr_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/state/lsr_id (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsr_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsr_id() directly.

    YANG Description: Global label switch router identifier
configuration.
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="lsr-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsr_id must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="lsr-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__lsr_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsr_id(self):
    self.__lsr_id = 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}'}),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}|:))'}),], is_leaf=True, yang_name="lsr-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)

  lsr_id = __builtin__.property(_get_lsr_id)


  _pyangbind_elements = OrderedDict([('lsr_id', lsr_id), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global_graceful_restart_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/global/graceful-restart/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: LDP graceful-restart configuration attributes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__reconnect_time','__recovery_time','__forwarding_holdtime','__helper_enable',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__reconnect_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="reconnect-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__recovery_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="recovery-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__forwarding_holdtime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="forwarding-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__helper_enable = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'global', 'graceful-restart', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/config/enabled (boolean)

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_reconnect_time(self):
    """
    Getter method for reconnect_time, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/config/reconnect_time (uint16)

    YANG Description: Interval for which the remote LDP peers
will wait for the local node to reconnect after a
failure
    """
    return self.__reconnect_time
      
  def _set_reconnect_time(self, v, load=False):
    """
    Setter method for reconnect_time, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/config/reconnect_time (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_reconnect_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_reconnect_time() directly.

    YANG Description: Interval for which the remote LDP peers
will wait for the local node to reconnect after a
failure
    """
    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="reconnect-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """reconnect_time 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="reconnect-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__reconnect_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_reconnect_time(self):
    self.__reconnect_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="reconnect-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_recovery_time(self):
    """
    Getter method for recovery_time, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/config/recovery_time (uint16)

    YANG Description: Interval used to specify the time for the remote
peer to maintain the MPLS forwarding state after
the local node has succesfully reconnected
    """
    return self.__recovery_time
      
  def _set_recovery_time(self, v, load=False):
    """
    Setter method for recovery_time, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/config/recovery_time (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_recovery_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_recovery_time() directly.

    YANG Description: Interval used to specify the time for the remote
peer to maintain the MPLS forwarding state after
the local node has succesfully reconnected
    """
    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="recovery-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """recovery_time 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="recovery-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__recovery_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_recovery_time(self):
    self.__recovery_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="recovery-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_forwarding_holdtime(self):
    """
    Getter method for forwarding_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/config/forwarding_holdtime (uint16)

    YANG Description: Time that defines the interval for keeping the
node in recovery mode.
    """
    return self.__forwarding_holdtime
      
  def _set_forwarding_holdtime(self, v, load=False):
    """
    Setter method for forwarding_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/config/forwarding_holdtime (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_forwarding_holdtime is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_forwarding_holdtime() directly.

    YANG Description: Time that defines the interval for keeping the
node in recovery mode.
    """
    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="forwarding-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """forwarding_holdtime 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="forwarding-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__forwarding_holdtime = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_forwarding_holdtime(self):
    self.__forwarding_holdtime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="forwarding-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_helper_enable(self):
    """
    Getter method for helper_enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/config/helper_enable (boolean)

    YANG Description: Enables the graceful restart helper for LDP.
    """
    return self.__helper_enable
      
  def _set_helper_enable(self, v, load=False):
    """
    Setter method for helper_enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/config/helper_enable (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_helper_enable is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_helper_enable() directly.

    YANG Description: Enables the graceful restart helper for LDP.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="helper-enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """helper_enable must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__helper_enable = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_helper_enable(self):
    self.__helper_enable = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)
  reconnect_time = __builtin__.property(_get_reconnect_time, _set_reconnect_time)
  recovery_time = __builtin__.property(_get_recovery_time, _set_recovery_time)
  forwarding_holdtime = __builtin__.property(_get_forwarding_holdtime, _set_forwarding_holdtime)
  helper_enable = __builtin__.property(_get_helper_enable, _set_helper_enable)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('reconnect_time', reconnect_time), ('recovery_time', recovery_time), ('forwarding_holdtime', forwarding_holdtime), ('helper_enable', helper_enable), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global_graceful_restart_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/global/graceful-restart/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: LDP graceful-restart state attributes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__reconnect_time','__recovery_time','__forwarding_holdtime','__helper_enable',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__reconnect_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="reconnect-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__recovery_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="recovery-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__forwarding_holdtime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="forwarding-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__helper_enable = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'global', 'graceful-restart', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/state/enabled (boolean)

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_reconnect_time(self):
    """
    Getter method for reconnect_time, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/state/reconnect_time (uint16)

    YANG Description: Interval for which the remote LDP peers
will wait for the local node to reconnect after a
failure
    """
    return self.__reconnect_time
      
  def _set_reconnect_time(self, v, load=False):
    """
    Setter method for reconnect_time, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/state/reconnect_time (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_reconnect_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_reconnect_time() directly.

    YANG Description: Interval for which the remote LDP peers
will wait for the local node to reconnect after a
failure
    """
    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="reconnect-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """reconnect_time 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="reconnect-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__reconnect_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_reconnect_time(self):
    self.__reconnect_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="reconnect-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_recovery_time(self):
    """
    Getter method for recovery_time, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/state/recovery_time (uint16)

    YANG Description: Interval used to specify the time for the remote
peer to maintain the MPLS forwarding state after
the local node has succesfully reconnected
    """
    return self.__recovery_time
      
  def _set_recovery_time(self, v, load=False):
    """
    Setter method for recovery_time, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/state/recovery_time (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_recovery_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_recovery_time() directly.

    YANG Description: Interval used to specify the time for the remote
peer to maintain the MPLS forwarding state after
the local node has succesfully reconnected
    """
    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="recovery-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """recovery_time 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="recovery-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__recovery_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_recovery_time(self):
    self.__recovery_time = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="recovery-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_forwarding_holdtime(self):
    """
    Getter method for forwarding_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/state/forwarding_holdtime (uint16)

    YANG Description: Time that defines the interval for keeping the
node in recovery mode.
    """
    return self.__forwarding_holdtime
      
  def _set_forwarding_holdtime(self, v, load=False):
    """
    Setter method for forwarding_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/state/forwarding_holdtime (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_forwarding_holdtime is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_forwarding_holdtime() directly.

    YANG Description: Time that defines the interval for keeping the
node in recovery mode.
    """
    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="forwarding-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """forwarding_holdtime 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="forwarding-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__forwarding_holdtime = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_forwarding_holdtime(self):
    self.__forwarding_holdtime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="forwarding-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_helper_enable(self):
    """
    Getter method for helper_enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/state/helper_enable (boolean)

    YANG Description: Enables the graceful restart helper for LDP.
    """
    return self.__helper_enable
      
  def _set_helper_enable(self, v, load=False):
    """
    Setter method for helper_enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/state/helper_enable (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_helper_enable is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_helper_enable() directly.

    YANG Description: Enables the graceful restart helper for LDP.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="helper-enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """helper_enable must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__helper_enable = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_helper_enable(self):
    self.__helper_enable = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="helper-enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  enabled = __builtin__.property(_get_enabled)
  reconnect_time = __builtin__.property(_get_reconnect_time)
  recovery_time = __builtin__.property(_get_recovery_time)
  forwarding_holdtime = __builtin__.property(_get_forwarding_holdtime)
  helper_enable = __builtin__.property(_get_helper_enable)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('reconnect_time', reconnect_time), ('recovery_time', recovery_time), ('forwarding_holdtime', forwarding_holdtime), ('helper_enable', helper_enable), ])


class yc_graceful_restart_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global_graceful_restart(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/global/graceful-restart. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top container for LDP graceful-restart attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'graceful-restart'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'global', 'graceful-restart']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/config (container)

    YANG Description: LDP graceful-restart configuration attributes.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/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: LDP graceful-restart configuration attributes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global_graceful_restart_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/state (container)

    YANG Description: LDP graceful-restart state attributes.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart/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: LDP graceful-restart state attributes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global_graceful_restart_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global_authentication_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/global/authentication/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration of LDP authentication attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__enable','__authentication_key',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__authentication_key = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'global', 'authentication', 'config']

  def _get_enable(self):
    """
    Getter method for enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/authentication/config/enable (boolean)

    YANG Description: Enables LDP authentication on the node.
    """
    return self.__enable
      
  def _set_enable(self, v, load=False):
    """
    Setter method for enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/authentication/config/enable (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable() directly.

    YANG Description: Enables LDP authentication on the node.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable 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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enable = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable(self):
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_authentication_key(self):
    """
    Getter method for authentication_key, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/authentication/config/authentication_key (oc-types:routing-password)

    YANG Description: authenticate LDP signaling
messages
    """
    return self.__authentication_key
      
  def _set_authentication_key(self, v, load=False):
    """
    Setter method for authentication_key, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/authentication/config/authentication_key (oc-types:routing-password)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_authentication_key is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_authentication_key() directly.

    YANG Description: authenticate LDP signaling
messages
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """authentication_key must be of a type compatible with oc-types:routing-password""",
          'defined-type': "oc-types:routing-password",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)""",
        })

    self.__authentication_key = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_authentication_key(self):
    self.__authentication_key = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)

  enable = __builtin__.property(_get_enable, _set_enable)
  authentication_key = __builtin__.property(_get_authentication_key, _set_authentication_key)


  _pyangbind_elements = OrderedDict([('enable', enable), ('authentication_key', authentication_key), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global_authentication_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/global/authentication/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: LDP authentication state.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enable','__authentication_key',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__authentication_key = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'global', 'authentication', 'state']

  def _get_enable(self):
    """
    Getter method for enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/authentication/state/enable (boolean)

    YANG Description: Enables LDP authentication on the node.
    """
    return self.__enable
      
  def _set_enable(self, v, load=False):
    """
    Setter method for enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/authentication/state/enable (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable() directly.

    YANG Description: Enables LDP authentication on the node.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable 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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enable = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable(self):
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_authentication_key(self):
    """
    Getter method for authentication_key, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/authentication/state/authentication_key (oc-types:routing-password)

    YANG Description: authenticate LDP signaling
messages
    """
    return self.__authentication_key
      
  def _set_authentication_key(self, v, load=False):
    """
    Setter method for authentication_key, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/authentication/state/authentication_key (oc-types:routing-password)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_authentication_key is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_authentication_key() directly.

    YANG Description: authenticate LDP signaling
messages
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """authentication_key must be of a type compatible with oc-types:routing-password""",
          'defined-type': "oc-types:routing-password",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=False)""",
        })

    self.__authentication_key = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_authentication_key(self):
    self.__authentication_key = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=False)

  enable = __builtin__.property(_get_enable)
  authentication_key = __builtin__.property(_get_authentication_key)


  _pyangbind_elements = OrderedDict([('enable', enable), ('authentication_key', authentication_key), ])


class yc_authentication_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global_authentication(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/global/authentication. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Global LDP authentication
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'authentication'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global_authentication_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'global', 'authentication']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/authentication/config (container)

    YANG Description: Configuration of LDP authentication attributes
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/authentication/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 of LDP authentication attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global_authentication_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global_authentication_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global_authentication_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/authentication/state (container)

    YANG Description: LDP authentication state.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/authentication/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: LDP authentication state.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_global__openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/global. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Platform wide LDP configuration and state
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__graceful_restart','__authentication',)

  _yang_name = 'global'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__graceful_restart = YANGDynClass(base=yc_graceful_restart_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__authentication = YANGDynClass(base=yc_authentication_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global_authentication, is_container='container', yang_name="authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'global']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/config (container)

    YANG Description: Global LDP configuration attributes.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/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: Global LDP configuration attributes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/state (container)

    YANG Description: Global LDP state information.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/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: Global LDP state information.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_graceful_restart(self):
    """
    Getter method for graceful_restart, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart (container)

    YANG Description: Top container for LDP graceful-restart attributes
    """
    return self.__graceful_restart
      
  def _set_graceful_restart(self, v, load=False):
    """
    Setter method for graceful_restart, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/graceful_restart (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_graceful_restart is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_graceful_restart() directly.

    YANG Description: Top container for LDP graceful-restart attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_graceful_restart_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """graceful_restart must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_graceful_restart_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__graceful_restart = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_graceful_restart(self):
    self.__graceful_restart = YANGDynClass(base=yc_graceful_restart_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global_graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_authentication(self):
    """
    Getter method for authentication, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/authentication (container)

    YANG Description: Global LDP authentication
    """
    return self.__authentication
      
  def _set_authentication(self, v, load=False):
    """
    Setter method for authentication, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global/authentication (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_authentication is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_authentication() directly.

    YANG Description: Global LDP authentication
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_authentication_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global_authentication, is_container='container', yang_name="authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """authentication must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_authentication_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global_authentication, is_container='container', yang_name="authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__authentication = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_authentication(self):
    self.__authentication = YANGDynClass(base=yc_authentication_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global_authentication, is_container='container', yang_name="authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  graceful_restart = __builtin__.property(_get_graceful_restart, _set_graceful_restart)
  authentication = __builtin__.property(_get_authentication, _set_authentication)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('graceful_restart', graceful_restart), ('authentication', authentication), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/interface-attributes/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration of per-interface LDP parameters
  """
  __slots__ = ('_path_helper', '_extmethods', '__hello_holdtime','__hello_interval',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__hello_holdtime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'interface-attributes', 'config']

  def _get_hello_holdtime(self):
    """
    Getter method for hello_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/config/hello_holdtime (uint16)

    YANG Description: Defines the time for which a neighbor adjacency will
be kept by the router while it waits for a new link
Hello message.
    """
    return self.__hello_holdtime
      
  def _set_hello_holdtime(self, v, load=False):
    """
    Setter method for hello_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/config/hello_holdtime (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_holdtime is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_holdtime() directly.

    YANG Description: Defines the time for which a neighbor adjacency will
be kept by the router while it waits for a new link
Hello message.
    """
    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="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_holdtime 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="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__hello_holdtime = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_holdtime(self):
    self.__hello_holdtime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_hello_interval(self):
    """
    Getter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/config/hello_interval (uint16)

    YANG Description: Defines the interval for sending Hello messages on
each link LDP adjacency.
    """
    return self.__hello_interval
      
  def _set_hello_interval(self, v, load=False):
    """
    Setter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/config/hello_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_interval() directly.

    YANG Description: Defines the interval for sending Hello messages on
each link LDP adjacency.
    """
    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="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_interval 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="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__hello_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_interval(self):
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

  hello_holdtime = __builtin__.property(_get_hello_holdtime, _set_hello_holdtime)
  hello_interval = __builtin__.property(_get_hello_interval, _set_hello_interval)


  _pyangbind_elements = OrderedDict([('hello_holdtime', hello_holdtime), ('hello_interval', hello_interval), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/interface-attributes/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Per-interface LDP protocol and state information
  """
  __slots__ = ('_path_helper', '_extmethods', '__hello_holdtime','__hello_interval',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__hello_holdtime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'interface-attributes', 'state']

  def _get_hello_holdtime(self):
    """
    Getter method for hello_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/state/hello_holdtime (uint16)

    YANG Description: Defines the time for which a neighbor adjacency will
be kept by the router while it waits for a new link
Hello message.
    """
    return self.__hello_holdtime
      
  def _set_hello_holdtime(self, v, load=False):
    """
    Setter method for hello_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/state/hello_holdtime (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_holdtime is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_holdtime() directly.

    YANG Description: Defines the time for which a neighbor adjacency will
be kept by the router while it waits for a new link
Hello message.
    """
    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="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_holdtime 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="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__hello_holdtime = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_holdtime(self):
    self.__hello_holdtime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_hello_interval(self):
    """
    Getter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/state/hello_interval (uint16)

    YANG Description: Defines the interval for sending Hello messages on
each link LDP adjacency.
    """
    return self.__hello_interval
      
  def _set_hello_interval(self, v, load=False):
    """
    Setter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/state/hello_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_interval() directly.

    YANG Description: Defines the interval for sending Hello messages on
each link LDP adjacency.
    """
    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="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_interval 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="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__hello_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_interval(self):
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  hello_holdtime = __builtin__.property(_get_hello_holdtime)
  hello_interval = __builtin__.property(_get_hello_interval)


  _pyangbind_elements = OrderedDict([('hello_holdtime', hello_holdtime), ('hello_interval', hello_interval), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/interface-attributes/interfaces/interface/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration of per-interface LDP parameters
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id','__hello_holdtime','__hello_interval',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=True)
    self.__hello_holdtime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'interface-attributes', 'interfaces', 'interface', 'config']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/config/interface_id (oc-if:interface-id)

    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 /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/config/interface_id (oc-if:interface-id)
    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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_id must be of a type compatible with oc-if:interface-id""",
          'defined-type': "oc-if:interface-id",
          '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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=True)


  def _get_hello_holdtime(self):
    """
    Getter method for hello_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/config/hello_holdtime (uint16)

    YANG Description: Defines the time for which a neighbor adjacency will
be kept by the router while it waits for a new link
Hello message.
    """
    return self.__hello_holdtime
      
  def _set_hello_holdtime(self, v, load=False):
    """
    Setter method for hello_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/config/hello_holdtime (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_holdtime is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_holdtime() directly.

    YANG Description: Defines the time for which a neighbor adjacency will
be kept by the router while it waits for a new link
Hello message.
    """
    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="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_holdtime 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="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__hello_holdtime = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_holdtime(self):
    self.__hello_holdtime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_hello_interval(self):
    """
    Getter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/config/hello_interval (uint16)

    YANG Description: Defines the interval for sending Hello messages on
each link LDP adjacency.
    """
    return self.__hello_interval
      
  def _set_hello_interval(self, v, load=False):
    """
    Setter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/config/hello_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_interval() directly.

    YANG Description: Defines the interval for sending Hello messages on
each link LDP adjacency.
    """
    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="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_interval 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="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__hello_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_interval(self):
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

  interface_id = __builtin__.property(_get_interface_id, _set_interface_id)
  hello_holdtime = __builtin__.property(_get_hello_holdtime, _set_hello_holdtime)
  hello_interval = __builtin__.property(_get_hello_interval, _set_hello_interval)


  _pyangbind_elements = OrderedDict([('interface_id', interface_id), ('hello_holdtime', hello_holdtime), ('hello_interval', hello_interval), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/interface-attributes/interfaces/interface/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Per-interface LDP protocol and state information
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id','__hello_holdtime','__hello_interval',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=False)
    self.__hello_holdtime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'interface-attributes', 'interfaces', 'interface', 'state']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/state/interface_id (oc-if:interface-id)

    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 /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/state/interface_id (oc-if:interface-id)
    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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_id must be of a type compatible with oc-if:interface-id""",
          'defined-type': "oc-if:interface-id",
          '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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', 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/network-instance', defining_module='openconfig-network-instance', yang_type='oc-if:interface-id', is_config=False)


  def _get_hello_holdtime(self):
    """
    Getter method for hello_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/state/hello_holdtime (uint16)

    YANG Description: Defines the time for which a neighbor adjacency will
be kept by the router while it waits for a new link
Hello message.
    """
    return self.__hello_holdtime
      
  def _set_hello_holdtime(self, v, load=False):
    """
    Setter method for hello_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/state/hello_holdtime (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_holdtime is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_holdtime() directly.

    YANG Description: Defines the time for which a neighbor adjacency will
be kept by the router while it waits for a new link
Hello message.
    """
    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="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_holdtime 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="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__hello_holdtime = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_holdtime(self):
    self.__hello_holdtime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_hello_interval(self):
    """
    Getter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/state/hello_interval (uint16)

    YANG Description: Defines the interval for sending Hello messages on
each link LDP adjacency.
    """
    return self.__hello_interval
      
  def _set_hello_interval(self, v, load=False):
    """
    Setter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/state/hello_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_interval() directly.

    YANG Description: Defines the interval for sending Hello messages on
each link LDP adjacency.
    """
    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="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_interval 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="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__hello_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_interval(self):
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  interface_id = __builtin__.property(_get_interface_id)
  hello_holdtime = __builtin__.property(_get_hello_holdtime)
  hello_interval = __builtin__.property(_get_hello_interval)


  _pyangbind_elements = OrderedDict([('interface_id', interface_id), ('hello_holdtime', hello_holdtime), ('hello_interval', hello_interval), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_interface_ref_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/interface-attributes/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'interface-attributes', 'interfaces', 'interface', 'interface-ref', 'config']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/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 /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/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 /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_interface_ref_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/interface-attributes/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'interface-attributes', 'interfaces', 'interface', 'interface-ref', 'state']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/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 /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/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 /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_interface_ref(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/interface-attributes/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
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'interface-ref'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'interface-attributes', 'interfaces', 'interface', 'interface-ref']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/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 /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/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 /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_address_families_address_family_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/interface-attributes/interfaces/interface/address-families/address-family/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration attributes related to address-families
for LDP.
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi_name','__enabled',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ldp:mpls-ldp-afi', is_config=True)
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'interface-attributes', 'interfaces', 'interface', 'address-families', 'address-family', 'config']

  def _get_afi_name(self):
    """
    Getter method for afi_name, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/address_families/address_family/config/afi_name (oc-ldp:mpls-ldp-afi)

    YANG Description: Adress-family name atttibute (IPv4, IPv6).
    """
    return self.__afi_name
      
  def _set_afi_name(self, v, load=False):
    """
    Setter method for afi_name, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/address_families/address_family/config/afi_name (oc-ldp:mpls-ldp-afi)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_name() directly.

    YANG Description: Adress-family name atttibute (IPv4, IPv6).
    """
    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': {}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ldp:mpls-ldp-afi', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_name must be of a type compatible with oc-ldp:mpls-ldp-afi""",
          'defined-type': "oc-ldp:mpls-ldp-afi",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ldp:mpls-ldp-afi', is_config=True)""",
        })

    self.__afi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_name(self):
    self.__afi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ldp:mpls-ldp-afi', is_config=True)


  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/address_families/address_family/config/enabled (boolean)

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/address_families/address_family/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  afi_name = __builtin__.property(_get_afi_name, _set_afi_name)
  enabled = __builtin__.property(_get_enabled, _set_enabled)


  _pyangbind_elements = OrderedDict([('afi_name', afi_name), ('enabled', enabled), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_address_families_address_family_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/interface-attributes/interfaces/interface/address-families/address-family/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State attributes related to address-families for LDP.
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi_name','__enabled',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ldp:mpls-ldp-afi', is_config=False)
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'interface-attributes', 'interfaces', 'interface', 'address-families', 'address-family', 'state']

  def _get_afi_name(self):
    """
    Getter method for afi_name, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/address_families/address_family/state/afi_name (oc-ldp:mpls-ldp-afi)

    YANG Description: Adress-family name atttibute (IPv4, IPv6).
    """
    return self.__afi_name
      
  def _set_afi_name(self, v, load=False):
    """
    Setter method for afi_name, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/address_families/address_family/state/afi_name (oc-ldp:mpls-ldp-afi)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_name() directly.

    YANG Description: Adress-family name atttibute (IPv4, IPv6).
    """
    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': {}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ldp:mpls-ldp-afi', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_name must be of a type compatible with oc-ldp:mpls-ldp-afi""",
          'defined-type': "oc-ldp:mpls-ldp-afi",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ldp:mpls-ldp-afi', is_config=False)""",
        })

    self.__afi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_name(self):
    self.__afi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ldp:mpls-ldp-afi', is_config=False)


  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/address_families/address_family/state/enabled (boolean)

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/address_families/address_family/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  afi_name = __builtin__.property(_get_afi_name)
  enabled = __builtin__.property(_get_enabled)


  _pyangbind_elements = OrderedDict([('afi_name', afi_name), ('enabled', enabled), ])


class yc_address_family_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_address_families_address_family(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/interface-attributes/interfaces/interface/address-families/address-family. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List for attributes related to address-families for LDP.
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi_name','__config','__state',)

  _yang_name = 'address-family'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_address_families_address_family_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_address_families_address_family_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'interface-attributes', 'interfaces', 'interface', 'address-families', 'address-family']

  def _get_afi_name(self):
    """
    Getter method for afi_name, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/address_families/address_family/afi_name (leafref)

    YANG Description: Adress-family name atttibute (IPv4, IPv6).
    """
    return self.__afi_name
      
  def _set_afi_name(self, v, load=False):
    """
    Setter method for afi_name, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/address_families/address_family/afi_name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_name() directly.

    YANG Description: Adress-family name atttibute (IPv4, IPv6).
    """
    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="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__afi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_name(self):
    self.__afi_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/address_families/address_family/config (container)

    YANG Description: Configuration attributes related to address-families
for LDP.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/address_families/address_family/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 related to address-families
for LDP.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_address_families_address_family_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_address_families_address_family_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_address_families_address_family_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/address_families/address_family/state (container)

    YANG Description: State attributes related to address-families for LDP.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/address_families/address_family/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 related to address-families for LDP.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_address_families_address_family_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_address_families_address_family_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_address_families_address_family_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  afi_name = __builtin__.property(_get_afi_name, _set_afi_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('afi_name', afi_name), ('config', config), ('state', state), ])


class yc_address_families_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_address_families(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/interface-attributes/interfaces/interface/address-families. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top container comprising the adress families
attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__address_family',)

  _yang_name = 'address-families'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__address_family = YANGDynClass(base=YANGListType("afi_name",yc_address_family_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_address_families_address_family, yang_name="address-family", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-name', extensions=None), is_container='list', yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'interface-attributes', 'interfaces', 'interface', 'address-families']

  def _get_address_family(self):
    """
    Getter method for address_family, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/address_families/address_family (list)

    YANG Description: List for attributes related to address-families for LDP.
    """
    return self.__address_family
      
  def _set_address_family(self, v, load=False):
    """
    Setter method for address_family, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/address_families/address_family (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address_family is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address_family() directly.

    YANG Description: List for attributes related to address-families for LDP.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("afi_name",yc_address_family_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_address_families_address_family, yang_name="address-family", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-name', extensions=None), is_container='list', yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address_family must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("afi_name",yc_address_family_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_address_families_address_family, yang_name="address-family", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-name', extensions=None), is_container='list', yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__address_family = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address_family(self):
    self.__address_family = YANGDynClass(base=YANGListType("afi_name",yc_address_family_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_address_families_address_family, yang_name="address-family", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-name', extensions=None), is_container='list', yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  address_family = __builtin__.property(_get_address_family, _set_address_family)


  _pyangbind_elements = OrderedDict([('address_family', address_family), ])


class yc_interface_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/interface-attributes/interfaces/interface. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: list of per-interface LDP configurations
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id','__config','__state','__interface_ref','__address_families',)

  _yang_name = 'interface'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__interface_ref = YANGDynClass(base=yc_interface_ref_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__address_families = YANGDynClass(base=yc_address_families_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_address_families, is_container='container', yang_name="address-families", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'interface-attributes', 'interfaces', 'interface']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/interface_id (leafref)

    YANG Description: reference to the interface-id data
    """
    return self.__interface_id
      
  def _set_interface_id(self, v, load=False):
    """
    Setter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/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 data
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/config (container)

    YANG Description: Configuration of per-interface LDP parameters
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/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 of per-interface LDP parameters
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/state (container)

    YANG Description: Per-interface LDP protocol and state information
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/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: Per-interface LDP protocol and state information
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_interface_ref(self):
    """
    Getter method for interface_ref, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/interface_ref (container)

    YANG Description: Reference to an interface or subinterface
    """
    return self.__interface_ref
      
  def _set_interface_ref(self, v, load=False):
    """
    Setter method for interface_ref, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/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
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interface_ref_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_address_families(self):
    """
    Getter method for address_families, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/address_families (container)

    YANG Description: Top container comprising the adress families
attributes
    """
    return self.__address_families
      
  def _set_address_families(self, v, load=False):
    """
    Setter method for address_families, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface/address_families (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address_families is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address_families() directly.

    YANG Description: Top container comprising the adress families
attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_address_families_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_address_families, is_container='container', yang_name="address-families", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address_families must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_address_families_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_address_families, is_container='container', yang_name="address-families", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__address_families = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address_families(self):
    self.__address_families = YANGDynClass(base=yc_address_families_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces_interface_address_families, is_container='container', yang_name="address-families", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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)
  address_families = __builtin__.property(_get_address_families, _set_address_families)


  _pyangbind_elements = OrderedDict([('interface_id', interface_id), ('config', config), ('state', state), ('interface_ref', interface_ref), ('address_families', address_families), ])


class yc_interfaces_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_interfaces(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/interface-attributes/interfaces. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Container aggregating all interfaces and their
LDP-specific attributes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface',)

  _yang_name = 'interfaces'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'interface-attributes', 'interfaces']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces/interface (list)

    YANG Description: list of per-interface LDP configurations
    """
    return self.__interface
      
  def _set_interface(self, v, load=False):
    """
    Setter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/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 per-interface LDP configurations
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("interface_id",yc_interface_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  interface = __builtin__.property(_get_interface, _set_interface)


  _pyangbind_elements = OrderedDict([('interface', interface), ])


class yc_interface_attributes_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/interface-attributes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Container including attributes for LDP-enabled
interfaces
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__interfaces',)

  _yang_name = 'interface-attributes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__interfaces = YANGDynClass(base=yc_interfaces_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'interface-attributes']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/config (container)

    YANG Description: Configuration of per-interface LDP parameters
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/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 of per-interface LDP parameters
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/state (container)

    YANG Description: Per-interface LDP protocol and state information
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/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: Per-interface LDP protocol and state information
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_interfaces(self):
    """
    Getter method for interfaces, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/interfaces (container)

    YANG Description: Container aggregating all interfaces and their
LDP-specific attributes.
    """
    return self.__interfaces
      
  def _set_interfaces(self, v, load=False):
    """
    Setter method for interfaces, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes/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: Container aggregating all interfaces and their
LDP-specific attributes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interfaces_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  interfaces = __builtin__.property(_get_interfaces, _set_interfaces)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('interfaces', interfaces), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/targeted/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration attributes related to targeted LDP.
  """
  __slots__ = ('_path_helper', '_extmethods', '__hello_holdtime','__hello_interval','__hello_accept',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__hello_holdtime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__hello_accept = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="hello-accept", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'targeted', 'config']

  def _get_hello_holdtime(self):
    """
    Getter method for hello_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/config/hello_holdtime (uint16)

    YANG Description: Defines the time for which a neighbor adjacency will
be kept by the router while it waits for a new link
Hello message.
    """
    return self.__hello_holdtime
      
  def _set_hello_holdtime(self, v, load=False):
    """
    Setter method for hello_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/config/hello_holdtime (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_holdtime is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_holdtime() directly.

    YANG Description: Defines the time for which a neighbor adjacency will
be kept by the router while it waits for a new link
Hello message.
    """
    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="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_holdtime 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="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__hello_holdtime = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_holdtime(self):
    self.__hello_holdtime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_hello_interval(self):
    """
    Getter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/config/hello_interval (uint16)

    YANG Description: Defines the interval for sending Hello messages on
each link LDP adjacency.
    """
    return self.__hello_interval
      
  def _set_hello_interval(self, v, load=False):
    """
    Setter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/config/hello_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_interval() directly.

    YANG Description: Defines the interval for sending Hello messages on
each link LDP adjacency.
    """
    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="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_interval 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="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__hello_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_interval(self):
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_hello_accept(self):
    """
    Getter method for hello_accept, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/config/hello_accept (boolean)

    YANG Description: Enables or disables the acceptance of targeted LDP
hello messages.
    """
    return self.__hello_accept
      
  def _set_hello_accept(self, v, load=False):
    """
    Setter method for hello_accept, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/config/hello_accept (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_accept is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_accept() directly.

    YANG Description: Enables or disables the acceptance of targeted LDP
hello messages.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="hello-accept", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_accept must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="hello-accept", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__hello_accept = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_accept(self):
    self.__hello_accept = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="hello-accept", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  hello_holdtime = __builtin__.property(_get_hello_holdtime, _set_hello_holdtime)
  hello_interval = __builtin__.property(_get_hello_interval, _set_hello_interval)
  hello_accept = __builtin__.property(_get_hello_accept, _set_hello_accept)


  _pyangbind_elements = OrderedDict([('hello_holdtime', hello_holdtime), ('hello_interval', hello_interval), ('hello_accept', hello_accept), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/targeted/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State attributes related to targeted LDP.
  """
  __slots__ = ('_path_helper', '_extmethods', '__hello_holdtime','__hello_interval','__hello_accept',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__hello_holdtime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__hello_accept = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="hello-accept", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'targeted', 'state']

  def _get_hello_holdtime(self):
    """
    Getter method for hello_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/state/hello_holdtime (uint16)

    YANG Description: Defines the time for which a neighbor adjacency will
be kept by the router while it waits for a new link
Hello message.
    """
    return self.__hello_holdtime
      
  def _set_hello_holdtime(self, v, load=False):
    """
    Setter method for hello_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/state/hello_holdtime (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_holdtime is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_holdtime() directly.

    YANG Description: Defines the time for which a neighbor adjacency will
be kept by the router while it waits for a new link
Hello message.
    """
    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="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_holdtime 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="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__hello_holdtime = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_holdtime(self):
    self.__hello_holdtime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_hello_interval(self):
    """
    Getter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/state/hello_interval (uint16)

    YANG Description: Defines the interval for sending Hello messages on
each link LDP adjacency.
    """
    return self.__hello_interval
      
  def _set_hello_interval(self, v, load=False):
    """
    Setter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/state/hello_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_interval() directly.

    YANG Description: Defines the interval for sending Hello messages on
each link LDP adjacency.
    """
    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="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_interval 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="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__hello_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_interval(self):
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_hello_accept(self):
    """
    Getter method for hello_accept, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/state/hello_accept (boolean)

    YANG Description: Enables or disables the acceptance of targeted LDP
hello messages.
    """
    return self.__hello_accept
      
  def _set_hello_accept(self, v, load=False):
    """
    Setter method for hello_accept, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/state/hello_accept (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_accept is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_accept() directly.

    YANG Description: Enables or disables the acceptance of targeted LDP
hello messages.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="hello-accept", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_accept must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="hello-accept", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__hello_accept = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_accept(self):
    self.__hello_accept = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="hello-accept", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  hello_holdtime = __builtin__.property(_get_hello_holdtime)
  hello_interval = __builtin__.property(_get_hello_interval)
  hello_accept = __builtin__.property(_get_hello_accept)


  _pyangbind_elements = OrderedDict([('hello_holdtime', hello_holdtime), ('hello_interval', hello_interval), ('hello_accept', hello_accept), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/targeted/address-families/address-family/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Address-family configuration for targeted LDP
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi_name',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ldp:mpls-ldp-afi', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'targeted', 'address-families', 'address-family', 'config']

  def _get_afi_name(self):
    """
    Getter method for afi_name, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/config/afi_name (oc-ldp:mpls-ldp-afi)

    YANG Description: Adress-family name atttibute (IPv4, IPv6).
    """
    return self.__afi_name
      
  def _set_afi_name(self, v, load=False):
    """
    Setter method for afi_name, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/config/afi_name (oc-ldp:mpls-ldp-afi)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_name() directly.

    YANG Description: Adress-family name atttibute (IPv4, IPv6).
    """
    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': {}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ldp:mpls-ldp-afi', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_name must be of a type compatible with oc-ldp:mpls-ldp-afi""",
          'defined-type': "oc-ldp:mpls-ldp-afi",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ldp:mpls-ldp-afi', is_config=True)""",
        })

    self.__afi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_name(self):
    self.__afi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ldp:mpls-ldp-afi', is_config=True)

  afi_name = __builtin__.property(_get_afi_name, _set_afi_name)


  _pyangbind_elements = OrderedDict([('afi_name', afi_name), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/targeted/address-families/address-family/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Address-family state for targeted LDP
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi_name',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ldp:mpls-ldp-afi', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'targeted', 'address-families', 'address-family', 'state']

  def _get_afi_name(self):
    """
    Getter method for afi_name, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/state/afi_name (oc-ldp:mpls-ldp-afi)

    YANG Description: Adress-family name atttibute (IPv4, IPv6).
    """
    return self.__afi_name
      
  def _set_afi_name(self, v, load=False):
    """
    Setter method for afi_name, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/state/afi_name (oc-ldp:mpls-ldp-afi)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_name() directly.

    YANG Description: Adress-family name atttibute (IPv4, IPv6).
    """
    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': {}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ldp:mpls-ldp-afi', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_name must be of a type compatible with oc-ldp:mpls-ldp-afi""",
          'defined-type': "oc-ldp:mpls-ldp-afi",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ldp:mpls-ldp-afi', is_config=False)""",
        })

    self.__afi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_name(self):
    self.__afi_name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'IPV4': {}, 'IPV6': {}},), is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ldp:mpls-ldp-afi', is_config=False)

  afi_name = __builtin__.property(_get_afi_name)


  _pyangbind_elements = OrderedDict([('afi_name', afi_name), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_targets_target_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/targeted/address-families/address-family/targets/target/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters of a targeted LDP
adjacency
  """
  __slots__ = ('_path_helper', '_extmethods', '__remote_address','__local_address','__enabled','__hello_holdtime','__hello_interval',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__remote_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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    self.__local_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}'}),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}|:))'}),], is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__hello_holdtime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'targeted', 'address-families', 'address-family', 'targets', 'target', 'config']

  def _get_remote_address(self):
    """
    Getter method for remote_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/config/remote_address (oc-inet:ip-address)

    YANG Description: Configuration of neighbor address of the
targeted LDP adjacency
    """
    return self.__remote_address
      
  def _set_remote_address(self, v, load=False):
    """
    Setter method for remote_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/config/remote_address (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_remote_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_remote_address() directly.

    YANG Description: Configuration of neighbor address of the
targeted LDP adjacency
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """remote_address must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)""",
        })

    self.__remote_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_remote_address(self):
    self.__remote_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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)


  def _get_local_address(self):
    """
    Getter method for local_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/config/local_address (oc-inet:ip-address)

    YANG Description: Local IP address of the LDP adjacency
    """
    return self.__local_address
      
  def _set_local_address(self, v, load=False):
    """
    Setter method for local_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/config/local_address (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_address() directly.

    YANG Description: Local IP address of the LDP adjacency
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_address must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)""",
        })

    self.__local_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_address(self):
    self.__local_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}'}),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}|:))'}),], is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)


  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/config/enabled (boolean)

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_hello_holdtime(self):
    """
    Getter method for hello_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/config/hello_holdtime (uint16)

    YANG Description: Defines the time for which a neighbor adjacency will
be kept by the router while it waits for a new link
Hello message.
    """
    return self.__hello_holdtime
      
  def _set_hello_holdtime(self, v, load=False):
    """
    Setter method for hello_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/config/hello_holdtime (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_holdtime is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_holdtime() directly.

    YANG Description: Defines the time for which a neighbor adjacency will
be kept by the router while it waits for a new link
Hello message.
    """
    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="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_holdtime 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="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__hello_holdtime = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_holdtime(self):
    self.__hello_holdtime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_hello_interval(self):
    """
    Getter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/config/hello_interval (uint16)

    YANG Description: Defines the interval for sending Hello messages on
each link LDP adjacency.
    """
    return self.__hello_interval
      
  def _set_hello_interval(self, v, load=False):
    """
    Setter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/config/hello_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_interval() directly.

    YANG Description: Defines the interval for sending Hello messages on
each link LDP adjacency.
    """
    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="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_interval 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="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__hello_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_interval(self):
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

  remote_address = __builtin__.property(_get_remote_address, _set_remote_address)
  local_address = __builtin__.property(_get_local_address, _set_local_address)
  enabled = __builtin__.property(_get_enabled, _set_enabled)
  hello_holdtime = __builtin__.property(_get_hello_holdtime, _set_hello_holdtime)
  hello_interval = __builtin__.property(_get_hello_interval, _set_hello_interval)


  _pyangbind_elements = OrderedDict([('remote_address', remote_address), ('local_address', local_address), ('enabled', enabled), ('hello_holdtime', hello_holdtime), ('hello_interval', hello_interval), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_targets_target_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/targeted/address-families/address-family/targets/target/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State attributes of a targeted LDP adjacency
  """
  __slots__ = ('_path_helper', '_extmethods', '__remote_address','__local_address','__enabled','__hello_holdtime','__hello_interval',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__remote_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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__local_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}'}),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}|:))'}),], is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__hello_holdtime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'targeted', 'address-families', 'address-family', 'targets', 'target', 'state']

  def _get_remote_address(self):
    """
    Getter method for remote_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/state/remote_address (oc-inet:ip-address)

    YANG Description: Neighbor address of the targeted LDP adjacency
    """
    return self.__remote_address
      
  def _set_remote_address(self, v, load=False):
    """
    Setter method for remote_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/state/remote_address (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_remote_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_remote_address() directly.

    YANG Description: Neighbor address of the targeted LDP adjacency
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """remote_address must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__remote_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_remote_address(self):
    self.__remote_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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_local_address(self):
    """
    Getter method for local_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/state/local_address (oc-inet:ip-address)

    YANG Description: Local IP address of the LDP adjacency
    """
    return self.__local_address
      
  def _set_local_address(self, v, load=False):
    """
    Setter method for local_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/state/local_address (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_address() directly.

    YANG Description: Local IP address of the LDP adjacency
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_address must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__local_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_address(self):
    self.__local_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}'}),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}|:))'}),], is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/state/enabled (boolean)

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_hello_holdtime(self):
    """
    Getter method for hello_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/state/hello_holdtime (uint16)

    YANG Description: Defines the time for which a neighbor adjacency will
be kept by the router while it waits for a new link
Hello message.
    """
    return self.__hello_holdtime
      
  def _set_hello_holdtime(self, v, load=False):
    """
    Setter method for hello_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/state/hello_holdtime (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_holdtime is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_holdtime() directly.

    YANG Description: Defines the time for which a neighbor adjacency will
be kept by the router while it waits for a new link
Hello message.
    """
    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="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_holdtime 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="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__hello_holdtime = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_holdtime(self):
    self.__hello_holdtime = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_hello_interval(self):
    """
    Getter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/state/hello_interval (uint16)

    YANG Description: Defines the interval for sending Hello messages on
each link LDP adjacency.
    """
    return self.__hello_interval
      
  def _set_hello_interval(self, v, load=False):
    """
    Setter method for hello_interval, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/state/hello_interval (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_interval() directly.

    YANG Description: Defines the interval for sending Hello messages on
each link LDP adjacency.
    """
    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="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_interval 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="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__hello_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_interval(self):
    self.__hello_interval = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hello-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  remote_address = __builtin__.property(_get_remote_address)
  local_address = __builtin__.property(_get_local_address)
  enabled = __builtin__.property(_get_enabled)
  hello_holdtime = __builtin__.property(_get_hello_holdtime)
  hello_interval = __builtin__.property(_get_hello_interval)


  _pyangbind_elements = OrderedDict([('remote_address', remote_address), ('local_address', local_address), ('enabled', enabled), ('hello_holdtime', hello_holdtime), ('hello_interval', hello_interval), ])


class yc_target_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_targets_target(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/targeted/address-families/address-family/targets/target. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of LDP targets configuration
  """
  __slots__ = ('_path_helper', '_extmethods', '__remote_address','__config','__state',)

  _yang_name = 'target'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__remote_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_targets_target_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_targets_target_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'targeted', 'address-families', 'address-family', 'targets', 'target']

  def _get_remote_address(self):
    """
    Getter method for remote_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/remote_address (leafref)

    YANG Description: Neighbor address of the targeted LDP session
    """
    return self.__remote_address
      
  def _set_remote_address(self, v, load=False):
    """
    Setter method for remote_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/remote_address (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_remote_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_remote_address() directly.

    YANG Description: Neighbor address of the targeted LDP session
    """
    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="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """remote_address must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__remote_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_remote_address(self):
    self.__remote_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/config (container)

    YANG Description: Configuration parameters of a targeted LDP
adjacency
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/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 of a targeted LDP
adjacency
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_targets_target_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_targets_target_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_targets_target_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/state (container)

    YANG Description: State attributes of a targeted LDP adjacency
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target/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 of a targeted LDP adjacency
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_targets_target_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_targets_target_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_targets_target_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  remote_address = __builtin__.property(_get_remote_address, _set_remote_address)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('remote_address', remote_address), ('config', config), ('state', state), ])


class yc_targets_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_targets(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/targeted/address-families/address-family/targets. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Container aggregating all targeted sessions and
their LDP-specific attributes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__target',)

  _yang_name = 'targets'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__target = YANGDynClass(base=YANGListType("remote_address",yc_target_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_targets_target, yang_name="target", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='remote-address', extensions=None), is_container='list', yang_name="target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'targeted', 'address-families', 'address-family', 'targets']

  def _get_target(self):
    """
    Getter method for target, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target (list)

    YANG Description: List of LDP targets configuration
    """
    return self.__target
      
  def _set_target(self, v, load=False):
    """
    Setter method for target, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets/target (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_target is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_target() directly.

    YANG Description: List of LDP targets configuration
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("remote_address",yc_target_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_targets_target, yang_name="target", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='remote-address', extensions=None), is_container='list', yang_name="target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """target must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("remote_address",yc_target_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_targets_target, yang_name="target", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='remote-address', extensions=None), is_container='list', yang_name="target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__target = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_target(self):
    self.__target = YANGDynClass(base=YANGListType("remote_address",yc_target_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_targets_target, yang_name="target", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='remote-address', extensions=None), is_container='list', yang_name="target", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  target = __builtin__.property(_get_target, _set_target)


  _pyangbind_elements = OrderedDict([('target', target), ])


class yc_address_family_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/targeted/address-families/address-family. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of address families for targeted LDP
configuration
  """
  __slots__ = ('_path_helper', '_extmethods', '__afi_name','__config','__state','__targets',)

  _yang_name = 'address-family'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__afi_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__targets = YANGDynClass(base=yc_targets_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_targets, is_container='container', yang_name="targets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'targeted', 'address-families', 'address-family']

  def _get_afi_name(self):
    """
    Getter method for afi_name, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/afi_name (leafref)

    YANG Description: Adress-family name atttibute (IPv4, IPv6).
    """
    return self.__afi_name
      
  def _set_afi_name(self, v, load=False):
    """
    Setter method for afi_name, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/afi_name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_afi_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_afi_name() directly.

    YANG Description: Adress-family name atttibute (IPv4, IPv6).
    """
    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="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """afi_name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__afi_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_afi_name(self):
    self.__afi_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/config (container)

    YANG Description: Address-family configuration for targeted LDP
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/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: Address-family configuration for targeted LDP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/state (container)

    YANG Description: Address-family state for targeted LDP
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/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: Address-family state for targeted LDP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_targets(self):
    """
    Getter method for targets, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets (container)

    YANG Description: Container aggregating all targeted sessions and
their LDP-specific attributes.
    """
    return self.__targets
      
  def _set_targets(self, v, load=False):
    """
    Setter method for targets, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family/targets (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_targets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_targets() directly.

    YANG Description: Container aggregating all targeted sessions and
their LDP-specific attributes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_targets_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_targets, is_container='container', yang_name="targets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """targets must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_targets_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_targets, is_container='container', yang_name="targets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__targets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_targets(self):
    self.__targets = YANGDynClass(base=yc_targets_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family_targets, is_container='container', yang_name="targets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  afi_name = __builtin__.property(_get_afi_name, _set_afi_name)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  targets = __builtin__.property(_get_targets, _set_targets)


  _pyangbind_elements = OrderedDict([('afi_name', afi_name), ('config', config), ('state', state), ('targets', targets), ])


class yc_address_families_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/targeted/address-families. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Global container for IPv4 and IPv6 attributes for LDP.
  """
  __slots__ = ('_path_helper', '_extmethods', '__address_family',)

  _yang_name = 'address-families'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__address_family = YANGDynClass(base=YANGListType("afi_name",yc_address_family_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family, yang_name="address-family", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-name', extensions=None), is_container='list', yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'targeted', 'address-families']

  def _get_address_family(self):
    """
    Getter method for address_family, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family (list)

    YANG Description: List of address families for targeted LDP
configuration
    """
    return self.__address_family
      
  def _set_address_family(self, v, load=False):
    """
    Setter method for address_family, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families/address_family (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address_family is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address_family() directly.

    YANG Description: List of address families for targeted LDP
configuration
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("afi_name",yc_address_family_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family, yang_name="address-family", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-name', extensions=None), is_container='list', yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address_family must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("afi_name",yc_address_family_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family, yang_name="address-family", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-name', extensions=None), is_container='list', yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__address_family = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address_family(self):
    self.__address_family = YANGDynClass(base=YANGListType("afi_name",yc_address_family_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families_address_family, yang_name="address-family", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='afi-name', extensions=None), is_container='list', yang_name="address-family", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  address_family = __builtin__.property(_get_address_family, _set_address_family)


  _pyangbind_elements = OrderedDict([('address_family', address_family), ])


class yc_targeted_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/targeted. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top container for targeted LDP state and configuration
attributes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__address_families',)

  _yang_name = 'targeted'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__address_families = YANGDynClass(base=yc_address_families_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families, is_container='container', yang_name="address-families", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'targeted']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/config (container)

    YANG Description: Configuration attributes related to targeted LDP.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/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 related to targeted LDP.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/state (container)

    YANG Description: State attributes related to targeted LDP.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/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 related to targeted LDP.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_address_families(self):
    """
    Getter method for address_families, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families (container)

    YANG Description: Global container for IPv4 and IPv6 attributes for LDP.
    """
    return self.__address_families
      
  def _set_address_families(self, v, load=False):
    """
    Setter method for address_families, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted/address_families (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address_families is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address_families() directly.

    YANG Description: Global container for IPv4 and IPv6 attributes for LDP.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_address_families_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families, is_container='container', yang_name="address-families", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address_families must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_address_families_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families, is_container='container', yang_name="address-families", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__address_families = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address_families(self):
    self.__address_families = YANGDynClass(base=yc_address_families_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted_address_families, is_container='container', yang_name="address-families", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  address_families = __builtin__.property(_get_address_families, _set_address_families)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('address_families', address_families), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/neighbors/neighbor/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Neighbor configuration attributes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__lsr_id','__label_space_id','__enable_downstream_on_demand',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__lsr_id = 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}'}),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}|:))'}),], is_leaf=True, yang_name="lsr-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    self.__label_space_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="label-space-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__enable_downstream_on_demand = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-downstream-on-demand", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'neighbors', 'neighbor', 'config']

  def _get_lsr_id(self):
    """
    Getter method for lsr_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/config/lsr_id (oc-inet:ip-address)

    YANG Description: Neighbor label switch router identifier.
    """
    return self.__lsr_id
      
  def _set_lsr_id(self, v, load=False):
    """
    Setter method for lsr_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/config/lsr_id (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsr_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsr_id() directly.

    YANG Description: Neighbor label switch router identifier.
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="lsr-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsr_id must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="lsr-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)""",
        })

    self.__lsr_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsr_id(self):
    self.__lsr_id = 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}'}),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}|:))'}),], is_leaf=True, yang_name="lsr-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=True)


  def _get_label_space_id(self):
    """
    Getter method for label_space_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/config/label_space_id (uint16)

    YANG Description: Label space ID of the neighbor.
    """
    return self.__label_space_id
      
  def _set_label_space_id(self, v, load=False):
    """
    Setter method for label_space_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/config/label_space_id (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_label_space_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_label_space_id() directly.

    YANG Description: Label space ID of the neighbor.
    """
    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="label-space-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """label_space_id 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="label-space-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__label_space_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_label_space_id(self):
    self.__label_space_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="label-space-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_enable_downstream_on_demand(self):
    """
    Getter method for enable_downstream_on_demand, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/config/enable_downstream_on_demand (boolean)

    YANG Description: If this leaf is set to true, LDP downstream on demand is enabled in
the LDP session and the router advertises DoD to the peer. If the peer
also adverstises DoD, then downstream on demand is used in the session,
otherwise downstream unsolicited is used.
    """
    return self.__enable_downstream_on_demand
      
  def _set_enable_downstream_on_demand(self, v, load=False):
    """
    Setter method for enable_downstream_on_demand, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/config/enable_downstream_on_demand (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable_downstream_on_demand is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable_downstream_on_demand() directly.

    YANG Description: If this leaf is set to true, LDP downstream on demand is enabled in
the LDP session and the router advertises DoD to the peer. If the peer
also adverstises DoD, then downstream on demand is used in the session,
otherwise downstream unsolicited is used.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-downstream-on-demand", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable_downstream_on_demand 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-downstream-on-demand", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enable_downstream_on_demand = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable_downstream_on_demand(self):
    self.__enable_downstream_on_demand = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-downstream-on-demand", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  lsr_id = __builtin__.property(_get_lsr_id, _set_lsr_id)
  label_space_id = __builtin__.property(_get_label_space_id, _set_label_space_id)
  enable_downstream_on_demand = __builtin__.property(_get_enable_downstream_on_demand, _set_enable_downstream_on_demand)


  _pyangbind_elements = OrderedDict([('lsr_id', lsr_id), ('label_space_id', label_space_id), ('enable_downstream_on_demand', enable_downstream_on_demand), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/neighbors/neighbor/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Neighbor state attributes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__lsr_id','__label_space_id','__enable_downstream_on_demand','__session_state','__peer_label_advertisement_mode','__negotiated_label_advertisement_mode',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__lsr_id = 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}'}),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}|:))'}),], is_leaf=True, yang_name="lsr-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__label_space_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="label-space-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__enable_downstream_on_demand = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-downstream-on-demand", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__session_state = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'NON_EXISTENT': {}, 'INITIALIZED': {}, 'OPENREC': {}, 'OPENSENT': {}, 'OPERATIONAL': {}},), is_leaf=True, yang_name="session-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__peer_label_advertisement_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DOWNSTREAM_UNSOLICITED': {}, 'DOWNSTREAM_ON_DEMAND': {}},), is_leaf=True, yang_name="peer-label-advertisement-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='label-advertisement-mode', is_config=False)
    self.__negotiated_label_advertisement_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DOWNSTREAM_UNSOLICITED': {}, 'DOWNSTREAM_ON_DEMAND': {}},), is_leaf=True, yang_name="negotiated-label-advertisement-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='label-advertisement-mode', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'neighbors', 'neighbor', 'state']

  def _get_lsr_id(self):
    """
    Getter method for lsr_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/state/lsr_id (oc-inet:ip-address)

    YANG Description: Neighbor label switch router identifier.
    """
    return self.__lsr_id
      
  def _set_lsr_id(self, v, load=False):
    """
    Setter method for lsr_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/state/lsr_id (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsr_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsr_id() directly.

    YANG Description: Neighbor label switch router identifier.
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="lsr-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsr_id must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="lsr-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__lsr_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsr_id(self):
    self.__lsr_id = 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}'}),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}|:))'}),], is_leaf=True, yang_name="lsr-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_label_space_id(self):
    """
    Getter method for label_space_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/state/label_space_id (uint16)

    YANG Description: Label space ID of the neighbor.
    """
    return self.__label_space_id
      
  def _set_label_space_id(self, v, load=False):
    """
    Setter method for label_space_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/state/label_space_id (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_label_space_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_label_space_id() directly.

    YANG Description: Label space ID of the neighbor.
    """
    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="label-space-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """label_space_id 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="label-space-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__label_space_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_label_space_id(self):
    self.__label_space_id = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="label-space-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_enable_downstream_on_demand(self):
    """
    Getter method for enable_downstream_on_demand, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/state/enable_downstream_on_demand (boolean)

    YANG Description: If this leaf is set to true, LDP downstream on demand is enabled in
the LDP session and the router advertises DoD to the peer. If the peer
also adverstises DoD, then downstream on demand is used in the session,
otherwise downstream unsolicited is used.
    """
    return self.__enable_downstream_on_demand
      
  def _set_enable_downstream_on_demand(self, v, load=False):
    """
    Setter method for enable_downstream_on_demand, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/state/enable_downstream_on_demand (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable_downstream_on_demand is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable_downstream_on_demand() directly.

    YANG Description: If this leaf is set to true, LDP downstream on demand is enabled in
the LDP session and the router advertises DoD to the peer. If the peer
also adverstises DoD, then downstream on demand is used in the session,
otherwise downstream unsolicited is used.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-downstream-on-demand", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable_downstream_on_demand 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-downstream-on-demand", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enable_downstream_on_demand = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable_downstream_on_demand(self):
    self.__enable_downstream_on_demand = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable-downstream-on-demand", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_session_state(self):
    """
    Getter method for session_state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/state/session_state (enumeration)

    YANG Description: Operational status of the LDP session,
based on the state machine for session
negotiation behavior.
    """
    return self.__session_state
      
  def _set_session_state(self, v, load=False):
    """
    Setter method for session_state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/state/session_state (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_session_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_session_state() directly.

    YANG Description: Operational status of the LDP session,
based on the state machine for session
negotiation behavior.
    """
    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={'NON_EXISTENT': {}, 'INITIALIZED': {}, 'OPENREC': {}, 'OPENSENT': {}, 'OPERATIONAL': {}},), is_leaf=True, yang_name="session-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """session_state must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'NON_EXISTENT': {}, 'INITIALIZED': {}, 'OPENREC': {}, 'OPENSENT': {}, 'OPERATIONAL': {}},), is_leaf=True, yang_name="session-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__session_state = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_session_state(self):
    self.__session_state = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'NON_EXISTENT': {}, 'INITIALIZED': {}, 'OPENREC': {}, 'OPENSENT': {}, 'OPERATIONAL': {}},), is_leaf=True, yang_name="session-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_peer_label_advertisement_mode(self):
    """
    Getter method for peer_label_advertisement_mode, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/state/peer_label_advertisement_mode (label-advertisement-mode)

    YANG Description: This leaf shows the Label Advertisement Mode which is advertised by the peer.
    """
    return self.__peer_label_advertisement_mode
      
  def _set_peer_label_advertisement_mode(self, v, load=False):
    """
    Setter method for peer_label_advertisement_mode, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/state/peer_label_advertisement_mode (label-advertisement-mode)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_peer_label_advertisement_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_peer_label_advertisement_mode() directly.

    YANG Description: This leaf shows the Label Advertisement Mode which is advertised by the peer.
    """
    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={'DOWNSTREAM_UNSOLICITED': {}, 'DOWNSTREAM_ON_DEMAND': {}},), is_leaf=True, yang_name="peer-label-advertisement-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='label-advertisement-mode', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """peer_label_advertisement_mode must be of a type compatible with label-advertisement-mode""",
          'defined-type': "openconfig-network-instance:label-advertisement-mode",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DOWNSTREAM_UNSOLICITED': {}, 'DOWNSTREAM_ON_DEMAND': {}},), is_leaf=True, yang_name="peer-label-advertisement-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='label-advertisement-mode', is_config=False)""",
        })

    self.__peer_label_advertisement_mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_peer_label_advertisement_mode(self):
    self.__peer_label_advertisement_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DOWNSTREAM_UNSOLICITED': {}, 'DOWNSTREAM_ON_DEMAND': {}},), is_leaf=True, yang_name="peer-label-advertisement-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='label-advertisement-mode', is_config=False)


  def _get_negotiated_label_advertisement_mode(self):
    """
    Getter method for negotiated_label_advertisement_mode, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/state/negotiated_label_advertisement_mode (label-advertisement-mode)

    YANG Description: This leaf shows the Label Advertisement Mode negotiated based on local
and remote preferences. If DoD is enabled and the peer also adverstises DoD,
then downstream is negotiated. Otherwise, downstream unsolicited is used.
    """
    return self.__negotiated_label_advertisement_mode
      
  def _set_negotiated_label_advertisement_mode(self, v, load=False):
    """
    Setter method for negotiated_label_advertisement_mode, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/state/negotiated_label_advertisement_mode (label-advertisement-mode)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_negotiated_label_advertisement_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_negotiated_label_advertisement_mode() directly.

    YANG Description: This leaf shows the Label Advertisement Mode negotiated based on local
and remote preferences. If DoD is enabled and the peer also adverstises DoD,
then downstream is negotiated. Otherwise, downstream unsolicited is used.
    """
    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={'DOWNSTREAM_UNSOLICITED': {}, 'DOWNSTREAM_ON_DEMAND': {}},), is_leaf=True, yang_name="negotiated-label-advertisement-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='label-advertisement-mode', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """negotiated_label_advertisement_mode must be of a type compatible with label-advertisement-mode""",
          'defined-type': "openconfig-network-instance:label-advertisement-mode",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DOWNSTREAM_UNSOLICITED': {}, 'DOWNSTREAM_ON_DEMAND': {}},), is_leaf=True, yang_name="negotiated-label-advertisement-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='label-advertisement-mode', is_config=False)""",
        })

    self.__negotiated_label_advertisement_mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_negotiated_label_advertisement_mode(self):
    self.__negotiated_label_advertisement_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DOWNSTREAM_UNSOLICITED': {}, 'DOWNSTREAM_ON_DEMAND': {}},), is_leaf=True, yang_name="negotiated-label-advertisement-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='label-advertisement-mode', is_config=False)

  lsr_id = __builtin__.property(_get_lsr_id)
  label_space_id = __builtin__.property(_get_label_space_id)
  enable_downstream_on_demand = __builtin__.property(_get_enable_downstream_on_demand)
  session_state = __builtin__.property(_get_session_state)
  peer_label_advertisement_mode = __builtin__.property(_get_peer_label_advertisement_mode)
  negotiated_label_advertisement_mode = __builtin__.property(_get_negotiated_label_advertisement_mode)


  _pyangbind_elements = OrderedDict([('lsr_id', lsr_id), ('label_space_id', label_space_id), ('enable_downstream_on_demand', enable_downstream_on_demand), ('session_state', session_state), ('peer_label_advertisement_mode', peer_label_advertisement_mode), ('negotiated_label_advertisement_mode', negotiated_label_advertisement_mode), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/neighbors/neighbor/hello-adjacencies/hello-adjacency/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information for a particular LDP
hello adjacency.
  """
  __slots__ = ('_path_helper', '_extmethods', '__remote_address','__local_address','__adjacency_type','__last_clear','__hello_received','__hello_dropped',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__remote_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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__local_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}'}),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}|:))'}),], is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__adjacency_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LINK': {}, 'TARGETED': {}},), is_leaf=True, yang_name="adjacency-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ldp:mpls-ldp-adjacency-type', is_config=False)
    self.__last_clear = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-clear", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__hello_received = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="hello-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    self.__hello_dropped = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="hello-dropped", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'neighbors', 'neighbor', 'hello-adjacencies', 'hello-adjacency', 'state']

  def _get_remote_address(self):
    """
    Getter method for remote_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/state/remote_address (oc-inet:ip-address)

    YANG Description: Within the LDP adjacency, this attribute
shows the neighbor address.
    """
    return self.__remote_address
      
  def _set_remote_address(self, v, load=False):
    """
    Setter method for remote_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/state/remote_address (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_remote_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_remote_address() directly.

    YANG Description: Within the LDP adjacency, this attribute
shows the neighbor address.
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """remote_address must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__remote_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_remote_address(self):
    self.__remote_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}'}),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}|:))'}),], is_leaf=True, yang_name="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_local_address(self):
    """
    Getter method for local_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/state/local_address (oc-inet:ip-address)

    YANG Description: Within the LDP adjacency, this attribute
shows the local address.
    """
    return self.__local_address
      
  def _set_local_address(self, v, load=False):
    """
    Setter method for local_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/state/local_address (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_address() directly.

    YANG Description: Within the LDP adjacency, this attribute
shows the local address.
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_address must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__local_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_address(self):
    self.__local_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}'}),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}|:))'}),], is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_adjacency_type(self):
    """
    Getter method for adjacency_type, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/state/adjacency_type (oc-ldp:mpls-ldp-adjacency-type)

    YANG Description: This attributes defines if the LDP
adjacency is from a direct link or from
targeted discovery.
    """
    return self.__adjacency_type
      
  def _set_adjacency_type(self, v, load=False):
    """
    Setter method for adjacency_type, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/state/adjacency_type (oc-ldp:mpls-ldp-adjacency-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adjacency_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adjacency_type() directly.

    YANG Description: This attributes defines if the LDP
adjacency is from a direct link or from
targeted discovery.
    """
    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={'LINK': {}, 'TARGETED': {}},), is_leaf=True, yang_name="adjacency-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ldp:mpls-ldp-adjacency-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adjacency_type must be of a type compatible with oc-ldp:mpls-ldp-adjacency-type""",
          'defined-type': "oc-ldp:mpls-ldp-adjacency-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LINK': {}, 'TARGETED': {}},), is_leaf=True, yang_name="adjacency-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ldp:mpls-ldp-adjacency-type', is_config=False)""",
        })

    self.__adjacency_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adjacency_type(self):
    self.__adjacency_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LINK': {}, 'TARGETED': {}},), is_leaf=True, yang_name="adjacency-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ldp:mpls-ldp-adjacency-type', is_config=False)


  def _get_last_clear(self):
    """
    Getter method for last_clear, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/state/last_clear (oc-types:timeticks64)

    YANG Description: Timestamp of the last time the interface counters
were cleared expressed relative to the Unix Epoch
(January 1, 1970 00:00:00 UTC).
    """
    return self.__last_clear
      
  def _set_last_clear(self, v, load=False):
    """
    Setter method for last_clear, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/state/last_clear (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_last_clear is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_last_clear() directly.

    YANG Description: Timestamp of the last time the interface counters
were cleared expressed relative to the Unix Epoch
(January 1, 1970 00:00:00 UTC).
    """
    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="last-clear", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """last_clear must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-clear", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__last_clear = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_last_clear(self):
    self.__last_clear = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="last-clear", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_hello_received(self):
    """
    Getter method for hello_received, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/state/hello_received (oc-yang:counter64)

    YANG Description: Number of Hello messaged received by the device
    """
    return self.__hello_received
      
  def _set_hello_received(self, v, load=False):
    """
    Setter method for hello_received, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/state/hello_received (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_received is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_received() directly.

    YANG Description: Number of Hello messaged received by the device
    """
    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="hello-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_received 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="hello-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__hello_received = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_received(self):
    self.__hello_received = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="hello-received", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_hello_dropped(self):
    """
    Getter method for hello_dropped, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/state/hello_dropped (oc-yang:counter64)

    YANG Description: Number of Hello messaged dropped by the device
    """
    return self.__hello_dropped
      
  def _set_hello_dropped(self, v, load=False):
    """
    Setter method for hello_dropped, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/state/hello_dropped (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_dropped is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_dropped() directly.

    YANG Description: Number of Hello messaged dropped by the device
    """
    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="hello-dropped", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_dropped 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="hello-dropped", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__hello_dropped = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_dropped(self):
    self.__hello_dropped = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="hello-dropped", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)

  remote_address = __builtin__.property(_get_remote_address)
  local_address = __builtin__.property(_get_local_address)
  adjacency_type = __builtin__.property(_get_adjacency_type)
  last_clear = __builtin__.property(_get_last_clear)
  hello_received = __builtin__.property(_get_hello_received)
  hello_dropped = __builtin__.property(_get_hello_dropped)


  _pyangbind_elements = OrderedDict([('remote_address', remote_address), ('local_address', local_address), ('adjacency_type', adjacency_type), ('last_clear', last_clear), ('hello_received', hello_received), ('hello_dropped', hello_dropped), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_interface_ref_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/neighbors/neighbor/hello-adjacencies/hello-adjacency/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'neighbors', 'neighbor', 'hello-adjacencies', 'hello-adjacency', 'interface-ref', 'state']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/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 /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/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 /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_interface_ref(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/neighbors/neighbor/hello-adjacencies/hello-adjacency/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
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'interface-ref'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'neighbors', 'neighbor', 'hello-adjacencies', 'hello-adjacency', 'interface-ref']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/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 /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_hello_holdtime_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/neighbors/neighbor/hello-adjacencies/hello-adjacency/hello-holdtime/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State attributes related to the
hello-holdtime.
  """
  __slots__ = ('_path_helper', '_extmethods', '__adjacent','__negotiated','__hello_expiration','__next_hello',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__adjacent = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="adjacent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__negotiated = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="negotiated", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__hello_expiration = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="hello-expiration", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__next_hello = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="next-hello", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'neighbors', 'neighbor', 'hello-adjacencies', 'hello-adjacency', 'hello-holdtime', 'state']

  def _get_adjacent(self):
    """
    Getter method for adjacent, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/hello_holdtime/state/adjacent (uint16)

    YANG Description: Hello holdtime attribute learned from the
LDP neighbor
    """
    return self.__adjacent
      
  def _set_adjacent(self, v, load=False):
    """
    Setter method for adjacent, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/hello_holdtime/state/adjacent (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adjacent is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adjacent() directly.

    YANG Description: Hello holdtime attribute learned from the
LDP neighbor
    """
    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="adjacent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adjacent 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="adjacent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__adjacent = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adjacent(self):
    self.__adjacent = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="adjacent", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_negotiated(self):
    """
    Getter method for negotiated, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/hello_holdtime/state/negotiated (uint16)

    YANG Description: Hello holdtime attribute negotiated between
the LDP neighbor and the local router.
    """
    return self.__negotiated
      
  def _set_negotiated(self, v, load=False):
    """
    Setter method for negotiated, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/hello_holdtime/state/negotiated (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_negotiated is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_negotiated() directly.

    YANG Description: Hello holdtime attribute negotiated between
the LDP neighbor and the local router.
    """
    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="negotiated", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """negotiated 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="negotiated", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__negotiated = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_negotiated(self):
    self.__negotiated = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="negotiated", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_hello_expiration(self):
    """
    Getter method for hello_expiration, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/hello_holdtime/state/hello_expiration (oc-types:timeticks64)

    YANG Description: Expiration time for the hello holdtime.
    """
    return self.__hello_expiration
      
  def _set_hello_expiration(self, v, load=False):
    """
    Setter method for hello_expiration, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/hello_holdtime/state/hello_expiration (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_expiration is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_expiration() directly.

    YANG Description: Expiration time for the hello holdtime.
    """
    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="hello-expiration", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_expiration must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="hello-expiration", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__hello_expiration = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_expiration(self):
    self.__hello_expiration = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="hello-expiration", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_next_hello(self):
    """
    Getter method for next_hello, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/hello_holdtime/state/next_hello (oc-types:timeticks64)

    YANG Description: Time when the next LDP hello will be sent to
the adjacent neighbor.
    """
    return self.__next_hello
      
  def _set_next_hello(self, v, load=False):
    """
    Setter method for next_hello, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/hello_holdtime/state/next_hello (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hello is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hello() directly.

    YANG Description: Time when the next LDP hello will be sent to
the adjacent neighbor.
    """
    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="next-hello", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hello must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="next-hello", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__next_hello = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_next_hello(self):
    self.__next_hello = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="next-hello", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)

  adjacent = __builtin__.property(_get_adjacent)
  negotiated = __builtin__.property(_get_negotiated)
  hello_expiration = __builtin__.property(_get_hello_expiration)
  next_hello = __builtin__.property(_get_next_hello)


  _pyangbind_elements = OrderedDict([('adjacent', adjacent), ('negotiated', negotiated), ('hello_expiration', hello_expiration), ('next_hello', next_hello), ])


class yc_hello_holdtime_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_hello_holdtime(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/neighbors/neighbor/hello-adjacencies/hello-adjacency/hello-holdtime. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Specifies the time the sending LSR will
maintain its record of Hellos from the
receiving LSR
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'hello-holdtime'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_hello_holdtime_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'neighbors', 'neighbor', 'hello-adjacencies', 'hello-adjacency', 'hello-holdtime']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/hello_holdtime/state (container)

    YANG Description: State attributes related to the
hello-holdtime.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/hello_holdtime/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 related to the
hello-holdtime.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_hello_holdtime_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_hello_holdtime_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_hello_holdtime_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_hello_adjacency_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/neighbors/neighbor/hello-adjacencies/hello-adjacency. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of hello adjacencies for a given LDP
neighbor.
  """
  __slots__ = ('_path_helper', '_extmethods', '__remote_address','__local_address','__state','__interface_ref','__hello_holdtime',)

  _yang_name = 'hello-adjacency'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__remote_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__local_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__interface_ref = YANGDynClass(base=yc_interface_ref_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__hello_holdtime = YANGDynClass(base=yc_hello_holdtime_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_hello_holdtime, is_container='container', yang_name="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'neighbors', 'neighbor', 'hello-adjacencies', 'hello-adjacency']

  def _get_remote_address(self):
    """
    Getter method for remote_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/remote_address (leafref)

    YANG Description: Within the LDP adjacency, this attribute
shows the neighbor address.
    """
    return self.__remote_address
      
  def _set_remote_address(self, v, load=False):
    """
    Setter method for remote_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/remote_address (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_remote_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_remote_address() directly.

    YANG Description: Within the LDP adjacency, this attribute
shows the neighbor address.
    """
    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="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """remote_address must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__remote_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_remote_address(self):
    self.__remote_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="remote-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_local_address(self):
    """
    Getter method for local_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/local_address (leafref)

    YANG Description: Within the LDP adjacency, this attribute
shows the local address.
    """
    return self.__local_address
      
  def _set_local_address(self, v, load=False):
    """
    Setter method for local_address, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/local_address (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_address() directly.

    YANG Description: Within the LDP adjacency, this attribute
shows the local address.
    """
    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="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_address must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__local_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_address(self):
    self.__local_address = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/state (container)

    YANG Description: State information for a particular LDP
hello adjacency.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/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 a particular LDP
hello adjacency.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_interface_ref(self):
    """
    Getter method for interface_ref, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/interface_ref (container)

    YANG Description: Reference to an interface or subinterface
    """
    return self.__interface_ref
      
  def _set_interface_ref(self, v, load=False):
    """
    Setter method for interface_ref, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/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
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interface_ref_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__interface_ref = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_interface_ref(self):
    self.__interface_ref = YANGDynClass(base=yc_interface_ref_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_hello_holdtime(self):
    """
    Getter method for hello_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/hello_holdtime (container)

    YANG Description: Specifies the time the sending LSR will
maintain its record of Hellos from the
receiving LSR
    """
    return self.__hello_holdtime
      
  def _set_hello_holdtime(self, v, load=False):
    """
    Setter method for hello_holdtime, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency/hello_holdtime (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_holdtime is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_holdtime() directly.

    YANG Description: Specifies the time the sending LSR will
maintain its record of Hellos from the
receiving LSR
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_hello_holdtime_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_hello_holdtime, is_container='container', yang_name="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_holdtime must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_hello_holdtime_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_hello_holdtime, is_container='container', yang_name="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__hello_holdtime = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_holdtime(self):
    self.__hello_holdtime = YANGDynClass(base=yc_hello_holdtime_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency_hello_holdtime, is_container='container', yang_name="hello-holdtime", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  remote_address = __builtin__.property(_get_remote_address)
  local_address = __builtin__.property(_get_local_address)
  state = __builtin__.property(_get_state)
  interface_ref = __builtin__.property(_get_interface_ref)
  hello_holdtime = __builtin__.property(_get_hello_holdtime)


  _pyangbind_elements = OrderedDict([('remote_address', remote_address), ('local_address', local_address), ('state', state), ('interface_ref', interface_ref), ('hello_holdtime', hello_holdtime), ])


class yc_hello_adjacencies_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/neighbors/neighbor/hello-adjacencies. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top container for hello adjacencies
for a given LDP neighbor.
  """
  __slots__ = ('_path_helper', '_extmethods', '__hello_adjacency',)

  _yang_name = 'hello-adjacencies'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__hello_adjacency = YANGDynClass(base=YANGListType("remote_address local_address",yc_hello_adjacency_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency, yang_name="hello-adjacency", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='remote-address local-address', extensions=None), is_container='list', yang_name="hello-adjacency", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'neighbors', 'neighbor', 'hello-adjacencies']

  def _get_hello_adjacency(self):
    """
    Getter method for hello_adjacency, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency (list)

    YANG Description: List of hello adjacencies for a given LDP
neighbor.
    """
    return self.__hello_adjacency
      
  def _set_hello_adjacency(self, v, load=False):
    """
    Setter method for hello_adjacency, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies/hello_adjacency (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_adjacency is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_adjacency() directly.

    YANG Description: List of hello adjacencies for a given LDP
neighbor.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("remote_address local_address",yc_hello_adjacency_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency, yang_name="hello-adjacency", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='remote-address local-address', extensions=None), is_container='list', yang_name="hello-adjacency", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_adjacency must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("remote_address local_address",yc_hello_adjacency_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency, yang_name="hello-adjacency", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='remote-address local-address', extensions=None), is_container='list', yang_name="hello-adjacency", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__hello_adjacency = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_adjacency(self):
    self.__hello_adjacency = YANGDynClass(base=YANGListType("remote_address local_address",yc_hello_adjacency_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies_hello_adjacency, yang_name="hello-adjacency", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='remote-address local-address', extensions=None), is_container='list', yang_name="hello-adjacency", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  hello_adjacency = __builtin__.property(_get_hello_adjacency)


  _pyangbind_elements = OrderedDict([('hello_adjacency', hello_adjacency), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_authentication_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/neighbors/neighbor/authentication/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration of LDP authentication attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__enable','__authentication_key',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__authentication_key = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'neighbors', 'neighbor', 'authentication', 'config']

  def _get_enable(self):
    """
    Getter method for enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/authentication/config/enable (boolean)

    YANG Description: Enables LDP authentication on the node.
    """
    return self.__enable
      
  def _set_enable(self, v, load=False):
    """
    Setter method for enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/authentication/config/enable (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable() directly.

    YANG Description: Enables LDP authentication on the node.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable 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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enable = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable(self):
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_authentication_key(self):
    """
    Getter method for authentication_key, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/authentication/config/authentication_key (oc-types:routing-password)

    YANG Description: authenticate LDP signaling
messages
    """
    return self.__authentication_key
      
  def _set_authentication_key(self, v, load=False):
    """
    Setter method for authentication_key, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/authentication/config/authentication_key (oc-types:routing-password)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_authentication_key is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_authentication_key() directly.

    YANG Description: authenticate LDP signaling
messages
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """authentication_key must be of a type compatible with oc-types:routing-password""",
          'defined-type': "oc-types:routing-password",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)""",
        })

    self.__authentication_key = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_authentication_key(self):
    self.__authentication_key = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=True)

  enable = __builtin__.property(_get_enable, _set_enable)
  authentication_key = __builtin__.property(_get_authentication_key, _set_authentication_key)


  _pyangbind_elements = OrderedDict([('enable', enable), ('authentication_key', authentication_key), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_authentication_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/neighbors/neighbor/authentication/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: LDP authentication state.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enable','__authentication_key',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__authentication_key = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'neighbors', 'neighbor', 'authentication', 'state']

  def _get_enable(self):
    """
    Getter method for enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/authentication/state/enable (boolean)

    YANG Description: Enables LDP authentication on the node.
    """
    return self.__enable
      
  def _set_enable(self, v, load=False):
    """
    Setter method for enable, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/authentication/state/enable (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enable is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enable() directly.

    YANG Description: Enables LDP authentication on the node.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enable 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", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enable = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enable(self):
    self.__enable = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_authentication_key(self):
    """
    Getter method for authentication_key, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/authentication/state/authentication_key (oc-types:routing-password)

    YANG Description: authenticate LDP signaling
messages
    """
    return self.__authentication_key
      
  def _set_authentication_key(self, v, load=False):
    """
    Setter method for authentication_key, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/authentication/state/authentication_key (oc-types:routing-password)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_authentication_key is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_authentication_key() directly.

    YANG Description: authenticate LDP signaling
messages
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """authentication_key must be of a type compatible with oc-types:routing-password""",
          'defined-type': "oc-types:routing-password",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=False)""",
        })

    self.__authentication_key = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_authentication_key(self):
    self.__authentication_key = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="authentication-key", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:routing-password', is_config=False)

  enable = __builtin__.property(_get_enable)
  authentication_key = __builtin__.property(_get_authentication_key)


  _pyangbind_elements = OrderedDict([('enable', enable), ('authentication_key', authentication_key), ])


class yc_authentication_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_authentication(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/neighbors/neighbor/authentication. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Global LDP authentication
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'authentication'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_authentication_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'neighbors', 'neighbor', 'authentication']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/authentication/config (container)

    YANG Description: Configuration of LDP authentication attributes
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/authentication/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 of LDP authentication attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_authentication_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_authentication_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_authentication_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/authentication/state (container)

    YANG Description: LDP authentication state.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/authentication/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: LDP authentication state.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_authentication_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_neighbor_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/neighbors/neighbor. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of LDP neighbors and their attributes.
  """
  __slots__ = ('_path_helper', '_extmethods', '__lsr_id','__label_space_id','__config','__state','__hello_adjacencies','__authentication',)

  _yang_name = 'neighbor'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__lsr_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="lsr-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__label_space_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="label-space-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__hello_adjacencies = YANGDynClass(base=yc_hello_adjacencies_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies, is_container='container', yang_name="hello-adjacencies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__authentication = YANGDynClass(base=yc_authentication_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_authentication, is_container='container', yang_name="authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'neighbors', 'neighbor']

  def _get_lsr_id(self):
    """
    Getter method for lsr_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/lsr_id (leafref)

    YANG Description: Neighbor label switch router identifier.
    """
    return self.__lsr_id
      
  def _set_lsr_id(self, v, load=False):
    """
    Setter method for lsr_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/lsr_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsr_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsr_id() directly.

    YANG Description: Neighbor label switch router identifier.
    """
    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="lsr-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsr_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="lsr-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__lsr_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsr_id(self):
    self.__lsr_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="lsr-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_label_space_id(self):
    """
    Getter method for label_space_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/label_space_id (leafref)

    YANG Description: Label space ID of the neighbor.
    """
    return self.__label_space_id
      
  def _set_label_space_id(self, v, load=False):
    """
    Setter method for label_space_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/label_space_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_label_space_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_label_space_id() directly.

    YANG Description: Label space ID of the neighbor.
    """
    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="label-space-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """label_space_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="label-space-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__label_space_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_label_space_id(self):
    self.__label_space_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="label-space-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/config (container)

    YANG Description: Neighbor configuration attributes.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/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: Neighbor configuration attributes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/state (container)

    YANG Description: Neighbor state attributes.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/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: Neighbor state attributes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_hello_adjacencies(self):
    """
    Getter method for hello_adjacencies, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies (container)

    YANG Description: Top container for hello adjacencies
for a given LDP neighbor.
    """
    return self.__hello_adjacencies
      
  def _set_hello_adjacencies(self, v, load=False):
    """
    Setter method for hello_adjacencies, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/hello_adjacencies (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hello_adjacencies is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hello_adjacencies() directly.

    YANG Description: Top container for hello adjacencies
for a given LDP neighbor.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_hello_adjacencies_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies, is_container='container', yang_name="hello-adjacencies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hello_adjacencies must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_hello_adjacencies_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies, is_container='container', yang_name="hello-adjacencies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__hello_adjacencies = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hello_adjacencies(self):
    self.__hello_adjacencies = YANGDynClass(base=yc_hello_adjacencies_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_hello_adjacencies, is_container='container', yang_name="hello-adjacencies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_authentication(self):
    """
    Getter method for authentication, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/authentication (container)

    YANG Description: Global LDP authentication
    """
    return self.__authentication
      
  def _set_authentication(self, v, load=False):
    """
    Setter method for authentication, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor/authentication (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_authentication is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_authentication() directly.

    YANG Description: Global LDP authentication
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_authentication_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_authentication, is_container='container', yang_name="authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """authentication must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_authentication_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_authentication, is_container='container', yang_name="authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__authentication = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_authentication(self):
    self.__authentication = YANGDynClass(base=yc_authentication_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor_authentication, is_container='container', yang_name="authentication", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  lsr_id = __builtin__.property(_get_lsr_id, _set_lsr_id)
  label_space_id = __builtin__.property(_get_label_space_id, _set_label_space_id)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  hello_adjacencies = __builtin__.property(_get_hello_adjacencies, _set_hello_adjacencies)
  authentication = __builtin__.property(_get_authentication, _set_authentication)


  _pyangbind_elements = OrderedDict([('lsr_id', lsr_id), ('label_space_id', label_space_id), ('config', config), ('state', state), ('hello_adjacencies', hello_adjacencies), ('authentication', authentication), ])


class yc_neighbors_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp/neighbors. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State and configuration LDP neighbors attributes
  """
  __slots__ = ('_path_helper', '_extmethods', '__neighbor',)

  _yang_name = 'neighbors'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__neighbor = YANGDynClass(base=YANGListType("lsr_id label_space_id",yc_neighbor_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='lsr-id label-space-id', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp', 'neighbors']

  def _get_neighbor(self):
    """
    Getter method for neighbor, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor (list)

    YANG Description: List of LDP neighbors and their attributes.
    """
    return self.__neighbor
      
  def _set_neighbor(self, v, load=False):
    """
    Setter method for neighbor, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors/neighbor (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbor is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbor() directly.

    YANG Description: List of LDP neighbors and their attributes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("lsr_id label_space_id",yc_neighbor_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='lsr-id label-space-id', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbor must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("lsr_id label_space_id",yc_neighbor_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='lsr-id label-space-id', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__neighbor = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbor(self):
    self.__neighbor = YANGDynClass(base=YANGListType("lsr_id label_space_id",yc_neighbor_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors_neighbor, yang_name="neighbor", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='lsr-id label-space-id', extensions=None), is_container='list', yang_name="neighbor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  neighbor = __builtin__.property(_get_neighbor, _set_neighbor)


  _pyangbind_elements = OrderedDict([('neighbor', neighbor), ])


class yc_ldp_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/ldp. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: LDP global signaling configuration
  """
  __slots__ = ('_path_helper', '_extmethods', '__global_','__interface_attributes','__targeted','__neighbors',)

  _yang_name = 'ldp'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__global_ = YANGDynClass(base=yc_global__openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__interface_attributes = YANGDynClass(base=yc_interface_attributes_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes, is_container='container', yang_name="interface-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__targeted = YANGDynClass(base=yc_targeted_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted, is_container='container', yang_name="targeted", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__neighbors = YANGDynClass(base=yc_neighbors_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'ldp']

  def _get_global_(self):
    """
    Getter method for global_, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global (container)

    YANG Description: Platform wide LDP configuration and state
    """
    return self.__global_
      
  def _set_global_(self, v, load=False):
    """
    Setter method for global_, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/global (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_global_ is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_global_() directly.

    YANG Description: Platform wide LDP configuration and state
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_global__openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """global_ must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_global__openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__global_ = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_global_(self):
    self.__global_ = YANGDynClass(base=yc_global__openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_interface_attributes(self):
    """
    Getter method for interface_attributes, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes (container)

    YANG Description: Container including attributes for LDP-enabled
interfaces
    """
    return self.__interface_attributes
      
  def _set_interface_attributes(self, v, load=False):
    """
    Setter method for interface_attributes, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/interface_attributes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_interface_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_interface_attributes() directly.

    YANG Description: Container including attributes for LDP-enabled
interfaces
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interface_attributes_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes, is_container='container', yang_name="interface-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface_attributes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_interface_attributes_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes, is_container='container', yang_name="interface-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__interface_attributes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_interface_attributes(self):
    self.__interface_attributes = YANGDynClass(base=yc_interface_attributes_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_interface_attributes, is_container='container', yang_name="interface-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_targeted(self):
    """
    Getter method for targeted, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted (container)

    YANG Description: Top container for targeted LDP state and configuration
attributes.
    """
    return self.__targeted
      
  def _set_targeted(self, v, load=False):
    """
    Setter method for targeted, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/targeted (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_targeted is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_targeted() directly.

    YANG Description: Top container for targeted LDP state and configuration
attributes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_targeted_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted, is_container='container', yang_name="targeted", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """targeted must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_targeted_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted, is_container='container', yang_name="targeted", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__targeted = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_targeted(self):
    self.__targeted = YANGDynClass(base=yc_targeted_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_targeted, is_container='container', yang_name="targeted", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_neighbors(self):
    """
    Getter method for neighbors, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors (container)

    YANG Description: State and configuration LDP neighbors attributes
    """
    return self.__neighbors
      
  def _set_neighbors(self, v, load=False):
    """
    Setter method for neighbors, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp/neighbors (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_neighbors is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_neighbors() directly.

    YANG Description: State and configuration LDP neighbors attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_neighbors_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """neighbors must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_neighbors_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__neighbors = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_neighbors(self):
    self.__neighbors = YANGDynClass(base=yc_neighbors_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp_neighbors, is_container='container', yang_name="neighbors", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  global_ = __builtin__.property(_get_global_, _set_global_)
  interface_attributes = __builtin__.property(_get_interface_attributes, _set_interface_attributes)
  targeted = __builtin__.property(_get_targeted, _set_targeted)
  neighbors = __builtin__.property(_get_neighbors, _set_neighbors)


  _pyangbind_elements = OrderedDict([('global_', global_), ('interface_attributes', interface_attributes), ('targeted', targeted), ('neighbors', neighbors), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_aggregate_sid_counters_aggregate_sid_counter_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/segment-routing/aggregate-sid-counters/aggregate-sid-counter/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters for per-SID statistics
  """
  __slots__ = ('_path_helper', '_extmethods', '__mpls_label','__in_pkts','__in_octets','__out_pkts','__out_octets',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__mpls_label = 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="mpls-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    self.__in_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'segment-routing', 'aggregate-sid-counters', 'aggregate-sid-counter', 'state']

  def _get_mpls_label(self):
    """
    Getter method for mpls_label, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/aggregate_sid_counters/aggregate_sid_counter/state/mpls_label (oc-mplst:mpls-label)

    YANG Description: The MPLS label used for the segment identifier
    """
    return self.__mpls_label
      
  def _set_mpls_label(self, v, load=False):
    """
    Setter method for mpls_label, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/aggregate_sid_counters/aggregate_sid_counter/state/mpls_label (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mpls_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mpls_label() directly.

    YANG Description: The MPLS label used for the segment identifier
    """
    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="mpls-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mpls_label must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="mpls-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)""",
        })

    self.__mpls_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mpls_label(self):
    self.__mpls_label = 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="mpls-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)


  def _get_in_pkts(self):
    """
    Getter method for in_pkts, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/aggregate_sid_counters/aggregate_sid_counter/state/in_pkts (yang:counter64)

    YANG Description: A cumulative counter of the packets received within the context
which have matched a label corresponding to an SR Segment Identifier.
    """
    return self.__in_pkts
      
  def _set_in_pkts(self, v, load=False):
    """
    Setter method for in_pkts, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/aggregate_sid_counters/aggregate_sid_counter/state/in_pkts (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_pkts() directly.

    YANG Description: A cumulative counter of the packets received within the context
which have matched a label corresponding to an SR Segment Identifier.
    """
    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="in-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_pkts must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__in_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_pkts(self):
    self.__in_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_octets(self):
    """
    Getter method for in_octets, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/aggregate_sid_counters/aggregate_sid_counter/state/in_octets (yang:counter64)

    YANG Description: The cumulative counter of the total bytes received within the context
which have matched a label corresponding to an SR Segment Identifier
    """
    return self.__in_octets
      
  def _set_in_octets(self, v, load=False):
    """
    Setter method for in_octets, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/aggregate_sid_counters/aggregate_sid_counter/state/in_octets (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_octets() directly.

    YANG Description: The cumulative counter of the total bytes received within the context
which have matched a label corresponding to an SR Segment Identifier
    """
    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="in-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_octets must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__in_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_octets(self):
    self.__in_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_pkts(self):
    """
    Getter method for out_pkts, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/aggregate_sid_counters/aggregate_sid_counter/state/out_pkts (yang:counter64)

    YANG Description: A cumulative counter of the total number of packets transmitted by
the local system within the context which have a label imposed that
corresponds to an Segment Identifier.
    """
    return self.__out_pkts
      
  def _set_out_pkts(self, v, load=False):
    """
    Setter method for out_pkts, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/aggregate_sid_counters/aggregate_sid_counter/state/out_pkts (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_pkts() directly.

    YANG Description: A cumulative counter of the total number of packets transmitted by
the local system within the context which have a label imposed that
corresponds to an Segment Identifier.
    """
    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="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_pkts must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_pkts(self):
    self.__out_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_octets(self):
    """
    Getter method for out_octets, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/aggregate_sid_counters/aggregate_sid_counter/state/out_octets (yang:counter64)

    YANG Description: A cumulative counter of the total bytes transmitted by the local
system within the context which have a label imported that
corresponds to an SR Segment Identifier.
    """
    return self.__out_octets
      
  def _set_out_octets(self, v, load=False):
    """
    Setter method for out_octets, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/aggregate_sid_counters/aggregate_sid_counter/state/out_octets (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_octets() directly.

    YANG Description: A cumulative counter of the total bytes transmitted by the local
system within the context which have a label imported that
corresponds to an SR Segment Identifier.
    """
    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="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_octets must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_octets(self):
    self.__out_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)

  mpls_label = __builtin__.property(_get_mpls_label)
  in_pkts = __builtin__.property(_get_in_pkts)
  in_octets = __builtin__.property(_get_in_octets)
  out_pkts = __builtin__.property(_get_out_pkts)
  out_octets = __builtin__.property(_get_out_octets)


  _pyangbind_elements = OrderedDict([('mpls_label', mpls_label), ('in_pkts', in_pkts), ('in_octets', in_octets), ('out_pkts', out_pkts), ('out_octets', out_octets), ])


class yc_aggregate_sid_counter_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_aggregate_sid_counters_aggregate_sid_counter(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/segment-routing/aggregate-sid-counters/aggregate-sid-counter. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Counters aggregated across all of the interfaces of the local
system corresponding to traffic received or forwarded with a
particular SID
  """
  __slots__ = ('_path_helper', '_extmethods', '__mpls_label','__state',)

  _yang_name = 'aggregate-sid-counter'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__mpls_label = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mpls-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_aggregate_sid_counters_aggregate_sid_counter_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'segment-routing', 'aggregate-sid-counters', 'aggregate-sid-counter']

  def _get_mpls_label(self):
    """
    Getter method for mpls_label, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/aggregate_sid_counters/aggregate_sid_counter/mpls_label (leafref)

    YANG Description: The MPLS label representing the segment identifier
    """
    return self.__mpls_label
      
  def _set_mpls_label(self, v, load=False):
    """
    Setter method for mpls_label, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/aggregate_sid_counters/aggregate_sid_counter/mpls_label (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mpls_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mpls_label() directly.

    YANG Description: The MPLS label representing the segment identifier
    """
    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="mpls-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mpls_label must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mpls-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__mpls_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mpls_label(self):
    self.__mpls_label = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mpls-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/aggregate_sid_counters/aggregate_sid_counter/state (container)

    YANG Description: State parameters for per-SID statistics
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/aggregate_sid_counters/aggregate_sid_counter/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 parameters for per-SID statistics
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_aggregate_sid_counters_aggregate_sid_counter_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_aggregate_sid_counters_aggregate_sid_counter_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_aggregate_sid_counters_aggregate_sid_counter_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  mpls_label = __builtin__.property(_get_mpls_label)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('mpls_label', mpls_label), ('state', state), ])


class yc_aggregate_sid_counters_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_aggregate_sid_counters(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/segment-routing/aggregate-sid-counters. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Per-SID counters aggregated across all interfaces on the local system
  """
  __slots__ = ('_path_helper', '_extmethods', '__aggregate_sid_counter',)

  _yang_name = 'aggregate-sid-counters'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__aggregate_sid_counter = YANGDynClass(base=YANGListType("mpls_label",yc_aggregate_sid_counter_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_aggregate_sid_counters_aggregate_sid_counter, yang_name="aggregate-sid-counter", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mpls-label', extensions=None), is_container='list', yang_name="aggregate-sid-counter", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'segment-routing', 'aggregate-sid-counters']

  def _get_aggregate_sid_counter(self):
    """
    Getter method for aggregate_sid_counter, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/aggregate_sid_counters/aggregate_sid_counter (list)

    YANG Description: Counters aggregated across all of the interfaces of the local
system corresponding to traffic received or forwarded with a
particular SID
    """
    return self.__aggregate_sid_counter
      
  def _set_aggregate_sid_counter(self, v, load=False):
    """
    Setter method for aggregate_sid_counter, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/aggregate_sid_counters/aggregate_sid_counter (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_aggregate_sid_counter is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_aggregate_sid_counter() directly.

    YANG Description: Counters aggregated across all of the interfaces of the local
system corresponding to traffic received or forwarded with a
particular SID
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("mpls_label",yc_aggregate_sid_counter_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_aggregate_sid_counters_aggregate_sid_counter, yang_name="aggregate-sid-counter", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mpls-label', extensions=None), is_container='list', yang_name="aggregate-sid-counter", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """aggregate_sid_counter must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("mpls_label",yc_aggregate_sid_counter_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_aggregate_sid_counters_aggregate_sid_counter, yang_name="aggregate-sid-counter", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mpls-label', extensions=None), is_container='list', yang_name="aggregate-sid-counter", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__aggregate_sid_counter = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_aggregate_sid_counter(self):
    self.__aggregate_sid_counter = YANGDynClass(base=YANGListType("mpls_label",yc_aggregate_sid_counter_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_aggregate_sid_counters_aggregate_sid_counter, yang_name="aggregate-sid-counter", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mpls-label', extensions=None), is_container='list', yang_name="aggregate-sid-counter", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  aggregate_sid_counter = __builtin__.property(_get_aggregate_sid_counter, _set_aggregate_sid_counter)


  _pyangbind_elements = OrderedDict([('aggregate_sid_counter', aggregate_sid_counter), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/segment-routing/interfaces/interface/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: MPLS-specific Segment Routing configuration parameters
related to an interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'segment-routing', 'interfaces', 'interface', 'config']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/config/interface_id (string)

    YANG Description: A unique 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 /network_instances/network_instance/mpls/signaling_protocols/segment_routing/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: A unique 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/segment-routing/interfaces/interface/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: MPLS-specific Segment Routing operational state parameters
related to an interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id','__in_pkts','__in_octets','__out_pkts','__out_octets',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__in_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'segment-routing', 'interfaces', 'interface', 'state']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/state/interface_id (string)

    YANG Description: A unique 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 /network_instances/network_instance/mpls/signaling_protocols/segment_routing/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: A unique 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_in_pkts(self):
    """
    Getter method for in_pkts, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/state/in_pkts (yang:counter64)

    YANG Description: A cumulative counter of the packets received within the context
which have matched a label corresponding to an SR Segment Identifier.
    """
    return self.__in_pkts
      
  def _set_in_pkts(self, v, load=False):
    """
    Setter method for in_pkts, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/state/in_pkts (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_pkts() directly.

    YANG Description: A cumulative counter of the packets received within the context
which have matched a label corresponding to an SR Segment Identifier.
    """
    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="in-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_pkts must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__in_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_pkts(self):
    self.__in_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_octets(self):
    """
    Getter method for in_octets, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/state/in_octets (yang:counter64)

    YANG Description: The cumulative counter of the total bytes received within the context
which have matched a label corresponding to an SR Segment Identifier
    """
    return self.__in_octets
      
  def _set_in_octets(self, v, load=False):
    """
    Setter method for in_octets, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/state/in_octets (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_octets() directly.

    YANG Description: The cumulative counter of the total bytes received within the context
which have matched a label corresponding to an SR Segment Identifier
    """
    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="in-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_octets must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__in_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_octets(self):
    self.__in_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_pkts(self):
    """
    Getter method for out_pkts, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/state/out_pkts (yang:counter64)

    YANG Description: A cumulative counter of the total number of packets transmitted by
the local system within the context which have a label imposed that
corresponds to an Segment Identifier.
    """
    return self.__out_pkts
      
  def _set_out_pkts(self, v, load=False):
    """
    Setter method for out_pkts, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/state/out_pkts (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_pkts() directly.

    YANG Description: A cumulative counter of the total number of packets transmitted by
the local system within the context which have a label imposed that
corresponds to an Segment Identifier.
    """
    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="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_pkts must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_pkts(self):
    self.__out_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_octets(self):
    """
    Getter method for out_octets, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/state/out_octets (yang:counter64)

    YANG Description: A cumulative counter of the total bytes transmitted by the local
system within the context which have a label imported that
corresponds to an SR Segment Identifier.
    """
    return self.__out_octets
      
  def _set_out_octets(self, v, load=False):
    """
    Setter method for out_octets, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/state/out_octets (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_octets() directly.

    YANG Description: A cumulative counter of the total bytes transmitted by the local
system within the context which have a label imported that
corresponds to an SR Segment Identifier.
    """
    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="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_octets must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_octets(self):
    self.__out_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)

  interface_id = __builtin__.property(_get_interface_id)
  in_pkts = __builtin__.property(_get_in_pkts)
  in_octets = __builtin__.property(_get_in_octets)
  out_pkts = __builtin__.property(_get_out_pkts)
  out_octets = __builtin__.property(_get_out_octets)


  _pyangbind_elements = OrderedDict([('interface_id', interface_id), ('in_pkts', in_pkts), ('in_octets', in_octets), ('out_pkts', out_pkts), ('out_octets', out_octets), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/segment-routing/interfaces/interface/sid-counters/sid-counter/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters for per-SID statistics
  """
  __slots__ = ('_path_helper', '_extmethods', '__mpls_label','__in_pkts','__in_octets','__out_pkts','__out_octets',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__mpls_label = 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="mpls-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    self.__in_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'segment-routing', 'interfaces', 'interface', 'sid-counters', 'sid-counter', 'state']

  def _get_mpls_label(self):
    """
    Getter method for mpls_label, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/state/mpls_label (oc-mplst:mpls-label)

    YANG Description: The MPLS label used for the segment identifier
    """
    return self.__mpls_label
      
  def _set_mpls_label(self, v, load=False):
    """
    Setter method for mpls_label, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/state/mpls_label (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mpls_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mpls_label() directly.

    YANG Description: The MPLS label used for the segment identifier
    """
    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="mpls-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mpls_label must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="mpls-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)""",
        })

    self.__mpls_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mpls_label(self):
    self.__mpls_label = 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="mpls-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)


  def _get_in_pkts(self):
    """
    Getter method for in_pkts, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/state/in_pkts (yang:counter64)

    YANG Description: A cumulative counter of the packets received within the context
which have matched a label corresponding to an SR Segment Identifier.
    """
    return self.__in_pkts
      
  def _set_in_pkts(self, v, load=False):
    """
    Setter method for in_pkts, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/state/in_pkts (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_pkts() directly.

    YANG Description: A cumulative counter of the packets received within the context
which have matched a label corresponding to an SR Segment Identifier.
    """
    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="in-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_pkts must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__in_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_pkts(self):
    self.__in_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_octets(self):
    """
    Getter method for in_octets, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/state/in_octets (yang:counter64)

    YANG Description: The cumulative counter of the total bytes received within the context
which have matched a label corresponding to an SR Segment Identifier
    """
    return self.__in_octets
      
  def _set_in_octets(self, v, load=False):
    """
    Setter method for in_octets, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/state/in_octets (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_octets() directly.

    YANG Description: The cumulative counter of the total bytes received within the context
which have matched a label corresponding to an SR Segment Identifier
    """
    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="in-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_octets must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__in_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_octets(self):
    self.__in_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_pkts(self):
    """
    Getter method for out_pkts, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/state/out_pkts (yang:counter64)

    YANG Description: A cumulative counter of the total number of packets transmitted by
the local system within the context which have a label imposed that
corresponds to an Segment Identifier.
    """
    return self.__out_pkts
      
  def _set_out_pkts(self, v, load=False):
    """
    Setter method for out_pkts, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/state/out_pkts (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_pkts() directly.

    YANG Description: A cumulative counter of the total number of packets transmitted by
the local system within the context which have a label imposed that
corresponds to an Segment Identifier.
    """
    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="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_pkts must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_pkts(self):
    self.__out_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_octets(self):
    """
    Getter method for out_octets, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/state/out_octets (yang:counter64)

    YANG Description: A cumulative counter of the total bytes transmitted by the local
system within the context which have a label imported that
corresponds to an SR Segment Identifier.
    """
    return self.__out_octets
      
  def _set_out_octets(self, v, load=False):
    """
    Setter method for out_octets, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/state/out_octets (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_octets() directly.

    YANG Description: A cumulative counter of the total bytes transmitted by the local
system within the context which have a label imported that
corresponds to an SR Segment Identifier.
    """
    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="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_octets must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_octets(self):
    self.__out_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)

  mpls_label = __builtin__.property(_get_mpls_label)
  in_pkts = __builtin__.property(_get_in_pkts)
  in_octets = __builtin__.property(_get_in_octets)
  out_pkts = __builtin__.property(_get_out_pkts)
  out_octets = __builtin__.property(_get_out_octets)


  _pyangbind_elements = OrderedDict([('mpls_label', mpls_label), ('in_pkts', in_pkts), ('in_octets', in_octets), ('out_pkts', out_pkts), ('out_octets', out_octets), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter_forwarding_classes_forwarding_class_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/segment-routing/interfaces/interface/sid-counters/sid-counter/forwarding-classes/forwarding-class/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Per-SID, per forwarding class counters for Segment Routing
with the MPLS dataplane
  """
  __slots__ = ('_path_helper', '_extmethods', '__exp','__in_pkts','__in_octets','__out_pkts','__out_octets',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__exp = 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="exp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__in_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__in_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__out_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'segment-routing', 'interfaces', 'interface', 'sid-counters', 'sid-counter', 'forwarding-classes', 'forwarding-class', 'state']

  def _get_exp(self):
    """
    Getter method for exp, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/forwarding_classes/forwarding_class/state/exp (uint8)

    YANG Description: The value of the MPLS EXP (experimental) or Traffic Class bits that the
SID statistics relate to. Packets received with a MPLS label value
equal to the SID's MPLS label and EXP bits equal to the this value
should be counted towards the associated ingress statistics. Packets
that are forwarded to the destination MPLS label corresponding to the
SID should be counted towards this value. In the egress direction, where
forwarding follows a SID value that requires PHP at the local node,
packets should still be counted towards the egress counters.
    """
    return self.__exp
      
  def _set_exp(self, v, load=False):
    """
    Setter method for exp, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/forwarding_classes/forwarding_class/state/exp (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_exp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_exp() directly.

    YANG Description: The value of the MPLS EXP (experimental) or Traffic Class bits that the
SID statistics relate to. Packets received with a MPLS label value
equal to the SID's MPLS label and EXP bits equal to the this value
should be counted towards the associated ingress statistics. Packets
that are forwarded to the destination MPLS label corresponding to the
SID should be counted towards this value. In the egress direction, where
forwarding follows a SID value that requires PHP at the local node,
packets should still be counted towards the egress counters.
    """
    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="exp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """exp 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..7']}), is_leaf=True, yang_name="exp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__exp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_exp(self):
    self.__exp = 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="exp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_in_pkts(self):
    """
    Getter method for in_pkts, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/forwarding_classes/forwarding_class/state/in_pkts (yang:counter64)

    YANG Description: A cumulative counter of the packets received within the context
which have matched a label corresponding to an SR Segment Identifier.
    """
    return self.__in_pkts
      
  def _set_in_pkts(self, v, load=False):
    """
    Setter method for in_pkts, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/forwarding_classes/forwarding_class/state/in_pkts (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_pkts() directly.

    YANG Description: A cumulative counter of the packets received within the context
which have matched a label corresponding to an SR Segment Identifier.
    """
    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="in-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_pkts must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__in_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_pkts(self):
    self.__in_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_in_octets(self):
    """
    Getter method for in_octets, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/forwarding_classes/forwarding_class/state/in_octets (yang:counter64)

    YANG Description: The cumulative counter of the total bytes received within the context
which have matched a label corresponding to an SR Segment Identifier
    """
    return self.__in_octets
      
  def _set_in_octets(self, v, load=False):
    """
    Setter method for in_octets, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/forwarding_classes/forwarding_class/state/in_octets (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_octets() directly.

    YANG Description: The cumulative counter of the total bytes received within the context
which have matched a label corresponding to an SR Segment Identifier
    """
    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="in-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_octets must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__in_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_octets(self):
    self.__in_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_pkts(self):
    """
    Getter method for out_pkts, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/forwarding_classes/forwarding_class/state/out_pkts (yang:counter64)

    YANG Description: A cumulative counter of the total number of packets transmitted by
the local system within the context which have a label imposed that
corresponds to an Segment Identifier.
    """
    return self.__out_pkts
      
  def _set_out_pkts(self, v, load=False):
    """
    Setter method for out_pkts, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/forwarding_classes/forwarding_class/state/out_pkts (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_pkts() directly.

    YANG Description: A cumulative counter of the total number of packets transmitted by
the local system within the context which have a label imposed that
corresponds to an Segment Identifier.
    """
    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="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_pkts must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_pkts(self):
    self.__out_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_out_octets(self):
    """
    Getter method for out_octets, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/forwarding_classes/forwarding_class/state/out_octets (yang:counter64)

    YANG Description: A cumulative counter of the total bytes transmitted by the local
system within the context which have a label imported that
corresponds to an SR Segment Identifier.
    """
    return self.__out_octets
      
  def _set_out_octets(self, v, load=False):
    """
    Setter method for out_octets, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/forwarding_classes/forwarding_class/state/out_octets (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_octets() directly.

    YANG Description: A cumulative counter of the total bytes transmitted by the local
system within the context which have a label imported that
corresponds to an SR Segment Identifier.
    """
    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="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_octets must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__out_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_octets(self):
    self.__out_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)

  exp = __builtin__.property(_get_exp)
  in_pkts = __builtin__.property(_get_in_pkts)
  in_octets = __builtin__.property(_get_in_octets)
  out_pkts = __builtin__.property(_get_out_pkts)
  out_octets = __builtin__.property(_get_out_octets)


  _pyangbind_elements = OrderedDict([('exp', exp), ('in_pkts', in_pkts), ('in_octets', in_octets), ('out_pkts', out_pkts), ('out_octets', out_octets), ])


class yc_forwarding_class_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter_forwarding_classes_forwarding_class(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/segment-routing/interfaces/interface/sid-counters/sid-counter/forwarding-classes/forwarding-class. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: SID entries for the forwarding class associated with the
referenced MPLS EXP.
  """
  __slots__ = ('_path_helper', '_extmethods', '__exp','__state',)

  _yang_name = 'forwarding-class'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__exp = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="exp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter_forwarding_classes_forwarding_class_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'segment-routing', 'interfaces', 'interface', 'sid-counters', 'sid-counter', 'forwarding-classes', 'forwarding-class']

  def _get_exp(self):
    """
    Getter method for exp, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/forwarding_classes/forwarding_class/exp (leafref)

    YANG Description: Reference to the value of the EXP bits of the segment
identifier.
    """
    return self.__exp
      
  def _set_exp(self, v, load=False):
    """
    Setter method for exp, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/forwarding_classes/forwarding_class/exp (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_exp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_exp() directly.

    YANG Description: Reference to the value of the EXP bits of the segment
identifier.
    """
    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="exp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """exp must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="exp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__exp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_exp(self):
    self.__exp = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="exp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/forwarding_classes/forwarding_class/state (container)

    YANG Description: Per-SID, per forwarding class counters for Segment Routing
with the MPLS dataplane
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/forwarding_classes/forwarding_class/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: Per-SID, per forwarding class counters for Segment Routing
with the MPLS dataplane
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter_forwarding_classes_forwarding_class_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter_forwarding_classes_forwarding_class_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter_forwarding_classes_forwarding_class_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  exp = __builtin__.property(_get_exp)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('exp', exp), ('state', state), ])


class yc_forwarding_classes_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter_forwarding_classes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/segment-routing/interfaces/interface/sid-counters/sid-counter/forwarding-classes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Per-SID per-forwarding class counters for Segment Routing.
  """
  __slots__ = ('_path_helper', '_extmethods', '__forwarding_class',)

  _yang_name = 'forwarding-classes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__forwarding_class = YANGDynClass(base=YANGListType("exp",yc_forwarding_class_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter_forwarding_classes_forwarding_class, yang_name="forwarding-class", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='exp', extensions=None), is_container='list', yang_name="forwarding-class", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'segment-routing', 'interfaces', 'interface', 'sid-counters', 'sid-counter', 'forwarding-classes']

  def _get_forwarding_class(self):
    """
    Getter method for forwarding_class, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/forwarding_classes/forwarding_class (list)

    YANG Description: SID entries for the forwarding class associated with the
referenced MPLS EXP.
    """
    return self.__forwarding_class
      
  def _set_forwarding_class(self, v, load=False):
    """
    Setter method for forwarding_class, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/forwarding_classes/forwarding_class (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_forwarding_class is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_forwarding_class() directly.

    YANG Description: SID entries for the forwarding class associated with the
referenced MPLS EXP.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("exp",yc_forwarding_class_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter_forwarding_classes_forwarding_class, yang_name="forwarding-class", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='exp', extensions=None), is_container='list', yang_name="forwarding-class", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """forwarding_class must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("exp",yc_forwarding_class_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter_forwarding_classes_forwarding_class, yang_name="forwarding-class", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='exp', extensions=None), is_container='list', yang_name="forwarding-class", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__forwarding_class = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_forwarding_class(self):
    self.__forwarding_class = YANGDynClass(base=YANGListType("exp",yc_forwarding_class_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter_forwarding_classes_forwarding_class, yang_name="forwarding-class", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='exp', extensions=None), is_container='list', yang_name="forwarding-class", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  forwarding_class = __builtin__.property(_get_forwarding_class)


  _pyangbind_elements = OrderedDict([('forwarding_class', forwarding_class), ])


class yc_sid_counter_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/segment-routing/interfaces/interface/sid-counters/sid-counter. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Per segment identifier counters for the MPLS dataplane.
  """
  __slots__ = ('_path_helper', '_extmethods', '__mpls_label','__state','__forwarding_classes',)

  _yang_name = 'sid-counter'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__mpls_label = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mpls-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__forwarding_classes = YANGDynClass(base=yc_forwarding_classes_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter_forwarding_classes, is_container='container', yang_name="forwarding-classes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'segment-routing', 'interfaces', 'interface', 'sid-counters', 'sid-counter']

  def _get_mpls_label(self):
    """
    Getter method for mpls_label, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/mpls_label (leafref)

    YANG Description: The MPLS label representing the segment identifier
    """
    return self.__mpls_label
      
  def _set_mpls_label(self, v, load=False):
    """
    Setter method for mpls_label, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/mpls_label (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mpls_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mpls_label() directly.

    YANG Description: The MPLS label representing the segment identifier
    """
    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="mpls-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mpls_label must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mpls-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__mpls_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mpls_label(self):
    self.__mpls_label = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mpls-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/state (container)

    YANG Description: State parameters for per-SID statistics
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/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 parameters for per-SID statistics
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_forwarding_classes(self):
    """
    Getter method for forwarding_classes, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/forwarding_classes (container)

    YANG Description: Per-SID per-forwarding class counters for Segment Routing.
    """
    return self.__forwarding_classes
      
  def _set_forwarding_classes(self, v, load=False):
    """
    Setter method for forwarding_classes, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter/forwarding_classes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_forwarding_classes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_forwarding_classes() directly.

    YANG Description: Per-SID per-forwarding class counters for Segment Routing.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_forwarding_classes_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter_forwarding_classes, is_container='container', yang_name="forwarding-classes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """forwarding_classes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_forwarding_classes_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter_forwarding_classes, is_container='container', yang_name="forwarding-classes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__forwarding_classes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_forwarding_classes(self):
    self.__forwarding_classes = YANGDynClass(base=yc_forwarding_classes_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter_forwarding_classes, is_container='container', yang_name="forwarding-classes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  mpls_label = __builtin__.property(_get_mpls_label)
  state = __builtin__.property(_get_state)
  forwarding_classes = __builtin__.property(_get_forwarding_classes)


  _pyangbind_elements = OrderedDict([('mpls_label', mpls_label), ('state', state), ('forwarding_classes', forwarding_classes), ])


class yc_sid_counters_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/segment-routing/interfaces/interface/sid-counters. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Per-SID statistics for MPLS
  """
  __slots__ = ('_path_helper', '_extmethods', '__sid_counter',)

  _yang_name = 'sid-counters'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__sid_counter = YANGDynClass(base=YANGListType("mpls_label",yc_sid_counter_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter, yang_name="sid-counter", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mpls-label', extensions=None), is_container='list', yang_name="sid-counter", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'segment-routing', 'interfaces', 'interface', 'sid-counters']

  def _get_sid_counter(self):
    """
    Getter method for sid_counter, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter (list)

    YANG Description: Per segment identifier counters for the MPLS dataplane.
    """
    return self.__sid_counter
      
  def _set_sid_counter(self, v, load=False):
    """
    Setter method for sid_counter, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters/sid_counter (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sid_counter is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sid_counter() directly.

    YANG Description: Per segment identifier counters for the MPLS dataplane.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("mpls_label",yc_sid_counter_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter, yang_name="sid-counter", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mpls-label', extensions=None), is_container='list', yang_name="sid-counter", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sid_counter must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("mpls_label",yc_sid_counter_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter, yang_name="sid-counter", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mpls-label', extensions=None), is_container='list', yang_name="sid-counter", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__sid_counter = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sid_counter(self):
    self.__sid_counter = YANGDynClass(base=YANGListType("mpls_label",yc_sid_counter_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters_sid_counter, yang_name="sid-counter", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='mpls-label', extensions=None), is_container='list', yang_name="sid-counter", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  sid_counter = __builtin__.property(_get_sid_counter, _set_sid_counter)


  _pyangbind_elements = OrderedDict([('sid_counter', sid_counter), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_interface_ref_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/segment-routing/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'segment-routing', 'interfaces', 'interface', 'interface-ref', 'config']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/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 /network_instances/network_instance/mpls/signaling_protocols/segment_routing/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/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 /network_instances/network_instance/mpls/signaling_protocols/segment_routing/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_interface_ref_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/segment-routing/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'segment-routing', 'interfaces', 'interface', 'interface-ref', 'state']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/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 /network_instances/network_instance/mpls/signaling_protocols/segment_routing/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/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 /network_instances/network_instance/mpls/signaling_protocols/segment_routing/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_interface_ref(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/segment-routing/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
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'interface-ref'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'segment-routing', 'interfaces', 'interface', 'interface-ref']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/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 /network_instances/network_instance/mpls/signaling_protocols/segment_routing/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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/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 /network_instances/network_instance/mpls/signaling_protocols/segment_routing/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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', 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_interface_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/segment-routing/interfaces/interface. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Parameters and MPLS-specific configuration relating to Segment
Routing on an interface.
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface_id','__config','__state','__sid_counters','__interface_ref',)

  _yang_name = 'interface'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__sid_counters = YANGDynClass(base=yc_sid_counters_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters, is_container='container', yang_name="sid-counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__interface_ref = YANGDynClass(base=yc_interface_ref_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'segment-routing', 'interfaces', 'interface']

  def _get_interface_id(self):
    """
    Getter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/interface_id (leafref)

    YANG Description: A reference to the ID for the interface for which SR is
configured
    """
    return self.__interface_id
      
  def _set_interface_id(self, v, load=False):
    """
    Setter method for interface_id, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/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: A reference to the ID for the interface for which SR is
configured
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/config (container)

    YANG Description: MPLS-specific Segment Routing configuration parameters
related to an interface.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/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: MPLS-specific Segment Routing configuration parameters
related to an interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/state (container)

    YANG Description: MPLS-specific Segment Routing operational state parameters
related to an interface.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/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: MPLS-specific Segment Routing operational state parameters
related to an interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_sid_counters(self):
    """
    Getter method for sid_counters, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters (container)

    YANG Description: Per-SID statistics for MPLS
    """
    return self.__sid_counters
      
  def _set_sid_counters(self, v, load=False):
    """
    Setter method for sid_counters, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/sid_counters (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sid_counters is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sid_counters() directly.

    YANG Description: Per-SID statistics for MPLS
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_sid_counters_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters, is_container='container', yang_name="sid-counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sid_counters must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_sid_counters_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters, is_container='container', yang_name="sid-counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__sid_counters = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sid_counters(self):
    self.__sid_counters = YANGDynClass(base=yc_sid_counters_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces_interface_sid_counters, is_container='container', yang_name="sid-counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_interface_ref(self):
    """
    Getter method for interface_ref, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface/interface_ref (container)

    YANG Description: Reference to an interface or subinterface
    """
    return self.__interface_ref
      
  def _set_interface_ref(self, v, load=False):
    """
    Setter method for interface_ref, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/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
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interface_ref_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', 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)
  sid_counters = __builtin__.property(_get_sid_counters, _set_sid_counters)
  interface_ref = __builtin__.property(_get_interface_ref, _set_interface_ref)


  _pyangbind_elements = OrderedDict([('interface_id', interface_id), ('config', config), ('state', state), ('sid_counters', sid_counters), ('interface_ref', interface_ref), ])


class yc_interfaces_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_interfaces(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/segment-routing/interfaces. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Interface related Segment Routing parameters.
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface',)

  _yang_name = 'interfaces'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'segment-routing', 'interfaces']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces/interface (list)

    YANG Description: Parameters and MPLS-specific configuration relating to Segment
Routing on an interface.
    """
    return self.__interface
      
  def _set_interface(self, v, load=False):
    """
    Setter method for interface, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/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: Parameters and MPLS-specific configuration relating to Segment
Routing on an interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("interface_id",yc_interface_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  interface = __builtin__.property(_get_interface, _set_interface)


  _pyangbind_elements = OrderedDict([('interface', interface), ])


class yc_segment_routing_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols/segment-routing. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: MPLS-specific Segment Routing configuration and operational state
parameters
  """
  __slots__ = ('_path_helper', '_extmethods', '__aggregate_sid_counters','__interfaces',)

  _yang_name = 'segment-routing'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__aggregate_sid_counters = YANGDynClass(base=yc_aggregate_sid_counters_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_aggregate_sid_counters, is_container='container', yang_name="aggregate-sid-counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__interfaces = YANGDynClass(base=yc_interfaces_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols', 'segment-routing']

  def _get_aggregate_sid_counters(self):
    """
    Getter method for aggregate_sid_counters, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/aggregate_sid_counters (container)

    YANG Description: Per-SID counters aggregated across all interfaces on the local system
    """
    return self.__aggregate_sid_counters
      
  def _set_aggregate_sid_counters(self, v, load=False):
    """
    Setter method for aggregate_sid_counters, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/aggregate_sid_counters (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_aggregate_sid_counters is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_aggregate_sid_counters() directly.

    YANG Description: Per-SID counters aggregated across all interfaces on the local system
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_aggregate_sid_counters_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_aggregate_sid_counters, is_container='container', yang_name="aggregate-sid-counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """aggregate_sid_counters must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_aggregate_sid_counters_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_aggregate_sid_counters, is_container='container', yang_name="aggregate-sid-counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__aggregate_sid_counters = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_aggregate_sid_counters(self):
    self.__aggregate_sid_counters = YANGDynClass(base=yc_aggregate_sid_counters_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_aggregate_sid_counters, is_container='container', yang_name="aggregate-sid-counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_interfaces(self):
    """
    Getter method for interfaces, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/interfaces (container)

    YANG Description: Interface related Segment Routing parameters.
    """
    return self.__interfaces
      
  def _set_interfaces(self, v, load=False):
    """
    Setter method for interfaces, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing/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: Interface related Segment Routing parameters.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interfaces_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  aggregate_sid_counters = __builtin__.property(_get_aggregate_sid_counters, _set_aggregate_sid_counters)
  interfaces = __builtin__.property(_get_interfaces, _set_interfaces)


  _pyangbind_elements = OrderedDict([('aggregate_sid_counters', aggregate_sid_counters), ('interfaces', interfaces), ])


class yc_signaling_protocols_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/signaling-protocols. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: top-level signaling protocol configuration
  """
  __slots__ = ('_path_helper', '_extmethods', '__rsvp_te','__ldp','__segment_routing',)

  _yang_name = 'signaling-protocols'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__rsvp_te = YANGDynClass(base=yc_rsvp_te_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te, is_container='container', yang_name="rsvp-te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__ldp = YANGDynClass(base=yc_ldp_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp, is_container='container', yang_name="ldp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__segment_routing = YANGDynClass(base=yc_segment_routing_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing, is_container='container', yang_name="segment-routing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'signaling-protocols']

  def _get_rsvp_te(self):
    """
    Getter method for rsvp_te, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te (container)

    YANG Description: RSVP-TE global signaling protocol configuration
    """
    return self.__rsvp_te
      
  def _set_rsvp_te(self, v, load=False):
    """
    Setter method for rsvp_te, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/rsvp_te (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_rsvp_te is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_rsvp_te() directly.

    YANG Description: RSVP-TE global signaling protocol configuration
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_rsvp_te_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te, is_container='container', yang_name="rsvp-te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """rsvp_te must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_rsvp_te_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te, is_container='container', yang_name="rsvp-te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__rsvp_te = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_rsvp_te(self):
    self.__rsvp_te = YANGDynClass(base=yc_rsvp_te_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_rsvp_te, is_container='container', yang_name="rsvp-te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_ldp(self):
    """
    Getter method for ldp, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp (container)

    YANG Description: LDP global signaling configuration
    """
    return self.__ldp
      
  def _set_ldp(self, v, load=False):
    """
    Setter method for ldp, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/ldp (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ldp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ldp() directly.

    YANG Description: LDP global signaling configuration
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ldp_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp, is_container='container', yang_name="ldp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ldp must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ldp_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp, is_container='container', yang_name="ldp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__ldp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ldp(self):
    self.__ldp = YANGDynClass(base=yc_ldp_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_ldp, is_container='container', yang_name="ldp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_segment_routing(self):
    """
    Getter method for segment_routing, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing (container)

    YANG Description: MPLS-specific Segment Routing configuration and operational state
parameters
    """
    return self.__segment_routing
      
  def _set_segment_routing(self, v, load=False):
    """
    Setter method for segment_routing, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols/segment_routing (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_segment_routing is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_segment_routing() directly.

    YANG Description: MPLS-specific Segment Routing configuration and operational state
parameters
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_segment_routing_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing, is_container='container', yang_name="segment-routing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """segment_routing must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_segment_routing_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing, is_container='container', yang_name="segment-routing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__segment_routing = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_segment_routing(self):
    self.__segment_routing = YANGDynClass(base=yc_segment_routing_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols_segment_routing, is_container='container', yang_name="segment-routing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  rsvp_te = __builtin__.property(_get_rsvp_te, _set_rsvp_te)
  ldp = __builtin__.property(_get_ldp, _set_ldp)
  segment_routing = __builtin__.property(_get_segment_routing, _set_segment_routing)


  _pyangbind_elements = OrderedDict([('rsvp_te', rsvp_te), ('ldp', ldp), ('segment_routing', segment_routing), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/named-explicit-paths/named-explicit-path/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to named explicit
paths
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__sid_selection_mode','__sid_protection_required',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__sid_selection_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ADJ_SID_ONLY': {}, 'MIXED_MODE': {}},), default=six.text_type("MIXED_MODE"), is_leaf=True, yang_name="sid-selection-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)
    self.__sid_protection_required = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="sid-protection-required", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'named-explicit-paths', 'named-explicit-path', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/config/name (string)

    YANG Description: A string name that uniquely identifies an explicit
path
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/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: A string name that uniquely identifies an explicit
path
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_sid_selection_mode(self):
    """
    Getter method for sid_selection_mode, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/config/sid_selection_mode (enumeration)

    YANG Description: The restrictions placed on the SIDs to be selected by the
calculation method for the explicit path when it is
instantiated for a SR-TE LSP
    """
    return self.__sid_selection_mode
      
  def _set_sid_selection_mode(self, v, load=False):
    """
    Setter method for sid_selection_mode, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/config/sid_selection_mode (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sid_selection_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sid_selection_mode() directly.

    YANG Description: The restrictions placed on the SIDs to be selected by the
calculation method for the explicit path when it is
instantiated for a SR-TE LSP
    """
    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={'ADJ_SID_ONLY': {}, 'MIXED_MODE': {}},), default=six.text_type("MIXED_MODE"), is_leaf=True, yang_name="sid-selection-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sid_selection_mode must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ADJ_SID_ONLY': {}, 'MIXED_MODE': {}},), default=six.text_type("MIXED_MODE"), is_leaf=True, yang_name="sid-selection-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)""",
        })

    self.__sid_selection_mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sid_selection_mode(self):
    self.__sid_selection_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ADJ_SID_ONLY': {}, 'MIXED_MODE': {}},), default=six.text_type("MIXED_MODE"), is_leaf=True, yang_name="sid-selection-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)


  def _get_sid_protection_required(self):
    """
    Getter method for sid_protection_required, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/config/sid_protection_required (boolean)

    YANG Description: When this value is set to true, only SIDs that are
protected are to be selected by the calculating method
when the explicit path is instantiated by a SR-TE LSP.
    """
    return self.__sid_protection_required
      
  def _set_sid_protection_required(self, v, load=False):
    """
    Setter method for sid_protection_required, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/config/sid_protection_required (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sid_protection_required is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sid_protection_required() directly.

    YANG Description: When this value is set to true, only SIDs that are
protected are to be selected by the calculating method
when the explicit path is instantiated by a SR-TE LSP.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="sid-protection-required", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sid_protection_required must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="sid-protection-required", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__sid_protection_required = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sid_protection_required(self):
    self.__sid_protection_required = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="sid-protection-required", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  sid_selection_mode = __builtin__.property(_get_sid_selection_mode, _set_sid_selection_mode)
  sid_protection_required = __builtin__.property(_get_sid_protection_required, _set_sid_protection_required)


  _pyangbind_elements = OrderedDict([('name', name), ('sid_selection_mode', sid_selection_mode), ('sid_protection_required', sid_protection_required), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/named-explicit-paths/named-explicit-path/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 named
explicit paths
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__sid_selection_mode','__sid_protection_required',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__sid_selection_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ADJ_SID_ONLY': {}, 'MIXED_MODE': {}},), default=six.text_type("MIXED_MODE"), is_leaf=True, yang_name="sid-selection-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    self.__sid_protection_required = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="sid-protection-required", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'named-explicit-paths', 'named-explicit-path', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/state/name (string)

    YANG Description: A string name that uniquely identifies an explicit
path
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/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: A string name that uniquely identifies an explicit
path
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_sid_selection_mode(self):
    """
    Getter method for sid_selection_mode, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/state/sid_selection_mode (enumeration)

    YANG Description: The restrictions placed on the SIDs to be selected by the
calculation method for the explicit path when it is
instantiated for a SR-TE LSP
    """
    return self.__sid_selection_mode
      
  def _set_sid_selection_mode(self, v, load=False):
    """
    Setter method for sid_selection_mode, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/state/sid_selection_mode (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sid_selection_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sid_selection_mode() directly.

    YANG Description: The restrictions placed on the SIDs to be selected by the
calculation method for the explicit path when it is
instantiated for a SR-TE LSP
    """
    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={'ADJ_SID_ONLY': {}, 'MIXED_MODE': {}},), default=six.text_type("MIXED_MODE"), is_leaf=True, yang_name="sid-selection-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sid_selection_mode must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ADJ_SID_ONLY': {}, 'MIXED_MODE': {}},), default=six.text_type("MIXED_MODE"), is_leaf=True, yang_name="sid-selection-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__sid_selection_mode = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sid_selection_mode(self):
    self.__sid_selection_mode = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ADJ_SID_ONLY': {}, 'MIXED_MODE': {}},), default=six.text_type("MIXED_MODE"), is_leaf=True, yang_name="sid-selection-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)


  def _get_sid_protection_required(self):
    """
    Getter method for sid_protection_required, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/state/sid_protection_required (boolean)

    YANG Description: When this value is set to true, only SIDs that are
protected are to be selected by the calculating method
when the explicit path is instantiated by a SR-TE LSP.
    """
    return self.__sid_protection_required
      
  def _set_sid_protection_required(self, v, load=False):
    """
    Setter method for sid_protection_required, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/state/sid_protection_required (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sid_protection_required is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sid_protection_required() directly.

    YANG Description: When this value is set to true, only SIDs that are
protected are to be selected by the calculating method
when the explicit path is instantiated by a SR-TE LSP.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="sid-protection-required", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sid_protection_required must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="sid-protection-required", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__sid_protection_required = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sid_protection_required(self):
    self.__sid_protection_required = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="sid-protection-required", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  name = __builtin__.property(_get_name)
  sid_selection_mode = __builtin__.property(_get_sid_selection_mode)
  sid_protection_required = __builtin__.property(_get_sid_protection_required)


  _pyangbind_elements = OrderedDict([('name', name), ('sid_selection_mode', sid_selection_mode), ('sid_protection_required', sid_protection_required), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_explicit_route_objects_explicit_route_object_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/named-explicit-paths/named-explicit-path/explicit-route-objects/explicit-route-object/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to an explicit
route
  """
  __slots__ = ('_path_helper', '_extmethods', '__address','__hop_type','__index',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__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}'}),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}|:))'}),], is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)
    self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LOOSE': {}, 'STRICT': {}},), is_leaf=True, yang_name="hop-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='mpls-hop-type', is_config=True)
    self.__index = 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'named-explicit-paths', 'named-explicit-path', 'explicit-route-objects', 'explicit-route-object', 'config']

  def _get_address(self):
    """
    Getter method for address, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects/explicit_route_object/config/address (inet:ip-address)

    YANG Description: router hop for the LSP path
    """
    return self.__address
      
  def _set_address(self, v, load=False):
    """
    Setter method for address, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects/explicit_route_object/config/address (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address() directly.

    YANG Description: router hop for the LSP path
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)""",
        })

    self.__address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address(self):
    self.__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}'}),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}|:))'}),], is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)


  def _get_hop_type(self):
    """
    Getter method for hop_type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects/explicit_route_object/config/hop_type (mpls-hop-type)

    YANG Description: strict or loose hop
    """
    return self.__hop_type
      
  def _set_hop_type(self, v, load=False):
    """
    Setter method for hop_type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects/explicit_route_object/config/hop_type (mpls-hop-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hop_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hop_type() directly.

    YANG Description: strict or loose hop
    """
    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={'LOOSE': {}, 'STRICT': {}},), is_leaf=True, yang_name="hop-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='mpls-hop-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hop_type must be of a type compatible with mpls-hop-type""",
          'defined-type': "openconfig-network-instance:mpls-hop-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LOOSE': {}, 'STRICT': {}},), is_leaf=True, yang_name="hop-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='mpls-hop-type', is_config=True)""",
        })

    self.__hop_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hop_type(self):
    self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LOOSE': {}, 'STRICT': {}},), is_leaf=True, yang_name="hop-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='mpls-hop-type', is_config=True)


  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects/explicit_route_object/config/index (uint8)

    YANG Description: Index of this explicit route object to express
the order of hops in the path
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects/explicit_route_object/config/index (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: Index of this explicit route object to express
the order of hops in the path
    """
    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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
        })

    self.__index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_index(self):
    self.__index = 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)

  address = __builtin__.property(_get_address, _set_address)
  hop_type = __builtin__.property(_get_hop_type, _set_hop_type)
  index = __builtin__.property(_get_index, _set_index)


  _pyangbind_elements = OrderedDict([('address', address), ('hop_type', hop_type), ('index', index), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_explicit_route_objects_explicit_route_object_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/named-explicit-paths/named-explicit-path/explicit-route-objects/explicit-route-object/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to an explicit route
  """
  __slots__ = ('_path_helper', '_extmethods', '__address','__hop_type','__index',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__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}'}),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}|:))'}),], is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LOOSE': {}, 'STRICT': {}},), is_leaf=True, yang_name="hop-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='mpls-hop-type', is_config=False)
    self.__index = 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'named-explicit-paths', 'named-explicit-path', 'explicit-route-objects', 'explicit-route-object', 'state']

  def _get_address(self):
    """
    Getter method for address, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects/explicit_route_object/state/address (inet:ip-address)

    YANG Description: router hop for the LSP path
    """
    return self.__address
      
  def _set_address(self, v, load=False):
    """
    Setter method for address, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects/explicit_route_object/state/address (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_address() directly.

    YANG Description: router hop for the LSP path
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """address must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)""",
        })

    self.__address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_address(self):
    self.__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}'}),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}|:))'}),], is_leaf=True, yang_name="address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)


  def _get_hop_type(self):
    """
    Getter method for hop_type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects/explicit_route_object/state/hop_type (mpls-hop-type)

    YANG Description: strict or loose hop
    """
    return self.__hop_type
      
  def _set_hop_type(self, v, load=False):
    """
    Setter method for hop_type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects/explicit_route_object/state/hop_type (mpls-hop-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hop_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hop_type() directly.

    YANG Description: strict or loose hop
    """
    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={'LOOSE': {}, 'STRICT': {}},), is_leaf=True, yang_name="hop-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='mpls-hop-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hop_type must be of a type compatible with mpls-hop-type""",
          'defined-type': "openconfig-network-instance:mpls-hop-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LOOSE': {}, 'STRICT': {}},), is_leaf=True, yang_name="hop-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='mpls-hop-type', is_config=False)""",
        })

    self.__hop_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hop_type(self):
    self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'LOOSE': {}, 'STRICT': {}},), is_leaf=True, yang_name="hop-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='mpls-hop-type', is_config=False)


  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects/explicit_route_object/state/index (uint8)

    YANG Description: Index of this explicit route object to express
the order of hops in the path
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects/explicit_route_object/state/index (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: Index of this explicit route object to express
the order of hops in the path
    """
    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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_index(self):
    self.__index = 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)

  address = __builtin__.property(_get_address)
  hop_type = __builtin__.property(_get_hop_type)
  index = __builtin__.property(_get_index)


  _pyangbind_elements = OrderedDict([('address', address), ('hop_type', hop_type), ('index', index), ])


class yc_explicit_route_object_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_explicit_route_objects_explicit_route_object(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/named-explicit-paths/named-explicit-path/explicit-route-objects/explicit-route-object. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of explicit route objects
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__config','__state',)

  _yang_name = 'explicit-route-object'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_explicit_route_objects_explicit_route_object_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_explicit_route_objects_explicit_route_object_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'named-explicit-paths', 'named-explicit-path', 'explicit-route-objects', 'explicit-route-object']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects/explicit_route_object/index (leafref)

    YANG Description: Index of this explicit route object,
to express the order of hops in path
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects/explicit_route_object/index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: Index of this explicit route object,
to express the order of hops in path
    """
    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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_index(self):
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects/explicit_route_object/config (container)

    YANG Description: Configuration parameters relating to an explicit
route
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects/explicit_route_object/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 an explicit
route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_explicit_route_objects_explicit_route_object_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_explicit_route_objects_explicit_route_object_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_explicit_route_objects_explicit_route_object_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects/explicit_route_object/state (container)

    YANG Description: State parameters relating to an explicit route
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects/explicit_route_object/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 parameters relating to an explicit route
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_explicit_route_objects_explicit_route_object_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_explicit_route_objects_explicit_route_object_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_explicit_route_objects_explicit_route_object_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  index = __builtin__.property(_get_index, _set_index)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('index', index), ('config', config), ('state', state), ])


class yc_explicit_route_objects_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_explicit_route_objects(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/named-explicit-paths/named-explicit-path/explicit-route-objects. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for EROs
  """
  __slots__ = ('_path_helper', '_extmethods', '__explicit_route_object',)

  _yang_name = 'explicit-route-objects'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__explicit_route_object = YANGDynClass(base=YANGListType("index",yc_explicit_route_object_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_explicit_route_objects_explicit_route_object, yang_name="explicit-route-object", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="explicit-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'named-explicit-paths', 'named-explicit-path', 'explicit-route-objects']

  def _get_explicit_route_object(self):
    """
    Getter method for explicit_route_object, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects/explicit_route_object (list)

    YANG Description: List of explicit route objects
    """
    return self.__explicit_route_object
      
  def _set_explicit_route_object(self, v, load=False):
    """
    Setter method for explicit_route_object, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects/explicit_route_object (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_explicit_route_object is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_explicit_route_object() directly.

    YANG Description: List of explicit route objects
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("index",yc_explicit_route_object_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_explicit_route_objects_explicit_route_object, yang_name="explicit-route-object", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="explicit-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """explicit_route_object must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("index",yc_explicit_route_object_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_explicit_route_objects_explicit_route_object, yang_name="explicit-route-object", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="explicit-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__explicit_route_object = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_explicit_route_object(self):
    self.__explicit_route_object = YANGDynClass(base=YANGListType("index",yc_explicit_route_object_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_explicit_route_objects_explicit_route_object, yang_name="explicit-route-object", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="explicit-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  explicit_route_object = __builtin__.property(_get_explicit_route_object, _set_explicit_route_object)


  _pyangbind_elements = OrderedDict([('explicit_route_object', explicit_route_object), ])


class yc_named_explicit_path_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/named-explicit-paths/named-explicit-path. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A list of explicit paths
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state','__explicit_route_objects',)

  _yang_name = 'named-explicit-path'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__explicit_route_objects = YANGDynClass(base=yc_explicit_route_objects_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_explicit_route_objects, is_container='container', yang_name="explicit-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'named-explicit-paths', 'named-explicit-path']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/name (leafref)

    YANG Description: A string name that uniquely identifies
an explicit path
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/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: A string name that uniquely identifies
an explicit path
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/config (container)

    YANG Description: Configuration parameters relating to named explicit
paths
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/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 named explicit
paths
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/state (container)

    YANG Description: Operational state parameters relating to the named
explicit paths
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/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 named
explicit paths
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_explicit_route_objects(self):
    """
    Getter method for explicit_route_objects, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects (container)

    YANG Description: Enclosing container for EROs
    """
    return self.__explicit_route_objects
      
  def _set_explicit_route_objects(self, v, load=False):
    """
    Setter method for explicit_route_objects, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path/explicit_route_objects (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_explicit_route_objects is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_explicit_route_objects() directly.

    YANG Description: Enclosing container for EROs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_explicit_route_objects_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_explicit_route_objects, is_container='container', yang_name="explicit-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """explicit_route_objects must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_explicit_route_objects_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_explicit_route_objects, is_container='container', yang_name="explicit-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__explicit_route_objects = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_explicit_route_objects(self):
    self.__explicit_route_objects = YANGDynClass(base=yc_explicit_route_objects_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path_explicit_route_objects, is_container='container', yang_name="explicit-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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)
  explicit_route_objects = __builtin__.property(_get_explicit_route_objects, _set_explicit_route_objects)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ('explicit_route_objects', explicit_route_objects), ])


class yc_named_explicit_paths_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/named-explicit-paths. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for the named explicit paths
  """
  __slots__ = ('_path_helper', '_extmethods', '__named_explicit_path',)

  _yang_name = 'named-explicit-paths'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__named_explicit_path = YANGDynClass(base=YANGListType("name",yc_named_explicit_path_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path, yang_name="named-explicit-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="named-explicit-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'named-explicit-paths']

  def _get_named_explicit_path(self):
    """
    Getter method for named_explicit_path, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path (list)

    YANG Description: A list of explicit paths
    """
    return self.__named_explicit_path
      
  def _set_named_explicit_path(self, v, load=False):
    """
    Setter method for named_explicit_path, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths/named_explicit_path (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_named_explicit_path is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_named_explicit_path() directly.

    YANG Description: A list of explicit paths
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_named_explicit_path_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path, yang_name="named-explicit-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="named-explicit-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """named_explicit_path must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_named_explicit_path_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path, yang_name="named-explicit-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="named-explicit-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__named_explicit_path = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_named_explicit_path(self):
    self.__named_explicit_path = YANGDynClass(base=YANGListType("name",yc_named_explicit_path_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths_named_explicit_path, yang_name="named-explicit-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="named-explicit-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  named_explicit_path = __builtin__.property(_get_named_explicit_path, _set_named_explicit_path)


  _pyangbind_elements = OrderedDict([('named_explicit_path', named_explicit_path), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters related to TE tunnels:
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__type','__signaling_protocol','__description','__admin_status','__preference','__metric_type','__metric','__shortcut_eligible','__protection_style_requested','__reoptimize_timer','__source','__soft_preemption','__setup_priority','__hold_priority',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__signaling_protocol = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="signaling-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__description = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__admin_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:ADMIN_UP"), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LSP_METRIC_INHERITED"), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='int32', is_config=True)
    self.__shortcut_eligible = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="shortcut-eligible", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__protection_style_requested = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:UNPROTECTED"), is_leaf=True, yang_name="protection-style-requested", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__reoptimize_timer = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="reoptimize-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    self.__source = 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}'}),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}|:))'}),], is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)
    self.__soft_preemption = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="soft-preemption", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/name (string)

    YANG Description: The tunnel name
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/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: The tunnel name
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/type (identityref)

    YANG Description: Tunnel type, p2p or p2mp
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/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: Tunnel type, p2p or p2mp
    """
    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={'P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', 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={'P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_signaling_protocol(self):
    """
    Getter method for signaling_protocol, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/signaling_protocol (identityref)

    YANG Description: Signaling protocol used to set up this tunnel
    """
    return self.__signaling_protocol
      
  def _set_signaling_protocol(self, v, load=False):
    """
    Setter method for signaling_protocol, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/signaling_protocol (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_signaling_protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_signaling_protocol() directly.

    YANG Description: Signaling protocol used to set up this tunnel
    """
    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={'PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="signaling-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """signaling_protocol must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="signaling-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__signaling_protocol = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_signaling_protocol(self):
    self.__signaling_protocol = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="signaling-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_description(self):
    """
    Getter method for description, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/description (string)

    YANG Description: optional text description for the tunnel
    """
    return self.__description
      
  def _set_description(self, v, load=False):
    """
    Setter method for description, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/description (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_description is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_description() directly.

    YANG Description: optional text description for the tunnel
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """description must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)""",
        })

    self.__description = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_description(self):
    self.__description = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_admin_status(self):
    """
    Getter method for admin_status, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/admin_status (identityref)

    YANG Description: TE tunnel administrative state.
    """
    return self.__admin_status
      
  def _set_admin_status(self, v, load=False):
    """
    Setter method for admin_status, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/admin_status (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_admin_status is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_admin_status() directly.

    YANG Description: TE tunnel administrative state.
    """
    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={'ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:ADMIN_UP"), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """admin_status must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:ADMIN_UP"), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__admin_status = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_admin_status(self):
    self.__admin_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:ADMIN_UP"), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_preference(self):
    """
    Getter method for preference, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/preference (uint8)

    YANG Description: Specifies a preference for this tunnel.
A lower number signifies a better preference
    """
    return self.__preference
      
  def _set_preference(self, v, load=False):
    """
    Setter method for preference, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/preference (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_preference is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_preference() directly.

    YANG Description: Specifies a preference for this tunnel.
A lower number signifies a better preference
    """
    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': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """preference 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': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
        })

    self.__preference = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_preference(self):
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)


  def _get_metric_type(self):
    """
    Getter method for metric_type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/metric_type (identityref)

    YANG Description: The type of metric specification that should be used to set
the LSP(s) metric
    """
    return self.__metric_type
      
  def _set_metric_type(self, v, load=False):
    """
    Setter method for metric_type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/metric_type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric_type() directly.

    YANG Description: The type of metric specification that should be used to set
the LSP(s) metric
    """
    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={'LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LSP_METRIC_INHERITED"), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric_type must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LSP_METRIC_INHERITED"), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__metric_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric_type(self):
    self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LSP_METRIC_INHERITED"), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/metric (int32)

    YANG Description: The value of the metric that should be specified. The value
supplied in this leaf is used in conjunction with the metric
type to determine the value of the metric used by the system.
Where the metric-type is set to LSP_METRIC_ABSOLUTE - the
value of this leaf is used directly; where it is set to
LSP_METRIC_RELATIVE, the relevant (positive or negative)
offset is used to formulate the metric; where metric-type
is LSP_METRIC_INHERITED, the value of this leaf is not
utilised
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/metric (int32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: The value of the metric that should be specified. The value
supplied in this leaf is used in conjunction with the metric
type to determine the value of the metric used by the system.
Where the metric-type is set to LSP_METRIC_ABSOLUTE - the
value of this leaf is used directly; where it is set to
LSP_METRIC_RELATIVE, the relevant (positive or negative)
offset is used to formulate the metric; where metric-type
is LSP_METRIC_INHERITED, the value of this leaf is not
utilised
    """
    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="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='int32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric 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="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='int32', is_config=True)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='int32', is_config=True)


  def _get_shortcut_eligible(self):
    """
    Getter method for shortcut_eligible, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/shortcut_eligible (boolean)

    YANG Description: Whether this LSP is considered to be eligible for us as a
shortcut in the IGP. In the case that this leaf is set to
true, the IGP SPF calculation uses the metric specified to
determine whether traffic should be carried over this LSP
    """
    return self.__shortcut_eligible
      
  def _set_shortcut_eligible(self, v, load=False):
    """
    Setter method for shortcut_eligible, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/shortcut_eligible (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_shortcut_eligible is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_shortcut_eligible() directly.

    YANG Description: Whether this LSP is considered to be eligible for us as a
shortcut in the IGP. In the case that this leaf is set to
true, the IGP SPF calculation uses the metric specified to
determine whether traffic should be carried over this LSP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="shortcut-eligible", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """shortcut_eligible must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="shortcut-eligible", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__shortcut_eligible = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_shortcut_eligible(self):
    self.__shortcut_eligible = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="shortcut-eligible", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_protection_style_requested(self):
    """
    Getter method for protection_style_requested, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/protection_style_requested (identityref)

    YANG Description: style of mpls frr protection desired: can be
link, link-node or unprotected.
    """
    return self.__protection_style_requested
      
  def _set_protection_style_requested(self, v, load=False):
    """
    Setter method for protection_style_requested, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/protection_style_requested (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_protection_style_requested is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_protection_style_requested() directly.

    YANG Description: style of mpls frr protection desired: can be
link, link-node or unprotected.
    """
    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={'UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:UNPROTECTED"), is_leaf=True, yang_name="protection-style-requested", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """protection_style_requested must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:UNPROTECTED"), is_leaf=True, yang_name="protection-style-requested", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__protection_style_requested = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_protection_style_requested(self):
    self.__protection_style_requested = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:UNPROTECTED"), is_leaf=True, yang_name="protection-style-requested", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_reoptimize_timer(self):
    """
    Getter method for reoptimize_timer, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/reoptimize_timer (uint16)

    YANG Description: frequency of reoptimization of
a traffic engineered LSP
    """
    return self.__reoptimize_timer
      
  def _set_reoptimize_timer(self, v, load=False):
    """
    Setter method for reoptimize_timer, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/reoptimize_timer (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_reoptimize_timer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_reoptimize_timer() directly.

    YANG Description: frequency of reoptimization of
a traffic engineered LSP
    """
    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="reoptimize-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """reoptimize_timer 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="reoptimize-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__reoptimize_timer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_reoptimize_timer(self):
    self.__reoptimize_timer = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="reoptimize-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)


  def _get_source(self):
    """
    Getter method for source, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/source (inet:ip-address)

    YANG Description: RSVP-TE tunnel source address
    """
    return self.__source
      
  def _set_source(self, v, load=False):
    """
    Setter method for source, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/source (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source() directly.

    YANG Description: RSVP-TE tunnel source address
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)""",
        })

    self.__source = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source(self):
    self.__source = 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}'}),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}|:))'}),], is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)


  def _get_soft_preemption(self):
    """
    Getter method for soft_preemption, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/soft_preemption (boolean)

    YANG Description: Enables RSVP soft-preemption on this LSP
    """
    return self.__soft_preemption
      
  def _set_soft_preemption(self, v, load=False):
    """
    Setter method for soft_preemption, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/soft_preemption (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_soft_preemption is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_soft_preemption() directly.

    YANG Description: Enables RSVP soft-preemption on this LSP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="soft-preemption", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """soft_preemption must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="soft-preemption", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__soft_preemption = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_soft_preemption(self):
    self.__soft_preemption = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="soft-preemption", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_setup_priority(self):
    """
    Getter method for setup_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/setup_priority (uint8)

    YANG Description: RSVP-TE preemption priority during LSP setup, lower is
higher priority; default 7 indicates that LSP will not
preempt established LSPs during setup
    """
    return self.__setup_priority
      
  def _set_setup_priority(self, v, load=False):
    """
    Setter method for setup_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/setup_priority (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_setup_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_setup_priority() directly.

    YANG Description: RSVP-TE preemption priority during LSP setup, lower is
higher priority; default 7 indicates that LSP will not
preempt established LSPs during setup
    """
    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']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """setup_priority 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..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
        })

    self.__setup_priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_setup_priority(self):
    self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)


  def _get_hold_priority(self):
    """
    Getter method for hold_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/hold_priority (uint8)

    YANG Description: preemption priority once the LSP is established,
lower is higher priority; default 0 indicates other LSPs
will not preempt the LSPs once established
    """
    return self.__hold_priority
      
  def _set_hold_priority(self, v, load=False):
    """
    Setter method for hold_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config/hold_priority (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hold_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hold_priority() directly.

    YANG Description: preemption priority once the LSP is established,
lower is higher priority; default 0 indicates other LSPs
will not preempt the LSPs once established
    """
    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']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hold_priority 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..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
        })

    self.__hold_priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hold_priority(self):
    self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  type = __builtin__.property(_get_type, _set_type)
  signaling_protocol = __builtin__.property(_get_signaling_protocol, _set_signaling_protocol)
  description = __builtin__.property(_get_description, _set_description)
  admin_status = __builtin__.property(_get_admin_status, _set_admin_status)
  preference = __builtin__.property(_get_preference, _set_preference)
  metric_type = __builtin__.property(_get_metric_type, _set_metric_type)
  metric = __builtin__.property(_get_metric, _set_metric)
  shortcut_eligible = __builtin__.property(_get_shortcut_eligible, _set_shortcut_eligible)
  protection_style_requested = __builtin__.property(_get_protection_style_requested, _set_protection_style_requested)
  reoptimize_timer = __builtin__.property(_get_reoptimize_timer, _set_reoptimize_timer)
  source = __builtin__.property(_get_source, _set_source)
  soft_preemption = __builtin__.property(_get_soft_preemption, _set_soft_preemption)
  setup_priority = __builtin__.property(_get_setup_priority, _set_setup_priority)
  hold_priority = __builtin__.property(_get_hold_priority, _set_hold_priority)


  _pyangbind_elements = OrderedDict([('name', name), ('type', type), ('signaling_protocol', signaling_protocol), ('description', description), ('admin_status', admin_status), ('preference', preference), ('metric_type', metric_type), ('metric', metric), ('shortcut_eligible', shortcut_eligible), ('protection_style_requested', protection_style_requested), ('reoptimize_timer', reoptimize_timer), ('source', source), ('soft_preemption', soft_preemption), ('setup_priority', setup_priority), ('hold_priority', hold_priority), ])


class yc_counters_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_state_counters(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/state/counters. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State data for MPLS label switched paths. This state
data is specific to a single label switched path.
  """
  __slots__ = ('_path_helper', '_extmethods', '__bytes','__packets','__path_changes','__state_changes','__online_time','__current_path_time','__next_reoptimization_time',)

  _yang_name = 'counters'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__bytes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bytes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__packets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__path_changes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="path-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__state_changes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="state-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    self.__online_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="online-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__current_path_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="current-path-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__next_reoptimization_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="next-reoptimization-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'state', 'counters']

  def _get_bytes(self):
    """
    Getter method for bytes, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/counters/bytes (yang:counter64)

    YANG Description: Number of bytes that have been forwarded over the
label switched path.
    """
    return self.__bytes
      
  def _set_bytes(self, v, load=False):
    """
    Setter method for bytes, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/counters/bytes (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bytes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bytes() directly.

    YANG Description: Number of bytes that have been forwarded over the
label switched path.
    """
    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="bytes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bytes must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bytes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__bytes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bytes(self):
    self.__bytes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="bytes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_packets(self):
    """
    Getter method for packets, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/counters/packets (yang:counter64)

    YANG Description: Number of pacets that have been forwarded over the
label switched path.
    """
    return self.__packets
      
  def _set_packets(self, v, load=False):
    """
    Setter method for packets, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/counters/packets (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_packets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_packets() directly.

    YANG Description: Number of pacets that have been forwarded over the
label switched path.
    """
    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="packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """packets must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__packets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_packets(self):
    self.__packets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="packets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_path_changes(self):
    """
    Getter method for path_changes, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/counters/path_changes (yang:counter64)

    YANG Description: Number of path changes for the label switched path
    """
    return self.__path_changes
      
  def _set_path_changes(self, v, load=False):
    """
    Setter method for path_changes, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/counters/path_changes (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_changes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_changes() directly.

    YANG Description: Number of path changes for the label switched path
    """
    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="path-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_changes must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="path-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__path_changes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_changes(self):
    self.__path_changes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="path-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_state_changes(self):
    """
    Getter method for state_changes, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/counters/state_changes (yang:counter64)

    YANG Description: Number of state changes for the label switched path
    """
    return self.__state_changes
      
  def _set_state_changes(self, v, load=False):
    """
    Setter method for state_changes, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/counters/state_changes (yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_state_changes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_state_changes() directly.

    YANG Description: Number of state changes for the label switched path
    """
    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="state-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """state_changes must be of a type compatible with yang:counter64""",
          'defined-type': "yang:counter64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="state-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)""",
        })

    self.__state_changes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_state_changes(self):
    self.__state_changes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="state-changes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:counter64', is_config=False)


  def _get_online_time(self):
    """
    Getter method for online_time, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/counters/online_time (oc-types:timeticks64)

    YANG Description: Indication of the time the label switched path
transitioned to an Oper Up or in-service state.

The value is the timestamp in nanoseconds relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    return self.__online_time
      
  def _set_online_time(self, v, load=False):
    """
    Setter method for online_time, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/counters/online_time (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_online_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_online_time() directly.

    YANG Description: Indication of the time the label switched path
transitioned to an Oper Up or in-service state.

The value is the timestamp in nanoseconds relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    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="online-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """online_time must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="online-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__online_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_online_time(self):
    self.__online_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="online-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_current_path_time(self):
    """
    Getter method for current_path_time, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/counters/current_path_time (oc-types:timeticks64)

    YANG Description: Indicates the time the LSP switched onto its
current path. The value is reset upon a LSP path
change.

The value is the timestamp in nanoseconds relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    return self.__current_path_time
      
  def _set_current_path_time(self, v, load=False):
    """
    Setter method for current_path_time, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/counters/current_path_time (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_current_path_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_current_path_time() directly.

    YANG Description: Indicates the time the LSP switched onto its
current path. The value is reset upon a LSP path
change.

The value is the timestamp in nanoseconds relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    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="current-path-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """current_path_time must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="current-path-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__current_path_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_current_path_time(self):
    self.__current_path_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="current-path-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_next_reoptimization_time(self):
    """
    Getter method for next_reoptimization_time, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/counters/next_reoptimization_time (oc-types:timeticks64)

    YANG Description: Indicates the next scheduled time the LSP
will be reoptimized.

The value is the timestamp in nanoseconds relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    return self.__next_reoptimization_time
      
  def _set_next_reoptimization_time(self, v, load=False):
    """
    Setter method for next_reoptimization_time, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/counters/next_reoptimization_time (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_reoptimization_time is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_reoptimization_time() directly.

    YANG Description: Indicates the next scheduled time the LSP
will be reoptimized.

The value is the timestamp in nanoseconds relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    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="next-reoptimization-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_reoptimization_time must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="next-reoptimization-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__next_reoptimization_time = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_next_reoptimization_time(self):
    self.__next_reoptimization_time = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="next-reoptimization-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)

  bytes = __builtin__.property(_get_bytes)
  packets = __builtin__.property(_get_packets)
  path_changes = __builtin__.property(_get_path_changes)
  state_changes = __builtin__.property(_get_state_changes)
  online_time = __builtin__.property(_get_online_time)
  current_path_time = __builtin__.property(_get_current_path_time)
  next_reoptimization_time = __builtin__.property(_get_next_reoptimization_time)


  _pyangbind_elements = OrderedDict([('bytes', bytes), ('packets', packets), ('path_changes', path_changes), ('state_changes', state_changes), ('online_time', online_time), ('current_path_time', current_path_time), ('next_reoptimization_time', next_reoptimization_time), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters related to TE tunnels
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__type','__signaling_protocol','__description','__admin_status','__preference','__metric_type','__metric','__shortcut_eligible','__protection_style_requested','__reoptimize_timer','__source','__soft_preemption','__setup_priority','__hold_priority','__oper_status','__role','__auto_generated','__counters',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__signaling_protocol = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="signaling-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__description = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__admin_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:ADMIN_UP"), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LSP_METRIC_INHERITED"), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='int32', is_config=False)
    self.__shortcut_eligible = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="shortcut-eligible", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__protection_style_requested = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:UNPROTECTED"), is_leaf=True, yang_name="protection-style-requested", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__reoptimize_timer = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="reoptimize-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__source = 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}'}),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}|:))'}),], is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    self.__soft_preemption = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="soft-preemption", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__oper_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="oper-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__role = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="role", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__auto_generated = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="auto-generated", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/name (string)

    YANG Description: The tunnel name
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/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: The tunnel name
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/type (identityref)

    YANG Description: Tunnel type, p2p or p2mp
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/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: Tunnel type, p2p or p2mp
    """
    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={'P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', 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={'P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:P2P': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:P2MP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_signaling_protocol(self):
    """
    Getter method for signaling_protocol, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/signaling_protocol (identityref)

    YANG Description: Signaling protocol used to set up this tunnel
    """
    return self.__signaling_protocol
      
  def _set_signaling_protocol(self, v, load=False):
    """
    Setter method for signaling_protocol, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/signaling_protocol (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_signaling_protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_signaling_protocol() directly.

    YANG Description: Signaling protocol used to set up this tunnel
    """
    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={'PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="signaling-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """signaling_protocol must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="signaling-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__signaling_protocol = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_signaling_protocol(self):
    self.__signaling_protocol = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_RSVP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_SR': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_SETUP_LDP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="signaling-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_description(self):
    """
    Getter method for description, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/description (string)

    YANG Description: optional text description for the tunnel
    """
    return self.__description
      
  def _set_description(self, v, load=False):
    """
    Setter method for description, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/description (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_description is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_description() directly.

    YANG Description: optional text description for the tunnel
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """description must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__description = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_description(self):
    self.__description = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_admin_status(self):
    """
    Getter method for admin_status, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/admin_status (identityref)

    YANG Description: TE tunnel administrative state.
    """
    return self.__admin_status
      
  def _set_admin_status(self, v, load=False):
    """
    Setter method for admin_status, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/admin_status (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_admin_status is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_admin_status() directly.

    YANG Description: TE tunnel administrative state.
    """
    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={'ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:ADMIN_UP"), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """admin_status must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:ADMIN_UP"), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__admin_status = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_admin_status(self):
    self.__admin_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:ADMIN_DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:ADMIN_UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:ADMIN_UP"), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_preference(self):
    """
    Getter method for preference, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/preference (uint8)

    YANG Description: Specifies a preference for this tunnel.
A lower number signifies a better preference
    """
    return self.__preference
      
  def _set_preference(self, v, load=False):
    """
    Setter method for preference, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/preference (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_preference is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_preference() directly.

    YANG Description: Specifies a preference for this tunnel.
A lower number signifies a better preference
    """
    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': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """preference 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': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__preference = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_preference(self):
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_metric_type(self):
    """
    Getter method for metric_type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/metric_type (identityref)

    YANG Description: The type of metric specification that should be used to set
the LSP(s) metric
    """
    return self.__metric_type
      
  def _set_metric_type(self, v, load=False):
    """
    Setter method for metric_type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/metric_type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric_type() directly.

    YANG Description: The type of metric specification that should be used to set
the LSP(s) metric
    """
    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={'LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LSP_METRIC_INHERITED"), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric_type must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LSP_METRIC_INHERITED"), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__metric_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric_type(self):
    self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_RELATIVE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_ABSOLUTE': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LSP_METRIC_INHERITED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LSP_METRIC_INHERITED"), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_metric(self):
    """
    Getter method for metric, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/metric (int32)

    YANG Description: The value of the metric that should be specified. The value
supplied in this leaf is used in conjunction with the metric
type to determine the value of the metric used by the system.
Where the metric-type is set to LSP_METRIC_ABSOLUTE - the
value of this leaf is used directly; where it is set to
LSP_METRIC_RELATIVE, the relevant (positive or negative)
offset is used to formulate the metric; where metric-type
is LSP_METRIC_INHERITED, the value of this leaf is not
utilised
    """
    return self.__metric
      
  def _set_metric(self, v, load=False):
    """
    Setter method for metric, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/metric (int32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: The value of the metric that should be specified. The value
supplied in this leaf is used in conjunction with the metric
type to determine the value of the metric used by the system.
Where the metric-type is set to LSP_METRIC_ABSOLUTE - the
value of this leaf is used directly; where it is set to
LSP_METRIC_RELATIVE, the relevant (positive or negative)
offset is used to formulate the metric; where metric-type
is LSP_METRIC_INHERITED, the value of this leaf is not
utilised
    """
    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="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='int32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric 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="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='int32', is_config=False)""",
        })

    self.__metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric(self):
    self.__metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), is_leaf=True, yang_name="metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='int32', is_config=False)


  def _get_shortcut_eligible(self):
    """
    Getter method for shortcut_eligible, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/shortcut_eligible (boolean)

    YANG Description: Whether this LSP is considered to be eligible for us as a
shortcut in the IGP. In the case that this leaf is set to
true, the IGP SPF calculation uses the metric specified to
determine whether traffic should be carried over this LSP
    """
    return self.__shortcut_eligible
      
  def _set_shortcut_eligible(self, v, load=False):
    """
    Setter method for shortcut_eligible, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/shortcut_eligible (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_shortcut_eligible is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_shortcut_eligible() directly.

    YANG Description: Whether this LSP is considered to be eligible for us as a
shortcut in the IGP. In the case that this leaf is set to
true, the IGP SPF calculation uses the metric specified to
determine whether traffic should be carried over this LSP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="shortcut-eligible", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """shortcut_eligible must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="shortcut-eligible", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__shortcut_eligible = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_shortcut_eligible(self):
    self.__shortcut_eligible = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="shortcut-eligible", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_protection_style_requested(self):
    """
    Getter method for protection_style_requested, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/protection_style_requested (identityref)

    YANG Description: style of mpls frr protection desired: can be
link, link-node or unprotected.
    """
    return self.__protection_style_requested
      
  def _set_protection_style_requested(self, v, load=False):
    """
    Setter method for protection_style_requested, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/protection_style_requested (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_protection_style_requested is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_protection_style_requested() directly.

    YANG Description: style of mpls frr protection desired: can be
link, link-node or unprotected.
    """
    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={'UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:UNPROTECTED"), is_leaf=True, yang_name="protection-style-requested", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """protection_style_requested must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:UNPROTECTED"), is_leaf=True, yang_name="protection-style-requested", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__protection_style_requested = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_protection_style_requested(self):
    self.__protection_style_requested = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UNPROTECTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_PROTECTION_REQUIRED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LINK_NODE_PROTECTION_REQUESTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:UNPROTECTED"), is_leaf=True, yang_name="protection-style-requested", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_reoptimize_timer(self):
    """
    Getter method for reoptimize_timer, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/reoptimize_timer (uint16)

    YANG Description: frequency of reoptimization of
a traffic engineered LSP
    """
    return self.__reoptimize_timer
      
  def _set_reoptimize_timer(self, v, load=False):
    """
    Setter method for reoptimize_timer, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/reoptimize_timer (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_reoptimize_timer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_reoptimize_timer() directly.

    YANG Description: frequency of reoptimization of
a traffic engineered LSP
    """
    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="reoptimize-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """reoptimize_timer 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="reoptimize-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__reoptimize_timer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_reoptimize_timer(self):
    self.__reoptimize_timer = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="reoptimize-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_source(self):
    """
    Getter method for source, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/source (inet:ip-address)

    YANG Description: RSVP-TE tunnel source address
    """
    return self.__source
      
  def _set_source(self, v, load=False):
    """
    Setter method for source, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/source (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_source is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_source() directly.

    YANG Description: RSVP-TE tunnel source address
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """source must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)""",
        })

    self.__source = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_source(self):
    self.__source = 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}'}),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}|:))'}),], is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)


  def _get_soft_preemption(self):
    """
    Getter method for soft_preemption, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/soft_preemption (boolean)

    YANG Description: Enables RSVP soft-preemption on this LSP
    """
    return self.__soft_preemption
      
  def _set_soft_preemption(self, v, load=False):
    """
    Setter method for soft_preemption, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/soft_preemption (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_soft_preemption is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_soft_preemption() directly.

    YANG Description: Enables RSVP soft-preemption on this LSP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="soft-preemption", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """soft_preemption must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="soft-preemption", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__soft_preemption = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_soft_preemption(self):
    self.__soft_preemption = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="soft-preemption", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_setup_priority(self):
    """
    Getter method for setup_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/setup_priority (uint8)

    YANG Description: RSVP-TE preemption priority during LSP setup, lower is
higher priority; default 7 indicates that LSP will not
preempt established LSPs during setup
    """
    return self.__setup_priority
      
  def _set_setup_priority(self, v, load=False):
    """
    Setter method for setup_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/setup_priority (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_setup_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_setup_priority() directly.

    YANG Description: RSVP-TE preemption priority during LSP setup, lower is
higher priority; default 7 indicates that LSP will not
preempt established LSPs during setup
    """
    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']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """setup_priority 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..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__setup_priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_setup_priority(self):
    self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_hold_priority(self):
    """
    Getter method for hold_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/hold_priority (uint8)

    YANG Description: preemption priority once the LSP is established,
lower is higher priority; default 0 indicates other LSPs
will not preempt the LSPs once established
    """
    return self.__hold_priority
      
  def _set_hold_priority(self, v, load=False):
    """
    Setter method for hold_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/hold_priority (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hold_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hold_priority() directly.

    YANG Description: preemption priority once the LSP is established,
lower is higher priority; default 0 indicates other LSPs
will not preempt the LSPs once established
    """
    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']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hold_priority 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..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__hold_priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hold_priority(self):
    self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_oper_status(self):
    """
    Getter method for oper_status, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/oper_status (identityref)

    YANG Description: The operational status of the TE tunnel
    """
    return self.__oper_status
      
  def _set_oper_status(self, v, load=False):
    """
    Setter method for oper_status, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/oper_status (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_oper_status is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_oper_status() directly.

    YANG Description: The operational status of the TE tunnel
    """
    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={'DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="oper-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """oper_status must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="oper-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__oper_status = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_oper_status(self):
    self.__oper_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:DOWN': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:UP': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="oper-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_role(self):
    """
    Getter method for role, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/role (identityref)

    YANG Description: The lsp role at the current node, whether it is headend,
transit or tailend.
    """
    return self.__role
      
  def _set_role(self, v, load=False):
    """
    Setter method for role, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/role (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_role is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_role() directly.

    YANG Description: The lsp role at the current node, whether it is headend,
transit or tailend.
    """
    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={'INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="role", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """role must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="role", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__role = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_role(self):
    self.__role = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:INGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EGRESS': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TRANSIT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), is_leaf=True, yang_name="role", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_auto_generated(self):
    """
    Getter method for auto_generated, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/auto_generated (boolean)

    YANG Description: If the LSP was auto-generated by the system this leaf
should be set to true. Examples of auto-generated LSPs
are dynamically created backup LSPs to meet a FRR
policy.
    """
    return self.__auto_generated
      
  def _set_auto_generated(self, v, load=False):
    """
    Setter method for auto_generated, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/auto_generated (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_auto_generated is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_auto_generated() directly.

    YANG Description: If the LSP was auto-generated by the system this leaf
should be set to true. Examples of auto-generated LSPs
are dynamically created backup LSPs to meet a FRR
policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="auto-generated", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """auto_generated must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="auto-generated", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__auto_generated = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_auto_generated(self):
    self.__auto_generated = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="auto-generated", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_counters(self):
    """
    Getter method for counters, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/counters (container)

    YANG Description: State data for MPLS label switched paths. This state
data is specific to a single label switched path.
    """
    return self.__counters
      
  def _set_counters(self, v, load=False):
    """
    Setter method for counters, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state/counters (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_counters is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_counters() directly.

    YANG Description: State data for MPLS label switched paths. This state
data is specific to a single label switched path.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_counters_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """counters must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_counters_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__counters = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_counters(self):
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  name = __builtin__.property(_get_name)
  type = __builtin__.property(_get_type)
  signaling_protocol = __builtin__.property(_get_signaling_protocol)
  description = __builtin__.property(_get_description)
  admin_status = __builtin__.property(_get_admin_status)
  preference = __builtin__.property(_get_preference)
  metric_type = __builtin__.property(_get_metric_type)
  metric = __builtin__.property(_get_metric)
  shortcut_eligible = __builtin__.property(_get_shortcut_eligible)
  protection_style_requested = __builtin__.property(_get_protection_style_requested)
  reoptimize_timer = __builtin__.property(_get_reoptimize_timer)
  source = __builtin__.property(_get_source)
  soft_preemption = __builtin__.property(_get_soft_preemption)
  setup_priority = __builtin__.property(_get_setup_priority)
  hold_priority = __builtin__.property(_get_hold_priority)
  oper_status = __builtin__.property(_get_oper_status)
  role = __builtin__.property(_get_role)
  auto_generated = __builtin__.property(_get_auto_generated)
  counters = __builtin__.property(_get_counters)


  _pyangbind_elements = OrderedDict([('name', name), ('type', type), ('signaling_protocol', signaling_protocol), ('description', description), ('admin_status', admin_status), ('preference', preference), ('metric_type', metric_type), ('metric', metric), ('shortcut_eligible', shortcut_eligible), ('protection_style_requested', protection_style_requested), ('reoptimize_timer', reoptimize_timer), ('source', source), ('soft_preemption', soft_preemption), ('setup_priority', setup_priority), ('hold_priority', hold_priority), ('oper_status', oper_status), ('role', role), ('auto_generated', auto_generated), ('counters', counters), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/bandwidth/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters related to bandwidth on TE
tunnels:
  """
  __slots__ = ('_path_helper', '_extmethods', '__specification_type','__set_bandwidth',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__specification_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SPECIFIED': {}, 'AUTO': {}},), default=six.text_type("SPECIFIED"), is_leaf=True, yang_name="specification-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='te-bandwidth-type', is_config=True)
    self.__set_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="set-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'bandwidth', 'config']

  def _get_specification_type(self):
    """
    Getter method for specification_type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/config/specification_type (te-bandwidth-type)

    YANG Description: The method used for settign the bandwidth, either explicitly
specified or configured
    """
    return self.__specification_type
      
  def _set_specification_type(self, v, load=False):
    """
    Setter method for specification_type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/config/specification_type (te-bandwidth-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_specification_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_specification_type() directly.

    YANG Description: The method used for settign the bandwidth, either explicitly
specified or 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={'SPECIFIED': {}, 'AUTO': {}},), default=six.text_type("SPECIFIED"), is_leaf=True, yang_name="specification-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='te-bandwidth-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """specification_type must be of a type compatible with te-bandwidth-type""",
          'defined-type': "openconfig-network-instance:te-bandwidth-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SPECIFIED': {}, 'AUTO': {}},), default=six.text_type("SPECIFIED"), is_leaf=True, yang_name="specification-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='te-bandwidth-type', is_config=True)""",
        })

    self.__specification_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_specification_type(self):
    self.__specification_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SPECIFIED': {}, 'AUTO': {}},), default=six.text_type("SPECIFIED"), is_leaf=True, yang_name="specification-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='te-bandwidth-type', is_config=True)


  def _get_set_bandwidth(self):
    """
    Getter method for set_bandwidth, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/config/set_bandwidth (oc-mplst:bandwidth-kbps)

    YANG Description: set bandwidth explicitly, e.g., using
offline calculation
    """
    return self.__set_bandwidth
      
  def _set_set_bandwidth(self, v, load=False):
    """
    Setter method for set_bandwidth, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/config/set_bandwidth (oc-mplst:bandwidth-kbps)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_bandwidth() directly.

    YANG Description: set bandwidth explicitly, e.g., using
offline calculation
    """
    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="set-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_bandwidth must be of a type compatible with oc-mplst:bandwidth-kbps""",
          'defined-type': "oc-mplst:bandwidth-kbps",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="set-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=True)""",
        })

    self.__set_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_bandwidth(self):
    self.__set_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="set-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=True)

  specification_type = __builtin__.property(_get_specification_type, _set_specification_type)
  set_bandwidth = __builtin__.property(_get_set_bandwidth, _set_set_bandwidth)


  _pyangbind_elements = OrderedDict([('specification_type', specification_type), ('set_bandwidth', set_bandwidth), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/bandwidth/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters related to bandwidth
configuration of TE tunnels
  """
  __slots__ = ('_path_helper', '_extmethods', '__specification_type','__set_bandwidth','__signaled_bandwidth',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__specification_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SPECIFIED': {}, 'AUTO': {}},), default=six.text_type("SPECIFIED"), is_leaf=True, yang_name="specification-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='te-bandwidth-type', is_config=False)
    self.__set_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="set-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)
    self.__signaled_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="signaled-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'bandwidth', 'state']

  def _get_specification_type(self):
    """
    Getter method for specification_type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/state/specification_type (te-bandwidth-type)

    YANG Description: The method used for settign the bandwidth, either explicitly
specified or configured
    """
    return self.__specification_type
      
  def _set_specification_type(self, v, load=False):
    """
    Setter method for specification_type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/state/specification_type (te-bandwidth-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_specification_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_specification_type() directly.

    YANG Description: The method used for settign the bandwidth, either explicitly
specified or 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={'SPECIFIED': {}, 'AUTO': {}},), default=six.text_type("SPECIFIED"), is_leaf=True, yang_name="specification-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='te-bandwidth-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """specification_type must be of a type compatible with te-bandwidth-type""",
          'defined-type': "openconfig-network-instance:te-bandwidth-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SPECIFIED': {}, 'AUTO': {}},), default=six.text_type("SPECIFIED"), is_leaf=True, yang_name="specification-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='te-bandwidth-type', is_config=False)""",
        })

    self.__specification_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_specification_type(self):
    self.__specification_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'SPECIFIED': {}, 'AUTO': {}},), default=six.text_type("SPECIFIED"), is_leaf=True, yang_name="specification-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='te-bandwidth-type', is_config=False)


  def _get_set_bandwidth(self):
    """
    Getter method for set_bandwidth, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/state/set_bandwidth (oc-mplst:bandwidth-kbps)

    YANG Description: set bandwidth explicitly, e.g., using
offline calculation
    """
    return self.__set_bandwidth
      
  def _set_set_bandwidth(self, v, load=False):
    """
    Setter method for set_bandwidth, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/state/set_bandwidth (oc-mplst:bandwidth-kbps)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_set_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_set_bandwidth() directly.

    YANG Description: set bandwidth explicitly, e.g., using
offline calculation
    """
    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="set-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """set_bandwidth must be of a type compatible with oc-mplst:bandwidth-kbps""",
          'defined-type': "oc-mplst:bandwidth-kbps",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="set-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)""",
        })

    self.__set_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_set_bandwidth(self):
    self.__set_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="set-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)


  def _get_signaled_bandwidth(self):
    """
    Getter method for signaled_bandwidth, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/state/signaled_bandwidth (oc-mplst:bandwidth-kbps)

    YANG Description: The currently signaled bandwidth of the LSP. In the case where
the bandwidth is specified explicitly, then this will match the
value of the set-bandwidth leaf; in cases where the bandwidth is
dynamically computed by the system, the current value of the
bandwidth should be reflected.
    """
    return self.__signaled_bandwidth
      
  def _set_signaled_bandwidth(self, v, load=False):
    """
    Setter method for signaled_bandwidth, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/state/signaled_bandwidth (oc-mplst:bandwidth-kbps)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_signaled_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_signaled_bandwidth() directly.

    YANG Description: The currently signaled bandwidth of the LSP. In the case where
the bandwidth is specified explicitly, then this will match the
value of the set-bandwidth leaf; in cases where the bandwidth is
dynamically computed by the system, the current value of the
bandwidth should be reflected.
    """
    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="signaled-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """signaled_bandwidth must be of a type compatible with oc-mplst:bandwidth-kbps""",
          'defined-type': "oc-mplst:bandwidth-kbps",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="signaled-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)""",
        })

    self.__signaled_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_signaled_bandwidth(self):
    self.__signaled_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="signaled-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)

  specification_type = __builtin__.property(_get_specification_type)
  set_bandwidth = __builtin__.property(_get_set_bandwidth)
  signaled_bandwidth = __builtin__.property(_get_signaled_bandwidth)


  _pyangbind_elements = OrderedDict([('specification_type', specification_type), ('set_bandwidth', set_bandwidth), ('signaled_bandwidth', signaled_bandwidth), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/bandwidth/auto-bandwidth/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to MPLS
auto-bandwidth on the tunnel.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__min_bw','__max_bw','__adjust_interval','__adjust_threshold',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__min_bw = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=True)
    self.__max_bw = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=True)
    self.__adjust_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="adjust-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    self.__adjust_threshold = 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="adjust-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'bandwidth', 'auto-bandwidth', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/config/enabled (boolean)

    YANG Description: enables mpls auto-bandwidth on the
lsp
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: enables mpls auto-bandwidth on the
lsp
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_min_bw(self):
    """
    Getter method for min_bw, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/config/min_bw (oc-mplst:bandwidth-kbps)

    YANG Description: set the minimum bandwidth in Kbps for an
auto-bandwidth LSP
    """
    return self.__min_bw
      
  def _set_min_bw(self, v, load=False):
    """
    Setter method for min_bw, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/config/min_bw (oc-mplst:bandwidth-kbps)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_bw is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_bw() directly.

    YANG Description: set the minimum bandwidth in Kbps for an
auto-bandwidth LSP
    """
    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-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_bw must be of a type compatible with oc-mplst:bandwidth-kbps""",
          'defined-type': "oc-mplst:bandwidth-kbps",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=True)""",
        })

    self.__min_bw = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_min_bw(self):
    self.__min_bw = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=True)


  def _get_max_bw(self):
    """
    Getter method for max_bw, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/config/max_bw (oc-mplst:bandwidth-kbps)

    YANG Description: set the maximum bandwidth in Kbps for an
auto-bandwidth LSP
    """
    return self.__max_bw
      
  def _set_max_bw(self, v, load=False):
    """
    Setter method for max_bw, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/config/max_bw (oc-mplst:bandwidth-kbps)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_bw is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_bw() directly.

    YANG Description: set the maximum bandwidth in Kbps for an
auto-bandwidth LSP
    """
    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-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_bw must be of a type compatible with oc-mplst:bandwidth-kbps""",
          'defined-type': "oc-mplst:bandwidth-kbps",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=True)""",
        })

    self.__max_bw = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_bw(self):
    self.__max_bw = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=True)


  def _get_adjust_interval(self):
    """
    Getter method for adjust_interval, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/config/adjust_interval (uint32)

    YANG Description: time in seconds between adjustments to
LSP bandwidth
    """
    return self.__adjust_interval
      
  def _set_adjust_interval(self, v, load=False):
    """
    Setter method for adjust_interval, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/config/adjust_interval (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adjust_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adjust_interval() directly.

    YANG Description: time in seconds between adjustments to
LSP bandwidth
    """
    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="adjust-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adjust_interval 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="adjust-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)""",
        })

    self.__adjust_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adjust_interval(self):
    self.__adjust_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="adjust-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=True)


  def _get_adjust_threshold(self):
    """
    Getter method for adjust_threshold, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/config/adjust_threshold (oc-types:percentage)

    YANG Description: percentage difference between the LSP's
specified bandwidth and its current bandwidth
allocation -- if the difference is greater than the
specified percentage, auto-bandwidth adjustment is
triggered
    """
    return self.__adjust_threshold
      
  def _set_adjust_threshold(self, v, load=False):
    """
    Setter method for adjust_threshold, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/config/adjust_threshold (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adjust_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adjust_threshold() directly.

    YANG Description: percentage difference between the LSP's
specified bandwidth and its current bandwidth
allocation -- if the difference is greater than the
specified percentage, auto-bandwidth adjustment is
triggered
    """
    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="adjust-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adjust_threshold 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="adjust-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__adjust_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adjust_threshold(self):
    self.__adjust_threshold = 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="adjust-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)
  min_bw = __builtin__.property(_get_min_bw, _set_min_bw)
  max_bw = __builtin__.property(_get_max_bw, _set_max_bw)
  adjust_interval = __builtin__.property(_get_adjust_interval, _set_adjust_interval)
  adjust_threshold = __builtin__.property(_get_adjust_threshold, _set_adjust_threshold)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('min_bw', min_bw), ('max_bw', max_bw), ('adjust_interval', adjust_interval), ('adjust_threshold', adjust_threshold), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/bandwidth/auto-bandwidth/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to MPLS
auto-bandwidth on the tunnel.
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__min_bw','__max_bw','__adjust_interval','__adjust_threshold','__interval_high_bw',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__min_bw = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)
    self.__max_bw = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)
    self.__adjust_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="adjust-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__adjust_threshold = 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="adjust-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__interval_high_bw = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="interval-high-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'bandwidth', 'auto-bandwidth', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/state/enabled (boolean)

    YANG Description: enables mpls auto-bandwidth on the
lsp
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: enables mpls auto-bandwidth on the
lsp
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_min_bw(self):
    """
    Getter method for min_bw, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/state/min_bw (oc-mplst:bandwidth-kbps)

    YANG Description: set the minimum bandwidth in Kbps for an
auto-bandwidth LSP
    """
    return self.__min_bw
      
  def _set_min_bw(self, v, load=False):
    """
    Setter method for min_bw, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/state/min_bw (oc-mplst:bandwidth-kbps)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_min_bw is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_min_bw() directly.

    YANG Description: set the minimum bandwidth in Kbps for an
auto-bandwidth LSP
    """
    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-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """min_bw must be of a type compatible with oc-mplst:bandwidth-kbps""",
          'defined-type': "oc-mplst:bandwidth-kbps",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)""",
        })

    self.__min_bw = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_min_bw(self):
    self.__min_bw = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="min-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)


  def _get_max_bw(self):
    """
    Getter method for max_bw, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/state/max_bw (oc-mplst:bandwidth-kbps)

    YANG Description: set the maximum bandwidth in Kbps for an
auto-bandwidth LSP
    """
    return self.__max_bw
      
  def _set_max_bw(self, v, load=False):
    """
    Setter method for max_bw, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/state/max_bw (oc-mplst:bandwidth-kbps)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_max_bw is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_max_bw() directly.

    YANG Description: set the maximum bandwidth in Kbps for an
auto-bandwidth LSP
    """
    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-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """max_bw must be of a type compatible with oc-mplst:bandwidth-kbps""",
          'defined-type': "oc-mplst:bandwidth-kbps",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)""",
        })

    self.__max_bw = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_max_bw(self):
    self.__max_bw = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="max-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)


  def _get_adjust_interval(self):
    """
    Getter method for adjust_interval, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/state/adjust_interval (uint32)

    YANG Description: time in seconds between adjustments to
LSP bandwidth
    """
    return self.__adjust_interval
      
  def _set_adjust_interval(self, v, load=False):
    """
    Setter method for adjust_interval, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/state/adjust_interval (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adjust_interval is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adjust_interval() directly.

    YANG Description: time in seconds between adjustments to
LSP bandwidth
    """
    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="adjust-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adjust_interval 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="adjust-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__adjust_interval = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adjust_interval(self):
    self.__adjust_interval = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="adjust-interval", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_adjust_threshold(self):
    """
    Getter method for adjust_threshold, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/state/adjust_threshold (oc-types:percentage)

    YANG Description: percentage difference between the LSP's
specified bandwidth and its current bandwidth
allocation -- if the difference is greater than the
specified percentage, auto-bandwidth adjustment is
triggered
    """
    return self.__adjust_threshold
      
  def _set_adjust_threshold(self, v, load=False):
    """
    Setter method for adjust_threshold, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/state/adjust_threshold (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_adjust_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_adjust_threshold() directly.

    YANG Description: percentage difference between the LSP's
specified bandwidth and its current bandwidth
allocation -- if the difference is greater than the
specified percentage, auto-bandwidth adjustment is
triggered
    """
    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="adjust-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """adjust_threshold 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="adjust-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__adjust_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_adjust_threshold(self):
    self.__adjust_threshold = 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="adjust-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_interval_high_bw(self):
    """
    Getter method for interval_high_bw, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/state/interval_high_bw (oc-mplst:bandwidth-kbps)

    YANG Description: The maximum measured bandwidth during the current
auto-bandwidth adjust interval expressed in kilobits
per second.
    """
    return self.__interval_high_bw
      
  def _set_interval_high_bw(self, v, load=False):
    """
    Setter method for interval_high_bw, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/state/interval_high_bw (oc-mplst:bandwidth-kbps)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_interval_high_bw is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_interval_high_bw() directly.

    YANG Description: The maximum measured bandwidth during the current
auto-bandwidth adjust interval expressed in kilobits
per second.
    """
    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="interval-high-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interval_high_bw must be of a type compatible with oc-mplst:bandwidth-kbps""",
          'defined-type': "oc-mplst:bandwidth-kbps",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="interval-high-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)""",
        })

    self.__interval_high_bw = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_interval_high_bw(self):
    self.__interval_high_bw = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="interval-high-bw", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:bandwidth-kbps', is_config=False)

  enabled = __builtin__.property(_get_enabled)
  min_bw = __builtin__.property(_get_min_bw)
  max_bw = __builtin__.property(_get_max_bw)
  adjust_interval = __builtin__.property(_get_adjust_interval)
  adjust_threshold = __builtin__.property(_get_adjust_threshold)
  interval_high_bw = __builtin__.property(_get_interval_high_bw)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('min_bw', min_bw), ('max_bw', max_bw), ('adjust_interval', adjust_interval), ('adjust_threshold', adjust_threshold), ('interval_high_bw', interval_high_bw), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_overflow_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/bandwidth/auto-bandwidth/overflow/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Config information for MPLS overflow bandwidth
adjustment
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__overflow_threshold','__trigger_event_count',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__overflow_threshold = 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="overflow-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    self.__trigger_event_count = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="trigger-event-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'bandwidth', 'auto-bandwidth', 'overflow', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/overflow/config/enabled (boolean)

    YANG Description: enables mpls lsp bandwidth overflow
adjustment on the lsp
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/overflow/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: enables mpls lsp bandwidth overflow
adjustment on the lsp
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_overflow_threshold(self):
    """
    Getter method for overflow_threshold, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/overflow/config/overflow_threshold (oc-types:percentage)

    YANG Description: bandwidth percentage change to trigger
an overflow event
    """
    return self.__overflow_threshold
      
  def _set_overflow_threshold(self, v, load=False):
    """
    Setter method for overflow_threshold, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/overflow/config/overflow_threshold (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_overflow_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_overflow_threshold() directly.

    YANG Description: bandwidth percentage change to trigger
an overflow event
    """
    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="overflow-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """overflow_threshold 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="overflow-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__overflow_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_overflow_threshold(self):
    self.__overflow_threshold = 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="overflow-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)


  def _get_trigger_event_count(self):
    """
    Getter method for trigger_event_count, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/overflow/config/trigger_event_count (uint16)

    YANG Description: number of consecutive overflow sample
events needed to trigger an overflow adjustment
    """
    return self.__trigger_event_count
      
  def _set_trigger_event_count(self, v, load=False):
    """
    Setter method for trigger_event_count, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/overflow/config/trigger_event_count (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_trigger_event_count is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_trigger_event_count() directly.

    YANG Description: number of consecutive overflow sample
events needed to trigger an overflow adjustment
    """
    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="trigger-event-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """trigger_event_count 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="trigger-event-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__trigger_event_count = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_trigger_event_count(self):
    self.__trigger_event_count = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="trigger-event-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)
  overflow_threshold = __builtin__.property(_get_overflow_threshold, _set_overflow_threshold)
  trigger_event_count = __builtin__.property(_get_trigger_event_count, _set_trigger_event_count)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('overflow_threshold', overflow_threshold), ('trigger_event_count', trigger_event_count), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_overflow_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/bandwidth/auto-bandwidth/overflow/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Config information for MPLS overflow bandwidth
adjustment
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__overflow_threshold','__trigger_event_count',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__overflow_threshold = 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="overflow-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__trigger_event_count = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="trigger-event-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'bandwidth', 'auto-bandwidth', 'overflow', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/overflow/state/enabled (boolean)

    YANG Description: enables mpls lsp bandwidth overflow
adjustment on the lsp
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/overflow/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: enables mpls lsp bandwidth overflow
adjustment on the lsp
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_overflow_threshold(self):
    """
    Getter method for overflow_threshold, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/overflow/state/overflow_threshold (oc-types:percentage)

    YANG Description: bandwidth percentage change to trigger
an overflow event
    """
    return self.__overflow_threshold
      
  def _set_overflow_threshold(self, v, load=False):
    """
    Setter method for overflow_threshold, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/overflow/state/overflow_threshold (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_overflow_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_overflow_threshold() directly.

    YANG Description: bandwidth percentage change to trigger
an overflow event
    """
    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="overflow-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """overflow_threshold 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="overflow-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__overflow_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_overflow_threshold(self):
    self.__overflow_threshold = 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="overflow-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_trigger_event_count(self):
    """
    Getter method for trigger_event_count, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/overflow/state/trigger_event_count (uint16)

    YANG Description: number of consecutive overflow sample
events needed to trigger an overflow adjustment
    """
    return self.__trigger_event_count
      
  def _set_trigger_event_count(self, v, load=False):
    """
    Setter method for trigger_event_count, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/overflow/state/trigger_event_count (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_trigger_event_count is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_trigger_event_count() directly.

    YANG Description: number of consecutive overflow sample
events needed to trigger an overflow adjustment
    """
    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="trigger-event-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """trigger_event_count 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="trigger-event-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__trigger_event_count = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_trigger_event_count(self):
    self.__trigger_event_count = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="trigger-event-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  enabled = __builtin__.property(_get_enabled)
  overflow_threshold = __builtin__.property(_get_overflow_threshold)
  trigger_event_count = __builtin__.property(_get_trigger_event_count)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('overflow_threshold', overflow_threshold), ('trigger_event_count', trigger_event_count), ])


class yc_overflow_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_overflow(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/bandwidth/auto-bandwidth/overflow. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: configuration of MPLS overflow bandwidth
adjustement for the LSP
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'overflow'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_overflow_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_overflow_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'bandwidth', 'auto-bandwidth', 'overflow']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/overflow/config (container)

    YANG Description: Config information for MPLS overflow bandwidth
adjustment
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/overflow/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: Config information for MPLS overflow bandwidth
adjustment
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_overflow_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_overflow_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_overflow_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/overflow/state (container)

    YANG Description: Config information for MPLS overflow bandwidth
adjustment
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/overflow/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: Config information for MPLS overflow bandwidth
adjustment
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_overflow_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_overflow_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_overflow_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_underflow_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/bandwidth/auto-bandwidth/underflow/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Config information for MPLS underflow bandwidth
adjustment
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__underflow_threshold','__trigger_event_count',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__underflow_threshold = 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="underflow-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    self.__trigger_event_count = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="trigger-event-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'bandwidth', 'auto-bandwidth', 'underflow', 'config']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/underflow/config/enabled (boolean)

    YANG Description: enables bandwidth underflow
adjustment on the lsp
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/underflow/config/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: enables bandwidth underflow
adjustment on the lsp
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_underflow_threshold(self):
    """
    Getter method for underflow_threshold, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/underflow/config/underflow_threshold (oc-types:percentage)

    YANG Description: bandwidth percentage change to trigger
and underflow event
    """
    return self.__underflow_threshold
      
  def _set_underflow_threshold(self, v, load=False):
    """
    Setter method for underflow_threshold, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/underflow/config/underflow_threshold (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_underflow_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_underflow_threshold() directly.

    YANG Description: bandwidth percentage change to trigger
and underflow event
    """
    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="underflow-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """underflow_threshold 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="underflow-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)""",
        })

    self.__underflow_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_underflow_threshold(self):
    self.__underflow_threshold = 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="underflow-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=True)


  def _get_trigger_event_count(self):
    """
    Getter method for trigger_event_count, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/underflow/config/trigger_event_count (uint16)

    YANG Description: number of consecutive underflow sample
events needed to trigger an underflow adjustment
    """
    return self.__trigger_event_count
      
  def _set_trigger_event_count(self, v, load=False):
    """
    Setter method for trigger_event_count, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/underflow/config/trigger_event_count (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_trigger_event_count is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_trigger_event_count() directly.

    YANG Description: number of consecutive underflow sample
events needed to trigger an underflow adjustment
    """
    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="trigger-event-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """trigger_event_count 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="trigger-event-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__trigger_event_count = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_trigger_event_count(self):
    self.__trigger_event_count = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="trigger-event-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

  enabled = __builtin__.property(_get_enabled, _set_enabled)
  underflow_threshold = __builtin__.property(_get_underflow_threshold, _set_underflow_threshold)
  trigger_event_count = __builtin__.property(_get_trigger_event_count, _set_trigger_event_count)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('underflow_threshold', underflow_threshold), ('trigger_event_count', trigger_event_count), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_underflow_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/bandwidth/auto-bandwidth/underflow/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State information for MPLS underflow bandwidth
adjustment
  """
  __slots__ = ('_path_helper', '_extmethods', '__enabled','__underflow_threshold','__trigger_event_count',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__underflow_threshold = 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="underflow-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    self.__trigger_event_count = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="trigger-event-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'bandwidth', 'auto-bandwidth', 'underflow', 'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/underflow/state/enabled (boolean)

    YANG Description: enables bandwidth underflow
adjustment on the lsp
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/underflow/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: enables bandwidth underflow
adjustment on the lsp
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__enabled = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_underflow_threshold(self):
    """
    Getter method for underflow_threshold, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/underflow/state/underflow_threshold (oc-types:percentage)

    YANG Description: bandwidth percentage change to trigger
and underflow event
    """
    return self.__underflow_threshold
      
  def _set_underflow_threshold(self, v, load=False):
    """
    Setter method for underflow_threshold, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/underflow/state/underflow_threshold (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_underflow_threshold is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_underflow_threshold() directly.

    YANG Description: bandwidth percentage change to trigger
and underflow event
    """
    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="underflow-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """underflow_threshold 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="underflow-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)""",
        })

    self.__underflow_threshold = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_underflow_threshold(self):
    self.__underflow_threshold = 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="underflow-threshold", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:percentage', is_config=False)


  def _get_trigger_event_count(self):
    """
    Getter method for trigger_event_count, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/underflow/state/trigger_event_count (uint16)

    YANG Description: number of consecutive underflow sample
events needed to trigger an underflow adjustment
    """
    return self.__trigger_event_count
      
  def _set_trigger_event_count(self, v, load=False):
    """
    Setter method for trigger_event_count, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/underflow/state/trigger_event_count (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_trigger_event_count is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_trigger_event_count() directly.

    YANG Description: number of consecutive underflow sample
events needed to trigger an underflow adjustment
    """
    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="trigger-event-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """trigger_event_count 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="trigger-event-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__trigger_event_count = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_trigger_event_count(self):
    self.__trigger_event_count = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="trigger-event-count", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)

  enabled = __builtin__.property(_get_enabled)
  underflow_threshold = __builtin__.property(_get_underflow_threshold)
  trigger_event_count = __builtin__.property(_get_trigger_event_count)


  _pyangbind_elements = OrderedDict([('enabled', enabled), ('underflow_threshold', underflow_threshold), ('trigger_event_count', trigger_event_count), ])


class yc_underflow_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_underflow(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/bandwidth/auto-bandwidth/underflow. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: configuration of MPLS underflow bandwidth
adjustement for the LSP
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'underflow'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_underflow_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_underflow_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'bandwidth', 'auto-bandwidth', 'underflow']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/underflow/config (container)

    YANG Description: Config information for MPLS underflow bandwidth
adjustment
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/underflow/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: Config information for MPLS underflow bandwidth
adjustment
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_underflow_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_underflow_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_underflow_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/underflow/state (container)

    YANG Description: State information for MPLS underflow bandwidth
adjustment
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/underflow/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 MPLS underflow bandwidth
adjustment
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_underflow_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_underflow_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_underflow_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_auto_bandwidth_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/bandwidth/auto-bandwidth. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Parameters related to auto-bandwidth
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__overflow','__underflow',)

  _yang_name = 'auto-bandwidth'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__overflow = YANGDynClass(base=yc_overflow_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_overflow, is_container='container', yang_name="overflow", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__underflow = YANGDynClass(base=yc_underflow_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_underflow, is_container='container', yang_name="underflow", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'bandwidth', 'auto-bandwidth']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/config (container)

    YANG Description: Configuration parameters relating to MPLS
auto-bandwidth on the tunnel.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/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 MPLS
auto-bandwidth on the tunnel.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/state (container)

    YANG Description: State parameters relating to MPLS
auto-bandwidth on the tunnel.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/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 parameters relating to MPLS
auto-bandwidth on the tunnel.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_overflow(self):
    """
    Getter method for overflow, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/overflow (container)

    YANG Description: configuration of MPLS overflow bandwidth
adjustement for the LSP
    """
    return self.__overflow
      
  def _set_overflow(self, v, load=False):
    """
    Setter method for overflow, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/overflow (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_overflow is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_overflow() directly.

    YANG Description: configuration of MPLS overflow bandwidth
adjustement for the LSP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_overflow_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_overflow, is_container='container', yang_name="overflow", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """overflow must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_overflow_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_overflow, is_container='container', yang_name="overflow", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__overflow = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_overflow(self):
    self.__overflow = YANGDynClass(base=yc_overflow_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_overflow, is_container='container', yang_name="overflow", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_underflow(self):
    """
    Getter method for underflow, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/underflow (container)

    YANG Description: configuration of MPLS underflow bandwidth
adjustement for the LSP
    """
    return self.__underflow
      
  def _set_underflow(self, v, load=False):
    """
    Setter method for underflow, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth/underflow (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_underflow is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_underflow() directly.

    YANG Description: configuration of MPLS underflow bandwidth
adjustement for the LSP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_underflow_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_underflow, is_container='container', yang_name="underflow", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """underflow must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_underflow_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_underflow, is_container='container', yang_name="underflow", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__underflow = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_underflow(self):
    self.__underflow = YANGDynClass(base=yc_underflow_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth_underflow, is_container='container', yang_name="underflow", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  overflow = __builtin__.property(_get_overflow, _set_overflow)
  underflow = __builtin__.property(_get_underflow, _set_underflow)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('overflow', overflow), ('underflow', underflow), ])


class yc_bandwidth_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/bandwidth. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Bandwidth configuration for TE LSPs
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__auto_bandwidth',)

  _yang_name = 'bandwidth'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__auto_bandwidth = YANGDynClass(base=yc_auto_bandwidth_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth, is_container='container', yang_name="auto-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'bandwidth']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/config (container)

    YANG Description: Configuration parameters related to bandwidth on TE
tunnels:
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/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 related to bandwidth on TE
tunnels:
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/state (container)

    YANG Description: State parameters related to bandwidth
configuration of TE tunnels
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/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 parameters related to bandwidth
configuration of TE tunnels
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_auto_bandwidth(self):
    """
    Getter method for auto_bandwidth, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth (container)

    YANG Description: Parameters related to auto-bandwidth
    """
    return self.__auto_bandwidth
      
  def _set_auto_bandwidth(self, v, load=False):
    """
    Setter method for auto_bandwidth, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth/auto_bandwidth (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_auto_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_auto_bandwidth() directly.

    YANG Description: Parameters related to auto-bandwidth
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_auto_bandwidth_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth, is_container='container', yang_name="auto-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """auto_bandwidth must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_auto_bandwidth_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth, is_container='container', yang_name="auto-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__auto_bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_auto_bandwidth(self):
    self.__auto_bandwidth = YANGDynClass(base=yc_auto_bandwidth_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth_auto_bandwidth, is_container='container', yang_name="auto-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  auto_bandwidth = __builtin__.property(_get_auto_bandwidth, _set_auto_bandwidth)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('auto_bandwidth', auto_bandwidth), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for P2P LSPs
  """
  __slots__ = ('_path_helper', '_extmethods', '__destination',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__destination = 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}'}),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}|:))'}),], is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'config']

  def _get_destination(self):
    """
    Getter method for destination, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/config/destination (inet:ip-address)

    YANG Description: P2P tunnel destination address
    """
    return self.__destination
      
  def _set_destination(self, v, load=False):
    """
    Setter method for destination, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/config/destination (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination() directly.

    YANG Description: P2P tunnel destination address
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)""",
        })

    self.__destination = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination(self):
    self.__destination = 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}'}),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}|:))'}),], is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)

  destination = __builtin__.property(_get_destination, _set_destination)


  _pyangbind_elements = OrderedDict([('destination', destination), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters for P2P LSPs
  """
  __slots__ = ('_path_helper', '_extmethods', '__destination',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__destination = 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}'}),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}|:))'}),], is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'state']

  def _get_destination(self):
    """
    Getter method for destination, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/state/destination (inet:ip-address)

    YANG Description: P2P tunnel destination address
    """
    return self.__destination
      
  def _set_destination(self, v, load=False):
    """
    Setter method for destination, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/state/destination (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_destination is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_destination() directly.

    YANG Description: P2P tunnel destination address
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """destination must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)""",
        })

    self.__destination = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_destination(self):
    self.__destination = 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}'}),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}|:))'}),], is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)

  destination = __builtin__.property(_get_destination)


  _pyangbind_elements = OrderedDict([('destination', destination), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-primary-path/p2p-primary-path/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters related to paths
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__path_computation_method','__use_cspf','__cspf_tiebreaker','__path_computation_server','__path_control','__explicit_path_name','__preference','__setup_priority','__hold_priority','__retry_timer',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__path_computation_method = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LOCALLY_COMPUTED"), is_leaf=True, yang_name="path-computation-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__use_cspf = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-cspf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__cspf_tiebreaker = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'RANDOM': {}, 'LEAST_FILL': {}, 'MOST_FILL': {}},), default=six.text_type("RANDOM"), is_leaf=True, yang_name="cspf-tiebreaker", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='cspf-tie-breaking', is_config=True)
    self.__path_computation_server = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-computation-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__path_control = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PCE_DELEGATED': {}, 'PCC_CONTROLLED': {}, 'PCC_REPORT_ONLY': {}},), is_leaf=True, yang_name="path-control", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pcep:lsp-control-type', is_config=True)
    self.__explicit_path_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="explicit-path-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    self.__retry_timer = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..600']}), is_leaf=True, yang_name="retry-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-primary-path', 'p2p-primary-path', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/name (string)

    YANG Description: Path name
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/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: Path name
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_path_computation_method(self):
    """
    Getter method for path_computation_method, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/path_computation_method (identityref)

    YANG Description: The method used for computing the path, either
locally computed, queried from a server or not
computed at all (explicitly configured).
    """
    return self.__path_computation_method
      
  def _set_path_computation_method(self, v, load=False):
    """
    Setter method for path_computation_method, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/path_computation_method (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_computation_method is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_computation_method() directly.

    YANG Description: The method used for computing the path, either
locally computed, queried from a server or not
computed at all (explicitly 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={'LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LOCALLY_COMPUTED"), is_leaf=True, yang_name="path-computation-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_computation_method must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LOCALLY_COMPUTED"), is_leaf=True, yang_name="path-computation-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__path_computation_method = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_computation_method(self):
    self.__path_computation_method = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LOCALLY_COMPUTED"), is_leaf=True, yang_name="path-computation-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_use_cspf(self):
    """
    Getter method for use_cspf, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/use_cspf (boolean)

    YANG Description: Flag to enable CSPF for locally computed LSPs
    """
    return self.__use_cspf
      
  def _set_use_cspf(self, v, load=False):
    """
    Setter method for use_cspf, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/use_cspf (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_use_cspf is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_use_cspf() directly.

    YANG Description: Flag to enable CSPF for locally computed LSPs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="use-cspf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """use_cspf must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-cspf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__use_cspf = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_use_cspf(self):
    self.__use_cspf = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-cspf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_cspf_tiebreaker(self):
    """
    Getter method for cspf_tiebreaker, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/cspf_tiebreaker (cspf-tie-breaking)

    YANG Description: Determine the tie-breaking method to choose between
equally desirable paths during CSFP computation
    """
    return self.__cspf_tiebreaker
      
  def _set_cspf_tiebreaker(self, v, load=False):
    """
    Setter method for cspf_tiebreaker, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/cspf_tiebreaker (cspf-tie-breaking)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cspf_tiebreaker is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cspf_tiebreaker() directly.

    YANG Description: Determine the tie-breaking method to choose between
equally desirable paths during CSFP computation
    """
    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={'RANDOM': {}, 'LEAST_FILL': {}, 'MOST_FILL': {}},), default=six.text_type("RANDOM"), is_leaf=True, yang_name="cspf-tiebreaker", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='cspf-tie-breaking', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cspf_tiebreaker must be of a type compatible with cspf-tie-breaking""",
          'defined-type': "openconfig-network-instance:cspf-tie-breaking",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'RANDOM': {}, 'LEAST_FILL': {}, 'MOST_FILL': {}},), default=six.text_type("RANDOM"), is_leaf=True, yang_name="cspf-tiebreaker", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='cspf-tie-breaking', is_config=True)""",
        })

    self.__cspf_tiebreaker = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cspf_tiebreaker(self):
    self.__cspf_tiebreaker = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'RANDOM': {}, 'LEAST_FILL': {}, 'MOST_FILL': {}},), default=six.text_type("RANDOM"), is_leaf=True, yang_name="cspf-tiebreaker", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='cspf-tie-breaking', is_config=True)


  def _get_path_computation_server(self):
    """
    Getter method for path_computation_server, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/path_computation_server (leafref)

    YANG Description: Reference to the address of a previously configured
external path computation server.
    """
    return self.__path_computation_server
      
  def _set_path_computation_server(self, v, load=False):
    """
    Setter method for path_computation_server, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/path_computation_server (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_computation_server is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_computation_server() directly.

    YANG Description: Reference to the address of a previously configured
external path computation server.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="path-computation-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_computation_server must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-computation-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__path_computation_server = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_computation_server(self):
    self.__path_computation_server = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-computation-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_path_control(self):
    """
    Getter method for path_control, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/path_control (oc-pcep:lsp-control-type)

    YANG Description: Set the LSP path control mode as PCE_DELEGATED
PCC_CONTROLLED or PCC_REPORT_ONLY information
state to the PCE.
    """
    return self.__path_control
      
  def _set_path_control(self, v, load=False):
    """
    Setter method for path_control, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/path_control (oc-pcep:lsp-control-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_control is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_control() directly.

    YANG Description: Set the LSP path control mode as PCE_DELEGATED
PCC_CONTROLLED or PCC_REPORT_ONLY information
state to the PCE.
    """
    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={'PCE_DELEGATED': {}, 'PCC_CONTROLLED': {}, 'PCC_REPORT_ONLY': {}},), is_leaf=True, yang_name="path-control", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pcep:lsp-control-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_control must be of a type compatible with oc-pcep:lsp-control-type""",
          'defined-type': "oc-pcep:lsp-control-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PCE_DELEGATED': {}, 'PCC_CONTROLLED': {}, 'PCC_REPORT_ONLY': {}},), is_leaf=True, yang_name="path-control", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pcep:lsp-control-type', is_config=True)""",
        })

    self.__path_control = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_control(self):
    self.__path_control = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PCE_DELEGATED': {}, 'PCC_CONTROLLED': {}, 'PCC_REPORT_ONLY': {}},), is_leaf=True, yang_name="path-control", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pcep:lsp-control-type', is_config=True)


  def _get_explicit_path_name(self):
    """
    Getter method for explicit_path_name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/explicit_path_name (leafref)

    YANG Description: reference to a defined path
    """
    return self.__explicit_path_name
      
  def _set_explicit_path_name(self, v, load=False):
    """
    Setter method for explicit_path_name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/explicit_path_name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_explicit_path_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_explicit_path_name() directly.

    YANG Description: reference to a defined path
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="explicit-path-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """explicit_path_name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="explicit-path-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__explicit_path_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_explicit_path_name(self):
    self.__explicit_path_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="explicit-path-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_preference(self):
    """
    Getter method for preference, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/preference (uint8)

    YANG Description: Specifies a preference for this path. The lower the
number higher the preference
    """
    return self.__preference
      
  def _set_preference(self, v, load=False):
    """
    Setter method for preference, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/preference (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_preference is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_preference() directly.

    YANG Description: Specifies a preference for this path. The lower the
number higher the preference
    """
    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': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """preference 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': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
        })

    self.__preference = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_preference(self):
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)


  def _get_setup_priority(self):
    """
    Getter method for setup_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/setup_priority (uint8)

    YANG Description: RSVP-TE preemption priority during LSP setup, lower is
higher priority; default 7 indicates that LSP will not
preempt established LSPs during setup
    """
    return self.__setup_priority
      
  def _set_setup_priority(self, v, load=False):
    """
    Setter method for setup_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/setup_priority (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_setup_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_setup_priority() directly.

    YANG Description: RSVP-TE preemption priority during LSP setup, lower is
higher priority; default 7 indicates that LSP will not
preempt established LSPs during setup
    """
    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']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """setup_priority 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..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
        })

    self.__setup_priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_setup_priority(self):
    self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)


  def _get_hold_priority(self):
    """
    Getter method for hold_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/hold_priority (uint8)

    YANG Description: preemption priority once the LSP is established,
lower is higher priority; default 0 indicates other LSPs
will not preempt the LSPs once established
    """
    return self.__hold_priority
      
  def _set_hold_priority(self, v, load=False):
    """
    Setter method for hold_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/hold_priority (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hold_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hold_priority() directly.

    YANG Description: preemption priority once the LSP is established,
lower is higher priority; default 0 indicates other LSPs
will not preempt the LSPs once established
    """
    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']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hold_priority 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..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
        })

    self.__hold_priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hold_priority(self):
    self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)


  def _get_retry_timer(self):
    """
    Getter method for retry_timer, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/retry_timer (uint16)

    YANG Description: sets the time between attempts to establish the
LSP
    """
    return self.__retry_timer
      
  def _set_retry_timer(self, v, load=False):
    """
    Setter method for retry_timer, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/retry_timer (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_retry_timer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_retry_timer() directly.

    YANG Description: sets the time between attempts to establish the
LSP
    """
    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': ['1..600']}), is_leaf=True, yang_name="retry-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """retry_timer must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..600']}), is_leaf=True, yang_name="retry-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__retry_timer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_retry_timer(self):
    self.__retry_timer = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..600']}), is_leaf=True, yang_name="retry-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  path_computation_method = __builtin__.property(_get_path_computation_method, _set_path_computation_method)
  use_cspf = __builtin__.property(_get_use_cspf, _set_use_cspf)
  cspf_tiebreaker = __builtin__.property(_get_cspf_tiebreaker, _set_cspf_tiebreaker)
  path_computation_server = __builtin__.property(_get_path_computation_server, _set_path_computation_server)
  path_control = __builtin__.property(_get_path_control, _set_path_control)
  explicit_path_name = __builtin__.property(_get_explicit_path_name, _set_explicit_path_name)
  preference = __builtin__.property(_get_preference, _set_preference)
  setup_priority = __builtin__.property(_get_setup_priority, _set_setup_priority)
  hold_priority = __builtin__.property(_get_hold_priority, _set_hold_priority)
  retry_timer = __builtin__.property(_get_retry_timer, _set_retry_timer)


  _pyangbind_elements = OrderedDict([('name', name), ('path_computation_method', path_computation_method), ('use_cspf', use_cspf), ('cspf_tiebreaker', cspf_tiebreaker), ('path_computation_server', path_computation_server), ('path_control', path_control), ('explicit_path_name', explicit_path_name), ('preference', preference), ('setup_priority', setup_priority), ('hold_priority', hold_priority), ('retry_timer', retry_timer), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-primary-path/p2p-primary-path/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters related to paths
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__path_computation_method','__use_cspf','__cspf_tiebreaker','__path_computation_server','__path_control','__explicit_path_name','__preference','__setup_priority','__hold_priority','__retry_timer','__associated_rsvp_sessions','__spf_metric','__cspf_metric',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__path_computation_method = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LOCALLY_COMPUTED"), is_leaf=True, yang_name="path-computation-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__use_cspf = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-cspf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__cspf_tiebreaker = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'RANDOM': {}, 'LEAST_FILL': {}, 'MOST_FILL': {}},), default=six.text_type("RANDOM"), is_leaf=True, yang_name="cspf-tiebreaker", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='cspf-tie-breaking', is_config=False)
    self.__path_computation_server = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-computation-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__path_control = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PCE_DELEGATED': {}, 'PCC_CONTROLLED': {}, 'PCC_REPORT_ONLY': {}},), is_leaf=True, yang_name="path-control", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pcep:lsp-control-type', is_config=False)
    self.__explicit_path_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="explicit-path-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__retry_timer = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..600']}), is_leaf=True, yang_name="retry-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__associated_rsvp_sessions = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="associated-rsvp-sessions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__spf_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="spf-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__cspf_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cspf-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-primary-path', 'p2p-primary-path', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/name (string)

    YANG Description: Path name
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/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: Path name
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_path_computation_method(self):
    """
    Getter method for path_computation_method, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/path_computation_method (identityref)

    YANG Description: The method used for computing the path, either
locally computed, queried from a server or not
computed at all (explicitly configured).
    """
    return self.__path_computation_method
      
  def _set_path_computation_method(self, v, load=False):
    """
    Setter method for path_computation_method, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/path_computation_method (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_computation_method is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_computation_method() directly.

    YANG Description: The method used for computing the path, either
locally computed, queried from a server or not
computed at all (explicitly 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={'LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LOCALLY_COMPUTED"), is_leaf=True, yang_name="path-computation-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_computation_method must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LOCALLY_COMPUTED"), is_leaf=True, yang_name="path-computation-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__path_computation_method = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_computation_method(self):
    self.__path_computation_method = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LOCALLY_COMPUTED"), is_leaf=True, yang_name="path-computation-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_use_cspf(self):
    """
    Getter method for use_cspf, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/use_cspf (boolean)

    YANG Description: Flag to enable CSPF for locally computed LSPs
    """
    return self.__use_cspf
      
  def _set_use_cspf(self, v, load=False):
    """
    Setter method for use_cspf, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/use_cspf (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_use_cspf is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_use_cspf() directly.

    YANG Description: Flag to enable CSPF for locally computed LSPs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="use-cspf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """use_cspf must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-cspf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__use_cspf = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_use_cspf(self):
    self.__use_cspf = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-cspf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_cspf_tiebreaker(self):
    """
    Getter method for cspf_tiebreaker, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/cspf_tiebreaker (cspf-tie-breaking)

    YANG Description: Determine the tie-breaking method to choose between
equally desirable paths during CSFP computation
    """
    return self.__cspf_tiebreaker
      
  def _set_cspf_tiebreaker(self, v, load=False):
    """
    Setter method for cspf_tiebreaker, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/cspf_tiebreaker (cspf-tie-breaking)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cspf_tiebreaker is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cspf_tiebreaker() directly.

    YANG Description: Determine the tie-breaking method to choose between
equally desirable paths during CSFP computation
    """
    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={'RANDOM': {}, 'LEAST_FILL': {}, 'MOST_FILL': {}},), default=six.text_type("RANDOM"), is_leaf=True, yang_name="cspf-tiebreaker", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='cspf-tie-breaking', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cspf_tiebreaker must be of a type compatible with cspf-tie-breaking""",
          'defined-type': "openconfig-network-instance:cspf-tie-breaking",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'RANDOM': {}, 'LEAST_FILL': {}, 'MOST_FILL': {}},), default=six.text_type("RANDOM"), is_leaf=True, yang_name="cspf-tiebreaker", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='cspf-tie-breaking', is_config=False)""",
        })

    self.__cspf_tiebreaker = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cspf_tiebreaker(self):
    self.__cspf_tiebreaker = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'RANDOM': {}, 'LEAST_FILL': {}, 'MOST_FILL': {}},), default=six.text_type("RANDOM"), is_leaf=True, yang_name="cspf-tiebreaker", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='cspf-tie-breaking', is_config=False)


  def _get_path_computation_server(self):
    """
    Getter method for path_computation_server, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/path_computation_server (leafref)

    YANG Description: Reference to the address of a previously configured
external path computation server.
    """
    return self.__path_computation_server
      
  def _set_path_computation_server(self, v, load=False):
    """
    Setter method for path_computation_server, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/path_computation_server (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_computation_server is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_computation_server() directly.

    YANG Description: Reference to the address of a previously configured
external path computation server.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="path-computation-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_computation_server must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-computation-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__path_computation_server = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_computation_server(self):
    self.__path_computation_server = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-computation-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_path_control(self):
    """
    Getter method for path_control, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/path_control (oc-pcep:lsp-control-type)

    YANG Description: Set the LSP path control mode as PCE_DELEGATED
PCC_CONTROLLED or PCC_REPORT_ONLY information
state to the PCE.
    """
    return self.__path_control
      
  def _set_path_control(self, v, load=False):
    """
    Setter method for path_control, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/path_control (oc-pcep:lsp-control-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_control is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_control() directly.

    YANG Description: Set the LSP path control mode as PCE_DELEGATED
PCC_CONTROLLED or PCC_REPORT_ONLY information
state to the PCE.
    """
    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={'PCE_DELEGATED': {}, 'PCC_CONTROLLED': {}, 'PCC_REPORT_ONLY': {}},), is_leaf=True, yang_name="path-control", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pcep:lsp-control-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_control must be of a type compatible with oc-pcep:lsp-control-type""",
          'defined-type': "oc-pcep:lsp-control-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PCE_DELEGATED': {}, 'PCC_CONTROLLED': {}, 'PCC_REPORT_ONLY': {}},), is_leaf=True, yang_name="path-control", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pcep:lsp-control-type', is_config=False)""",
        })

    self.__path_control = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_control(self):
    self.__path_control = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PCE_DELEGATED': {}, 'PCC_CONTROLLED': {}, 'PCC_REPORT_ONLY': {}},), is_leaf=True, yang_name="path-control", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pcep:lsp-control-type', is_config=False)


  def _get_explicit_path_name(self):
    """
    Getter method for explicit_path_name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/explicit_path_name (leafref)

    YANG Description: reference to a defined path
    """
    return self.__explicit_path_name
      
  def _set_explicit_path_name(self, v, load=False):
    """
    Setter method for explicit_path_name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/explicit_path_name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_explicit_path_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_explicit_path_name() directly.

    YANG Description: reference to a defined path
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="explicit-path-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """explicit_path_name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="explicit-path-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__explicit_path_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_explicit_path_name(self):
    self.__explicit_path_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="explicit-path-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_preference(self):
    """
    Getter method for preference, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/preference (uint8)

    YANG Description: Specifies a preference for this path. The lower the
number higher the preference
    """
    return self.__preference
      
  def _set_preference(self, v, load=False):
    """
    Setter method for preference, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/preference (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_preference is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_preference() directly.

    YANG Description: Specifies a preference for this path. The lower the
number higher the preference
    """
    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': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """preference 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': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__preference = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_preference(self):
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_setup_priority(self):
    """
    Getter method for setup_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/setup_priority (uint8)

    YANG Description: RSVP-TE preemption priority during LSP setup, lower is
higher priority; default 7 indicates that LSP will not
preempt established LSPs during setup
    """
    return self.__setup_priority
      
  def _set_setup_priority(self, v, load=False):
    """
    Setter method for setup_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/setup_priority (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_setup_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_setup_priority() directly.

    YANG Description: RSVP-TE preemption priority during LSP setup, lower is
higher priority; default 7 indicates that LSP will not
preempt established LSPs during setup
    """
    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']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """setup_priority 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..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__setup_priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_setup_priority(self):
    self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_hold_priority(self):
    """
    Getter method for hold_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/hold_priority (uint8)

    YANG Description: preemption priority once the LSP is established,
lower is higher priority; default 0 indicates other LSPs
will not preempt the LSPs once established
    """
    return self.__hold_priority
      
  def _set_hold_priority(self, v, load=False):
    """
    Setter method for hold_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/hold_priority (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hold_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hold_priority() directly.

    YANG Description: preemption priority once the LSP is established,
lower is higher priority; default 0 indicates other LSPs
will not preempt the LSPs once established
    """
    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']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hold_priority 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..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__hold_priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hold_priority(self):
    self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_retry_timer(self):
    """
    Getter method for retry_timer, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/retry_timer (uint16)

    YANG Description: sets the time between attempts to establish the
LSP
    """
    return self.__retry_timer
      
  def _set_retry_timer(self, v, load=False):
    """
    Setter method for retry_timer, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/retry_timer (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_retry_timer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_retry_timer() directly.

    YANG Description: sets the time between attempts to establish the
LSP
    """
    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': ['1..600']}), is_leaf=True, yang_name="retry-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """retry_timer must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..600']}), is_leaf=True, yang_name="retry-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__retry_timer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_retry_timer(self):
    self.__retry_timer = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..600']}), is_leaf=True, yang_name="retry-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_associated_rsvp_sessions(self):
    """
    Getter method for associated_rsvp_sessions, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/associated_rsvp_sessions (leafref)

    YANG Description: If the signalling protocol specified for this path is
RSVP-TE, this leaf-list provides a reference to the associated
sessions within the RSVP-TE protocol sessions list, such
that details of the signaling can be retrieved. More than
one session may exist during re-signalling such as
make-before-break.
    """
    return self.__associated_rsvp_sessions
      
  def _set_associated_rsvp_sessions(self, v, load=False):
    """
    Setter method for associated_rsvp_sessions, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/associated_rsvp_sessions (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_associated_rsvp_sessions is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_associated_rsvp_sessions() directly.

    YANG Description: If the signalling protocol specified for this path is
RSVP-TE, this leaf-list provides a reference to the associated
sessions within the RSVP-TE protocol sessions list, such
that details of the signaling can be retrieved. More than
one session may exist during re-signalling such as
make-before-break.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="associated-rsvp-sessions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """associated_rsvp_sessions must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="associated-rsvp-sessions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__associated_rsvp_sessions = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_associated_rsvp_sessions(self):
    self.__associated_rsvp_sessions = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="associated-rsvp-sessions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_spf_metric(self):
    """
    Getter method for spf_metric, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/spf_metric (uint64)

    YANG Description: The IGP metric of the shortest path to the LSP destination.
This value is used to compare the current metric of the
constrained path to the shortest path that is available in
the network topology.
    """
    return self.__spf_metric
      
  def _set_spf_metric(self, v, load=False):
    """
    Setter method for spf_metric, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/spf_metric (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_spf_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_spf_metric() directly.

    YANG Description: The IGP metric of the shortest path to the LSP destination.
This value is used to compare the current metric of the
constrained path to the shortest path that is available in
the network topology.
    """
    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="spf-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """spf_metric 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="spf-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__spf_metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_spf_metric(self):
    self.__spf_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="spf-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_cspf_metric(self):
    """
    Getter method for cspf_metric, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/cspf_metric (uint64)

    YANG Description: The IGP metric of the path currently used by the LSP.
This value is used to represent the metric of the path
used by the LSP following the execution of the CSPF
algorithm and signalling of the LSP.
    """
    return self.__cspf_metric
      
  def _set_cspf_metric(self, v, load=False):
    """
    Setter method for cspf_metric, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state/cspf_metric (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cspf_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cspf_metric() directly.

    YANG Description: The IGP metric of the path currently used by the LSP.
This value is used to represent the metric of the path
used by the LSP following the execution of the CSPF
algorithm and signalling of the LSP.
    """
    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="cspf-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cspf_metric 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="cspf-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__cspf_metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cspf_metric(self):
    self.__cspf_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cspf-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)

  name = __builtin__.property(_get_name)
  path_computation_method = __builtin__.property(_get_path_computation_method)
  use_cspf = __builtin__.property(_get_use_cspf)
  cspf_tiebreaker = __builtin__.property(_get_cspf_tiebreaker)
  path_computation_server = __builtin__.property(_get_path_computation_server)
  path_control = __builtin__.property(_get_path_control)
  explicit_path_name = __builtin__.property(_get_explicit_path_name)
  preference = __builtin__.property(_get_preference)
  setup_priority = __builtin__.property(_get_setup_priority)
  hold_priority = __builtin__.property(_get_hold_priority)
  retry_timer = __builtin__.property(_get_retry_timer)
  associated_rsvp_sessions = __builtin__.property(_get_associated_rsvp_sessions)
  spf_metric = __builtin__.property(_get_spf_metric)
  cspf_metric = __builtin__.property(_get_cspf_metric)


  _pyangbind_elements = OrderedDict([('name', name), ('path_computation_method', path_computation_method), ('use_cspf', use_cspf), ('cspf_tiebreaker', cspf_tiebreaker), ('path_computation_server', path_computation_server), ('path_control', path_control), ('explicit_path_name', explicit_path_name), ('preference', preference), ('setup_priority', setup_priority), ('hold_priority', hold_priority), ('retry_timer', retry_timer), ('associated_rsvp_sessions', associated_rsvp_sessions), ('spf_metric', spf_metric), ('cspf_metric', cspf_metric), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_path_metric_bound_constraints_path_metric_bound_constraint_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-primary-path/p2p-primary-path/path-metric-bound-constraints/path-metric-bound-constraint/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to path metric bound constraints.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__metric_upper_bound',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__metric_upper_bound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="metric-upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-primary-path', 'p2p-primary-path', 'path-metric-bound-constraints', 'path-metric-bound-constraint', 'config']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/path_metric_bound_constraints/path_metric_bound_constraint/config/type (identityref)

    YANG Description: Identifies an entry in the list of metric-types
bound for the TE path.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/path_metric_bound_constraints/path_metric_bound_constraint/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: Identifies an entry in the list of metric-types
bound for the TE path.
    """
    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={'TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', 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={'TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_metric_upper_bound(self):
    """
    Getter method for metric_upper_bound, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/path_metric_bound_constraints/path_metric_bound_constraint/config/metric_upper_bound (uint64)

    YANG Description: Upper bound on end-to-end path metric. A zero indicate
an unbounded upper limit for the specific metric-type.
    """
    return self.__metric_upper_bound
      
  def _set_metric_upper_bound(self, v, load=False):
    """
    Setter method for metric_upper_bound, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/path_metric_bound_constraints/path_metric_bound_constraint/config/metric_upper_bound (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric_upper_bound is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric_upper_bound() directly.

    YANG Description: Upper bound on end-to-end path metric. A zero indicate
an unbounded upper limit for the specific metric-type.
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="metric-upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric_upper_bound 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), default=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="metric-upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=True)""",
        })

    self.__metric_upper_bound = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric_upper_bound(self):
    self.__metric_upper_bound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="metric-upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=True)

  type = __builtin__.property(_get_type, _set_type)
  metric_upper_bound = __builtin__.property(_get_metric_upper_bound, _set_metric_upper_bound)


  _pyangbind_elements = OrderedDict([('type', type), ('metric_upper_bound', metric_upper_bound), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_path_metric_bound_constraints_path_metric_bound_constraint_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-primary-path/p2p-primary-path/path-metric-bound-constraints/path-metric-bound-constraint/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 path metric bound constraints.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__metric_upper_bound',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__metric_upper_bound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="metric-upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-primary-path', 'p2p-primary-path', 'path-metric-bound-constraints', 'path-metric-bound-constraint', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/path_metric_bound_constraints/path_metric_bound_constraint/state/type (identityref)

    YANG Description: Identifies an entry in the list of metric-types
bound for the TE path.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/path_metric_bound_constraints/path_metric_bound_constraint/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: Identifies an entry in the list of metric-types
bound for the TE path.
    """
    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={'TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', 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={'TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_metric_upper_bound(self):
    """
    Getter method for metric_upper_bound, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/path_metric_bound_constraints/path_metric_bound_constraint/state/metric_upper_bound (uint64)

    YANG Description: Upper bound on end-to-end path metric. A zero indicate
an unbounded upper limit for the specific metric-type.
    """
    return self.__metric_upper_bound
      
  def _set_metric_upper_bound(self, v, load=False):
    """
    Setter method for metric_upper_bound, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/path_metric_bound_constraints/path_metric_bound_constraint/state/metric_upper_bound (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric_upper_bound is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric_upper_bound() directly.

    YANG Description: Upper bound on end-to-end path metric. A zero indicate
an unbounded upper limit for the specific metric-type.
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="metric-upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric_upper_bound 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), default=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="metric-upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__metric_upper_bound = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric_upper_bound(self):
    self.__metric_upper_bound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="metric-upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)

  type = __builtin__.property(_get_type)
  metric_upper_bound = __builtin__.property(_get_metric_upper_bound)


  _pyangbind_elements = OrderedDict([('type', type), ('metric_upper_bound', metric_upper_bound), ])


class yc_path_metric_bound_constraint_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_path_metric_bound_constraints_path_metric_bound_constraint(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-primary-path/p2p-primary-path/path-metric-bound-constraints/path-metric-bound-constraint. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A list of metric bounds that are applied as constraints to the LSP.
It act as a logical AND, hence all of them must be satisfied.
If not, it will return an error.
Constraints within this list may be applicable to either
the local CSPF process (where data is available to the local device)
or be communicated to a PCE for calculation.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__config','__state',)

  _yang_name = 'path-metric-bound-constraint'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_path_metric_bound_constraints_path_metric_bound_constraint_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_path_metric_bound_constraints_path_metric_bound_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-primary-path', 'p2p-primary-path', 'path-metric-bound-constraints', 'path-metric-bound-constraint']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/path_metric_bound_constraints/path_metric_bound_constraint/type (leafref)

    YANG Description: Identifies an entry in the list of metric-types
bound for the TE path.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/path_metric_bound_constraints/path_metric_bound_constraint/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: Identifies an entry in the list of metric-types
bound for the TE path.
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/path_metric_bound_constraints/path_metric_bound_constraint/config (container)

    YANG Description: Configuration parameters relating to path metric bound constraints.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/path_metric_bound_constraints/path_metric_bound_constraint/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 path metric bound constraints.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_path_metric_bound_constraints_path_metric_bound_constraint_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_path_metric_bound_constraints_path_metric_bound_constraint_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_path_metric_bound_constraints_path_metric_bound_constraint_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/path_metric_bound_constraints/path_metric_bound_constraint/state (container)

    YANG Description: Operational state parameters relating to path metric bound constraints.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/path_metric_bound_constraints/path_metric_bound_constraint/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 path metric bound constraints.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_path_metric_bound_constraints_path_metric_bound_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_path_metric_bound_constraints_path_metric_bound_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_path_metric_bound_constraints_path_metric_bound_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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)


  _pyangbind_elements = OrderedDict([('type', type), ('config', config), ('state', state), ])


class yc_path_metric_bound_constraints_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_path_metric_bound_constraints(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-primary-path/p2p-primary-path/path-metric-bound-constraints. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for the path metric bound constraints.
  """
  __slots__ = ('_path_helper', '_extmethods', '__path_metric_bound_constraint',)

  _yang_name = 'path-metric-bound-constraints'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__path_metric_bound_constraint = YANGDynClass(base=YANGListType("type",yc_path_metric_bound_constraint_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_path_metric_bound_constraints_path_metric_bound_constraint, yang_name="path-metric-bound-constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="path-metric-bound-constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-primary-path', 'p2p-primary-path', 'path-metric-bound-constraints']

  def _get_path_metric_bound_constraint(self):
    """
    Getter method for path_metric_bound_constraint, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/path_metric_bound_constraints/path_metric_bound_constraint (list)

    YANG Description: A list of metric bounds that are applied as constraints to the LSP.
It act as a logical AND, hence all of them must be satisfied.
If not, it will return an error.
Constraints within this list may be applicable to either
the local CSPF process (where data is available to the local device)
or be communicated to a PCE for calculation.
    """
    return self.__path_metric_bound_constraint
      
  def _set_path_metric_bound_constraint(self, v, load=False):
    """
    Setter method for path_metric_bound_constraint, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/path_metric_bound_constraints/path_metric_bound_constraint (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_metric_bound_constraint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_metric_bound_constraint() directly.

    YANG Description: A list of metric bounds that are applied as constraints to the LSP.
It act as a logical AND, hence all of them must be satisfied.
If not, it will return an error.
Constraints within this list may be applicable to either
the local CSPF process (where data is available to the local device)
or be communicated to a PCE for calculation.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("type",yc_path_metric_bound_constraint_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_path_metric_bound_constraints_path_metric_bound_constraint, yang_name="path-metric-bound-constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="path-metric-bound-constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_metric_bound_constraint must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("type",yc_path_metric_bound_constraint_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_path_metric_bound_constraints_path_metric_bound_constraint, yang_name="path-metric-bound-constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="path-metric-bound-constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__path_metric_bound_constraint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_metric_bound_constraint(self):
    self.__path_metric_bound_constraint = YANGDynClass(base=YANGListType("type",yc_path_metric_bound_constraint_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_path_metric_bound_constraints_path_metric_bound_constraint, yang_name="path-metric-bound-constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="path-metric-bound-constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  path_metric_bound_constraint = __builtin__.property(_get_path_metric_bound_constraint, _set_path_metric_bound_constraint)


  _pyangbind_elements = OrderedDict([('path_metric_bound_constraint', path_metric_bound_constraint), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_candidate_secondary_paths_candidate_secondary_path_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-primary-path/p2p-primary-path/candidate-secondary-paths/candidate-secondary-path/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 candidate
secondary path
  """
  __slots__ = ('_path_helper', '_extmethods', '__secondary_path','__priority',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__secondary_path = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="secondary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-primary-path', 'p2p-primary-path', 'candidate-secondary-paths', 'candidate-secondary-path', 'config']

  def _get_secondary_path(self):
    """
    Getter method for secondary_path, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/candidate_secondary_paths/candidate_secondary_path/config/secondary_path (leafref)

    YANG Description: A reference to the secondary path that should be utilised
when the containing primary path option is in use
    """
    return self.__secondary_path
      
  def _set_secondary_path(self, v, load=False):
    """
    Setter method for secondary_path, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/candidate_secondary_paths/candidate_secondary_path/config/secondary_path (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_secondary_path is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_secondary_path() directly.

    YANG Description: A reference to the secondary path that should be utilised
when the containing primary path option is in use
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="secondary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """secondary_path must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="secondary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__secondary_path = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_secondary_path(self):
    self.__secondary_path = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="secondary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_priority(self):
    """
    Getter method for priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/candidate_secondary_paths/candidate_secondary_path/config/priority (uint16)

    YANG Description: The priority of the specified secondary path option. Higher
priority options are less preferable - such that a secondary
path reference with a priority of 0 is the most preferred
    """
    return self.__priority
      
  def _set_priority(self, v, load=False):
    """
    Setter method for priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/candidate_secondary_paths/candidate_secondary_path/config/priority (uint16)
    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: The priority of the specified secondary path option. Higher
priority options are less preferable - such that a secondary
path reference with a priority of 0 is the most preferred
    """
    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="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """priority 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="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_priority(self):
    self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

  secondary_path = __builtin__.property(_get_secondary_path, _set_secondary_path)
  priority = __builtin__.property(_get_priority, _set_priority)


  _pyangbind_elements = OrderedDict([('secondary_path', secondary_path), ('priority', priority), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_candidate_secondary_paths_candidate_secondary_path_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-primary-path/p2p-primary-path/candidate-secondary-paths/candidate-secondary-path/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 candidate
secondary path
  """
  __slots__ = ('_path_helper', '_extmethods', '__secondary_path','__priority','__active',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__secondary_path = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="secondary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__active = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="active", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-primary-path', 'p2p-primary-path', 'candidate-secondary-paths', 'candidate-secondary-path', 'state']

  def _get_secondary_path(self):
    """
    Getter method for secondary_path, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/candidate_secondary_paths/candidate_secondary_path/state/secondary_path (leafref)

    YANG Description: A reference to the secondary path that should be utilised
when the containing primary path option is in use
    """
    return self.__secondary_path
      
  def _set_secondary_path(self, v, load=False):
    """
    Setter method for secondary_path, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/candidate_secondary_paths/candidate_secondary_path/state/secondary_path (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_secondary_path is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_secondary_path() directly.

    YANG Description: A reference to the secondary path that should be utilised
when the containing primary path option is in use
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="secondary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """secondary_path must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="secondary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__secondary_path = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_secondary_path(self):
    self.__secondary_path = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="secondary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_priority(self):
    """
    Getter method for priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/candidate_secondary_paths/candidate_secondary_path/state/priority (uint16)

    YANG Description: The priority of the specified secondary path option. Higher
priority options are less preferable - such that a secondary
path reference with a priority of 0 is the most preferred
    """
    return self.__priority
      
  def _set_priority(self, v, load=False):
    """
    Setter method for priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/candidate_secondary_paths/candidate_secondary_path/state/priority (uint16)
    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: The priority of the specified secondary path option. Higher
priority options are less preferable - such that a secondary
path reference with a priority of 0 is the most preferred
    """
    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="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """priority 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="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_priority(self):
    self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_active(self):
    """
    Getter method for active, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/candidate_secondary_paths/candidate_secondary_path/state/active (boolean)

    YANG Description: Indicates the current active path option that has
been selected of the candidate secondary paths
    """
    return self.__active
      
  def _set_active(self, v, load=False):
    """
    Setter method for active, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/candidate_secondary_paths/candidate_secondary_path/state/active (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_active is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_active() directly.

    YANG Description: Indicates the current active path option that has
been selected of the candidate secondary paths
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="active", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """active must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="active", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__active = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_active(self):
    self.__active = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="active", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)

  secondary_path = __builtin__.property(_get_secondary_path)
  priority = __builtin__.property(_get_priority)
  active = __builtin__.property(_get_active)


  _pyangbind_elements = OrderedDict([('secondary_path', secondary_path), ('priority', priority), ('active', active), ])


class yc_candidate_secondary_path_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_candidate_secondary_paths_candidate_secondary_path(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-primary-path/p2p-primary-path/candidate-secondary-paths/candidate-secondary-path. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of secondary paths which may be utilised when the
current primary path is in use
  """
  __slots__ = ('_path_helper', '_extmethods', '__secondary_path','__config','__state',)

  _yang_name = 'candidate-secondary-path'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__secondary_path = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="secondary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_candidate_secondary_paths_candidate_secondary_path_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_candidate_secondary_paths_candidate_secondary_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-primary-path', 'p2p-primary-path', 'candidate-secondary-paths', 'candidate-secondary-path']

  def _get_secondary_path(self):
    """
    Getter method for secondary_path, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/candidate_secondary_paths/candidate_secondary_path/secondary_path (leafref)

    YANG Description: A reference to the secondary path option reference
which acts as the key of the candidate-secondary-path
list
    """
    return self.__secondary_path
      
  def _set_secondary_path(self, v, load=False):
    """
    Setter method for secondary_path, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/candidate_secondary_paths/candidate_secondary_path/secondary_path (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_secondary_path is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_secondary_path() directly.

    YANG Description: A reference to the secondary path option reference
which acts as the key of the candidate-secondary-path
list
    """
    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="secondary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """secondary_path must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="secondary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__secondary_path = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_secondary_path(self):
    self.__secondary_path = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="secondary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/candidate_secondary_paths/candidate_secondary_path/config (container)

    YANG Description: Configuration parameters relating to the candidate
secondary path
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/candidate_secondary_paths/candidate_secondary_path/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 candidate
secondary path
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_candidate_secondary_paths_candidate_secondary_path_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_candidate_secondary_paths_candidate_secondary_path_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_candidate_secondary_paths_candidate_secondary_path_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/candidate_secondary_paths/candidate_secondary_path/state (container)

    YANG Description: Operational state parameters relating to the candidate
secondary path
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/candidate_secondary_paths/candidate_secondary_path/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 candidate
secondary path
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_candidate_secondary_paths_candidate_secondary_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_candidate_secondary_paths_candidate_secondary_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_candidate_secondary_paths_candidate_secondary_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  secondary_path = __builtin__.property(_get_secondary_path, _set_secondary_path)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('secondary_path', secondary_path), ('config', config), ('state', state), ])


class yc_candidate_secondary_paths_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_candidate_secondary_paths(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-primary-path/p2p-primary-path/candidate-secondary-paths. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The set of candidate secondary paths which may be used
for this primary path. When secondary paths are specified
in the list the path of the secondary LSP in use must be
restricted to those path options referenced. The
priority of the secondary paths is specified within the
list. Higher priority values are less preferred - that is
to say that a path with priority 0 is the most preferred
path. In the case that the list is empty, any secondary
path option may be utilised when the current primary path
is in use.
  """
  __slots__ = ('_path_helper', '_extmethods', '__candidate_secondary_path',)

  _yang_name = 'candidate-secondary-paths'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__candidate_secondary_path = YANGDynClass(base=YANGListType("secondary_path",yc_candidate_secondary_path_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_candidate_secondary_paths_candidate_secondary_path, yang_name="candidate-secondary-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='secondary-path', extensions=None), is_container='list', yang_name="candidate-secondary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-primary-path', 'p2p-primary-path', 'candidate-secondary-paths']

  def _get_candidate_secondary_path(self):
    """
    Getter method for candidate_secondary_path, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/candidate_secondary_paths/candidate_secondary_path (list)

    YANG Description: List of secondary paths which may be utilised when the
current primary path is in use
    """
    return self.__candidate_secondary_path
      
  def _set_candidate_secondary_path(self, v, load=False):
    """
    Setter method for candidate_secondary_path, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/candidate_secondary_paths/candidate_secondary_path (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_candidate_secondary_path is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_candidate_secondary_path() directly.

    YANG Description: List of secondary paths which may be utilised when the
current primary path is in use
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("secondary_path",yc_candidate_secondary_path_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_candidate_secondary_paths_candidate_secondary_path, yang_name="candidate-secondary-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='secondary-path', extensions=None), is_container='list', yang_name="candidate-secondary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """candidate_secondary_path must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("secondary_path",yc_candidate_secondary_path_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_candidate_secondary_paths_candidate_secondary_path, yang_name="candidate-secondary-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='secondary-path', extensions=None), is_container='list', yang_name="candidate-secondary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__candidate_secondary_path = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_candidate_secondary_path(self):
    self.__candidate_secondary_path = YANGDynClass(base=YANGListType("secondary_path",yc_candidate_secondary_path_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_candidate_secondary_paths_candidate_secondary_path, yang_name="candidate-secondary-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='secondary-path', extensions=None), is_container='list', yang_name="candidate-secondary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  candidate_secondary_path = __builtin__.property(_get_candidate_secondary_path, _set_candidate_secondary_path)


  _pyangbind_elements = OrderedDict([('candidate_secondary_path', candidate_secondary_path), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_admin_groups_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-primary-path/p2p-primary-path/admin-groups/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', '__exclude_group','__include_all_group','__include_any_group',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__exclude_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="exclude-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__include_all_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-all-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__include_any_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-any-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-primary-path', 'p2p-primary-path', 'admin-groups', 'config']

  def _get_exclude_group(self):
    """
    Getter method for exclude_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/admin_groups/config/exclude_group (leafref)

    YANG Description: list of references to named admin-groups to exclude in
path calculation.
    """
    return self.__exclude_group
      
  def _set_exclude_group(self, v, load=False):
    """
    Setter method for exclude_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/admin_groups/config/exclude_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_exclude_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_exclude_group() directly.

    YANG Description: list of references to named admin-groups to exclude in
path calculation.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="exclude-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """exclude_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="exclude-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__exclude_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_exclude_group(self):
    self.__exclude_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="exclude-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_include_all_group(self):
    """
    Getter method for include_all_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/admin_groups/config/include_all_group (leafref)

    YANG Description: list of references to named admin-groups of which all must
be included
    """
    return self.__include_all_group
      
  def _set_include_all_group(self, v, load=False):
    """
    Setter method for include_all_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/admin_groups/config/include_all_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_include_all_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_include_all_group() directly.

    YANG Description: list of references to named admin-groups of which all must
be included
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-all-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """include_all_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-all-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__include_all_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_include_all_group(self):
    self.__include_all_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-all-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_include_any_group(self):
    """
    Getter method for include_any_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/admin_groups/config/include_any_group (leafref)

    YANG Description: list of references to named admin-groups of which one must
be included
    """
    return self.__include_any_group
      
  def _set_include_any_group(self, v, load=False):
    """
    Setter method for include_any_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/admin_groups/config/include_any_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_include_any_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_include_any_group() directly.

    YANG Description: list of references to named admin-groups of which one must
be included
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-any-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """include_any_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-any-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__include_any_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_include_any_group(self):
    self.__include_any_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-any-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)

  exclude_group = __builtin__.property(_get_exclude_group, _set_exclude_group)
  include_all_group = __builtin__.property(_get_include_all_group, _set_include_all_group)
  include_any_group = __builtin__.property(_get_include_any_group, _set_include_any_group)


  _pyangbind_elements = OrderedDict([('exclude_group', exclude_group), ('include_all_group', include_all_group), ('include_any_group', include_any_group), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_admin_groups_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-primary-path/p2p-primary-path/admin-groups/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', '__exclude_group','__include_all_group','__include_any_group',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__exclude_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="exclude-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__include_all_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-all-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__include_any_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-any-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-primary-path', 'p2p-primary-path', 'admin-groups', 'state']

  def _get_exclude_group(self):
    """
    Getter method for exclude_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/admin_groups/state/exclude_group (leafref)

    YANG Description: list of references to named admin-groups to exclude in
path calculation.
    """
    return self.__exclude_group
      
  def _set_exclude_group(self, v, load=False):
    """
    Setter method for exclude_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/admin_groups/state/exclude_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_exclude_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_exclude_group() directly.

    YANG Description: list of references to named admin-groups to exclude in
path calculation.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="exclude-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """exclude_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="exclude-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__exclude_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_exclude_group(self):
    self.__exclude_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="exclude-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_include_all_group(self):
    """
    Getter method for include_all_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/admin_groups/state/include_all_group (leafref)

    YANG Description: list of references to named admin-groups of which all must
be included
    """
    return self.__include_all_group
      
  def _set_include_all_group(self, v, load=False):
    """
    Setter method for include_all_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/admin_groups/state/include_all_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_include_all_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_include_all_group() directly.

    YANG Description: list of references to named admin-groups of which all must
be included
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-all-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """include_all_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-all-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__include_all_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_include_all_group(self):
    self.__include_all_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-all-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_include_any_group(self):
    """
    Getter method for include_any_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/admin_groups/state/include_any_group (leafref)

    YANG Description: list of references to named admin-groups of which one must
be included
    """
    return self.__include_any_group
      
  def _set_include_any_group(self, v, load=False):
    """
    Setter method for include_any_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/admin_groups/state/include_any_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_include_any_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_include_any_group() directly.

    YANG Description: list of references to named admin-groups of which one must
be included
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-any-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """include_any_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-any-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__include_any_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_include_any_group(self):
    self.__include_any_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-any-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)

  exclude_group = __builtin__.property(_get_exclude_group)
  include_all_group = __builtin__.property(_get_include_all_group)
  include_any_group = __builtin__.property(_get_include_any_group)


  _pyangbind_elements = OrderedDict([('exclude_group', exclude_group), ('include_all_group', include_all_group), ('include_any_group', include_any_group), ])


class yc_admin_groups_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_admin_groups(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-primary-path/p2p-primary-path/admin-groups. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for include/exclude constraints for
link affinities
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'admin-groups'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_admin_groups_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_admin_groups_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-primary-path', 'p2p-primary-path', 'admin-groups']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/admin_groups/config (container)

    YANG Description: Configuration data 
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/admin_groups/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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_admin_groups_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_admin_groups_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_admin_groups_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/admin_groups/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 /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/admin_groups/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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_admin_groups_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_admin_groups_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_admin_groups_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_p2p_primary_path_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-primary-path/p2p-primary-path. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of p2p primary paths for a tunnel
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state','__path_metric_bound_constraints','__candidate_secondary_paths','__admin_groups',)

  _yang_name = 'p2p-primary-path'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__path_metric_bound_constraints = YANGDynClass(base=yc_path_metric_bound_constraints_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_path_metric_bound_constraints, is_container='container', yang_name="path-metric-bound-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__candidate_secondary_paths = YANGDynClass(base=yc_candidate_secondary_paths_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_candidate_secondary_paths, is_container='container', yang_name="candidate-secondary-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__admin_groups = YANGDynClass(base=yc_admin_groups_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_admin_groups, is_container='container', yang_name="admin-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-primary-path', 'p2p-primary-path']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/name (leafref)

    YANG Description: Path name
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/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: Path 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config (container)

    YANG Description: Configuration parameters related to paths
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/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 related to paths
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/state (container)

    YANG Description: State parameters related to paths
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/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 parameters related to paths
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_path_metric_bound_constraints(self):
    """
    Getter method for path_metric_bound_constraints, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/path_metric_bound_constraints (container)

    YANG Description: Enclosing container for the path metric bound constraints.
    """
    return self.__path_metric_bound_constraints
      
  def _set_path_metric_bound_constraints(self, v, load=False):
    """
    Setter method for path_metric_bound_constraints, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/path_metric_bound_constraints (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_metric_bound_constraints is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_metric_bound_constraints() directly.

    YANG Description: Enclosing container for the path metric bound constraints.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_path_metric_bound_constraints_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_path_metric_bound_constraints, is_container='container', yang_name="path-metric-bound-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_metric_bound_constraints must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_path_metric_bound_constraints_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_path_metric_bound_constraints, is_container='container', yang_name="path-metric-bound-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__path_metric_bound_constraints = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_metric_bound_constraints(self):
    self.__path_metric_bound_constraints = YANGDynClass(base=yc_path_metric_bound_constraints_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_path_metric_bound_constraints, is_container='container', yang_name="path-metric-bound-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_candidate_secondary_paths(self):
    """
    Getter method for candidate_secondary_paths, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/candidate_secondary_paths (container)

    YANG Description: The set of candidate secondary paths which may be used
for this primary path. When secondary paths are specified
in the list the path of the secondary LSP in use must be
restricted to those path options referenced. The
priority of the secondary paths is specified within the
list. Higher priority values are less preferred - that is
to say that a path with priority 0 is the most preferred
path. In the case that the list is empty, any secondary
path option may be utilised when the current primary path
is in use.
    """
    return self.__candidate_secondary_paths
      
  def _set_candidate_secondary_paths(self, v, load=False):
    """
    Setter method for candidate_secondary_paths, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/candidate_secondary_paths (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_candidate_secondary_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_candidate_secondary_paths() directly.

    YANG Description: The set of candidate secondary paths which may be used
for this primary path. When secondary paths are specified
in the list the path of the secondary LSP in use must be
restricted to those path options referenced. The
priority of the secondary paths is specified within the
list. Higher priority values are less preferred - that is
to say that a path with priority 0 is the most preferred
path. In the case that the list is empty, any secondary
path option may be utilised when the current primary path
is in use.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_candidate_secondary_paths_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_candidate_secondary_paths, is_container='container', yang_name="candidate-secondary-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """candidate_secondary_paths must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_candidate_secondary_paths_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_candidate_secondary_paths, is_container='container', yang_name="candidate-secondary-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__candidate_secondary_paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_candidate_secondary_paths(self):
    self.__candidate_secondary_paths = YANGDynClass(base=yc_candidate_secondary_paths_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_candidate_secondary_paths, is_container='container', yang_name="candidate-secondary-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_admin_groups(self):
    """
    Getter method for admin_groups, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/admin_groups (container)

    YANG Description: Top-level container for include/exclude constraints for
link affinities
    """
    return self.__admin_groups
      
  def _set_admin_groups(self, v, load=False):
    """
    Setter method for admin_groups, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/admin_groups (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_admin_groups is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_admin_groups() directly.

    YANG Description: Top-level container for include/exclude constraints for
link affinities
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_admin_groups_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_admin_groups, is_container='container', yang_name="admin-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """admin_groups must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_admin_groups_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_admin_groups, is_container='container', yang_name="admin-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__admin_groups = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_admin_groups(self):
    self.__admin_groups = YANGDynClass(base=yc_admin_groups_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path_admin_groups, is_container='container', yang_name="admin-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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)
  path_metric_bound_constraints = __builtin__.property(_get_path_metric_bound_constraints, _set_path_metric_bound_constraints)
  candidate_secondary_paths = __builtin__.property(_get_candidate_secondary_paths, _set_candidate_secondary_paths)
  admin_groups = __builtin__.property(_get_admin_groups, _set_admin_groups)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ('path_metric_bound_constraints', path_metric_bound_constraints), ('candidate_secondary_paths', candidate_secondary_paths), ('admin_groups', admin_groups), ])


class yc_p2p_primary_path_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-primary-path. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Primary paths associated with the LSP
  """
  __slots__ = ('_path_helper', '_extmethods', '__p2p_primary_path',)

  _yang_name = 'p2p-primary-path'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__p2p_primary_path = YANGDynClass(base=YANGListType("name",yc_p2p_primary_path_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path, yang_name="p2p-primary-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="p2p-primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-primary-path']

  def _get_p2p_primary_path(self):
    """
    Getter method for p2p_primary_path, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path (list)

    YANG Description: List of p2p primary paths for a tunnel
    """
    return self.__p2p_primary_path
      
  def _set_p2p_primary_path(self, v, load=False):
    """
    Setter method for p2p_primary_path, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_p2p_primary_path is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_p2p_primary_path() directly.

    YANG Description: List of p2p primary paths for a tunnel
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_p2p_primary_path_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path, yang_name="p2p-primary-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="p2p-primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """p2p_primary_path must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_p2p_primary_path_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path, yang_name="p2p-primary-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="p2p-primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__p2p_primary_path = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_p2p_primary_path(self):
    self.__p2p_primary_path = YANGDynClass(base=YANGListType("name",yc_p2p_primary_path_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path_p2p_primary_path, yang_name="p2p-primary-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="p2p-primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  p2p_primary_path = __builtin__.property(_get_p2p_primary_path, _set_p2p_primary_path)


  _pyangbind_elements = OrderedDict([('p2p_primary_path', p2p_primary_path), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-secondary-paths/p2p-secondary-path/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters related to paths
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__path_computation_method','__use_cspf','__cspf_tiebreaker','__path_computation_server','__path_control','__explicit_path_name','__preference','__setup_priority','__hold_priority','__retry_timer',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__path_computation_method = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LOCALLY_COMPUTED"), is_leaf=True, yang_name="path-computation-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__use_cspf = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-cspf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    self.__cspf_tiebreaker = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'RANDOM': {}, 'LEAST_FILL': {}, 'MOST_FILL': {}},), default=six.text_type("RANDOM"), is_leaf=True, yang_name="cspf-tiebreaker", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='cspf-tie-breaking', is_config=True)
    self.__path_computation_server = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-computation-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__path_control = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PCE_DELEGATED': {}, 'PCC_CONTROLLED': {}, 'PCC_REPORT_ONLY': {}},), is_leaf=True, yang_name="path-control", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pcep:lsp-control-type', is_config=True)
    self.__explicit_path_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="explicit-path-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    self.__retry_timer = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..600']}), is_leaf=True, yang_name="retry-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-secondary-paths', 'p2p-secondary-path', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/name (string)

    YANG Description: Path name
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/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: Path name
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_path_computation_method(self):
    """
    Getter method for path_computation_method, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/path_computation_method (identityref)

    YANG Description: The method used for computing the path, either
locally computed, queried from a server or not
computed at all (explicitly configured).
    """
    return self.__path_computation_method
      
  def _set_path_computation_method(self, v, load=False):
    """
    Setter method for path_computation_method, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/path_computation_method (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_computation_method is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_computation_method() directly.

    YANG Description: The method used for computing the path, either
locally computed, queried from a server or not
computed at all (explicitly 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={'LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LOCALLY_COMPUTED"), is_leaf=True, yang_name="path-computation-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_computation_method must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LOCALLY_COMPUTED"), is_leaf=True, yang_name="path-computation-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
        })

    self.__path_computation_method = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_computation_method(self):
    self.__path_computation_method = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LOCALLY_COMPUTED"), is_leaf=True, yang_name="path-computation-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_use_cspf(self):
    """
    Getter method for use_cspf, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/use_cspf (boolean)

    YANG Description: Flag to enable CSPF for locally computed LSPs
    """
    return self.__use_cspf
      
  def _set_use_cspf(self, v, load=False):
    """
    Setter method for use_cspf, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/use_cspf (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_use_cspf is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_use_cspf() directly.

    YANG Description: Flag to enable CSPF for locally computed LSPs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="use-cspf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """use_cspf must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-cspf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
        })

    self.__use_cspf = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_use_cspf(self):
    self.__use_cspf = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-cspf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)


  def _get_cspf_tiebreaker(self):
    """
    Getter method for cspf_tiebreaker, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/cspf_tiebreaker (cspf-tie-breaking)

    YANG Description: Determine the tie-breaking method to choose between
equally desirable paths during CSFP computation
    """
    return self.__cspf_tiebreaker
      
  def _set_cspf_tiebreaker(self, v, load=False):
    """
    Setter method for cspf_tiebreaker, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/cspf_tiebreaker (cspf-tie-breaking)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cspf_tiebreaker is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cspf_tiebreaker() directly.

    YANG Description: Determine the tie-breaking method to choose between
equally desirable paths during CSFP computation
    """
    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={'RANDOM': {}, 'LEAST_FILL': {}, 'MOST_FILL': {}},), default=six.text_type("RANDOM"), is_leaf=True, yang_name="cspf-tiebreaker", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='cspf-tie-breaking', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cspf_tiebreaker must be of a type compatible with cspf-tie-breaking""",
          'defined-type': "openconfig-network-instance:cspf-tie-breaking",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'RANDOM': {}, 'LEAST_FILL': {}, 'MOST_FILL': {}},), default=six.text_type("RANDOM"), is_leaf=True, yang_name="cspf-tiebreaker", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='cspf-tie-breaking', is_config=True)""",
        })

    self.__cspf_tiebreaker = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cspf_tiebreaker(self):
    self.__cspf_tiebreaker = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'RANDOM': {}, 'LEAST_FILL': {}, 'MOST_FILL': {}},), default=six.text_type("RANDOM"), is_leaf=True, yang_name="cspf-tiebreaker", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='cspf-tie-breaking', is_config=True)


  def _get_path_computation_server(self):
    """
    Getter method for path_computation_server, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/path_computation_server (leafref)

    YANG Description: Reference to the address of a previously configured
external path computation server.
    """
    return self.__path_computation_server
      
  def _set_path_computation_server(self, v, load=False):
    """
    Setter method for path_computation_server, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/path_computation_server (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_computation_server is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_computation_server() directly.

    YANG Description: Reference to the address of a previously configured
external path computation server.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="path-computation-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_computation_server must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-computation-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__path_computation_server = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_computation_server(self):
    self.__path_computation_server = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-computation-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_path_control(self):
    """
    Getter method for path_control, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/path_control (oc-pcep:lsp-control-type)

    YANG Description: Set the LSP path control mode as PCE_DELEGATED
PCC_CONTROLLED or PCC_REPORT_ONLY information
state to the PCE.
    """
    return self.__path_control
      
  def _set_path_control(self, v, load=False):
    """
    Setter method for path_control, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/path_control (oc-pcep:lsp-control-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_control is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_control() directly.

    YANG Description: Set the LSP path control mode as PCE_DELEGATED
PCC_CONTROLLED or PCC_REPORT_ONLY information
state to the PCE.
    """
    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={'PCE_DELEGATED': {}, 'PCC_CONTROLLED': {}, 'PCC_REPORT_ONLY': {}},), is_leaf=True, yang_name="path-control", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pcep:lsp-control-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_control must be of a type compatible with oc-pcep:lsp-control-type""",
          'defined-type': "oc-pcep:lsp-control-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PCE_DELEGATED': {}, 'PCC_CONTROLLED': {}, 'PCC_REPORT_ONLY': {}},), is_leaf=True, yang_name="path-control", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pcep:lsp-control-type', is_config=True)""",
        })

    self.__path_control = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_control(self):
    self.__path_control = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PCE_DELEGATED': {}, 'PCC_CONTROLLED': {}, 'PCC_REPORT_ONLY': {}},), is_leaf=True, yang_name="path-control", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pcep:lsp-control-type', is_config=True)


  def _get_explicit_path_name(self):
    """
    Getter method for explicit_path_name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/explicit_path_name (leafref)

    YANG Description: reference to a defined path
    """
    return self.__explicit_path_name
      
  def _set_explicit_path_name(self, v, load=False):
    """
    Setter method for explicit_path_name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/explicit_path_name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_explicit_path_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_explicit_path_name() directly.

    YANG Description: reference to a defined path
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="explicit-path-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """explicit_path_name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="explicit-path-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__explicit_path_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_explicit_path_name(self):
    self.__explicit_path_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="explicit-path-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_preference(self):
    """
    Getter method for preference, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/preference (uint8)

    YANG Description: Specifies a preference for this path. The lower the
number higher the preference
    """
    return self.__preference
      
  def _set_preference(self, v, load=False):
    """
    Setter method for preference, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/preference (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_preference is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_preference() directly.

    YANG Description: Specifies a preference for this path. The lower the
number higher the preference
    """
    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': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """preference 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': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
        })

    self.__preference = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_preference(self):
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)


  def _get_setup_priority(self):
    """
    Getter method for setup_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/setup_priority (uint8)

    YANG Description: RSVP-TE preemption priority during LSP setup, lower is
higher priority; default 7 indicates that LSP will not
preempt established LSPs during setup
    """
    return self.__setup_priority
      
  def _set_setup_priority(self, v, load=False):
    """
    Setter method for setup_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/setup_priority (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_setup_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_setup_priority() directly.

    YANG Description: RSVP-TE preemption priority during LSP setup, lower is
higher priority; default 7 indicates that LSP will not
preempt established LSPs during setup
    """
    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']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """setup_priority 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..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
        })

    self.__setup_priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_setup_priority(self):
    self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)


  def _get_hold_priority(self):
    """
    Getter method for hold_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/hold_priority (uint8)

    YANG Description: preemption priority once the LSP is established,
lower is higher priority; default 0 indicates other LSPs
will not preempt the LSPs once established
    """
    return self.__hold_priority
      
  def _set_hold_priority(self, v, load=False):
    """
    Setter method for hold_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/hold_priority (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hold_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hold_priority() directly.

    YANG Description: preemption priority once the LSP is established,
lower is higher priority; default 0 indicates other LSPs
will not preempt the LSPs once established
    """
    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']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hold_priority 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..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
        })

    self.__hold_priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hold_priority(self):
    self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)


  def _get_retry_timer(self):
    """
    Getter method for retry_timer, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/retry_timer (uint16)

    YANG Description: sets the time between attempts to establish the
LSP
    """
    return self.__retry_timer
      
  def _set_retry_timer(self, v, load=False):
    """
    Setter method for retry_timer, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config/retry_timer (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_retry_timer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_retry_timer() directly.

    YANG Description: sets the time between attempts to establish the
LSP
    """
    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': ['1..600']}), is_leaf=True, yang_name="retry-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """retry_timer must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..600']}), is_leaf=True, yang_name="retry-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
        })

    self.__retry_timer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_retry_timer(self):
    self.__retry_timer = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..600']}), is_leaf=True, yang_name="retry-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)

  name = __builtin__.property(_get_name, _set_name)
  path_computation_method = __builtin__.property(_get_path_computation_method, _set_path_computation_method)
  use_cspf = __builtin__.property(_get_use_cspf, _set_use_cspf)
  cspf_tiebreaker = __builtin__.property(_get_cspf_tiebreaker, _set_cspf_tiebreaker)
  path_computation_server = __builtin__.property(_get_path_computation_server, _set_path_computation_server)
  path_control = __builtin__.property(_get_path_control, _set_path_control)
  explicit_path_name = __builtin__.property(_get_explicit_path_name, _set_explicit_path_name)
  preference = __builtin__.property(_get_preference, _set_preference)
  setup_priority = __builtin__.property(_get_setup_priority, _set_setup_priority)
  hold_priority = __builtin__.property(_get_hold_priority, _set_hold_priority)
  retry_timer = __builtin__.property(_get_retry_timer, _set_retry_timer)


  _pyangbind_elements = OrderedDict([('name', name), ('path_computation_method', path_computation_method), ('use_cspf', use_cspf), ('cspf_tiebreaker', cspf_tiebreaker), ('path_computation_server', path_computation_server), ('path_control', path_control), ('explicit_path_name', explicit_path_name), ('preference', preference), ('setup_priority', setup_priority), ('hold_priority', hold_priority), ('retry_timer', retry_timer), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-secondary-paths/p2p-secondary-path/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters related to paths
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__path_computation_method','__use_cspf','__cspf_tiebreaker','__path_computation_server','__path_control','__explicit_path_name','__preference','__setup_priority','__hold_priority','__retry_timer','__associated_rsvp_sessions','__spf_metric','__cspf_metric',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__path_computation_method = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LOCALLY_COMPUTED"), is_leaf=True, yang_name="path-computation-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__use_cspf = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-cspf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__cspf_tiebreaker = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'RANDOM': {}, 'LEAST_FILL': {}, 'MOST_FILL': {}},), default=six.text_type("RANDOM"), is_leaf=True, yang_name="cspf-tiebreaker", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='cspf-tie-breaking', is_config=False)
    self.__path_computation_server = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-computation-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__path_control = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PCE_DELEGATED': {}, 'PCC_CONTROLLED': {}, 'PCC_REPORT_ONLY': {}},), is_leaf=True, yang_name="path-control", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pcep:lsp-control-type', is_config=False)
    self.__explicit_path_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="explicit-path-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__retry_timer = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..600']}), is_leaf=True, yang_name="retry-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    self.__associated_rsvp_sessions = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="associated-rsvp-sessions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__spf_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="spf-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__cspf_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cspf-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-secondary-paths', 'p2p-secondary-path', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/name (string)

    YANG Description: Path name
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/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: Path name
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_path_computation_method(self):
    """
    Getter method for path_computation_method, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/path_computation_method (identityref)

    YANG Description: The method used for computing the path, either
locally computed, queried from a server or not
computed at all (explicitly configured).
    """
    return self.__path_computation_method
      
  def _set_path_computation_method(self, v, load=False):
    """
    Setter method for path_computation_method, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/path_computation_method (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_computation_method is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_computation_method() directly.

    YANG Description: The method used for computing the path, either
locally computed, queried from a server or not
computed at all (explicitly 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={'LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LOCALLY_COMPUTED"), is_leaf=True, yang_name="path-computation-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_computation_method must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LOCALLY_COMPUTED"), is_leaf=True, yang_name="path-computation-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__path_computation_method = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_computation_method(self):
    self.__path_computation_method = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LOCALLY_COMPUTED"), is_leaf=True, yang_name="path-computation-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_use_cspf(self):
    """
    Getter method for use_cspf, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/use_cspf (boolean)

    YANG Description: Flag to enable CSPF for locally computed LSPs
    """
    return self.__use_cspf
      
  def _set_use_cspf(self, v, load=False):
    """
    Setter method for use_cspf, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/use_cspf (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_use_cspf is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_use_cspf() directly.

    YANG Description: Flag to enable CSPF for locally computed LSPs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="use-cspf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """use_cspf must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-cspf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__use_cspf = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_use_cspf(self):
    self.__use_cspf = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-cspf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_cspf_tiebreaker(self):
    """
    Getter method for cspf_tiebreaker, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/cspf_tiebreaker (cspf-tie-breaking)

    YANG Description: Determine the tie-breaking method to choose between
equally desirable paths during CSFP computation
    """
    return self.__cspf_tiebreaker
      
  def _set_cspf_tiebreaker(self, v, load=False):
    """
    Setter method for cspf_tiebreaker, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/cspf_tiebreaker (cspf-tie-breaking)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cspf_tiebreaker is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cspf_tiebreaker() directly.

    YANG Description: Determine the tie-breaking method to choose between
equally desirable paths during CSFP computation
    """
    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={'RANDOM': {}, 'LEAST_FILL': {}, 'MOST_FILL': {}},), default=six.text_type("RANDOM"), is_leaf=True, yang_name="cspf-tiebreaker", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='cspf-tie-breaking', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cspf_tiebreaker must be of a type compatible with cspf-tie-breaking""",
          'defined-type': "openconfig-network-instance:cspf-tie-breaking",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'RANDOM': {}, 'LEAST_FILL': {}, 'MOST_FILL': {}},), default=six.text_type("RANDOM"), is_leaf=True, yang_name="cspf-tiebreaker", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='cspf-tie-breaking', is_config=False)""",
        })

    self.__cspf_tiebreaker = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cspf_tiebreaker(self):
    self.__cspf_tiebreaker = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'RANDOM': {}, 'LEAST_FILL': {}, 'MOST_FILL': {}},), default=six.text_type("RANDOM"), is_leaf=True, yang_name="cspf-tiebreaker", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='cspf-tie-breaking', is_config=False)


  def _get_path_computation_server(self):
    """
    Getter method for path_computation_server, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/path_computation_server (leafref)

    YANG Description: Reference to the address of a previously configured
external path computation server.
    """
    return self.__path_computation_server
      
  def _set_path_computation_server(self, v, load=False):
    """
    Setter method for path_computation_server, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/path_computation_server (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_computation_server is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_computation_server() directly.

    YANG Description: Reference to the address of a previously configured
external path computation server.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="path-computation-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_computation_server must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-computation-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__path_computation_server = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_computation_server(self):
    self.__path_computation_server = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="path-computation-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_path_control(self):
    """
    Getter method for path_control, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/path_control (oc-pcep:lsp-control-type)

    YANG Description: Set the LSP path control mode as PCE_DELEGATED
PCC_CONTROLLED or PCC_REPORT_ONLY information
state to the PCE.
    """
    return self.__path_control
      
  def _set_path_control(self, v, load=False):
    """
    Setter method for path_control, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/path_control (oc-pcep:lsp-control-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_control is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_control() directly.

    YANG Description: Set the LSP path control mode as PCE_DELEGATED
PCC_CONTROLLED or PCC_REPORT_ONLY information
state to the PCE.
    """
    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={'PCE_DELEGATED': {}, 'PCC_CONTROLLED': {}, 'PCC_REPORT_ONLY': {}},), is_leaf=True, yang_name="path-control", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pcep:lsp-control-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_control must be of a type compatible with oc-pcep:lsp-control-type""",
          'defined-type': "oc-pcep:lsp-control-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PCE_DELEGATED': {}, 'PCC_CONTROLLED': {}, 'PCC_REPORT_ONLY': {}},), is_leaf=True, yang_name="path-control", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pcep:lsp-control-type', is_config=False)""",
        })

    self.__path_control = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_control(self):
    self.__path_control = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PCE_DELEGATED': {}, 'PCC_CONTROLLED': {}, 'PCC_REPORT_ONLY': {}},), is_leaf=True, yang_name="path-control", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-pcep:lsp-control-type', is_config=False)


  def _get_explicit_path_name(self):
    """
    Getter method for explicit_path_name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/explicit_path_name (leafref)

    YANG Description: reference to a defined path
    """
    return self.__explicit_path_name
      
  def _set_explicit_path_name(self, v, load=False):
    """
    Setter method for explicit_path_name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/explicit_path_name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_explicit_path_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_explicit_path_name() directly.

    YANG Description: reference to a defined path
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="explicit-path-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """explicit_path_name must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="explicit-path-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__explicit_path_name = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_explicit_path_name(self):
    self.__explicit_path_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="explicit-path-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_preference(self):
    """
    Getter method for preference, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/preference (uint8)

    YANG Description: Specifies a preference for this path. The lower the
number higher the preference
    """
    return self.__preference
      
  def _set_preference(self, v, load=False):
    """
    Setter method for preference, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/preference (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_preference is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_preference() directly.

    YANG Description: Specifies a preference for this path. The lower the
number higher the preference
    """
    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': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """preference 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': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__preference = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_preference(self):
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_setup_priority(self):
    """
    Getter method for setup_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/setup_priority (uint8)

    YANG Description: RSVP-TE preemption priority during LSP setup, lower is
higher priority; default 7 indicates that LSP will not
preempt established LSPs during setup
    """
    return self.__setup_priority
      
  def _set_setup_priority(self, v, load=False):
    """
    Setter method for setup_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/setup_priority (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_setup_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_setup_priority() directly.

    YANG Description: RSVP-TE preemption priority during LSP setup, lower is
higher priority; default 7 indicates that LSP will not
preempt established LSPs during setup
    """
    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']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """setup_priority 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..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__setup_priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_setup_priority(self):
    self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_hold_priority(self):
    """
    Getter method for hold_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/hold_priority (uint8)

    YANG Description: preemption priority once the LSP is established,
lower is higher priority; default 0 indicates other LSPs
will not preempt the LSPs once established
    """
    return self.__hold_priority
      
  def _set_hold_priority(self, v, load=False):
    """
    Setter method for hold_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/hold_priority (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hold_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hold_priority() directly.

    YANG Description: preemption priority once the LSP is established,
lower is higher priority; default 0 indicates other LSPs
will not preempt the LSPs once established
    """
    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']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """hold_priority 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..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__hold_priority = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_hold_priority(self):
    self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_retry_timer(self):
    """
    Getter method for retry_timer, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/retry_timer (uint16)

    YANG Description: sets the time between attempts to establish the
LSP
    """
    return self.__retry_timer
      
  def _set_retry_timer(self, v, load=False):
    """
    Setter method for retry_timer, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/retry_timer (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_retry_timer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_retry_timer() directly.

    YANG Description: sets the time between attempts to establish the
LSP
    """
    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': ['1..600']}), is_leaf=True, yang_name="retry-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """retry_timer must be of a type compatible with uint16""",
          'defined-type': "uint16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..600']}), is_leaf=True, yang_name="retry-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""",
        })

    self.__retry_timer = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_retry_timer(self):
    self.__retry_timer = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..600']}), is_leaf=True, yang_name="retry-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)


  def _get_associated_rsvp_sessions(self):
    """
    Getter method for associated_rsvp_sessions, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/associated_rsvp_sessions (leafref)

    YANG Description: If the signalling protocol specified for this path is
RSVP-TE, this leaf-list provides a reference to the associated
sessions within the RSVP-TE protocol sessions list, such
that details of the signaling can be retrieved. More than
one session may exist during re-signalling such as
make-before-break.
    """
    return self.__associated_rsvp_sessions
      
  def _set_associated_rsvp_sessions(self, v, load=False):
    """
    Setter method for associated_rsvp_sessions, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/associated_rsvp_sessions (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_associated_rsvp_sessions is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_associated_rsvp_sessions() directly.

    YANG Description: If the signalling protocol specified for this path is
RSVP-TE, this leaf-list provides a reference to the associated
sessions within the RSVP-TE protocol sessions list, such
that details of the signaling can be retrieved. More than
one session may exist during re-signalling such as
make-before-break.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="associated-rsvp-sessions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """associated_rsvp_sessions must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="associated-rsvp-sessions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__associated_rsvp_sessions = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_associated_rsvp_sessions(self):
    self.__associated_rsvp_sessions = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="associated-rsvp-sessions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_spf_metric(self):
    """
    Getter method for spf_metric, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/spf_metric (uint64)

    YANG Description: The IGP metric of the shortest path to the LSP destination.
This value is used to compare the current metric of the
constrained path to the shortest path that is available in
the network topology.
    """
    return self.__spf_metric
      
  def _set_spf_metric(self, v, load=False):
    """
    Setter method for spf_metric, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/spf_metric (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_spf_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_spf_metric() directly.

    YANG Description: The IGP metric of the shortest path to the LSP destination.
This value is used to compare the current metric of the
constrained path to the shortest path that is available in
the network topology.
    """
    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="spf-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """spf_metric 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="spf-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__spf_metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_spf_metric(self):
    self.__spf_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="spf-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_cspf_metric(self):
    """
    Getter method for cspf_metric, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/cspf_metric (uint64)

    YANG Description: The IGP metric of the path currently used by the LSP.
This value is used to represent the metric of the path
used by the LSP following the execution of the CSPF
algorithm and signalling of the LSP.
    """
    return self.__cspf_metric
      
  def _set_cspf_metric(self, v, load=False):
    """
    Setter method for cspf_metric, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state/cspf_metric (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cspf_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cspf_metric() directly.

    YANG Description: The IGP metric of the path currently used by the LSP.
This value is used to represent the metric of the path
used by the LSP following the execution of the CSPF
algorithm and signalling of the LSP.
    """
    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="cspf-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """cspf_metric 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="cspf-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__cspf_metric = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_cspf_metric(self):
    self.__cspf_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="cspf-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)

  name = __builtin__.property(_get_name)
  path_computation_method = __builtin__.property(_get_path_computation_method)
  use_cspf = __builtin__.property(_get_use_cspf)
  cspf_tiebreaker = __builtin__.property(_get_cspf_tiebreaker)
  path_computation_server = __builtin__.property(_get_path_computation_server)
  path_control = __builtin__.property(_get_path_control)
  explicit_path_name = __builtin__.property(_get_explicit_path_name)
  preference = __builtin__.property(_get_preference)
  setup_priority = __builtin__.property(_get_setup_priority)
  hold_priority = __builtin__.property(_get_hold_priority)
  retry_timer = __builtin__.property(_get_retry_timer)
  associated_rsvp_sessions = __builtin__.property(_get_associated_rsvp_sessions)
  spf_metric = __builtin__.property(_get_spf_metric)
  cspf_metric = __builtin__.property(_get_cspf_metric)


  _pyangbind_elements = OrderedDict([('name', name), ('path_computation_method', path_computation_method), ('use_cspf', use_cspf), ('cspf_tiebreaker', cspf_tiebreaker), ('path_computation_server', path_computation_server), ('path_control', path_control), ('explicit_path_name', explicit_path_name), ('preference', preference), ('setup_priority', setup_priority), ('hold_priority', hold_priority), ('retry_timer', retry_timer), ('associated_rsvp_sessions', associated_rsvp_sessions), ('spf_metric', spf_metric), ('cspf_metric', cspf_metric), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_path_metric_bound_constraints_path_metric_bound_constraint_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-secondary-paths/p2p-secondary-path/path-metric-bound-constraints/path-metric-bound-constraint/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters relating to path metric bound constraints.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__metric_upper_bound',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)
    self.__metric_upper_bound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="metric-upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-secondary-paths', 'p2p-secondary-path', 'path-metric-bound-constraints', 'path-metric-bound-constraint', 'config']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/path_metric_bound_constraints/path_metric_bound_constraint/config/type (identityref)

    YANG Description: Identifies an entry in the list of metric-types
bound for the TE path.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/path_metric_bound_constraints/path_metric_bound_constraint/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: Identifies an entry in the list of metric-types
bound for the TE path.
    """
    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={'TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', 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={'TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)


  def _get_metric_upper_bound(self):
    """
    Getter method for metric_upper_bound, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/path_metric_bound_constraints/path_metric_bound_constraint/config/metric_upper_bound (uint64)

    YANG Description: Upper bound on end-to-end path metric. A zero indicate
an unbounded upper limit for the specific metric-type.
    """
    return self.__metric_upper_bound
      
  def _set_metric_upper_bound(self, v, load=False):
    """
    Setter method for metric_upper_bound, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/path_metric_bound_constraints/path_metric_bound_constraint/config/metric_upper_bound (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric_upper_bound is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric_upper_bound() directly.

    YANG Description: Upper bound on end-to-end path metric. A zero indicate
an unbounded upper limit for the specific metric-type.
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="metric-upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric_upper_bound 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), default=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="metric-upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=True)""",
        })

    self.__metric_upper_bound = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric_upper_bound(self):
    self.__metric_upper_bound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="metric-upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=True)

  type = __builtin__.property(_get_type, _set_type)
  metric_upper_bound = __builtin__.property(_get_metric_upper_bound, _set_metric_upper_bound)


  _pyangbind_elements = OrderedDict([('type', type), ('metric_upper_bound', metric_upper_bound), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_path_metric_bound_constraints_path_metric_bound_constraint_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-secondary-paths/p2p-secondary-path/path-metric-bound-constraints/path-metric-bound-constraint/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 path metric bound constraints.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__metric_upper_bound',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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={'TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__metric_upper_bound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="metric-upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-secondary-paths', 'p2p-secondary-path', 'path-metric-bound-constraints', 'path-metric-bound-constraint', 'state']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/path_metric_bound_constraints/path_metric_bound_constraint/state/type (identityref)

    YANG Description: Identifies an entry in the list of metric-types
bound for the TE path.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/path_metric_bound_constraints/path_metric_bound_constraint/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: Identifies an entry in the list of metric-types
bound for the TE path.
    """
    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={'TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', 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-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', 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={'TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:TE_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:IGP_METRIC': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:HOP_COUNT': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls:PATH_DELAY': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-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/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_metric_upper_bound(self):
    """
    Getter method for metric_upper_bound, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/path_metric_bound_constraints/path_metric_bound_constraint/state/metric_upper_bound (uint64)

    YANG Description: Upper bound on end-to-end path metric. A zero indicate
an unbounded upper limit for the specific metric-type.
    """
    return self.__metric_upper_bound
      
  def _set_metric_upper_bound(self, v, load=False):
    """
    Setter method for metric_upper_bound, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/path_metric_bound_constraints/path_metric_bound_constraint/state/metric_upper_bound (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric_upper_bound is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric_upper_bound() directly.

    YANG Description: Upper bound on end-to-end path metric. A zero indicate
an unbounded upper limit for the specific metric-type.
    """
    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), default=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="metric-upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """metric_upper_bound 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), default=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="metric-upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__metric_upper_bound = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_metric_upper_bound(self):
    self.__metric_upper_bound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="metric-upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)

  type = __builtin__.property(_get_type)
  metric_upper_bound = __builtin__.property(_get_metric_upper_bound)


  _pyangbind_elements = OrderedDict([('type', type), ('metric_upper_bound', metric_upper_bound), ])


class yc_path_metric_bound_constraint_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_path_metric_bound_constraints_path_metric_bound_constraint(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-secondary-paths/p2p-secondary-path/path-metric-bound-constraints/path-metric-bound-constraint. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A list of metric bounds that are applied as constraints to the LSP.
It act as a logical AND, hence all of them must be satisfied.
If not, it will return an error.
Constraints within this list may be applicable to either
the local CSPF process (where data is available to the local device)
or be communicated to a PCE for calculation.
  """
  __slots__ = ('_path_helper', '_extmethods', '__type','__config','__state',)

  _yang_name = 'path-metric-bound-constraint'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_path_metric_bound_constraints_path_metric_bound_constraint_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_path_metric_bound_constraints_path_metric_bound_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-secondary-paths', 'p2p-secondary-path', 'path-metric-bound-constraints', 'path-metric-bound-constraint']

  def _get_type(self):
    """
    Getter method for type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/path_metric_bound_constraints/path_metric_bound_constraint/type (leafref)

    YANG Description: Identifies an entry in the list of metric-types
bound for the TE path.
    """
    return self.__type
      
  def _set_type(self, v, load=False):
    """
    Setter method for type, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/path_metric_bound_constraints/path_metric_bound_constraint/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: Identifies an entry in the list of metric-types
bound for the TE path.
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/path_metric_bound_constraints/path_metric_bound_constraint/config (container)

    YANG Description: Configuration parameters relating to path metric bound constraints.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/path_metric_bound_constraints/path_metric_bound_constraint/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 path metric bound constraints.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_path_metric_bound_constraints_path_metric_bound_constraint_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_path_metric_bound_constraints_path_metric_bound_constraint_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_path_metric_bound_constraints_path_metric_bound_constraint_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/path_metric_bound_constraints/path_metric_bound_constraint/state (container)

    YANG Description: Operational state parameters relating to path metric bound constraints.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/path_metric_bound_constraints/path_metric_bound_constraint/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 path metric bound constraints.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_path_metric_bound_constraints_path_metric_bound_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_path_metric_bound_constraints_path_metric_bound_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_path_metric_bound_constraints_path_metric_bound_constraint_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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)


  _pyangbind_elements = OrderedDict([('type', type), ('config', config), ('state', state), ])


class yc_path_metric_bound_constraints_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_path_metric_bound_constraints(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-secondary-paths/p2p-secondary-path/path-metric-bound-constraints. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for the path metric bound constraints.
  """
  __slots__ = ('_path_helper', '_extmethods', '__path_metric_bound_constraint',)

  _yang_name = 'path-metric-bound-constraints'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__path_metric_bound_constraint = YANGDynClass(base=YANGListType("type",yc_path_metric_bound_constraint_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_path_metric_bound_constraints_path_metric_bound_constraint, yang_name="path-metric-bound-constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="path-metric-bound-constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-secondary-paths', 'p2p-secondary-path', 'path-metric-bound-constraints']

  def _get_path_metric_bound_constraint(self):
    """
    Getter method for path_metric_bound_constraint, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/path_metric_bound_constraints/path_metric_bound_constraint (list)

    YANG Description: A list of metric bounds that are applied as constraints to the LSP.
It act as a logical AND, hence all of them must be satisfied.
If not, it will return an error.
Constraints within this list may be applicable to either
the local CSPF process (where data is available to the local device)
or be communicated to a PCE for calculation.
    """
    return self.__path_metric_bound_constraint
      
  def _set_path_metric_bound_constraint(self, v, load=False):
    """
    Setter method for path_metric_bound_constraint, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/path_metric_bound_constraints/path_metric_bound_constraint (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_metric_bound_constraint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_metric_bound_constraint() directly.

    YANG Description: A list of metric bounds that are applied as constraints to the LSP.
It act as a logical AND, hence all of them must be satisfied.
If not, it will return an error.
Constraints within this list may be applicable to either
the local CSPF process (where data is available to the local device)
or be communicated to a PCE for calculation.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("type",yc_path_metric_bound_constraint_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_path_metric_bound_constraints_path_metric_bound_constraint, yang_name="path-metric-bound-constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="path-metric-bound-constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_metric_bound_constraint must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("type",yc_path_metric_bound_constraint_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_path_metric_bound_constraints_path_metric_bound_constraint, yang_name="path-metric-bound-constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="path-metric-bound-constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__path_metric_bound_constraint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_metric_bound_constraint(self):
    self.__path_metric_bound_constraint = YANGDynClass(base=YANGListType("type",yc_path_metric_bound_constraint_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_path_metric_bound_constraints_path_metric_bound_constraint, yang_name="path-metric-bound-constraint", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='type', extensions=None), is_container='list', yang_name="path-metric-bound-constraint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  path_metric_bound_constraint = __builtin__.property(_get_path_metric_bound_constraint, _set_path_metric_bound_constraint)


  _pyangbind_elements = OrderedDict([('path_metric_bound_constraint', path_metric_bound_constraint), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_admin_groups_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-secondary-paths/p2p-secondary-path/admin-groups/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', '__exclude_group','__include_all_group','__include_any_group',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__exclude_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="exclude-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__include_all_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-all-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__include_any_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-any-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-secondary-paths', 'p2p-secondary-path', 'admin-groups', 'config']

  def _get_exclude_group(self):
    """
    Getter method for exclude_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/admin_groups/config/exclude_group (leafref)

    YANG Description: list of references to named admin-groups to exclude in
path calculation.
    """
    return self.__exclude_group
      
  def _set_exclude_group(self, v, load=False):
    """
    Setter method for exclude_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/admin_groups/config/exclude_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_exclude_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_exclude_group() directly.

    YANG Description: list of references to named admin-groups to exclude in
path calculation.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="exclude-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """exclude_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="exclude-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__exclude_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_exclude_group(self):
    self.__exclude_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="exclude-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_include_all_group(self):
    """
    Getter method for include_all_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/admin_groups/config/include_all_group (leafref)

    YANG Description: list of references to named admin-groups of which all must
be included
    """
    return self.__include_all_group
      
  def _set_include_all_group(self, v, load=False):
    """
    Setter method for include_all_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/admin_groups/config/include_all_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_include_all_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_include_all_group() directly.

    YANG Description: list of references to named admin-groups of which all must
be included
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-all-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """include_all_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-all-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__include_all_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_include_all_group(self):
    self.__include_all_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-all-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_include_any_group(self):
    """
    Getter method for include_any_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/admin_groups/config/include_any_group (leafref)

    YANG Description: list of references to named admin-groups of which one must
be included
    """
    return self.__include_any_group
      
  def _set_include_any_group(self, v, load=False):
    """
    Setter method for include_any_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/admin_groups/config/include_any_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_include_any_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_include_any_group() directly.

    YANG Description: list of references to named admin-groups of which one must
be included
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-any-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """include_any_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-any-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__include_any_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_include_any_group(self):
    self.__include_any_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-any-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)

  exclude_group = __builtin__.property(_get_exclude_group, _set_exclude_group)
  include_all_group = __builtin__.property(_get_include_all_group, _set_include_all_group)
  include_any_group = __builtin__.property(_get_include_any_group, _set_include_any_group)


  _pyangbind_elements = OrderedDict([('exclude_group', exclude_group), ('include_all_group', include_all_group), ('include_any_group', include_any_group), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_admin_groups_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-secondary-paths/p2p-secondary-path/admin-groups/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', '__exclude_group','__include_all_group','__include_any_group',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__exclude_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="exclude-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__include_all_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-all-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__include_any_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-any-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-secondary-paths', 'p2p-secondary-path', 'admin-groups', 'state']

  def _get_exclude_group(self):
    """
    Getter method for exclude_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/admin_groups/state/exclude_group (leafref)

    YANG Description: list of references to named admin-groups to exclude in
path calculation.
    """
    return self.__exclude_group
      
  def _set_exclude_group(self, v, load=False):
    """
    Setter method for exclude_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/admin_groups/state/exclude_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_exclude_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_exclude_group() directly.

    YANG Description: list of references to named admin-groups to exclude in
path calculation.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="exclude-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """exclude_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="exclude-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__exclude_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_exclude_group(self):
    self.__exclude_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="exclude-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_include_all_group(self):
    """
    Getter method for include_all_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/admin_groups/state/include_all_group (leafref)

    YANG Description: list of references to named admin-groups of which all must
be included
    """
    return self.__include_all_group
      
  def _set_include_all_group(self, v, load=False):
    """
    Setter method for include_all_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/admin_groups/state/include_all_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_include_all_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_include_all_group() directly.

    YANG Description: list of references to named admin-groups of which all must
be included
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-all-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """include_all_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-all-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__include_all_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_include_all_group(self):
    self.__include_all_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-all-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_include_any_group(self):
    """
    Getter method for include_any_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/admin_groups/state/include_any_group (leafref)

    YANG Description: list of references to named admin-groups of which one must
be included
    """
    return self.__include_any_group
      
  def _set_include_any_group(self, v, load=False):
    """
    Setter method for include_any_group, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/admin_groups/state/include_any_group (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_include_any_group is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_include_any_group() directly.

    YANG Description: list of references to named admin-groups of which one must
be included
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-any-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """include_any_group must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-any-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__include_any_group = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_include_any_group(self):
    self.__include_any_group = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="include-any-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)

  exclude_group = __builtin__.property(_get_exclude_group)
  include_all_group = __builtin__.property(_get_include_all_group)
  include_any_group = __builtin__.property(_get_include_any_group)


  _pyangbind_elements = OrderedDict([('exclude_group', exclude_group), ('include_all_group', include_all_group), ('include_any_group', include_any_group), ])


class yc_admin_groups_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_admin_groups(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-secondary-paths/p2p-secondary-path/admin-groups. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Top-level container for include/exclude constraints for
link affinities
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'admin-groups'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_admin_groups_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_admin_groups_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-secondary-paths', 'p2p-secondary-path', 'admin-groups']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/admin_groups/config (container)

    YANG Description: Configuration data 
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/admin_groups/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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_admin_groups_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_admin_groups_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_admin_groups_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/admin_groups/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 /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/admin_groups/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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_admin_groups_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_admin_groups_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_admin_groups_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_p2p_secondary_path_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-secondary-paths/p2p-secondary-path. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of p2p primary paths for a tunnel
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state','__path_metric_bound_constraints','__admin_groups',)

  _yang_name = 'p2p-secondary-path'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__path_metric_bound_constraints = YANGDynClass(base=yc_path_metric_bound_constraints_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_path_metric_bound_constraints, is_container='container', yang_name="path-metric-bound-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__admin_groups = YANGDynClass(base=yc_admin_groups_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_admin_groups, is_container='container', yang_name="admin-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-secondary-paths', 'p2p-secondary-path']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/name (leafref)

    YANG Description: Path name
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/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: Path 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/config (container)

    YANG Description: Configuration parameters related to paths
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/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 related to paths
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/state (container)

    YANG Description: State parameters related to paths
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/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 parameters related to paths
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_path_metric_bound_constraints(self):
    """
    Getter method for path_metric_bound_constraints, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/path_metric_bound_constraints (container)

    YANG Description: Enclosing container for the path metric bound constraints.
    """
    return self.__path_metric_bound_constraints
      
  def _set_path_metric_bound_constraints(self, v, load=False):
    """
    Setter method for path_metric_bound_constraints, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/path_metric_bound_constraints (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_metric_bound_constraints is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_metric_bound_constraints() directly.

    YANG Description: Enclosing container for the path metric bound constraints.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_path_metric_bound_constraints_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_path_metric_bound_constraints, is_container='container', yang_name="path-metric-bound-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_metric_bound_constraints must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_path_metric_bound_constraints_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_path_metric_bound_constraints, is_container='container', yang_name="path-metric-bound-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__path_metric_bound_constraints = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_metric_bound_constraints(self):
    self.__path_metric_bound_constraints = YANGDynClass(base=yc_path_metric_bound_constraints_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_path_metric_bound_constraints, is_container='container', yang_name="path-metric-bound-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_admin_groups(self):
    """
    Getter method for admin_groups, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/admin_groups (container)

    YANG Description: Top-level container for include/exclude constraints for
link affinities
    """
    return self.__admin_groups
      
  def _set_admin_groups(self, v, load=False):
    """
    Setter method for admin_groups, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path/admin_groups (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_admin_groups is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_admin_groups() directly.

    YANG Description: Top-level container for include/exclude constraints for
link affinities
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_admin_groups_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_admin_groups, is_container='container', yang_name="admin-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """admin_groups must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_admin_groups_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_admin_groups, is_container='container', yang_name="admin-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__admin_groups = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_admin_groups(self):
    self.__admin_groups = YANGDynClass(base=yc_admin_groups_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path_admin_groups, is_container='container', yang_name="admin-groups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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)
  path_metric_bound_constraints = __builtin__.property(_get_path_metric_bound_constraints, _set_path_metric_bound_constraints)
  admin_groups = __builtin__.property(_get_admin_groups, _set_admin_groups)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ('path_metric_bound_constraints', path_metric_bound_constraints), ('admin_groups', admin_groups), ])


class yc_p2p_secondary_paths_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-secondary-paths. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Secondary paths for the LSP
  """
  __slots__ = ('_path_helper', '_extmethods', '__p2p_secondary_path',)

  _yang_name = 'p2p-secondary-paths'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__p2p_secondary_path = YANGDynClass(base=YANGListType("name",yc_p2p_secondary_path_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path, yang_name="p2p-secondary-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="p2p-secondary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes', 'p2p-secondary-paths']

  def _get_p2p_secondary_path(self):
    """
    Getter method for p2p_secondary_path, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path (list)

    YANG Description: List of p2p primary paths for a tunnel
    """
    return self.__p2p_secondary_path
      
  def _set_p2p_secondary_path(self, v, load=False):
    """
    Setter method for p2p_secondary_path, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths/p2p_secondary_path (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_p2p_secondary_path is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_p2p_secondary_path() directly.

    YANG Description: List of p2p primary paths for a tunnel
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_p2p_secondary_path_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path, yang_name="p2p-secondary-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="p2p-secondary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """p2p_secondary_path must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_p2p_secondary_path_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path, yang_name="p2p-secondary-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="p2p-secondary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__p2p_secondary_path = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_p2p_secondary_path(self):
    self.__p2p_secondary_path = YANGDynClass(base=YANGListType("name",yc_p2p_secondary_path_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths_p2p_secondary_path, yang_name="p2p-secondary-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="p2p-secondary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  p2p_secondary_path = __builtin__.property(_get_p2p_secondary_path, _set_p2p_secondary_path)


  _pyangbind_elements = OrderedDict([('p2p_secondary_path', p2p_secondary_path), ])


class yc_p2p_tunnel_attributes_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Parameters related to LSPs of type P2P
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state','__p2p_primary_path','__p2p_secondary_paths',)

  _yang_name = 'p2p-tunnel-attributes'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__p2p_primary_path = YANGDynClass(base=yc_p2p_primary_path_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path, is_container='container', yang_name="p2p-primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__p2p_secondary_paths = YANGDynClass(base=yc_p2p_secondary_paths_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths, is_container='container', yang_name="p2p-secondary-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel', 'p2p-tunnel-attributes']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/config (container)

    YANG Description: Configuration parameters for P2P LSPs
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/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 P2P LSPs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/state (container)

    YANG Description: State parameters for P2P LSPs
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/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 parameters for P2P LSPs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_p2p_primary_path(self):
    """
    Getter method for p2p_primary_path, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path (container)

    YANG Description: Primary paths associated with the LSP
    """
    return self.__p2p_primary_path
      
  def _set_p2p_primary_path(self, v, load=False):
    """
    Setter method for p2p_primary_path, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_p2p_primary_path is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_p2p_primary_path() directly.

    YANG Description: Primary paths associated with the LSP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_p2p_primary_path_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path, is_container='container', yang_name="p2p-primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """p2p_primary_path must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_p2p_primary_path_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path, is_container='container', yang_name="p2p-primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__p2p_primary_path = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_p2p_primary_path(self):
    self.__p2p_primary_path = YANGDynClass(base=yc_p2p_primary_path_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_primary_path, is_container='container', yang_name="p2p-primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_p2p_secondary_paths(self):
    """
    Getter method for p2p_secondary_paths, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths (container)

    YANG Description: Secondary paths for the LSP
    """
    return self.__p2p_secondary_paths
      
  def _set_p2p_secondary_paths(self, v, load=False):
    """
    Setter method for p2p_secondary_paths, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_secondary_paths (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_p2p_secondary_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_p2p_secondary_paths() directly.

    YANG Description: Secondary paths for the LSP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_p2p_secondary_paths_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths, is_container='container', yang_name="p2p-secondary-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """p2p_secondary_paths must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_p2p_secondary_paths_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths, is_container='container', yang_name="p2p-secondary-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__p2p_secondary_paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_p2p_secondary_paths(self):
    self.__p2p_secondary_paths = YANGDynClass(base=yc_p2p_secondary_paths_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes_p2p_secondary_paths, is_container='container', yang_name="p2p-secondary-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)
  p2p_primary_path = __builtin__.property(_get_p2p_primary_path, _set_p2p_primary_path)
  p2p_secondary_paths = __builtin__.property(_get_p2p_secondary_paths, _set_p2p_secondary_paths)


  _pyangbind_elements = OrderedDict([('config', config), ('state', state), ('p2p_primary_path', p2p_primary_path), ('p2p_secondary_paths', p2p_secondary_paths), ])


class yc_tunnel_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels/tunnel. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of TE tunnels. This list contains only the LSPs that the
current device originates (i.e., for which it is the head-end).
Where the signaling protocol utilised for an LSP allows a mid-point
or tail device to be aware of the LSP (e.g., RSVP-TE), then the
associated sessions are maintained per protocol
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state','__bandwidth','__p2p_tunnel_attributes',)

  _yang_name = 'tunnel'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__bandwidth = YANGDynClass(base=yc_bandwidth_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth, is_container='container', yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__p2p_tunnel_attributes = YANGDynClass(base=yc_p2p_tunnel_attributes_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes, is_container='container', yang_name="p2p-tunnel-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels', 'tunnel']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/name (leafref)

    YANG Description: The tunnel name
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/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 tunnel 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/config (container)

    YANG Description: Configuration parameters related to TE tunnels:
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/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 related to TE tunnels:
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/state (container)

    YANG Description: State parameters related to TE tunnels
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/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 parameters related to TE tunnels
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_bandwidth(self):
    """
    Getter method for bandwidth, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth (container)

    YANG Description: Bandwidth configuration for TE LSPs
    """
    return self.__bandwidth
      
  def _set_bandwidth(self, v, load=False):
    """
    Setter method for bandwidth, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/bandwidth (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bandwidth is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bandwidth() directly.

    YANG Description: Bandwidth configuration for TE LSPs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_bandwidth_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth, is_container='container', yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bandwidth must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_bandwidth_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth, is_container='container', yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__bandwidth = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bandwidth(self):
    self.__bandwidth = YANGDynClass(base=yc_bandwidth_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_bandwidth, is_container='container', yang_name="bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_p2p_tunnel_attributes(self):
    """
    Getter method for p2p_tunnel_attributes, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes (container)

    YANG Description: Parameters related to LSPs of type P2P
    """
    return self.__p2p_tunnel_attributes
      
  def _set_p2p_tunnel_attributes(self, v, load=False):
    """
    Setter method for p2p_tunnel_attributes, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_p2p_tunnel_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_p2p_tunnel_attributes() directly.

    YANG Description: Parameters related to LSPs of type P2P
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_p2p_tunnel_attributes_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes, is_container='container', yang_name="p2p-tunnel-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """p2p_tunnel_attributes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_p2p_tunnel_attributes_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes, is_container='container', yang_name="p2p-tunnel-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__p2p_tunnel_attributes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_p2p_tunnel_attributes(self):
    self.__p2p_tunnel_attributes = YANGDynClass(base=yc_p2p_tunnel_attributes_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel_p2p_tunnel_attributes, is_container='container', yang_name="p2p-tunnel-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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)
  bandwidth = __builtin__.property(_get_bandwidth, _set_bandwidth)
  p2p_tunnel_attributes = __builtin__.property(_get_p2p_tunnel_attributes, _set_p2p_tunnel_attributes)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ('bandwidth', bandwidth), ('p2p_tunnel_attributes', p2p_tunnel_attributes), ])


class yc_tunnels_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path/tunnels. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for tunnels
  """
  __slots__ = ('_path_helper', '_extmethods', '__tunnel',)

  _yang_name = 'tunnels'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__tunnel = YANGDynClass(base=YANGListType("name",yc_tunnel_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path', 'tunnels']

  def _get_tunnel(self):
    """
    Getter method for tunnel, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel (list)

    YANG Description: List of TE tunnels. This list contains only the LSPs that the
current device originates (i.e., for which it is the head-end).
Where the signaling protocol utilised for an LSP allows a mid-point
or tail device to be aware of the LSP (e.g., RSVP-TE), then the
associated sessions are maintained per protocol
    """
    return self.__tunnel
      
  def _set_tunnel(self, v, load=False):
    """
    Setter method for tunnel, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tunnel is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tunnel() directly.

    YANG Description: List of TE tunnels. This list contains only the LSPs that the
current device originates (i.e., for which it is the head-end).
Where the signaling protocol utilised for an LSP allows a mid-point
or tail device to be aware of the LSP (e.g., RSVP-TE), then the
associated sessions are maintained per protocol
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_tunnel_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tunnel must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_tunnel_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__tunnel = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tunnel(self):
    self.__tunnel = YANGDynClass(base=YANGListType("name",yc_tunnel_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels_tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  tunnel = __builtin__.property(_get_tunnel, _set_tunnel)


  _pyangbind_elements = OrderedDict([('tunnel', tunnel), ])


class yc_constrained_path_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/constrained-path. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: traffic-engineered LSPs supporting different
path computation and signaling methods
  """
  __slots__ = ('_path_helper', '_extmethods', '__named_explicit_paths','__tunnels',)

  _yang_name = 'constrained-path'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__named_explicit_paths = YANGDynClass(base=yc_named_explicit_paths_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths, is_container='container', yang_name="named-explicit-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__tunnels = YANGDynClass(base=yc_tunnels_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'constrained-path']

  def _get_named_explicit_paths(self):
    """
    Getter method for named_explicit_paths, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths (container)

    YANG Description: Enclosing container for the named explicit paths
    """
    return self.__named_explicit_paths
      
  def _set_named_explicit_paths(self, v, load=False):
    """
    Setter method for named_explicit_paths, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/named_explicit_paths (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_named_explicit_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_named_explicit_paths() directly.

    YANG Description: Enclosing container for the named explicit paths
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_named_explicit_paths_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths, is_container='container', yang_name="named-explicit-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """named_explicit_paths must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_named_explicit_paths_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths, is_container='container', yang_name="named-explicit-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__named_explicit_paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_named_explicit_paths(self):
    self.__named_explicit_paths = YANGDynClass(base=yc_named_explicit_paths_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_named_explicit_paths, is_container='container', yang_name="named-explicit-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_tunnels(self):
    """
    Getter method for tunnels, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels (container)

    YANG Description: Enclosing container for tunnels
    """
    return self.__tunnels
      
  def _set_tunnels(self, v, load=False):
    """
    Setter method for tunnels, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_tunnels is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_tunnels() directly.

    YANG Description: Enclosing container for tunnels
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_tunnels_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """tunnels must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_tunnels_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__tunnels = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_tunnels(self):
    self.__tunnels = YANGDynClass(base=yc_tunnels_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path_tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  named_explicit_paths = __builtin__.property(_get_named_explicit_paths, _set_named_explicit_paths)
  tunnels = __builtin__.property(_get_tunnels, _set_tunnels)


  _pyangbind_elements = OrderedDict([('named_explicit_paths', named_explicit_paths), ('tunnels', tunnels), ])


class yc_path_setup_protocol_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_unconstrained_path_path_setup_protocol(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/unconstrained-path/path-setup-protocol. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: select and configure the signaling method for
 the LSP
  """
  _pyangbind_elements = {}

  

class yc_unconstrained_path_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_unconstrained_path(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/unconstrained-path. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: LSPs that use the IGP-determined path, i.e., non
traffic-engineered, or non constrained-path
  """
  __slots__ = ('_path_helper', '_extmethods', '__path_setup_protocol',)

  _yang_name = 'unconstrained-path'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__path_setup_protocol = YANGDynClass(base=yc_path_setup_protocol_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_unconstrained_path_path_setup_protocol, is_container='container', yang_name="path-setup-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'unconstrained-path']

  def _get_path_setup_protocol(self):
    """
    Getter method for path_setup_protocol, mapped from YANG variable /network_instances/network_instance/mpls/lsps/unconstrained_path/path_setup_protocol (container)

    YANG Description: select and configure the signaling method for
 the LSP
    """
    return self.__path_setup_protocol
      
  def _set_path_setup_protocol(self, v, load=False):
    """
    Setter method for path_setup_protocol, mapped from YANG variable /network_instances/network_instance/mpls/lsps/unconstrained_path/path_setup_protocol (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_setup_protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_setup_protocol() directly.

    YANG Description: select and configure the signaling method for
 the LSP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_path_setup_protocol_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_unconstrained_path_path_setup_protocol, is_container='container', yang_name="path-setup-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """path_setup_protocol must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_path_setup_protocol_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_unconstrained_path_path_setup_protocol, is_container='container', yang_name="path-setup-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__path_setup_protocol = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_path_setup_protocol(self):
    self.__path_setup_protocol = YANGDynClass(base=yc_path_setup_protocol_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_unconstrained_path_path_setup_protocol, is_container='container', yang_name="path-setup-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  path_setup_protocol = __builtin__.property(_get_path_setup_protocol, _set_path_setup_protocol)


  _pyangbind_elements = OrderedDict([('path_setup_protocol', path_setup_protocol), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/static-lsps/static-lsp/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for the static lsp
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'static-lsps', 'static-lsp', 'config']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/config/name (string)

    YANG Description: name to identify the LSP
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/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 to identify the LSP
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)

  name = __builtin__.property(_get_name, _set_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/static-lsps/static-lsp/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 static lsp
  """
  __slots__ = ('_path_helper', '_extmethods', '__name',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'static-lsps', 'static-lsp', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/state/name (string)

    YANG Description: name to identify the LSP
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/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 to identify the LSP
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)

  name = __builtin__.property(_get_name)


  _pyangbind_elements = OrderedDict([('name', name), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_ingress_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/static-lsps/static-lsp/ingress/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for ingress LSPs
  """
  __slots__ = ('_path_helper', '_extmethods', '__next_hop','__incoming_label','__push_label',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__next_hop = 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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)
    self.__incoming_label = 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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)
    self.__push_label = 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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'lsps', 'static-lsps', 'static-lsp', 'ingress', 'config']

  def _get_next_hop(self):
    """
    Getter method for next_hop, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/ingress/config/next_hop (inet:ip-address)

    YANG Description: next hop IP address for the LSP
    """
    return self.__next_hop
      
  def _set_next_hop(self, v, load=False):
    """
    Setter method for next_hop, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/ingress/config/next_hop (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hop() directly.

    YANG Description: next hop IP address for the LSP
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hop must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)""",
        })

    self.__next_hop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_next_hop(self):
    self.__next_hop = 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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)


  def _get_incoming_label(self):
    """
    Getter method for incoming_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/ingress/config/incoming_label (oc-mplst:mpls-label)

    YANG Description: label value on the incoming packet
    """
    return self.__incoming_label
      
  def _set_incoming_label(self, v, load=False):
    """
    Setter method for incoming_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/ingress/config/incoming_label (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_incoming_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_incoming_label() directly.

    YANG Description: label value on the incoming packet
    """
    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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """incoming_label must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)""",
        })

    self.__incoming_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_incoming_label(self):
    self.__incoming_label = 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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)


  def _get_push_label(self):
    """
    Getter method for push_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/ingress/config/push_label (oc-mplst:mpls-label)

    YANG Description: label value to push at the current hop for the
LSP
    """
    return self.__push_label
      
  def _set_push_label(self, v, load=False):
    """
    Setter method for push_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/ingress/config/push_label (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_push_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_push_label() directly.

    YANG Description: label value to push at the current hop for the
LSP
    """
    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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """push_label must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)""",
        })

    self.__push_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_push_label(self):
    self.__push_label = 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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)

  next_hop = __builtin__.property(_get_next_hop, _set_next_hop)
  incoming_label = __builtin__.property(_get_incoming_label, _set_incoming_label)
  push_label = __builtin__.property(_get_push_label, _set_push_label)


  _pyangbind_elements = OrderedDict([('next_hop', next_hop), ('incoming_label', incoming_label), ('push_label', push_label), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_ingress_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/static-lsps/static-lsp/ingress/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for ingress LSPs
  """
  __slots__ = ('_path_helper', '_extmethods', '__next_hop','__incoming_label','__push_label',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__next_hop = 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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    self.__incoming_label = 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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    self.__push_label = 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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'static-lsps', 'static-lsp', 'ingress', 'state']

  def _get_next_hop(self):
    """
    Getter method for next_hop, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/ingress/state/next_hop (inet:ip-address)

    YANG Description: next hop IP address for the LSP
    """
    return self.__next_hop
      
  def _set_next_hop(self, v, load=False):
    """
    Setter method for next_hop, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/ingress/state/next_hop (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hop() directly.

    YANG Description: next hop IP address for the LSP
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hop must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)""",
        })

    self.__next_hop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_next_hop(self):
    self.__next_hop = 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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)


  def _get_incoming_label(self):
    """
    Getter method for incoming_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/ingress/state/incoming_label (oc-mplst:mpls-label)

    YANG Description: label value on the incoming packet
    """
    return self.__incoming_label
      
  def _set_incoming_label(self, v, load=False):
    """
    Setter method for incoming_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/ingress/state/incoming_label (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_incoming_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_incoming_label() directly.

    YANG Description: label value on the incoming packet
    """
    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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """incoming_label must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)""",
        })

    self.__incoming_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_incoming_label(self):
    self.__incoming_label = 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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)


  def _get_push_label(self):
    """
    Getter method for push_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/ingress/state/push_label (oc-mplst:mpls-label)

    YANG Description: label value to push at the current hop for the
LSP
    """
    return self.__push_label
      
  def _set_push_label(self, v, load=False):
    """
    Setter method for push_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/ingress/state/push_label (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_push_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_push_label() directly.

    YANG Description: label value to push at the current hop for the
LSP
    """
    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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """push_label must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)""",
        })

    self.__push_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_push_label(self):
    self.__push_label = 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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)

  next_hop = __builtin__.property(_get_next_hop)
  incoming_label = __builtin__.property(_get_incoming_label)
  push_label = __builtin__.property(_get_push_label)


  _pyangbind_elements = OrderedDict([('next_hop', next_hop), ('incoming_label', incoming_label), ('push_label', push_label), ])


class yc_ingress_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_ingress(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/static-lsps/static-lsp/ingress. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Static LSPs for which the router is an
 ingress node
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'ingress'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_ingress_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_ingress_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'static-lsps', 'static-lsp', 'ingress']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/ingress/config (container)

    YANG Description: Configuration data for ingress LSPs
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/ingress/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 ingress LSPs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_ingress_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_ingress_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_ingress_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/ingress/state (container)

    YANG Description: Operational state data for ingress LSPs
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/ingress/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 ingress LSPs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_ingress_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_ingress_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_ingress_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_transit_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/static-lsps/static-lsp/transit/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for transit LSPs
  """
  __slots__ = ('_path_helper', '_extmethods', '__next_hop','__incoming_label','__push_label',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__next_hop = 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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)
    self.__incoming_label = 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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)
    self.__push_label = 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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'lsps', 'static-lsps', 'static-lsp', 'transit', 'config']

  def _get_next_hop(self):
    """
    Getter method for next_hop, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/transit/config/next_hop (inet:ip-address)

    YANG Description: next hop IP address for the LSP
    """
    return self.__next_hop
      
  def _set_next_hop(self, v, load=False):
    """
    Setter method for next_hop, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/transit/config/next_hop (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hop() directly.

    YANG Description: next hop IP address for the LSP
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hop must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)""",
        })

    self.__next_hop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_next_hop(self):
    self.__next_hop = 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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)


  def _get_incoming_label(self):
    """
    Getter method for incoming_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/transit/config/incoming_label (oc-mplst:mpls-label)

    YANG Description: label value on the incoming packet
    """
    return self.__incoming_label
      
  def _set_incoming_label(self, v, load=False):
    """
    Setter method for incoming_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/transit/config/incoming_label (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_incoming_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_incoming_label() directly.

    YANG Description: label value on the incoming packet
    """
    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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """incoming_label must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)""",
        })

    self.__incoming_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_incoming_label(self):
    self.__incoming_label = 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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)


  def _get_push_label(self):
    """
    Getter method for push_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/transit/config/push_label (oc-mplst:mpls-label)

    YANG Description: label value to push at the current hop for the
LSP
    """
    return self.__push_label
      
  def _set_push_label(self, v, load=False):
    """
    Setter method for push_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/transit/config/push_label (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_push_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_push_label() directly.

    YANG Description: label value to push at the current hop for the
LSP
    """
    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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """push_label must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)""",
        })

    self.__push_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_push_label(self):
    self.__push_label = 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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)

  next_hop = __builtin__.property(_get_next_hop, _set_next_hop)
  incoming_label = __builtin__.property(_get_incoming_label, _set_incoming_label)
  push_label = __builtin__.property(_get_push_label, _set_push_label)


  _pyangbind_elements = OrderedDict([('next_hop', next_hop), ('incoming_label', incoming_label), ('push_label', push_label), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_transit_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/static-lsps/static-lsp/transit/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for transit LSPs
  """
  __slots__ = ('_path_helper', '_extmethods', '__next_hop','__incoming_label','__push_label',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__next_hop = 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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    self.__incoming_label = 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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    self.__push_label = 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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'static-lsps', 'static-lsp', 'transit', 'state']

  def _get_next_hop(self):
    """
    Getter method for next_hop, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/transit/state/next_hop (inet:ip-address)

    YANG Description: next hop IP address for the LSP
    """
    return self.__next_hop
      
  def _set_next_hop(self, v, load=False):
    """
    Setter method for next_hop, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/transit/state/next_hop (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hop() directly.

    YANG Description: next hop IP address for the LSP
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hop must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)""",
        })

    self.__next_hop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_next_hop(self):
    self.__next_hop = 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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)


  def _get_incoming_label(self):
    """
    Getter method for incoming_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/transit/state/incoming_label (oc-mplst:mpls-label)

    YANG Description: label value on the incoming packet
    """
    return self.__incoming_label
      
  def _set_incoming_label(self, v, load=False):
    """
    Setter method for incoming_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/transit/state/incoming_label (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_incoming_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_incoming_label() directly.

    YANG Description: label value on the incoming packet
    """
    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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """incoming_label must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)""",
        })

    self.__incoming_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_incoming_label(self):
    self.__incoming_label = 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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)


  def _get_push_label(self):
    """
    Getter method for push_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/transit/state/push_label (oc-mplst:mpls-label)

    YANG Description: label value to push at the current hop for the
LSP
    """
    return self.__push_label
      
  def _set_push_label(self, v, load=False):
    """
    Setter method for push_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/transit/state/push_label (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_push_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_push_label() directly.

    YANG Description: label value to push at the current hop for the
LSP
    """
    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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """push_label must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)""",
        })

    self.__push_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_push_label(self):
    self.__push_label = 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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)

  next_hop = __builtin__.property(_get_next_hop)
  incoming_label = __builtin__.property(_get_incoming_label)
  push_label = __builtin__.property(_get_push_label)


  _pyangbind_elements = OrderedDict([('next_hop', next_hop), ('incoming_label', incoming_label), ('push_label', push_label), ])


class yc_transit_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_transit(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/static-lsps/static-lsp/transit. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Static LSPs for which the router is an
 transit node
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'transit'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_transit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_transit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'static-lsps', 'static-lsp', 'transit']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/transit/config (container)

    YANG Description: Configuration data for transit LSPs
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/transit/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 transit LSPs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_transit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_transit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_transit_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/transit/state (container)

    YANG Description: Operational state data for transit LSPs
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/transit/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 transit LSPs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_transit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_transit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_transit_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_egress_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/static-lsps/static-lsp/egress/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration data for egress LSPs
  """
  __slots__ = ('_path_helper', '_extmethods', '__next_hop','__incoming_label','__push_label',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__next_hop = 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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)
    self.__incoming_label = 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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)
    self.__push_label = 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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'mpls', 'lsps', 'static-lsps', 'static-lsp', 'egress', 'config']

  def _get_next_hop(self):
    """
    Getter method for next_hop, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/egress/config/next_hop (inet:ip-address)

    YANG Description: next hop IP address for the LSP
    """
    return self.__next_hop
      
  def _set_next_hop(self, v, load=False):
    """
    Setter method for next_hop, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/egress/config/next_hop (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hop() directly.

    YANG Description: next hop IP address for the LSP
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hop must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)""",
        })

    self.__next_hop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_next_hop(self):
    self.__next_hop = 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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)


  def _get_incoming_label(self):
    """
    Getter method for incoming_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/egress/config/incoming_label (oc-mplst:mpls-label)

    YANG Description: label value on the incoming packet
    """
    return self.__incoming_label
      
  def _set_incoming_label(self, v, load=False):
    """
    Setter method for incoming_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/egress/config/incoming_label (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_incoming_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_incoming_label() directly.

    YANG Description: label value on the incoming packet
    """
    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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """incoming_label must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)""",
        })

    self.__incoming_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_incoming_label(self):
    self.__incoming_label = 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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)


  def _get_push_label(self):
    """
    Getter method for push_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/egress/config/push_label (oc-mplst:mpls-label)

    YANG Description: label value to push at the current hop for the
LSP
    """
    return self.__push_label
      
  def _set_push_label(self, v, load=False):
    """
    Setter method for push_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/egress/config/push_label (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_push_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_push_label() directly.

    YANG Description: label value to push at the current hop for the
LSP
    """
    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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """push_label must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)""",
        })

    self.__push_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_push_label(self):
    self.__push_label = 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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=True)

  next_hop = __builtin__.property(_get_next_hop, _set_next_hop)
  incoming_label = __builtin__.property(_get_incoming_label, _set_incoming_label)
  push_label = __builtin__.property(_get_push_label, _set_push_label)


  _pyangbind_elements = OrderedDict([('next_hop', next_hop), ('incoming_label', incoming_label), ('push_label', push_label), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_egress_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/static-lsps/static-lsp/egress/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for egress LSPs
  """
  __slots__ = ('_path_helper', '_extmethods', '__next_hop','__incoming_label','__push_label',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__next_hop = 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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    self.__incoming_label = 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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    self.__push_label = 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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'static-lsps', 'static-lsp', 'egress', 'state']

  def _get_next_hop(self):
    """
    Getter method for next_hop, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/egress/state/next_hop (inet:ip-address)

    YANG Description: next hop IP address for the LSP
    """
    return self.__next_hop
      
  def _set_next_hop(self, v, load=False):
    """
    Setter method for next_hop, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/egress/state/next_hop (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hop() directly.

    YANG Description: next hop IP address for the LSP
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hop must be of a type compatible with inet:ip-address""",
          'defined-type': "inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)""",
        })

    self.__next_hop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_next_hop(self):
    self.__next_hop = 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}'}),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}|:))'}),], is_leaf=True, yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=False)


  def _get_incoming_label(self):
    """
    Getter method for incoming_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/egress/state/incoming_label (oc-mplst:mpls-label)

    YANG Description: label value on the incoming packet
    """
    return self.__incoming_label
      
  def _set_incoming_label(self, v, load=False):
    """
    Setter method for incoming_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/egress/state/incoming_label (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_incoming_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_incoming_label() directly.

    YANG Description: label value on the incoming packet
    """
    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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """incoming_label must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)""",
        })

    self.__incoming_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_incoming_label(self):
    self.__incoming_label = 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="incoming-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)


  def _get_push_label(self):
    """
    Getter method for push_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/egress/state/push_label (oc-mplst:mpls-label)

    YANG Description: label value to push at the current hop for the
LSP
    """
    return self.__push_label
      
  def _set_push_label(self, v, load=False):
    """
    Setter method for push_label, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/egress/state/push_label (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_push_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_push_label() directly.

    YANG Description: label value to push at the current hop for the
LSP
    """
    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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """push_label must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst: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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)""",
        })

    self.__push_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_push_label(self):
    self.__push_label = 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="push-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)

  next_hop = __builtin__.property(_get_next_hop)
  incoming_label = __builtin__.property(_get_incoming_label)
  push_label = __builtin__.property(_get_push_label)


  _pyangbind_elements = OrderedDict([('next_hop', next_hop), ('incoming_label', incoming_label), ('push_label', push_label), ])


class yc_egress_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_egress(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/static-lsps/static-lsp/egress. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Static LSPs for which the router is an
 egress node
  """
  __slots__ = ('_path_helper', '_extmethods', '__config','__state',)

  _yang_name = 'egress'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_egress_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_egress_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'static-lsps', 'static-lsp', 'egress']

  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/egress/config (container)

    YANG Description: Configuration data for egress LSPs
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/egress/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 egress LSPs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_egress_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_egress_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_egress_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/egress/state (container)

    YANG Description: Operational state data for egress LSPs
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/egress/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 egress LSPs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_egress_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_egress_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_egress_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_static_lsp_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/static-lsps/static-lsp. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: list of defined static LSPs
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__config','__state','__ingress','__transit','__egress',)

  _yang_name = 'static-lsp'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__ingress = YANGDynClass(base=yc_ingress_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_ingress, is_container='container', yang_name="ingress", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__transit = YANGDynClass(base=yc_transit_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_transit, is_container='container', yang_name="transit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__egress = YANGDynClass(base=yc_egress_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_egress, is_container='container', yang_name="egress", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'static-lsps', 'static-lsp']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/name (leafref)

    YANG Description: Reference the name list key
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/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 the 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/config (container)

    YANG Description: Configuration data for the static lsp
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/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 static lsp
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/state (container)

    YANG Description: Operational state data for the static lsp
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/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 static lsp
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_ingress(self):
    """
    Getter method for ingress, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/ingress (container)

    YANG Description: Static LSPs for which the router is an
 ingress node
    """
    return self.__ingress
      
  def _set_ingress(self, v, load=False):
    """
    Setter method for ingress, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/ingress (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ingress is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ingress() directly.

    YANG Description: Static LSPs for which the router is an
 ingress node
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_ingress_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_ingress, is_container='container', yang_name="ingress", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ingress must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_ingress_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_ingress, is_container='container', yang_name="ingress", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__ingress = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ingress(self):
    self.__ingress = YANGDynClass(base=yc_ingress_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_ingress, is_container='container', yang_name="ingress", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_transit(self):
    """
    Getter method for transit, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/transit (container)

    YANG Description: Static LSPs for which the router is an
 transit node
    """
    return self.__transit
      
  def _set_transit(self, v, load=False):
    """
    Setter method for transit, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/transit (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_transit is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_transit() directly.

    YANG Description: Static LSPs for which the router is an
 transit node
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_transit_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_transit, is_container='container', yang_name="transit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """transit must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_transit_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_transit, is_container='container', yang_name="transit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__transit = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_transit(self):
    self.__transit = YANGDynClass(base=yc_transit_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_transit, is_container='container', yang_name="transit", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_egress(self):
    """
    Getter method for egress, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/egress (container)

    YANG Description: Static LSPs for which the router is an
 egress node
    """
    return self.__egress
      
  def _set_egress(self, v, load=False):
    """
    Setter method for egress, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp/egress (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_egress is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_egress() directly.

    YANG Description: Static LSPs for which the router is an
 egress node
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_egress_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_egress, is_container='container', yang_name="egress", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """egress must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_egress_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_egress, is_container='container', yang_name="egress", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__egress = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_egress(self):
    self.__egress = YANGDynClass(base=yc_egress_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp_egress, is_container='container', yang_name="egress", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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)
  ingress = __builtin__.property(_get_ingress, _set_ingress)
  transit = __builtin__.property(_get_transit, _set_transit)
  egress = __builtin__.property(_get_egress, _set_egress)


  _pyangbind_elements = OrderedDict([('name', name), ('config', config), ('state', state), ('ingress', ingress), ('transit', transit), ('egress', egress), ])


class yc_static_lsps_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps/static-lsps. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: statically configured LSPs, without dynamic
signaling
  """
  __slots__ = ('_path_helper', '_extmethods', '__static_lsp',)

  _yang_name = 'static-lsps'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__static_lsp = YANGDynClass(base=YANGListType("name",yc_static_lsp_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp, yang_name="static-lsp", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="static-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps', 'static-lsps']

  def _get_static_lsp(self):
    """
    Getter method for static_lsp, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp (list)

    YANG Description: list of defined static LSPs
    """
    return self.__static_lsp
      
  def _set_static_lsp(self, v, load=False):
    """
    Setter method for static_lsp, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps/static_lsp (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_static_lsp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_static_lsp() directly.

    YANG Description: list of defined static LSPs
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("name",yc_static_lsp_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp, yang_name="static-lsp", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="static-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """static_lsp must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("name",yc_static_lsp_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp, yang_name="static-lsp", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="static-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__static_lsp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_static_lsp(self):
    self.__static_lsp = YANGDynClass(base=YANGListType("name",yc_static_lsp_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps_static_lsp, yang_name="static-lsp", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="static-lsp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  static_lsp = __builtin__.property(_get_static_lsp, _set_static_lsp)


  _pyangbind_elements = OrderedDict([('static_lsp', static_lsp), ])


class yc_lsps_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls/lsps. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: LSP definitions and configuration
  """
  __slots__ = ('_path_helper', '_extmethods', '__constrained_path','__unconstrained_path','__static_lsps',)

  _yang_name = 'lsps'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__constrained_path = YANGDynClass(base=yc_constrained_path_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path, is_container='container', yang_name="constrained-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__unconstrained_path = YANGDynClass(base=yc_unconstrained_path_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_unconstrained_path, is_container='container', yang_name="unconstrained-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__static_lsps = YANGDynClass(base=yc_static_lsps_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps, is_container='container', yang_name="static-lsps", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls', 'lsps']

  def _get_constrained_path(self):
    """
    Getter method for constrained_path, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path (container)

    YANG Description: traffic-engineered LSPs supporting different
path computation and signaling methods
    """
    return self.__constrained_path
      
  def _set_constrained_path(self, v, load=False):
    """
    Setter method for constrained_path, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_constrained_path is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_constrained_path() directly.

    YANG Description: traffic-engineered LSPs supporting different
path computation and signaling methods
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_constrained_path_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path, is_container='container', yang_name="constrained-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """constrained_path must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_constrained_path_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path, is_container='container', yang_name="constrained-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__constrained_path = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_constrained_path(self):
    self.__constrained_path = YANGDynClass(base=yc_constrained_path_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_constrained_path, is_container='container', yang_name="constrained-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_unconstrained_path(self):
    """
    Getter method for unconstrained_path, mapped from YANG variable /network_instances/network_instance/mpls/lsps/unconstrained_path (container)

    YANG Description: LSPs that use the IGP-determined path, i.e., non
traffic-engineered, or non constrained-path
    """
    return self.__unconstrained_path
      
  def _set_unconstrained_path(self, v, load=False):
    """
    Setter method for unconstrained_path, mapped from YANG variable /network_instances/network_instance/mpls/lsps/unconstrained_path (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_unconstrained_path is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_unconstrained_path() directly.

    YANG Description: LSPs that use the IGP-determined path, i.e., non
traffic-engineered, or non constrained-path
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_unconstrained_path_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_unconstrained_path, is_container='container', yang_name="unconstrained-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """unconstrained_path must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_unconstrained_path_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_unconstrained_path, is_container='container', yang_name="unconstrained-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__unconstrained_path = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_unconstrained_path(self):
    self.__unconstrained_path = YANGDynClass(base=yc_unconstrained_path_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_unconstrained_path, is_container='container', yang_name="unconstrained-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_static_lsps(self):
    """
    Getter method for static_lsps, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps (container)

    YANG Description: statically configured LSPs, without dynamic
signaling
    """
    return self.__static_lsps
      
  def _set_static_lsps(self, v, load=False):
    """
    Setter method for static_lsps, mapped from YANG variable /network_instances/network_instance/mpls/lsps/static_lsps (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_static_lsps is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_static_lsps() directly.

    YANG Description: statically configured LSPs, without dynamic
signaling
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_static_lsps_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps, is_container='container', yang_name="static-lsps", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """static_lsps must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_static_lsps_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps, is_container='container', yang_name="static-lsps", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__static_lsps = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_static_lsps(self):
    self.__static_lsps = YANGDynClass(base=yc_static_lsps_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps_static_lsps, is_container='container', yang_name="static-lsps", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  constrained_path = __builtin__.property(_get_constrained_path, _set_constrained_path)
  unconstrained_path = __builtin__.property(_get_unconstrained_path, _set_unconstrained_path)
  static_lsps = __builtin__.property(_get_static_lsps, _set_static_lsps)


  _pyangbind_elements = OrderedDict([('constrained_path', constrained_path), ('unconstrained_path', unconstrained_path), ('static_lsps', static_lsps), ])


class yc_mpls_openconfig_network_instance_l2__network_instances_network_instance_mpls(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/mpls. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Anchor point for mpls configuration and operational
data
  """
  __slots__ = ('_path_helper', '_extmethods', '__global_','__te_global_attributes','__te_interface_attributes','__signaling_protocols','__lsps',)

  _yang_name = 'mpls'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__global_ = YANGDynClass(base=yc_global__openconfig_network_instance_l2__network_instances_network_instance_mpls_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__te_global_attributes = YANGDynClass(base=yc_te_global_attributes_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes, is_container='container', yang_name="te-global-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__te_interface_attributes = YANGDynClass(base=yc_te_interface_attributes_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes, is_container='container', yang_name="te-interface-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__signaling_protocols = YANGDynClass(base=yc_signaling_protocols_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols, is_container='container', yang_name="signaling-protocols", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__lsps = YANGDynClass(base=yc_lsps_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps, is_container='container', yang_name="lsps", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'mpls']

  def _get_global_(self):
    """
    Getter method for global_, mapped from YANG variable /network_instances/network_instance/mpls/global (container)

    YANG Description: general mpls configuration applicable to any
type of LSP and signaling protocol - label ranges,
entropy label supportmay be added here
    """
    return self.__global_
      
  def _set_global_(self, v, load=False):
    """
    Setter method for global_, mapped from YANG variable /network_instances/network_instance/mpls/global (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_global_ is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_global_() directly.

    YANG Description: general mpls configuration applicable to any
type of LSP and signaling protocol - label ranges,
entropy label supportmay be added here
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_global__openconfig_network_instance_l2__network_instances_network_instance_mpls_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """global_ must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_global__openconfig_network_instance_l2__network_instances_network_instance_mpls_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__global_ = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_global_(self):
    self.__global_ = YANGDynClass(base=yc_global__openconfig_network_instance_l2__network_instances_network_instance_mpls_global, is_container='container', yang_name="global", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_te_global_attributes(self):
    """
    Getter method for te_global_attributes, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes (container)

    YANG Description: traffic-engineering global attributes
    """
    return self.__te_global_attributes
      
  def _set_te_global_attributes(self, v, load=False):
    """
    Setter method for te_global_attributes, mapped from YANG variable /network_instances/network_instance/mpls/te_global_attributes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_te_global_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_te_global_attributes() directly.

    YANG Description: traffic-engineering global attributes
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_te_global_attributes_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes, is_container='container', yang_name="te-global-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """te_global_attributes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_te_global_attributes_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes, is_container='container', yang_name="te-global-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__te_global_attributes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_te_global_attributes(self):
    self.__te_global_attributes = YANGDynClass(base=yc_te_global_attributes_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_global_attributes, is_container='container', yang_name="te-global-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_te_interface_attributes(self):
    """
    Getter method for te_interface_attributes, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes (container)

    YANG Description: traffic engineering attributes specific
for interfaces
    """
    return self.__te_interface_attributes
      
  def _set_te_interface_attributes(self, v, load=False):
    """
    Setter method for te_interface_attributes, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_te_interface_attributes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_te_interface_attributes() directly.

    YANG Description: traffic engineering attributes specific
for interfaces
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_te_interface_attributes_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes, is_container='container', yang_name="te-interface-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """te_interface_attributes must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_te_interface_attributes_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes, is_container='container', yang_name="te-interface-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__te_interface_attributes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_te_interface_attributes(self):
    self.__te_interface_attributes = YANGDynClass(base=yc_te_interface_attributes_openconfig_network_instance_l2__network_instances_network_instance_mpls_te_interface_attributes, is_container='container', yang_name="te-interface-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_signaling_protocols(self):
    """
    Getter method for signaling_protocols, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols (container)

    YANG Description: top-level signaling protocol configuration
    """
    return self.__signaling_protocols
      
  def _set_signaling_protocols(self, v, load=False):
    """
    Setter method for signaling_protocols, mapped from YANG variable /network_instances/network_instance/mpls/signaling_protocols (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_signaling_protocols is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_signaling_protocols() directly.

    YANG Description: top-level signaling protocol configuration
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_signaling_protocols_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols, is_container='container', yang_name="signaling-protocols", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """signaling_protocols must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_signaling_protocols_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols, is_container='container', yang_name="signaling-protocols", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__signaling_protocols = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_signaling_protocols(self):
    self.__signaling_protocols = YANGDynClass(base=yc_signaling_protocols_openconfig_network_instance_l2__network_instances_network_instance_mpls_signaling_protocols, is_container='container', yang_name="signaling-protocols", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_lsps(self):
    """
    Getter method for lsps, mapped from YANG variable /network_instances/network_instance/mpls/lsps (container)

    YANG Description: LSP definitions and configuration
    """
    return self.__lsps
      
  def _set_lsps(self, v, load=False):
    """
    Setter method for lsps, mapped from YANG variable /network_instances/network_instance/mpls/lsps (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_lsps is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_lsps() directly.

    YANG Description: LSP definitions and configuration
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_lsps_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps, is_container='container', yang_name="lsps", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """lsps must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_lsps_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps, is_container='container', yang_name="lsps", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__lsps = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_lsps(self):
    self.__lsps = YANGDynClass(base=yc_lsps_openconfig_network_instance_l2__network_instances_network_instance_mpls_lsps, is_container='container', yang_name="lsps", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  global_ = __builtin__.property(_get_global_, _set_global_)
  te_global_attributes = __builtin__.property(_get_te_global_attributes, _set_te_global_attributes)
  te_interface_attributes = __builtin__.property(_get_te_interface_attributes, _set_te_interface_attributes)
  signaling_protocols = __builtin__.property(_get_signaling_protocols, _set_signaling_protocols)
  lsps = __builtin__.property(_get_lsps, _set_lsps)


  _pyangbind_elements = OrderedDict([('global_', global_), ('te_global_attributes', te_global_attributes), ('te_interface_attributes', te_interface_attributes), ('signaling_protocols', signaling_protocols), ('lsps', lsps), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_srgbs_srgb_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/segment-routing/srgbs/srgb/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 SRGB.
  """
  __slots__ = ('_path_helper', '_extmethods', '__local_id','__dataplane_type','__mpls_label_blocks','__ipv6_prefixes',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__local_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__dataplane_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'MPLS': {}, 'IPV6': {}},), is_leaf=True, yang_name="dataplane-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-dataplane-type', is_config=True)
    self.__mpls_label_blocks = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="mpls-label-blocks", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__ipv6_prefixes = YANGDynClass(unique=True, base=TypedListType(allowed_type=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=False, yang_name="ipv6-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'segment-routing', 'srgbs', 'srgb', 'config']

  def _get_local_id(self):
    """
    Getter method for local_id, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/config/local_id (string)

    YANG Description: Unique identifier for the segment routing global block on
the local system.
    """
    return self.__local_id
      
  def _set_local_id(self, v, load=False):
    """
    Setter method for local_id, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/config/local_id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_id() directly.

    YANG Description: Unique identifier for the segment routing global block on
the local system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)""",
        })

    self.__local_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_id(self):
    self.__local_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_dataplane_type(self):
    """
    Getter method for dataplane_type, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/config/dataplane_type (oc-srt:sr-dataplane-type)

    YANG Description: The dataplane being used to instantiate the SRGB. When MPLS is specified
the set of MPLS label blocks that are defined in the mpls-label-blocks
list are used to make up the SRGB. When IPv6 is specified, the set of IPv6
prefixes specified in the ipv6-prefixes list are used.
    """
    return self.__dataplane_type
      
  def _set_dataplane_type(self, v, load=False):
    """
    Setter method for dataplane_type, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/config/dataplane_type (oc-srt:sr-dataplane-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dataplane_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dataplane_type() directly.

    YANG Description: The dataplane being used to instantiate the SRGB. When MPLS is specified
the set of MPLS label blocks that are defined in the mpls-label-blocks
list are used to make up the SRGB. When IPv6 is specified, the set of IPv6
prefixes specified in the ipv6-prefixes list are used.
    """
    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={'MPLS': {}, 'IPV6': {}},), is_leaf=True, yang_name="dataplane-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-dataplane-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dataplane_type must be of a type compatible with oc-srt:sr-dataplane-type""",
          'defined-type': "oc-srt:sr-dataplane-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'MPLS': {}, 'IPV6': {}},), is_leaf=True, yang_name="dataplane-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-dataplane-type', is_config=True)""",
        })

    self.__dataplane_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dataplane_type(self):
    self.__dataplane_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'MPLS': {}, 'IPV6': {}},), is_leaf=True, yang_name="dataplane-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-dataplane-type', is_config=True)


  def _get_mpls_label_blocks(self):
    """
    Getter method for mpls_label_blocks, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/config/mpls_label_blocks (leafref)

    YANG Description: A list of refences to the label blocks that are used to make
up the SRGB.
    """
    return self.__mpls_label_blocks
      
  def _set_mpls_label_blocks(self, v, load=False):
    """
    Setter method for mpls_label_blocks, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/config/mpls_label_blocks (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mpls_label_blocks is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mpls_label_blocks() directly.

    YANG Description: A list of refences to the label blocks that are used to make
up the SRGB.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="mpls-label-blocks", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mpls_label_blocks must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="mpls-label-blocks", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__mpls_label_blocks = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mpls_label_blocks(self):
    self.__mpls_label_blocks = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="mpls-label-blocks", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_ipv6_prefixes(self):
    """
    Getter method for ipv6_prefixes, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/config/ipv6_prefixes (inet:ipv6-prefix)

    YANG Description: A list of IPv6 prefixes which are to be used for segment routing using
the IPv6 dataplane.
    """
    return self.__ipv6_prefixes
      
  def _set_ipv6_prefixes(self, v, load=False):
    """
    Setter method for ipv6_prefixes, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/config/ipv6_prefixes (inet:ipv6-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6_prefixes() directly.

    YANG Description: A list of IPv6 prefixes which are to be used for segment routing using
the IPv6 dataplane.
    """
    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_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=False, yang_name="ipv6-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6_prefixes must be of a type compatible with inet:ipv6-prefix""",
          'defined-type': "inet:ipv6-prefix",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=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=False, yang_name="ipv6-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', is_config=True)""",
        })

    self.__ipv6_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6_prefixes(self):
    self.__ipv6_prefixes = YANGDynClass(unique=True, base=TypedListType(allowed_type=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=False, yang_name="ipv6-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', is_config=True)

  local_id = __builtin__.property(_get_local_id, _set_local_id)
  dataplane_type = __builtin__.property(_get_dataplane_type, _set_dataplane_type)
  mpls_label_blocks = __builtin__.property(_get_mpls_label_blocks, _set_mpls_label_blocks)
  ipv6_prefixes = __builtin__.property(_get_ipv6_prefixes, _set_ipv6_prefixes)


  _pyangbind_elements = OrderedDict([('local_id', local_id), ('dataplane_type', dataplane_type), ('mpls_label_blocks', mpls_label_blocks), ('ipv6_prefixes', ipv6_prefixes), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_srgbs_srgb_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/segment-routing/srgbs/srgb/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters relating to the SRGB.
  """
  __slots__ = ('_path_helper', '_extmethods', '__local_id','__dataplane_type','__mpls_label_blocks','__ipv6_prefixes','__size','__used',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__local_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__dataplane_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'MPLS': {}, 'IPV6': {}},), is_leaf=True, yang_name="dataplane-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-dataplane-type', is_config=False)
    self.__mpls_label_blocks = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="mpls-label-blocks", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__ipv6_prefixes = YANGDynClass(unique=True, base=TypedListType(allowed_type=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=False, yang_name="ipv6-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', is_config=False)
    self.__size = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__used = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="used", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'srgbs', 'srgb', 'state']

  def _get_local_id(self):
    """
    Getter method for local_id, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/state/local_id (string)

    YANG Description: Unique identifier for the segment routing global block on
the local system.
    """
    return self.__local_id
      
  def _set_local_id(self, v, load=False):
    """
    Setter method for local_id, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/state/local_id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_id() directly.

    YANG Description: Unique identifier for the segment routing global block on
the local system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__local_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_id(self):
    self.__local_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_dataplane_type(self):
    """
    Getter method for dataplane_type, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/state/dataplane_type (oc-srt:sr-dataplane-type)

    YANG Description: The dataplane being used to instantiate the SRGB. When MPLS is specified
the set of MPLS label blocks that are defined in the mpls-label-blocks
list are used to make up the SRGB. When IPv6 is specified, the set of IPv6
prefixes specified in the ipv6-prefixes list are used.
    """
    return self.__dataplane_type
      
  def _set_dataplane_type(self, v, load=False):
    """
    Setter method for dataplane_type, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/state/dataplane_type (oc-srt:sr-dataplane-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dataplane_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dataplane_type() directly.

    YANG Description: The dataplane being used to instantiate the SRGB. When MPLS is specified
the set of MPLS label blocks that are defined in the mpls-label-blocks
list are used to make up the SRGB. When IPv6 is specified, the set of IPv6
prefixes specified in the ipv6-prefixes list are used.
    """
    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={'MPLS': {}, 'IPV6': {}},), is_leaf=True, yang_name="dataplane-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-dataplane-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dataplane_type must be of a type compatible with oc-srt:sr-dataplane-type""",
          'defined-type': "oc-srt:sr-dataplane-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'MPLS': {}, 'IPV6': {}},), is_leaf=True, yang_name="dataplane-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-dataplane-type', is_config=False)""",
        })

    self.__dataplane_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dataplane_type(self):
    self.__dataplane_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'MPLS': {}, 'IPV6': {}},), is_leaf=True, yang_name="dataplane-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-dataplane-type', is_config=False)


  def _get_mpls_label_blocks(self):
    """
    Getter method for mpls_label_blocks, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/state/mpls_label_blocks (leafref)

    YANG Description: A list of refences to the label blocks that are used to make
up the SRGB.
    """
    return self.__mpls_label_blocks
      
  def _set_mpls_label_blocks(self, v, load=False):
    """
    Setter method for mpls_label_blocks, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/state/mpls_label_blocks (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mpls_label_blocks is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mpls_label_blocks() directly.

    YANG Description: A list of refences to the label blocks that are used to make
up the SRGB.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="mpls-label-blocks", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mpls_label_blocks must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="mpls-label-blocks", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__mpls_label_blocks = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mpls_label_blocks(self):
    self.__mpls_label_blocks = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="mpls-label-blocks", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_ipv6_prefixes(self):
    """
    Getter method for ipv6_prefixes, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/state/ipv6_prefixes (inet:ipv6-prefix)

    YANG Description: A list of IPv6 prefixes which are to be used for segment routing using
the IPv6 dataplane.
    """
    return self.__ipv6_prefixes
      
  def _set_ipv6_prefixes(self, v, load=False):
    """
    Setter method for ipv6_prefixes, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/state/ipv6_prefixes (inet:ipv6-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6_prefixes is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6_prefixes() directly.

    YANG Description: A list of IPv6 prefixes which are to be used for segment routing using
the IPv6 dataplane.
    """
    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_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=False, yang_name="ipv6-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6_prefixes must be of a type compatible with inet:ipv6-prefix""",
          'defined-type': "inet:ipv6-prefix",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=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=False, yang_name="ipv6-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', is_config=False)""",
        })

    self.__ipv6_prefixes = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6_prefixes(self):
    self.__ipv6_prefixes = YANGDynClass(unique=True, base=TypedListType(allowed_type=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=False, yang_name="ipv6-prefixes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', is_config=False)


  def _get_size(self):
    """
    Getter method for size, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/state/size (uint32)

    YANG Description: The total number of SRGB entries that are available within the SRGB.
    """
    return self.__size
      
  def _set_size(self, v, load=False):
    """
    Setter method for size, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/state/size (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_size is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_size() directly.

    YANG Description: The total number of SRGB entries that are available within the SRGB.
    """
    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="size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """size 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="size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__size = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_size(self):
    self.__size = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_used(self):
    """
    Getter method for used, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/state/used (uint32)

    YANG Description: The total number of SRGB entries that have already been alocated by
protocols referencing the SRGB.
    """
    return self.__used
      
  def _set_used(self, v, load=False):
    """
    Setter method for used, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/state/used (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_used is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_used() directly.

    YANG Description: The total number of SRGB entries that have already been alocated by
protocols referencing the SRGB.
    """
    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="used", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """used 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="used", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__used = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_used(self):
    self.__used = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="used", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)

  local_id = __builtin__.property(_get_local_id)
  dataplane_type = __builtin__.property(_get_dataplane_type)
  mpls_label_blocks = __builtin__.property(_get_mpls_label_blocks)
  ipv6_prefixes = __builtin__.property(_get_ipv6_prefixes)
  size = __builtin__.property(_get_size)
  used = __builtin__.property(_get_used)


  _pyangbind_elements = OrderedDict([('local_id', local_id), ('dataplane_type', dataplane_type), ('mpls_label_blocks', mpls_label_blocks), ('ipv6_prefixes', ipv6_prefixes), ('size', size), ('used', used), ])


class yc_srgb_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_srgbs_srgb(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/segment-routing/srgbs/srgb. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A single definition of an SRGB which may comprise of multiple
sets of dataplane addresses (IPv6 addresses, or MPLS labels).
  """
  __slots__ = ('_path_helper', '_extmethods', '__local_id','__config','__state',)

  _yang_name = 'srgb'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__local_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_srgbs_srgb_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_srgbs_srgb_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'srgbs', 'srgb']

  def _get_local_id(self):
    """
    Getter method for local_id, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/local_id (leafref)

    YANG Description: A reference to the identifier for the SRGB.
    """
    return self.__local_id
      
  def _set_local_id(self, v, load=False):
    """
    Setter method for local_id, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/local_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_id() directly.

    YANG Description: A reference to the identifier for the SRGB.
    """
    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="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__local_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_id(self):
    self.__local_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/config (container)

    YANG Description: Configuration parameters relating to the SRGB.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/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 SRGB.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_srgbs_srgb_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_segment_routing_srgbs_srgb_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_segment_routing_srgbs_srgb_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/state (container)

    YANG Description: State parameters relating to the SRGB.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb/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 parameters relating to the SRGB.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_srgbs_srgb_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_segment_routing_srgbs_srgb_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_segment_routing_srgbs_srgb_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  local_id = __builtin__.property(_get_local_id, _set_local_id)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('local_id', local_id), ('config', config), ('state', state), ])


class yc_srgbs_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_srgbs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/segment-routing/srgbs. 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 the
SRGBs defined for the system.
  """
  __slots__ = ('_path_helper', '_extmethods', '__srgb',)

  _yang_name = 'srgbs'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__srgb = YANGDynClass(base=YANGListType("local_id",yc_srgb_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_srgbs_srgb, yang_name="srgb", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='local-id', extensions=None), is_container='list', yang_name="srgb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'srgbs']

  def _get_srgb(self):
    """
    Getter method for srgb, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb (list)

    YANG Description: A single definition of an SRGB which may comprise of multiple
sets of dataplane addresses (IPv6 addresses, or MPLS labels).
    """
    return self.__srgb
      
  def _set_srgb(self, v, load=False):
    """
    Setter method for srgb, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs/srgb (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_srgb is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_srgb() directly.

    YANG Description: A single definition of an SRGB which may comprise of multiple
sets of dataplane addresses (IPv6 addresses, or MPLS labels).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("local_id",yc_srgb_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_srgbs_srgb, yang_name="srgb", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='local-id', extensions=None), is_container='list', yang_name="srgb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """srgb must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("local_id",yc_srgb_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_srgbs_srgb, yang_name="srgb", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='local-id', extensions=None), is_container='list', yang_name="srgb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__srgb = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_srgb(self):
    self.__srgb = YANGDynClass(base=YANGListType("local_id",yc_srgb_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_srgbs_srgb, yang_name="srgb", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='local-id', extensions=None), is_container='list', yang_name="srgb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  srgb = __builtin__.property(_get_srgb, _set_srgb)


  _pyangbind_elements = OrderedDict([('srgb', srgb), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_srlbs_srlb_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/segment-routing/srlbs/srlb/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 SRLB.
  """
  __slots__ = ('_path_helper', '_extmethods', '__local_id','__dataplane_type','__mpls_label_block','__ipv6_prefix',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__local_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__dataplane_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'MPLS': {}, 'IPV6': {}},), is_leaf=True, yang_name="dataplane-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-dataplane-type', is_config=True)
    self.__mpls_label_block = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mpls-label-block", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__ipv6_prefix = 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="ipv6-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', is_config=True)

    load = kwargs.pop("load", None)
    if args:
      if len(args) > 1:
        raise TypeError("cannot create a YANG container with >1 argument")
      all_attr = True
      for e in self._pyangbind_elements:
        if not hasattr(args[0], e):
          all_attr = False
          break
      if not all_attr:
        raise ValueError("Supplied object did not have the correct attributes")
      for e in self._pyangbind_elements:
        nobj = getattr(args[0], e)
        if nobj._changed() is False:
          continue
        setmethod = getattr(self, "_set_%s" % e)
        if load is None:
          setmethod(getattr(args[0], e))
        else:
          setmethod(getattr(args[0], e), load=load)

  def _path(self):
    if hasattr(self, "_parent"):
      return self._parent._path()+[self._yang_name]
    else:
      return ['network-instances', 'network-instance', 'segment-routing', 'srlbs', 'srlb', 'config']

  def _get_local_id(self):
    """
    Getter method for local_id, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/config/local_id (string)

    YANG Description: A unique local identifier used for the Segment Routing Local Block.
The identifier is used when referencing the SRLB within other
contexts.
    """
    return self.__local_id
      
  def _set_local_id(self, v, load=False):
    """
    Setter method for local_id, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/config/local_id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_id() directly.

    YANG Description: A unique local identifier used for the Segment Routing Local Block.
The identifier is used when referencing the SRLB within other
contexts.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)""",
        })

    self.__local_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_id(self):
    self.__local_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_dataplane_type(self):
    """
    Getter method for dataplane_type, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/config/dataplane_type (oc-srt:sr-dataplane-type)

    YANG Description: The dataplane that is to be used for the Segment Routing Local Block.
When MPLS is specified, the local block corresponds to a block of MPLS
labels; when IPv6 is specified it corresponds to an IPv6 prefix.
    """
    return self.__dataplane_type
      
  def _set_dataplane_type(self, v, load=False):
    """
    Setter method for dataplane_type, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/config/dataplane_type (oc-srt:sr-dataplane-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dataplane_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dataplane_type() directly.

    YANG Description: The dataplane that is to be used for the Segment Routing Local Block.
When MPLS is specified, the local block corresponds to a block of MPLS
labels; when IPv6 is specified it corresponds to an IPv6 prefix.
    """
    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={'MPLS': {}, 'IPV6': {}},), is_leaf=True, yang_name="dataplane-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-dataplane-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dataplane_type must be of a type compatible with oc-srt:sr-dataplane-type""",
          'defined-type': "oc-srt:sr-dataplane-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'MPLS': {}, 'IPV6': {}},), is_leaf=True, yang_name="dataplane-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-dataplane-type', is_config=True)""",
        })

    self.__dataplane_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dataplane_type(self):
    self.__dataplane_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'MPLS': {}, 'IPV6': {}},), is_leaf=True, yang_name="dataplane-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-dataplane-type', is_config=True)


  def _get_mpls_label_block(self):
    """
    Getter method for mpls_label_block, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/config/mpls_label_block (leafref)

    YANG Description: A reference to the MPLS label block that is used to contain the
SIDs of the SRLB.
    """
    return self.__mpls_label_block
      
  def _set_mpls_label_block(self, v, load=False):
    """
    Setter method for mpls_label_block, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/config/mpls_label_block (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mpls_label_block is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mpls_label_block() directly.

    YANG Description: A reference to the MPLS label block that is used to contain the
SIDs of the SRLB.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="mpls-label-block", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mpls_label_block must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mpls-label-block", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__mpls_label_block = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mpls_label_block(self):
    self.__mpls_label_block = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mpls-label-block", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_ipv6_prefix(self):
    """
    Getter method for ipv6_prefix, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/config/ipv6_prefix (inet:ipv6-prefix)

    YANG Description: The IPv6 prefix that is used for the SRLB.
    """
    return self.__ipv6_prefix
      
  def _set_ipv6_prefix(self, v, load=False):
    """
    Setter method for ipv6_prefix, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/config/ipv6_prefix (inet:ipv6-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6_prefix() directly.

    YANG Description: The IPv6 prefix that is used for the SRLB.
    """
    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="ipv6-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6_prefix must be of a type compatible with inet:ipv6-prefix""",
          'defined-type': "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="ipv6-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', is_config=True)""",
        })

    self.__ipv6_prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6_prefix(self):
    self.__ipv6_prefix = 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="ipv6-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', is_config=True)

  local_id = __builtin__.property(_get_local_id, _set_local_id)
  dataplane_type = __builtin__.property(_get_dataplane_type, _set_dataplane_type)
  mpls_label_block = __builtin__.property(_get_mpls_label_block, _set_mpls_label_block)
  ipv6_prefix = __builtin__.property(_get_ipv6_prefix, _set_ipv6_prefix)


  _pyangbind_elements = OrderedDict([('local_id', local_id), ('dataplane_type', dataplane_type), ('mpls_label_block', mpls_label_block), ('ipv6_prefix', ipv6_prefix), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_srlbs_srlb_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/segment-routing/srlbs/srlb/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state parmeters relating to the SRLB.
  """
  __slots__ = ('_path_helper', '_extmethods', '__local_id','__dataplane_type','__mpls_label_block','__ipv6_prefix',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__local_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__dataplane_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'MPLS': {}, 'IPV6': {}},), is_leaf=True, yang_name="dataplane-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-dataplane-type', is_config=False)
    self.__mpls_label_block = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mpls-label-block", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__ipv6_prefix = 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="ipv6-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', 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 ['network-instances', 'network-instance', 'segment-routing', 'srlbs', 'srlb', 'state']

  def _get_local_id(self):
    """
    Getter method for local_id, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/state/local_id (string)

    YANG Description: A unique local identifier used for the Segment Routing Local Block.
The identifier is used when referencing the SRLB within other
contexts.
    """
    return self.__local_id
      
  def _set_local_id(self, v, load=False):
    """
    Setter method for local_id, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/state/local_id (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_id() directly.

    YANG Description: A unique local identifier used for the Segment Routing Local Block.
The identifier is used when referencing the SRLB within other
contexts.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_id must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""",
        })

    self.__local_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_id(self):
    self.__local_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_dataplane_type(self):
    """
    Getter method for dataplane_type, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/state/dataplane_type (oc-srt:sr-dataplane-type)

    YANG Description: The dataplane that is to be used for the Segment Routing Local Block.
When MPLS is specified, the local block corresponds to a block of MPLS
labels; when IPv6 is specified it corresponds to an IPv6 prefix.
    """
    return self.__dataplane_type
      
  def _set_dataplane_type(self, v, load=False):
    """
    Setter method for dataplane_type, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/state/dataplane_type (oc-srt:sr-dataplane-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_dataplane_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_dataplane_type() directly.

    YANG Description: The dataplane that is to be used for the Segment Routing Local Block.
When MPLS is specified, the local block corresponds to a block of MPLS
labels; when IPv6 is specified it corresponds to an IPv6 prefix.
    """
    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={'MPLS': {}, 'IPV6': {}},), is_leaf=True, yang_name="dataplane-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-dataplane-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """dataplane_type must be of a type compatible with oc-srt:sr-dataplane-type""",
          'defined-type': "oc-srt:sr-dataplane-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'MPLS': {}, 'IPV6': {}},), is_leaf=True, yang_name="dataplane-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-dataplane-type', is_config=False)""",
        })

    self.__dataplane_type = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_dataplane_type(self):
    self.__dataplane_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'MPLS': {}, 'IPV6': {}},), is_leaf=True, yang_name="dataplane-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-dataplane-type', is_config=False)


  def _get_mpls_label_block(self):
    """
    Getter method for mpls_label_block, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/state/mpls_label_block (leafref)

    YANG Description: A reference to the MPLS label block that is used to contain the
SIDs of the SRLB.
    """
    return self.__mpls_label_block
      
  def _set_mpls_label_block(self, v, load=False):
    """
    Setter method for mpls_label_block, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/state/mpls_label_block (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mpls_label_block is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mpls_label_block() directly.

    YANG Description: A reference to the MPLS label block that is used to contain the
SIDs of the SRLB.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="mpls-label-block", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mpls_label_block must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mpls-label-block", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__mpls_label_block = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mpls_label_block(self):
    self.__mpls_label_block = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="mpls-label-block", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_ipv6_prefix(self):
    """
    Getter method for ipv6_prefix, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/state/ipv6_prefix (inet:ipv6-prefix)

    YANG Description: The IPv6 prefix that is used for the SRLB.
    """
    return self.__ipv6_prefix
      
  def _set_ipv6_prefix(self, v, load=False):
    """
    Setter method for ipv6_prefix, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/state/ipv6_prefix (inet:ipv6-prefix)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ipv6_prefix is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ipv6_prefix() directly.

    YANG Description: The IPv6 prefix that is used for the SRLB.
    """
    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="ipv6-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ipv6_prefix must be of a type compatible with inet:ipv6-prefix""",
          'defined-type': "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="ipv6-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', is_config=False)""",
        })

    self.__ipv6_prefix = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ipv6_prefix(self):
    self.__ipv6_prefix = 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="ipv6-prefix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ipv6-prefix', is_config=False)

  local_id = __builtin__.property(_get_local_id)
  dataplane_type = __builtin__.property(_get_dataplane_type)
  mpls_label_block = __builtin__.property(_get_mpls_label_block)
  ipv6_prefix = __builtin__.property(_get_ipv6_prefix)


  _pyangbind_elements = OrderedDict([('local_id', local_id), ('dataplane_type', dataplane_type), ('mpls_label_block', mpls_label_block), ('ipv6_prefix', ipv6_prefix), ])


class yc_srlb_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_srlbs_srlb(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/segment-routing/srlbs/srlb. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A definition of a Segment Routing Local Block, defined to be
a set of Segment Identifiers (specified as MPLS labels or
IPv6 addreses) that are defined for local allocation by the
system. A block may optionally be advertised into an IGP.
  """
  __slots__ = ('_path_helper', '_extmethods', '__local_id','__config','__state',)

  _yang_name = 'srlb'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__local_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    self.__config = YANGDynClass(base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_srlbs_srlb_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_srlbs_srlb_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'srlbs', 'srlb']

  def _get_local_id(self):
    """
    Getter method for local_id, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/local_id (leafref)

    YANG Description: Reference to the local identifier used for the SRLB.
    """
    return self.__local_id
      
  def _set_local_id(self, v, load=False):
    """
    Setter method for local_id, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/local_id (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_local_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_local_id() directly.

    YANG Description: Reference to the local identifier used for the SRLB.
    """
    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="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """local_id must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
        })

    self.__local_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_local_id(self):
    self.__local_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="local-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)


  def _get_config(self):
    """
    Getter method for config, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/config (container)

    YANG Description: Configuration parameters relating to the SRLB.
    """
    return self.__config
      
  def _set_config(self, v, load=False):
    """
    Setter method for config, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/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 SRLB.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_config_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_srlbs_srlb_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_segment_routing_srlbs_srlb_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_segment_routing_srlbs_srlb_config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/state (container)

    YANG Description: Operational state parmeters relating to the SRLB.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb/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 parmeters relating to the SRLB.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_srlbs_srlb_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_segment_routing_srlbs_srlb_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_segment_routing_srlbs_srlb_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  local_id = __builtin__.property(_get_local_id, _set_local_id)
  config = __builtin__.property(_get_config, _set_config)
  state = __builtin__.property(_get_state, _set_state)


  _pyangbind_elements = OrderedDict([('local_id', local_id), ('config', config), ('state', state), ])


class yc_srlbs_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_srlbs(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/segment-routing/srlbs. 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 the
Segment Routing Local Blocks (SRLBs) defined for the system.
  """
  __slots__ = ('_path_helper', '_extmethods', '__srlb',)

  _yang_name = 'srlbs'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__srlb = YANGDynClass(base=YANGListType("local_id",yc_srlb_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_srlbs_srlb, yang_name="srlb", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='local-id', extensions=None), is_container='list', yang_name="srlb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'srlbs']

  def _get_srlb(self):
    """
    Getter method for srlb, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb (list)

    YANG Description: A definition of a Segment Routing Local Block, defined to be
a set of Segment Identifiers (specified as MPLS labels or
IPv6 addreses) that are defined for local allocation by the
system. A block may optionally be advertised into an IGP.
    """
    return self.__srlb
      
  def _set_srlb(self, v, load=False):
    """
    Setter method for srlb, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs/srlb (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_srlb is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_srlb() directly.

    YANG Description: A definition of a Segment Routing Local Block, defined to be
a set of Segment Identifiers (specified as MPLS labels or
IPv6 addreses) that are defined for local allocation by the
system. A block may optionally be advertised into an IGP.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("local_id",yc_srlb_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_srlbs_srlb, yang_name="srlb", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='local-id', extensions=None), is_container='list', yang_name="srlb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """srlb must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("local_id",yc_srlb_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_srlbs_srlb, yang_name="srlb", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='local-id', extensions=None), is_container='list', yang_name="srlb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)""",
        })

    self.__srlb = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_srlb(self):
    self.__srlb = YANGDynClass(base=YANGListType("local_id",yc_srlb_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_srlbs_srlb, yang_name="srlb", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='local-id', extensions=None), is_container='list', yang_name="srlb", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=True)

  srlb = __builtin__.property(_get_srlb, _set_srlb)


  _pyangbind_elements = OrderedDict([('srlb', srlb), ])


class yc_counters_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_state_counters(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/segment-routing/te-policies/te-policy/state/counters. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A collection of counters on the policy level. They
count the total traffic forwarded by the policy,
regardless of its installation source. The counters
should be persistent across policy state changes and
switches between active protocols.
  """
  __slots__ = ('_path_helper', '_extmethods', '__in_pkts','__in_octets','__in_labeled_pkts','__in_labeled_octets','__out_pkts','__out_octets','__out_labeled_pkts','__out_labeled_octets',)

  _yang_name = 'counters'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__in_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    self.__in_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    self.__in_labeled_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-labeled-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    self.__in_labeled_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-labeled-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    self.__out_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    self.__out_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    self.__out_labeled_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-labeled-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    self.__out_labeled_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-labeled-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'te-policies', 'te-policy', 'state', 'counters']

  def _get_in_pkts(self):
    """
    Getter method for in_pkts, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/counters/in_pkts (oc-yang:counter64)

    YANG Description: A cumulative counter of the incoming packets steered to
the SR-TE policy. It includes both labeled and unlabeled
steered traffic.
    """
    return self.__in_pkts
      
  def _set_in_pkts(self, v, load=False):
    """
    Setter method for in_pkts, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/counters/in_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_pkts() directly.

    YANG Description: A cumulative counter of the incoming packets steered to
the SR-TE policy. It includes both labeled and unlabeled
steered traffic.
    """
    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="in-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_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="in-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__in_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_pkts(self):
    self.__in_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_in_octets(self):
    """
    Getter method for in_octets, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/counters/in_octets (oc-yang:counter64)

    YANG Description: The cumulative counter of the total incoming bytes steered
to the SR-TE policy. It includes both labeled and unlabeled
steered traffic.
    """
    return self.__in_octets
      
  def _set_in_octets(self, v, load=False):
    """
    Setter method for in_octets, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/counters/in_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_octets() directly.

    YANG Description: The cumulative counter of the total incoming bytes steered
to the SR-TE policy. It includes both labeled and unlabeled
steered traffic.
    """
    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="in-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_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="in-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__in_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_octets(self):
    self.__in_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_in_labeled_pkts(self):
    """
    Getter method for in_labeled_pkts, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/counters/in_labeled_pkts (oc-yang:counter64)

    YANG Description: A cumulative counter of the incoming labeled packets steered
to the SR-TE policy. Labeled packets carries an active SID
(top-most SID in the stack) that matches the BSID associated
to this policy.
    """
    return self.__in_labeled_pkts
      
  def _set_in_labeled_pkts(self, v, load=False):
    """
    Setter method for in_labeled_pkts, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/counters/in_labeled_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_labeled_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_labeled_pkts() directly.

    YANG Description: A cumulative counter of the incoming labeled packets steered
to the SR-TE policy. Labeled packets carries an active SID
(top-most SID in the stack) that matches the BSID associated
to this policy.
    """
    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="in-labeled-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_labeled_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="in-labeled-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__in_labeled_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_labeled_pkts(self):
    self.__in_labeled_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-labeled-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_in_labeled_octets(self):
    """
    Getter method for in_labeled_octets, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/counters/in_labeled_octets (oc-yang:counter64)

    YANG Description: A cumulative counter of the total bytes of incoming labeled
traffic steered to the SR-TE policy. Labeled traffic carries
an active SID (top-most SID in the stack) that matches the
BSID associated to this policy.
    """
    return self.__in_labeled_octets
      
  def _set_in_labeled_octets(self, v, load=False):
    """
    Setter method for in_labeled_octets, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/counters/in_labeled_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_in_labeled_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_in_labeled_octets() directly.

    YANG Description: A cumulative counter of the total bytes of incoming labeled
traffic steered to the SR-TE policy. Labeled traffic carries
an active SID (top-most SID in the stack) that matches the
BSID associated to this policy.
    """
    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="in-labeled-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """in_labeled_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="in-labeled-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__in_labeled_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_in_labeled_octets(self):
    self.__in_labeled_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="in-labeled-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_out_pkts(self):
    """
    Getter method for out_pkts, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/counters/out_pkts (oc-yang:counter64)

    YANG Description: A cumulative counter of the outgoing packets after being
steered to the SR-TE policy. It includes both labeled and
unlabeled steered traffic.
    """
    return self.__out_pkts
      
  def _set_out_pkts(self, v, load=False):
    """
    Setter method for out_pkts, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/counters/out_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_pkts() directly.

    YANG Description: A cumulative counter of the outgoing packets after being
steered to the SR-TE policy. It includes both labeled and
unlabeled steered traffic.
    """
    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="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_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="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__out_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_pkts(self):
    self.__out_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_out_octets(self):
    """
    Getter method for out_octets, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/counters/out_octets (oc-yang:counter64)

    YANG Description: The cumulative counter of the total outgoing bytes after
being steered to the SR-TE policy. It includes both labeled
and unlabeled steered traffic. The counter should include the
segments pushed to packets.
    """
    return self.__out_octets
      
  def _set_out_octets(self, v, load=False):
    """
    Setter method for out_octets, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/counters/out_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_octets() directly.

    YANG Description: The cumulative counter of the total outgoing bytes after
being steered to the SR-TE policy. It includes both labeled
and unlabeled steered traffic. The counter should include the
segments pushed to packets.
    """
    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="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_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="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__out_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_octets(self):
    self.__out_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_out_labeled_pkts(self):
    """
    Getter method for out_labeled_pkts, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/counters/out_labeled_pkts (oc-yang:counter64)

    YANG Description: A cumulative counter of the outgoing labeled packets after
being steered to the SR-TE policy. Labeled packets carries
an active SID (top-most SID in the stack) that matches the
BSID associated to this policy.
    """
    return self.__out_labeled_pkts
      
  def _set_out_labeled_pkts(self, v, load=False):
    """
    Setter method for out_labeled_pkts, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/counters/out_labeled_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_labeled_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_labeled_pkts() directly.

    YANG Description: A cumulative counter of the outgoing labeled packets after
being steered to the SR-TE policy. Labeled packets carries
an active SID (top-most SID in the stack) that matches the
BSID associated to this policy.
    """
    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="out-labeled-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_labeled_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="out-labeled-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__out_labeled_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_labeled_pkts(self):
    self.__out_labeled_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-labeled-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_out_labeled_octets(self):
    """
    Getter method for out_labeled_octets, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/counters/out_labeled_octets (oc-yang:counter64)

    YANG Description: A cumulative counter of the total bytes of outgoing labeled
traffic after being steered to the SR-TE policy. Labeled
traffic carries an active SID (top-most SID in the stack) that
matches the BSID associated to this policy. The counter should
include the segments pushed to packets.
    """
    return self.__out_labeled_octets
      
  def _set_out_labeled_octets(self, v, load=False):
    """
    Setter method for out_labeled_octets, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/counters/out_labeled_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_labeled_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_labeled_octets() directly.

    YANG Description: A cumulative counter of the total bytes of outgoing labeled
traffic after being steered to the SR-TE policy. Labeled
traffic carries an active SID (top-most SID in the stack) that
matches the BSID associated to this policy. The counter should
include the segments pushed to packets.
    """
    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="out-labeled-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_labeled_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="out-labeled-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__out_labeled_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_labeled_octets(self):
    self.__out_labeled_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-labeled-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)

  in_pkts = __builtin__.property(_get_in_pkts)
  in_octets = __builtin__.property(_get_in_octets)
  in_labeled_pkts = __builtin__.property(_get_in_labeled_pkts)
  in_labeled_octets = __builtin__.property(_get_in_labeled_octets)
  out_pkts = __builtin__.property(_get_out_pkts)
  out_octets = __builtin__.property(_get_out_octets)
  out_labeled_pkts = __builtin__.property(_get_out_labeled_pkts)
  out_labeled_octets = __builtin__.property(_get_out_labeled_octets)


  _pyangbind_elements = OrderedDict([('in_pkts', in_pkts), ('in_octets', in_octets), ('in_labeled_pkts', in_labeled_pkts), ('in_labeled_octets', in_labeled_octets), ('out_pkts', out_pkts), ('out_octets', out_octets), ('out_labeled_pkts', out_labeled_pkts), ('out_labeled_octets', out_labeled_octets), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/segment-routing/te-policies/te-policy/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The operational state of parameters associated with
SR-TE policies.
  """
  __slots__ = ('_path_helper', '_extmethods', '__color','__endpoint','__name','__bsid','__active','__active_since','__active_transitions','__counters',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__color = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__endpoint = 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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:srte-endpoint-type', is_config=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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__bsid = 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': {}},),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}|:))'}),], is_leaf=True, yang_name="bsid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-sid-type', is_config=False)
    self.__active = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="active", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__active_since = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="active-since", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__active_transitions = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="active-transitions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'te-policies', 'te-policy', 'state']

  def _get_color(self):
    """
    Getter method for color, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/color (uint32)

    YANG Description: When the policy is used for RIB resolution to a specific
Segment Routing Traffic Engineering path, the policy is used
when the color required in the policy (which may be specified
based on the value of a BGP extended colour community) matches
the value of this leaf. The color being set to 0 indicates
that the colour is a wildcard in the policy resolution.
    """
    return self.__color
      
  def _set_color(self, v, load=False):
    """
    Setter method for color, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/color (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_color is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_color() directly.

    YANG Description: When the policy is used for RIB resolution to a specific
Segment Routing Traffic Engineering path, the policy is used
when the color required in the policy (which may be specified
based on the value of a BGP extended colour community) matches
the value of this leaf. The color being set to 0 indicates
that the colour is a wildcard in the policy resolution.
    """
    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="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """color 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="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__color = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_color(self):
    self.__color = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_endpoint(self):
    """
    Getter method for endpoint, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/endpoint (oc-srt:srte-endpoint-type)

    YANG Description: When the policy is used for RIB resolution to a Segment
Routing Traffic Engineering path, the policy is used when the
required endpoint (which may be the protocol next-hop) matches
the endpoint address specified in this leaf. When the leaf is
set to all zeros (0.0.0.0 or ::), the endpoint acts as a
wildcard in the policy resolution.
    """
    return self.__endpoint
      
  def _set_endpoint(self, v, load=False):
    """
    Setter method for endpoint, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/endpoint (oc-srt:srte-endpoint-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint() directly.

    YANG Description: When the policy is used for RIB resolution to a Segment
Routing Traffic Engineering path, the policy is used when the
required endpoint (which may be the protocol next-hop) matches
the endpoint address specified in this leaf. When the leaf is
set to all zeros (0.0.0.0 or ::), the endpoint acts as a
wildcard in the policy resolution.
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:srte-endpoint-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """endpoint must be of a type compatible with oc-srt:srte-endpoint-type""",
          'defined-type': "oc-srt:srte-endpoint-type",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:srte-endpoint-type', is_config=False)""",
        })

    self.__endpoint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_endpoint(self):
    self.__endpoint = 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}'}),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}|:))'}),], is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:srte-endpoint-type', is_config=False)


  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/name (string)

    YANG Description: The user friendly SR-TE policy name.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_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: The user friendly SR-TE policy name.
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_bsid(self):
    """
    Getter method for bsid, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/bsid (oc-srt:sr-sid-type)

    YANG Description: The Binding SID (BSID) assigned to the SR-TE policy,
expressed as an MPLS label or IPv6 address. Packets that are
ingress to the system with active segment matching the SID
value specified in this leaf should be forwarded according
to the policy. The specified Binding SID must be removed
from the segment list by the system.
    """
    return self.__bsid
      
  def _set_bsid(self, v, load=False):
    """
    Setter method for bsid, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/bsid (oc-srt:sr-sid-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bsid is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bsid() directly.

    YANG Description: The Binding SID (BSID) assigned to the SR-TE policy,
expressed as an MPLS label or IPv6 address. Packets that are
ingress to the system with active segment matching the SID
value specified in this leaf should be forwarded according
to the policy. The specified Binding SID must be removed
from the segment list by the system.
    """
    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': {}},),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}|:))'}),], is_leaf=True, yang_name="bsid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-sid-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bsid must be of a type compatible with oc-srt:sr-sid-type""",
          'defined-type': "oc-srt:sr-sid-type",
          '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': {}},),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}|:))'}),], is_leaf=True, yang_name="bsid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-sid-type', is_config=False)""",
        })

    self.__bsid = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_bsid(self):
    self.__bsid = 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': {}},),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}|:))'}),], is_leaf=True, yang_name="bsid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-sid-type', is_config=False)


  def _get_active(self):
    """
    Getter method for active, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/active (boolean)

    YANG Description: A SR-TE policy is marked as active when at least one of its
candidate paths is valid/active and the policy has been
instantiated in the forwarding plane.
    """
    return self.__active
      
  def _set_active(self, v, load=False):
    """
    Setter method for active, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/active (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_active is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_active() directly.

    YANG Description: A SR-TE policy is marked as active when at least one of its
candidate paths is valid/active and the policy has been
instantiated in the forwarding plane.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="active", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """active must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="active", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__active = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_active(self):
    self.__active = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="active", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_active_since(self):
    """
    Getter method for active_since, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/active_since (oc-types:timeticks64)

    YANG Description: Indication of the time the policy transitioned to the active
state.

The value is the timestamp in nanoseconds relative to the Unix
Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    return self.__active_since
      
  def _set_active_since(self, v, load=False):
    """
    Setter method for active_since, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/active_since (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_active_since is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_active_since() directly.

    YANG Description: Indication of the time the policy transitioned to the active
state.

The value is the timestamp in nanoseconds relative to the Unix
Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    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="active-since", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """active_since must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="active-since", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__active_since = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_active_since(self):
    self.__active_since = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="active-since", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_active_transitions(self):
    """
    Getter method for active_transitions, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/active_transitions (oc-yang:counter64)

    YANG Description: The number of transitions to active state for the policy.
    """
    return self.__active_transitions
      
  def _set_active_transitions(self, v, load=False):
    """
    Setter method for active_transitions, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/active_transitions (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_active_transitions is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_active_transitions() directly.

    YANG Description: The number of transitions to active state for the policy.
    """
    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="active-transitions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """active_transitions 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="active-transitions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__active_transitions = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_active_transitions(self):
    self.__active_transitions = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="active-transitions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_counters(self):
    """
    Getter method for counters, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/counters (container)

    YANG Description: A collection of counters on the policy level. They
count the total traffic forwarded by the policy,
regardless of its installation source. The counters
should be persistent across policy state changes and
switches between active protocols.
    """
    return self.__counters
      
  def _set_counters(self, v, load=False):
    """
    Setter method for counters, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state/counters (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_counters is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_counters() directly.

    YANG Description: A collection of counters on the policy level. They
count the total traffic forwarded by the policy,
regardless of its installation source. The counters
should be persistent across policy state changes and
switches between active protocols.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_counters_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """counters must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_counters_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__counters = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_counters(self):
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  color = __builtin__.property(_get_color)
  endpoint = __builtin__.property(_get_endpoint)
  name = __builtin__.property(_get_name)
  bsid = __builtin__.property(_get_bsid)
  active = __builtin__.property(_get_active)
  active_since = __builtin__.property(_get_active_since)
  active_transitions = __builtin__.property(_get_active_transitions)
  counters = __builtin__.property(_get_counters)


  _pyangbind_elements = OrderedDict([('color', color), ('endpoint', endpoint), ('name', name), ('bsid', bsid), ('active', active), ('active_since', active_since), ('active_transitions', active_transitions), ('counters', counters), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/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 SR-TE
candidate paths.
  """
  __slots__ = ('_path_helper', '_extmethods', '__name','__protocol_origin','__originator_asn','__originator_addr','__discriminator','__preference','__enlp','__valid','__active','__active_since','__active_transitions',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__protocol_origin = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PCEP': {'value': 10}, 'BGP': {'value': 20}, 'CONFIG': {'value': 30}},), is_leaf=True, yang_name="protocol-origin", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:srte-protocol-type', is_config=False)
    self.__originator_asn = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="originator-asn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__originator_addr = 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}|:))'}), is_leaf=True, yang_name="originator-addr", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-address', is_config=False)
    self.__discriminator = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="discriminator", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__enlp = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PUSH_IPV4_EXPLICIT_NULL': {}, 'PUSH_IPV6_EXPLICIT_NULL': {}, 'PUSH_IPV46_EXPLICIT_NULL': {}, 'NO_EXPLICIT_NULL': {}},), is_leaf=True, yang_name="enlp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:enlp-type', is_config=False)
    self.__valid = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__active = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="active", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__active_since = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="active-since", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    self.__active_transitions = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="active-transitions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'te-policies', 'te-policy', 'candidate-paths', 'candidate-path', 'state']

  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/name (string)

    YANG Description: The user friendly SR-TE candidate path name.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/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: The user friendly SR-TE candidate path name.
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_protocol_origin(self):
    """
    Getter method for protocol_origin, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/protocol_origin (oc-srt:srte-protocol-type)

    YANG Description: The component or protocol that originates or signals the
candidate path.
    """
    return self.__protocol_origin
      
  def _set_protocol_origin(self, v, load=False):
    """
    Setter method for protocol_origin, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/protocol_origin (oc-srt:srte-protocol-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_protocol_origin is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_protocol_origin() directly.

    YANG Description: The component or protocol that originates or signals the
candidate path.
    """
    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={'PCEP': {'value': 10}, 'BGP': {'value': 20}, 'CONFIG': {'value': 30}},), is_leaf=True, yang_name="protocol-origin", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:srte-protocol-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """protocol_origin must be of a type compatible with oc-srt:srte-protocol-type""",
          'defined-type': "oc-srt:srte-protocol-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PCEP': {'value': 10}, 'BGP': {'value': 20}, 'CONFIG': {'value': 30}},), is_leaf=True, yang_name="protocol-origin", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:srte-protocol-type', is_config=False)""",
        })

    self.__protocol_origin = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_protocol_origin(self):
    self.__protocol_origin = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PCEP': {'value': 10}, 'BGP': {'value': 20}, 'CONFIG': {'value': 30}},), is_leaf=True, yang_name="protocol-origin", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:srte-protocol-type', is_config=False)


  def _get_originator_asn(self):
    """
    Getter method for originator_asn, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/originator_asn (uint32)

    YANG Description: The autonomous system that node originating the candidate
path locates.
    """
    return self.__originator_asn
      
  def _set_originator_asn(self, v, load=False):
    """
    Setter method for originator_asn, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/originator_asn (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_originator_asn is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_originator_asn() directly.

    YANG Description: The autonomous system that node originating the candidate
path locates.
    """
    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="originator-asn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """originator_asn 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="originator-asn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__originator_asn = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_originator_asn(self):
    self.__originator_asn = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="originator-asn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_originator_addr(self):
    """
    Getter method for originator_addr, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/originator_addr (oc-inet:ipv6-address)

    YANG Description: The address of the node originating the candidate path.
Address in IPv4 can be represented as IPv6-encoded-IPv4 e.g.
::FFFF:192.168.1.2 or a normal IPv6 address with the lowest
32 bits carrying the actual IPv4 address.
    """
    return self.__originator_addr
      
  def _set_originator_addr(self, v, load=False):
    """
    Setter method for originator_addr, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/originator_addr (oc-inet:ipv6-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_originator_addr is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_originator_addr() directly.

    YANG Description: The address of the node originating the candidate path.
Address in IPv4 can be represented as IPv6-encoded-IPv4 e.g.
::FFFF:192.168.1.2 or a normal IPv6 address with the lowest
32 bits carrying the actual IPv4 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]{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}|:))'}), is_leaf=True, yang_name="originator-addr", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """originator_addr must be of a type compatible with oc-inet:ipv6-address""",
          'defined-type': "oc-inet:ipv6-address",
          '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}|:))'}), is_leaf=True, yang_name="originator-addr", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-address', is_config=False)""",
        })

    self.__originator_addr = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_originator_addr(self):
    self.__originator_addr = 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}|:))'}), is_leaf=True, yang_name="originator-addr", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ipv6-address', is_config=False)


  def _get_discriminator(self):
    """
    Getter method for discriminator, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/discriminator (uint32)

    YANG Description: A 32 bit value uniquely identifying the path within the
context of a policy learnt from a protocol.
    """
    return self.__discriminator
      
  def _set_discriminator(self, v, load=False):
    """
    Setter method for discriminator, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/discriminator (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_discriminator is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_discriminator() directly.

    YANG Description: A 32 bit value uniquely identifying the path within the
context of a policy learnt from a protocol.
    """
    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="discriminator", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """discriminator 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="discriminator", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__discriminator = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_discriminator(self):
    self.__discriminator = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="discriminator", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_preference(self):
    """
    Getter method for preference, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/preference (uint32)

    YANG Description: When there are multiple candidate paths specified a
particular SR-TE policy. The preference is used to resolve
between them. And the one with higher preference is
preferred.
These paths may be learnt from a dynamic routing protocol,
or interface to the device, or from other static entries
configured on the system.
    """
    return self.__preference
      
  def _set_preference(self, v, load=False):
    """
    Setter method for preference, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/preference (uint32)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_preference is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_preference() directly.

    YANG Description: When there are multiple candidate paths specified a
particular SR-TE policy. The preference is used to resolve
between them. And the one with higher preference is
preferred.
These paths may be learnt from a dynamic routing protocol,
or interface to the device, or from other static entries
configured on the system.
    """
    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="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """preference 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="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__preference = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_preference(self):
    self.__preference = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_enlp(self):
    """
    Getter method for enlp, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/enlp (oc-srt:enlp-type)

    YANG Description: ENLP (Explicit NULL Label Policy) indicates whether Explicit
NULL labels are to be pushed on unlabeled IP packets that are
being steered into a given SR policy.
    """
    return self.__enlp
      
  def _set_enlp(self, v, load=False):
    """
    Setter method for enlp, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/enlp (oc-srt:enlp-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enlp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enlp() directly.

    YANG Description: ENLP (Explicit NULL Label Policy) indicates whether Explicit
NULL labels are to be pushed on unlabeled IP packets that are
being steered into a given SR 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={'PUSH_IPV4_EXPLICIT_NULL': {}, 'PUSH_IPV6_EXPLICIT_NULL': {}, 'PUSH_IPV46_EXPLICIT_NULL': {}, 'NO_EXPLICIT_NULL': {}},), is_leaf=True, yang_name="enlp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:enlp-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enlp must be of a type compatible with oc-srt:enlp-type""",
          'defined-type': "oc-srt:enlp-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PUSH_IPV4_EXPLICIT_NULL': {}, 'PUSH_IPV6_EXPLICIT_NULL': {}, 'PUSH_IPV46_EXPLICIT_NULL': {}, 'NO_EXPLICIT_NULL': {}},), is_leaf=True, yang_name="enlp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:enlp-type', is_config=False)""",
        })

    self.__enlp = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_enlp(self):
    self.__enlp = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'PUSH_IPV4_EXPLICIT_NULL': {}, 'PUSH_IPV6_EXPLICIT_NULL': {}, 'PUSH_IPV46_EXPLICIT_NULL': {}, 'NO_EXPLICIT_NULL': {}},), is_leaf=True, yang_name="enlp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:enlp-type', is_config=False)


  def _get_valid(self):
    """
    Getter method for valid, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/valid (boolean)

    YANG Description: A path should be marked as valid when it is usable e.g. the
at least one segment-list is valid even though the path may
not be the best.
    """
    return self.__valid
      
  def _set_valid(self, v, load=False):
    """
    Setter method for valid, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/valid (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_valid is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_valid() directly.

    YANG Description: A path should be marked as valid when it is usable e.g. the
at least one segment-list is valid even though the path may
not be the best.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="valid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """valid must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__valid = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_valid(self):
    self.__valid = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_active(self):
    """
    Getter method for active, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/active (boolean)

    YANG Description: A candidate path is active when it is valid and it is
determined to be the best path of the SR-TE Policy.
    """
    return self.__active
      
  def _set_active(self, v, load=False):
    """
    Setter method for active, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/active (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_active is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_active() directly.

    YANG Description: A candidate path is active when it is valid and it is
determined to be the best path of the SR-TE Policy.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="active", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """active must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="active", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__active = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_active(self):
    self.__active = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="active", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_active_since(self):
    """
    Getter method for active_since, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/active_since (oc-types:timeticks64)

    YANG Description: Indication of the time the path transitioned to the active
state.

The value is the timestamp in nanoseconds relative to the
Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    return self.__active_since
      
  def _set_active_since(self, v, load=False):
    """
    Setter method for active_since, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/active_since (oc-types:timeticks64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_active_since is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_active_since() directly.

    YANG Description: Indication of the time the path transitioned to the active
state.

The value is the timestamp in nanoseconds relative to the
Unix Epoch (Jan 1, 1970 00:00:00 UTC).
    """
    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="active-since", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """active_since must be of a type compatible with oc-types:timeticks64""",
          'defined-type': "oc-types:timeticks64",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="active-since", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)""",
        })

    self.__active_since = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_active_since(self):
    self.__active_since = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="active-since", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-types:timeticks64', is_config=False)


  def _get_active_transitions(self):
    """
    Getter method for active_transitions, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/active_transitions (oc-yang:counter64)

    YANG Description: The number of transitions to active state for the candidate
path.
    """
    return self.__active_transitions
      
  def _set_active_transitions(self, v, load=False):
    """
    Setter method for active_transitions, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state/active_transitions (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_active_transitions is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_active_transitions() directly.

    YANG Description: The number of transitions to active state for the candidate
path.
    """
    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="active-transitions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """active_transitions 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="active-transitions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__active_transitions = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_active_transitions(self):
    self.__active_transitions = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="active-transitions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)

  name = __builtin__.property(_get_name)
  protocol_origin = __builtin__.property(_get_protocol_origin)
  originator_asn = __builtin__.property(_get_originator_asn)
  originator_addr = __builtin__.property(_get_originator_addr)
  discriminator = __builtin__.property(_get_discriminator)
  preference = __builtin__.property(_get_preference)
  enlp = __builtin__.property(_get_enlp)
  valid = __builtin__.property(_get_valid)
  active = __builtin__.property(_get_active)
  active_since = __builtin__.property(_get_active_since)
  active_transitions = __builtin__.property(_get_active_transitions)


  _pyangbind_elements = OrderedDict([('name', name), ('protocol_origin', protocol_origin), ('originator_asn', originator_asn), ('originator_addr', originator_addr), ('discriminator', discriminator), ('preference', preference), ('enlp', enlp), ('valid', valid), ('active', active), ('active_since', active_since), ('active_transitions', active_transitions), ])


class yc_counters_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_state_counters(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/state/counters. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The counters of traffic steered to the segment-list.
  """
  __slots__ = ('_path_helper', '_extmethods', '__out_pkts','__out_octets','__out_labeled_pkts','__out_labeled_octets',)

  _yang_name = 'counters'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__out_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    self.__out_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    self.__out_labeled_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-labeled-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    self.__out_labeled_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-labeled-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'te-policies', 'te-policy', 'candidate-paths', 'candidate-path', 'segment-lists', 'segment-list', 'state', 'counters']

  def _get_out_pkts(self):
    """
    Getter method for out_pkts, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/state/counters/out_pkts (oc-yang:counter64)

    YANG Description: A cumulative counter of the outgoing packets steered to the
segment list. The counter includes both labeled and unlabeled
steered traffic.
    """
    return self.__out_pkts
      
  def _set_out_pkts(self, v, load=False):
    """
    Setter method for out_pkts, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/state/counters/out_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_pkts() directly.

    YANG Description: A cumulative counter of the outgoing packets steered to the
segment list. The counter includes both labeled and unlabeled
steered traffic.
    """
    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="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_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="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__out_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_pkts(self):
    self.__out_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_out_octets(self):
    """
    Getter method for out_octets, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/state/counters/out_octets (oc-yang:counter64)

    YANG Description: The cumulative counter of the total outgoing bytes steered
to the segment list. The counter includes both labeled and
unlabeled steerted traffic.
    """
    return self.__out_octets
      
  def _set_out_octets(self, v, load=False):
    """
    Setter method for out_octets, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/state/counters/out_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_octets() directly.

    YANG Description: The cumulative counter of the total outgoing bytes steered
to the segment list. The counter includes both labeled and
unlabeled steerted traffic.
    """
    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="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_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="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__out_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_octets(self):
    self.__out_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_out_labeled_pkts(self):
    """
    Getter method for out_labeled_pkts, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/state/counters/out_labeled_pkts (oc-yang:counter64)

    YANG Description: A cumulative counter of the incoming labeled packets steered
to the segment list.
    """
    return self.__out_labeled_pkts
      
  def _set_out_labeled_pkts(self, v, load=False):
    """
    Setter method for out_labeled_pkts, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/state/counters/out_labeled_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_labeled_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_labeled_pkts() directly.

    YANG Description: A cumulative counter of the incoming labeled packets steered
to the segment list.
    """
    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="out-labeled-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_labeled_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="out-labeled-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__out_labeled_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_labeled_pkts(self):
    self.__out_labeled_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-labeled-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_out_labeled_octets(self):
    """
    Getter method for out_labeled_octets, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/state/counters/out_labeled_octets (oc-yang:counter64)

    YANG Description: A cumulative counter of the total bytes of incoming labeled
traffic steered to the segment list.
    """
    return self.__out_labeled_octets
      
  def _set_out_labeled_octets(self, v, load=False):
    """
    Setter method for out_labeled_octets, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/state/counters/out_labeled_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_labeled_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_labeled_octets() directly.

    YANG Description: A cumulative counter of the total bytes of incoming labeled
traffic steered to the segment list.
    """
    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="out-labeled-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_labeled_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="out-labeled-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__out_labeled_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_labeled_octets(self):
    self.__out_labeled_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-labeled-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)

  out_pkts = __builtin__.property(_get_out_pkts)
  out_octets = __builtin__.property(_get_out_octets)
  out_labeled_pkts = __builtin__.property(_get_out_labeled_pkts)
  out_labeled_octets = __builtin__.property(_get_out_labeled_octets)


  _pyangbind_elements = OrderedDict([('out_pkts', out_pkts), ('out_octets', out_octets), ('out_labeled_pkts', out_labeled_pkts), ('out_labeled_octets', out_labeled_octets), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/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 a
segment-list in a SR-TE candidate paths.
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__valid','__invalid_reason','__weight','__counters',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__valid = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EMPTY_SL': {}, 'ZERO_WEIGHT': {}, 'FIRST_SID_UNRESOLVABLE': {}, 'OTHER_SID_UNRESOLVABLE': {}, 'VERIFICATION_FAIL': {}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:srte-invalid-sl-reason', 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/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'te-policies', 'te-policy', 'candidate-paths', 'candidate-path', 'segment-lists', 'segment-list', 'state']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/state/id (uint32)

    YANG Description: A unique id identifying the segment-list.
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/state/id (uint32)
    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: A unique id identifying the segment-list.
    """
    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="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """id 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="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)""",
        })

    self.__id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_id(self):
    self.__id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_valid(self):
    """
    Getter method for valid, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/state/valid (boolean)

    YANG Description: The validity of a segment-list should marked as true
when it is usable.
    """
    return self.__valid
      
  def _set_valid(self, v, load=False):
    """
    Setter method for valid, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/state/valid (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_valid is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_valid() directly.

    YANG Description: The validity of a segment-list should marked as true
when it is usable.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="valid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """valid must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__valid = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_valid(self):
    self.__valid = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="valid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_invalid_reason(self):
    """
    Getter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/state/invalid_reason (oc-srt:srte-invalid-sl-reason)

    YANG Description: If a segment-list is marked as invalid, this leaf should
indicate the reason.
    """
    return self.__invalid_reason
      
  def _set_invalid_reason(self, v, load=False):
    """
    Setter method for invalid_reason, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/state/invalid_reason (oc-srt:srte-invalid-sl-reason)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_invalid_reason is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_invalid_reason() directly.

    YANG Description: If a segment-list is marked as invalid, this leaf should
indicate the reason.
    """
    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={'EMPTY_SL': {}, 'ZERO_WEIGHT': {}, 'FIRST_SID_UNRESOLVABLE': {}, 'OTHER_SID_UNRESOLVABLE': {}, 'VERIFICATION_FAIL': {}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:srte-invalid-sl-reason', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """invalid_reason must be of a type compatible with oc-srt:srte-invalid-sl-reason""",
          'defined-type': "oc-srt:srte-invalid-sl-reason",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EMPTY_SL': {}, 'ZERO_WEIGHT': {}, 'FIRST_SID_UNRESOLVABLE': {}, 'OTHER_SID_UNRESOLVABLE': {}, 'VERIFICATION_FAIL': {}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:srte-invalid-sl-reason', is_config=False)""",
        })

    self.__invalid_reason = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_invalid_reason(self):
    self.__invalid_reason = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'EMPTY_SL': {}, 'ZERO_WEIGHT': {}, 'FIRST_SID_UNRESOLVABLE': {}, 'OTHER_SID_UNRESOLVABLE': {}, 'VERIFICATION_FAIL': {}},), is_leaf=True, yang_name="invalid-reason", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:srte-invalid-sl-reason', is_config=False)


  def _get_weight(self):
    """
    Getter method for weight, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/state/weight (uint32)

    YANG Description: The weight of the segment list within the set of
segment lists specified for the candidate path. The
traffic that is forwarded according to the policy is
distributed across the set of segment-lists such that
each list receives weight/(sum of all weights) traffic.
    """
    return self.__weight
      
  def _set_weight(self, v, load=False):
    """
    Setter method for weight, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/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 weight of the segment list within the set of
segment lists specified for the candidate path. The
traffic that is forwarded according to the policy is
distributed across the set of segment-lists such that
each list receives weight/(sum of all weights) traffic.
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='uint32', is_config=False)


  def _get_counters(self):
    """
    Getter method for counters, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/state/counters (container)

    YANG Description: The counters of traffic steered to the segment-list.
    """
    return self.__counters
      
  def _set_counters(self, v, load=False):
    """
    Setter method for counters, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/state/counters (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_counters is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_counters() directly.

    YANG Description: The counters of traffic steered to the segment-list.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_counters_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """counters must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_counters_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__counters = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_counters(self):
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  id = __builtin__.property(_get_id)
  valid = __builtin__.property(_get_valid)
  invalid_reason = __builtin__.property(_get_invalid_reason)
  weight = __builtin__.property(_get_weight)
  counters = __builtin__.property(_get_counters)


  _pyangbind_elements = OrderedDict([('id', id), ('valid', valid), ('invalid_reason', invalid_reason), ('weight', weight), ('counters', counters), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_sids_sid_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/sids/sid/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 SID within
the segment list.
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__value','__mpls_ttl','__mpls_tc',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__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': {}},),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}|:))'}),], is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-sid-type', is_config=False)
    self.__mpls_ttl = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="mpls-ttl", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    self.__mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'te-policies', 'te-policy', 'candidate-paths', 'candidate-path', 'segment-lists', 'segment-list', 'sids', 'sid', 'state']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/sids/sid/state/index (uint64)

    YANG Description: The index of the SID within the segment list. The segment list is
applied by ordering the SID entries in ascending numerical order
beginning at 0.
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/sids/sid/state/index (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: The index of the SID within the segment list. The segment list is
applied by ordering the SID entries in ascending numerical order
beginning at 0.
    """
    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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_index(self):
    self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_value(self):
    """
    Getter method for value, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/sids/sid/state/value (oc-srt:sr-sid-type)

    YANG Description: The value of the SID that is to be used. Specified as an MPLS
label or IPv6 address.
    """
    return self.__value
      
  def _set_value(self, v, load=False):
    """
    Setter method for value, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/sids/sid/state/value (oc-srt:sr-sid-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_value is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_value() directly.

    YANG Description: The value of the SID that is to be used. Specified as an MPLS
label or IPv6 address.
    """
    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': {}},),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}|:))'}),], is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-sid-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """value must be of a type compatible with oc-srt:sr-sid-type""",
          'defined-type': "oc-srt:sr-sid-type",
          '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': {}},),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}|:))'}),], is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-sid-type', is_config=False)""",
        })

    self.__value = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_value(self):
    self.__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': {}},),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}|:))'}),], is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-srt:sr-sid-type', is_config=False)


  def _get_mpls_ttl(self):
    """
    Getter method for mpls_ttl, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/sids/sid/state/mpls_ttl (uint8)

    YANG Description: The TTL to be set if the type of the SID is an MPLS label. If the
value of the TTL is set to be 0, the value is picked by the local
implementation.
    """
    return self.__mpls_ttl
      
  def _set_mpls_ttl(self, v, load=False):
    """
    Setter method for mpls_ttl, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/sids/sid/state/mpls_ttl (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mpls_ttl is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mpls_ttl() directly.

    YANG Description: The TTL to be set if the type of the SID is an MPLS label. If the
value of the TTL is set to be 0, the value is picked by the local
implementation.
    """
    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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="mpls-ttl", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mpls_ttl 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), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="mpls-ttl", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__mpls_ttl = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mpls_ttl(self):
    self.__mpls_ttl = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="mpls-ttl", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)


  def _get_mpls_tc(self):
    """
    Getter method for mpls_tc, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/sids/sid/state/mpls_tc (uint8)

    YANG Description: The value of the MPLS Traffic Class (TC) bits to be used if the
value of the SID is an MPLS label. In the case that the value is
set to 0, then the local implementation should choose the value.
    """
    return self.__mpls_tc
      
  def _set_mpls_tc(self, v, load=False):
    """
    Setter method for mpls_tc, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/sids/sid/state/mpls_tc (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mpls_tc is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mpls_tc() directly.

    YANG Description: The value of the MPLS Traffic Class (TC) bits to be used if the
value of the SID is an MPLS label. In the case that the value is
set to 0, then the local implementation should choose the value.
    """
    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']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mpls_tc 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..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)""",
        })

    self.__mpls_tc = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mpls_tc(self):
    self.__mpls_tc = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="mpls-tc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=False)

  index = __builtin__.property(_get_index)
  value = __builtin__.property(_get_value)
  mpls_ttl = __builtin__.property(_get_mpls_ttl)
  mpls_tc = __builtin__.property(_get_mpls_tc)


  _pyangbind_elements = OrderedDict([('index', index), ('value', value), ('mpls_ttl', mpls_ttl), ('mpls_tc', mpls_tc), ])


class yc_sid_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_sids_sid(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/sids/sid. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of SIDs that make up the segment list. The segment
list is formed by ordering the set of SIDs that are
specified by their index in ascending numerical order.
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__state',)

  _yang_name = 'sid'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_sids_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'te-policies', 'te-policy', 'candidate-paths', 'candidate-path', 'segment-lists', 'segment-list', 'sids', 'sid']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/sids/sid/index (leafref)

    YANG Description: Reference to the SID's index within the segment list
which acts as the key of the list.
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/sids/sid/index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: Reference to the SID's index within the segment list
which acts as the key of the list.
    """
    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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_index(self):
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/sids/sid/state (container)

    YANG Description: Operational state parameters relating to the SID within
the segment list.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/sids/sid/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 SID within
the segment list.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_sids_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_sids_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_sids_sid_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  index = __builtin__.property(_get_index)
  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('index', index), ('state', state), ])


class yc_sids_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_sids(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/sids. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The list of SIDs that make up the segment list. The
order of the SIDs is specified by ordering the list
according to index, in ascending order. The network
device should consider the top-most SID the entry with
the lowest index.
  """
  __slots__ = ('_path_helper', '_extmethods', '__sid',)

  _yang_name = 'sids'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__sid = YANGDynClass(base=YANGListType("index",yc_sid_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_sids_sid, yang_name="sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'te-policies', 'te-policy', 'candidate-paths', 'candidate-path', 'segment-lists', 'segment-list', 'sids']

  def _get_sid(self):
    """
    Getter method for sid, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/sids/sid (list)

    YANG Description: List of SIDs that make up the segment list. The segment
list is formed by ordering the set of SIDs that are
specified by their index in ascending numerical order.
    """
    return self.__sid
      
  def _set_sid(self, v, load=False):
    """
    Setter method for sid, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/sids/sid (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sid is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sid() directly.

    YANG Description: List of SIDs that make up the segment list. The segment
list is formed by ordering the set of SIDs that are
specified by their index in ascending numerical order.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("index",yc_sid_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_sids_sid, yang_name="sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sid must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("index",yc_sid_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_sids_sid, yang_name="sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__sid = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sid(self):
    self.__sid = YANGDynClass(base=YANGListType("index",yc_sid_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_sids_sid, yang_name="sid", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="sid", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  sid = __builtin__.property(_get_sid)


  _pyangbind_elements = OrderedDict([('sid', sid), ])


class yc_counters_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop_state_counters(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops/next-hop/state/counters. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The counters of traffic steered to the segment-list on
per next-hop basis.
  """
  __slots__ = ('_path_helper', '_extmethods', '__out_pkts','__out_octets','__out_labeled_pkts','__out_labeled_octets',)

  _yang_name = 'counters'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__out_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    self.__out_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    self.__out_labeled_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-labeled-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    self.__out_labeled_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-labeled-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'te-policies', 'te-policy', 'candidate-paths', 'candidate-path', 'segment-lists', 'segment-list', 'next-hops', 'next-hop', 'state', 'counters']

  def _get_out_pkts(self):
    """
    Getter method for out_pkts, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/counters/out_pkts (oc-yang:counter64)

    YANG Description: A cumulative counter of the outgoing packets steered to the
segment list. The counter includes both labeled and unlabeled
steered traffic.
    """
    return self.__out_pkts
      
  def _set_out_pkts(self, v, load=False):
    """
    Setter method for out_pkts, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/counters/out_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_pkts() directly.

    YANG Description: A cumulative counter of the outgoing packets steered to the
segment list. The counter includes both labeled and unlabeled
steered traffic.
    """
    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="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_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="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__out_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_pkts(self):
    self.__out_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_out_octets(self):
    """
    Getter method for out_octets, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/counters/out_octets (oc-yang:counter64)

    YANG Description: The cumulative counter of the total outgoing bytes steered
to the segment list. The counter includes both labeled and
unlabeled steerted traffic.
    """
    return self.__out_octets
      
  def _set_out_octets(self, v, load=False):
    """
    Setter method for out_octets, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/counters/out_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_octets() directly.

    YANG Description: The cumulative counter of the total outgoing bytes steered
to the segment list. The counter includes both labeled and
unlabeled steerted traffic.
    """
    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="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_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="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__out_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_octets(self):
    self.__out_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_out_labeled_pkts(self):
    """
    Getter method for out_labeled_pkts, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/counters/out_labeled_pkts (oc-yang:counter64)

    YANG Description: A cumulative counter of the incoming labeled packets steered
to the segment list.
    """
    return self.__out_labeled_pkts
      
  def _set_out_labeled_pkts(self, v, load=False):
    """
    Setter method for out_labeled_pkts, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/counters/out_labeled_pkts (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_labeled_pkts is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_labeled_pkts() directly.

    YANG Description: A cumulative counter of the incoming labeled packets steered
to the segment list.
    """
    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="out-labeled-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_labeled_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="out-labeled-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__out_labeled_pkts = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_labeled_pkts(self):
    self.__out_labeled_pkts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-labeled-pkts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)


  def _get_out_labeled_octets(self):
    """
    Getter method for out_labeled_octets, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/counters/out_labeled_octets (oc-yang:counter64)

    YANG Description: A cumulative counter of the total bytes of incoming labeled
traffic steered to the segment list.
    """
    return self.__out_labeled_octets
      
  def _set_out_labeled_octets(self, v, load=False):
    """
    Setter method for out_labeled_octets, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/counters/out_labeled_octets (oc-yang:counter64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_out_labeled_octets is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_out_labeled_octets() directly.

    YANG Description: A cumulative counter of the total bytes of incoming labeled
traffic steered to the segment list.
    """
    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="out-labeled-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """out_labeled_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="out-labeled-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)""",
        })

    self.__out_labeled_octets = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_out_labeled_octets(self):
    self.__out_labeled_octets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="out-labeled-octets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:counter64', is_config=False)

  out_pkts = __builtin__.property(_get_out_pkts)
  out_octets = __builtin__.property(_get_out_octets)
  out_labeled_pkts = __builtin__.property(_get_out_labeled_pkts)
  out_labeled_octets = __builtin__.property(_get_out_labeled_octets)


  _pyangbind_elements = OrderedDict([('out_pkts', out_pkts), ('out_octets', out_octets), ('out_labeled_pkts', out_labeled_pkts), ('out_labeled_octets', out_labeled_octets), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops/next-hop/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State parameters for the nexthop.
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__programmed_index','__ip_address','__mac_address','__pop_top_label','__pushed_mpls_label_stack','__encapsulate_header','__decapsulate_header','__origin_protocol','__counters',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__programmed_index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="programmed-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    self.__ip_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}'}),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}|:))'}),], is_leaf=True, yang_name="ip-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    self.__mac_address = 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)
    self.__pop_top_label = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="pop-top-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    self.__pushed_mpls_label_stack = YANGDynClass(unique=True, base=TypedListType(allowed_type=[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=False, yang_name="pushed-mpls-label-stack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    self.__encapsulate_header = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'GRE': {}, 'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'VXLAN': {}},), is_leaf=True, yang_name="encapsulate-header", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-aftt:encapsulation-header-type', is_config=False)
    self.__decapsulate_header = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'GRE': {}, 'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'VXLAN': {}},), is_leaf=True, yang_name="decapsulate-header", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-aftt:encapsulation-header-type', is_config=False)
    self.__origin_protocol = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}},), is_leaf=True, yang_name="origin-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'te-policies', 'te-policy', 'candidate-paths', 'candidate-path', 'segment-lists', 'segment-list', 'next-hops', 'next-hop', 'state']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/index (uint64)

    YANG Description: A unique entry for the next-hop.
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/index (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: A unique entry for the next-hop.
    """
    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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index 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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_index(self):
    self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_programmed_index(self):
    """
    Getter method for programmed_index, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/programmed_index (uint64)

    YANG Description: In some routing protocols, or route injection mechanisms it
is possible to set the index of the next-hop via configuration
or the protocol itself. In some systems it may not be possible
to maintain the index provided by an external client when
advertising the same entry via telemetry.

This leaf reflects the configured or client-supplied index of
the next-hop. This allows a client to create an assocation or
mapping back to the original index pushed by the client, and
the ID used as a key in the next-hop AFT list.
    """
    return self.__programmed_index
      
  def _set_programmed_index(self, v, load=False):
    """
    Setter method for programmed_index, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/programmed_index (uint64)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_programmed_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_programmed_index() directly.

    YANG Description: In some routing protocols, or route injection mechanisms it
is possible to set the index of the next-hop via configuration
or the protocol itself. In some systems it may not be possible
to maintain the index provided by an external client when
advertising the same entry via telemetry.

This leaf reflects the configured or client-supplied index of
the next-hop. This allows a client to create an assocation or
mapping back to the original index pushed by the client, and
the ID used as a key in the next-hop AFT list.
    """
    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="programmed-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """programmed_index 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="programmed-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)""",
        })

    self.__programmed_index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_programmed_index(self):
    self.__programmed_index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range':  ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="programmed-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint64', is_config=False)


  def _get_ip_address(self):
    """
    Getter method for ip_address, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/ip_address (oc-inet:ip-address)

    YANG Description: The IP address of the next-hop system.
    """
    return self.__ip_address
      
  def _set_ip_address(self, v, load=False):
    """
    Setter method for ip_address, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/ip_address (oc-inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ip_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ip_address() directly.

    YANG Description: The IP address of the next-hop system.
    """
    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}'}),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}|:))'}),], is_leaf=True, yang_name="ip-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ip_address must be of a type compatible with oc-inet:ip-address""",
          'defined-type': "oc-inet:ip-address",
          '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}'}),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}|:))'}),], is_leaf=True, yang_name="ip-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)""",
        })

    self.__ip_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_ip_address(self):
    self.__ip_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}'}),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}|:))'}),], is_leaf=True, yang_name="ip-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-inet:ip-address', is_config=False)


  def _get_mac_address(self):
    """
    Getter method for mac_address, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/mac_address (oc-yang:mac-address)

    YANG Description: The MAC address of the next-hop if resolved by the local
network instance.
    """
    return self.__mac_address
      
  def _set_mac_address(self, v, load=False):
    """
    Setter method for mac_address, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/mac_address (oc-yang:mac-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_mac_address is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_mac_address() directly.

    YANG Description: The MAC address of the next-hop if resolved by the local
network instance.
    """
    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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """mac_address 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)""",
        })

    self.__mac_address = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_mac_address(self):
    self.__mac_address = 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="mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-yang:mac-address', is_config=False)


  def _get_pop_top_label(self):
    """
    Getter method for pop_top_label, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/pop_top_label (boolean)

    YANG Description: Flag that controls pop action, i.e., the top-most MPLS label
should be popped from the packet when switched by the system.

The top-most MPLS label associated with pop action is equal to
the label key used in 'mpls' AFT 'label-entry' list.
    """
    return self.__pop_top_label
      
  def _set_pop_top_label(self, v, load=False):
    """
    Setter method for pop_top_label, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/pop_top_label (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pop_top_label is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pop_top_label() directly.

    YANG Description: Flag that controls pop action, i.e., the top-most MPLS label
should be popped from the packet when switched by the system.

The top-most MPLS label associated with pop action is equal to
the label key used in 'mpls' AFT 'label-entry' list.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="pop-top-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pop_top_label must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="pop-top-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""",
        })

    self.__pop_top_label = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_pop_top_label(self):
    self.__pop_top_label = YANGDynClass(base=YANGBool, default=YANGBool("false"), is_leaf=True, yang_name="pop-top-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)


  def _get_pushed_mpls_label_stack(self):
    """
    Getter method for pushed_mpls_label_stack, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/pushed_mpls_label_stack (oc-mplst:mpls-label)

    YANG Description: The MPLS label stack imposed when forwarding packets to the
next-hop
- the stack is encoded as a leaf list whereby the order of the
 entries is such that the first entry in the list is the
 label at the bottom of the stack to be pushed.

To this end, a packet which is to forwarded to a device using
a service label of 42, and a transport label of 8072 will be
represented with a label stack list of [42, 8072].

The MPLS label stack list is ordered by the user, such that no
system re-ordering of leaves is permitted by the system.

A swap operation is reflected by entries in the
popped-mpls-label-stack and pushed-mpls-label-stack nodes.
    """
    return self.__pushed_mpls_label_stack
      
  def _set_pushed_mpls_label_stack(self, v, load=False):
    """
    Setter method for pushed_mpls_label_stack, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/pushed_mpls_label_stack (oc-mplst:mpls-label)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_pushed_mpls_label_stack is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_pushed_mpls_label_stack() directly.

    YANG Description: The MPLS label stack imposed when forwarding packets to the
next-hop
- the stack is encoded as a leaf list whereby the order of the
 entries is such that the first entry in the list is the
 label at the bottom of the stack to be pushed.

To this end, a packet which is to forwarded to a device using
a service label of 42, and a transport label of 8072 will be
represented with a label stack list of [42, 8072].

The MPLS label stack list is ordered by the user, such that no
system re-ordering of leaves is permitted by the system.

A swap operation is reflected by entries in the
popped-mpls-label-stack and pushed-mpls-label-stack nodes.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=[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=False, yang_name="pushed-mpls-label-stack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """pushed_mpls_label_stack must be of a type compatible with oc-mplst:mpls-label""",
          'defined-type': "oc-mplst:mpls-label",
          'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=[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=False, yang_name="pushed-mpls-label-stack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)""",
        })

    self.__pushed_mpls_label_stack = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_pushed_mpls_label_stack(self):
    self.__pushed_mpls_label_stack = YANGDynClass(unique=True, base=TypedListType(allowed_type=[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=False, yang_name="pushed-mpls-label-stack", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-mplst:mpls-label', is_config=False)


  def _get_encapsulate_header(self):
    """
    Getter method for encapsulate_header, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/encapsulate_header (oc-aftt:encapsulation-header-type)

    YANG Description: When forwarding a packet to the specified next-hop the local
system performs an encapsulation of the packet - adding the
specified header type.
    """
    return self.__encapsulate_header
      
  def _set_encapsulate_header(self, v, load=False):
    """
    Setter method for encapsulate_header, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/encapsulate_header (oc-aftt:encapsulation-header-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_encapsulate_header is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_encapsulate_header() directly.

    YANG Description: When forwarding a packet to the specified next-hop the local
system performs an encapsulation of the packet - adding the
specified header type.
    """
    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={'GRE': {}, 'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'VXLAN': {}},), is_leaf=True, yang_name="encapsulate-header", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-aftt:encapsulation-header-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """encapsulate_header must be of a type compatible with oc-aftt:encapsulation-header-type""",
          'defined-type': "oc-aftt:encapsulation-header-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'GRE': {}, 'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'VXLAN': {}},), is_leaf=True, yang_name="encapsulate-header", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-aftt:encapsulation-header-type', is_config=False)""",
        })

    self.__encapsulate_header = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_encapsulate_header(self):
    self.__encapsulate_header = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'GRE': {}, 'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'VXLAN': {}},), is_leaf=True, yang_name="encapsulate-header", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-aftt:encapsulation-header-type', is_config=False)


  def _get_decapsulate_header(self):
    """
    Getter method for decapsulate_header, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/decapsulate_header (oc-aftt:encapsulation-header-type)

    YANG Description: When forwarding a packet to the specified next-hop, the local
system performs a decapsulation of the packet - removing the
specified header type. In the case that no next-hop is
specified, the packet header is removed, and a subsequent
forwarding lookup is performed on the packet encapsulated
within the header, matched within the relevant AFT within the
specified network-instance.
    """
    return self.__decapsulate_header
      
  def _set_decapsulate_header(self, v, load=False):
    """
    Setter method for decapsulate_header, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/decapsulate_header (oc-aftt:encapsulation-header-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_decapsulate_header is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_decapsulate_header() directly.

    YANG Description: When forwarding a packet to the specified next-hop, the local
system performs a decapsulation of the packet - removing the
specified header type. In the case that no next-hop is
specified, the packet header is removed, and a subsequent
forwarding lookup is performed on the packet encapsulated
within the header, matched within the relevant AFT within the
specified network-instance.
    """
    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={'GRE': {}, 'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'VXLAN': {}},), is_leaf=True, yang_name="decapsulate-header", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-aftt:encapsulation-header-type', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """decapsulate_header must be of a type compatible with oc-aftt:encapsulation-header-type""",
          'defined-type': "oc-aftt:encapsulation-header-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'GRE': {}, 'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'VXLAN': {}},), is_leaf=True, yang_name="decapsulate-header", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-aftt:encapsulation-header-type', is_config=False)""",
        })

    self.__decapsulate_header = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_decapsulate_header(self):
    self.__decapsulate_header = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'GRE': {}, 'IPV4': {}, 'IPV6': {}, 'MPLS': {}, 'VXLAN': {}},), is_leaf=True, yang_name="decapsulate-header", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-aftt:encapsulation-header-type', is_config=False)


  def _get_origin_protocol(self):
    """
    Getter method for origin_protocol, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/origin_protocol (identityref)

    YANG Description: The protocol from which the AFT entry was learned.
    """
    return self.__origin_protocol
      
  def _set_origin_protocol(self, v, load=False):
    """
    Setter method for origin_protocol, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/origin_protocol (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_origin_protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_origin_protocol() directly.

    YANG Description: The protocol from which the AFT entry was learned.
    """
    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={'BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}},), is_leaf=True, yang_name="origin-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """origin_protocol must be of a type compatible with identityref""",
          'defined-type': "openconfig-network-instance:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}},), is_leaf=True, yang_name="origin-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""",
        })

    self.__origin_protocol = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_origin_protocol(self):
    self.__origin_protocol = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:BGP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:ISIS': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:OSPF3': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:STATIC': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:DIRECTLY_CONNECTED': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL_AGGREGATE': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PIM': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:IGMP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:GRIBI': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:PCEP': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pol-types:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}, 'oc-pt:LOCAL': {'@module': 'openconfig-policy-types', '@namespace': 'http://openconfig.net/yang/policy-types'}},), is_leaf=True, yang_name="origin-protocol", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)


  def _get_counters(self):
    """
    Getter method for counters, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/counters (container)

    YANG Description: The counters of traffic steered to the segment-list on
per next-hop basis.
    """
    return self.__counters
      
  def _set_counters(self, v, load=False):
    """
    Setter method for counters, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state/counters (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_counters is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_counters() directly.

    YANG Description: The counters of traffic steered to the segment-list on
per next-hop basis.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_counters_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """counters must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_counters_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__counters = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_counters(self):
    self.__counters = YANGDynClass(base=yc_counters_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  index = __builtin__.property(_get_index)
  programmed_index = __builtin__.property(_get_programmed_index)
  ip_address = __builtin__.property(_get_ip_address)
  mac_address = __builtin__.property(_get_mac_address)
  pop_top_label = __builtin__.property(_get_pop_top_label)
  pushed_mpls_label_stack = __builtin__.property(_get_pushed_mpls_label_stack)
  encapsulate_header = __builtin__.property(_get_encapsulate_header)
  decapsulate_header = __builtin__.property(_get_decapsulate_header)
  origin_protocol = __builtin__.property(_get_origin_protocol)
  counters = __builtin__.property(_get_counters)


  _pyangbind_elements = OrderedDict([('index', index), ('programmed_index', programmed_index), ('ip_address', ip_address), ('mac_address', mac_address), ('pop_top_label', pop_top_label), ('pushed_mpls_label_stack', pushed_mpls_label_stack), ('encapsulate_header', encapsulate_header), ('decapsulate_header', decapsulate_header), ('origin_protocol', origin_protocol), ('counters', counters), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop_interface_ref_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops/next-hop/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/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'te-policies', 'te-policy', 'candidate-paths', 'candidate-path', 'segment-lists', 'segment-list', 'next-hops', 'next-hop', 'interface-ref', 'state']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/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 /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_subinterface(self):
    """
    Getter method for subinterface, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/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 /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop_interface_ref(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops/next-hop/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
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'interface-ref'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'te-policies', 'te-policy', 'candidate-paths', 'candidate-path', 'segment-lists', 'segment-list', 'next-hops', 'next-hop', 'interface-ref']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/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 /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/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_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_next_hop_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops/next-hop. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A next-hop the segment list is resolved to.
  """
  __slots__ = ('_path_helper', '_extmethods', '__index','__state','__interface_ref',)

  _yang_name = 'next-hop'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__interface_ref = YANGDynClass(base=yc_interface_ref_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop_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/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'te-policies', 'te-policy', 'candidate-paths', 'candidate-path', 'segment-lists', 'segment-list', 'next-hops', 'next-hop']

  def _get_index(self):
    """
    Getter method for index, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/index (leafref)

    YANG Description: A reference to the nexthop index in the state.
    """
    return self.__index
      
  def _set_index(self, v, load=False):
    """
    Setter method for index, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/index (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_index is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_index() directly.

    YANG Description: A reference to the nexthop index in the state.
    """
    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="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """index must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__index = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_index(self):
    self.__index = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/state (container)

    YANG Description: State parameters for the nexthop.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/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 parameters for the nexthop.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_interface_ref(self):
    """
    Getter method for interface_ref, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/interface_ref (container)

    YANG Description: Reference to an interface or subinterface
    """
    return self.__interface_ref
      
  def _set_interface_ref(self, v, load=False):
    """
    Setter method for interface_ref, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop/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
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_interface_ref_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    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_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__interface_ref = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_interface_ref(self):
    self.__interface_ref = YANGDynClass(base=yc_interface_ref_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  index = __builtin__.property(_get_index)
  state = __builtin__.property(_get_state)
  interface_ref = __builtin__.property(_get_interface_ref)


  _pyangbind_elements = OrderedDict([('index', index), ('state', state), ('interface_ref', interface_ref), ])


class yc_next_hops_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: The set of next-hops which the segment-list is resolved to.
Traffic steered to the segment-list should be forwarded over
them.
  """
  __slots__ = ('_path_helper', '_extmethods', '__next_hop',)

  _yang_name = 'next-hops'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__next_hop = YANGDynClass(base=YANGListType("index",yc_next_hop_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop, yang_name="next-hop", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'te-policies', 'te-policy', 'candidate-paths', 'candidate-path', 'segment-lists', 'segment-list', 'next-hops']

  def _get_next_hop(self):
    """
    Getter method for next_hop, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop (list)

    YANG Description: A next-hop the segment list is resolved to.
    """
    return self.__next_hop
      
  def _set_next_hop(self, v, load=False):
    """
    Setter method for next_hop, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops/next_hop (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hop is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hop() directly.

    YANG Description: A next-hop the segment list is resolved to.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("index",yc_next_hop_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop, yang_name="next-hop", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hop must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("index",yc_next_hop_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop, yang_name="next-hop", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__next_hop = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_next_hop(self):
    self.__next_hop = YANGDynClass(base=YANGListType("index",yc_next_hop_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops_next_hop, yang_name="next-hop", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="next-hop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  next_hop = __builtin__.property(_get_next_hop)


  _pyangbind_elements = OrderedDict([('next_hop', next_hop), ])


class yc_segment_list_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: An individual segment list within the list of segment
lists associated with this candidate path.
  """
  __slots__ = ('_path_helper', '_extmethods', '__id','__state','__sids','__next_hops',)

  _yang_name = 'segment-list'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__sids = YANGDynClass(base=yc_sids_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_sids, is_container='container', yang_name="sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__next_hops = YANGDynClass(base=yc_next_hops_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops, is_container='container', yang_name="next-hops", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'te-policies', 'te-policy', 'candidate-paths', 'candidate-path', 'segment-lists', 'segment-list']

  def _get_id(self):
    """
    Getter method for id, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/id (leafref)

    YANG Description: A reference to the segment-list that in use for the
candidate path.
    """
    return self.__id
      
  def _set_id(self, v, load=False):
    """
    Setter method for id, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/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: A reference to the segment-list that in use for the
candidate path.
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/state (container)

    YANG Description: Operational state parameters associated with a
segment-list in a SR-TE candidate paths.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/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 a
segment-list in a SR-TE candidate paths.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_sids(self):
    """
    Getter method for sids, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/sids (container)

    YANG Description: The list of SIDs that make up the segment list. The
order of the SIDs is specified by ordering the list
according to index, in ascending order. The network
device should consider the top-most SID the entry with
the lowest index.
    """
    return self.__sids
      
  def _set_sids(self, v, load=False):
    """
    Setter method for sids, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/sids (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sids is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sids() directly.

    YANG Description: The list of SIDs that make up the segment list. The
order of the SIDs is specified by ordering the list
according to index, in ascending order. The network
device should consider the top-most SID the entry with
the lowest index.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_sids_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_sids, is_container='container', yang_name="sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sids must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_sids_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_sids, is_container='container', yang_name="sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__sids = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_sids(self):
    self.__sids = YANGDynClass(base=yc_sids_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_sids, is_container='container', yang_name="sids", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_next_hops(self):
    """
    Getter method for next_hops, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops (container)

    YANG Description: The set of next-hops which the segment-list is resolved to.
Traffic steered to the segment-list should be forwarded over
them.
    """
    return self.__next_hops
      
  def _set_next_hops(self, v, load=False):
    """
    Setter method for next_hops, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list/next_hops (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_next_hops is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_next_hops() directly.

    YANG Description: The set of next-hops which the segment-list is resolved to.
Traffic steered to the segment-list should be forwarded over
them.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_next_hops_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops, is_container='container', yang_name="next-hops", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """next_hops must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_next_hops_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops, is_container='container', yang_name="next-hops", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__next_hops = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_next_hops(self):
    self.__next_hops = YANGDynClass(base=yc_next_hops_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list_next_hops, is_container='container', yang_name="next-hops", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  id = __builtin__.property(_get_id)
  state = __builtin__.property(_get_state)
  sids = __builtin__.property(_get_sids)
  next_hops = __builtin__.property(_get_next_hops)


  _pyangbind_elements = OrderedDict([('id', id), ('state', state), ('sids', sids), ('next_hops', next_hops), ])


class yc_segment_lists_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A collection of segment lists associated with the policy
candidate path.
  """
  __slots__ = ('_path_helper', '_extmethods', '__segment_list',)

  _yang_name = 'segment-lists'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__segment_list = YANGDynClass(base=YANGListType("id",yc_segment_list_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list, yang_name="segment-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="segment-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'te-policies', 'te-policy', 'candidate-paths', 'candidate-path', 'segment-lists']

  def _get_segment_list(self):
    """
    Getter method for segment_list, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list (list)

    YANG Description: An individual segment list within the list of segment
lists associated with this candidate path.
    """
    return self.__segment_list
      
  def _set_segment_list(self, v, load=False):
    """
    Setter method for segment_list, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists/segment_list (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_segment_list is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_segment_list() directly.

    YANG Description: An individual segment list within the list of segment
lists associated with this candidate path.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("id",yc_segment_list_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list, yang_name="segment-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="segment-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """segment_list must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("id",yc_segment_list_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list, yang_name="segment-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="segment-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__segment_list = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_segment_list(self):
    self.__segment_list = YANGDynClass(base=YANGListType("id",yc_segment_list_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists_segment_list, yang_name="segment-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="segment-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  segment_list = __builtin__.property(_get_segment_list)


  _pyangbind_elements = OrderedDict([('segment_list', segment_list), ])


class yc_candidate_path_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: An individual candidate path within the list of candidate
paths associated with this SR-TE policy. It is uniquely
identified by the combination of protocol-origin,
originator and discriminator
  """
  __slots__ = ('_path_helper', '_extmethods', '__protocol_origin','__originator_asn','__originator_addr','__discriminator','__state','__segment_lists',)

  _yang_name = 'candidate-path'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__protocol_origin = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="protocol-origin", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__originator_asn = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="originator-asn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__originator_addr = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="originator-addr", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__discriminator = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="discriminator", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__segment_lists = YANGDynClass(base=yc_segment_lists_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists, is_container='container', yang_name="segment-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'te-policies', 'te-policy', 'candidate-paths', 'candidate-path']

  def _get_protocol_origin(self):
    """
    Getter method for protocol_origin, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/protocol_origin (leafref)

    YANG Description: A reference to the component or protocol that originates
or signals the candidate path
    """
    return self.__protocol_origin
      
  def _set_protocol_origin(self, v, load=False):
    """
    Setter method for protocol_origin, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/protocol_origin (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_protocol_origin is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_protocol_origin() directly.

    YANG Description: A reference to the component or protocol that originates
or signals the candidate path
    """
    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="protocol-origin", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """protocol_origin must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="protocol-origin", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__protocol_origin = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_protocol_origin(self):
    self.__protocol_origin = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="protocol-origin", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_originator_asn(self):
    """
    Getter method for originator_asn, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/originator_asn (leafref)

    YANG Description: A reference to the autonomous system that the node
originating the candidate path locates.
    """
    return self.__originator_asn
      
  def _set_originator_asn(self, v, load=False):
    """
    Setter method for originator_asn, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/originator_asn (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_originator_asn is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_originator_asn() directly.

    YANG Description: A reference to the autonomous system that the node
originating the candidate path locates.
    """
    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="originator-asn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """originator_asn must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="originator-asn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__originator_asn = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_originator_asn(self):
    self.__originator_asn = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="originator-asn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_originator_addr(self):
    """
    Getter method for originator_addr, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/originator_addr (leafref)

    YANG Description: A reference to the address of the node originating the
candidate path.
    """
    return self.__originator_addr
      
  def _set_originator_addr(self, v, load=False):
    """
    Setter method for originator_addr, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/originator_addr (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_originator_addr is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_originator_addr() directly.

    YANG Description: A reference to the address of the node originating the
candidate path.
    """
    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="originator-addr", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """originator_addr must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="originator-addr", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__originator_addr = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_originator_addr(self):
    self.__originator_addr = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="originator-addr", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_discriminator(self):
    """
    Getter method for discriminator, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/discriminator (leafref)

    YANG Description: A reference to the ID uniquely identifying the path
within the context of a policy learnt from a protocol.
    """
    return self.__discriminator
      
  def _set_discriminator(self, v, load=False):
    """
    Setter method for discriminator, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/discriminator (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_discriminator is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_discriminator() directly.

    YANG Description: A reference to the ID uniquely identifying the path
within the context of a policy learnt from a protocol.
    """
    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="discriminator", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """discriminator must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="discriminator", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__discriminator = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_discriminator(self):
    self.__discriminator = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="discriminator", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/state (container)

    YANG Description: Operational state parameters associated with SR-TE
candidate paths.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/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 SR-TE
candidate paths.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_segment_lists(self):
    """
    Getter method for segment_lists, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists (container)

    YANG Description: A collection of segment lists associated with the policy
candidate path.
    """
    return self.__segment_lists
      
  def _set_segment_lists(self, v, load=False):
    """
    Setter method for segment_lists, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path/segment_lists (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_segment_lists is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_segment_lists() directly.

    YANG Description: A collection of segment lists associated with the policy
candidate path.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_segment_lists_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists, is_container='container', yang_name="segment-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """segment_lists must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_segment_lists_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists, is_container='container', yang_name="segment-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__segment_lists = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_segment_lists(self):
    self.__segment_lists = YANGDynClass(base=yc_segment_lists_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path_segment_lists, is_container='container', yang_name="segment-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  protocol_origin = __builtin__.property(_get_protocol_origin)
  originator_asn = __builtin__.property(_get_originator_asn)
  originator_addr = __builtin__.property(_get_originator_addr)
  discriminator = __builtin__.property(_get_discriminator)
  state = __builtin__.property(_get_state)
  segment_lists = __builtin__.property(_get_segment_lists)


  _pyangbind_elements = OrderedDict([('protocol_origin', protocol_origin), ('originator_asn', originator_asn), ('originator_addr', originator_addr), ('discriminator', discriminator), ('state', state), ('segment_lists', segment_lists), ])


class yc_candidate_paths_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: One or more candidate paths may be associated to a SR-TE
policy. The best and usable one should be used as forwarding
next-hops.
  """
  __slots__ = ('_path_helper', '_extmethods', '__candidate_path',)

  _yang_name = 'candidate-paths'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__candidate_path = YANGDynClass(base=YANGListType("protocol_origin originator_asn originator_addr discriminator",yc_candidate_path_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path, yang_name="candidate-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='protocol-origin originator-asn originator-addr discriminator', extensions=None), is_container='list', yang_name="candidate-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'te-policies', 'te-policy', 'candidate-paths']

  def _get_candidate_path(self):
    """
    Getter method for candidate_path, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path (list)

    YANG Description: An individual candidate path within the list of candidate
paths associated with this SR-TE policy. It is uniquely
identified by the combination of protocol-origin,
originator and discriminator
    """
    return self.__candidate_path
      
  def _set_candidate_path(self, v, load=False):
    """
    Setter method for candidate_path, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths/candidate_path (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_candidate_path is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_candidate_path() directly.

    YANG Description: An individual candidate path within the list of candidate
paths associated with this SR-TE policy. It is uniquely
identified by the combination of protocol-origin,
originator and discriminator
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("protocol_origin originator_asn originator_addr discriminator",yc_candidate_path_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path, yang_name="candidate-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='protocol-origin originator-asn originator-addr discriminator', extensions=None), is_container='list', yang_name="candidate-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """candidate_path must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("protocol_origin originator_asn originator_addr discriminator",yc_candidate_path_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path, yang_name="candidate-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='protocol-origin originator-asn originator-addr discriminator', extensions=None), is_container='list', yang_name="candidate-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__candidate_path = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_candidate_path(self):
    self.__candidate_path = YANGDynClass(base=YANGListType("protocol_origin originator_asn originator_addr discriminator",yc_candidate_path_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths_candidate_path, yang_name="candidate-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='protocol-origin originator-asn originator-addr discriminator', extensions=None), is_container='list', yang_name="candidate-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  candidate_path = __builtin__.property(_get_candidate_path)


  _pyangbind_elements = OrderedDict([('candidate_path', candidate_path), ])


class yc_te_policy_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/segment-routing/te-policies/te-policy. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: An individual SR-TE policy is identified by a combination
of color and endpoint.
  """
  __slots__ = ('_path_helper', '_extmethods', '__color','__endpoint','__state','__candidate_paths',)

  _yang_name = 'te-policy'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__color = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__endpoint = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    self.__candidate_paths = YANGDynClass(base=yc_candidate_paths_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths, is_container='container', yang_name="candidate-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'te-policies', 'te-policy']

  def _get_color(self):
    """
    Getter method for color, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/color (leafref)

    YANG Description: A reference to the srte color in the state.
    """
    return self.__color
      
  def _set_color(self, v, load=False):
    """
    Setter method for color, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/color (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_color is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_color() directly.

    YANG Description: A reference to the srte color in the state.
    """
    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="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """color must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__color = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_color(self):
    self.__color = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="color", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_endpoint(self):
    """
    Getter method for endpoint, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/endpoint (leafref)

    YANG Description: A reference to the srte endpoint in the state.
    """
    return self.__endpoint
      
  def _set_endpoint(self, v, load=False):
    """
    Setter method for endpoint, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/endpoint (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_endpoint is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_endpoint() directly.

    YANG Description: A reference to the srte endpoint in the state.
    """
    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="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """endpoint must be of a type compatible with leafref""",
          'defined-type': "leafref",
          'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)""",
        })

    self.__endpoint = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_endpoint(self):
    self.__endpoint = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="endpoint", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=False)


  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/state (container)

    YANG Description: The operational state of parameters associated with
SR-TE policies.
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_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: The operational state of parameters associated with
SR-TE policies.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_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/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_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/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)


  def _get_candidate_paths(self):
    """
    Getter method for candidate_paths, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths (container)

    YANG Description: One or more candidate paths may be associated to a SR-TE
policy. The best and usable one should be used as forwarding
next-hops.
    """
    return self.__candidate_paths
      
  def _set_candidate_paths(self, v, load=False):
    """
    Setter method for candidate_paths, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy/candidate_paths (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_candidate_paths is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_candidate_paths() directly.

    YANG Description: One or more candidate paths may be associated to a SR-TE
policy. The best and usable one should be used as forwarding
next-hops.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_candidate_paths_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths, is_container='container', yang_name="candidate-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """candidate_paths must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_candidate_paths_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths, is_container='container', yang_name="candidate-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)""",
        })

    self.__candidate_paths = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_candidate_paths(self):
    self.__candidate_paths = YANGDynClass(base=yc_candidate_paths_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy_candidate_paths, is_container='container', yang_name="candidate-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  color = __builtin__.property(_get_color)
  endpoint = __builtin__.property(_get_endpoint)
  state = __builtin__.property(_get_state)
  candidate_paths = __builtin__.property(_get_candidate_paths)


  _pyangbind_elements = OrderedDict([('color', color), ('endpoint', endpoint), ('state', state), ('candidate_paths', candidate_paths), ])


class yc_te_policies_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/segment-routing/te-policies. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: A collection of SR-TE policies in the system.
  """
  __slots__ = ('_path_helper', '_extmethods', '__te_policy',)

  _yang_name = 'te-policies'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__te_policy = YANGDynClass(base=YANGListType("color endpoint",yc_te_policy_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy, yang_name="te-policy", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='color endpoint', extensions=None), is_container='list', yang_name="te-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing', 'te-policies']

  def _get_te_policy(self):
    """
    Getter method for te_policy, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy (list)

    YANG Description: An individual SR-TE policy is identified by a combination
of color and endpoint.
    """
    return self.__te_policy
      
  def _set_te_policy(self, v, load=False):
    """
    Setter method for te_policy, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies/te_policy (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_te_policy is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_te_policy() directly.

    YANG Description: An individual SR-TE policy is identified by a combination
of color and endpoint.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGListType("color endpoint",yc_te_policy_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy, yang_name="te-policy", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='color endpoint', extensions=None), is_container='list', yang_name="te-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """te_policy must be of a type compatible with list""",
          'defined-type': "list",
          'generated-type': """YANGDynClass(base=YANGListType("color endpoint",yc_te_policy_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy, yang_name="te-policy", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='color endpoint', extensions=None), is_container='list', yang_name="te-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)""",
        })

    self.__te_policy = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_te_policy(self):
    self.__te_policy = YANGDynClass(base=YANGListType("color endpoint",yc_te_policy_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies_te_policy, yang_name="te-policy", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='color endpoint', extensions=None), is_container='list', yang_name="te-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='list', is_config=False)

  te_policy = __builtin__.property(_get_te_policy)


  _pyangbind_elements = OrderedDict([('te_policy', te_policy), ])


class yc_segment_routing_openconfig_network_instance_l2__network_instances_network_instance_segment_routing(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/segment-routing. 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
segment routing.
  """
  __slots__ = ('_path_helper', '_extmethods', '__srgbs','__srlbs','__te_policies',)

  _yang_name = 'segment-routing'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__srgbs = YANGDynClass(base=yc_srgbs_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_srgbs, is_container='container', yang_name="srgbs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__srlbs = YANGDynClass(base=yc_srlbs_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_srlbs, is_container='container', yang_name="srlbs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    self.__te_policies = YANGDynClass(base=yc_te_policies_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies, is_container='container', yang_name="te-policies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'segment-routing']

  def _get_srgbs(self):
    """
    Getter method for srgbs, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs (container)

    YANG Description: Configuration and operational state parameters relating to the
SRGBs defined for the system.
    """
    return self.__srgbs
      
  def _set_srgbs(self, v, load=False):
    """
    Setter method for srgbs, mapped from YANG variable /network_instances/network_instance/segment_routing/srgbs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_srgbs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_srgbs() directly.

    YANG Description: Configuration and operational state parameters relating to the
SRGBs defined for the system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_srgbs_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_srgbs, is_container='container', yang_name="srgbs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """srgbs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_srgbs_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_srgbs, is_container='container', yang_name="srgbs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__srgbs = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_srgbs(self):
    self.__srgbs = YANGDynClass(base=yc_srgbs_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_srgbs, is_container='container', yang_name="srgbs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_srlbs(self):
    """
    Getter method for srlbs, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs (container)

    YANG Description: Configuration and operational state parameters relating to the
Segment Routing Local Blocks (SRLBs) defined for the system.
    """
    return self.__srlbs
      
  def _set_srlbs(self, v, load=False):
    """
    Setter method for srlbs, mapped from YANG variable /network_instances/network_instance/segment_routing/srlbs (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_srlbs is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_srlbs() directly.

    YANG Description: Configuration and operational state parameters relating to the
Segment Routing Local Blocks (SRLBs) defined for the system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_srlbs_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_srlbs, is_container='container', yang_name="srlbs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """srlbs must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_srlbs_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_srlbs, is_container='container', yang_name="srlbs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__srlbs = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_srlbs(self):
    self.__srlbs = YANGDynClass(base=yc_srlbs_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_srlbs, is_container='container', yang_name="srlbs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)


  def _get_te_policies(self):
    """
    Getter method for te_policies, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies (container)

    YANG Description: A collection of SR-TE policies in the system.
    """
    return self.__te_policies
      
  def _set_te_policies(self, v, load=False):
    """
    Setter method for te_policies, mapped from YANG variable /network_instances/network_instance/segment_routing/te_policies (container)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_te_policies is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_te_policies() directly.

    YANG Description: A collection of SR-TE policies in the system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_te_policies_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies, is_container='container', yang_name="te-policies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """te_policies must be of a type compatible with container""",
          'defined-type': "container",
          'generated-type': """YANGDynClass(base=yc_te_policies_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies, is_container='container', yang_name="te-policies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
        })

    self.__te_policies = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_te_policies(self):
    self.__te_policies = YANGDynClass(base=yc_te_policies_openconfig_network_instance_l2__network_instances_network_instance_segment_routing_te_policies, is_container='container', yang_name="te-policies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)

  srgbs = __builtin__.property(_get_srgbs, _set_srgbs)
  srlbs = __builtin__.property(_get_srlbs, _set_srlbs)
  te_policies = __builtin__.property(_get_te_policies, _set_te_policies)


  _pyangbind_elements = OrderedDict([('srgbs', srgbs), ('srlbs', srlbs), ('te_policies', te_policies), ])


class yc_config_openconfig_network_instance_l2__network_instances_network_instance_vlans_vlan_config(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/vlans/vlan/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for VLANs
  """
  __slots__ = ('_path_helper', '_extmethods', '__vlan_id','__name','__status',)

  _yang_name = 'config'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__vlan_id = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlan-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-vlan-types:vlan-id', is_config=True)
    self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)
    self.__status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACTIVE': {}, 'SUSPENDED': {}},), default=six.text_type("ACTIVE"), is_leaf=True, yang_name="status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'vlans', 'vlan', 'config']

  def _get_vlan_id(self):
    """
    Getter method for vlan_id, mapped from YANG variable /network_instances/network_instance/vlans/vlan/config/vlan_id (oc-vlan-types:vlan-id)

    YANG Description: Interface VLAN id.
    """
    return self.__vlan_id
      
  def _set_vlan_id(self, v, load=False):
    """
    Setter method for vlan_id, mapped from YANG variable /network_instances/network_instance/vlans/vlan/config/vlan_id (oc-vlan-types:vlan-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_vlan_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_vlan_id() directly.

    YANG Description: Interface VLAN id.
    """
    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': ['1..4094']}), is_leaf=True, yang_name="vlan-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-vlan-types:vlan-id', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """vlan_id must be of a type compatible with oc-vlan-types:vlan-id""",
          'defined-type': "oc-vlan-types:vlan-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlan-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-vlan-types:vlan-id', is_config=True)""",
        })

    self.__vlan_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_vlan_id(self):
    self.__vlan_id = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlan-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-vlan-types:vlan-id', is_config=True)


  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/vlans/vlan/config/name (string)

    YANG Description: Interface VLAN name.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/vlans/vlan/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: Interface VLAN name.
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)


  def _get_status(self):
    """
    Getter method for status, mapped from YANG variable /network_instances/network_instance/vlans/vlan/config/status (enumeration)

    YANG Description: Admin state of the VLAN
    """
    return self.__status
      
  def _set_status(self, v, load=False):
    """
    Setter method for status, mapped from YANG variable /network_instances/network_instance/vlans/vlan/config/status (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_status is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_status() directly.

    YANG Description: Admin state of the VLAN
    """
    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={'ACTIVE': {}, 'SUSPENDED': {}},), default=six.text_type("ACTIVE"), is_leaf=True, yang_name="status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """status must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACTIVE': {}, 'SUSPENDED': {}},), default=six.text_type("ACTIVE"), is_leaf=True, yang_name="status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)""",
        })

    self.__status = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_status(self):
    self.__status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACTIVE': {}, 'SUSPENDED': {}},), default=six.text_type("ACTIVE"), is_leaf=True, yang_name="status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=True)

  vlan_id = __builtin__.property(_get_vlan_id, _set_vlan_id)
  name = __builtin__.property(_get_name, _set_name)
  status = __builtin__.property(_get_status, _set_status)


  _pyangbind_elements = OrderedDict([('vlan_id', vlan_id), ('name', name), ('status', status), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_vlans_vlan_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/vlans/vlan/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: State variables for VLANs
  """
  __slots__ = ('_path_helper', '_extmethods', '__vlan_id','__name','__status',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__vlan_id = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlan-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-vlan-types:vlan-id', is_config=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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)
    self.__status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACTIVE': {}, 'SUSPENDED': {}},), default=six.text_type("ACTIVE"), is_leaf=True, yang_name="status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'vlans', 'vlan', 'state']

  def _get_vlan_id(self):
    """
    Getter method for vlan_id, mapped from YANG variable /network_instances/network_instance/vlans/vlan/state/vlan_id (oc-vlan-types:vlan-id)

    YANG Description: Interface VLAN id.
    """
    return self.__vlan_id
      
  def _set_vlan_id(self, v, load=False):
    """
    Setter method for vlan_id, mapped from YANG variable /network_instances/network_instance/vlans/vlan/state/vlan_id (oc-vlan-types:vlan-id)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_vlan_id is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_vlan_id() directly.

    YANG Description: Interface VLAN id.
    """
    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': ['1..4094']}), is_leaf=True, yang_name="vlan-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-vlan-types:vlan-id', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """vlan_id must be of a type compatible with oc-vlan-types:vlan-id""",
          'defined-type': "oc-vlan-types:vlan-id",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlan-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-vlan-types:vlan-id', is_config=False)""",
        })

    self.__vlan_id = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_vlan_id(self):
    self.__vlan_id = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlan-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-vlan-types:vlan-id', is_config=False)


  def _get_name(self):
    """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/vlans/vlan/state/name (string)

    YANG Description: Interface VLAN name.
    """
    return self.__name
      
  def _set_name(self, v, load=False):
    """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/vlans/vlan/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: Interface VLAN name.
    """
    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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', 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/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)


  def _get_status(self):
    """
    Getter method for status, mapped from YANG variable /network_instances/network_instance/vlans/vlan/state/status (enumeration)

    YANG Description: Admin state of the VLAN
    """
    return self.__status
      
  def _set_status(self, v, load=False):
    """
    Setter method for status, mapped from YANG variable /network_instances/network_instance/vlans/vlan/state/status (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_status is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_status() directly.

    YANG Description: Admin state of the VLAN
    """
    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={'ACTIVE': {}, 'SUSPENDED': {}},), default=six.text_type("ACTIVE"), is_leaf=True, yang_name="status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """status must be of a type compatible with enumeration""",
          'defined-type': "openconfig-network-instance:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACTIVE': {}, 'SUSPENDED': {}},), default=six.text_type("ACTIVE"), is_leaf=True, yang_name="status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)""",
        })

    self.__status = t
    if hasattr(self, '_set'):
      self._set()

  def _unset_status(self):
    self.__status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'ACTIVE': {}, 'SUSPENDED': {}},), default=six.text_type("ACTIVE"), is_leaf=True, yang_name="status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='enumeration', is_config=False)

  vlan_id = __builtin__.property(_get_vlan_id)
  name = __builtin__.property(_get_name)
  status = __builtin__.property(_get_status)


  _pyangbind_elements = OrderedDict([('vlan_id', vlan_id), ('name', name), ('status', status), ])


class yc_state_openconfig_network_instance_l2__network_instances_network_instance_vlans_vlan_members_member_state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/vlans/vlan/members/member/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state for base interface reference
  """
  __slots__ = ('_path_helper', '_extmethods', '__interface',)

  _yang_name = 'state'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _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/network-instance', defining_module='openconfig-network-instance', yang_type='base-interface-ref', 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 ['network-instances', 'network-instance', 'vlans', 'vlan', 'members', 'member', 'state']

  def _get_interface(self):
    """
    Getter method for interface, mapped from YANG variable /network_instances/network_instance/vlans/vlan/members/member/state/interface (base-interface-ref)

    YANG Description: Reference to a base interface.
    """
    return self.__interface
      
  def _set_interface(self, v, load=False):
    """
    Setter method for interface, mapped from YANG variable /network_instances/network_instance/vlans/vlan/members/member/state/interface (base-interface-ref)
    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 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/network-instance', defining_module='openconfig-network-instance', yang_type='base-interface-ref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """interface must be of a type compatible with base-interface-ref""",
          'defined-type': "openconfig-network-instance:base-interface-ref",
          '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/network-instance', defining_module='openconfig-network-instance', yang_type='base-interface-ref', 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/network-instance', defining_module='openconfig-network-instance', yang_type='base-interface-ref', is_config=False)

  interface = __builtin__.property(_get_interface)


  _pyangbind_elements = OrderedDict([('interface', interface), ])


class yc_member_openconfig_network_instance_l2__network_instances_network_instance_vlans_vlan_members_member(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/vlans/vlan/members/member. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: List of references to interfaces / subinterfaces
associated with the VLAN.
  """
  __slots__ = ('_path_helper', '_extmethods', '__state',)

  _yang_name = 'member'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__state = YANGDynClass(base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_vlans_vlan_members_member_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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 ['network-instances', 'network-instance', 'vlans', 'vlan', 'members', 'member']

  def _get_state(self):
    """
    Getter method for state, mapped from YANG variable /network_instances/network_instance/vlans/vlan/members/member/state (container)

    YANG Description: Operational state for base interface reference
    """
    return self.__state
      
  def _set_state(self, v, load=False):
    """
    Setter method for state, mapped from YANG variable /network_instances/network_instance/vlans/vlan/members/member/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 base interface reference
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=yc_state_openconfig_network_instance_l2__network_instances_network_instance_vlans_vlan_members_member_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_vlans_vlan_members_member_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', 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_network_instance_l2__network_instances_network_instance_vlans_vlan_members_member_state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=False)

  state = __builtin__.property(_get_state)


  _pyangbind_elements = OrderedDict([('state', state), ])


class yc_members_openconfig_network_instance_l2__network_instances_network_instance_vlans_vlan_members(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/vlans/vlan/members. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Enclosing container for list of member interfaces
  """
  __slots__ = ('_path_helper', '_extmethods', '__member',)

  _yang_name = 'members'
  _yang_namespace = 'http://openconfig.net/yang/network-instance'

  _pybind_generated_by = 'container'

  def __init__(self, *args, **kwargs):

    self._path_helper = False

    self._extmethods = False
    self.__member = YANGDynClass(base=YANGListType(False,yc_member_openconfig_network_instance_l2__network_instances_network_instance_vlans_vlan_members_member, yang_name="member", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='False', extensions